diff options
690 files changed, 34453 insertions, 19088 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index 5f209a6675..3f33763ce0 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -608,6 +608,7 @@ tenebrous pau Tharax Ferraris VWR-605 Thickbrick Sleaford + SNOW-207 VWR-7109 VWR-9287 VWR-13483 diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index 365fb673f3..4c24218fc3 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -39,6 +39,146 @@ #include "llanimationstates.h" #include "llstring.h" +const LLUUID ANIM_AGENT_AFRAID = LLUUID("6b61c8e8-4747-0d75-12d7-e49ff207a4ca"); +const LLUUID ANIM_AGENT_AIM_BAZOOKA_R = LLUUID("b5b4a67d-0aee-30d2-72cd-77b333e932ef"); +const LLUUID ANIM_AGENT_AIM_BOW_L = LLUUID("46bb4359-de38-4ed8-6a22-f1f52fe8f506"); +const LLUUID ANIM_AGENT_AIM_HANDGUN_R = LLUUID("3147d815-6338-b932-f011-16b56d9ac18b"); +const LLUUID ANIM_AGENT_AIM_RIFLE_R = LLUUID("ea633413-8006-180a-c3ba-96dd1d756720"); +const LLUUID ANIM_AGENT_ANGRY = LLUUID("5747a48e-073e-c331-f6f3-7c2149613d3e"); +const LLUUID ANIM_AGENT_AWAY = LLUUID("fd037134-85d4-f241-72c6-4f42164fedee"); +const LLUUID ANIM_AGENT_BACKFLIP = LLUUID("c4ca6188-9127-4f31-0158-23c4e2f93304"); +const LLUUID ANIM_AGENT_BELLY_LAUGH = LLUUID("18b3a4b5-b463-bd48-e4b6-71eaac76c515"); +const LLUUID ANIM_AGENT_BLOW_KISS = LLUUID("db84829b-462c-ee83-1e27-9bbee66bd624"); +const LLUUID ANIM_AGENT_BORED = LLUUID("b906c4ba-703b-1940-32a3-0c7f7d791510"); +const LLUUID ANIM_AGENT_BOW = LLUUID("82e99230-c906-1403-4d9c-3889dd98daba"); +const LLUUID ANIM_AGENT_BRUSH = LLUUID("349a3801-54f9-bf2c-3bd0-1ac89772af01"); +const LLUUID ANIM_AGENT_BUSY = LLUUID("efcf670c-2d18-8128-973a-034ebc806b67"); +const LLUUID ANIM_AGENT_CLAP = LLUUID("9b0c1c4e-8ac7-7969-1494-28c874c4f668"); +const LLUUID ANIM_AGENT_COURTBOW = LLUUID("9ba1c942-08be-e43a-fb29-16ad440efc50"); +const LLUUID ANIM_AGENT_CROUCH = LLUUID("201f3fdf-cb1f-dbec-201f-7333e328ae7c"); +const LLUUID ANIM_AGENT_CROUCHWALK = LLUUID("47f5f6fb-22e5-ae44-f871-73aaaf4a6022"); +const LLUUID ANIM_AGENT_CRY = LLUUID("92624d3e-1068-f1aa-a5ec-8244585193ed"); +const LLUUID ANIM_AGENT_CUSTOMIZE = LLUUID("038fcec9-5ebd-8a8e-0e2e-6e71a0a1ac53"); +const LLUUID ANIM_AGENT_CUSTOMIZE_DONE = LLUUID("6883a61a-b27b-5914-a61e-dda118a9ee2c"); +const LLUUID ANIM_AGENT_DANCE1 = LLUUID("b68a3d7c-de9e-fc87-eec8-543d787e5b0d"); +const LLUUID ANIM_AGENT_DANCE2 = LLUUID("928cae18-e31d-76fd-9cc9-2f55160ff818"); +const LLUUID ANIM_AGENT_DANCE3 = LLUUID("30047778-10ea-1af7-6881-4db7a3a5a114"); +const LLUUID ANIM_AGENT_DANCE4 = LLUUID("951469f4-c7b2-c818-9dee-ad7eea8c30b7"); +const LLUUID ANIM_AGENT_DANCE5 = LLUUID("4bd69a1d-1114-a0b4-625f-84e0a5237155"); +const LLUUID ANIM_AGENT_DANCE6 = LLUUID("cd28b69b-9c95-bb78-3f94-8d605ff1bb12"); +const LLUUID ANIM_AGENT_DANCE7 = LLUUID("a54d8ee2-28bb-80a9-7f0c-7afbbe24a5d6"); +const LLUUID ANIM_AGENT_DANCE8 = LLUUID("b0dc417c-1f11-af36-2e80-7e7489fa7cdc"); +const LLUUID ANIM_AGENT_DEAD = LLUUID("57abaae6-1d17-7b1b-5f98-6d11a6411276"); +const LLUUID ANIM_AGENT_DRINK = LLUUID("0f86e355-dd31-a61c-fdb0-3a96b9aad05f"); +const LLUUID ANIM_AGENT_EMBARRASSED = LLUUID("514af488-9051-044a-b3fc-d4dbf76377c6"); +const LLUUID ANIM_AGENT_EXPRESS_AFRAID = LLUUID("aa2df84d-cf8f-7218-527b-424a52de766e"); +const LLUUID ANIM_AGENT_EXPRESS_ANGER = LLUUID("1a03b575-9634-b62a-5767-3a679e81f4de"); +const LLUUID ANIM_AGENT_EXPRESS_BORED = LLUUID("214aa6c1-ba6a-4578-f27c-ce7688f61d0d"); +const LLUUID ANIM_AGENT_EXPRESS_CRY = LLUUID("d535471b-85bf-3b4d-a542-93bea4f59d33"); +const LLUUID ANIM_AGENT_EXPRESS_DISDAIN = LLUUID("d4416ff1-09d3-300f-4183-1b68a19b9fc1"); +const LLUUID ANIM_AGENT_EXPRESS_EMBARRASSED = LLUUID("0b8c8211-d78c-33e8-fa28-c51a9594e424"); +const LLUUID ANIM_AGENT_EXPRESS_FROWN = LLUUID("fee3df48-fa3d-1015-1e26-a205810e3001"); +const LLUUID ANIM_AGENT_EXPRESS_KISS = LLUUID("1e8d90cc-a84e-e135-884c-7c82c8b03a14"); +const LLUUID ANIM_AGENT_EXPRESS_LAUGH = LLUUID("62570842-0950-96f8-341c-809e65110823"); +const LLUUID ANIM_AGENT_EXPRESS_OPEN_MOUTH = LLUUID("d63bc1f9-fc81-9625-a0c6-007176d82eb7"); +const LLUUID ANIM_AGENT_EXPRESS_REPULSED = LLUUID("f76cda94-41d4-a229-2872-e0296e58afe1"); +const LLUUID ANIM_AGENT_EXPRESS_SAD = LLUUID("eb6ebfb2-a4b3-a19c-d388-4dd5c03823f7"); +const LLUUID ANIM_AGENT_EXPRESS_SHRUG = LLUUID("a351b1bc-cc94-aac2-7bea-a7e6ebad15ef"); +const LLUUID ANIM_AGENT_EXPRESS_SMILE = LLUUID("b7c7c833-e3d3-c4e3-9fc0-131237446312"); +const LLUUID ANIM_AGENT_EXPRESS_SURPRISE = LLUUID("728646d9-cc79-08b2-32d6-937f0a835c24"); +const LLUUID ANIM_AGENT_EXPRESS_TONGUE_OUT = LLUUID("835965c6-7f2f-bda2-5deb-2478737f91bf"); +const LLUUID ANIM_AGENT_EXPRESS_TOOTHSMILE = LLUUID("b92ec1a5-e7ce-a76b-2b05-bcdb9311417e"); +const LLUUID ANIM_AGENT_EXPRESS_WINK = LLUUID("da020525-4d94-59d6-23d7-81fdebf33148"); +const LLUUID ANIM_AGENT_EXPRESS_WORRY = LLUUID("9c05e5c7-6f07-6ca4-ed5a-b230390c3950"); +const LLUUID ANIM_AGENT_FALLDOWN = LLUUID("666307d9-a860-572d-6fd4-c3ab8865c094"); +const LLUUID ANIM_AGENT_FEMALE_RUN_NEW = LLUUID("85995026-eade-5d78-d364-94a64512cb66"); +const LLUUID ANIM_AGENT_FEMALE_WALK = LLUUID("f5fc7433-043d-e819-8298-f519a119b688"); +const LLUUID ANIM_AGENT_FEMALE_WALK_NEW = LLUUID("d60c41d2-7c24-7074-d3fa-6101cea22a51"); +const LLUUID ANIM_AGENT_FINGER_WAG = LLUUID("c1bc7f36-3ba0-d844-f93c-93be945d644f"); +const LLUUID ANIM_AGENT_FIST_PUMP = LLUUID("7db00ccd-f380-f3ee-439d-61968ec69c8a"); +const LLUUID ANIM_AGENT_FLY = LLUUID("aec4610c-757f-bc4e-c092-c6e9caf18daf"); +const LLUUID ANIM_AGENT_FLYSLOW = LLUUID("2b5a38b2-5e00-3a97-a495-4c826bc443e6"); +const LLUUID ANIM_AGENT_HELLO = LLUUID("9b29cd61-c45b-5689-ded2-91756b8d76a9"); +const LLUUID ANIM_AGENT_HOLD_BAZOOKA_R = LLUUID("ef62d355-c815-4816-2474-b1acc21094a6"); +const LLUUID ANIM_AGENT_HOLD_BOW_L = LLUUID("8b102617-bcba-037b-86c1-b76219f90c88"); +const LLUUID ANIM_AGENT_HOLD_HANDGUN_R = LLUUID("efdc1727-8b8a-c800-4077-975fc27ee2f2"); +const LLUUID ANIM_AGENT_HOLD_RIFLE_R = LLUUID("3d94bad0-c55b-7dcc-8763-033c59405d33"); +const LLUUID ANIM_AGENT_HOLD_THROW_R = LLUUID("7570c7b5-1f22-56dd-56ef-a9168241bbb6"); +const LLUUID ANIM_AGENT_HOVER = LLUUID("4ae8016b-31b9-03bb-c401-b1ea941db41d"); +const LLUUID ANIM_AGENT_HOVER_DOWN = LLUUID("20f063ea-8306-2562-0b07-5c853b37b31e"); +const LLUUID ANIM_AGENT_HOVER_UP = LLUUID("62c5de58-cb33-5743-3d07-9e4cd4352864"); +const LLUUID ANIM_AGENT_IMPATIENT = LLUUID("5ea3991f-c293-392e-6860-91dfa01278a3"); +const LLUUID ANIM_AGENT_JUMP = LLUUID("2305bd75-1ca9-b03b-1faa-b176b8a8c49e"); +const LLUUID ANIM_AGENT_JUMP_FOR_JOY = LLUUID("709ea28e-1573-c023-8bf8-520c8bc637fa"); +const LLUUID ANIM_AGENT_KISS_MY_BUTT = LLUUID("19999406-3a3a-d58c-a2ac-d72e555dcf51"); +const LLUUID ANIM_AGENT_LAND = LLUUID("7a17b059-12b2-41b1-570a-186368b6aa6f"); +const LLUUID ANIM_AGENT_LAUGH_SHORT = LLUUID("ca5b3f14-3194-7a2b-c894-aa699b718d1f"); +const LLUUID ANIM_AGENT_MEDIUM_LAND = LLUUID("f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"); +const LLUUID ANIM_AGENT_MOTORCYCLE_SIT = LLUUID("08464f78-3a8e-2944-cba5-0c94aff3af29"); +const LLUUID ANIM_AGENT_MUSCLE_BEACH = LLUUID("315c3a41-a5f3-0ba4-27da-f893f769e69b"); +const LLUUID ANIM_AGENT_NO = LLUUID("5a977ed9-7f72-44e9-4c4c-6e913df8ae74"); +const LLUUID ANIM_AGENT_NO_UNHAPPY = LLUUID("d83fa0e5-97ed-7eb2-e798-7bd006215cb4"); +const LLUUID ANIM_AGENT_NYAH_NYAH = LLUUID("f061723d-0a18-754f-66ee-29a44795a32f"); +const LLUUID ANIM_AGENT_ONETWO_PUNCH = LLUUID("eefc79be-daae-a239-8c04-890f5d23654a"); +const LLUUID ANIM_AGENT_PEACE = LLUUID("b312b10e-65ab-a0a4-8b3c-1326ea8e3ed9"); +const LLUUID ANIM_AGENT_POINT_ME = LLUUID("17c024cc-eef2-f6a0-3527-9869876d7752"); +const LLUUID ANIM_AGENT_POINT_YOU = LLUUID("ec952cca-61ef-aa3b-2789-4d1344f016de"); +const LLUUID ANIM_AGENT_PRE_JUMP = LLUUID("7a4e87fe-de39-6fcb-6223-024b00893244"); +const LLUUID ANIM_AGENT_PUNCH_LEFT = LLUUID("f3300ad9-3462-1d07-2044-0fef80062da0"); +const LLUUID ANIM_AGENT_PUNCH_RIGHT = LLUUID("c8e42d32-7310-6906-c903-cab5d4a34656"); +const LLUUID ANIM_AGENT_REPULSED = LLUUID("36f81a92-f076-5893-dc4b-7c3795e487cf"); +const LLUUID ANIM_AGENT_ROUNDHOUSE_KICK = LLUUID("49aea43b-5ac3-8a44-b595-96100af0beda"); +const LLUUID ANIM_AGENT_RPS_COUNTDOWN = LLUUID("35db4f7e-28c2-6679-cea9-3ee108f7fc7f"); +const LLUUID ANIM_AGENT_RPS_PAPER = LLUUID("0836b67f-7f7b-f37b-c00a-460dc1521f5a"); +const LLUUID ANIM_AGENT_RPS_ROCK = LLUUID("42dd95d5-0bc6-6392-f650-777304946c0f"); +const LLUUID ANIM_AGENT_RPS_SCISSORS = LLUUID("16803a9f-5140-e042-4d7b-d28ba247c325"); +const LLUUID ANIM_AGENT_RUN = LLUUID("05ddbff8-aaa9-92a1-2b74-8fe77a29b445"); +const LLUUID ANIM_AGENT_RUN_NEW = LLUUID("1ab1b236-cd08-21e6-0cbc-0d923fc6eca2"); +const LLUUID ANIM_AGENT_SAD = LLUUID("0eb702e2-cc5a-9a88-56a5-661a55c0676a"); +const LLUUID ANIM_AGENT_SALUTE = LLUUID("cd7668a6-7011-d7e2-ead8-fc69eff1a104"); +const LLUUID ANIM_AGENT_SHOOT_BOW_L = LLUUID("e04d450d-fdb5-0432-fd68-818aaf5935f8"); +const LLUUID ANIM_AGENT_SHOUT = LLUUID("6bd01860-4ebd-127a-bb3d-d1427e8e0c42"); +const LLUUID ANIM_AGENT_SHRUG = LLUUID("70ea714f-3a97-d742-1b01-590a8fcd1db5"); +const LLUUID ANIM_AGENT_SIT = LLUUID("1a5fe8ac-a804-8a5d-7cbd-56bd83184568"); +const LLUUID ANIM_AGENT_SIT_FEMALE = LLUUID("b1709c8d-ecd3-54a1-4f28-d55ac0840782"); +const LLUUID ANIM_AGENT_SIT_GENERIC = LLUUID("245f3c54-f1c0-bf2e-811f-46d8eeb386e7"); +const LLUUID ANIM_AGENT_SIT_GROUND = LLUUID("1c7600d6-661f-b87b-efe2-d7421eb93c86"); +const LLUUID ANIM_AGENT_SIT_GROUND_CONSTRAINED = LLUUID("1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"); +const LLUUID ANIM_AGENT_SIT_TO_STAND = LLUUID("a8dee56f-2eae-9e7a-05a2-6fb92b97e21e"); +const LLUUID ANIM_AGENT_SLEEP = LLUUID("f2bed5f9-9d44-39af-b0cd-257b2a17fe40"); +const LLUUID ANIM_AGENT_SMOKE_IDLE = LLUUID("d2f2ee58-8ad1-06c9-d8d3-3827ba31567a"); +const LLUUID ANIM_AGENT_SMOKE_INHALE = LLUUID("6802d553-49da-0778-9f85-1599a2266526"); +const LLUUID ANIM_AGENT_SMOKE_THROW_DOWN = LLUUID("0a9fb970-8b44-9114-d3a9-bf69cfe804d6"); +const LLUUID ANIM_AGENT_SNAPSHOT = LLUUID("eae8905b-271a-99e2-4c0e-31106afd100c"); +const LLUUID ANIM_AGENT_STAND = LLUUID("2408fe9e-df1d-1d7d-f4ff-1384fa7b350f"); +const LLUUID ANIM_AGENT_STANDUP = LLUUID("3da1d753-028a-5446-24f3-9c9b856d9422"); +const LLUUID ANIM_AGENT_STAND_1 = LLUUID("15468e00-3400-bb66-cecc-646d7c14458e"); +const LLUUID ANIM_AGENT_STAND_2 = LLUUID("370f3a20-6ca6-9971-848c-9a01bc42ae3c"); +const LLUUID ANIM_AGENT_STAND_3 = LLUUID("42b46214-4b44-79ae-deb8-0df61424ff4b"); +const LLUUID ANIM_AGENT_STAND_4 = LLUUID("f22fed8b-a5ed-2c93-64d5-bdd8b93c889f"); +const LLUUID ANIM_AGENT_STRETCH = LLUUID("80700431-74ec-a008-14f8-77575e73693f"); +const LLUUID ANIM_AGENT_STRIDE = LLUUID("1cb562b0-ba21-2202-efb3-30f82cdf9595"); +const LLUUID ANIM_AGENT_SURF = LLUUID("41426836-7437-7e89-025d-0aa4d10f1d69"); +const LLUUID ANIM_AGENT_SURPRISE = LLUUID("313b9881-4302-73c0-c7d0-0e7a36b6c224"); +const LLUUID ANIM_AGENT_SWORD_STRIKE = LLUUID("85428680-6bf9-3e64-b489-6f81087c24bd"); +const LLUUID ANIM_AGENT_TALK = LLUUID("5c682a95-6da4-a463-0bf6-0f5b7be129d1"); +const LLUUID ANIM_AGENT_TANTRUM = LLUUID("11000694-3f41-adc2-606b-eee1d66f3724"); +const LLUUID ANIM_AGENT_THROW_R = LLUUID("aa134404-7dac-7aca-2cba-435f9db875ca"); +const LLUUID ANIM_AGENT_TRYON_SHIRT = LLUUID("83ff59fe-2346-f236-9009-4e3608af64c1"); +const LLUUID ANIM_AGENT_TURNLEFT = LLUUID("56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"); +const LLUUID ANIM_AGENT_TURNRIGHT = LLUUID("2d6daa51-3192-6794-8e2e-a15f8338ec30"); +const LLUUID ANIM_AGENT_TYPE = LLUUID("c541c47f-e0c0-058b-ad1a-d6ae3a4584d9"); +const LLUUID ANIM_AGENT_WALK = LLUUID("6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"); +const LLUUID ANIM_AGENT_WALK_NEW = LLUUID("33339176-7ddc-9397-94a4-bf3403cbc8f5"); +const LLUUID ANIM_AGENT_WHISPER = LLUUID("7693f268-06c7-ea71-fa21-2b30d6533f8f"); +const LLUUID ANIM_AGENT_WHISTLE = LLUUID("b1ed7982-c68e-a982-7561-52a88a5298c0"); +const LLUUID ANIM_AGENT_WINK = LLUUID("869ecdad-a44b-671e-3266-56aef2e3ac2e"); +const LLUUID ANIM_AGENT_WINK_HOLLYWOOD = LLUUID("c0c4030f-c02b-49de-24ba-2331f43fe41c"); +const LLUUID ANIM_AGENT_WORRY = LLUUID("9f496bd2-589a-709f-16cc-69bf7df1d36c"); +const LLUUID ANIM_AGENT_YES = LLUUID("15dd911d-be82-2856-26db-27659b142875"); +const LLUUID ANIM_AGENT_YES_HAPPY = LLUUID("b8c8b2a3-9008-1771-3bfc-90924955ab2d"); +const LLUUID ANIM_AGENT_YOGA_FLOAT = LLUUID("42ecd00b-9947-a97c-400a-bbc9174c7aeb"); + LLUUID AGENT_WALK_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_CROUCHWALK, ANIM_AGENT_TURNLEFT, ANIM_AGENT_TURNRIGHT}; S32 NUM_AGENT_WALK_ANIMS = LL_ARRAY_SIZE(AGENT_WALK_ANIMS); @@ -116,7 +256,9 @@ LLAnimationLibrary::LLAnimationLibrary() : mAnimMap[ANIM_AGENT_EXPRESS_WINK]= mAnimStringTable.addString("express_wink_emote"); mAnimMap[ANIM_AGENT_EXPRESS_WORRY]= mAnimStringTable.addString("express_worry_emote"); mAnimMap[ANIM_AGENT_FALLDOWN]= mAnimStringTable.addString("falldown"); + mAnimMap[ANIM_AGENT_FEMALE_RUN_NEW]= mAnimStringTable.addString("female_run_new"); mAnimMap[ANIM_AGENT_FEMALE_WALK]= mAnimStringTable.addString("female_walk"); + mAnimMap[ANIM_AGENT_FEMALE_WALK_NEW]= mAnimStringTable.addString("female_walk_new"); mAnimMap[ANIM_AGENT_FINGER_WAG]= mAnimStringTable.addString("angry_fingerwag"); mAnimMap[ANIM_AGENT_FIST_PUMP]= mAnimStringTable.addString("fist_pump"); mAnimMap[ANIM_AGENT_FLY]= mAnimStringTable.addString("fly"); @@ -156,6 +298,7 @@ LLAnimationLibrary::LLAnimationLibrary() : mAnimMap[ANIM_AGENT_RPS_ROCK]= mAnimStringTable.addString("rps_rock"); mAnimMap[ANIM_AGENT_RPS_SCISSORS]= mAnimStringTable.addString("rps_scissors"); mAnimMap[ANIM_AGENT_RUN]= mAnimStringTable.addString("run"); + mAnimMap[ANIM_AGENT_RUN_NEW]= mAnimStringTable.addString("run_new"); mAnimMap[ANIM_AGENT_SAD]= mAnimStringTable.addString("express_sad"); mAnimMap[ANIM_AGENT_SALUTE]= mAnimStringTable.addString("salute"); mAnimMap[ANIM_AGENT_SHOOT_BOW_L]= mAnimStringTable.addString("shoot_l_bow"); @@ -191,6 +334,7 @@ LLAnimationLibrary::LLAnimationLibrary() : mAnimMap[ANIM_AGENT_TURNRIGHT]= mAnimStringTable.addString("turnright"); mAnimMap[ANIM_AGENT_TYPE]= mAnimStringTable.addString("type"); mAnimMap[ANIM_AGENT_WALK]= mAnimStringTable.addString("walk"); + mAnimMap[ANIM_AGENT_WALK_NEW]= mAnimStringTable.addString("walk_new"); mAnimMap[ANIM_AGENT_WHISPER]= mAnimStringTable.addString("whisper"); mAnimMap[ANIM_AGENT_WHISTLE]= mAnimStringTable.addString("whistle"); mAnimMap[ANIM_AGENT_WINK]= mAnimStringTable.addString("express_wink"); @@ -260,6 +404,23 @@ LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allo return id; } +//----------------------------------------------------------------------------- +// Associate an anim state with a name +//----------------------------------------------------------------------------- +void LLAnimationLibrary::animStateSetString( const LLUUID& state, const std::string& name) +{ + mAnimMap[state] = mAnimStringTable.addString(name); +} + +std::string LLAnimationLibrary::animationName( const LLUUID& id ) const +{ + const char *cptr = gAnimLibrary.animStateToString(id); + if (cptr) + return std::string(cptr); + else + return std::string("[") + id.asString() + std::string("]"); +} + // Animation states that the user can trigger as part of a gesture // See struct LLAnimStateEntry in header for label location information const LLAnimStateEntry gUserAnimStates[] = { @@ -337,6 +498,5 @@ const LLAnimStateEntry gUserAnimStates[] = { const S32 gUserAnimStatesCount = LL_ARRAY_SIZE(gUserAnimStates); - // End diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h index 56b24d5215..59d3a7d789 100644 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -49,142 +49,145 @@ //----------------------------------------------------------------------------- const S32 MAX_CONCURRENT_ANIMS = 16; - -const LLUUID ANIM_AGENT_AFRAID = LLUUID("6b61c8e8-4747-0d75-12d7-e49ff207a4ca"); -const LLUUID ANIM_AGENT_AIM_BAZOOKA_R = LLUUID("b5b4a67d-0aee-30d2-72cd-77b333e932ef"); -const LLUUID ANIM_AGENT_AIM_BOW_L = LLUUID("46bb4359-de38-4ed8-6a22-f1f52fe8f506"); -const LLUUID ANIM_AGENT_AIM_HANDGUN_R = LLUUID("3147d815-6338-b932-f011-16b56d9ac18b"); -const LLUUID ANIM_AGENT_AIM_RIFLE_R = LLUUID("ea633413-8006-180a-c3ba-96dd1d756720"); -const LLUUID ANIM_AGENT_ANGRY = LLUUID("5747a48e-073e-c331-f6f3-7c2149613d3e"); -const LLUUID ANIM_AGENT_AWAY = LLUUID("fd037134-85d4-f241-72c6-4f42164fedee"); -const LLUUID ANIM_AGENT_BACKFLIP = LLUUID("c4ca6188-9127-4f31-0158-23c4e2f93304"); -const LLUUID ANIM_AGENT_BELLY_LAUGH = LLUUID("18b3a4b5-b463-bd48-e4b6-71eaac76c515"); -const LLUUID ANIM_AGENT_BLOW_KISS = LLUUID("db84829b-462c-ee83-1e27-9bbee66bd624"); -const LLUUID ANIM_AGENT_BORED = LLUUID("b906c4ba-703b-1940-32a3-0c7f7d791510"); -const LLUUID ANIM_AGENT_BOW = LLUUID("82e99230-c906-1403-4d9c-3889dd98daba"); -const LLUUID ANIM_AGENT_BRUSH = LLUUID("349a3801-54f9-bf2c-3bd0-1ac89772af01"); -const LLUUID ANIM_AGENT_BUSY = LLUUID("efcf670c-2d18-8128-973a-034ebc806b67"); -const LLUUID ANIM_AGENT_CLAP = LLUUID("9b0c1c4e-8ac7-7969-1494-28c874c4f668"); -const LLUUID ANIM_AGENT_COURTBOW = LLUUID("9ba1c942-08be-e43a-fb29-16ad440efc50"); -const LLUUID ANIM_AGENT_CROUCH = LLUUID("201f3fdf-cb1f-dbec-201f-7333e328ae7c"); -const LLUUID ANIM_AGENT_CROUCHWALK = LLUUID("47f5f6fb-22e5-ae44-f871-73aaaf4a6022"); -const LLUUID ANIM_AGENT_CRY = LLUUID("92624d3e-1068-f1aa-a5ec-8244585193ed"); -const LLUUID ANIM_AGENT_CUSTOMIZE = LLUUID("038fcec9-5ebd-8a8e-0e2e-6e71a0a1ac53"); -const LLUUID ANIM_AGENT_CUSTOMIZE_DONE = LLUUID("6883a61a-b27b-5914-a61e-dda118a9ee2c"); -const LLUUID ANIM_AGENT_DANCE1 = LLUUID("b68a3d7c-de9e-fc87-eec8-543d787e5b0d"); -const LLUUID ANIM_AGENT_DANCE2 = LLUUID("928cae18-e31d-76fd-9cc9-2f55160ff818"); -const LLUUID ANIM_AGENT_DANCE3 = LLUUID("30047778-10ea-1af7-6881-4db7a3a5a114"); -const LLUUID ANIM_AGENT_DANCE4 = LLUUID("951469f4-c7b2-c818-9dee-ad7eea8c30b7"); -const LLUUID ANIM_AGENT_DANCE5 = LLUUID("4bd69a1d-1114-a0b4-625f-84e0a5237155"); -const LLUUID ANIM_AGENT_DANCE6 = LLUUID("cd28b69b-9c95-bb78-3f94-8d605ff1bb12"); -const LLUUID ANIM_AGENT_DANCE7 = LLUUID("a54d8ee2-28bb-80a9-7f0c-7afbbe24a5d6"); -const LLUUID ANIM_AGENT_DANCE8 = LLUUID("b0dc417c-1f11-af36-2e80-7e7489fa7cdc"); -const LLUUID ANIM_AGENT_DEAD = LLUUID("57abaae6-1d17-7b1b-5f98-6d11a6411276"); -const LLUUID ANIM_AGENT_DRINK = LLUUID("0f86e355-dd31-a61c-fdb0-3a96b9aad05f"); -const LLUUID ANIM_AGENT_EMBARRASSED = LLUUID("514af488-9051-044a-b3fc-d4dbf76377c6"); -const LLUUID ANIM_AGENT_EXPRESS_AFRAID = LLUUID("aa2df84d-cf8f-7218-527b-424a52de766e"); -const LLUUID ANIM_AGENT_EXPRESS_ANGER = LLUUID("1a03b575-9634-b62a-5767-3a679e81f4de"); -const LLUUID ANIM_AGENT_EXPRESS_BORED = LLUUID("214aa6c1-ba6a-4578-f27c-ce7688f61d0d"); -const LLUUID ANIM_AGENT_EXPRESS_CRY = LLUUID("d535471b-85bf-3b4d-a542-93bea4f59d33"); -const LLUUID ANIM_AGENT_EXPRESS_DISDAIN = LLUUID("d4416ff1-09d3-300f-4183-1b68a19b9fc1"); -const LLUUID ANIM_AGENT_EXPRESS_EMBARRASSED = LLUUID("0b8c8211-d78c-33e8-fa28-c51a9594e424"); -const LLUUID ANIM_AGENT_EXPRESS_FROWN = LLUUID("fee3df48-fa3d-1015-1e26-a205810e3001"); -const LLUUID ANIM_AGENT_EXPRESS_KISS = LLUUID("1e8d90cc-a84e-e135-884c-7c82c8b03a14"); -const LLUUID ANIM_AGENT_EXPRESS_LAUGH = LLUUID("62570842-0950-96f8-341c-809e65110823"); -const LLUUID ANIM_AGENT_EXPRESS_OPEN_MOUTH = LLUUID("d63bc1f9-fc81-9625-a0c6-007176d82eb7"); -const LLUUID ANIM_AGENT_EXPRESS_REPULSED = LLUUID("f76cda94-41d4-a229-2872-e0296e58afe1"); -const LLUUID ANIM_AGENT_EXPRESS_SAD = LLUUID("eb6ebfb2-a4b3-a19c-d388-4dd5c03823f7"); -const LLUUID ANIM_AGENT_EXPRESS_SHRUG = LLUUID("a351b1bc-cc94-aac2-7bea-a7e6ebad15ef"); -const LLUUID ANIM_AGENT_EXPRESS_SMILE = LLUUID("b7c7c833-e3d3-c4e3-9fc0-131237446312"); -const LLUUID ANIM_AGENT_EXPRESS_SURPRISE = LLUUID("728646d9-cc79-08b2-32d6-937f0a835c24"); -const LLUUID ANIM_AGENT_EXPRESS_TONGUE_OUT = LLUUID("835965c6-7f2f-bda2-5deb-2478737f91bf"); -const LLUUID ANIM_AGENT_EXPRESS_TOOTHSMILE = LLUUID("b92ec1a5-e7ce-a76b-2b05-bcdb9311417e"); -const LLUUID ANIM_AGENT_EXPRESS_WINK = LLUUID("da020525-4d94-59d6-23d7-81fdebf33148"); -const LLUUID ANIM_AGENT_EXPRESS_WORRY = LLUUID("9c05e5c7-6f07-6ca4-ed5a-b230390c3950"); -const LLUUID ANIM_AGENT_FALLDOWN = LLUUID("666307d9-a860-572d-6fd4-c3ab8865c094"); -const LLUUID ANIM_AGENT_FEMALE_WALK = LLUUID("f5fc7433-043d-e819-8298-f519a119b688"); -const LLUUID ANIM_AGENT_FINGER_WAG = LLUUID("c1bc7f36-3ba0-d844-f93c-93be945d644f"); -const LLUUID ANIM_AGENT_FIST_PUMP = LLUUID("7db00ccd-f380-f3ee-439d-61968ec69c8a"); -const LLUUID ANIM_AGENT_FLY = LLUUID("aec4610c-757f-bc4e-c092-c6e9caf18daf"); -const LLUUID ANIM_AGENT_FLYSLOW = LLUUID("2b5a38b2-5e00-3a97-a495-4c826bc443e6"); -const LLUUID ANIM_AGENT_HELLO = LLUUID("9b29cd61-c45b-5689-ded2-91756b8d76a9"); -const LLUUID ANIM_AGENT_HOLD_BAZOOKA_R = LLUUID("ef62d355-c815-4816-2474-b1acc21094a6"); -const LLUUID ANIM_AGENT_HOLD_BOW_L = LLUUID("8b102617-bcba-037b-86c1-b76219f90c88"); -const LLUUID ANIM_AGENT_HOLD_HANDGUN_R = LLUUID("efdc1727-8b8a-c800-4077-975fc27ee2f2"); -const LLUUID ANIM_AGENT_HOLD_RIFLE_R = LLUUID("3d94bad0-c55b-7dcc-8763-033c59405d33"); -const LLUUID ANIM_AGENT_HOLD_THROW_R = LLUUID("7570c7b5-1f22-56dd-56ef-a9168241bbb6"); -const LLUUID ANIM_AGENT_HOVER = LLUUID("4ae8016b-31b9-03bb-c401-b1ea941db41d"); -const LLUUID ANIM_AGENT_HOVER_DOWN = LLUUID("20f063ea-8306-2562-0b07-5c853b37b31e"); -const LLUUID ANIM_AGENT_HOVER_UP = LLUUID("62c5de58-cb33-5743-3d07-9e4cd4352864"); -const LLUUID ANIM_AGENT_IMPATIENT = LLUUID("5ea3991f-c293-392e-6860-91dfa01278a3"); -const LLUUID ANIM_AGENT_JUMP = LLUUID("2305bd75-1ca9-b03b-1faa-b176b8a8c49e"); -const LLUUID ANIM_AGENT_JUMP_FOR_JOY = LLUUID("709ea28e-1573-c023-8bf8-520c8bc637fa"); -const LLUUID ANIM_AGENT_KISS_MY_BUTT = LLUUID("19999406-3a3a-d58c-a2ac-d72e555dcf51"); -const LLUUID ANIM_AGENT_LAND = LLUUID("7a17b059-12b2-41b1-570a-186368b6aa6f"); -const LLUUID ANIM_AGENT_LAUGH_SHORT = LLUUID("ca5b3f14-3194-7a2b-c894-aa699b718d1f"); -const LLUUID ANIM_AGENT_MEDIUM_LAND = LLUUID("f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"); -const LLUUID ANIM_AGENT_MOTORCYCLE_SIT = LLUUID("08464f78-3a8e-2944-cba5-0c94aff3af29"); -const LLUUID ANIM_AGENT_MUSCLE_BEACH = LLUUID("315c3a41-a5f3-0ba4-27da-f893f769e69b"); -const LLUUID ANIM_AGENT_NO = LLUUID("5a977ed9-7f72-44e9-4c4c-6e913df8ae74"); -const LLUUID ANIM_AGENT_NO_UNHAPPY = LLUUID("d83fa0e5-97ed-7eb2-e798-7bd006215cb4"); -const LLUUID ANIM_AGENT_NYAH_NYAH = LLUUID("f061723d-0a18-754f-66ee-29a44795a32f"); -const LLUUID ANIM_AGENT_ONETWO_PUNCH = LLUUID("eefc79be-daae-a239-8c04-890f5d23654a"); -const LLUUID ANIM_AGENT_PEACE = LLUUID("b312b10e-65ab-a0a4-8b3c-1326ea8e3ed9"); -const LLUUID ANIM_AGENT_POINT_ME = LLUUID("17c024cc-eef2-f6a0-3527-9869876d7752"); -const LLUUID ANIM_AGENT_POINT_YOU = LLUUID("ec952cca-61ef-aa3b-2789-4d1344f016de"); -const LLUUID ANIM_AGENT_PRE_JUMP = LLUUID("7a4e87fe-de39-6fcb-6223-024b00893244"); -const LLUUID ANIM_AGENT_PUNCH_LEFT = LLUUID("f3300ad9-3462-1d07-2044-0fef80062da0"); -const LLUUID ANIM_AGENT_PUNCH_RIGHT = LLUUID("c8e42d32-7310-6906-c903-cab5d4a34656"); -const LLUUID ANIM_AGENT_REPULSED = LLUUID("36f81a92-f076-5893-dc4b-7c3795e487cf"); -const LLUUID ANIM_AGENT_ROUNDHOUSE_KICK = LLUUID("49aea43b-5ac3-8a44-b595-96100af0beda"); -const LLUUID ANIM_AGENT_RPS_COUNTDOWN = LLUUID("35db4f7e-28c2-6679-cea9-3ee108f7fc7f"); -const LLUUID ANIM_AGENT_RPS_PAPER = LLUUID("0836b67f-7f7b-f37b-c00a-460dc1521f5a"); -const LLUUID ANIM_AGENT_RPS_ROCK = LLUUID("42dd95d5-0bc6-6392-f650-777304946c0f"); -const LLUUID ANIM_AGENT_RPS_SCISSORS = LLUUID("16803a9f-5140-e042-4d7b-d28ba247c325"); -const LLUUID ANIM_AGENT_RUN = LLUUID("05ddbff8-aaa9-92a1-2b74-8fe77a29b445"); -const LLUUID ANIM_AGENT_SAD = LLUUID("0eb702e2-cc5a-9a88-56a5-661a55c0676a"); -const LLUUID ANIM_AGENT_SALUTE = LLUUID("cd7668a6-7011-d7e2-ead8-fc69eff1a104"); -const LLUUID ANIM_AGENT_SHOOT_BOW_L = LLUUID("e04d450d-fdb5-0432-fd68-818aaf5935f8"); -const LLUUID ANIM_AGENT_SHOUT = LLUUID("6bd01860-4ebd-127a-bb3d-d1427e8e0c42"); -const LLUUID ANIM_AGENT_SHRUG = LLUUID("70ea714f-3a97-d742-1b01-590a8fcd1db5"); -const LLUUID ANIM_AGENT_SIT = LLUUID("1a5fe8ac-a804-8a5d-7cbd-56bd83184568"); -const LLUUID ANIM_AGENT_SIT_FEMALE = LLUUID("b1709c8d-ecd3-54a1-4f28-d55ac0840782"); -const LLUUID ANIM_AGENT_SIT_GENERIC = LLUUID("245f3c54-f1c0-bf2e-811f-46d8eeb386e7"); -const LLUUID ANIM_AGENT_SIT_GROUND = LLUUID("1c7600d6-661f-b87b-efe2-d7421eb93c86"); -const LLUUID ANIM_AGENT_SIT_GROUND_CONSTRAINED = LLUUID("1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"); -const LLUUID ANIM_AGENT_SIT_TO_STAND = LLUUID("a8dee56f-2eae-9e7a-05a2-6fb92b97e21e"); -const LLUUID ANIM_AGENT_SLEEP = LLUUID("f2bed5f9-9d44-39af-b0cd-257b2a17fe40"); -const LLUUID ANIM_AGENT_SMOKE_IDLE = LLUUID("d2f2ee58-8ad1-06c9-d8d3-3827ba31567a"); -const LLUUID ANIM_AGENT_SMOKE_INHALE = LLUUID("6802d553-49da-0778-9f85-1599a2266526"); -const LLUUID ANIM_AGENT_SMOKE_THROW_DOWN = LLUUID("0a9fb970-8b44-9114-d3a9-bf69cfe804d6"); -const LLUUID ANIM_AGENT_SNAPSHOT = LLUUID("eae8905b-271a-99e2-4c0e-31106afd100c"); -const LLUUID ANIM_AGENT_STAND = LLUUID("2408fe9e-df1d-1d7d-f4ff-1384fa7b350f"); -const LLUUID ANIM_AGENT_STANDUP = LLUUID("3da1d753-028a-5446-24f3-9c9b856d9422"); -const LLUUID ANIM_AGENT_STAND_1 = LLUUID("15468e00-3400-bb66-cecc-646d7c14458e"); -const LLUUID ANIM_AGENT_STAND_2 = LLUUID("370f3a20-6ca6-9971-848c-9a01bc42ae3c"); -const LLUUID ANIM_AGENT_STAND_3 = LLUUID("42b46214-4b44-79ae-deb8-0df61424ff4b"); -const LLUUID ANIM_AGENT_STAND_4 = LLUUID("f22fed8b-a5ed-2c93-64d5-bdd8b93c889f"); -const LLUUID ANIM_AGENT_STRETCH = LLUUID("80700431-74ec-a008-14f8-77575e73693f"); -const LLUUID ANIM_AGENT_STRIDE = LLUUID("1cb562b0-ba21-2202-efb3-30f82cdf9595"); -const LLUUID ANIM_AGENT_SURF = LLUUID("41426836-7437-7e89-025d-0aa4d10f1d69"); -const LLUUID ANIM_AGENT_SURPRISE = LLUUID("313b9881-4302-73c0-c7d0-0e7a36b6c224"); -const LLUUID ANIM_AGENT_SWORD_STRIKE = LLUUID("85428680-6bf9-3e64-b489-6f81087c24bd"); -const LLUUID ANIM_AGENT_TALK = LLUUID("5c682a95-6da4-a463-0bf6-0f5b7be129d1"); -const LLUUID ANIM_AGENT_TANTRUM = LLUUID("11000694-3f41-adc2-606b-eee1d66f3724"); -const LLUUID ANIM_AGENT_THROW_R = LLUUID("aa134404-7dac-7aca-2cba-435f9db875ca"); -const LLUUID ANIM_AGENT_TRYON_SHIRT = LLUUID("83ff59fe-2346-f236-9009-4e3608af64c1"); -const LLUUID ANIM_AGENT_TURNLEFT = LLUUID("56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"); -const LLUUID ANIM_AGENT_TURNRIGHT = LLUUID("2d6daa51-3192-6794-8e2e-a15f8338ec30"); -const LLUUID ANIM_AGENT_TYPE = LLUUID("c541c47f-e0c0-058b-ad1a-d6ae3a4584d9"); -const LLUUID ANIM_AGENT_WALK = LLUUID("6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"); -const LLUUID ANIM_AGENT_WHISPER = LLUUID("7693f268-06c7-ea71-fa21-2b30d6533f8f"); -const LLUUID ANIM_AGENT_WHISTLE = LLUUID("b1ed7982-c68e-a982-7561-52a88a5298c0"); -const LLUUID ANIM_AGENT_WINK = LLUUID("869ecdad-a44b-671e-3266-56aef2e3ac2e"); -const LLUUID ANIM_AGENT_WINK_HOLLYWOOD = LLUUID("c0c4030f-c02b-49de-24ba-2331f43fe41c"); -const LLUUID ANIM_AGENT_WORRY = LLUUID("9f496bd2-589a-709f-16cc-69bf7df1d36c"); -const LLUUID ANIM_AGENT_YES = LLUUID("15dd911d-be82-2856-26db-27659b142875"); -const LLUUID ANIM_AGENT_YES_HAPPY = LLUUID("b8c8b2a3-9008-1771-3bfc-90924955ab2d"); -const LLUUID ANIM_AGENT_YOGA_FLOAT = LLUUID("42ecd00b-9947-a97c-400a-bbc9174c7aeb"); +extern const LLUUID ANIM_AGENT_AFRAID; +extern const LLUUID ANIM_AGENT_AIM_BAZOOKA_R; +extern const LLUUID ANIM_AGENT_AIM_BOW_L; +extern const LLUUID ANIM_AGENT_AIM_HANDGUN_R; +extern const LLUUID ANIM_AGENT_AIM_RIFLE_R; +extern const LLUUID ANIM_AGENT_ANGRY; +extern const LLUUID ANIM_AGENT_AWAY; +extern const LLUUID ANIM_AGENT_BACKFLIP; +extern const LLUUID ANIM_AGENT_BELLY_LAUGH; +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_CLAP; +extern const LLUUID ANIM_AGENT_COURTBOW; +extern const LLUUID ANIM_AGENT_CROUCH; +extern const LLUUID ANIM_AGENT_CROUCHWALK; +extern const LLUUID ANIM_AGENT_CRY; +extern const LLUUID ANIM_AGENT_CUSTOMIZE; +extern const LLUUID ANIM_AGENT_CUSTOMIZE_DONE; +extern const LLUUID ANIM_AGENT_DANCE1; +extern const LLUUID ANIM_AGENT_DANCE2; +extern const LLUUID ANIM_AGENT_DANCE3; +extern const LLUUID ANIM_AGENT_DANCE4; +extern const LLUUID ANIM_AGENT_DANCE5; +extern const LLUUID ANIM_AGENT_DANCE6; +extern const LLUUID ANIM_AGENT_DANCE7; +extern const LLUUID ANIM_AGENT_DANCE8; +extern const LLUUID ANIM_AGENT_DEAD; +extern const LLUUID ANIM_AGENT_DRINK; +extern const LLUUID ANIM_AGENT_EMBARRASSED; +extern const LLUUID ANIM_AGENT_EXPRESS_AFRAID; +extern const LLUUID ANIM_AGENT_EXPRESS_ANGER; +extern const LLUUID ANIM_AGENT_EXPRESS_BORED; +extern const LLUUID ANIM_AGENT_EXPRESS_CRY; +extern const LLUUID ANIM_AGENT_EXPRESS_DISDAIN; +extern const LLUUID ANIM_AGENT_EXPRESS_EMBARRASSED; +extern const LLUUID ANIM_AGENT_EXPRESS_FROWN; +extern const LLUUID ANIM_AGENT_EXPRESS_KISS; +extern const LLUUID ANIM_AGENT_EXPRESS_LAUGH; +extern const LLUUID ANIM_AGENT_EXPRESS_OPEN_MOUTH; +extern const LLUUID ANIM_AGENT_EXPRESS_REPULSED; +extern const LLUUID ANIM_AGENT_EXPRESS_SAD; +extern const LLUUID ANIM_AGENT_EXPRESS_SHRUG; +extern const LLUUID ANIM_AGENT_EXPRESS_SMILE; +extern const LLUUID ANIM_AGENT_EXPRESS_SURPRISE; +extern const LLUUID ANIM_AGENT_EXPRESS_TONGUE_OUT; +extern const LLUUID ANIM_AGENT_EXPRESS_TOOTHSMILE; +extern const LLUUID ANIM_AGENT_EXPRESS_WINK; +extern const LLUUID ANIM_AGENT_EXPRESS_WORRY; +extern const LLUUID ANIM_AGENT_FALLDOWN; +extern const LLUUID ANIM_AGENT_FEMALE_RUN_NEW; +extern const LLUUID ANIM_AGENT_FEMALE_WALK; +extern const LLUUID ANIM_AGENT_FEMALE_WALK_NEW; +extern const LLUUID ANIM_AGENT_FINGER_WAG; +extern const LLUUID ANIM_AGENT_FIST_PUMP; +extern const LLUUID ANIM_AGENT_FLY; +extern const LLUUID ANIM_AGENT_FLYSLOW; +extern const LLUUID ANIM_AGENT_HELLO; +extern const LLUUID ANIM_AGENT_HOLD_BAZOOKA_R; +extern const LLUUID ANIM_AGENT_HOLD_BOW_L; +extern const LLUUID ANIM_AGENT_HOLD_HANDGUN_R; +extern const LLUUID ANIM_AGENT_HOLD_RIFLE_R; +extern const LLUUID ANIM_AGENT_HOLD_THROW_R; +extern const LLUUID ANIM_AGENT_HOVER; +extern const LLUUID ANIM_AGENT_HOVER_DOWN; +extern const LLUUID ANIM_AGENT_HOVER_UP; +extern const LLUUID ANIM_AGENT_IMPATIENT; +extern const LLUUID ANIM_AGENT_JUMP; +extern const LLUUID ANIM_AGENT_JUMP_FOR_JOY; +extern const LLUUID ANIM_AGENT_KISS_MY_BUTT; +extern const LLUUID ANIM_AGENT_LAND; +extern const LLUUID ANIM_AGENT_LAUGH_SHORT; +extern const LLUUID ANIM_AGENT_MEDIUM_LAND; +extern const LLUUID ANIM_AGENT_MOTORCYCLE_SIT; +extern const LLUUID ANIM_AGENT_MUSCLE_BEACH; +extern const LLUUID ANIM_AGENT_NO; +extern const LLUUID ANIM_AGENT_NO_UNHAPPY; +extern const LLUUID ANIM_AGENT_NYAH_NYAH; +extern const LLUUID ANIM_AGENT_ONETWO_PUNCH; +extern const LLUUID ANIM_AGENT_PEACE; +extern const LLUUID ANIM_AGENT_POINT_ME; +extern const LLUUID ANIM_AGENT_POINT_YOU; +extern const LLUUID ANIM_AGENT_PRE_JUMP; +extern const LLUUID ANIM_AGENT_PUNCH_LEFT; +extern const LLUUID ANIM_AGENT_PUNCH_RIGHT; +extern const LLUUID ANIM_AGENT_REPULSED; +extern const LLUUID ANIM_AGENT_ROUNDHOUSE_KICK; +extern const LLUUID ANIM_AGENT_RPS_COUNTDOWN; +extern const LLUUID ANIM_AGENT_RPS_PAPER; +extern const LLUUID ANIM_AGENT_RPS_ROCK; +extern const LLUUID ANIM_AGENT_RPS_SCISSORS; +extern const LLUUID ANIM_AGENT_RUN; +extern const LLUUID ANIM_AGENT_RUN_NEW; +extern const LLUUID ANIM_AGENT_SAD; +extern const LLUUID ANIM_AGENT_SALUTE; +extern const LLUUID ANIM_AGENT_SHOOT_BOW_L; +extern const LLUUID ANIM_AGENT_SHOUT; +extern const LLUUID ANIM_AGENT_SHRUG; +extern const LLUUID ANIM_AGENT_SIT; +extern const LLUUID ANIM_AGENT_SIT_FEMALE; +extern const LLUUID ANIM_AGENT_SIT_GENERIC; +extern const LLUUID ANIM_AGENT_SIT_GROUND; +extern const LLUUID ANIM_AGENT_SIT_GROUND_CONSTRAINED; +extern const LLUUID ANIM_AGENT_SIT_TO_STAND; +extern const LLUUID ANIM_AGENT_SLEEP; +extern const LLUUID ANIM_AGENT_SMOKE_IDLE; +extern const LLUUID ANIM_AGENT_SMOKE_INHALE; +extern const LLUUID ANIM_AGENT_SMOKE_THROW_DOWN; +extern const LLUUID ANIM_AGENT_SNAPSHOT; +extern const LLUUID ANIM_AGENT_STAND; +extern const LLUUID ANIM_AGENT_STANDUP; +extern const LLUUID ANIM_AGENT_STAND_1; +extern const LLUUID ANIM_AGENT_STAND_2; +extern const LLUUID ANIM_AGENT_STAND_3; +extern const LLUUID ANIM_AGENT_STAND_4; +extern const LLUUID ANIM_AGENT_STRETCH; +extern const LLUUID ANIM_AGENT_STRIDE; +extern const LLUUID ANIM_AGENT_SURF; +extern const LLUUID ANIM_AGENT_SURPRISE; +extern const LLUUID ANIM_AGENT_SWORD_STRIKE; +extern const LLUUID ANIM_AGENT_TALK; +extern const LLUUID ANIM_AGENT_TANTRUM; +extern const LLUUID ANIM_AGENT_THROW_R; +extern const LLUUID ANIM_AGENT_TRYON_SHIRT; +extern const LLUUID ANIM_AGENT_TURNLEFT; +extern const LLUUID ANIM_AGENT_TURNRIGHT; +extern const LLUUID ANIM_AGENT_TYPE; +extern const LLUUID ANIM_AGENT_WALK; +extern const LLUUID ANIM_AGENT_WALK_NEW; +extern const LLUUID ANIM_AGENT_WHISPER; +extern const LLUUID ANIM_AGENT_WHISTLE; +extern const LLUUID ANIM_AGENT_WINK; +extern const LLUUID ANIM_AGENT_WINK_HOLLYWOOD; +extern const LLUUID ANIM_AGENT_WORRY; +extern const LLUUID ANIM_AGENT_YES; +extern const LLUUID ANIM_AGENT_YES_HAPPY; +extern const LLUUID ANIM_AGENT_YOGA_FLOAT; extern LLUUID AGENT_WALK_ANIMS[]; extern S32 NUM_AGENT_WALK_ANIMS; @@ -224,6 +227,16 @@ public: // Retun NULL if the name is invalid. //----------------------------------------------------------------------------- LLUUID stringToAnimState( const std::string& name, BOOL allow_ids = TRUE ); + + //----------------------------------------------------------------------------- + // Associate an anim state with a name + //----------------------------------------------------------------------------- + void animStateSetString( const LLUUID& state, const std::string& name); + + //----------------------------------------------------------------------------- + // Find the name for a given animation, or UUID string if none defined. + //----------------------------------------------------------------------------- + std::string animationName( const LLUUID& id ) const; }; struct LLAnimStateEntry @@ -249,7 +262,6 @@ extern const LLAnimStateEntry gUserAnimStates[]; extern const S32 gUserAnimStatesCount; extern LLAnimationLibrary gAnimLibrary; - #endif // LL_LLANIMATIONSTATES_H diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index 461309bee9..f814618fc1 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -48,8 +48,10 @@ const F32 MAX_WALK_PLAYBACK_SPEED = 8.f; // max m/s for which we adjust walk cyc const F32 MIN_WALK_SPEED = 0.1f; // minimum speed at which we use velocity for down foot detection const F32 MAX_TIME_DELTA = 2.f; //max two seconds a frame for calculating interpolation -const F32 SPEED_ADJUST_MAX = 2.5f; // maximum adjustment of walk animation playback speed -const F32 SPEED_ADJUST_MAX_SEC = 3.f; // maximum adjustment to walk animation playback speed for a second +F32 SPEED_ADJUST_MAX = 2.5f; // maximum adjustment of walk animation playback speed +F32 SPEED_ADJUST_MAX_SEC = 3.f; // maximum adjustment to walk animation playback speed for a second +F32 ANIM_SPEED_MAX = 10.0f; // absolute upper limit on animation speed +F32 ANIM_SPEED_MIN = 0.0f; // absolute lower limit on animation speed const F32 DRIFT_COMP_MAX_TOTAL = 0.07f;//0.55f; // maximum drift compensation overall, in any direction const F32 DRIFT_COMP_MAX_SPEED = 4.f; // speed at which drift compensation total maxes out const F32 MAX_ROLL = 0.6f; @@ -300,6 +302,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) // and if we're moving backward, we walk backward F32 directional_factor = localVel.mV[VX] * mRelativeDir; + if (speed > 0.1f) { // calculate ratio of desired foot velocity to detected foot velocity @@ -318,16 +321,36 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) } mAnimSpeed = (mAvgSpeed + mSpeedAdjust) * mRelativeDir; -// char debug_text[64]; -// sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); -// mCharacter->addDebugText(debug_text); -// sprintf(debug_text, "Speed: %.2f", mAvgSpeed); -// mCharacter->addDebugText(debug_text); -// sprintf(debug_text, "Speed Adjust: %.2f", mSpeedAdjust); -// mCharacter->addDebugText(debug_text); -// sprintf(debug_text, "Animation Playback Speed: %.2f", mAnimSpeed); -// mCharacter->addDebugText(debug_text); - mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); + if (mAnimSpeed>0) + { + mAnimSpeed = llclamp(mAnimSpeed, ANIM_SPEED_MIN, ANIM_SPEED_MAX); + } + else + { + mAnimSpeed = llclamp(mAnimSpeed, -ANIM_SPEED_MAX, -ANIM_SPEED_MIN); + } +// char debug_text[64]; +// sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); +// mCharacter->addDebugText(debug_text); +// sprintf(debug_text, "Speed: %.2f", mAvgSpeed); +// mCharacter->addDebugText(debug_text); +// sprintf(debug_text, "Speed Adjust: %.2f", mSpeedAdjust); +// mCharacter->addDebugText(debug_text); +// sprintf(debug_text, "Animation Playback Speed: %.2f", mAnimSpeed); +// mCharacter->addDebugText(debug_text); + mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); + if (mCharacter->getMotionController().mIsSelf) + { +// F32 elapsed = mCharacter->getMotionController().getFrameTimer().getElapsedTimeF32(); +// llinfos << "PLOT elapsed: " << elapsed +// << " footSlipVelocity: " << footSlipVelocity +// << " mAvgCorrection: " << mAvgCorrection +// << " mAvgSpeed: " << mAvgSpeed +// << " mAnimSpeed: " << mAnimSpeed +// << " ANIM_SPEED_MAX: " << ANIM_SPEED_MAX +// << " ANIM_SPEED_MIN: " << ANIM_SPEED_MIN +// << llendl; + } // clamp pelvis offset to a 90 degree arc behind the nominal position F32 drift_comp_max = llclamp(speed, 0.f, DRIFT_COMP_MAX_SPEED) / DRIFT_COMP_MAX_SPEED; diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index bb9625b2bd..78d9398c1d 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -143,7 +143,8 @@ LLMotionController::LLMotionController() mPauseTime(0.f), mTimeStep(0.f), mTimeStepCount(0), - mLastInterp(0.f) + mLastInterp(0.f), + mIsSelf(FALSE) { } @@ -446,6 +447,7 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat return FALSE; } + // If on active list, stop it if (isMotionActive(motion) && !motion->isStopped()) { @@ -1033,6 +1035,31 @@ LLMotion* LLMotionController::findMotion(const LLUUID& id) const } //----------------------------------------------------------------------------- +// dumpMotions() +//----------------------------------------------------------------------------- +void LLMotionController::dumpMotions() +{ + llinfos << "=====================================" << llendl; + for (motion_map_t::iterator iter = mAllMotions.begin(); + iter != mAllMotions.end(); iter++) + { + LLUUID id = iter->first; + std::string state_string; + LLMotion *motion = iter->second; + if (mLoadingMotions.find(motion) != mLoadingMotions.end()) + state_string += std::string("l"); + if (mLoadedMotions.find(motion) != mLoadedMotions.end()) + state_string += std::string("L"); + if (std::find(mActiveMotions.begin(), mActiveMotions.end(), motion)!=mActiveMotions.end()) + state_string += std::string("A"); + if (mDeprecatedMotions.find(motion) != mDeprecatedMotions.end()) + state_string += std::string("D"); + llinfos << gAnimLibrary.animationName(id) << " " << state_string << llendl; + + } +} + +//----------------------------------------------------------------------------- // deactivateAllMotions() //----------------------------------------------------------------------------- void LLMotionController::deactivateAllMotions() diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index 5c3ec223cb..f8bf5ac289 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -92,6 +92,7 @@ class LLMotionController public: typedef std::list<LLMotion*> motion_list_t; typedef std::set<LLMotion*> motion_set_t; + BOOL mIsSelf; public: // Constructor @@ -169,6 +170,10 @@ public: bool isMotionLoading( LLMotion *motion ); LLMotion *findMotion( const LLUUID& id ) const; + void dumpMotions(); + + const LLFrameTimer& getFrameTimer() { return mTimer; } + protected: // internal operations act on motion instances directly // as there can be duplicate motions per id during blending overlap diff --git a/indra/llcommon/llchat.h b/indra/llcommon/llchat.h index f1b9091298..63cce24005 100644 --- a/indra/llcommon/llchat.h +++ b/indra/llcommon/llchat.h @@ -82,6 +82,7 @@ public: mFromName(), mFromID(), mNotifId(), + mOwnerID(), mSourceType(CHAT_SOURCE_AGENT), mChatType(CHAT_TYPE_NORMAL), mAudible(CHAT_AUDIBLE_FULLY), @@ -98,6 +99,7 @@ public: std::string mFromName; // agent or object name LLUUID mFromID; // agent id or object id LLUUID mNotifId; + LLUUID mOwnerID; EChatSourceType mSourceType; EChatType mChatType; EChatAudible mAudible; diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index b5a73ec1d1..f14d947734 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -676,6 +676,17 @@ long LLStringOps::sLocalTimeOffset = 0; bool LLStringOps::sPacificDaylightTime = 0; std::map<std::string, std::string> LLStringOps::datetimeToCodes; +std::vector<std::string> LLStringOps::sWeekDayList; +std::vector<std::string> LLStringOps::sWeekDayShortList; +std::vector<std::string> LLStringOps::sMonthList; +std::vector<std::string> LLStringOps::sMonthShortList; + + +std::string LLStringOps::sDayFormat; +std::string LLStringOps::sAM; +std::string LLStringOps::sPM; + + S32 LLStringOps::collate(const llwchar* a, const llwchar* b) { #if LL_WINDOWS @@ -724,6 +735,50 @@ void LLStringOps::setupDatetimeInfo (bool daylight) datetimeToCodes["timezone"] = "%Z"; // PST } +void tokenizeStringToArray(const std::string& data, std::vector<std::string>& output) +{ + output.clear(); + size_t length = data.size(); + + // tokenize it and put it in the array + std::string cur_word; + for(size_t i = 0; i < length; ++i) + { + if(data[i] == ':') + { + output.push_back(cur_word); + cur_word.clear(); + } + else + { + cur_word.append(1, data[i]); + } + } + output.push_back(cur_word); +} + +void LLStringOps::setupWeekDaysNames(const std::string& data) +{ + tokenizeStringToArray(data,sWeekDayList); +} +void LLStringOps::setupWeekDaysShortNames(const std::string& data) +{ + tokenizeStringToArray(data,sWeekDayShortList); +} +void LLStringOps::setupMonthNames(const std::string& data) +{ + tokenizeStringToArray(data,sMonthList); +} +void LLStringOps::setupMonthShortNames(const std::string& data) +{ + tokenizeStringToArray(data,sMonthShortList); +} +void LLStringOps::setupDayFormat(const std::string& data) +{ + sDayFormat = data; +} + + std::string LLStringOps::getDatetimeCode (std::string key) { std::map<std::string, std::string>::iterator iter; @@ -819,6 +874,10 @@ namespace LLStringFn //////////////////////////////////////////////////////////// +// Forward specialization of LLStringUtil::format before use in LLStringUtil::formatDatetime. +template<> +S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions); + //static template<> void LLStringUtil::getTokens(const std::string& instr, std::vector<std::string >& tokens, const std::string& delims) @@ -998,7 +1057,53 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token, } return true; } - replacement = datetime.toHTTPDateString(code); + + //EXT-7013 + //few codes are not suppotred by strtime function (example - weekdays for Japanise) + //so use predefined ones + + //if sWeekDayList is not empty than current locale doesn't support + //weekday name. + time_t loc_seconds = (time_t) secFromEpoch; + if(LLStringOps::sWeekDayList.size() == 7 && code == "%A") + { + struct tm * gmt = gmtime (&loc_seconds); + replacement = LLStringOps::sWeekDayList[gmt->tm_wday]; + } + else if(LLStringOps::sWeekDayShortList.size() == 7 && code == "%a") + { + struct tm * gmt = gmtime (&loc_seconds); + replacement = LLStringOps::sWeekDayShortList[gmt->tm_wday]; + } + else if(LLStringOps::sMonthList.size() == 12 && code == "%B") + { + struct tm * gmt = gmtime (&loc_seconds); + replacement = LLStringOps::sWeekDayList[gmt->tm_mon]; + } + else if( !LLStringOps::sDayFormat.empty() && code == "%d" ) + { + struct tm * gmt = gmtime (&loc_seconds); + LLStringUtil::format_map_t args; + args["[MDAY]"] = llformat ("%d", gmt->tm_mday); + replacement = LLStringOps::sDayFormat; + LLStringUtil::format(replacement, args); + } + else if( !LLStringOps::sAM.empty() && !LLStringOps::sPM.empty() && code == "%p" ) + { + struct tm * gmt = gmtime (&loc_seconds); + if(gmt->tm_hour<12) + { + replacement = LLStringOps::sAM; + } + else + { + replacement = LLStringOps::sPM; + } + } + else + { + replacement = datetime.toHTTPDateString(code); + } // *HACK: delete leading zero from hour string in case 'hour12' (code = %I) time format // to show time without leading zero, e.g. 08:16 -> 8:16 (EXT-2738). diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 96588b29b9..ad8f8632a2 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -154,9 +154,19 @@ private: static long sPacificTimeOffset; static long sLocalTimeOffset; static bool sPacificDaylightTime; + static std::map<std::string, std::string> datetimeToCodes; public: + static std::vector<std::string> sWeekDayList; + static std::vector<std::string> sWeekDayShortList; + static std::vector<std::string> sMonthList; + static std::vector<std::string> sMonthShortList; + static std::string sDayFormat; + + static std::string sAM; + static std::string sPM; + static char toUpper(char elem) { return toupper((unsigned char)elem); } static llwchar toUpper(llwchar elem) { return towupper(elem); } @@ -185,6 +195,14 @@ public: static S32 collate(const llwchar* a, const llwchar* b); static void setupDatetimeInfo(bool pacific_daylight_time); + + static void setupWeekDaysNames(const std::string& data); + static void setupWeekDaysShortNames(const std::string& data); + static void setupMonthNames(const std::string& data); + static void setupMonthShortNames(const std::string& data); + static void setupDayFormat(const std::string& data); + + static long getPacificTimeOffset(void) { return sPacificTimeOffset;} static long getLocalTimeOffset(void) { return sLocalTimeOffset;} // Is the Pacific time zone (aka server time zone) diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index 9d4f3a98f0..0e8f3f0f73 100644 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -231,7 +231,8 @@ static BOOL isDefault(const std::string& scheme, U16 port) void LLURI::parseAuthorityAndPathUsingOpaque() { if (mScheme == "http" || mScheme == "https" || - mScheme == "ftp" || mScheme == "secondlife" ) + mScheme == "ftp" || mScheme == "secondlife" || + mScheme == "x-grid-location-info") { if (mEscapedOpaque.substr(0,2) != "//") { diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp index bcbae06ec5..583c1e589b 100644 --- a/indra/llcommon/lluuid.cpp +++ b/indra/llcommon/lluuid.cpp @@ -33,9 +33,12 @@ // We can't use WIN32_LEAN_AND_MEAN here, needs lots of includes. #if LL_WINDOWS -# undef WIN32_LEAN_AND_MEAN -# include <winsock2.h> -# include <windows.h> +#undef WIN32_LEAN_AND_MEAN +#include <winsock2.h> +#include <windows.h> +// ugh, this is ugly. We need to straighten out our linking for this library +#pragma comment(lib, "IPHLPAPI.lib") +#include <iphlpapi.h> #endif #include "lldefs.h" @@ -452,67 +455,102 @@ static void get_random_bytes(void *buf, int nbytes) return; } -#if LL_WINDOWS -typedef struct _ASTAT_ -{ - ADAPTER_STATUS adapt; - NAME_BUFFER NameBuff [30]; -}ASTAT, * PASTAT; +#if LL_WINDOWS +// Code copied from http://msdn.microsoft.com/en-us/library/aa365939(VS.85).aspx +// This code grabs the first hardware address, rather than the first interface. +// Using a VPN can cause the first returned interface to be changed. + +const S32 MAC_ADDRESS_BYTES=6; + // static -S32 LLUUID::getNodeID(unsigned char * node_id) -{ - ASTAT Adapter; - NCB Ncb; - UCHAR uRetCode; - LANA_ENUM lenum; - int i; - int retval = 0; - - memset( &Ncb, 0, sizeof(Ncb) ); - Ncb.ncb_command = NCBENUM; - Ncb.ncb_buffer = (UCHAR *)&lenum; - Ncb.ncb_length = sizeof(lenum); - uRetCode = Netbios( &Ncb ); - // printf( "The NCBENUM return code is: 0x%x \n", uRetCode ); - - for(i=0; i < lenum.length ;i++) - { - memset( &Ncb, 0, sizeof(Ncb) ); - Ncb.ncb_command = NCBRESET; - Ncb.ncb_lana_num = lenum.lana[i]; - - uRetCode = Netbios( &Ncb ); - // printf( "The NCBRESET on LANA %d return code is: 0x%x \n", - // lenum.lana[i], uRetCode ); - - memset( &Ncb, 0, sizeof (Ncb) ); - Ncb.ncb_command = NCBASTAT; - Ncb.ncb_lana_num = lenum.lana[i]; - - strcpy( (char *)Ncb.ncb_callname, "* " ); /* Flawfinder: ignore */ - Ncb.ncb_buffer = (unsigned char *)&Adapter; - Ncb.ncb_length = sizeof(Adapter); - - uRetCode = Netbios( &Ncb ); -// printf( "The NCBASTAT on LANA %d return code is: 0x%x \n", -// lenum.lana[i], uRetCode ); - if ( uRetCode == 0 ) - { -// printf( "The Ethernet Number on LANA %d is: %02x%02x%02x%02x%02x%02x\n", -// lenum.lana[i], -// Adapter.adapt.adapter_address[0], -// Adapter.adapt.adapter_address[1], -// Adapter.adapt.adapter_address[2], -// Adapter.adapt.adapter_address[3], -// Adapter.adapt.adapter_address[4], -// Adapter.adapt.adapter_address[5] ); - memcpy(node_id,Adapter.adapt.adapter_address,6); /* Flawfinder: ignore */ - retval = 1; - - } - } - return retval; +S32 LLUUID::getNodeID(unsigned char *node_id) +{ + + // Declare and initialize variables. + DWORD dwSize = 0; + DWORD dwRetVal = 0; + int i; + +/* variables used for GetIfTable and GetIfEntry */ + MIB_IFTABLE *pIfTable; + MIB_IFROW *pIfRow; + + // Allocate memory for our pointers. + pIfTable = (MIB_IFTABLE *) malloc(sizeof (MIB_IFTABLE)); + if (pIfTable == NULL) + { + printf("Error allocating memory needed to call GetIfTable\n"); + return 0; + } + + // Before calling GetIfEntry, we call GetIfTable to make + // sure there are entries to get and retrieve the interface index. + + // Make an initial call to GetIfTable to get the + // necessary size into dwSize + if (GetIfTable(pIfTable, &dwSize, 0) == ERROR_INSUFFICIENT_BUFFER) { + free(pIfTable); + pIfTable = (MIB_IFTABLE *) malloc(dwSize); + if (pIfTable == NULL) + { + printf("Error allocating memory\n"); + return 0; + } + } + // Make a second call to GetIfTable to get the actual + // data we want. + if ((dwRetVal = GetIfTable(pIfTable, &dwSize, 0)) == NO_ERROR) + { + if (pIfTable->dwNumEntries > 0) + { + pIfRow = (MIB_IFROW *) malloc(sizeof (MIB_IFROW)); + if (pIfRow == NULL) + { + printf("Error allocating memory\n"); + if (pIfTable != NULL) + { + free(pIfTable); + pIfTable = NULL; + } + return 0; + } + + int limit = MAC_ADDRESS_BYTES; + memcpy(node_id, "\0\0\0\0\0\0", limit); // zero out array of bytes + for (i = 0; i < (int) pIfTable->dwNumEntries; i++) + { + pIfRow->dwIndex = pIfTable->table[i].dwIndex; + if ((dwRetVal = GetIfEntry(pIfRow)) == NO_ERROR) + { + switch (pIfRow->dwType) + { + case IF_TYPE_ETHERNET_CSMACD: + case IF_TYPE_IEEE80211: + limit = min((int) pIfRow->dwPhysAddrLen, limit); + if (pIfRow->dwPhysAddrLen == 0) + break; + memcpy(node_id, (UCHAR *)&pIfRow->bPhysAddr[0], limit); // just incase the PhysAddr is not the expected MAC_Address size + free(pIfTable); + return 1; //return first hardware device found. + break; + + case IF_TYPE_OTHER: + case IF_TYPE_PPP: + case IF_TYPE_SOFTWARE_LOOPBACK: + case IF_TYPE_ISO88025_TOKENRING: + case IF_TYPE_IEEE1394: + case IF_TYPE_ATM: + case IF_TYPE_TUNNEL: + default: + break; + } + } + } + } + } + free(pIfTable); + return 0; } #elif LL_DARWIN diff --git a/indra/llcommon/llworkerthread.cpp b/indra/llcommon/llworkerthread.cpp index 2629237f7e..a29e9a348e 100644 --- a/indra/llcommon/llworkerthread.cpp +++ b/indra/llcommon/llworkerthread.cpp @@ -404,7 +404,7 @@ void LLWorkerClass::scheduleDelete() void LLWorkerClass::setPriority(U32 priority) { mMutex.lock(); - if (mRequestHandle != LLWorkerThread::nullHandle()) + if (mRequestHandle != LLWorkerThread::nullHandle() && mRequestPriority != priority) { mRequestPriority = priority; mWorkerThread->setPriority(mRequestHandle, priority); diff --git a/indra/llinventory/llinventorydefines.h b/indra/llinventory/llinventorydefines.h index ccf1a356de..67e629c546 100644 --- a/indra/llinventory/llinventorydefines.h +++ b/indra/llinventory/llinventorydefines.h @@ -89,7 +89,7 @@ public: II_FLAGS_WEARABLES_MASK = 0xff, // Wearables use the low order byte of flags to store the - // EWearableType enumeration found in newview/llwearable.h + // LLWearableType::EType enumeration found in newview/llwearable.h II_FLAGS_PERM_OVERWRITE_MASK = (II_FLAGS_OBJECT_SLAM_PERM | II_FLAGS_OBJECT_SLAM_SALE | diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index bf0ed97143..970b6747f7 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -440,6 +440,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL if (mShutDown) { + llinfos << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl; return; // don't get the asset or do any callbacks, we are shutting down } @@ -456,6 +457,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL // Try static VFS first. if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data)) { + llinfos << "ASSET_TRACE asset " << uuid << " found in static VFS" << llendl; return; } @@ -472,6 +474,8 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL { callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); } + + llinfos << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl; } else { @@ -512,7 +516,6 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL // This can be overridden by subclasses _queueDataRequest(uuid, type, callback, user_data, duplicate, is_priority); } - llinfos << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl; } diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 024e17a777..91e11b8c0d 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -89,10 +89,6 @@ S32 gCurlMultiCount = 0; std::vector<LLMutex*> LLCurl::sSSLMutex; std::string LLCurl::sCAPath; std::string LLCurl::sCAFile; -// Verify SSL certificates by default (matches libcurl default). The ability -// to alter this flag is only to allow us to suppress verification if it's -// broken for some reason. -bool LLCurl::sSSLVerify = true; //static void LLCurl::setCAPath(const std::string& path) @@ -107,18 +103,6 @@ void LLCurl::setCAFile(const std::string& file) } //static -void LLCurl::setSSLVerify(bool verify) -{ - sSSLVerify = verify; -} - -//static -bool LLCurl::getSSLVerify() -{ - return sSSLVerify; -} - -//static std::string LLCurl::getVersionString() { return std::string(curl_version()); @@ -481,8 +465,7 @@ void LLCurl::Easy::prepRequest(const std::string& url, setErrorBuffer(); setCA(); - setopt(CURLOPT_SSL_VERIFYPEER, LLCurl::getSSLVerify()); - setopt(CURLOPT_SSL_VERIFYHOST, LLCurl::getSSLVerify()? 2 : 0); + setopt(CURLOPT_SSL_VERIFYPEER, true); setopt(CURLOPT_TIMEOUT, CURL_REQUEST_TIMEOUT); setoptString(CURLOPT_URL, url); @@ -912,6 +895,15 @@ void LLCurlEasyRequest::setReadCallback(curl_read_callback callback, void* userd } } +void LLCurlEasyRequest::setSSLCtxCallback(curl_ssl_ctx_callback callback, void* userdata) +{ + if (mEasy) + { + mEasy->setopt(CURLOPT_SSL_CTX_FUNCTION, (void*)callback); + mEasy->setopt(CURLOPT_SSL_CTX_DATA, userdata); + } +} + void LLCurlEasyRequest::slist_append(const char* str) { if (mEasy) @@ -1061,3 +1053,4 @@ void LLCurl::cleanupClass() #endif curl_global_cleanup(); } + diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index caf02cccd9..b6a637ae5b 100644 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -158,16 +158,6 @@ public: static const std::string& getCAPath() { return sCAPath; } /** - * @ brief Set flag controlling whether to verify HTTPS certs. - */ - static void setSSLVerify(bool verify); - - /** - * @ brief Get flag controlling whether to verify HTTPS certs. - */ - static bool getSSLVerify(); - - /** * @ brief Initialize LLCurl class */ static void initClass(); @@ -192,7 +182,6 @@ public: private: static std::string sCAPath; static std::string sCAFile; - static bool sSSLVerify; }; namespace boost @@ -240,6 +229,7 @@ public: void setHeaderCallback(curl_header_callback callback, void* userdata); void setWriteCallback(curl_write_callback callback, void* userdata); void setReadCallback(curl_read_callback callback, void* userdata); + void setSSLCtxCallback(curl_ssl_ctx_callback callback, void* userdata); void slist_append(const char* str); void sendRequest(const std::string& url); void requestComplete(); diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index dd56e18caf..9c2e4b5658 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -31,7 +31,7 @@ */ #include "linden_common.h" - +#include <openssl/x509_vfy.h> #include "llhttpclient.h" #include "llassetstorage.h" @@ -46,7 +46,10 @@ #include "message.h" #include <curl/curl.h> + const F32 HTTP_REQUEST_EXPIRY_SECS = 60.0f; +LLURLRequest::SSLCertVerifyCallback LLHTTPClient::mCertVerifyCallback = NULL; + //////////////////////////////////////////////////////////////////////////// // Responder class moved to LLCurl @@ -79,8 +82,10 @@ namespace { if (mResponder.get()) { - mResponder->completedRaw(mStatus, mReason, channels, buffer); + // Allow clients to parse headers before we attempt to parse + // the body and provide completed/result/error calls. mResponder->completedHeader(mStatus, mReason, mHeaderOutput); + mResponder->completedRaw(mStatus, mReason, channels, buffer); } } virtual void header(const std::string& header, const std::string& value) @@ -206,13 +211,19 @@ namespace LLPumpIO* theClientPump = NULL; } +void LLHTTPClient::setCertVerifyCallback(LLURLRequest::SSLCertVerifyCallback callback) +{ + LLHTTPClient::mCertVerifyCallback = callback; +} + static void request( const std::string& url, LLURLRequest::ERequestAction method, Injector* body_injector, LLCurl::ResponderPtr responder, const F32 timeout = HTTP_REQUEST_EXPIRY_SECS, - const LLSD& headers = LLSD()) + const LLSD& headers = LLSD() + ) { if (!LLHTTPClient::hasPump()) { @@ -222,7 +233,7 @@ static void request( LLPumpIO::chain_t chain; LLURLRequest* req = new LLURLRequest(method, url); - req->checkRootCertificate(LLCurl::getSSLVerify()); + req->setSSLVerifyCallback(LLHTTPClient::getCertVerifyCallback(), (void *)req); lldebugs << LLURLRequest::actionAsVerb(method) << " " << url << " " @@ -417,7 +428,6 @@ static LLSD blocking_request( std::string body_str; // other request method checks root cert first, we skip? - //req->checkRootCertificate(true); // * Set curl handle options curl_easy_setopt(curlp, CURLOPT_NOSIGNAL, 1); // don't use SIGALRM for timeouts diff --git a/indra/llmessage/llhttpclient.h b/indra/llmessage/llhttpclient.h index 3d0646e5fe..8afbc9e0fc 100644 --- a/indra/llmessage/llhttpclient.h +++ b/indra/llmessage/llhttpclient.h @@ -40,7 +40,8 @@ #include <string> #include <boost/intrusive_ptr.hpp> - +#include <openssl/x509_vfy.h> +#include "llurlrequest.h" #include "llassettype.h" #include "llcurl.h" #include "lliopipe.h" @@ -61,6 +62,7 @@ public: typedef LLCurl::Responder Responder; typedef LLCurl::ResponderPtr ResponderPtr; + /** @name non-blocking API */ //@{ static void head( @@ -155,7 +157,12 @@ public: static void setPump(LLPumpIO& pump); ///< must be called before any of the above calls are made static bool hasPump(); - ///< for testing + + static void setCertVerifyCallback(LLURLRequest::SSLCertVerifyCallback callback); + static LLURLRequest::SSLCertVerifyCallback getCertVerifyCallback() { return mCertVerifyCallback; } + +protected: + static LLURLRequest::SSLCertVerifyCallback mCertVerifyCallback; }; #endif // LL_LLHTTPCLIENT_H diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 4e7ceff984..1e76d10828 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -36,7 +36,8 @@ #include "llurlrequest.h" #include <algorithm> - +#include <openssl/x509_vfy.h> +#include <openssl/ssl.h> #include "llcurl.h" #include "llioutil.h" #include "llmemtype.h" @@ -56,6 +57,8 @@ const std::string CONTEXT_TRANSFERED_BYTES("transfered_bytes"); static size_t headerCallback(void* data, size_t size, size_t nmemb, void* user); + + /** * class LLURLRequestDetail */ @@ -72,6 +75,7 @@ public: U32 mBodyLimit; S32 mByteAccumulator; bool mIsBodyLimitSet; + LLURLRequest::SSLCertVerifyCallback mSSLVerifyCallback; }; LLURLRequestDetail::LLURLRequestDetail() : @@ -80,7 +84,8 @@ LLURLRequestDetail::LLURLRequestDetail() : mLastRead(NULL), mBodyLimit(0), mByteAccumulator(0), - mIsBodyLimitSet(false) + mIsBodyLimitSet(false), + mSSLVerifyCallback(NULL) { LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mCurlRequest = new LLCurlEasyRequest(); @@ -94,6 +99,36 @@ LLURLRequestDetail::~LLURLRequestDetail() mLastRead = NULL; } +void LLURLRequest::setSSLVerifyCallback(SSLCertVerifyCallback callback, void *param) +{ + mDetail->mSSLVerifyCallback = callback; + mDetail->mCurlRequest->setSSLCtxCallback(LLURLRequest::_sslCtxCallback, (void *)this); + mDetail->mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, true); + mDetail->mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, 2); +} + + +// _sslCtxFunction +// Callback function called when an SSL Context is created via CURL +// used to configure the context for custom cert validation + +CURLcode LLURLRequest::_sslCtxCallback(CURL * curl, void *sslctx, void *param) +{ + LLURLRequest *req = (LLURLRequest *)param; + if(req == NULL || req->mDetail->mSSLVerifyCallback == NULL) + { + SSL_CTX_set_cert_verify_callback((SSL_CTX *)sslctx, NULL, NULL); + return CURLE_OK; + } + SSL_CTX * ctx = (SSL_CTX *) sslctx; + // disable any default verification for server certs + SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL); + // set the verification callback. + SSL_CTX_set_cert_verify_callback(ctx, req->mDetail->mSSLVerifyCallback, (void *)req); + // the calls are void + return CURLE_OK; + +} /** * class LLURLRequest @@ -148,6 +183,11 @@ void LLURLRequest::setURL(const std::string& url) mDetail->mURL = url; } +std::string LLURLRequest::getURL() const +{ + return mDetail->mURL; +} + void LLURLRequest::addHeader(const char* header) { LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); @@ -160,13 +200,6 @@ void LLURLRequest::setBodyLimit(U32 size) mDetail->mIsBodyLimitSet = true; } -void LLURLRequest::checkRootCertificate(bool check) -{ - mDetail->mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, (check? TRUE : FALSE)); - mDetail->mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, (check? 2 : 0)); - mDetail->mCurlRequest->setoptString(CURLOPT_ENCODING, ""); -} - void LLURLRequest::setCallback(LLURLRequestComplete* callback) { LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); diff --git a/indra/llmessage/llurlrequest.h b/indra/llmessage/llurlrequest.h index cb3c466440..69fd22e592 100644 --- a/indra/llmessage/llurlrequest.h +++ b/indra/llmessage/llurlrequest.h @@ -44,6 +44,8 @@ #include "lliopipe.h" #include "llchainio.h" #include "llerror.h" +#include <openssl/x509_vfy.h> +#include "llcurl.h" extern const std::string CONTEXT_REQUEST; @@ -72,6 +74,8 @@ class LLURLRequest : public LLIOPipe { LOG_CLASS(LLURLRequest); public: + + typedef int (* SSLCertVerifyCallback)(X509_STORE_CTX *ctx, void *param); /** * @brief This enumeration is for specifying the type of request. */ @@ -125,7 +129,7 @@ public: * */ void setURL(const std::string& url); - + std::string getURL() const; /** * @brief Add a header to the http post. * @@ -143,8 +147,9 @@ public: * Set whether request will check that remote server * certificates are signed by a known root CA when using HTTPS. */ - void checkRootCertificate(bool check); + void setSSLVerifyCallback(SSLCertVerifyCallback callback, void * param); + /** * @brief Return at most size bytes of body. * @@ -189,6 +194,7 @@ public: * @brief Give this pipe a chance to handle a generated error */ virtual EStatus handleError(EStatus status, LLPumpIO* pump); + protected: /** @@ -217,6 +223,8 @@ protected: S32 mRequestTransferedBytes; S32 mResponseTransferedBytes; + static CURLcode _sslCtxCallback(CURL * curl, void *sslctx, void *param); + private: /** * @brief Initialize the object. Called during construction. @@ -364,62 +372,6 @@ protected: }; -/** - * @class LLURLRequestClientFactory - * @brief Template class to build url request based client chains - * - * This class eases construction of a basic sd rpc client. Here is an - * example of it's use: - * <code> - * class LLUsefulService : public LLService { ... }<br> - * LLService::registerCreator(<br> - * "useful",<br> - * LLService::creator_t(new LLURLRequestClientFactory<LLUsefulService>))<br> - * </code> - * - * This class should work, but I never got around to using/testing it. - * - */ -#if 0 -template<class Client> -class LLURLRequestClientFactory : public LLChainIOFactory -{ -public: - LLURLRequestClientFactory(LLURLRequest::ERequestAction action) {} - LLURLRequestClientFactory( - LLURLRequest::ERequestAction action, - const std::string& fixed_url) : - mAction(action), - mURL(fixed_url) - { - } - virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const - { - lldebugs << "LLURLRequestClientFactory::build" << llendl; - LLIOPipe::ptr_t service(new Client); - chain.push_back(service); - LLURLRequest* http(new LLURLRequest(mAction)); - LLIOPipe::ptr_t http_pipe(http); - // *FIX: how do we know the content type? - //http->addHeader("Content-Type: text/llsd"); - if(mURL.empty()) - { - chain.push_back(LLIOPipe::ptr_t(new LLContextURLExtractor(http))); - } - else - { - http->setURL(mURL); - } - chain.push_back(http_pipe); - chain.push_back(service); - return true; - } - -protected: - LLURLRequest::ERequestAction mAction; - std::string mURL; -}; -#endif /** * External constants diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 3ecab90756..12df9ccae4 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -91,6 +91,7 @@ set(llui_SOURCE_FILES lltextbox.cpp lltexteditor.cpp lltextparser.cpp + lltextutil.cpp lltextvalidate.cpp lltransutil.cpp lltoggleablemenu.cpp @@ -185,6 +186,7 @@ set(llui_HEADER_FILES lltextbox.h lltexteditor.h lltextparser.h + lltextutil.h lltextvalidate.h lltoggleablemenu.h lltooltip.h diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 5d1d57cbb2..8e0245c451 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -65,6 +65,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) , mFitParent(params.fit_parent) , mAutoScrolling( false ) , mAutoScrollRate( 0.f ) + , mSelectedTab( NULL ) { mSingleExpansion = params.single_expansion; if(mFitParent && !mSingleExpansion) @@ -76,6 +77,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) LLAccordionCtrl::LLAccordionCtrl() : LLPanel() , mAutoScrolling( false ) , mAutoScrollRate( 0.f ) + , mSelectedTab( NULL ) { mSingleExpansion = false; mFitParent = false; @@ -689,6 +691,28 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info) } return 0; } + else if(str_action == "select_current") + { + for(size_t i=0;i<mAccordionTabs.size();++i) + { + // Set selection to the currently focused tab. + if(mAccordionTabs[i]->hasFocus()) + { + if (mAccordionTabs[i] != mSelectedTab) + { + if (mSelectedTab) + { + mSelectedTab->setSelected(false); + } + mSelectedTab = mAccordionTabs[i]; + mSelectedTab->setSelected(true); + } + + return 1; + } + } + return 0; + } } else if (info.has("scrollToShowRect")) { diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index ab7d6548ca..a029201c90 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -130,6 +130,7 @@ private: bool mFitParent; bool mAutoScrolling; F32 mAutoScrollRate; + LLAccordionCtrlTab* mSelectedTab; }; diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 596da782ce..83e67980a3 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -32,12 +32,13 @@ #include "linden_common.h" -#include "lluictrl.h" -#include "llscrollbar.h" #include "llaccordionctrltab.h" -#include "lllocalcliprect.h" +#include "lllocalcliprect.h" +#include "llscrollbar.h" #include "lltextbox.h" +#include "lltextutil.h" +#include "lluictrl.h" static const std::string DD_BUTTON_NAME = "dd_button"; static const std::string DD_TEXTBOX_NAME = "dd_textbox"; @@ -72,7 +73,10 @@ public: virtual BOOL postBuild(); - void setTitle(const std::string& title); + std::string getTitle(); + void setTitle(const std::string& title, const std::string& hl); + + void setSelected(bool is_selected) { mIsSelected = is_selected; } virtual void onMouseEnter(S32 x, S32 y, MASK mask); virtual void onMouseLeave(S32 x, S32 y, MASK mask); @@ -101,6 +105,7 @@ private: LLUIColor mHeaderBGColor; bool mNeedsHighlight; + bool mIsSelected; LLFrameTimer mAutoOpenTimer; }; @@ -113,7 +118,8 @@ LLAccordionCtrlTab::LLAccordionCtrlTabHeader::LLAccordionCtrlTabHeader( const LLAccordionCtrlTabHeader::Params& p) : LLUICtrl(p) , mHeaderBGColor(p.header_bg_color()) -,mNeedsHighlight(false), +, mNeedsHighlight(false) +, mIsSelected(false), mImageCollapsed(p.header_collapse_img), mImageCollapsedPressed(p.header_collapse_img_pressed), mImageExpanded(p.header_expand_img), @@ -146,10 +152,28 @@ BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::postBuild() return TRUE; } -void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitle(const std::string& title) +std::string LLAccordionCtrlTab::LLAccordionCtrlTabHeader::getTitle() { if(mHeaderTextbox) - mHeaderTextbox->setText(title); + { + return mHeaderTextbox->getText(); + } + else + { + return LLStringUtil::null; + } +} + +void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitle(const std::string& title, const std::string& hl) +{ + if(mHeaderTextbox) + { + LLTextUtil::textboxSetHighlightedVal( + mHeaderTextbox, + LLStyle::Params(), + title, + hl); + } } void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw() @@ -167,7 +191,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw() // Only show green "focus" background image if the accordion is open, // because the user's mental model of focus is that it goes away after // the accordion is closed. - if (getParent()->hasFocus() + if (getParent()->hasFocus() || mIsSelected /*&& !(collapsible && !expanded)*/ // WHY?? ) { @@ -281,6 +305,7 @@ LLAccordionCtrlTab::Params::Params() ,header_image_focused("header_image_focused") ,header_text_color("header_text_color") ,fit_panel("fit_panel",true) + ,selection_enabled("selection_enabled", false) { mouse_opaque(false); } @@ -311,6 +336,11 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p) mHeader = LLUICtrlFactory::create<LLAccordionCtrlTabHeader>(headerParams); addChild(mHeader, 1); + if (p.selection_enabled) + { + LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLAccordionCtrlTab::selectOnFocusReceived, this)); + } + reshape(100, 200,FALSE); } @@ -436,12 +466,25 @@ void LLAccordionCtrlTab::setAccordionView(LLView* panel) addChild(panel,0); } -void LLAccordionCtrlTab::setTitle(const std::string& title) +std::string LLAccordionCtrlTab::getTitle() { LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME); if (header) { - header->setTitle(title); + return header->getTitle(); + } + else + { + return LLStringUtil::null; + } +} + +void LLAccordionCtrlTab::setTitle(const std::string& title, const std::string& hl) +{ + LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME); + if (header) + { + header->setTitle(title, hl); } } @@ -465,6 +508,15 @@ boost::signals2::connection LLAccordionCtrlTab::setFocusLostCallback(const focus return boost::signals2::connection(); } +void LLAccordionCtrlTab::setSelected(bool is_selected) +{ + LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME); + if (header) + { + header->setSelected(is_selected); + } +} + LLView* LLAccordionCtrlTab::findContainerView() { for(child_list_const_iter_t it = getChildList()->begin(); @@ -480,6 +532,11 @@ LLView* LLAccordionCtrlTab::findContainerView() return NULL; } +void LLAccordionCtrlTab::selectOnFocusReceived() +{ + if (getParent()) // A parent may not be set if tabs are added dynamically. + getParent()->notifyParent(LLSD().with("action", "select_current")); +} S32 LLAccordionCtrlTab::getHeaderHeight() { @@ -680,6 +737,7 @@ void LLAccordionCtrlTab::showAndFocusHeader() { LLAccordionCtrlTabHeader* header = getChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME); header->setFocus(true); + header->setSelected(true); LLRect screen_rc; LLRect selected_rc = header->getRect(); @@ -903,5 +961,3 @@ BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask) } return LLUICtrl::handleToolTip(x, y, mask); } - - diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index de254ed3eb..83a9024a74 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -88,6 +88,8 @@ public: Optional<bool> fit_panel; + Optional<bool> selection_enabled; + Optional<S32> padding_left; Optional<S32> padding_right; Optional<S32> padding_top; @@ -113,12 +115,16 @@ public: void setAccordionView(LLView* panel); LLView* getAccordionView() { return mContainerPanel; }; - // Set text in LLAccordionCtrlTabHeader - void setTitle(const std::string& title); + std::string getTitle(); + + // Set text and highlight substring in LLAccordionCtrlTabHeader + void setTitle(const std::string& title, const std::string& hl = LLStringUtil::null); boost::signals2::connection setFocusReceivedCallback(const focus_signal_t::slot_type& cb); boost::signals2::connection setFocusLostCallback(const focus_signal_t::slot_type& cb); + void setSelected(bool is_selected); + bool getCollapsible() {return mCollapsible;}; void setCollapsible(bool collapsible) {mCollapsible = collapsible;}; @@ -197,6 +203,9 @@ protected: void drawChild(const LLRect& root_rect,LLView* child); LLView* findContainerView (); + + void selectOnFocusReceived(); + private: class LLAccordionCtrlTabHeader; diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 0255061b12..a8f72183fd 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -128,6 +128,7 @@ LLButton::LLButton(const LLButton::Params& p) mImageSelected(p.image_selected), mImageDisabled(p.image_disabled), mImageDisabledSelected(p.image_disabled_selected), + mImageFlash(p.image_flash), mImagePressed(p.image_pressed), mImagePressedSelected(p.image_pressed_selected), mImageHoverSelected(p.image_hover_selected), @@ -635,14 +636,24 @@ void LLButton::draw() if (mFlashing) { - 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 + // if we have icon for flashing, use it as image for button + if(flash && mImageFlash->getName() != "FlashIconAbsent") + { + // setting flash to false to avoid its further influence on glow + flash = false; + imagep = mImageFlash; + } + // else use usual flashing via flash_color else - glow_color = flash_color; + { + 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 + glow_color = flash_color; + } } if (mNeedsHighlight && !imagep) @@ -1018,6 +1029,11 @@ void LLButton::setImageHoverUnselected(LLPointer<LLUIImage> image) mImageHoverUnselected = image; } +void LLButton::setImageFlash(LLPointer<LLUIImage> image) +{ + mImageFlash = image; +} + void LLButton::setImageOverlay(const std::string& image_name, LLFontGL::HAlign alignment, const LLColor4& color) { if (image_name.empty()) diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index a4d81ed6c3..b251c3d65d 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -84,6 +84,7 @@ public: image_hover_unselected, image_disabled_selected, image_disabled, + image_flash, image_pressed, image_pressed_selected, image_overlay; @@ -246,6 +247,7 @@ public: void setImageHoverUnselected(LLPointer<LLUIImage> image); void setImageDisabled(LLPointer<LLUIImage> image); void setImageDisabledSelected(LLPointer<LLUIImage> image); + void setImageFlash(LLPointer<LLUIImage> image); void setImagePressed(LLPointer<LLUIImage> image); void setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; } @@ -310,6 +312,12 @@ private: LLPointer<LLUIImage> mImagePressed; LLPointer<LLUIImage> mImagePressedSelected; + /* There are two ways an image can flash- by making changes in color according to flash_color attribute + or by changing icon from current to the one specified in image_flash. Second way is used only if + the name of flash icon is different from "FlashIconAbsent" which is there by default. First way is used + otherwise. */ + LLPointer<LLUIImage> mImageFlash; + LLUIColor mHighlightColor; LLUIColor mFlashBgColor; diff --git a/indra/llui/llfiltereditor.cpp b/indra/llui/llfiltereditor.cpp index 390504234d..6c80275713 100644 --- a/indra/llui/llfiltereditor.cpp +++ b/indra/llui/llfiltereditor.cpp @@ -39,6 +39,7 @@ LLFilterEditor::LLFilterEditor(const LLFilterEditor::Params& p) : LLSearchEditor(p) { + setCommitOnFocusLost(FALSE); // we'll commit on every keystroke, don't re-commit when we take focus away (i.e. we go to interact with the actual results!) } diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index bea2572ff8..2433c14315 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -379,6 +379,7 @@ LLFlatListView::LLFlatListView(const LLFlatListView::Params& p) , mCommitOnSelectionChange(false) , mPrevNotifyParentRect(LLRect()) , mNoItemsCommentTextbox(NULL) + , mIsConsecutiveSelection(false) { mBorderThickness = getBorderWidth(); @@ -536,6 +537,7 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask) return; bool grab_items = false; + bool reverse = false; pairs_list_t pairs_to_select; // Pick out items from list between last selected and current clicked item_pair. @@ -547,6 +549,8 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask) item_pair_t* cur = *iter; if (cur == last_selected_pair || cur == item_pair) { + // We've got reverse selection if last grabed item isn't a new selection. + reverse = grab_items && (cur != item_pair); grab_items = !grab_items; // Skip last selected and current clicked item pairs. continue; @@ -562,26 +566,35 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask) } } - if (select_item) + if (reverse) { - pairs_to_select.push_back(item_pair); + pairs_to_select.reverse(); } + pairs_to_select.push_back(item_pair); + for (pairs_iterator_t iter = pairs_to_select.begin(), iter_end = pairs_to_select.end(); iter != iter_end; ++iter) { item_pair_t* pair_to_select = *iter; - selectItemPair(pair_to_select, true); + if (isSelected(pair_to_select)) + { + // Item was already selected but there is a need to keep order from last selected pair to new selection. + // Do it here to prevent extra mCommitOnSelectionChange in selectItemPair(). + mSelectedItemPairs.remove(pair_to_select); + mSelectedItemPairs.push_back(pair_to_select); + } + else + { + selectItemPair(pair_to_select, true); + } } if (!select_item) { - // Item was already selected but there is a need to update last selected item and its border. - // Do it here to prevent extra mCommitOnSelectionChange in selectItemPair(). - mSelectedItemPairs.remove(item_pair); - mSelectedItemPairs.push_back(item_pair); + // Update last selected item border. mSelectedItemsBorder->setRect(getLastSelectedItemRect().stretch(-1)); } return; @@ -749,6 +762,8 @@ bool LLFlatListView::selectItemPair(item_pair_t* item_pair, bool select) // Stretch selected item rect to ensure it won't be clipped mSelectedItemsBorder->setRect(getLastSelectedItemRect().stretch(-1)); + // By default mark it as not consecutive selection + mIsConsecutiveSelection = false; return true; } @@ -823,6 +838,17 @@ bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selecti if ( 0 == size() ) return false; + if (!mIsConsecutiveSelection) + { + // Leave only one item selected if list has not consecutive selection + if (mSelectedItemPairs.size() && !reset_selection) + { + item_pair_t* cur_sel_pair = mSelectedItemPairs.back(); + resetSelection(); + selectItemPair (cur_sel_pair, true); + } + } + if ( mSelectedItemPairs.size() ) { item_pair_t* to_sel_pair = NULL; @@ -877,6 +903,8 @@ bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selecti } // Select/Deselect next item selectItemPair(select ? to_sel_pair : cur_sel_pair, select); + // Mark it as consecutive selection + mIsConsecutiveSelection = true; return true; } } @@ -888,6 +916,8 @@ bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selecti selectLastItem(); else selectFirstItem(); + // Mark it as consecutive selection + mIsConsecutiveSelection = true; return true; } @@ -1255,7 +1285,7 @@ void LLFlatListViewEx::filterItems() } } - rearrangeItems(); + sort(); notifyParentItemsRectChanged(); } diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 6395805aab..f4e0426f15 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -410,6 +410,8 @@ private: bool mKeepOneItemSelected; + bool mIsConsecutiveSelection; + /** All pairs of the list */ pairs_list_t mItemPairs; diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 79c47a1136..6babaf936b 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -169,6 +169,7 @@ LLFloater::Params::Params() save_rect("save_rect", false), save_visibility("save_visibility", false), can_dock("can_dock", false), + open_centered("open_centered", false), header_height("header_height", 0), legacy_header_height("legacy_header_height", 0), close_image("close_image"), @@ -763,6 +764,13 @@ void LLFloater::applySavedVariables() void LLFloater::applyRectControl() { + // first, center on screen if requested + if (mOpenCentered) + { + center(); + } + + // override center if we have saved rect control if (mRectControl.size() > 1) { const LLRect& rect = LLUI::sSettingGroups["floater"]->getRect(mRectControl); @@ -2711,6 +2719,7 @@ void LLFloater::initFromParams(const LLFloater::Params& p) mLegacyHeaderHeight = p.legacy_header_height; mSingleInstance = p.single_instance; mAutoTile = p.auto_tile; + mOpenCentered = p.open_centered; if (p.save_rect) { diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 444711de81..654164ddc0 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -110,7 +110,8 @@ public: save_rect, save_visibility, save_dock_state, - can_dock; + can_dock, + open_centered; Optional<S32> header_height, legacy_header_height; // HACK see initFromXML() @@ -373,6 +374,7 @@ private: BOOL mCanClose; BOOL mDragOnLeft; BOOL mResizable; + bool mOpenCentered; S32 mMinWidth; S32 mMinHeight; diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 7588d8ab7a..85f9af126c 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -47,6 +47,7 @@ LLFloaterReg::instance_map_t LLFloaterReg::sInstanceMap; LLFloaterReg::build_map_t LLFloaterReg::sBuildMap; std::map<std::string,std::string> LLFloaterReg::sGroupMap; bool LLFloaterReg::sBlockShowFloaters = false; +std::set<std::string> LLFloaterReg::sAlwaysShowableList; static LLFloaterRegListener sFloaterRegListener; @@ -219,7 +220,9 @@ LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(const std::str //static LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus) { - if( sBlockShowFloaters ) + if( sBlockShowFloaters + // see EXT-7090 + && sAlwaysShowableList.find(name) == sAlwaysShowableList.end()) return 0;// LLFloater* instance = getInstance(name, key); if (instance) @@ -403,6 +406,14 @@ void LLFloaterReg::registerControlVariables() declareVisibilityControl(name); } } + + const LLSD& exclude_list = LLUI::sSettingGroups["config"]->getLLSD("always_showable_floaters"); + for (LLSD::array_const_iterator iter = exclude_list.beginArray(); + iter != exclude_list.endArray(); + iter++) + { + sAlwaysShowableList.insert(iter->asString()); + } } // Callbacks diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h index 5cacf76771..f1ba41f638 100644 --- a/indra/llui/llfloaterreg.h +++ b/indra/llui/llfloaterreg.h @@ -76,6 +76,10 @@ private: static build_map_t sBuildMap; static std::map<std::string,std::string> sGroupMap; static bool sBlockShowFloaters; + /** + * Defines list of floater names that can be shown despite state of sBlockShowFloaters. + */ + static std::set<std::string> sAlwaysShowableList; public: // Registration diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index e0e86ae228..b77126996e 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3420,6 +3420,12 @@ BOOL LLMenuHolderGL::handleKey(KEY key, MASK mask, BOOL called_from_parent) if (pMenu) { + //eat TAB key - EXT-7000 + if (key == KEY_TAB && mask == MASK_NONE) + { + return TRUE; + } + //handle ESCAPE and RETURN key handled = LLPanel::handleKey(key, mask, called_from_parent); if (!handled) @@ -3726,10 +3732,14 @@ void LLContextMenuBranch::buildDrawLabel( void ) void LLContextMenuBranch::showSubMenu() { - S32 center_x; - S32 center_y; - localPointToScreen(getRect().getWidth(), getRect().getHeight() , ¢er_x, ¢er_y); - mBranch->show( center_x, center_y); + LLMenuItemGL* menu_item = mBranch->getParentMenuItem(); + if (menu_item != NULL && menu_item->getVisible()) + { + S32 center_x; + S32 center_y; + localPointToScreen(getRect().getWidth(), getRect().getHeight() , ¢er_x, ¢er_y); + mBranch->show(center_x, center_y); + } } // onCommit() - do the primary funcationality of the menu item. diff --git a/indra/llui/llresizebar.cpp b/indra/llui/llresizebar.cpp index 0c46edf300..5d26b904b5 100644 --- a/indra/llui/llresizebar.cpp +++ b/indra/llui/llresizebar.cpp @@ -182,6 +182,11 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask) break; } + notifyParent(LLSD().with("action", "resize") + .with("view_name", mResizingView->getName()) + .with("new_height", new_height) + .with("new_width", new_width)); + scaled_rect.mTop = scaled_rect.mBottom + new_height; scaled_rect.mRight = scaled_rect.mLeft + new_width; mResizingView->setRect(scaled_rect); diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index b47f21ed8a..c0d02fa8e9 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -127,7 +127,16 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) } params.max_length_bytes(MAX_STRING_LENGTH); params.commit_callback.function((boost::bind(&LLSpinCtrl::onEditorCommit, this, _2))); - params.prevalidate_callback(&LLTextValidate::validateFloat); + + if( mPrecision>0 )//should accept float numbers + { + params.prevalidate_callback(&LLTextValidate::validateFloat); + } + else //should accept int numbers + { + params.prevalidate_callback(&LLTextValidate::validateNonNegativeS32); + } + params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM); mEditor = LLUICtrlFactory::create<LLLineEditor> (params); mEditor->setFocusReceivedCallback( boost::bind(&LLSpinCtrl::onEditorGainFocus, _1, this )); diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 30fc7babae..986cfe75a1 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -197,10 +197,13 @@ static LLDefaultChildRegistry::Register<LLTabContainer> r2("tab_container"); LLTabContainer::TabParams::TabParams() : tab_top_image_unselected("tab_top_image_unselected"), tab_top_image_selected("tab_top_image_selected"), + tab_top_image_flash("tab_top_image_flash"), tab_bottom_image_unselected("tab_bottom_image_unselected"), tab_bottom_image_selected("tab_bottom_image_selected"), + tab_bottom_image_flash("tab_bottom_image_flash"), tab_left_image_unselected("tab_left_image_unselected"), - tab_left_image_selected("tab_left_image_selected") + tab_left_image_selected("tab_left_image_selected"), + tab_left_image_flash("tab_left_image_flash") {} LLTabContainer::Params::Params() @@ -879,16 +882,19 @@ void LLTabContainer::update_images(LLTabTuple* tuple, TabParams params, LLTabCon { tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_top_image_unselected)); tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_top_image_selected)); + tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_top_image_flash)); } else if (pos == LLTabContainer::BOTTOM) { tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_bottom_image_unselected)); tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_bottom_image_selected)); + tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_bottom_image_flash)); } else if (pos == LLTabContainer::LEFT) { tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_left_image_unselected)); tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_left_image_selected)); + tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_left_image_flash)); } } } diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 50ec2679f6..a2dc15aaf9 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -67,10 +67,13 @@ public: { Optional<LLUIImage*> tab_top_image_unselected, tab_top_image_selected, + tab_top_image_flash, tab_bottom_image_unselected, tab_bottom_image_selected, + tab_bottom_image_flash, tab_left_image_unselected, - tab_left_image_selected; + tab_left_image_selected, + tab_left_image_flash; TabParams(); }; diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 390ec234d3..78a6ab1eaa 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1116,8 +1116,19 @@ void LLTextBase::reflow() updateSegments(); + S32 reflow_count = 0; while(mReflowIndex < S32_MAX) { + // we can get into an infinite loop if the document height does not monotonically increase + // with decreasing width (embedded ui elements with alternate layouts). In that case, + // we want to stop reflowing after 2 iterations. We use 2, since we need to handle the case + // of introducing a vertical scrollbar causing a reflow with less width. We should also always + // use an even number of iterations to avoid user visible oscillation of the layout + if(++reflow_count > 2) + { + lldebugs << "Breaking out of reflow due to possible infinite loop in " << getName() << llendl; + break; + } S32 start_index = mReflowIndex; mReflowIndex = S32_MAX; diff --git a/indra/llui/lltextutil.cpp b/indra/llui/lltextutil.cpp new file mode 100644 index 0000000000..c5f3929fb1 --- /dev/null +++ b/indra/llui/lltextutil.cpp @@ -0,0 +1,79 @@ +/** + * @file lltextutil.cpp + * @brief Misc text-related auxiliary methods + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "lltextutil.h" + +#include "lluicolor.h" +#include "lltextbox.h" + + +void LLTextUtil::textboxSetHighlightedVal(LLTextBox *txtbox, const LLStyle::Params& normal_style, const std::string& text, const std::string& hl) +{ + static LLUIColor sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", LLColor4::green); + + std::string text_uc = text; + LLStringUtil::toUpper(text_uc); + + size_t hl_begin = 0, hl_len = hl.size(); + + if (hl_len == 0 || (hl_begin = text_uc.find(hl)) == std::string::npos) + { + txtbox->setText(text, normal_style); + return; + } + + LLStyle::Params hl_style = normal_style; + hl_style.color = sFilterTextColor; + + txtbox->setText(LLStringUtil::null); // clear text + txtbox->appendText(text.substr(0, hl_begin), false, normal_style); + txtbox->appendText(text.substr(hl_begin, hl_len), false, hl_style); + txtbox->appendText(text.substr(hl_begin + hl_len), false, normal_style); +} + +const std::string& LLTextUtil::formatPhoneNumber(const std::string& phone_str) +{ + static const std::string PHONE_SEPARATOR = LLUI::sSettingGroups["config"]->getString("AvalinePhoneSeparator"); + static const S32 PHONE_PART_LEN = 2; + + static std::string formatted_phone_str; + formatted_phone_str = phone_str; + S32 separator_pos = (S32)(formatted_phone_str.size()) - PHONE_PART_LEN; + for (; separator_pos >= PHONE_PART_LEN; separator_pos -= PHONE_PART_LEN) + { + formatted_phone_str.insert(separator_pos, PHONE_SEPARATOR); + } + + return formatted_phone_str; +} + +// EOF diff --git a/indra/llui/lltextutil.h b/indra/llui/lltextutil.h new file mode 100644 index 0000000000..325c3c5b7c --- /dev/null +++ b/indra/llui/lltextutil.h @@ -0,0 +1,72 @@ +/** + * @file lltextutil.h + * @brief Misc text-related auxiliary methods + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLTEXTUTIL_H +#define LL_LLTEXTUTIL_H + +#include "llstyle.h" + +class LLTextBox; + +namespace LLTextUtil +{ + + /** + * Set value for text box, highlighting substring hl_uc. + * + * Used to highlight filter matches. + * + * @param txtbox Text box to set value for + * @param normal_style Style to use for non-highlighted text + * @param text Text to set + * @param hl Upper-cased string to highlight + */ + void textboxSetHighlightedVal( + LLTextBox *txtbox, + const LLStyle::Params& normal_style, + const std::string& text, + const std::string& hl); + + /** + * Formats passed phone number to be more human readable. + * + * It just divides the number on parts by two digits from right to left. The first left part + * can have 2 or 3 digits, i.e. +44-33-33-44-55-66 or 12-34-56-78-90. Separator is set in + * application settings (AvalinePhoneSeparator) + * + * @param[in] phone_str string with original phone number + * @return reference to string with formatted phone number + */ + const std::string& formatPhoneNumber(const std::string& phone_str); +} + +#endif // LL_LLTEXTUTIL_H diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 3375c13c94..fd56a87345 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -41,6 +41,9 @@ #include "lltrans.h" #include "lluicolortable.h" +#define APP_HEADER_REGEX "((x-grid-location-info://[-\\w\\.]+/app)|(secondlife:///app))" + + LLUrlEntryBase::LLUrlEntryBase() : mColor(LLUIColorTable::instance().getColor("HTMLLinkColor")), mDisabledLink(false) @@ -303,10 +306,11 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const // // LLUrlEntryAgent Describes a Second Life agent Url, e.g., // 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() { - mPattern = boost::regex("secondlife:///app/agent/[\\da-f-]+/\\w+", + mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/\\w+", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_agent.xml"; mIcon = "Generic_Person"; @@ -418,10 +422,11 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa // LLUrlEntryGroup Describes a Second Life group Url, e.g., // secondlife:///app/group/00005ff3-4044-c79f-9de8-fb28ae0df991/about // secondlife:///app/group/00005ff3-4044-c79f-9de8-fb28ae0df991/inspect +// x-grid-location-info://lincoln.lindenlab.com/app/group/00005ff3-4044-c79f-9de8-fb28ae0df991/inspect // LLUrlEntryGroup::LLUrlEntryGroup() { - mPattern = boost::regex("secondlife:///app/group/[\\da-f-]+/\\w+", + mPattern = boost::regex(APP_HEADER_REGEX "/group/[\\da-f-]+/\\w+", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_group.xml"; mIcon = "Generic_Group"; @@ -482,7 +487,8 @@ LLUrlEntryInventory::LLUrlEntryInventory() //*TODO: add supporting of inventory item names with whitespaces //this pattern cann't parse for example //secondlife:///app/inventory/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select?name=name with spaces¶m2=value - mPattern = boost::regex("secondlife:///app/inventory/[\\da-f-]+/\\w+\\S*", + //x-grid-location-info://lincoln.lindenlab.com/app/inventory/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select?name=name with spaces¶m2=value + mPattern = boost::regex(APP_HEADER_REGEX "/inventory/[\\da-f-]+/\\w+\\S*", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_inventory.xml"; } @@ -525,10 +531,11 @@ std::string LLUrlEntryObjectIM::getLocation(const std::string &url) const /// /// LLUrlEntryParcel Describes a Second Life parcel Url, e.g., /// secondlife:///app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about +/// x-grid-location-info://lincoln.lindenlab.com/app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about /// LLUrlEntryParcel::LLUrlEntryParcel() { - mPattern = boost::regex("secondlife:///app/parcel/[\\da-f-]+/about", + mPattern = boost::regex(APP_HEADER_REGEX "/parcel/[\\da-f-]+/about", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_parcel.xml"; mTooltip = LLTrans::getString("TooltipParcelUrl"); @@ -544,7 +551,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC // LLUrlEntryPlace::LLUrlEntryPlace() { - mPattern = boost::regex("secondlife://\\S+/?(\\d+/\\d+/\\d+|\\d+/\\d+)/?", + mPattern = boost::regex("((x-grid-location-info://[-\\w\\.]+/region/)|(secondlife://))\\S+/?(\\d+/\\d+/\\d+|\\d+/\\d+)/?", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_slurl.xml"; mTooltip = LLTrans::getString("TooltipSLURL"); @@ -589,10 +596,11 @@ std::string LLUrlEntryPlace::getLocation(const std::string &url) const // // LLUrlEntryTeleport Describes a Second Life teleport Url, e.g., // secondlife:///app/teleport/Ahern/50/50/50/ +// x-grid-location-info://lincoln.lindenlab.com/app/teleport/Ahern/50/50/50/ // LLUrlEntryTeleport::LLUrlEntryTeleport() { - mPattern = boost::regex("secondlife:///app/teleport/\\S+(/\\d+)?(/\\d+)?(/\\d+)?/?\\S*", + mPattern = boost::regex(APP_HEADER_REGEX "/teleport/\\S+(/\\d+)?(/\\d+)?(/\\d+)?/?\\S*", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_teleport.xml"; mTooltip = LLTrans::getString("TooltipTeleportUrl"); @@ -610,7 +618,12 @@ std::string LLUrlEntryTeleport::getLabel(const std::string &url, const LLUrlLabe LLURI uri(url); LLSD path_array = uri.pathArray(); S32 path_parts = path_array.size(); - const std::string label = LLTrans::getString("SLurlLabelTeleport"); + std::string host = uri.hostName(); + std::string label = LLTrans::getString("SLurlLabelTeleport"); + if (!host.empty()) + { + label += " " + host; + } if (path_parts == 6) { // handle teleport url with (X,Y,Z) coordinates @@ -709,7 +722,7 @@ std::string LLUrlEntrySLLabel::getTooltip(const std::string &string) const // LLUrlEntryWorldMap::LLUrlEntryWorldMap() { - mPattern = boost::regex("secondlife:///app/worldmap/\\S+/?(\\d+)?/?(\\d+)?/?(\\d+)?/?\\S*", + mPattern = boost::regex(APP_HEADER_REGEX "/worldmap/\\S+/?(\\d+)?/?(\\d+)?/?(\\d+)?/?\\S*", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_map.xml"; mTooltip = LLTrans::getString("TooltipMapUrl"); diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index e67f0ec3fc..bd56da9121 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -107,8 +107,6 @@ LLView::Params::Params() top_delta("top_delta", S32_MAX), left_pad("left_pad"), left_delta("left_delta", S32_MAX), - center_horiz("center_horiz", false), - center_vert("center_vert", false), from_xui("from_xui", false), user_resize("user_resize"), auto_resize("auto_resize"), @@ -1321,8 +1319,6 @@ void LLView::drawChildren() if (viewp->getVisible() && viewp->getRect().isValid()) { - // check for bad data - llassert_always(viewp->getVisible() == TRUE); // Only draw views that are within the root view localRectToScreen(viewp->getRect(),&screenRect); if ( rootRect.overlaps(screenRect) && LLUI::sDirtyRect.overlaps(screenRect)) @@ -2501,7 +2497,6 @@ void LLView::applyXUILayout(LLView::Params& p, LLView* parent) p.layout = parent->getLayout(); } - if (parent) { LLRect parent_rect = parent->getLocalRect(); @@ -2509,60 +2504,21 @@ void LLView::applyXUILayout(LLView::Params& p, LLView* parent) LLRect last_rect = parent->getLocalRect(); bool layout_topleft = (p.layout() == "topleft"); - if (layout_topleft) - { - //invert top to bottom - if (p.rect.top.isProvided()) p.rect.top = parent_rect.getHeight() - p.rect.top; - if (p.rect.bottom.isProvided()) p.rect.bottom = parent_rect.getHeight() - p.rect.bottom; - } // convert negative or centered coordinates to parent relative values // Note: some of this logic matches the logic in TypedParam<LLRect>::setValueFromBlock() + if (p.rect.left.isProvided() && p.rect.left < 0) p.rect.left = p.rect.left + parent_rect.getWidth(); + if (p.rect.right.isProvided() && p.rect.right < 0) p.rect.right = p.rect.right + parent_rect.getWidth(); + if (p.rect.bottom.isProvided() && p.rect.bottom < 0) p.rect.bottom = p.rect.bottom + parent_rect.getHeight(); + if (p.rect.top.isProvided() && p.rect.top < 0) p.rect.top = p.rect.top + parent_rect.getHeight(); - if (p.center_horiz) - { - if (p.rect.left.isProvided() && p.rect.right.isProvided()) - { - S32 width = p.rect.right - p.rect.left; - width = llmax(width, 0); - S32 offset = parent_rect.getWidth()/2 - width/2; - p.rect.left = p.rect.left + offset; - p.rect.right = p.rect.right + offset; - } - else - { - p.rect.left = p.rect.left + parent_rect.getWidth()/2 - p.rect.width/2; - p.rect.right.setProvided(false); // recalculate the right - } - } - else - { - if (p.rect.left.isProvided() && p.rect.left < 0) p.rect.left = p.rect.left + parent_rect.getWidth(); - if (p.rect.right.isProvided() && p.rect.right < 0) p.rect.right = p.rect.right + parent_rect.getWidth(); - } - if (p.center_vert) - { - if (p.rect.bottom.isProvided() && p.rect.top.isProvided()) - { - S32 height = p.rect.top - p.rect.bottom; - height = llmax(height, 0); - S32 offset = parent_rect.getHeight()/2 - height/2; - p.rect.bottom = p.rect.bottom + offset; - p.rect.top = p.rect.top + offset; - } - else - { - p.rect.bottom = p.rect.bottom + parent_rect.getHeight()/2 - p.rect.height/2; - p.rect.top.setProvided(false); // recalculate the top - } - } - else + if (layout_topleft) { - if (p.rect.bottom.isProvided() && p.rect.bottom < 0) p.rect.bottom = p.rect.bottom + parent_rect.getHeight(); - if (p.rect.top.isProvided() && p.rect.top < 0) p.rect.top = p.rect.top + parent_rect.getHeight(); + //invert top to bottom + if (p.rect.top.isProvided()) p.rect.top = parent_rect.getHeight() - p.rect.top; + if (p.rect.bottom.isProvided()) p.rect.bottom = parent_rect.getHeight() - p.rect.bottom; } - // DEPRECATE: automatically fall back to height of MIN_WIDGET_HEIGHT pixels if (!p.rect.height.isProvided() && !p.rect.top.isProvided() && p.rect.height == 0) { diff --git a/indra/llui/llview.h b/indra/llui/llview.h index efae00f0e5..3779fedf34 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -143,9 +143,6 @@ public: left_pad, // from last right to my left left_delta; // from last left to my left - Optional<bool> center_horiz, - center_vert; - // these are nested attributes for LLLayoutPanel //FIXME: get parent context involved in parsing traversal Ignored user_resize, diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp index cbb303a059..4463b6cc6f 100644 --- a/indra/llui/tests/llurlentry_test.cpp +++ b/indra/llui/tests/llurlentry_test.cpp @@ -286,6 +286,13 @@ namespace tut "XXX secondlife:///App/AGENT/0E346D8B-4433-4d66-a6b0-fd37083abc4c/foobar", "secondlife:///App/AGENT/0E346D8B-4433-4d66-a6b0-fd37083abc4c/foobar"); + testRegex("Standalone Agent Url ", url, + "x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about", + "x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about"); + + testRegex("Standalone Agent Url Multicase with Text", url, + "M x-grid-location-info://lincoln.lindenlab.com/app/AGENT/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about M", + "x-grid-location-info://lincoln.lindenlab.com/app/AGENT/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about"); } template<> template<> @@ -315,6 +322,15 @@ namespace tut testRegex("Group Url multicase", url, "XXX secondlife:///APP/Group/00005FF3-4044-c79f-9de8-fb28ae0df991/About XXX", "secondlife:///APP/Group/00005FF3-4044-c79f-9de8-fb28ae0df991/About"); + + testRegex("Standalone Group Url ", url, + "x-grid-location-info://lincoln.lindenlab.com/app/group/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about", + "x-grid-location-info://lincoln.lindenlab.com/app/group/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about"); + + testRegex("Standalone Group Url Multicase ith Text", url, + "M x-grid-location-info://lincoln.lindenlab.com/app/GROUP/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about M", + "x-grid-location-info://lincoln.lindenlab.com/app/GROUP/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about"); + } template<> template<> @@ -361,7 +377,11 @@ namespace tut // DEV-35459: SLURLs and teleport Links not parsed properly testRegex("SLURL with quote", url, "XXX secondlife://A'ksha%20Oasis/41/166/701 XXX", - "secondlife://A%27ksha%20Oasis/41/166/701"); + "secondlife://A%27ksha%20Oasis/41/166/701"); + + testRegex("Standalone All Hands (50,50) [2] with text", url, + "XXX x-grid-location-info://lincoln.lindenlab.com/region/All%20Hands/50/50/50 XXX", + "x-grid-location-info://lincoln.lindenlab.com/region/All%20Hands/50/50/50"); } template<> template<> @@ -461,6 +481,10 @@ namespace tut testRegex("Teleport url with quote", url, "XXX secondlife:///app/teleport/A'ksha%20Oasis/41/166/701 XXX", "secondlife:///app/teleport/A%27ksha%20Oasis/41/166/701"); + + testRegex("Standalone All Hands", url, + "XXX x-grid-location-info://lincoln.lindenlab.com/app/teleport/All%20Hands/50/50/50 XXX", + "x-grid-location-info://lincoln.lindenlab.com/app/teleport/All%20Hands/50/50/50"); } template<> template<> diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 29b6f490c8..795aa8327d 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -460,7 +460,6 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd } //llinfos << "*** EXPANDED FILENAME: <" << expanded_filename << ">" << llendl; - return expanded_filename; } @@ -566,27 +565,23 @@ std::string LLDir::getForbiddenFileChars() return "\\/:*?\"<>|"; } -void LLDir::setLindenUserDir(const std::string &first, const std::string &last) +void LLDir::setLindenUserDir(const std::string &username) { - // if both first and last aren't set, that's bad. - if (!first.empty() && !last.empty()) + // if the username isn't set, that's bad + if (!username.empty()) { // some platforms have case-sensitive filesystems, so be // utterly consistent with our firstname/lastname case. - std::string firstlower(first); - LLStringUtil::toLower(firstlower); - std::string lastlower(last); - LLStringUtil::toLower(lastlower); + std::string userlower(username); + LLStringUtil::toLower(userlower); + LLStringUtil::replaceChar(userlower, ' ', '_'); mLindenUserDir = getOSUserAppDir(); mLindenUserDir += mDirDelimiter; - mLindenUserDir += firstlower; - mLindenUserDir += "_"; - mLindenUserDir += lastlower; - llinfos << "Got name for LLDir::setLindenUserDir(first='" << first << "', last='" << last << "')" << llendl; + mLindenUserDir += userlower; } else { - llerrs << "Invalid name for LLDir::setLindenUserDir(first='" << first << "', last='" << last << "')" << llendl; + llerrs << "NULL name for LLDir::setLindenUserDir" << llendl; } dumpCurrentDirectories(); @@ -604,27 +599,25 @@ void LLDir::setChatLogsDir(const std::string &path) } } -void LLDir::setPerAccountChatLogsDir(const std::string &first, const std::string &last) +void LLDir::setPerAccountChatLogsDir(const std::string &username) { // if both first and last aren't set, assume we're grabbing the cached dir - if (!first.empty() && !last.empty()) + if (!username.empty()) { // some platforms have case-sensitive filesystems, so be // utterly consistent with our firstname/lastname case. - std::string firstlower(first); - LLStringUtil::toLower(firstlower); - std::string lastlower(last); - LLStringUtil::toLower(lastlower); + std::string userlower(username); + LLStringUtil::toLower(userlower); + LLStringUtil::replaceChar(userlower, ' ', '_'); mPerAccountChatLogsDir = getChatLogsDir(); mPerAccountChatLogsDir += mDirDelimiter; - mPerAccountChatLogsDir += firstlower; - mPerAccountChatLogsDir += "_"; - mPerAccountChatLogsDir += lastlower; + mPerAccountChatLogsDir += userlower; } else { - llwarns << "Invalid name for LLDir::setPerAccountChatLogsDir" << llendl; + llerrs << "NULL name for LLDir::setPerAccountChatLogsDir" << llendl; } + } void LLDir::setSkinFolder(const std::string &skin_folder) diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index 9067d75bac..05d5efc66f 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -137,8 +137,8 @@ class LLDir static std::string getForbiddenFileChars(); virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir - virtual void setPerAccountChatLogsDir(const std::string &first, const std::string &last); // Set the per user chat log directory. - virtual void setLindenUserDir(const std::string &first, const std::string &last); // Set the linden user 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 bool setCacheDir(const std::string &path); diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp index 2ead5a4a57..8d6aa405e2 100644 --- a/indra/llxuixml/llinitparam.cpp +++ b/indra/llxuixml/llinitparam.cpp @@ -139,7 +139,7 @@ namespace LLInitParam bool BaseBlock::validateBlock(bool emit_errors) const { - const BlockDescriptor& block_data = getBlockDescriptor(); + const BlockDescriptor& block_data = mostDerivedBlockDescriptor(); for (BlockDescriptor::param_validation_list_t::const_iterator it = block_data.mValidationList.begin(); it != block_data.mValidationList.end(); ++it) { const Param* param = getParamFromHandle(it->first); @@ -159,7 +159,7 @@ namespace LLInitParam { // named param is one like LLView::Params::follows // unnamed param is like LLView::Params::rect - implicit - const BlockDescriptor& block_data = getBlockDescriptor(); + const BlockDescriptor& block_data = mostDerivedBlockDescriptor(); for (BlockDescriptor::param_list_t::const_iterator it = block_data.mUnnamedParams.begin(); it != block_data.mUnnamedParams.end(); @@ -230,7 +230,7 @@ namespace LLInitParam { // named param is one like LLView::Params::follows // unnamed param is like LLView::Params::rect - implicit - const BlockDescriptor& block_data = getBlockDescriptor(); + const BlockDescriptor& block_data = mostDerivedBlockDescriptor(); for (BlockDescriptor::param_list_t::const_iterator it = block_data.mUnnamedParams.begin(); it != block_data.mUnnamedParams.end(); @@ -301,7 +301,7 @@ namespace LLInitParam bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack) { - BlockDescriptor& block_data = getBlockDescriptor(); + BlockDescriptor& block_data = mostDerivedBlockDescriptor(); bool names_left = name_stack.first != name_stack.second; if (names_left) @@ -386,7 +386,7 @@ namespace LLInitParam void BaseBlock::addSynonym(Param& param, const std::string& synonym) { - BlockDescriptor& block_data = getBlockDescriptor(); + BlockDescriptor& block_data = mostDerivedBlockDescriptor(); if (block_data.mInitializationState == BlockDescriptor::INITIALIZING) { param_handle_t handle = getHandleFromParam(¶m); @@ -417,8 +417,8 @@ namespace LLInitParam { if (user_provided) { - mChangeVersion++; - } + mChangeVersion++; + } } const std::string& BaseBlock::getParamName(const BlockDescriptor& block_data, const Param* paramp) const @@ -445,7 +445,7 @@ namespace LLInitParam ParamDescriptor* BaseBlock::findParamDescriptor(param_handle_t handle) { - BlockDescriptor& descriptor = getBlockDescriptor(); + BlockDescriptor& descriptor = mostDerivedBlockDescriptor(); BlockDescriptor::all_params_list_t::iterator end_it = descriptor.mAllParams.end(); for (BlockDescriptor::all_params_list_t::iterator it = descriptor.mAllParams.begin(); it != end_it; @@ -460,7 +460,7 @@ namespace LLInitParam // NOTE: this requires that "other" is of the same derived type as this bool BaseBlock::merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { - bool param_changed = false; + bool some_param_changed = false; BlockDescriptor::all_params_list_t::const_iterator end_it = block_data.mAllParams.end(); for (BlockDescriptor::all_params_list_t::const_iterator it = block_data.mAllParams.begin(); it != end_it; @@ -471,10 +471,10 @@ namespace LLInitParam if (merge_func) { Param* paramp = getParamFromHandle(it->mParamHandle); - param_changed |= merge_func(*paramp, *other_paramp, overwrite); + some_param_changed |= merge_func(*paramp, *other_paramp, overwrite); } } - return param_changed; + return some_param_changed; } bool ParamCompare<LLSD, false>::equals(const LLSD &a, const LLSD &b) diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index c9c1d4af90..b645c4be7c 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -477,10 +477,10 @@ namespace LLInitParam bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack); bool serializeBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), const BaseBlock* diff_block = NULL) const; - virtual bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t()) const; + bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t()) const; - const BlockDescriptor& getBlockDescriptor() const { return *mBlockDescriptor; } - BlockDescriptor& getBlockDescriptor() { return *mBlockDescriptor; } + const BlockDescriptor& mostDerivedBlockDescriptor() const { return *mBlockDescriptor; } + BlockDescriptor& mostDerivedBlockDescriptor() { return *mBlockDescriptor; } // take all provided params from other and apply to self bool overwriteFrom(const BaseBlock& other) @@ -507,7 +507,7 @@ namespace LLInitParam BlockDescriptor* mBlockDescriptor; // most derived block descriptor - static BlockDescriptor& blockDescriptor() + static BlockDescriptor& selfBlockDescriptor() { static BlockDescriptor sBlockDescriptor; return sBlockDescriptor; @@ -559,7 +559,7 @@ namespace LLInitParam 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) { - if (block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING) + if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { ParamDescriptor param_descriptor(block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), &mergeWith, @@ -584,6 +584,7 @@ namespace LLInitParam { if (parser.readValue<T>(typed_param.mData.mValue)) { + typed_param.mData.clearKey(); typed_param.setProvided(true); typed_param.enclosingBlock().setLastChangedParam(param, true); return true; @@ -690,7 +691,7 @@ namespace LLInitParam && (overwrite || !dst_typed_param.isProvided())) { dst_typed_param.mData.clearKey(); - dst_typed_param = src_typed_param; + dst_typed_param.set(src_typed_param.get()); return true; } return false; @@ -722,7 +723,7 @@ namespace LLInitParam : Param(block_descriptor.mCurrentBlockPtr), T(value) { - if (block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING) + if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { ParamDescriptor param_descriptor(block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), &mergeWith, @@ -741,6 +742,7 @@ namespace LLInitParam // attempt to parse block... if(typed_param.deserializeBlock(parser, name_stack)) { + typed_param.mData.clearKey(); typed_param.enclosingBlock().setLastChangedParam(param, true); return true; } @@ -856,21 +858,10 @@ namespace LLInitParam { const self_t& src_typed_param = static_cast<const self_t&>(src); self_t& dst_typed_param = static_cast<self_t&>(dst); - if (overwrite) - { - if (dst_typed_param.T::overwriteFrom(src_typed_param)) - { - dst_typed_param.mData.clearKey(); - return true; - } - } - else + if (dst_typed_param.T::merge(T::selfBlockDescriptor(), src_typed_param, overwrite || !dst_typed_param.isProvided())) { - if (dst_typed_param.T::fillFrom(src_typed_param)) - { - dst_typed_param.mData.clearKey(); - return true; - } + dst_typed_param.mData.clearKey(); + return true; } return false; } @@ -911,7 +902,7 @@ namespace LLInitParam mValues(value) { mCachedKeys.resize(mValues.size()); - if (block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING) + if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { ParamDescriptor param_descriptor(block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), &mergeWith, @@ -1060,9 +1051,9 @@ namespace LLInitParam self_t& dst_typed_param = static_cast<self_t&>(dst); if (src_typed_param.isProvided() - && (overwrite || !isProvided())) + && (overwrite || !dst_typed_param.isProvided())) { - dst_typed_param = src_typed_param; + dst_typed_param.set(src_typed_param.get()); return true; } return false; @@ -1094,7 +1085,7 @@ namespace LLInitParam mLastParamGeneration(0) { mCachedKeys.resize(mValues.size()); - if (block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING) + if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { ParamDescriptor param_descriptor(block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), &mergeWith, @@ -1252,7 +1243,7 @@ namespace LLInitParam if (src_typed_param.isProvided() && (overwrite || !dst_typed_param.isProvided())) { - dst_typed_param = src_typed_param; + dst_typed_param.set(src_typed_param.get()); return true; } return false; @@ -1282,13 +1273,24 @@ namespace LLInitParam // take all provided params from other and apply to self bool overwriteFrom(const self_t& other) { - mCurChoice = other.mCurChoice; - return BaseBlock::merge(blockDescriptor(), other, true); + return merge(selfBlockDescriptor(), other, true); } // take all provided params that are not already provided, and apply to self bool fillFrom(const self_t& other) { + return merge(selfBlockDescriptor(), other, false); + } + + // merge with other block + bool merge(BlockDescriptor& block_data, const self_t& other, bool overwrite) + { + // only merge a choice if we are overwriting with other's contents + if (overwrite) + { + mCurChoice = other.mCurChoice; + return BaseBlock::merge(selfBlockDescriptor(), other, overwrite); + } return false; } @@ -1314,7 +1316,7 @@ namespace LLInitParam Choice() : mCurChoice(0) { - BaseBlock::init(blockDescriptor(), BaseBlock::blockDescriptor(), sizeof(DERIVED_BLOCK)); + BaseBlock::init(selfBlockDescriptor(), BaseBlock::selfBlockDescriptor(), sizeof(DERIVED_BLOCK)); } // Alternatives are mutually exclusive wrt other Alternatives in the same block. @@ -1331,13 +1333,14 @@ namespace LLInitParam typedef typename super_t::value_assignment_t value_assignment_t; explicit Alternative(const char* name, value_assignment_t val = DefaultInitializer<T>::get()) - : super_t(DERIVED_BLOCK::blockDescriptor(), name, val, NULL, 0, 1), + : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, NULL, 0, 1), mOriginalValue(val) { // assign initial choice to first declared option - DERIVED_BLOCK* blockp = ((DERIVED_BLOCK*)DERIVED_BLOCK::blockDescriptor().mCurrentBlockPtr); - if (DERIVED_BLOCK::blockDescriptor().mInitializationState == BlockDescriptor::INITIALIZING - && blockp->mCurChoice == 0) + DERIVED_BLOCK* blockp = ((DERIVED_BLOCK*)DERIVED_BLOCK::selfBlockDescriptor().mCurrentBlockPtr); + if (LL_UNLIKELY( + DERIVED_BLOCK::selfBlockDescriptor().mInitializationState == BlockDescriptor::INITIALIZING + && blockp->mCurChoice == 0)) { blockp->mCurChoice = Param::enclosingBlock().getHandleFromParam(this); } @@ -1382,7 +1385,7 @@ namespace LLInitParam }; protected: - static BlockDescriptor& blockDescriptor() + static BlockDescriptor& selfBlockDescriptor() { static BlockDescriptor sBlockDescriptor; return sBlockDescriptor; @@ -1410,19 +1413,19 @@ namespace LLInitParam // take all provided params from other and apply to self bool overwriteFrom(const self_t& other) { - return BaseBlock::merge(blockDescriptor(), other, true); + return BaseBlock::merge(selfBlockDescriptor(), other, true); } // take all provided params that are not already provided, and apply to self bool fillFrom(const self_t& other) { - return BaseBlock::merge(blockDescriptor(), other, false); + return BaseBlock::merge(selfBlockDescriptor(), other, false); } protected: Block() { //#pragma message("Parsing LLInitParam::Block") - BaseBlock::init(blockDescriptor(), BASE_BLOCK::blockDescriptor(), sizeof(DERIVED_BLOCK)); + BaseBlock::init(selfBlockDescriptor(), BASE_BLOCK::selfBlockDescriptor(), sizeof(DERIVED_BLOCK)); } // @@ -1436,7 +1439,7 @@ namespace LLInitParam typedef typename super_t::value_assignment_t value_assignment_t; explicit Optional(const char* name = "", value_assignment_t val = DefaultInitializer<T>::get()) - : super_t(DERIVED_BLOCK::blockDescriptor(), name, val, NULL, 0, 1) + : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, NULL, 0, 1) { //#pragma message("Parsing LLInitParam::Block::Optional") } @@ -1465,7 +1468,7 @@ namespace LLInitParam // mandatory parameters require a name to be parseable explicit Mandatory(const char* name = "", value_assignment_t val = DefaultInitializer<T>::get()) - : super_t(DERIVED_BLOCK::blockDescriptor(), name, val, &validate, 1, 1) + : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, &validate, 1, 1) {} Mandatory& operator=(value_assignment_t val) @@ -1501,7 +1504,7 @@ namespace LLInitParam typedef typename container_t::const_iterator const_iterator; explicit Multiple(const char* name = "", value_assignment_t val = DefaultInitializer<container_t>::get()) - : super_t(DERIVED_BLOCK::blockDescriptor(), name, val, &validate, RANGE::minCount(), RANGE::maxCount()) + : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, &validate, RANGE::minCount(), RANGE::maxCount()) {} using super_t::operator(); @@ -1529,10 +1532,10 @@ namespace LLInitParam { public: explicit Deprecated(const char* name) - : Param(DERIVED_BLOCK::blockDescriptor().mCurrentBlockPtr) + : Param(DERIVED_BLOCK::selfBlockDescriptor().mCurrentBlockPtr) { - BlockDescriptor& block_descriptor = DERIVED_BLOCK::blockDescriptor(); - if (block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING) + BlockDescriptor& block_descriptor = DERIVED_BLOCK::selfBlockDescriptor(); + if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { ParamDescriptor param_descriptor(block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), NULL, @@ -1561,7 +1564,7 @@ namespace LLInitParam typedef Deprecated Ignored; protected: - static BlockDescriptor& blockDescriptor() + static BlockDescriptor& selfBlockDescriptor() { static BlockDescriptor sBlockDescriptor; return sBlockDescriptor; @@ -1574,6 +1577,13 @@ namespace LLInitParam public Param { public: + typedef enum e_value_age + { + OLDER_THAN_BLOCK, // mData.mValue needs to be refreshed from the block parameters + NEWER_THAN_BLOCK, // mData.mValue holds the authoritative value (which has been replicated to the block parameters via setBlockFromValue) + SAME_AS_BLOCK // mData.mValue is derived from the block parameters, which are authoritative + } EValueAge; + typedef BlockValue<T> self_t; typedef Block<TypedParam<T, TypeValues<T>, false> > block_t; typedef const T& value_const_ref_t; @@ -1582,9 +1592,9 @@ namespace LLInitParam BlockValue(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), - mData(value) + mData(value, NEWER_THAN_BLOCK) { - if (block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING) + if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING)) { ParamDescriptor param_descriptor(block_descriptor.mCurrentBlockPtr->getHandleFromParam(this), &mergeWith, @@ -1604,7 +1614,7 @@ namespace LLInitParam static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation) { - self_t& typed_param = static_cast<self_t&>(param); + DERIVED& typed_param = static_cast<DERIVED&>(param); // type to apply parse direct value T if (name_stack.first == name_stack.second) { @@ -1612,7 +1622,10 @@ namespace LLInitParam { typed_param.enclosingBlock().setLastChangedParam(param, true); typed_param.setProvided(true); - typed_param.mData.mLastParamVersion = typed_param.BaseBlock::getLastChangeVersion(); + typed_param.mData.clearKey(); + typed_param.mData.mValueAge = NEWER_THAN_BLOCK; + typed_param.setBlockFromValue(); + return true; } @@ -1628,7 +1641,9 @@ namespace LLInitParam typed_param.mData.setKey(name); typed_param.enclosingBlock().setLastChangedParam(param, true); typed_param.setProvided(true); - typed_param.mData.mLastParamVersion = typed_param.BaseBlock::getLastChangeVersion(); + typed_param.mData.mValueAge = NEWER_THAN_BLOCK; + typed_param.setBlockFromValue(); + return true; } } @@ -1703,16 +1718,18 @@ namespace LLInitParam bool isProvided() const { - // either param value provided directly or block is sufficiently filled in + if (!Param::getProvided()) return false; + + // block has an updated parameter // if cached value is stale, regenerate from params - if (Param::getProvided() && mData.mLastParamVersion < BaseBlock::getLastChangeVersion()) + if (mData.mValueAge == OLDER_THAN_BLOCK) { if (block_t::validateBlock(false)) { static_cast<const DERIVED*>(this)->setValueFromBlock(); // clear stale keyword associated with old value mData.clearKey(); - mData.mLastParamVersion = BaseBlock::getLastChangeVersion(); + mData.mValueAge = SAME_AS_BLOCK; return true; } else @@ -1722,8 +1739,11 @@ namespace LLInitParam return false; } } - // either no data provided, or we have a valid value in hand - return Param::getProvided(); + else + { + // we have a valid value in hand + return true; + } } void set(value_assignment_t val, bool flag_as_provided = true) @@ -1731,7 +1751,7 @@ namespace LLInitParam Param::enclosingBlock().setLastChangedParam(*this, flag_as_provided); // set param version number to be up to date, so we ignore block contents - mData.mLastParamVersion = BaseBlock::getLastChangeVersion(); + mData.mValueAge = NEWER_THAN_BLOCK; mData.mValue = val; mData.clearKey(); @@ -1756,6 +1776,8 @@ namespace LLInitParam if (user_provided) { setProvided(true); // some component provided + // a parameter changed, so our value is out of date + mData.mValueAge = OLDER_THAN_BLOCK; } } @@ -1763,54 +1785,54 @@ namespace LLInitParam value_assignment_t get() const { // if some parameters were provided, issue warnings on invalid blocks - if (Param::getProvided() && (mData.mLastParamVersion < BaseBlock::getLastChangeVersion())) + if (Param::getProvided() && (mData.mValueAge == OLDER_THAN_BLOCK)) { // go ahead and issue warnings at this point if any param is invalid if(block_t::validateBlock(true)) { static_cast<const DERIVED*>(this)->setValueFromBlock(); mData.clearKey(); - mData.mLastParamVersion = BaseBlock::getLastChangeVersion(); + mData.mValueAge = SAME_AS_BLOCK; } } return mData.mValue; } - // mutable to allow lazy updates on get + struct Data : public key_cache_t { - Data(const T& value) + Data(const T& value, EValueAge age) : mValue(value), - mLastParamVersion(0) + mValueAge(age) {} - T mValue; - S32 mLastParamVersion; + T mValue; + EValueAge mValueAge; }; + // mutable to allow lazy updates on get mutable Data mData; private: static bool mergeWith(Param& dst, const Param& src, bool overwrite) { - const self_t& src_typed_param = static_cast<const self_t&>(src); - self_t& dst_typed_param = static_cast<self_t&>(dst); + const DERIVED& src_typed_param = static_cast<const DERIVED&>(src); + DERIVED& dst_typed_param = static_cast<DERIVED&>(dst); if (src_typed_param.isProvided() && (overwrite || !dst_typed_param.isProvided())) { - // assign individual parameters - dst_typed_param.BaseBlock::merge(block_t::blockDescriptor(), src_typed_param, overwrite); - - // then copy actual value - dst_typed_param.mData.mValue = src_typed_param.get(); - dst_typed_param.mData.clearKey(); - dst_typed_param.setProvided(true); - - // Propagate value back to block params since the value was updated during this merge. - // This will result in mData.mValue and the block params being in sync. - static_cast<DERIVED&>(dst_typed_param).setBlockFromValue(); + if (src_typed_param.mData.mValueAge == NEWER_THAN_BLOCK) + { + // copy value over + dst_typed_param.set(src_typed_param.get()); + } + else + { + // merge individual parameters into destination + dst_typed_param.merge(block_t::selfBlockDescriptor(), src_typed_param, overwrite); + } return true; } return false; diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 47766a24cb..0cd6e48d14 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -297,11 +297,17 @@ private: // append details to agent string LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent ); + // TODO: Remove this ifdef when the Linux version of llqtwebkit gets updated with the new WOB constant. +#if !LL_LINUX + // Set up window open behavior + LLQtWebKit::getInstance()->setWindowOpenBehavior(mBrowserWindowId, LLQtWebKit::WOB_SIMULATE_BLANK_HREF_CLICK); +#endif + #if !LL_QTWEBKIT_USES_PIXMAPS // don't flip bitmap LLQtWebKit::getInstance()->flipWindow( mBrowserWindowId, true ); #endif // !LL_QTWEBKIT_USES_PIXMAPS - + // set background color // convert background color channels from [0.0, 1.0] to [0, 255]; LLQtWebKit::getInstance()->setBackgroundColor( mBrowserWindowId, int(mBackgroundR * 255.0f), int(mBackgroundG * 255.0f), int(mBackgroundB * 255.0f) ); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a1e3b679ee..9ba44e787b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -7,6 +7,7 @@ include(Boost) include(BuildVersion) include(DBusGlib) include(DirectX) +include(OpenSSL) include(DragDrop) include(ELFIO) include(FMOD) @@ -90,6 +91,7 @@ set(viewer_SOURCE_FILES llbottomtray.cpp llbox.cpp llbreadcrumbview.cpp + llbuycurrencyhtml.cpp llcallbacklist.cpp llcallfloater.cpp llcallingcard.cpp @@ -158,10 +160,10 @@ set(viewer_SOURCE_FILES llfloaterbuy.cpp llfloaterbuycontents.cpp llfloaterbuycurrency.cpp + llfloaterbuycurrencyhtml.cpp llfloaterbuyland.cpp llfloatercamera.cpp llfloatercolorpicker.cpp - llfloatercustomize.cpp llfloaterdaycycle.cpp llfloaterenvsettings.cpp llfloaterevent.cpp @@ -223,6 +225,7 @@ set(viewer_SOURCE_FILES llfollowcam.cpp llfriendcard.cpp llgesturemgr.cpp + llgiveinventory.cpp llglsandbox.cpp llgroupactions.cpp llgroupiconctrl.cpp @@ -254,6 +257,7 @@ set(viewer_SOURCE_FILES llinventoryclipboard.cpp llinventoryfilter.cpp llinventoryfunctions.cpp + llinventoryicon.cpp llinventoryitemslist.cpp llinventorymodel.cpp llinventorymodelbackgroundfetch.cpp @@ -263,6 +267,7 @@ set(viewer_SOURCE_FILES lllandmarkactions.cpp lllandmarklist.cpp lllistbrowser.cpp + lllistcontextmenu.cpp lllistview.cpp lllocaltextureobject.cpp lllocationhistory.cpp @@ -270,6 +275,7 @@ set(viewer_SOURCE_FILES lllogchat.cpp llloginhandler.cpp lllogininstance.cpp + llmachineid.cpp llmanip.cpp llmaniprotate.cpp llmanipscale.cpp @@ -373,11 +379,14 @@ set(viewer_SOURCE_FILES llregionposition.cpp llremoteparcelrequest.cpp llsavedsettingsglue.cpp + llsaveoutfitcombobtn.cpp llscreenchannel.cpp llscriptfloater.cpp llscrollingpanelparam.cpp llsearchcombobox.cpp llsearchhistory.cpp + llsecapi.cpp + llsechandler_basic.cpp llselectmgr.cpp llsidepanelappearance.cpp llsidepanelinventory.cpp @@ -417,7 +426,6 @@ set(viewer_SOURCE_FILES lltexturestats.cpp lltexturestatsuploader.cpp lltextureview.cpp - lltextutil.cpp lltoast.cpp lltoastalertpanel.cpp lltoastgroupnotifypanel.cpp @@ -452,7 +460,6 @@ set(viewer_SOURCE_FILES llurldispatcherlistener.cpp llurlhistory.cpp llurllineeditorctrl.cpp - llurlsimstring.cpp llurlwhitelist.cpp llvectorperfoptions.cpp llversioninfo.cpp @@ -520,6 +527,7 @@ set(viewer_SOURCE_FILES llvoicechannel.cpp llvoiceclient.cpp llvoicevisualizer.cpp + llvoicevivox.cpp llvoinventorylistener.cpp llvopartgroup.cpp llvosky.cpp @@ -533,9 +541,9 @@ set(viewer_SOURCE_FILES llwaterparammanager.cpp llwaterparamset.cpp llwearable.cpp - llwearabledictionary.cpp llwearableitemslist.cpp llwearablelist.cpp + llwearabletype.cpp llweb.cpp llwind.cpp llwlanimator.cpp @@ -600,6 +608,7 @@ set(viewer_HEADER_FILES llbottomtray.h llbox.h llbreadcrumbview.h + llbuycurrencyhtml.h llcallbacklist.h llcallfloater.h llcallingcard.h @@ -670,10 +679,10 @@ set(viewer_HEADER_FILES llfloaterbuy.h llfloaterbuycontents.h llfloaterbuycurrency.h + llfloaterbuycurrencyhtml.h llfloaterbuyland.h llfloatercamera.h llfloatercolorpicker.h - llfloatercustomize.h llfloaterdaycycle.h llfloaterenvsettings.h llfloaterevent.h @@ -736,6 +745,7 @@ set(viewer_HEADER_FILES llfollowcam.h llfriendcard.h llgesturemgr.h + llgiveinventory.h llgroupactions.h llgroupiconctrl.h llgrouplist.h @@ -765,6 +775,7 @@ set(viewer_HEADER_FILES llinventoryclipboard.h llinventoryfilter.h llinventoryfunctions.h + llinventoryicon.h llinventoryitemslist.h llinventorymodel.h llinventorymodelbackgroundfetch.h @@ -775,6 +786,7 @@ set(viewer_HEADER_FILES lllandmarklist.h lllightconstants.h lllistbrowser.h + lllistcontextmenu.h lllistview.h lllocaltextureobject.h lllocationhistory.h @@ -782,6 +794,7 @@ set(viewer_HEADER_FILES lllogchat.h llloginhandler.h lllogininstance.h + llmachineid.h llmanip.h llmaniprotate.h llmanipscale.h @@ -882,11 +895,14 @@ set(viewer_HEADER_FILES llresourcedata.h llrootview.h llsavedsettingsglue.h + llsaveoutfitcombobtn.h llscreenchannel.h llscriptfloater.h llscrollingpanelparam.h llsearchcombobox.h llsearchhistory.h + llsecapi.h + llsechandler_basic.h llselectmgr.h llsidepanelappearance.h llsidepanelinventory.h @@ -927,7 +943,6 @@ set(viewer_HEADER_FILES lltexturestats.h lltexturestatsuploader.h lltextureview.h - lltextutil.h lltoast.h lltoastalertpanel.h lltoastgroupnotifypanel.h @@ -963,7 +978,6 @@ set(viewer_HEADER_FILES llurldispatcherlistener.h llurlhistory.h llurllineeditorctrl.h - llurlsimstring.h llurlwhitelist.h llvectorperfoptions.h llversioninfo.h @@ -1028,6 +1042,7 @@ set(viewer_HEADER_FILES llvoicechannel.h llvoiceclient.h llvoicevisualizer.h + llvoicevivox.h llvoinventorylistener.h llvopartgroup.h llvosky.h @@ -1042,9 +1057,9 @@ set(viewer_HEADER_FILES llwaterparammanager.h llwaterparamset.h llwearable.h - llwearabledictionary.h llwearableitemslist.h llwearablelist.h + llwearabletype.h llweb.h llwind.h llwindebug.h @@ -1422,8 +1437,8 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll ${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll ) - endif(USE_GOOGLE_PERFTOOLS) - + endif(USE_GOOGLE_PERFTOOLS) + set(COPY_INPUT_DEPENDENCIES # The following commented dependencies are determined at variably at build time. Can't do this here. @@ -1640,6 +1655,8 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${WINDOWS_LIBRARIES} ${XMLRPCEPI_LIBRARIES} ${ELFIO_LIBRARIES} + ${OPENSSL_LIBRARIES} + ${CRYPTO_LIBRARIES} ${LLLOGIN_LIBRARIES} ${GOOGLE_PERFTOOLS_LIBRARIES} ) @@ -1816,6 +1833,43 @@ if (LL_TESTS) "${CMAKE_SOURCE_DIR}/llmessage/tests/test_llsdmessage_peer.py" ) + set(test_libs + ${LLMESSAGE_LIBRARIES} + ${WINDOWS_LIBRARIES} + ${LLVFS_LIBRARIES} + ${LLMATH_LIBRARIES} + ${LLCOMMON_LIBRARIES} + ${GOOGLEMOCK_LIBRARIES} + ${OPENSSL_LIBRARIES} + ${CRYPTO_LIBRARIES} + ) + + LL_ADD_INTEGRATION_TEST(llsechandler_basic + llsechandler_basic.cpp + "${test_libs}" + ) + + LL_ADD_INTEGRATION_TEST(llsecapi + llsecapi.cpp + "${test_libs}" + ) + + set(llslurl_test_sources + llslurl.cpp + llviewernetwork.cpp + ) + + + LL_ADD_INTEGRATION_TEST(llslurl + "${llslurl_test_sources}" + "${test_libs}" + ) + + LL_ADD_INTEGRATION_TEST(llviewernetwork + llviewernetwork.cpp + "${test_libs}" + ) + #ADD_VIEWER_BUILD_TEST(llmemoryview viewer) #ADD_VIEWER_BUILD_TEST(llagentaccess viewer) #ADD_VIEWER_BUILD_TEST(llworldmap viewer) @@ -1823,6 +1877,7 @@ if (LL_TESTS) #ADD_VIEWER_BUILD_TEST(lltextureinfo viewer) #ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer) #ADD_VIEWER_BUILD_TEST(lltexturestatsuploader viewer) + endif (LL_TESTS) diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index a7241cac89..fa2adac10c 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -18,6 +18,33 @@ <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> + <key>CFBundleDocumentTypes</key> + <array> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>slurl</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>seconlife</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/x-grid-location-info</string> + </array> + <key>CFBundleTypeName</key> + <string>Secondlife SLURL</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>SLRL</string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSTypeIsPackage</key> + <true/> + <key>NSDocumentClass</key> + <string>SecondLifeSLURL</string> + </dict> + </array> <key>CFBundleURLTypes</key> <array> <dict> @@ -26,6 +53,7 @@ <key>CFBundleURLSchemes</key> <array> <string>secondlife</string> + <string>x-grid-location-info</string> </array> <key>LSIsAppleDefaultForScheme</key> <true/> diff --git a/indra/newview/app_settings/CA.pem b/indra/newview/app_settings/CA.pem index b14e7346ad..e68e2b6ce6 100644 --- a/indra/newview/app_settings/CA.pem +++ b/indra/newview/app_settings/CA.pem @@ -26,1489 +26,1464 @@ t79enKNHEA2fupH3vEigf5Eh4bVAN5VohrTm6MY53x7XQZZr1ME7a55lFEnSeT0u mlOAjR2mAbvSM5X5oSZNrmetdzyTj2flCM8CC7MLab0kkdngRIlUBGHF1/S5nmPb K+9A46sd33oqK8n8 -----END CERTIFICATE----- + +-----BEGIN CERTIFICATE----- +MIIDtTCCAp2gAwIBAgIRANAeQJAAAEZSAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAw +gYkxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJEQzETMBEGA1UEBxMKV2FzaGluZ3Rv +bjEXMBUGA1UEChMOQUJBLkVDT00sIElOQy4xGTAXBgNVBAMTEEFCQS5FQ09NIFJv +b3QgQ0ExJDAiBgkqhkiG9w0BCQEWFWFkbWluQGRpZ3NpZ3RydXN0LmNvbTAeFw05 +OTA3MTIxNzMzNTNaFw0wOTA3MDkxNzMzNTNaMIGJMQswCQYDVQQGEwJVUzELMAkG +A1UECBMCREMxE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RuidDV29rs4prWPVVRaAMCf/ -drr3uNZK49m1+VLQTkCpx+XCMseqdiThawVQ68W/ClTluUI8JPu3B5wwn3la -5uBAUhX0/Kr0VvlEl4ftDmVyXr4m+02kLQgH3thcoNyBM5kYJRF3p+v9WAks -mWsbivNSPxpNSGDxoPYzAlOL7SUJuA0t7Zdz7NeWH45gDtoQmy8YJPamTQr5 -O8t1wswvziRpyQoijlmn94IM19drNZxDAGrElWe6nEXLuA4399xOAU++CrYD -062KRffaJ00psUjf5BHklka9bAI+1lHIlRcBFanyqqryvy9lG2/QuRqT9Y41 -xICHPpQvZuTpqP9BnHAqTyo5GJUefvthATxRCC4oGKQWDzH9OmwjkyB24f0H -hdFbP9IcczLd+rn4jM8Ch3qaluTtT4mNU0OrDhPAARW0eTjb/G49nlG2uBOL -Z8/5fNkiHfZdxRwBL5joeiQYvITX+txyW/fBOmg= ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJT -RTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4 -dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5h -bCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzEL -MAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1B -ZGRUcnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1 -c3QgRXh0ZXJuYWwgQ0EgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBALf3GjPm8gAELTngTlvtH7xsD821+iO2zt6bETOXpClMfZOfvUq8 -k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfwTz/oMp50 -ysiQVOnGXw94n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-LztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3rGwnpXtlR22ciYaQqPEh3 -46B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l93PR2VX2bY1QY6fDq -81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0PlZPvy5TYnh+d -XIVtx6quTx8itc2VrbqnzPmrC3p/ ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgw -FgYDVQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRy -dXN0IFJvb3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQsw -CQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQD -ExNHVEUgQ3liZXJUcnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB -iQKBgQC45k+625h8cXyvRLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8K -DPufpz+iCWaEVh43KRuH6X4MypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPw -KfWVWgkWYXcKIiXUT0Wqx73llt/51KiOQswkwB6RJ0q1bQaAYznEol44AwID -AQABMA0GCSqGSIb3DQEBBAUAA4GBABKzdcZfHeFhVYAA1IFLezEPI2PnPfMD -+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWlIjeaY8JIILTbcuPI9tl8vrGv -U9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9ApybW1EDp3zdHSo1TRJ6V6e -6bR64eVaH4QwnNOfpSXY ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYT -AlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJ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NacOzDq28Bb +J1zTcwfBwvNMm2+fG8oeqqg4MwlYsq78B+g23FW6L09A/nq9BqaBwZMifIYRCgZ3 +SK41ty8ymmFei74pnykkiFY5LKjSq5YDWtRIn7lAhAuYaPsBQ9Yb4gmxlxw= +-----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJC TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0 @@ -1545,74 +1520,89 @@ SnQ2+Q== -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- -MIIETzCCAzegAwIBAgIEO63vKTANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJQTDEfMB0GA1UE -ChMWVFAgSW50ZXJuZXQgU3AuIHogby5vLjEkMCIGA1UECxMbQ2VudHJ1bSBDZXJ0eWZpa2Fjamkg -U2lnbmV0MRswGQYDVQQDExJDQyBTaWduZXQgLSBSb290Q0EwHhcNMDEwOTIzMTQxODE3WhcNMTEw -OTIzMTMxODE3WjB1MQswCQYDVQQGEwJQTDEfMB0GA1UEChMWVFAgSW50ZXJuZXQgU3AuIHogby5v -LjEkMCIGA1UECxMbQ2VudHJ1bSBDZXJ0eWZpa2FjamkgU2lnbmV0MR8wHQYDVQQDExZDQyBTaWdu -ZXQgLSBDQSBLbGFzYSAxMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4SRW9Q58g5DY1Hw7h -gCRKBEdPdGn0MFHsfw7rlu/oQm7IChI/uWd9q5wwo77YojtTDjRnpgZsjqBeynX8T90vFILqsY2K -5CF1OESalwvVr3sZiQX79lisuFKat92u6hBFikFIVxfHHB67Af+g7u0dEHdDW7lwy81MwFYxBTRy -9wIDAQABo4IBbTCCAWkwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwggEEBgNVHSAE -gfwwgfkwgfYGDSsGAQQBv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Q0PlJuTANBgkqhkiG9w0BAQUFAAOCAQEAldt/svO5c1MU +08FKgrOXCGEbEPbQxhpM0xcd6Iv3dCo6qugEgjEs9Qm5CwUNKMnFsvR27cJWUvZb +MVcvwlwCwclOdwF6u/QRS8bC2HYErhYo9bp9yuxxzuow2A94c5fPqfVrjXy+vDou +chAm6+A5WjzvJ8wxVFDCs+9iGACmyUWr/JGXCYiQIbQkwlkRKHHlan9ymKf1NvIe +j/3EpeT8fKr6ywxGuhAfqofWpg3WJY/RCB4lTzD8vZGNwfMFGkWhJkypad3i9w3l +GmDVpsHaWtCgGfd0H7tUtWPkP+t7EjIRCD9JHYnTR+wbbewc5vOI+UobR15ynGfF +IaSIiMTVtQ== -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- MIIEejCCA2KgAwIBAgIEP4vk6TANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQGEwJQ TDEfMB0GA1UEChMWVFAgSW50ZXJuZXQgU3AuIHogby5vLjEkMCIGA1UECxMbQ2Vu @@ -1639,6 +1629,7 @@ iCNe431axGNDWKnpuj2KUpj4CFHYsWCXky847YtTXDjri9NIwJJauazsrSjK+oXp ngRS506mdQ7vWrtApkh8zhhWp7duCkjcCo1O8JxqYr2qEW1fXmgOISe010v2mmuv hHxPyVwoAU4KkOw0nbXZn53yak0is5+XmAjh0wWue44AssHrjC9nUh3mkLt6eQ== -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- MIIEezCCA2OgAwIBAgIEP4vnLzANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJQ TDEfMB0GA1UEChMWVFAgSW50ZXJuZXQgU3AuIHogby5vLjEfMB0GA1UEAxMWQ0Mg @@ -1665,100 +1656,123 @@ upyWls1BmYUxB91R7QkTiAUSNZ87s3auhZuG4f0V0JLVCcg2rn7AN1rfMkgxCbHk GxiQbYWFljl6aatxR3odnnzVUe1I8uoY2JXpmmUcOG4dNGuQYziyKG3mtXCQWvug 5qi9Mf3KUh1oSTKx6HfL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uNs8ckRZqnrG0AFFoEt7oT61EKmEFB +Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3 +hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg +EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF +MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA +FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec +nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z +eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF +hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2 +Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe +vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep ++OkuE6N36B9K +-----END CERTIFICATE----- diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 0805e94b10..263b73ba23 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -497,6 +497,7 @@ PARCEL_DETAILS_DESC Used with llGetParcelDetails to get the parcel description. PARCEL_DETAILS_OWNER Used with llGetParcelDetails to get the parcel owner id. PARCEL_DETAILS_GROUP Used with llGetParcelDetails to get the parcel group id. PARCEL_DETAILS_AREA Used with llGetParcelDetails to get the parcel area in square meters. +PARCEL_DETAILS_ID Used with llGetParcelDetails to get the parcel id. STRING_TRIM_HEAD Used with llStringTrim to trim leading spaces from a string. STRING_TRIM_TAIL Used with llStringTrim to trim trailing spaces from a string. diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index d7bb64ce8a..16e39fc1c4 100644 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -25,6 +25,7 @@ <string>AppCache</string> <string>Window</string> <string>RenderInit</string> + <string>MediaAuth</string> </array> </map> <map> diff --git a/indra/newview/app_settings/low_graphics.xml b/indra/newview/app_settings/low_graphics.xml index 3f67a70d7a..d02a13a671 100644 --- a/indra/newview/app_settings/low_graphics.xml +++ b/indra/newview/app_settings/low_graphics.xml @@ -4,6 +4,8 @@ <RenderAvatarCloth value="FALSE"/> <!--Default for now--> <RenderAvatarLODFactor value="0.5"/> + <!--Default for now--> + <RenderAvatarMaxVisible value="3"/> <!--NO SHADERS--> <RenderAvatarVP value="FALSE"/> <!--Short Range--> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d689822e4e..c0be54a105 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -574,6 +574,17 @@ <key>Value</key> <integer>2</integer> </map> + <key>AvatarBakedTextureTimeout</key> + <map> + <key>Comment</key> + <string>Specifes the maximum time in seconds to wait before sending your baked textures for avatar appearance. Set to 0 to disable and wait until all baked textures are at highest resolution.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>0</integer> + </map> <key>AvatarSex</key> <map> <key>Comment</key> @@ -1265,6 +1276,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>CertStore</key> + <map> + <key>Comment</key> + <string>Specifies the Certificate Store for certificate trust verification</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>default</string> + </map> <key>ChatBarStealsFocus</key> <map> <key>Comment</key> @@ -1586,6 +1608,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>ChatBarCustomWidth</key> + <map> + <key>Comment</key> + <string>Stores customized width of chat bar.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>0</integer> + </map> <key>CreateToolCopyCenters</key> <map> <key>Comment</key> @@ -1641,6 +1674,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>CurrentGrid</key> + <map> + <key>Comment</key> + <string>Currently Selected Grid</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string></string> + </map> <key>CustomServer</key> <map> <key>Comment</key> @@ -1652,6 +1696,17 @@ <key>Value</key> <string /> </map> + <key>DebugAvatarRezTime</key> + <map> + <key>Comment</key> + <string>Display times for avatars to resolve.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>DebugBeaconLineWidth</key> <map> <key>Comment</key> @@ -2367,6 +2422,29 @@ <key>Value</key> <integer>0</integer> </map> + <key>DefaultFemaleAvatar</key> + <map> + <key>Comment</key> + <string>Default Female Avatar</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>Female Shape & Outfit</string> + </map> + <key>DefaultMaleAvatar</key> + <map> + <key>Comment</key> + <string>Default Male Avatar</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>Male Shape & Outfit</string> + </map> + <key>DefaultObjectTexture</key> <map> <key>Comment</key> @@ -2620,6 +2698,17 @@ <key>Value</key> <integer>4</integer> </map> + <key>DumpVFSCaches</key> + <map> + <key>Comment</key> + <string>Dump VFS caches on startup.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>DynamicCameraStrength</key> <map> <key>Comment</key> @@ -3467,6 +3556,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>FullScreen</key> + <map> + <key>Comment</key> + <string>Run SL in fullscreen mode</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>FullScreenAspectRatio</key> <map> <key>Comment</key> @@ -3511,6 +3611,17 @@ <key>Value</key> <integer>1024</integer> </map> + <key>GesturesMarketplaceURL</key> + <map> + <key>Comment</key> + <string>URL to the Gestures Marketplace</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>https://www.xstreetsl.com/modules.php?name=Marketplace&CategoryID=233</string> + </map> <key>GridCrossSections</key> <map> <key>Comment</key> @@ -3797,6 +3908,17 @@ <key>Value</key> <real>1.0</real> </map> + <key>InventoryLinking</key> + <map> + <key>Comment</key> + <string>Enable ability to create links to folders and items via "Paste as link".</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>InventorySortOrder</key> <map> <key>Comment</key> @@ -4061,6 +4183,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>LastGPUClass</key> + <map> + <key>Comment</key> + <string>[DO NOT MODIFY] previous GPU class for tracking hardware changes</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>-1</integer> + </map> <key>LastFeatureVersion</key> <map> <key>Comment</key> @@ -4425,6 +4558,17 @@ <key>Value</key> <real>128.0</real> </map> + <key>MapServerURL</key> + <map> + <key>Comment</key> + <string>World map URL template for locating map tiles</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://map.secondlife.com.s3.amazonaws.com/</string> + </map> <key>MapShowEvents</key> <map> <key>Comment</key> @@ -4491,6 +4635,17 @@ <key>Value</key> <string /> </map> + <key>MarketplaceURL</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string> + </map> <key>MaxDragDistance</key> <map> <key>Comment</key> @@ -5860,7 +6015,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.2</real> + <real>0.125</real> </map> <key>MediaRollOffMin</key> <map> @@ -5871,7 +6026,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>7.0</real> + <real>5.0</real> </map> <key>MediaRollOffMax</key> <map> @@ -5917,6 +6072,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>QuickBuyCurrency</key> + <map> + <key>Comment</key> + <string>Toggle between HTML based currency purchase floater and legacy XUI version</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>RegionTextureSize</key> <map> <key>Comment</key> @@ -7754,6 +7920,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>SecondLifeEnterprise</key> + <map> + <key>Comment</key> + <string>Enables Second Life Enterprise features</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>SelectMovableOnly</key> <map> <key>Comment</key> @@ -7930,6 +8107,28 @@ <key>Value</key> <integer>1</integer> </map> + <key>ShowBuildButton</key> + <map> + <key>Comment</key> + <string>Shows/Hides Build button in the bottom tray.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ShowCameraButton</key> + <map> + <key>Comment</key> + <string>Show/Hide View button in the bottom tray.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>ShowConsoleWindow</key> <map> <key>Comment</key> @@ -7963,6 +8162,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>ShowBetaGrids</key> + <map> + <key>Comment</key> + <string>Display the beta grids in the grid selection control.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>ShowCrosshairs</key> <map> <key>Comment</key> @@ -7996,6 +8206,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>ShowGestureButton</key> + <map> + <key>Comment</key> + <string>Shows/Hides Gesture button in the bottom tray.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>ShowHoverTips</key> <map> <key>Comment</key> @@ -8018,16 +8239,27 @@ <key>Value</key> <integer>0</integer> </map> - <key>ShowCameraButton</key> + <key>ShowMiniMapButton</key> <map> <key>Comment</key> - <string>Show/Hide Camera button in the bottom tray</string> + <string>Shows/Hides Mini-Map button in the bottom tray.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> + </map> + <key>ShowMoveButton</key> + <map> + <key>Comment</key> + <string>Shows/Hides Move button in the bottom tray.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> </map> <key>ShowScriptErrors</key> <map> @@ -8049,40 +8281,40 @@ <key>Type</key> <string>S32</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> - <key>ShowSnapshotButton</key> + <key>ShowSearchButton</key> <map> <key>Comment</key> - <string>Show/Hide Snapshot button button in the bottom tray</string> + <string>Shows/Hides Search button in the bottom tray.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> - <key>ShowMoveButton</key> + <key>ShowSidebarButton</key> <map> <key>Comment</key> - <string>Show/Hide Move button in the bottom tray</string> + <string>Shows/hides Sidebar button in the bottom tray.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> - </map> - <key>ShowGestureButton</key> + <integer>0</integer> + </map> + <key>ShowSnapshotButton</key> <map> <key>Comment</key> - <string>Show/Hide Gesture button in the bottom tray</string> + <string>Shows/Hides Snapshot button button in the bottom tray.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>1</integer> </map> <key>ShowObjectRenderingCost</key> <map> @@ -8117,6 +8349,28 @@ <key>Value</key> <integer>1</integer> </map> + <key>ShowWorldMapButton</key> + <map> + <key>Comment</key> + <string>Shows/Hides Map button in the bottom tray.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>SidebarCameraMovement</key> + <map> + <key>Comment</key> + <string>Reflects world rect changing while changing sidebar visibility.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>GroupListShowIcons</key> <map> <key>Comment</key> @@ -8593,6 +8847,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>SidebarWithButtonsVisibility</key> + <map> + <key>Comment</key> + <string>Sets visibility of sidebar with its tabs' buttons</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>SkinCurrent</key> <map> <key>Comment</key> @@ -8931,6 +9196,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>TextureDiscardLevel</key> + <map> + <key>Comment</key> + <string>Specify texture resolution (0 = highest, 5 = lowest)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>0</integer> + </map> <key>TextureLoadFullRes</key> <map> <key>Comment</key> @@ -10218,7 +10494,17 @@ <key>Value</key> <real>10.0</real> </map> - + <key>UseNewWalkRun</key> + <map> + <key>Comment</key> + <string>Replace standard walk/run animations with new ones.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>UseStartScreen</key> <map> <key>Comment</key> @@ -10418,6 +10704,17 @@ <key>Value</key> <string></string> </map> + <key>VivoxDebugSIPURIHostName</key> + <map> + <key>Comment</key> + <string>Hostname portion of vivox SIP URIs (empty string for the default).</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string></string> + </map> <key>VivoxDebugVoiceAccountServerURI</key> <map> <key>Comment</key> @@ -10429,6 +10726,28 @@ <key>Value</key> <string></string> </map> + <key>VivoxVoiceHost</key> + <map> + <key>Comment</key> + <string>Client SLVoice host to connect to</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>127.0.0.1</string> + </map> + <key>VivoxVoicePort</key> + <map> + <key>Comment</key> + <string>Client SLVoice port to connect to</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>44125</integer> + </map> <key>VoiceCallsFriendsOnly</key> <map> <key>Comment</key> @@ -10561,6 +10880,17 @@ <key>Value</key> <string>Default</string> </map> + <key>VoiceLogFile</key> + <map> + <key>Comment</key> + <string>Log file to use when launching the voice daemon</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string></string> + </map> <key>VoiceOutputAudioDevice</key> <map> <key>Comment</key> @@ -10605,6 +10935,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>VoiceServerType</key> + <map> + <key>Comment</key> + <string>The type of voice server to connect to.</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>vivox</string> + </map> <key>WLSkyDetail</key> <map> <key>Comment</key> @@ -10704,17 +11045,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>WindowFullScreen</key> - <map> - <key>Comment</key> - <string>Run SL in fullscreen mode</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>WindowHeight</key> <map> <key>Comment</key> @@ -11040,5 +11370,19 @@ <key>Value</key> <integer>178</integer> </map> + <key>always_showable_floaters</key> + <map> + <key>Comment</key> + <string>Floaters that can be shown despite mouselook mode</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>LLSD</string> + <key>Value</key> + <array> + <string>snapshot</string> + <string>mini_map</string> + </array> + </map> </map> </llsd> diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index 448e20b382..5efd997ab7 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -6623,6 +6623,60 @@ render_pass="bump"> name="head_tattoo"> <texture local_texture="head_tattoo" /> + <param + id="1062" + group="1" + edit_group="colorpicker_driven" + wearable="tattoo" + name="tattoo_head_red" + value_min="0" + value_max="1" + value_default="1"> + <param_color> + <value + color="0, 0, 0, 255" /> + + <value + color="255, 0, 0, 255" /> + </param_color> + </param> + + <param + id="1063" + group="1" + edit_group="colorpicker_driven" + wearable="tattoo" + name="tattoo_head_green" + value_min="0" + value_max="1" + value_default="1"> + <param_color> + <value + color="0, 0, 0, 255" /> + + <value + color="0, 255, 0, 255" /> + </param_color> + </param> + + <param + id="1064" + group="1" + edit_group="colorpicker_driven" + wearable="tattoo" + name="tattoo_head_blue" + value_min="0" + value_max="1" + value_default="1"> + <param_color> + <value + color="0, 0, 0, 255" /> + + <value + color="0, 0, 255, 255" /> + </param_color> + </param> + </layer> @@ -6745,6 +6799,61 @@ render_pass="bump"> name="upper_tattoo"> <texture local_texture="upper_tattoo" /> + + <param + id="1065" + group="1" + edit_group="colorpicker_driven" + wearable="tattoo" + name="tattoo_upper_red" + value_min="0" + value_max="1" + value_default="1"> + <param_color> + <value + color="0, 0, 0, 255" /> + + <value + color="255, 0, 0, 255" /> + </param_color> + </param> + + <param + id="1066" + group="1" + edit_group="colorpicker_driven" + wearable="tattoo" + name="tattoo_upper_green" + value_min="0" + value_max="1" + value_default="1"> + <param_color> + <value + color="0, 0, 0, 255" /> + + <value + color="0, 255, 0, 255" /> + </param_color> + </param> + + <param + id="1067" + group="1" + edit_group="colorpicker_driven" + wearable="tattoo" + name="tattoo_upper_blue" + value_min="0" + value_max="1" + value_default="1"> + <param_color> + <value + color="0, 0, 0, 255" /> + + <value + color="0, 0, 255, 255" /> + </param_color> + </param> + </layer> @@ -7942,6 +8051,61 @@ render_pass="bump"> name="lower_tattoo"> <texture local_texture="lower_tattoo" /> + + <param + id="1068" + group="1" + edit_group="colorpicker_driven" + wearable="tattoo" + name="tattoo_lower_red" + value_min="0" + value_max="1" + value_default="1"> + <param_color> + <value + color="0, 0, 0, 255" /> + + <value + color="255, 0, 0, 255" /> + </param_color> + </param> + + <param + id="1069" + group="1" + edit_group="colorpicker_driven" + wearable="tattoo" + name="tattoo_lower_green" + value_min="0" + value_max="1" + value_default="1"> + <param_color> + <value + color="0, 0, 0, 255" /> + + <value + color="0, 255, 0, 255" /> + </param_color> + </param> + + <param + id="1070" + group="1" + edit_group="colorpicker_driven" + wearable="tattoo" + name="tattoo_lower_blue" + value_min="0" + value_max="1" + value_default="1"> + <param_color> + <value + color="0, 0, 0, 255" /> + + <value + color="0, 0, 255, 255" /> + </param_color> + </param> + </layer> <layer @@ -11367,6 +11531,106 @@ render_pass="bump"> </param_driver> </param> + <param + id="1071" + group="0" + wearable="tattoo" + edit_group="colorpicker" + name="tattoo_red" + value_min="0" + value_max="1" + value_default="1"> + <param_driver> + <driven + id="1062" + min1="0" + max1="1" + max2="1" + min2="1" /> + + <driven + id="1065" + min1="0" + max1="1" + max2="1" + min2="1" /> + + <driven + id="1068" + min1="0" + max1="1" + max2="1" + min2="1" /> + </param_driver> + </param> + + <param + id="1072" + group="0" + wearable="tattoo" + edit_group="colorpicker" + name="tattoo_green" + value_min="0" + value_max="1" + value_default="1"> + <param_driver> + <driven + id="1063" + min1="0" + max1="1" + max2="1" + min2="1" /> + + <driven + id="1066" + min1="0" + max1="1" + max2="1" + min2="1" /> + + <driven + id="1069" + min1="0" + max1="1" + max2="1" + min2="1" /> + </param_driver> + </param> + + <param + id="1073" + group="0" + wearable="tattoo" + edit_group="colorpicker" + name="tattoo_blue" + value_min="0" + value_max="1" + value_default="1"> + <param_driver> + <driven + id="1064" + min1="0" + max1="1" + max2="1" + min2="1" /> + + <driven + id="1067" + min1="0" + max1="1" + max2="1" + min2="1" /> + + <driven + id="1070" + min1="0" + max1="1" + max2="1" + min2="1" /> + + </param_driver> + </param> + </driver_parameters> diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 4029bf95a0..b4add267fe 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -56,7 +56,7 @@ Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 RenderShaderLightingMaxLevel 1 3 - +SkyUseClassicClouds 1 1 // // Low Graphics Settings @@ -64,24 +64,26 @@ RenderShaderLightingMaxLevel 1 3 list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 -RenderAvatarLODFactor 1 0.5 +RenderAvatarLODFactor 1 0 +RenderAvatarMaxVisible 1 3 RenderAvatarVP 1 0 RenderFarClip 1 64 -RenderFlexTimeFactor 1 0.5 +RenderFlexTimeFactor 1 0 RenderGlowResolutionPow 1 8 RenderLightingDetail 1 0 -RenderMaxPartCount 1 1024 +RenderMaxPartCount 1 0 RenderObjectBump 1 0 RenderReflectionDetail 1 0 RenderTerrainDetail 1 0 RenderTerrainLODFactor 1 1 -RenderTreeLODFactor 1 0.5 +RenderTreeLODFactor 1 0 RenderUseImpostors 1 1 -RenderVolumeLODFactor 1 1.125 +RenderVolumeLODFactor 1 0 RenderWaterReflections 1 0 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 +SkyUseClassicClouds 1 0 // // Mid Graphics Settings @@ -296,28 +298,23 @@ RenderUseImpostors 0 0 list Intel_945GM RenderTerrainDetail 1 0 RenderVBOEnable 1 0 -RenderUseImpostors 0 0 list Intel_945G RenderTerrainDetail 1 0 RenderVBOEnable 1 0 -RenderUseImpostors 0 0 list Intel_950 RenderTerrainDetail 1 0 RenderVBOEnable 1 0 -RenderUseImpostors 0 0 list Intel_965 RenderTerrainDetail 1 0 RenderVBOEnable 1 0 UseOcclusion 0 0 -RenderUseImpostors 0 0 list Intel_G33 RenderTerrainDetail 1 0 RenderVBOEnable 1 0 -RenderUseImpostors 0 0 list Intel_G45 WindLightUseAtmosShaders 0 0 diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 61a8e51c50..4fb529ab39 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -55,6 +55,7 @@ WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 +SkyUseClassicClouds 1 1 // // Low Graphics Settings @@ -62,24 +63,26 @@ RenderTextureMemoryMultiple 1 1.0 list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 -RenderAvatarLODFactor 1 0.5 +RenderAvatarLODFactor 1 0 +RenderAvatarMaxVisible 1 3 RenderAvatarVP 1 0 RenderFarClip 1 64 -RenderFlexTimeFactor 1 0.5 +RenderFlexTimeFactor 1 0 RenderGlowResolutionPow 1 8 RenderLightingDetail 1 0 -RenderMaxPartCount 1 1024 +RenderMaxPartCount 1 0 RenderObjectBump 1 0 RenderReflectionDetail 1 0 RenderTerrainDetail 1 0 RenderTerrainLODFactor 1 1 -RenderTreeLODFactor 1 0.5 +RenderTreeLODFactor 1 0 RenderUseImpostors 1 1 -RenderVolumeLODFactor 1 1.125 +RenderVolumeLODFactor 1 0 RenderWaterReflections 1 0 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 +SkyUseClassicClouds 1 0 // // Mid Graphics Settings diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 12d47a904c..fbc589d3e7 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -57,6 +57,7 @@ Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 0.5 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 +SkyUseClassicClouds 1 1 // // Low Graphics Settings @@ -64,24 +65,26 @@ Disregard96DefaultDrawDistance 1 1 list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 -RenderAvatarLODFactor 1 0.5 +RenderAvatarLODFactor 1 0 +RenderAvatarMaxVisible 1 3 RenderAvatarVP 1 0 RenderFarClip 1 64 -RenderFlexTimeFactor 1 0.5 +RenderFlexTimeFactor 1 0 RenderGlowResolutionPow 1 8 RenderLightingDetail 1 0 -RenderMaxPartCount 1 1024 +RenderMaxPartCount 1 0 RenderObjectBump 1 0 RenderReflectionDetail 1 0 RenderTerrainDetail 1 0 RenderTerrainLODFactor 1 1 -RenderTreeLODFactor 1 0.5 +RenderTreeLODFactor 1 0 RenderUseImpostors 1 1 -RenderVolumeLODFactor 1 1.125 +RenderVolumeLODFactor 1 0 RenderWaterReflections 1 0 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 +SkyUseClassicClouds 1 0 // // Mid Graphics Settings diff --git a/indra/newview/featuretable_solaris.txt b/indra/newview/featuretable_solaris.txt index f24cbde5e2..6edd280686 100644 --- a/indra/newview/featuretable_solaris.txt +++ b/indra/newview/featuretable_solaris.txt @@ -117,6 +117,7 @@ UseOcclusion 0 0 list low RenderVBO 1 0 RenderAniso 1 0 +RenderAvatarMaxVisible 1 3 RenderLighting 1 0 list medium diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index aa0e21ea8f..5aad295cb1 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -70,43 +70,42 @@ ATI M56 .*ATI.*M56.* 1 1 ATI M71 .*ATI.*M71.* 1 1 ATI M72 .*ATI.*M72.* 1 1 ATI M76 .*ATI.*M76.* 3 1 -ATI Mobility Radeon 7xxx .*ATI.*Mobility.*Radeon 7.* 0 1 -ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1 -ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 0 1 -ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 0 1 -ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1 -ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD.*23.* 1 1 -ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD.*24.* 1 1 -ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD.*26.* 3 1 -ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD.*34.* 1 1 -ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD.*36.* 3 1 -ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD.*38.* 3 1 -ATI Mobility Radeon X1xxx .*ATI.*Mobility.*X1.* 0 1 -ATI Mobility Radeon X2xxx .*ATI.*Mobility.*X2.* 0 1 -ATI Mobility Radeon X3xx .*ATI.*Mobility.*X3.* 1 1 -ATI Mobility Radeon X6xx .*ATI.*Mobility.*X6.* 1 1 -ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1 1 -ATI Mobility Radeon Xxxx .*ATI.*Mobility.*X.* 0 1 -ATI Mobility Radeon .*ATI.*Mobility.* 0 1 -ATI Radeon HD 2300 .*ATI.*Radeon HD 23.* 0 1 -ATI Radeon HD 2400 .*ATI.*Radeon HD.*24.* 1 1 -ATI Radeon HD 2600 .*ATI.*Radeon HD 26.* 2 1 -ATI Radeon HD 2900 .*ATI.*Radeon HD 29.* 3 1 -ATI Radeon HD 3200 .*ATI.*Radeon.*HD.*32.* 1 1 -ATI Radeon HD 3300 .*ATI.*Radeon HD.*33.* 1 1 -ATI Radeon HD 3400 .*ATI.*Radeon HD.*34.* 1 1 -ATI Radeon HD 3600 .*ATI.*Radeon HD.*36.* 3 1 -ATI Radeon HD 3800 .*ATI.*Radeon HD.*38.* 3 1 -ATI Radeon HD 4200 .*ATI.*Radeon HD 42.* 1 1 -ATI Radeon HD 4300 .*ATI.*Radeon HD 43.* 1 1 -ATI Radeon HD 4500 .*ATI.*Radeon HD 45.* 3 1 -ATI Radeon HD 4600 .*ATI.*Radeon HD.*46.* 3 1 -ATI Radeon HD 4700 .*ATI.*Radeon HD 47.* 3 1 -ATI Radeon HD 4800 .*ATI.*Radeon.*HD.*48.* 3 1 -ATI Radeon HD 5600 .*ATI.*Radeon.*HD.*56.* 3 1 -ATI Radeon HD 5700 .*ATI.*Radeon.*HD.*57.* 3 1 -ATI Radeon HD 5800 .*ATI.*Radeon.*HD.*58.* 3 1 -ATI Radeon HD 5900 .*ATI.*Radeon.*HD.*59.* 3 1 +ATI Mobility Radeon 7xxx .*ATI.*Mobility *Radeon 7.* 0 1 +ATI Mobility Radeon 8xxx .*ATI.*Mobility *Radeon 8.* 0 1 +ATI Mobility Radeon 9800 .*ATI.*Mobility *98.* 0 1 +ATI Mobility Radeon 9700 .*ATI.*Mobility *97.* 0 1 +ATI Mobility Radeon 9600 .*ATI.*Mobility *96.* 0 1 +ATI Mobility Radeon HD 2300 .*ATI.*Mobility *HD *23.* 1 1 +ATI Mobility Radeon HD 2400 .*ATI.*Mobility *HD *24.* 1 1 +ATI Mobility Radeon HD 2600 .*ATI.*Mobility *HD *26.* 3 1 +ATI Mobility Radeon HD 3400 .*ATI.*Mobility *HD *34.* 1 1 +ATI Mobility Radeon HD 3600 .*ATI.*Mobility *HD *36.* 3 1 +ATI Mobility Radeon HD 3800 .*ATI.*Mobility *HD *38.* 3 1 +ATI Mobility Radeon X1xxx .*ATI.*Mobility *X1.* 0 1 +ATI Mobility Radeon X2xxx .*ATI.*Mobility *X2.* 0 1 +ATI Mobility Radeon X3xx .*ATI.*Mobility *X3.* 1 1 +ATI Mobility Radeon X6xx .*ATI.*Mobility *X6.* 1 1 +ATI Mobility Radeon X7xx .*ATI.*Mobility *X7.* 1 1 +ATI Mobility Radeon Xxxx .*ATI.*Mobility *X.* 0 1 +ATI Radeon HD 2300 .*ATI.*Radeon HD *23.* 0 1 +ATI Radeon HD 2400 .*ATI.*Radeon HD *24.* 1 1 +ATI Radeon HD 2600 .*ATI.*Radeon HD *26.* 2 1 +ATI Radeon HD 2900 .*ATI.*Radeon HD *29.* 3 1 +ATI Radeon HD 3200 .*ATI.*Radeon *HD *32.* 0 1 +ATI Radeon HD 3300 .*ATI.*Radeon HD *33.* 1 1 +ATI Radeon HD 3400 .*ATI.*Radeon HD *34.* 1 1 +ATI Radeon HD 3600 .*ATI.*Radeon HD *36.* 3 1 +ATI Radeon HD 3800 .*ATI.*Radeon HD *38.* 3 1 +ATI Radeon HD 4200 .*ATI.*Radeon HD *42.* 1 1 +ATI Radeon HD 4300 .*ATI.*Radeon HD *43.* 1 1 +ATI Radeon HD 4500 .*ATI.*Radeon HD *45.* 3 1 +ATI Radeon HD 4600 .*ATI.*Radeon HD *46.* 3 1 +ATI Radeon HD 4700 .*ATI.*Radeon HD *47.* 3 1 +ATI Radeon HD 4800 .*ATI.*Radeon.*HD *48.* 3 1 +ATI Radeon HD 5600 .*ATI.*Radeon.*HD *56.* 3 1 +ATI Radeon HD 5700 .*ATI.*Radeon.*HD *57.* 3 1 +ATI Radeon HD 5800 .*ATI.*Radeon.*HD *58.* 3 1 +ATI Radeon HD 5900 .*ATI.*Radeon.*HD *59.* 3 1 ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0 ATI Radeon 2100 .*ATI.*Radeon 21.* 0 1 ATI Radeon 3100 .*ATI.*Radeon 31.* 1 1 @@ -128,12 +127,12 @@ ATI Radeon VE .*ATI.*Radeon.*VE.* 0 0 ATI Radeon X1000 .*ATI.*Radeon *X10.* 0 1 ATI Radeon X1200 .*ATI.*Radeon *X12.* 0 1 ATI Radeon X1300 .*ATI.*Radeon *X13.* 1 1 -ATI Radeon X1400 .*ATI.*Radeon X14.* 1 1 -ATI Radeon X1500 .*ATI.*Radeon X15.* 1 1 +ATI Radeon X1400 .*ATI.*Radeon *X14.* 1 1 +ATI Radeon X1500 .*ATI.*Radeon *X15.* 1 1 ATI Radeon X1600 .*ATI.*Radeon *X16.* 1 1 -ATI Radeon X1700 .*ATI.*Radeon X17.* 1 1 -ATI Radeon X1800 .*ATI.*Radeon X18.* 3 1 -ATI Radeon X1900 .*ATI.*Radeon X19.* 3 1 +ATI Radeon X1700 .*ATI.*Radeon *X17.* 1 1 +ATI Radeon X1800 .*ATI.*Radeon *X18.* 3 1 +ATI Radeon X1900 .*ATI.*Radeon *X19.* 3 1 ATI Radeon X300 .*ATI.*Radeon *X3.* 0 1 ATI Radeon X400 .*ATI.*Radeon X4.* 0 1 ATI Radeon X500 .*ATI.*Radeon X5.* 0 1 @@ -204,14 +203,14 @@ 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.* 3 1 -NVIDIA GeForce 7800 .*NVIDIA.*GeForce.*78.* 3 1 -NVIDIA GeForce 7900 .*NVIDIA.*GeForce.*79.* 3 1 +NVIDIA GeForce 7600 .*NVIDIA.*GeForce 76.* 1 1 +NVIDIA GeForce 7800 .*NVIDIA.*GeForce.*78.* 1 1 +NVIDIA GeForce 7900 .*NVIDIA.*GeForce.*79.* 1 1 NVIDIA GeForce 8100 .*NVIDIA.*GeForce 81.* 1 1 NVIDIA GeForce 8200 .*NVIDIA.*GeForce 82.* 1 1 NVIDIA GeForce 8300 .*NVIDIA.*GeForce 83.* 1 1 NVIDIA GeForce 8400 .*NVIDIA.*GeForce 84.* 1 1 -NVIDIA GeForce 8500 .*GeForce 85.* 3 1 +NVIDIA GeForce 8500 .*GeForce 85.* 1 1 NVIDIA GeForce 8600M .*NVIDIA.*GeForce.*8600M.* 1 1 NVIDIA GeForce 8600 .*NVIDIA.*GeForce 86.* 3 1 NVIDIA GeForce 8700 .*NVIDIA.*GeForce 87.* 3 1 diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index a7322749ca..b7b4c54001 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -797,6 +797,12 @@ WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' ;; URL param must be last item passed to viewer, it ignores subsequent params ;; to avoid parameter injection attacks. WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life" +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" "" +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' +;; URL param must be last item passed to viewer, it ignores subsequent params +;; to avoid parameter injection attacks. +WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' ; write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ddcaeb113d..0fa77ff7c2 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -45,7 +45,6 @@ #include "llchannelmanager.h" #include "llconsole.h" #include "llfloatercamera.h" -#include "llfloatercustomize.h" #include "llfloaterreg.h" #include "llfloatertools.h" #include "llgroupactions.h" @@ -73,6 +72,7 @@ #include "llviewerdisplay.h" #include "llviewerjoystick.h" #include "llviewermediafocus.h" +#include "llviewermenu.h" #include "llviewerobjectlist.h" #include "llviewerparcelmgr.h" #include "llviewerstats.h" @@ -1495,6 +1495,8 @@ void LLAgent::propagate(const F32 dt) floater_move->mBackwardButton ->setToggleState( gAgentCamera.getAtKey() < 0 || gAgentCamera.getWalkKey() < 0 ); floater_move->mTurnLeftButton ->setToggleState( gAgentCamera.getYawKey() > 0.f ); floater_move->mTurnRightButton ->setToggleState( gAgentCamera.getYawKey() < 0.f ); + floater_move->mSlideLeftButton ->setToggleState( gAgentCamera.getLeftKey() > 0.f ); + floater_move->mSlideRightButton ->setToggleState( gAgentCamera.getLeftKey() < 0.f ); floater_move->mMoveUpButton ->setToggleState( gAgentCamera.getUpKey() > 0 ); floater_move->mMoveDownButton ->setToggleState( gAgentCamera.getUpKey() < 0 ); } @@ -3086,21 +3088,30 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * mesgsys->getUUIDFast(_PREHASH_WearableData, _PREHASH_TextureID, texture_id, texture_block); mesgsys->getU8Fast(_PREHASH_WearableData, _PREHASH_TextureIndex, texture_index, texture_block); - if ((S32)texture_index < BAKED_NUM_INDICES - && gAgentQueryManager.mActiveCacheQueries[texture_index] == query_id) - { - if (texture_id.notNull()) - { - //llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl; - gAgentAvatarp->setCachedBakedTexture(LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)texture_index), texture_id); - //gAgentAvatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id ); - gAgentQueryManager.mActiveCacheQueries[texture_index] = 0; - num_results++; - } - else + + if ((S32)texture_index < TEX_NUM_INDICES ) + { + const LLVOAvatarDictionary::TextureEntry *texture_entry = LLVOAvatarDictionary::instance().getTexture((ETextureIndex)texture_index); + if (texture_entry) { - // no cache of this bake. request upload. - gAgentAvatarp->requestLayerSetUpload((EBakedTextureIndex)texture_index); + EBakedTextureIndex baked_index = texture_entry->mBakedTextureIndex; + + if (gAgentQueryManager.mActiveCacheQueries[baked_index] == query_id) + { + if (texture_id.notNull()) + { + //llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl; + gAgentAvatarp->setCachedBakedTexture((ETextureIndex)texture_index, texture_id); + //gAgentAvatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id ); + gAgentQueryManager.mActiveCacheQueries[baked_index] = 0; + num_results++; + } + else + { + // no cache of this bake. request upload. + gAgentAvatarp->requestLayerSetUpload(baked_index); + } + } } } } @@ -3236,7 +3247,7 @@ bool LLAgent::teleportCore(bool is_local) // MBW -- Let the voice client know a teleport has begun so it can leave the existing channel. // This was breaking the case of teleporting within a single sim. Backing it out for now. -// gVoiceClient->leaveChannel(); +// LLVoiceClient::getInstance()->leaveChannel(); return true; } @@ -3380,7 +3391,7 @@ void LLAgent::setTeleportState(ETeleportState state) if (mTeleportState == TELEPORT_MOVING) { // We're outa here. Save "back" slurl. - mTeleportSourceSLURL = LLAgentUI::buildSLURL(); + LLAgentUI::buildSLURL(mTeleportSourceSLURL); } else if(mTeleportState == TELEPORT_ARRIVING) { @@ -3524,7 +3535,6 @@ void LLAgent::sendAgentSetAppearance() return; } - llinfos << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << llendl; //dumpAvatarTEs( "sendAgentSetAppearance()" ); @@ -3556,7 +3566,7 @@ void LLAgent::sendAgentSetAppearance() const ETextureIndex texture_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index); // if we're not wearing a skirt, we don't need the texture to be baked - if (texture_index == TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(WT_SKIRT)) + if (texture_index == TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(LLWearableType::WT_SKIRT)) { continue; } @@ -3575,29 +3585,15 @@ void LLAgent::sendAgentSetAppearance() llinfos << "TAT: Sending cached texture data" << llendl; for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++) { - const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index); - LLUUID hash; - for (U8 i=0; i < baked_dict->mWearables.size(); i++) - { - // EWearableType wearable_type = gBakedWearableMap[baked_index][wearable_num]; - const EWearableType wearable_type = baked_dict->mWearables[i]; - // MULTI-WEARABLE: fixed to 0th - extend to everything once messaging works. - const LLWearable* wearable = gAgentWearables.getWearable(wearable_type,0); - if (wearable) - { - hash ^= wearable->getAssetID(); - } - } + LLUUID hash = gAgentWearables.computeBakedTextureHash((EBakedTextureIndex) baked_index); + if (hash.notNull()) { - hash ^= baked_dict->mWearablesHashID; + ETextureIndex texture_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex) baked_index); + msg->nextBlockFast(_PREHASH_WearableData); + msg->addUUIDFast(_PREHASH_CacheID, hash); + msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index); } - - const ETextureIndex texture_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index); - - msg->nextBlockFast(_PREHASH_WearableData); - msg->addUUIDFast(_PREHASH_CacheID, hash); - msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index); } msg->nextBlockFast(_PREHASH_ObjectData); gAgentAvatarp->sendAppearanceMessage( gMessageSystem ); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index a460077b7e..32f9b00135 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -42,6 +42,7 @@ #include "llpointer.h" #include "lluicolor.h" #include "llvoavatardefines.h" +#include "llslurl.h" extern const BOOL ANIMATE; extern const U8 AGENT_STATE_TYPING; // Typing indication @@ -514,13 +515,13 @@ public: public: static void parseTeleportMessages(const std::string& xml_filename); - const std::string getTeleportSourceSLURL() const { return mTeleportSourceSLURL; } + const void getTeleportSourceSLURL(LLSLURL& slurl) const { slurl = mTeleportSourceSLURL; } public: // ! TODO ! Define ERROR and PROGRESS enums here instead of exposing the mappings. static std::map<std::string, std::string> sTeleportErrorMessages; static std::map<std::string, std::string> sTeleportProgressMessages; private: - std::string mTeleportSourceSLURL; // SLURL where last TP began + LLSLURL mTeleportSourceSLURL; // SLURL where last TP began //-------------------------------------------------------------------- // Teleport Actions diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 9638d0e94f..47f290ad3b 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -38,7 +38,6 @@ #include "llagent.h" #include "llanimationstates.h" #include "llfloatercamera.h" -#include "llfloatercustomize.h" #include "llfloaterreg.h" #include "llhudmanager.h" #include "lljoystickbutton.h" @@ -48,6 +47,7 @@ #include "llviewercamera.h" #include "llviewercontrol.h" #include "llviewerjoystick.h" +#include "llviewermenu.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" #include "llviewerwindow.h" @@ -1538,26 +1538,6 @@ F32 LLAgentCamera::calcCustomizeAvatarUIOffset(const LLVector3d& camera_pos_glob { F32 ui_offset = 0.f; - if (gFloaterCustomize) - { - const LLRect& rect = gFloaterCustomize->getRect(); - - // Move the camera so that the avatar isn't covered up by this floater. - F32 fraction_of_fov = 0.5f - (0.5f * (1.f - llmin(1.f, ((F32)rect.getWidth() / (F32)gViewerWindow->getWindowWidthScaled())))); - F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect(); // radians - F32 offset = tan(apparent_angle); - - if( rect.mLeft < (gViewerWindow->getWindowWidthScaled() - rect.mRight) ) - { - // Move the avatar to the right (camera to the left) - ui_offset = offset; - } - else - { - // Move the avatar to the left (camera to the right) - ui_offset = -offset; - } - } F32 range = (F32)dist_vec(camera_pos_global, getFocusGlobal()); mUIOffset = lerp(mUIOffset, ui_offset, LLCriticalDamp::getInterpolant(0.05f)); return mUIOffset * range; diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp index b3ed7c353e..7a8205acb5 100644 --- a/indra/newview/llagentlistener.cpp +++ b/indra/newview/llagentlistener.cpp @@ -53,7 +53,10 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const } else { - std::string url = LLSLURL::buildSLURL(event_data["regionname"], event_data["x"], event_data["y"], event_data["z"]); + std::string url = LLSLURL(event_data["regionname"], + LLVector3(event_data["x"].asReal(), + event_data["y"].asReal(), + event_data["z"].asReal())).getSLURLString(); LLURLDispatcher::dispatch(url, NULL, false); } } diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index c4597ad6f8..15d9f36b74 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -76,16 +76,15 @@ void LLAgentUI::buildFullname(std::string& name) } //static -std::string LLAgentUI::buildSLURL(const bool escaped /*= true*/) +void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/) { - std::string slurl; - LLViewerRegion *regionp = gAgent.getRegion(); - if (regionp) - { - LLVector3d agentPos = gAgent.getPositionGlobal(); - slurl = LLSLURL::buildSLURLfromPosGlobal(regionp->getName(), agentPos, escaped); - } - return slurl; + LLSLURL return_slurl; + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) + { + return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionGlobal()); + } + slurl = return_slurl; } //static diff --git a/indra/newview/llagentui.h b/indra/newview/llagentui.h index 3478793e38..577b752fbe 100644 --- a/indra/newview/llagentui.h +++ b/indra/newview/llagentui.h @@ -33,6 +33,8 @@ #ifndef LLAGENTUI_H #define LLAGENTUI_H +class LLSLURL; + class LLAgentUI { public: @@ -48,7 +50,7 @@ public: static void buildName(std::string& name); static void buildFullname(std::string &name); - static std::string buildSLURL(const bool escaped = true); + static void buildSLURL(LLSLURL& slurl, const bool escaped = true); //build location string using the current position of gAgent. static BOOL buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK); //build location string using a region position of the avatar. diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index b5fde0baca..e5796f8e63 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -39,7 +39,6 @@ #include "llagentwearablesfetch.h" #include "llappearancemgr.h" #include "llcallbacklist.h" -#include "llfloatercustomize.h" #include "llfolderview.h" #include "llgesturemgr.h" #include "llinventorybridge.h" @@ -49,6 +48,7 @@ #include "llmd5.h" #include "llnotificationsutil.h" #include "llpaneloutfitsinventory.h" +#include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltexlayer.h" #include "llviewerregion.h" @@ -100,13 +100,13 @@ void checkWearableAgainstInventory(LLWearable *wearable) void LLAgentWearables::dump() { llinfos << "LLAgentWearablesDump" << llendl; - for (S32 i = 0; i < WT_COUNT; i++) + for (S32 i = 0; i < LLWearableType::WT_COUNT; i++) { - U32 count = getWearableCount((EWearableType)i); + U32 count = getWearableCount((LLWearableType::EType)i); llinfos << "Type: " << i << " count " << count << llendl; for (U32 j=0; j<count; j++) { - LLWearable* wearable = getWearable((EWearableType)i,j); + LLWearable* wearable = getWearable((LLWearableType::EType)i,j); if (wearable == NULL) { llinfos << " " << j << " NULL wearable" << llendl; @@ -125,7 +125,6 @@ void LLAgentWearables::dump() } } -// MULTI-WEARABLE: debugging struct LLAgentDumper { LLAgentDumper(std::string name): @@ -191,7 +190,7 @@ LLAgentWearables::sendAgentWearablesUpdateCallback::~sendAgentWearablesUpdateCal * @param todo Bitmask of actions to take on completion. */ LLAgentWearables::addWearableToAgentInventoryCallback::addWearableToAgentInventoryCallback( - LLPointer<LLRefCount> cb, S32 type, U32 index, LLWearable* wearable, U32 todo) : + LLPointer<LLRefCount> cb, LLWearableType::EType type, U32 index, LLWearable* wearable, U32 todo) : mType(type), mIndex(index), mWearable(wearable), @@ -240,7 +239,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i } } -void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, +void LLAgentWearables::addWearabletoAgentInventoryDone(const LLWearableType::EType type, const U32 index, const LLUUID& item_id, LLWearable* wearable) @@ -250,7 +249,7 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, if (item_id.isNull()) return; - LLUUID old_item_id = getWearableItemID((EWearableType)type,index); + LLUUID old_item_id = getWearableItemID(type,index); if (wearable) { @@ -259,11 +258,11 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, if (old_item_id.notNull()) { gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); - setWearable((EWearableType)type,index,wearable); + setWearable(type,index,wearable); } else { - pushWearable((EWearableType)type,wearable); + pushWearable(type,wearable); } } @@ -285,13 +284,12 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, void LLAgentWearables::sendAgentWearablesUpdate() { - // MULTI-WEARABLE: call i "type" or something. // First make sure that we have inventory items for each wearable - for (S32 type=0; type < WT_COUNT; ++type) + for (S32 type=0; type < LLWearableType::WT_COUNT; ++type) { - for (U32 j=0; j < getWearableCount((EWearableType)type); ++j) + for (U32 index=0; index < getWearableCount((LLWearableType::EType)type); ++index) { - LLWearable* wearable = getWearable((EWearableType)type,j); + LLWearable* wearable = getWearable((LLWearableType::EType)type,index); if (wearable) { if (wearable->getItemID().isNull()) @@ -299,8 +297,8 @@ void LLAgentWearables::sendAgentWearablesUpdate() LLPointer<LLInventoryCallback> cb = new addWearableToAgentInventoryCallback( LLPointer<LLRefCount>(NULL), - type, - j, + (LLWearableType::EType)type, + index, wearable, addWearableToAgentInventoryCallback::CALL_NONE); addWearableToAgentInventory(cb, wearable); @@ -325,16 +323,15 @@ void LLAgentWearables::sendAgentWearablesUpdate() gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); lldebugs << "sendAgentWearablesUpdate()" << llendl; - // MULTI-WEARABLE: update for multi-wearables after server-side support is in. - for (S32 type=0; type < WT_COUNT; ++type) + // MULTI-WEARABLE: DEPRECATED: HACK: index to 0- server database tables don't support concept of multiwearables. + for (S32 type=0; type < LLWearableType::WT_COUNT; ++type) { gMessageSystem->nextBlockFast(_PREHASH_WearableData); U8 type_u8 = (U8)type; gMessageSystem->addU8Fast(_PREHASH_WearableType, type_u8); - // MULTI-WEARABLE: TODO: hacked index to 0, needs to loop over all once messages support this. - LLWearable* wearable = getWearable((EWearableType)type, 0); + LLWearable* wearable = getWearable((LLWearableType::EType)type, 0); if (wearable) { //llinfos << "Sending wearable " << wearable->getName() << llendl; @@ -350,16 +347,16 @@ void LLAgentWearables::sendAgentWearablesUpdate() } else { - //llinfos << "Not wearing wearable type " << LLWearableDictionary::getInstance()->getWearable((EWearableType)i) << llendl; + //llinfos << "Not wearing wearable type " << LLWearableType::getTypeName((LLWearableType::EType)i) << llendl; gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID::null); } - lldebugs << " " << LLWearableDictionary::getTypeLabel((EWearableType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << llendl; + lldebugs << " " << LLWearableType::getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << llendl; } gAgent.sendReliableMessage(); } -void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, BOOL send_update) +void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update) { LLWearable* old_wearable = getWearable(type, index); if (old_wearable && (old_wearable->isDirty() || old_wearable->isOldVersion())) @@ -405,7 +402,7 @@ void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, B LLPointer<LLInventoryCallback> cb = new addWearableToAgentInventoryCallback( LLPointer<LLRefCount>(NULL), - (S32)type, + type, index, new_wearable, todo); @@ -422,7 +419,7 @@ void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, B } } -void LLAgentWearables::saveWearableAs(const EWearableType type, +void LLAgentWearables::saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, BOOL save_in_lost_and_found) @@ -483,7 +480,7 @@ void LLAgentWearables::saveWearableAs(const EWearableType type, old_wearable->revertValues(); } -void LLAgentWearables::revertWearable(const EWearableType type, const U32 index) +void LLAgentWearables::revertWearable(const LLWearableType::EType type, const U32 index) { LLWearable* wearable = getWearable(type, index); wearable->revertValues(); @@ -498,10 +495,10 @@ void LLAgentWearables::saveAllWearables() // return; //} - for (S32 i=0; i < WT_COUNT; i++) + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) { - for (U32 j=0; j < getWearableCount((EWearableType)i); j++) - saveWearable((EWearableType)i, j, FALSE); + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) + saveWearable((LLWearableType::EType)i, j, FALSE); } sendAgentWearablesUpdate(); } @@ -509,14 +506,14 @@ void LLAgentWearables::saveAllWearables() // Called when the user changes the name of a wearable inventory item that is currently being worn. void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string& new_name) { - for (S32 i=0; i < WT_COUNT; i++) + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) { - for (U32 j=0; j < getWearableCount((EWearableType)i); j++) + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) { - LLUUID curr_item_id = getWearableItemID((EWearableType)i,j); + LLUUID curr_item_id = getWearableItemID((LLWearableType::EType)i,j); if (curr_item_id == item_id) { - LLWearable* old_wearable = getWearable((EWearableType)i,j); + LLWearable* old_wearable = getWearable((LLWearableType::EType)i,j); llassert(old_wearable); std::string old_name = old_wearable->getName(); @@ -530,7 +527,7 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string& } old_wearable->setName(old_name); - setWearable((EWearableType)i,j,new_wearable); + setWearable((LLWearableType::EType)i,j,new_wearable); sendAgentWearablesUpdate(); break; } @@ -539,12 +536,18 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string& } -BOOL LLAgentWearables::isWearableModifiable(EWearableType type, U32 index) const +BOOL LLAgentWearables::isWearableModifiable(LLWearableType::EType type, U32 index) const { LLUUID item_id = getWearableItemID(type, index); - if (!item_id.isNull()) + return item_id.notNull() ? isWearableModifiable(item_id) : FALSE; +} + +BOOL LLAgentWearables::isWearableModifiable(const LLUUID& item_id) const +{ + const LLUUID& linked_id = gInventory.getLinkedItemID(item_id); + if (linked_id.notNull()) { - LLInventoryItem* item = gInventory.getItem(item_id); + LLInventoryItem* item = gInventory.getItem(linked_id); if (item && item->getPermissions().allowModifyBy(gAgent.getID(), gAgent.getGroupID())) { @@ -554,7 +557,7 @@ BOOL LLAgentWearables::isWearableModifiable(EWearableType type, U32 index) const return FALSE; } -BOOL LLAgentWearables::isWearableCopyable(EWearableType type, U32 index) const +BOOL LLAgentWearables::isWearableCopyable(LLWearableType::EType type, U32 index) const { LLUUID item_id = getWearableItemID(type, index); if (!item_id.isNull()) @@ -570,7 +573,7 @@ BOOL LLAgentWearables::isWearableCopyable(EWearableType type, U32 index) const } /* - U32 LLAgentWearables::getWearablePermMask(EWearableType type) + U32 LLAgentWearables::getWearablePermMask(LLWearableType::EType type) { LLUUID item_id = getWearableItemID(type); if (!item_id.isNull()) @@ -585,7 +588,7 @@ BOOL LLAgentWearables::isWearableCopyable(EWearableType type, U32 index) const } */ -LLInventoryItem* LLAgentWearables::getWearableInventoryItem(EWearableType type, U32 index) +LLInventoryItem* LLAgentWearables::getWearableInventoryItem(LLWearableType::EType type, U32 index) { LLUUID item_id = getWearableItemID(type,index); LLInventoryItem* item = NULL; @@ -598,12 +601,30 @@ LLInventoryItem* LLAgentWearables::getWearableInventoryItem(EWearableType type, const LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) const { - for (S32 i=0; i < WT_COUNT; i++) + const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id); + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) + { + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) + { + const LLWearable * curr_wearable = getWearable((LLWearableType::EType)i, j); + if (curr_wearable && (curr_wearable->getItemID() == base_item_id)) + { + return curr_wearable; + } + } + } + return NULL; +} + +LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) +{ + const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id); + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) { - for (U32 j=0; j < getWearableCount((EWearableType)i); j++) + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) { - const LLWearable * curr_wearable = getWearable((EWearableType)i, j); - if (curr_wearable && (curr_wearable->getItemID() == item_id)) + LLWearable * curr_wearable = getWearable((LLWearableType::EType)i, j); + if (curr_wearable && (curr_wearable->getItemID() == base_item_id)) { return curr_wearable; } @@ -614,11 +635,11 @@ const LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) LLWearable* LLAgentWearables::getWearableFromAssetID(const LLUUID& asset_id) { - for (S32 i=0; i < WT_COUNT; i++) + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) { - for (U32 j=0; j < getWearableCount((EWearableType)i); j++) + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) { - LLWearable * curr_wearable = getWearable((EWearableType)i, j); + LLWearable * curr_wearable = getWearable((LLWearableType::EType)i, j); if (curr_wearable && (curr_wearable->getAssetID() == asset_id)) { return curr_wearable; @@ -638,12 +659,12 @@ void LLAgentWearables::sendAgentWearablesRequest() } // static -BOOL LLAgentWearables::selfHasWearable(EWearableType type) +BOOL LLAgentWearables::selfHasWearable(LLWearableType::EType type) { return (gAgentWearables.getWearableCount(type) > 0); } -LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index) +LLWearable* LLAgentWearables::getWearable(const LLWearableType::EType type, U32 index) { wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) @@ -661,7 +682,7 @@ LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index) } } -void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearable *wearable) +void LLAgentWearables::setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable) { LLWearable *old_wearable = getWearable(type,index); @@ -691,22 +712,22 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab } } -U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearable) +U32 LLAgentWearables::pushWearable(const LLWearableType::EType type, LLWearable *wearable) { if (wearable == NULL) { // no null wearables please! llwarns << "Null wearable sent for type " << type << llendl; - return MAX_WEARABLES_PER_TYPE; + return MAX_CLOTHING_PER_TYPE; } - if (type < WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE) + if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE) { mWearableDatas[type].push_back(wearable); wearableUpdated(wearable); checkWearableAgainstInventory(wearable); return mWearableDatas[type].size()-1; } - return MAX_WEARABLES_PER_TYPE; + return MAX_CLOTHING_PER_TYPE; } void LLAgentWearables::wearableUpdated(LLWearable *wearable) @@ -741,15 +762,15 @@ void LLAgentWearables::popWearable(LLWearable *wearable) } U32 index = getWearableIndex(wearable); - EWearableType type = wearable->getType(); + LLWearableType::EType type = wearable->getType(); - if (index < MAX_WEARABLES_PER_TYPE && index < getWearableCount(type)) + if (index < MAX_CLOTHING_PER_TYPE && index < getWearableCount(type)) { popWearable(type, index); } } -void LLAgentWearables::popWearable(const EWearableType type, U32 index) +void LLAgentWearables::popWearable(const LLWearableType::EType type, U32 index) { LLWearable *wearable = getWearable(type, index); if (wearable) @@ -764,15 +785,15 @@ U32 LLAgentWearables::getWearableIndex(LLWearable *wearable) { if (wearable == NULL) { - return MAX_WEARABLES_PER_TYPE; + return MAX_CLOTHING_PER_TYPE; } - const EWearableType type = wearable->getType(); + const LLWearableType::EType type = wearable->getType(); wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) { llwarns << "tried to get wearable index with an invalid type!" << llendl; - return MAX_WEARABLES_PER_TYPE; + return MAX_CLOTHING_PER_TYPE; } const wearableentry_vec_t& wearable_vec = wearable_iter->second; for(U32 index = 0; index < wearable_vec.size(); index++) @@ -783,10 +804,10 @@ U32 LLAgentWearables::getWearableIndex(LLWearable *wearable) } } - return MAX_WEARABLES_PER_TYPE; + return MAX_CLOTHING_PER_TYPE; } -const LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index) const +const LLWearable* LLAgentWearables::getWearable(const LLWearableType::EType type, U32 index) const { wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) @@ -804,7 +825,7 @@ const LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 in } } -LLWearable* LLAgentWearables::getTopWearable(const EWearableType type) +LLWearable* LLAgentWearables::getTopWearable(const LLWearableType::EType type) { U32 count = getWearableCount(type); if ( count == 0) @@ -815,7 +836,17 @@ LLWearable* LLAgentWearables::getTopWearable(const EWearableType type) return getWearable(type, count-1); } -U32 LLAgentWearables::getWearableCount(const EWearableType type) const +LLWearable* LLAgentWearables::getBottomWearable(const LLWearableType::EType type) +{ + if (getWearableCount(type) == 0) + { + return NULL; + } + + return getWearable(type, 0); +} + +U32 LLAgentWearables::getWearableCount(const LLWearableType::EType type) const { wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) @@ -828,7 +859,7 @@ U32 LLAgentWearables::getWearableCount(const EWearableType type) const U32 LLAgentWearables::getWearableCount(const U32 tex_index) const { - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType((LLVOAvatarDefines::ETextureIndex)tex_index); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType((LLVOAvatarDefines::ETextureIndex)tex_index); return getWearableCount(wearable_type); } @@ -843,7 +874,7 @@ U32 LLAgentWearables::itemUpdatePendingCount() const return mItemsAwaitingWearableUpdate.size(); } -const LLUUID LLAgentWearables::getWearableItemID(EWearableType type, U32 index) const +const LLUUID LLAgentWearables::getWearableItemID(LLWearableType::EType type, U32 index) const { const LLWearable *wearable = getWearable(type,index); if (wearable) @@ -852,7 +883,7 @@ const LLUUID LLAgentWearables::getWearableItemID(EWearableType type, U32 index) return LLUUID(); } -const LLUUID LLAgentWearables::getWearableAssetID(EWearableType type, U32 index) const +const LLUUID LLAgentWearables::getWearableAssetID(LLWearableType::EType type, U32 index) const { const LLWearable *wearable = getWearable(type,index); if (wearable) @@ -863,15 +894,10 @@ const LLUUID LLAgentWearables::getWearableAssetID(EWearableType type, U32 index) BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id) const { - const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id); - if (getWearableFromItemID(base_item_id) != NULL) - { - return TRUE; - } - return FALSE; + return getWearableFromItemID(item_id) != NULL; } -// MULTI-WEARABLE: update for multiple +// MULTI-WEARABLE: DEPRECATED (see backwards compatibility) // static // ! BACKWARDS COMPATIBILITY ! When we stop supporting viewer1.23, we can assume // that viewers have a Current Outfit Folder and won't need this message, and thus @@ -909,18 +935,18 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs //lldebugs << "processAgentInitialWearablesUpdate()" << llendl; // Add wearables - // MULTI-WEARABLE: TODO: update once messages change. Currently use results to populate the zeroth element. + // MULTI-WEARABLE: DEPRECATED: Message only supports one wearable per type, will be ignored in future. gAgentWearables.mItemsAwaitingWearableUpdate.clear(); for (S32 i=0; i < num_wearables; i++) { // Parse initial wearables data from message system U8 type_u8 = 0; gMessageSystem->getU8Fast(_PREHASH_WearableData, _PREHASH_WearableType, type_u8, i); - if (type_u8 >= WT_COUNT) + if (type_u8 >= LLWearableType::WT_COUNT) { continue; } - const EWearableType type = (EWearableType) type_u8; + const LLWearableType::EType type = (LLWearableType::EType) type_u8; LLUUID item_id; gMessageSystem->getUUIDFast(_PREHASH_WearableData, _PREHASH_ItemID, item_id, i); @@ -933,20 +959,20 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs } else { - LLAssetType::EType asset_type = LLWearableDictionary::getAssetType(type); + LLAssetType::EType asset_type = LLWearableType::getAssetType(type); if (asset_type == LLAssetType::AT_NONE) { continue; } - // MULTI-WEARABLE: TODO: update once messages change. Currently use results to populate the zeroth element. + // MULTI-WEARABLE: DEPRECATED: this message only supports one wearable per type. Should be ignored in future versions // Store initial wearables data until we know whether we have the current outfit folder or need to use the data. - LLInitialWearablesFetch::InitialWearableData wearable_data(type, item_id, asset_id); // MULTI-WEARABLE: update + LLInitialWearablesFetch::InitialWearableData wearable_data(type, item_id, asset_id); outfit->add(wearable_data); } - lldebugs << " " << LLWearableDictionary::getTypeLabel(type) << llendl; + lldebugs << " " << LLWearableType::getTypeLabel(type) << llendl; } // Get the complete information on the items in the inventory and set up an observer @@ -970,14 +996,13 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // Normally, all wearables referred to "AgentWearablesUpdate" will correspond to actual assets in the // database. If for some reason, we can't load one of those assets, we can try to reconstruct it so that // the user isn't left without a shape, for example. (We can do that only after the inventory has loaded.) -void LLAgentWearables::recoverMissingWearable(const EWearableType type, U32 index) +void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type, U32 index) { // Try to recover by replacing missing wearable with a new one. LLNotificationsUtil::add("ReplacedMissingWearable"); - lldebugs << "Wearable " << LLWearableDictionary::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl; + lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl; LLWearable* new_wearable = LLWearableList::instance().createNewWearable(type); - S32 type_s32 = (S32) type; setWearable(type,index,new_wearable); //new_wearable->writeToAvatar(TRUE); @@ -988,7 +1013,7 @@ void LLAgentWearables::recoverMissingWearable(const EWearableType type, U32 inde LLPointer<LLInventoryCallback> cb = new addWearableToAgentInventoryCallback( LLPointer<LLRefCount>(NULL), - type_s32, + type, index, new_wearable, addWearableToAgentInventoryCallback::CALL_RECOVERDONE); @@ -1011,9 +1036,9 @@ void LLAgentWearables::recoverMissingWearableDone() } } -void LLAgentWearables::addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index) +void LLAgentWearables::addLocalTextureObject(const LLWearableType::EType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index) { - LLWearable* wearable = getWearable((EWearableType)wearable_type, wearable_index); + LLWearable* wearable = getWearable((LLWearableType::EType)wearable_type, wearable_index); if (!wearable) { llerrs << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << llendl; @@ -1027,7 +1052,7 @@ class OnWearableItemCreatedCB: public LLInventoryCallback { public: OnWearableItemCreatedCB(): - mWearablesAwaitingItems(WT_COUNT,NULL) + mWearablesAwaitingItems(LLWearableType::WT_COUNT,NULL) { llinfos << "created callback" << llendl; } @@ -1053,8 +1078,8 @@ public: llwarns << "no wearable" << llendl; return; } - EWearableType type = wearable->getType(); - if (type<WT_COUNT) + LLWearableType::EType type = wearable->getType(); + if (type<LLWearableType::WT_COUNT) { mWearablesAwaitingItems[type] = wearable; } @@ -1078,8 +1103,8 @@ public: } if (item && item->isWearableType()) { - EWearableType type = item->getWearableType(); - if (type < WT_COUNT) + LLWearableType::EType type = item->getWearableType(); + if (type < LLWearableType::WT_COUNT) { LLWearable *wearable = mWearablesAwaitingItems[type]; if (wearable) @@ -1106,30 +1131,30 @@ void LLAgentWearables::createStandardWearables(BOOL female) gAgentAvatarp->setSex(female ? SEX_FEMALE : SEX_MALE); - const BOOL create[WT_COUNT] = + const BOOL create[LLWearableType::WT_COUNT] = { - TRUE, //WT_SHAPE - TRUE, //WT_SKIN - TRUE, //WT_HAIR - TRUE, //WT_EYES - TRUE, //WT_SHIRT - TRUE, //WT_PANTS - TRUE, //WT_SHOES - TRUE, //WT_SOCKS - FALSE, //WT_JACKET - FALSE, //WT_GLOVES - TRUE, //WT_UNDERSHIRT - TRUE, //WT_UNDERPANTS - FALSE //WT_SKIRT + TRUE, //LLWearableType::WT_SHAPE + TRUE, //LLWearableType::WT_SKIN + TRUE, //LLWearableType::WT_HAIR + TRUE, //LLWearableType::WT_EYES + TRUE, //LLWearableType::WT_SHIRT + TRUE, //LLWearableType::WT_PANTS + TRUE, //LLWearableType::WT_SHOES + TRUE, //LLWearableType::WT_SOCKS + FALSE, //LLWearableType::WT_JACKET + FALSE, //LLWearableType::WT_GLOVES + TRUE, //LLWearableType::WT_UNDERSHIRT + TRUE, //LLWearableType::WT_UNDERPANTS + FALSE //LLWearableType::WT_SKIRT }; LLPointer<LLInventoryCallback> cb = new OnWearableItemCreatedCB; - for (S32 i=0; i < WT_COUNT; i++) + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) { if (create[i]) { - llassert(getWearableCount((EWearableType)i) == 0); - LLWearable* wearable = LLWearableList::instance().createNewWearable((EWearableType)i); + llassert(getWearableCount((LLWearableType::EType)i) == 0); + LLWearable* wearable = LLWearableList::instance().createNewWearable((LLWearableType::EType)i); ((OnWearableItemCreatedCB*)(&(*cb)))->addPendingWearable(wearable); // no need to update here... LLUUID category_id = LLUUID::null; @@ -1164,6 +1189,7 @@ void LLAgentWearables::createStandardWearablesAllDone() mWearablesLoaded = TRUE; checkWearablesLoaded(); + mLoadedSignal(); updateServer(); @@ -1171,158 +1197,6 @@ void LLAgentWearables::createStandardWearablesAllDone() gAgentAvatarp->onFirstTEMessageReceived(); } -// MULTI-WEARABLE: Properly handle multiwearables later. -void LLAgentWearables::getAllWearablesArray(LLDynamicArray<S32>& wearables) -{ - for( S32 i = 0; i < WT_COUNT; ++i ) - { - if (getWearableCount((EWearableType) i) != 0) - { - wearables.push_back(i); - } - } -} - -// Note: wearables_to_include should be a list of EWearableType types -// attachments_to_include should be a list of attachment points -void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, - const LLDynamicArray<S32>& wearables_to_include, - const LLDynamicArray<S32>& attachments_to_include, - BOOL rename_clothing) -{ - if (!isAgentAvatarValid()) return; - - // First, make a folder in the Clothes directory. - LLUUID folder_id = gInventory.createNewCategory( - gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING), - LLFolderType::FT_NONE, - new_folder_name); - - bool found_first_item = false; - - /////////////////// - // Wearables - - if (wearables_to_include.count()) - { - // Then, iterate though each of the wearables and save copies of them in the folder. - S32 i; - S32 count = wearables_to_include.count(); - LLDynamicArray<LLUUID> delete_items; - LLPointer<LLRefCount> cbdone = NULL; - for (i = 0; i < count; ++i) - { - const S32 type = wearables_to_include[i]; - for (U32 j=0; j<getWearableCount((EWearableType)i); j++) - { - LLWearable* old_wearable = getWearable((EWearableType)type, j); - if (old_wearable) - { - std::string new_name; - LLWearable* new_wearable; - new_wearable = LLWearableList::instance().createCopy(old_wearable); - if (rename_clothing) - { - new_name = new_folder_name; - new_name.append(" "); - new_name.append(old_wearable->getTypeLabel()); - LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN); - new_wearable->setName(new_name); - } - - LLViewerInventoryItem* item = gInventory.getItem(getWearableItemID((EWearableType)type,j)); - S32 todo = addWearableToAgentInventoryCallback::CALL_NONE; - if (!found_first_item) - { - found_first_item = true; - /* set the focus to the first item */ - todo |= addWearableToAgentInventoryCallback::CALL_MAKENEWOUTFITDONE; - /* send the agent wearables update when done */ - cbdone = new sendAgentWearablesUpdateCallback; - } - LLPointer<LLInventoryCallback> cb = - new addWearableToAgentInventoryCallback( - cbdone, - type, - j, - new_wearable, - todo); - llassert(item); - if (item) - { - if (isWearableCopyable((EWearableType)type, j)) - { - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - folder_id, - new_name, - cb); - } - else - { - move_inventory_item( - gAgent.getID(), - gAgent.getSessionID(), - item->getUUID(), - folder_id, - new_name, - cb); - } - } - } - } - } - gInventory.notifyObservers(); - } - - - /////////////////// - // Attachments - - if (attachments_to_include.count()) - { - BOOL msg_started = FALSE; - LLMessageSystem* msg = gMessageSystem; - for (S32 i = 0; i < attachments_to_include.count(); i++) - { - S32 attachment_pt = attachments_to_include[i]; - LLViewerJointAttachment* attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, attachment_pt, (LLViewerJointAttachment*)NULL); - if (!attachment) continue; - for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); - attachment_iter != attachment->mAttachedObjects.end(); - ++attachment_iter) - { - LLViewerObject *attached_object = (*attachment_iter); - if(!attached_object) continue; - const LLUUID& item_id = (*attachment_iter)->getItemID(); - if(item_id.isNull()) continue; - LLInventoryItem* item = gInventory.getItem(item_id); - if(!item) continue; - if(!msg_started) - { - msg_started = TRUE; - msg->newMessage("CreateNewOutfitAttachments"); - msg->nextBlock("AgentData"); - msg->addUUID("AgentID", gAgent.getID()); - msg->addUUID("SessionID", gAgent.getSessionID()); - msg->nextBlock("HeaderData"); - msg->addUUID("NewFolderID", folder_id); - } - msg->nextBlock("ObjectData"); - msg->addUUID("OldItemID", item_id); - msg->addUUID("OldFolderID", item->getParentUUID()); - } - } - - if (msg_started) - { - gAgent.sendReliableMessage(); - } - - } -} class LLShowCreatedOutfit: public LLInventoryCallback { @@ -1364,7 +1238,7 @@ private: void LLAgentWearables::makeNewOutfitDone(S32 type, U32 index) { - LLUUID first_item_id = getWearableItemID((EWearableType)type, index); + LLUUID first_item_id = getWearableItemID((LLWearableType::EType)type, index); // Open the inventory and select the first item we added. if (first_item_id.notNull()) { @@ -1395,10 +1269,10 @@ void LLAgentWearables::addWearableToAgentInventory(LLPointer<LLInventoryCallback cb); } -void LLAgentWearables::removeWearable(const EWearableType type, bool do_remove_all, U32 index) +void LLAgentWearables::removeWearable(const LLWearableType::EType type, bool do_remove_all, U32 index) { if (gAgent.isTeen() && - (type == WT_UNDERSHIRT || type == WT_UNDERPANTS)) + (type == LLWearableType::WT_UNDERSHIRT || type == LLWearableType::WT_UNDERPANTS)) { // Can't take off underclothing in simple UI mode or on PG accounts // TODO: enable the removing of a single undershirt/underpants if multiple are worn. - Nyx @@ -1442,7 +1316,7 @@ void LLAgentWearables::removeWearable(const EWearableType type, bool do_remove_a bool LLAgentWearables::onRemoveWearableDialog(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - EWearableType type = (EWearableType)notification["payload"]["wearable_type"].asInteger(); + LLWearableType::EType type = (LLWearableType::EType)notification["payload"]["wearable_type"].asInteger(); S32 index = (S32)notification["payload"]["wearable_index"].asInteger(); switch(option) { @@ -1466,7 +1340,7 @@ bool LLAgentWearables::onRemoveWearableDialog(const LLSD& notification, const LL } // Called by removeWearable() and onRemoveWearableDialog() to actually do the removal. -void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_remove_all, U32 index) +void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, bool do_remove_all, U32 index) { //LLAgentDumper dumper("removeWearable"); if (do_remove_all) @@ -1515,11 +1389,11 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it { // note: shirt is the first non-body part wearable item. Update if wearable order changes. // This loop should remove all clothing, but not any body parts - for (S32 type = 0; type < (S32)WT_COUNT; type++) + for (S32 type = 0; type < (S32)LLWearableType::WT_COUNT; type++) { - if (LLWearableDictionary::getAssetType((EWearableType)type) == LLAssetType::AT_CLOTHING) + if (LLWearableType::getAssetType((LLWearableType::EType)type) == LLAssetType::AT_CLOTHING) { - removeWearable((EWearableType)type, true, 0); + removeWearable((LLWearableType::EType)type, true, 0); } } } @@ -1536,12 +1410,12 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it llassert(new_wearable); if (new_wearable) { - const EWearableType type = new_wearable->getType(); + const LLWearableType::EType type = new_wearable->getType(); new_wearable->setName(new_item->getName()); new_wearable->setItemID(new_item->getUUID()); - if (LLWearableDictionary::getAssetType(type) == LLAssetType::AT_BODYPART) + if (LLWearableType::getAssetType(type) == LLAssetType::AT_BODYPART) { // exactly one wearable per body part setWearable(type,0,new_wearable); @@ -1567,6 +1441,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it // Start rendering & update the server mWearablesLoaded = TRUE; checkWearablesLoaded(); + mLoadedSignal(); queryWearableCache(); updateServer(); @@ -1584,7 +1459,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLWearable* ne return; } - const EWearableType type = new_wearable->getType(); + const LLWearableType::EType type = new_wearable->getType(); if (!do_append) { @@ -1597,7 +1472,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLWearable* ne if ((old_wearable->getAssetID() == new_wearable->getAssetID()) && (old_item_id == new_item->getUUID())) { - lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl; + lldebugs << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << llendl; return; } @@ -1654,7 +1529,7 @@ bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD& // MULTI_WEARABLE: unify code after null objects are gone. void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append) { - const EWearableType type = new_wearable->getType(); + const LLWearableType::EType type = new_wearable->getType(); if (do_append && getWearableItemID(type,0).notNull()) { @@ -1719,37 +1594,18 @@ void LLAgentWearables::queryWearableCache() S32 num_queries = 0; for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++) { - const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index); - LLMD5 hash; - bool hash_computed = false; - for (U8 i=0; i < baked_dict->mWearables.size(); i++) - { - const EWearableType baked_type = baked_dict->mWearables[i]; - const U32 num_wearables = getWearableCount(baked_type); - for (U32 index = 0; index < num_wearables; ++index) - { - const LLWearable* wearable = getWearable(baked_type,index); - if (wearable) - { - LLUUID asset_id = wearable->getAssetID(); - hash.update((const unsigned char*)asset_id.mData, UUID_BYTES); - hash_computed = true; - } - } - } - hash.finalize(); - if (hash_computed) + LLUUID hash_id = computeBakedTextureHash((EBakedTextureIndex) baked_index); + if (hash_id.notNull()) { - LLUUID hash_id; - hash.raw_digest(hash_id.mData); - hash_id ^= baked_dict->mWearablesHashID; num_queries++; // *NOTE: make sure at least one request gets packed + ETextureIndex te_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index); + //llinfos << "Requesting texture for hash " << hash << " in baked texture slot " << baked_index << llendl; gMessageSystem->nextBlockFast(_PREHASH_WearableData); gMessageSystem->addUUIDFast(_PREHASH_ID, hash_id); - gMessageSystem->addU8Fast(_PREHASH_TextureIndex, (U8)baked_index); + gMessageSystem->addU8Fast(_PREHASH_TextureIndex, (U8)te_index); } gAgentQueryManager.mActiveCacheQueries[baked_index] = gAgentQueryManager.mWearablesCacheQueryID; @@ -1761,22 +1617,55 @@ void LLAgentWearables::queryWearableCache() gAgentQueryManager.mWearablesCacheQueryID++; } +LLUUID LLAgentWearables::computeBakedTextureHash(LLVOAvatarDefines::EBakedTextureIndex index) +{ + LLUUID hash_id; + bool hash_computed = false; + LLMD5 hash; + + const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture(index); + + for (U8 i=0; i < baked_dict->mWearables.size(); i++) + { + const LLWearableType::EType baked_type = baked_dict->mWearables[i]; + const U32 num_wearables = getWearableCount(baked_type); + for (U32 index = 0; index < num_wearables; ++index) + { + const LLWearable* wearable = getWearable(baked_type,index); + if (wearable) + { + LLUUID asset_id = wearable->getAssetID(); + hash.update((const unsigned char*)asset_id.mData, UUID_BYTES); + hash_computed = true; + } + } + } + if (hash_computed) + { + hash.update((const unsigned char*)baked_dict->mWearablesHashID.mData, UUID_BYTES); + hash.finalize(); + hash.raw_digest(hash_id.mData); + } + + return hash_id; +} + // User has picked "remove from avatar" from a menu. // static -void LLAgentWearables::userRemoveWearable(const EWearableType &type, const U32 &index) +void LLAgentWearables::userRemoveWearable(const LLWearableType::EType &type, const U32 &index) { - if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES)) //&& - //!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT))) + if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&& + //!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT))) { gAgentWearables.removeWearable(type,false,index); } } //static -void LLAgentWearables::userRemoveWearablesOfType(const EWearableType &type) +void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &type) { - if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES)) //&& - //!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT))) + if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&& + //!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT))) { gAgentWearables.removeWearable(type,true,0); } @@ -1786,14 +1675,12 @@ void LLAgentWearables::userRemoveWearablesOfType(const EWearableType &type) void LLAgentWearables::userRemoveAllClothes() { // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty. - if (gFloaterCustomize) + if (gAgentCamera.cameraCustomizeAvatar()) { - gFloaterCustomize->askToSaveIfDirty(userRemoveAllClothesStep2); - } - else - { - userRemoveAllClothesStep2(TRUE); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } + userRemoveAllClothesStep2(TRUE); } // static @@ -1801,17 +1688,17 @@ void LLAgentWearables::userRemoveAllClothesStep2(BOOL proceed) { if (proceed) { - gAgentWearables.removeWearable(WT_SHIRT,true,0); - gAgentWearables.removeWearable(WT_PANTS,true,0); - gAgentWearables.removeWearable(WT_SHOES,true,0); - gAgentWearables.removeWearable(WT_SOCKS,true,0); - gAgentWearables.removeWearable(WT_JACKET,true,0); - gAgentWearables.removeWearable(WT_GLOVES,true,0); - gAgentWearables.removeWearable(WT_UNDERSHIRT,true,0); - gAgentWearables.removeWearable(WT_UNDERPANTS,true,0); - gAgentWearables.removeWearable(WT_SKIRT,true,0); - gAgentWearables.removeWearable(WT_ALPHA,true,0); - gAgentWearables.removeWearable(WT_TATTOO,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_SHIRT,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_PANTS,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_SHOES,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_SOCKS,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_JACKET,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_GLOVES,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_UNDERSHIRT,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_UNDERPANTS,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_SKIRT,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_ALPHA,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_TATTOO,true,0); } } @@ -2002,34 +1889,52 @@ void LLAgentWearables::checkWearablesLoaded() const #endif } +// Returns false if the given wearable is already topmost/bottommost +// (depending on closer_to_body parameter). +bool LLAgentWearables::canMoveWearable(const LLUUID& item_id, bool closer_to_body) +{ + const LLWearable* wearable = getWearableFromItemID(item_id); + if (!wearable) return false; + + LLWearableType::EType wtype = wearable->getType(); + const LLWearable* marginal_wearable = closer_to_body ? getBottomWearable(wtype) : getTopWearable(wtype); + if (!marginal_wearable) return false; + + return wearable != marginal_wearable; +} + BOOL LLAgentWearables::areWearablesLoaded() const { checkWearablesLoaded(); return mWearablesLoaded; } -// MULTI-WEARABLE: update for multiple indices. +// MULTI-WEARABLE: DEPRECATED: item pending count relies on old messages that don't support multi-wearables. do not trust to be accurate void LLAgentWearables::updateWearablesLoaded() { mWearablesLoaded = (itemUpdatePendingCount()==0); + if (mWearablesLoaded) + { + mLoadedSignal(); + } } bool LLAgentWearables::canWearableBeRemoved(const LLWearable* wearable) const { if (!wearable) return false; - EWearableType type = wearable->getType(); + LLWearableType::EType type = wearable->getType(); // Make sure the user always has at least one shape, skin, eyes, and hair type currently worn. - return !(((type == WT_SHAPE) || (type == WT_SKIN) || (type == WT_HAIR) || (type == WT_EYES)) + return !(((type == LLWearableType::WT_SHAPE) || (type == LLWearableType::WT_SKIN) || (type == LLWearableType::WT_HAIR) || (type == LLWearableType::WT_EYES)) && (getWearableCount(type) <= 1) ); } void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL upload_bake) { - for( S32 type = 0; type < WT_COUNT; ++type ) + for( S32 type = 0; type < LLWearableType::WT_COUNT; ++type ) { - for (S32 count = 0; count < (S32)getWearableCount((EWearableType)type); ++count) + for (S32 count = 0; count < (S32)getWearableCount((LLWearableType::EType)type); ++count) { - LLWearable *wearable = getWearable((EWearableType)type,count); + LLWearable *wearable = getWearable((LLWearableType::EType)type,count); wearable->animateParams(delta, upload_bake); } } @@ -2068,6 +1973,23 @@ bool LLAgentWearables::moveWearable(const LLViewerInventoryItem* item, bool clos return false; } +// static +void LLAgentWearables::editWearable(const LLUUID& item_id) +{ + LLViewerInventoryItem* item; + LLWearable* wearable; + + if ((item = gInventory.getLinkedItem(item_id)) && + (wearable = gAgentWearables.getWearableFromAssetID(item->getAssetUUID())) && + gAgentWearables.isWearableModifiable(item->getUUID()) && + item->isFinished()) + { + LLPanel* panel = LLSideTray::getInstance()->showPanel("panel_outfit_edit", LLSD()); + // copied from LLPanelOutfitEdit::onEditWearableClicked() + LLSidepanelAppearance::editWearable(wearable, panel->getParent()); + } +} + void LLAgentWearables::updateServer() { sendAgentWearablesUpdate(); @@ -2091,3 +2013,8 @@ void LLAgentWearables::populateMyOutfitsFolder(void) outfits->done(); } } + +boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_t cb) +{ + return mLoadedSignal.connect(cb); +} diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index d3b18f68f1..5d5c5ae371 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -62,7 +62,6 @@ public: void cleanup(); void dump(); protected: - // MULTI-WEARABLE: assuming one per type. Type is called index - rename. void createStandardWearablesDone(S32 type, U32 index/* = 0*/); void createStandardWearablesAllDone(); @@ -71,53 +70,58 @@ protected: //-------------------------------------------------------------------- public: BOOL isWearingItem(const LLUUID& item_id) const; - BOOL isWearableModifiable(EWearableType type, U32 index /*= 0*/) const; - BOOL isWearableCopyable(EWearableType type, U32 index /*= 0*/) const; + BOOL isWearableModifiable(LLWearableType::EType type, U32 index /*= 0*/) const; + BOOL isWearableModifiable(const LLUUID& item_id) const; + + BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; void updateWearablesLoaded(); void checkWearablesLoaded() const; + bool canMoveWearable(const LLUUID& item_id, bool closer_to_body); // Note: False for shape, skin, eyes, and hair, unless you have MORE than 1. bool canWearableBeRemoved(const LLWearable* wearable) const; void animateAllWearableParams(F32 delta, BOOL upload_bake); - - bool moveWearable(const LLViewerInventoryItem* item, bool closer_to_body); //-------------------------------------------------------------------- // Accessors //-------------------------------------------------------------------- public: - const LLUUID getWearableItemID(EWearableType type, U32 index /*= 0*/) const; - const LLUUID getWearableAssetID(EWearableType type, U32 index /*= 0*/) const; + const LLUUID getWearableItemID(LLWearableType::EType type, U32 index /*= 0*/) const; + const LLUUID getWearableAssetID(LLWearableType::EType type, U32 index /*= 0*/) const; const LLWearable* getWearableFromItemID(const LLUUID& item_id) const; + LLWearable* getWearableFromItemID(const LLUUID& item_id); LLWearable* getWearableFromAssetID(const LLUUID& asset_id); - LLInventoryItem* getWearableInventoryItem(EWearableType type, U32 index /*= 0*/); - // MULTI-WEARABLE: assuming one per type. - static BOOL selfHasWearable(EWearableType type); - LLWearable* getWearable(const EWearableType type, U32 index /*= 0*/); - const LLWearable* getWearable(const EWearableType type, U32 index /*= 0*/) const; - LLWearable* getTopWearable(const EWearableType type); - U32 getWearableCount(const EWearableType type) const; + LLInventoryItem* getWearableInventoryItem(LLWearableType::EType type, U32 index /*= 0*/); + static BOOL selfHasWearable(LLWearableType::EType type); + LLWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/); + const LLWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/) const; + LLWearable* getTopWearable(const LLWearableType::EType type); + LLWearable* getBottomWearable(const LLWearableType::EType type); + U32 getWearableCount(const LLWearableType::EType type) const; U32 getWearableCount(const U32 tex_index) const; + static const U32 MAX_CLOTHING_PER_TYPE = 5; + + //-------------------------------------------------------------------- // Setters //-------------------------------------------------------------------- private: // Low-level data structure setter - public access is via setWearableItem, etc. - void setWearable(const EWearableType type, U32 index, LLWearable *wearable); - U32 pushWearable(const EWearableType type, LLWearable *wearable); + void setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable); + U32 pushWearable(const LLWearableType::EType type, LLWearable *wearable); void wearableUpdated(LLWearable *wearable); void popWearable(LLWearable *wearable); - void popWearable(const EWearableType type, U32 index); + void popWearable(const LLWearableType::EType type, U32 index); public: void setWearableItem(LLInventoryItem* new_item, LLWearable* wearable, bool do_append = false); void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLWearable* >& wearables, BOOL remove); void setWearableName(const LLUUID& item_id, const std::string& new_name); - void addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index); + void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index); U32 getWearableIndex(LLWearable *wearable); protected: @@ -128,20 +132,28 @@ protected: LLWearable* wearable, const LLUUID& category_id = LLUUID::null, BOOL notify = TRUE); - void addWearabletoAgentInventoryDone(const S32 type, + void addWearabletoAgentInventoryDone(const LLWearableType::EType type, const U32 index, const LLUUID& item_id, LLWearable* wearable); - void recoverMissingWearable(const EWearableType type, U32 index /*= 0*/); + void recoverMissingWearable(const LLWearableType::EType type, U32 index /*= 0*/); void recoverMissingWearableDone(); //-------------------------------------------------------------------- + // Editing/moving wearables + //-------------------------------------------------------------------- + +public: + static void editWearable(const LLUUID& item_id); + bool moveWearable(const LLViewerInventoryItem* item, bool closer_to_body); + + //-------------------------------------------------------------------- // Removing wearables //-------------------------------------------------------------------- public: - void removeWearable(const EWearableType type, bool do_remove_all /*= false*/, U32 index /*= 0*/); + void removeWearable(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/); private: - void removeWearableFinal(const EWearableType type, bool do_remove_all /*= false*/, U32 index /*= 0*/); + void removeWearableFinal(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/); protected: static bool onRemoveWearableDialog(const LLSD& notification, const LLSD& response); static void userRemoveAllClothesStep2(BOOL proceed); // userdata is NULL @@ -152,6 +164,8 @@ protected: public: // Processes the initial wearables update message (if necessary, since the outfit folder makes it redundant) static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data); + LLUUID computeBakedTextureHash(LLVOAvatarDefines::EBakedTextureIndex index); + protected: void sendAgentWearablesUpdate(); void sendAgentWearablesRequest(); @@ -163,15 +177,6 @@ protected: // Outfits //-------------------------------------------------------------------- public: - void getAllWearablesArray(LLDynamicArray<S32>& wearables); - - // Note: wearables_to_include should be a list of EWearableType types - // attachments_to_include should be a list of attachment points - void makeNewOutfit(const std::string& new_folder_name, - const LLDynamicArray<S32>& wearables_to_include, - const LLDynamicArray<S32>& attachments_to_include, - BOOL rename_clothing); - // Should only be called if we *know* we've never done so before, since users may // not want the Library outfits to stay in their quick outfit selector and can delete them. @@ -184,18 +189,17 @@ private: // Save Wearables //-------------------------------------------------------------------- public: - // MULTI-WEARABLE: assumes one per type. - void saveWearableAs(const EWearableType type, const U32 index, const std::string& new_name, BOOL save_in_lost_and_found); - void saveWearable(const EWearableType type, const U32 index, BOOL send_update = TRUE); + void saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, BOOL save_in_lost_and_found); + void saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update = TRUE); void saveAllWearables(); - void revertWearable(const EWearableType type, const U32 index); + void revertWearable(const LLWearableType::EType type, const U32 index); //-------------------------------------------------------------------- // Static UI hooks //-------------------------------------------------------------------- public: - static void userRemoveWearable(const EWearableType &type, const U32 &index); - static void userRemoveWearablesOfType(const EWearableType &type); + static void userRemoveWearable(const LLWearableType::EType &type, const U32 &index); + static void userRemoveWearablesOfType(const LLWearableType::EType &type); static void userRemoveAllClothes(); typedef std::vector<LLViewerObject*> llvo_vec_t; @@ -209,11 +213,22 @@ public: U32 itemUpdatePendingCount() const; //-------------------------------------------------------------------- + // Signals + //-------------------------------------------------------------------- +public: + typedef boost::function<void()> loaded_callback_t; + typedef boost::signals2::signal<void()> loaded_signal_t; + boost::signals2::connection addLoadedCallback(loaded_callback_t cb); + +private: + loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded + + //-------------------------------------------------------------------- // Member variables //-------------------------------------------------------------------- private: typedef std::vector<LLWearable*> wearableentry_vec_t; // all wearables of a certain type (EG all shirts) - typedef std::map<EWearableType, wearableentry_vec_t> wearableentry_map_t; // wearable "categories" arranged by wearable type + typedef std::map<LLWearableType::EType, wearableentry_vec_t> wearableentry_map_t; // wearable "categories" arranged by wearable type wearableentry_map_t mWearableDatas; static BOOL mInitialWearablesUpdateReceived; @@ -238,7 +253,7 @@ private: class addWearableToAgentInventoryCallback : public LLInventoryCallback { public: - enum EType + enum ETodo { CALL_NONE = 0, CALL_UPDATE = 1, @@ -248,24 +263,20 @@ private: CALL_WEARITEM = 16 }; - // MULTI-WEARABLE: index is an EWearableType - more confusing usage. - // MULTI-WEARABLE: need to have type and index args both? addWearableToAgentInventoryCallback(LLPointer<LLRefCount> cb, - S32 type, + LLWearableType::EType type, U32 index, LLWearable* wearable, U32 todo = CALL_NONE); virtual void fire(const LLUUID& inv_item); private: - S32 mType; + LLWearableType::EType mType; U32 mIndex; LLWearable* mWearable; U32 mTodo; LLPointer<LLRefCount> mCB; }; - static const U32 MAX_WEARABLES_PER_TYPE = 1; - }; // LLAgentWearables extern LLAgentWearables gAgentWearables; diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 03d09a3798..ef0b97d376 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -37,8 +37,53 @@ #include "llagentwearables.h" #include "llappearancemgr.h" #include "llinventoryfunctions.h" +#include "llstartup.h" #include "llvoavatarself.h" + +class LLOrderMyOutfitsOnDestroy: public LLInventoryCallback +{ +public: + LLOrderMyOutfitsOnDestroy() {}; + + virtual ~LLOrderMyOutfitsOnDestroy() + { + const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); + if (my_outfits_id.isNull()) return; + + LLInventoryModel::cat_array_t* cats; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(my_outfits_id, cats, items); + if (!cats) return; + + //My Outfits should at least contain saved initial outfit and one another outfit + if (cats->size() < 2) + { + llwarning("My Outfits category was not populated properly", 0); + return; + } + + llinfos << "Starting updating My Outfits with wearables ordering information" << llendl; + + for (LLInventoryModel::cat_array_t::iterator outfit_iter = cats->begin(); + outfit_iter != cats->end(); ++outfit_iter) + { + const LLUUID& cat_id = (*outfit_iter)->getUUID(); + if (cat_id.isNull()) continue; + + // saved initial outfit already contains wearables ordering information + if (cat_id == LLAppearanceMgr::getInstance()->getBaseOutfitUUID()) continue; + + LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(cat_id); + } + + llinfos << "Finished updating My Outfits with wearables ordering information" << llendl; + } + + /* virtual */ void fire(const LLUUID& inv_item) {}; +}; + + LLInitialWearablesFetch::LLInitialWearablesFetch(const LLUUID& cof_id) : LLInventoryFetchDescendentsObserver(cof_id) { @@ -260,8 +305,11 @@ void LLLibraryOutfitsFetch::folderDone() LLInventoryModel::item_array_t wearable_array; gInventory.collectDescendents(mMyOutfitsID, cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH); - // Early out if we already have items in My Outfits. - if (cat_array.count() > 0 || wearable_array.count() > 0) + + // Early out if we already have items in My Outfits + // except the case when My Outfits contains just initial outfit + if (cat_array.count() > 1 || + cat_array.count() == 1 && cat_array[0]->getUUID() != LLAppearanceMgr::getInstance()->getBaseOutfitUUID()) { mOutfitsPopulated = true; return; @@ -272,6 +320,7 @@ void LLLibraryOutfitsFetch::folderDone() // If Library->Clothing->Initial Outfits exists, use that. LLNameCategoryCollector matchFolderFunctor("Initial Outfits"); + cat_array.clear(); gInventory.collectDescendentsIf(mLibraryClothingID, cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH, @@ -478,6 +527,8 @@ void LLLibraryOutfitsFetch::contentsDone() LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; + LLPointer<LLOrderMyOutfitsOnDestroy> order_myoutfits_on_destroy = new LLOrderMyOutfitsOnDestroy; + for (uuid_vec_t::const_iterator folder_iter = mImportedClothingFolders.begin(); folder_iter != mImportedClothingFolders.end(); ++folder_iter) @@ -489,6 +540,9 @@ void LLLibraryOutfitsFetch::contentsDone() llwarns << "Library folder import for uuid:" << folder_id << " failed to find folder." << llendl; continue; } + + //initial outfit should be already in My Outfits + if (cat->getName() == LLStartUp::getInitialOutfitName()) continue; // First, make a folder in the My Outfits directory. LLUUID new_outfit_folder_id = gInventory.createNewCategory(mMyOutfitsID, LLFolderType::FT_OUTFIT, cat->getName()); @@ -510,7 +564,7 @@ void LLLibraryOutfitsFetch::contentsDone() item->getName(), item->getDescription(), LLAssetType::AT_LINK, - NULL); + order_myoutfits_on_destroy); } } diff --git a/indra/newview/llagentwearablesfetch.h b/indra/newview/llagentwearablesfetch.h index 6695727d46..faa5fbaa43 100644 --- a/indra/newview/llagentwearablesfetch.h +++ b/indra/newview/llagentwearablesfetch.h @@ -34,7 +34,7 @@ #define LL_LLAGENTWEARABLESINITIALFETCH_H #include "llinventoryobserver.h" -#include "llwearabledictionary.h" +#include "llwearabletype.h" #include "lluuid.h" //-------------------------------------------------------------------- @@ -53,10 +53,10 @@ public: struct InitialWearableData { - EWearableType mType; + LLWearableType::EType mType; LLUUID mItemID; LLUUID mAssetID; - InitialWearableData(EWearableType type, LLUUID& itemID, LLUUID& assetID) : + InitialWearableData(LLWearableType::EType type, LLUUID& itemID, LLUUID& assetID) : mType(type), mItemID(itemID), mAssetID(assetID) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e93e29ecde..f27e632180 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -34,10 +34,10 @@ #include "llaccordionctrltab.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" #include "llcommandhandler.h" -#include "llfloatercustomize.h" #include "llgesturemgr.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -55,6 +55,25 @@ char ORDER_NUMBER_SEPARATOR('@'); +// support for secondlife:///app/appearance SLapps +class LLAppearanceHandler : public LLCommandHandler +{ +public: + // requests will be throttled from a non-trusted browser + LLAppearanceHandler() : LLCommandHandler("appearance", UNTRUSTED_THROTTLE) {} + + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) + { + // support secondlife:///app/appearance/show, but for now we just + // make all secondlife:///app/appearance SLapps behave this way + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD()); + return true; + } +}; + +LLAppearanceHandler gAppearanceHandler; + + LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string& name) { LLInventoryModel::cat_array_t cat_array; @@ -133,27 +152,6 @@ public: }; -//Inventory collect functor collecting wearables of a specific wearable type -class LLFindClothesOfType : public LLInventoryCollectFunctor -{ -public: - LLFindClothesOfType(EWearableType type) : mWearableType(type) {} - virtual ~LLFindClothesOfType() {} - virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) - { - if (!item) return false; - if (item->getType() != LLAssetType::AT_CLOTHING) return false; - - LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); - if (!vitem || vitem->getWearableType() != mWearableType) return false; - - return true; - } - - const EWearableType mWearableType; -}; - - LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(): mFireCount(0) { @@ -171,7 +169,9 @@ LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy() void LLUpdateAppearanceOnDestroy::fire(const LLUUID& inv_item) { - llinfos << "callback fired" << llendl; + LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(inv_item); + const std::string item_name = item ? item->getName() : "ITEM NOT FOUND"; + llinfos << "callback fired [ name:" << item_name << " UUID:" << inv_item << " count:" << mFireCount << " ] " << llendl; mFireCount++; } @@ -179,14 +179,14 @@ struct LLFoundData { LLFoundData() : mAssetType(LLAssetType::AT_NONE), - mWearableType(WT_INVALID), + mWearableType(LLWearableType::WT_INVALID), mWearable(NULL) {} LLFoundData(const LLUUID& item_id, const LLUUID& asset_id, const std::string& name, const LLAssetType::EType& asset_type, - const EWearableType& wearable_type + const LLWearableType::EType& wearable_type ) : mItemID(item_id), mAssetID(asset_id), @@ -199,7 +199,7 @@ struct LLFoundData LLUUID mAssetID; std::string mName; LLAssetType::EType mAssetType; - EWearableType mWearableType; + LLWearableType::EType mWearableType; LLWearable* mWearable; }; @@ -218,7 +218,7 @@ public: void checkMissingWearables(); bool pollMissingWearables(); bool isMissingCompleted(); - void recoverMissingWearable(EWearableType type); + void recoverMissingWearable(LLWearableType::EType type); void clearCOFLinksForMissingWearables(); void onWearableAssetFetch(LLWearable *wearable); @@ -259,18 +259,18 @@ bool LLWearableHoldingPattern::isTimedOut() void LLWearableHoldingPattern::checkMissingWearables() { - std::vector<S32> found_by_type(WT_COUNT,0); - std::vector<S32> requested_by_type(WT_COUNT,0); + std::vector<S32> found_by_type(LLWearableType::WT_COUNT,0); + std::vector<S32> requested_by_type(LLWearableType::WT_COUNT,0); for (found_list_t::iterator it = mFoundList.begin(); it != mFoundList.end(); ++it) { LLFoundData &data = *it; - if (data.mWearableType < WT_COUNT) + if (data.mWearableType < LLWearableType::WT_COUNT) requested_by_type[data.mWearableType]++; if (data.mWearable) found_by_type[data.mWearableType]++; } - for (S32 type = 0; type < WT_COUNT; ++type) + for (S32 type = 0; type < LLWearableType::WT_COUNT; ++type) { llinfos << "type " << type << " requested " << requested_by_type[type] << " found " << found_by_type[type] << llendl; if (found_by_type[type] > 0) @@ -281,11 +281,11 @@ void LLWearableHoldingPattern::checkMissingWearables() // pants) (requested_by_type[type] > 0) || // or if type is a body part and no wearables were found. - ((type == WT_SHAPE) || (type == WT_SKIN) || (type == WT_HAIR) || (type == WT_EYES))) + ((type == LLWearableType::WT_SHAPE) || (type == LLWearableType::WT_SKIN) || (type == LLWearableType::WT_HAIR) || (type == LLWearableType::WT_EYES))) { mTypesToRecover.insert(type); mTypesToLink.insert(type); - recoverMissingWearable((EWearableType)type); + recoverMissingWearable((LLWearableType::EType)type); llwarns << "need to replace " << type << llendl; } } @@ -368,7 +368,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() class RecoveredItemLinkCB: public LLInventoryCallback { public: - RecoveredItemLinkCB(EWearableType type, LLWearable *wearable, LLWearableHoldingPattern* holder): + RecoveredItemLinkCB(LLWearableType::EType type, LLWearable *wearable, LLWearableHoldingPattern* holder): mHolder(holder), mWearable(wearable), mType(type) @@ -392,7 +392,7 @@ public: linked_item->getAssetUUID(), linked_item->getName(), linked_item->getType(), - linked_item->isWearableType() ? linked_item->getWearableType() : WT_INVALID + linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); found.mWearable = mWearable; mHolder->mFoundList.push_front(found); @@ -410,13 +410,13 @@ public: private: LLWearableHoldingPattern* mHolder; LLWearable *mWearable; - EWearableType mType; + LLWearableType::EType mType; }; class RecoveredItemCB: public LLInventoryCallback { public: - RecoveredItemCB(EWearableType type, LLWearable *wearable, LLWearableHoldingPattern* holder): + RecoveredItemCB(LLWearableType::EType type, LLWearable *wearable, LLWearableHoldingPattern* holder): mHolder(holder), mWearable(wearable), mType(type) @@ -444,14 +444,14 @@ public: private: LLWearableHoldingPattern* mHolder; LLWearable *mWearable; - EWearableType mType; + LLWearableType::EType mType; }; -void LLWearableHoldingPattern::recoverMissingWearable(EWearableType type) +void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type) { // Try to recover by replacing missing wearable with a new one. LLNotificationsUtil::add("ReplacedMissingWearable"); - lldebugs << "Wearable " << LLWearableDictionary::getTypeLabel(type) + lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl; LLWearable* wearable = LLWearableList::instance().createNewWearable(type); @@ -482,7 +482,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() for (found_list_t::iterator it = mFoundList.begin(); it != mFoundList.end(); ++it) { LLFoundData &data = *it; - if ((data.mWearableType < WT_COUNT) && (!data.mWearable)) + if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable)) { // Wearable link that was never resolved; remove links to it from COF llinfos << "removing link for unresolved item " << data.mItemID.asString() << llendl; @@ -505,6 +505,7 @@ bool LLWearableHoldingPattern::pollMissingWearables() if (done) { + gAgentAvatarp->debugWearablesLoaded(); clearCOFLinksForMissingWearables(); onAllComplete(); } @@ -543,7 +544,7 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) { data.mWearable = wearable; // Failing this means inventory or asset server are corrupted in a way we don't handle. - llassert((data.mWearableType < WT_COUNT) && (wearable->getType() == data.mWearableType)); + llassert((data.mWearableType < LLWearableType::WT_COUNT) && (wearable->getType() == data.mWearableType)); break; } } @@ -649,7 +650,7 @@ const LLUUID LLAppearanceMgr::getBaseOutfitUUID() return outfit_cat->getUUID(); } -bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_update) +bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_update, bool replace) { if (item_id_to_wear.isNull()) return false; @@ -670,6 +671,14 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); return false; } + + // Remove the existing wearables of the same type. + // Remove existing body parts anyway because we must not be able to wear e.g. two skins. + if (replace || item_to_wear->getType() == LLAssetType::AT_BODYPART) + { + removeCOFLinksOfType(item_to_wear->getWearableType(), false); + } + addCOFItemLink(item_to_wear, do_update); break; case LLAssetType::AT_OBJECT: @@ -689,6 +698,35 @@ void LLAppearanceMgr::changeOutfit(bool proceed, const LLUUID& category, bool ap LLAppearanceMgr::instance().updateCOF(category,append); } +void LLAppearanceMgr::replaceCurrentOutfit(const LLUUID& new_outfit) +{ + LLViewerInventoryCategory* cat = gInventory.getCategory(new_outfit); + wearInventoryCategory(cat, false, false); +} + +void LLAppearanceMgr::addCategoryToCurrentOutfit(const LLUUID& cat_id) +{ + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + wearInventoryCategory(cat, false, true); +} + +void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id) +{ + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearables collector; + + gInventory.collectDescendentsIf(cat_id, cats, items, FALSE, collector); + + LLInventoryModel::item_array_t::const_iterator it = items.begin(); + const LLInventoryModel::item_array_t::const_iterator it_end = items.end(); + for( ; it_end != it; ++it) + { + LLViewerInventoryItem* item = *it; + removeItemFromAvatar(item->getUUID()); + } +} + // Create a copy of src_id + contents as a subfolder of dst_id. void LLAppearanceMgr::shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id, LLPointer<LLInventoryCallback> cb) @@ -778,10 +816,10 @@ BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id) // These are the wearable items that are required for considering this // folder as containing a complete outfit. U32 required_wearables = 0; - required_wearables |= 1LL << WT_SHAPE; - required_wearables |= 1LL << WT_SKIN; - required_wearables |= 1LL << WT_HAIR; - required_wearables |= 1LL << WT_EYES; + required_wearables |= 1LL << LLWearableType::WT_SHAPE; + required_wearables |= 1LL << LLWearableType::WT_SKIN; + required_wearables |= 1LL << LLWearableType::WT_HAIR; + required_wearables |= 1LL << LLWearableType::WT_EYES; // These are the wearables that the folder actually contains. U32 folder_wearables = 0; @@ -795,7 +833,7 @@ BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id) const LLViewerInventoryItem* item = (*iter); if (item->isWearableType()) { - const EWearableType wearable_type = item->getWearableType(); + const LLWearableType::EType wearable_type = item->getWearableType(); folder_wearables |= 1LL << wearable_type; } } @@ -851,12 +889,12 @@ void LLAppearanceMgr::filterWearableItems( LLInventoryModel::item_array_t& items, S32 max_per_type) { // Divvy items into arrays by wearable type. - std::vector<LLInventoryModel::item_array_t> items_by_type(WT_COUNT); + std::vector<LLInventoryModel::item_array_t> items_by_type(LLWearableType::WT_COUNT); divvyWearablesByType(items, items_by_type); // rebuild items list, retaining the last max_per_type of each array items.clear(); - for (S32 i=0; i<WT_COUNT; i++) + for (S32 i=0; i<LLWearableType::WT_COUNT; i++) { S32 size = items_by_type[i].size(); if (size <= 0) @@ -870,7 +908,7 @@ void LLAppearanceMgr::filterWearableItems( } // Create links to all listed items. -void LLAppearanceMgr::linkAll(const LLUUID& category, +void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid, LLInventoryModel::item_array_t& items, LLPointer<LLInventoryCallback> cb) { @@ -879,11 +917,16 @@ void LLAppearanceMgr::linkAll(const LLUUID& category, const LLInventoryItem* item = items.get(i).get(); link_inventory_item(gAgent.getID(), item->getLinkedUUID(), - category, + cat_uuid, item->getName(), item->LLInventoryItem::getDescription(), LLAssetType::AT_LINK, cb); + + const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_uuid); + const std::string cat_name = cat ? cat->getName() : "CAT NOT FOUND"; + + llinfos << "Linking Item [ name:" << item->getName() << " UUID:" << item->getUUID() << " ] to Category [ name:" << cat_name << " UUID:" << cat_uuid << " ] " << llendl; // Seraph remove for 2.1 } } @@ -927,7 +970,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING, false); // Reduce wearables to max of one per type. removeDuplicateItems(wear_items); - filterWearableItems(wear_items, 5); + filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_PER_TYPE); // - Attachments: include COF contents only if appending. LLInventoryModel::item_array_t obj_items; @@ -952,9 +995,13 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) llinfos << "creating LLUpdateAppearanceOnDestroy" << llendl; LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; + llinfos << "Linking body items" << llendl; // Seraph remove for 2.1 linkAll(cof, body_items, link_waiter); + llinfos << "Linking wear items" << llendl; // Seraph remove for 2.1 linkAll(cof, wear_items, link_waiter); + llinfos << "Linking obj items" << llendl; // Seraph remove for 2.1 linkAll(cof, obj_items, link_waiter); + llinfos << "Linking gesture items" << llendl; // Seraph remove for 2.1 linkAll(cof, gest_items, link_waiter); // Add link to outfit if category is an outfit. @@ -1001,7 +1048,7 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo // For each wearable type, find the first instance in the category // that we recursed through. - for( S32 i = 0; i < WT_COUNT; i++ ) + for( S32 i = 0; i < LLWearableType::WT_COUNT; i++ ) { for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin(); iter != holder->mFoundList.end(); ++iter) @@ -1010,8 +1057,7 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo LLWearable* wearable = data.mWearable; if( wearable && ((S32)wearable->getType() == i) ) { - LLViewerInventoryItem* item; - item = (LLViewerInventoryItem*)gInventory.getItem(data.mItemID); + LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(data.mItemID); if( item && (item->getAssetUUID() == wearable->getAssetID()) ) { items.put(item); @@ -1115,14 +1161,14 @@ void LLAppearanceMgr::updateAppearanceFromCOF() linked_item->getAssetUUID(), linked_item->getName(), linked_item->getType(), - linked_item->isWearableType() ? linked_item->getWearableType() : WT_INVALID + linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); #if 0 // Fault injection: uncomment this block to test asset // fetch failures (should be replaced by new defaults in // lost&found). - if (found.mWearableType == WT_SHAPE || found.mWearableType == WT_JACKET) + if (found.mWearableType == LLWearableType::WT_SHAPE || found.mWearableType == LLWearableType::WT_JACKET) { found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB @@ -1316,16 +1362,13 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego llinfos << "wearInventoryCategoryOnAvatar( " << category->getName() << " )" << llendl; - if( gFloaterCustomize ) + if (gAgentCamera.cameraCustomizeAvatar()) { - gFloaterCustomize->askToSaveIfDirty(boost::bind(&LLAppearanceMgr::changeOutfit, - &LLAppearanceMgr::instance(), - _1, category->getUUID(), append)); - } - else - { - LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } + + LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append); } void LLAppearanceMgr::wearOutfitByName(const std::string& name) @@ -1449,16 +1492,23 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update { // Are these links to the same object? const LLViewerInventoryItem* inv_item = item_array.get(i).get(); + const LLWearableType::EType wearable_type = inv_item->getWearableType(); + + const bool is_body_part = (wearable_type == LLWearableType::WT_SHAPE) + || (wearable_type == LLWearableType::WT_HAIR) + || (wearable_type == LLWearableType::WT_EYES) + || (wearable_type == LLWearableType::WT_SKIN); + if (inv_item->getLinkedUUID() == vitem->getLinkedUUID()) { linked_already = true; } - // Are these links to different items of the same wearable + // Are these links to different items of the same body part // type? If so, new item will replace old. - // MULTI-WEARABLES: revisit if more than one per type is allowed. - else if (FALSE/*areMatchingWearables(vitem,inv_item)*/) + // TODO: MULTI-WEARABLE: check for wearable limit for clothing types + else if (is_body_part && (vitem->isWearableType()) && (vitem->getWearableType() == wearable_type)) { - if (inv_item->getIsLinkType()) + if (inv_item->getIsLinkType() && (vitem->getWearableType() == wearable_type)) { gInventory.purgeObject(inv_item->getUUID()); } @@ -1475,11 +1525,12 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update else { LLPointer<LLInventoryCallback> cb = do_update ? new ModifiedCOFCallback : 0; + const std::string description = vitem->getIsLinkType() ? vitem->getDescription() : ""; link_inventory_item( gAgent.getID(), vitem->getLinkedUUID(), getCOF(), vitem->getName(), - vitem->getDescription(), + description, LLAssetType::AT_LINK, cb); } @@ -1526,6 +1577,29 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, bool do_update) } } +void LLAppearanceMgr::removeCOFLinksOfType(LLWearableType::EType type, bool do_update) +{ + LLFindWearablesOfType filter_wearables_of_type(type); + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLInventoryModel::item_array_t::const_iterator it; + + gInventory.collectDescendentsIf(getCOF(), cats, items, true, filter_wearables_of_type); + for (it = items.begin(); it != items.end(); ++it) + { + const LLViewerInventoryItem* item = *it; + if (item->getIsLinkType()) // we must operate on links only + { + gInventory.purgeObject(item->getUUID()); + } + } + + if (do_update) + { + updateAppearanceFromCOF(); + } +} + bool sort_by_linked_uuid(const LLViewerInventoryItem* item1, const LLViewerInventoryItem* item2) { if (!item1 || !item2) @@ -1630,6 +1704,7 @@ void LLAppearanceMgr::autopopulateOutfits() // Handler for anything that's deferred until avatar de-clouds. void LLAppearanceMgr::onFirstFullyVisible() { + gAgentAvatarp->debugAvatarVisible(); autopopulateOutfits(); } @@ -1654,7 +1729,7 @@ bool LLAppearanceMgr::updateBaseOutfit() void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type) { - items_by_type.reserve(WT_COUNT); + items_by_type.reserve(LLWearableType::WT_COUNT); if (items.empty()) return; for (S32 i=0; i<items.count(); i++) @@ -1663,8 +1738,8 @@ void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t& // Ignore non-wearables. if (!item->isWearableType()) continue; - EWearableType type = item->getWearableType(); - if(type < 0 || type >= WT_COUNT) + LLWearableType::EType type = item->getWearableType(); + if(type < 0 || type >= LLWearableType::WT_COUNT) { LL_WARNS("Appearance") << "Invalid wearable type. Inventory type does not match wearable flag bitfield." << LL_ENDL; continue; @@ -1673,7 +1748,7 @@ void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t& } } -std::string build_order_string(EWearableType type, U32 i) +std::string build_order_string(LLWearableType::EType type, U32 i) { std::ostringstream order_num; order_num << ORDER_NUMBER_SEPARATOR << type * 100 + i; @@ -1682,7 +1757,7 @@ std::string build_order_string(EWearableType type, U32 i) struct WearablesOrderComparator { - WearablesOrderComparator(const EWearableType type) + WearablesOrderComparator(const LLWearableType::EType type) { mControlSize = build_order_string(type, 0).size(); }; @@ -1715,23 +1790,29 @@ struct WearablesOrderComparator U32 mControlSize; }; -void LLAppearanceMgr::updateClothingOrderingInfo() +void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id) { + if (cat_id.isNull()) + { + cat_id = getCOF(); + } + + // COF is processed if cat_id is not specified LLInventoryModel::item_array_t wear_items; - getDescendentsOfAssetType(getCOF(), wear_items, LLAssetType::AT_CLOTHING, false); + getDescendentsOfAssetType(cat_id, wear_items, LLAssetType::AT_CLOTHING, false); - wearables_by_type_t items_by_type(WT_COUNT); + wearables_by_type_t items_by_type(LLWearableType::WT_COUNT); divvyWearablesByType(wear_items, items_by_type); bool inventory_changed = false; - for (U32 type = WT_SHIRT; type < WT_COUNT; type++) + for (U32 type = LLWearableType::WT_SHIRT; type < LLWearableType::WT_COUNT; type++) { U32 size = items_by_type[type].size(); if (!size) continue; //sinking down invalid items which need reordering - std::sort(items_by_type[type].begin(), items_by_type[type].end(), WearablesOrderComparator((EWearableType) type)); + std::sort(items_by_type[type].begin(), items_by_type[type].end(), WearablesOrderComparator((LLWearableType::EType) type)); //requesting updates only for those links which don't have "valid" descriptions for (U32 i = 0; i < size; i++) @@ -1739,7 +1820,7 @@ void LLAppearanceMgr::updateClothingOrderingInfo() LLViewerInventoryItem* item = items_by_type[type][i]; if (!item) continue; - std::string new_order_str = build_order_string((EWearableType)type, i); + std::string new_order_str = build_order_string((LLWearableType::EType)type, i); if (new_order_str == item->LLInventoryItem::getDescription()) continue; item->setDescription(new_order_str); @@ -1855,7 +1936,6 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) } } - bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_body) { if (!item || !item->isWearableType()) return false; @@ -1864,11 +1944,11 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - LLFindClothesOfType filter_wearables_of_type(item->getWearableType()); + LLFindWearablesOfType filter_wearables_of_type(item->getWearableType()); gInventory.collectDescendentsIf(getCOF(), cats, items, true, filter_wearables_of_type); if (items.empty()) return false; - //*TODO all items are not guarantied to have valid descriptions (check?) + // We assume that the items have valid descriptions. std::sort(items.begin(), items.end(), WearablesOrderComparator(item->getWearableType())); if (closer_to_body && items.front() == item) return false; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 516dada39d..dbde055c3a 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -58,6 +58,9 @@ public: void wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append); void wearOutfitByName(const std::string& name); void changeOutfit(bool proceed, const LLUUID& category, bool append); + void replaceCurrentOutfit(const LLUUID& new_outfit); + void takeOffOutfit(const LLUUID& cat_id); + void addCategoryToCurrentOutfit(const LLUUID& cat_id); // Copy all items and the src category itself. void shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id, @@ -81,7 +84,7 @@ public: const LLUUID getBaseOutfitUUID(); // Wear/attach an item (from a user's inventory) on the agent - bool wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true); + bool wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true, bool replace = false); // Update the displayed outfit name in UI. void updatePanelOutfitName(const std::string& name); @@ -111,6 +114,7 @@ public: // Remove COF entries void removeCOFItemLinks(const LLUUID& item_id, bool do_update = true); + void removeCOFLinksOfType(LLWearableType::EType type, bool do_update = true); // Add COF link to ensemble folder. void addEnsembleLink(LLInventoryCategory* item, bool do_update = true); @@ -150,15 +154,16 @@ public: //Divvy items into arrays by wearable type static void divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type); + //Check ordering information on wearables stored in links' descriptions and update if it is invalid + // COF is processed if cat_id is not specified + void updateClothingOrderingInfo(LLUUID cat_id = LLUUID::null); + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); private: - //Check ordering information on wearables stored in links' descriptions and update if it is invalid - void updateClothingOrderingInfo(); - void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type); void getDescendentsOfAssetType(const LLUUID& category, diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 547a216f63..368054e002 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -153,7 +153,7 @@ #include "llworld.h" #include "llhudeffecttrail.h" #include "llvectorperfoptions.h" -#include "llurlsimstring.h" +#include "llslurl.h" #include "llwatchdog.h" // Included so that constants/settings might be initialized @@ -193,6 +193,10 @@ #include "llparcel.h" #include "llavatariconctrl.h" +// Include for security api initialization +#include "llsecapi.h" +#include "llmachineid.h" + // *FIX: These extern globals should be cleaned up. // The globals either represent state/config/resource-storage of either // this app, or another 'component' of the viewer. App globals should be @@ -503,35 +507,6 @@ public: } }; -void LLAppViewer::initGridChoice() -{ - // Load up the initial grid choice from: - // - hard coded defaults... - // - command line settings... - // - if dev build, persisted settings... - - // Set the "grid choice", this is specified by command line. - std::string grid_choice = gSavedSettings.getString("CmdLineGridChoice"); - LLViewerLogin::getInstance()->setGridChoice(grid_choice); - - // Load last server choice by default - // ignored if the command line grid choice has been set - if(grid_choice.empty()) - { - S32 server = gSavedSettings.getS32("ServerChoice"); - server = llclamp(server, 0, (S32)GRID_INFO_COUNT - 1); - if(server == GRID_INFO_OTHER) - { - std::string custom_server = gSavedSettings.getString("CustomServer"); - LLViewerLogin::getInstance()->setGridChoice(custom_server); - } - else if(server != (S32)GRID_INFO_NONE) - { - LLViewerLogin::getInstance()->setGridChoice((EGridInfo)server); - } - } -} - //virtual bool LLAppViewer::initSLURLHandler() { @@ -641,9 +616,9 @@ bool LLAppViewer::init() // *NOTE:Mani - LLCurl::initClass is not thread safe. // Called before threads are created. LLCurl::initClass(); + LLMachineID::init(); initThreads(); - writeSystemInfo(); // Build a string representing the current version number. @@ -773,10 +748,6 @@ bool LLAppViewer::init() return false; } - // Always fetch the Ethernet MAC address, needed both for login - // and password load. - LLUUID::getNodeID(gMACAddress); - // Prepare for out-of-memory situations, during which we will crash on // purpose and save a dump. #if LL_WINDOWS && LL_RELEASE_FOR_DOWNLOAD && LL_USE_SMARTHEAP @@ -888,6 +859,7 @@ bool LLAppViewer::init() } } + // save the graphics card gDebugInfo["GraphicsCard"] = LLFeatureManager::getInstance()->getGPUString(); @@ -898,6 +870,17 @@ bool LLAppViewer::init() gSimFrames = (F32)gFrameCount; LLViewerJoystick::getInstance()->init(false); + + try { + initializeSecHandler(); + } + catch (LLProtectedDataException ex) + { + LLNotificationsUtil::add("CorruptedProtectedDataStore"); + } + LLHTTPClient::setCertVerifyCallback(secapiSSLCertVerifyCallback); + + gGLActive = FALSE; if (gSavedSettings.getBOOL("QAMode") && gSavedSettings.getS32("QAModeEventHostPort") > 0) { @@ -905,7 +888,16 @@ bool LLAppViewer::init() } LLViewerMedia::initClass(); - + + LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames")); + LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames")); + LLStringOps::setupMonthNames(LLTrans::getString("dateTimeMonthNames")); + LLStringOps::setupMonthShortNames(LLTrans::getString("dateTimeMonthShortNames")); + LLStringOps::setupDayFormat(LLTrans::getString("dateTimeDayFormat")); + + LLStringOps::sAM = LLTrans::getString("dateTimeAM"); + LLStringOps::sPM = LLTrans::getString("dateTimePM"); + return true; } @@ -932,13 +924,11 @@ bool LLAppViewer::mainLoop() gServicePump = new LLPumpIO(gAPRPoolp); LLHTTPClient::setPump(*gServicePump); LLCurl::setCAFile(gDirUtilp->getCAFile()); - LLCurl::setSSLVerify(! gSavedSettings.getBOOL("NoVerifySSLCert")); - + // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be instantiated. LLVoiceChannel::initClass(); - LLVoiceClient::init(gServicePump); - + LLVoiceClient::getInstance()->init(gServicePump); LLTimer frameTimer,idleTimer; LLTimer debugTime; LLViewerJoystick* joystick(LLViewerJoystick::getInstance()); @@ -1269,7 +1259,7 @@ bool LLAppViewer::cleanup() // to ensure shutdown order LLMortician::setZealous(TRUE); - LLVoiceClient::terminate(); + LLVoiceClient::getInstance()->terminate(); disconnectViewer(); @@ -1468,13 +1458,6 @@ bool LLAppViewer::cleanup() llinfos << "Saving Data" << llendflush; - // Quitting with "Remember Password" turned off should always stomp your - // saved password, whether or not you successfully logged in. JC - if (!gSavedSettings.getBOOL("RememberPassword")) - { - LLStartUp::deletePasswordFromDisk(); - } - // Store the time of our current logoff gSavedPerAccountSettings.setU32("LastLogoff", time_corrected()); @@ -2046,7 +2029,6 @@ bool LLAppViewer::initConfiguration() } } - initGridChoice(); // If we have specified crash on startup, set the global so we'll trigger the crash at the right time if(clp.hasOption("crashonstartup")) @@ -2140,30 +2122,17 @@ bool LLAppViewer::initConfiguration() // injection and steal passwords. Phoenix. SL-55321 if(clp.hasOption("url")) { - std::string slurl = clp.getOption("url")[0]; - if (LLSLURL::isSLURLCommand(slurl)) - { - LLStartUp::sSLURLCommand = slurl; - } - else - { - LLURLSimString::setString(slurl); - } + LLStartUp::setStartSLURL(LLSLURL(clp.getOption("url")[0])); + if(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION) + { + LLGridManager::getInstance()->setGridChoice(LLStartUp::getStartSLURL().getGrid()); + + } } else if(clp.hasOption("slurl")) { - std::string slurl = clp.getOption("slurl")[0]; - if(LLSLURL::isSLURL(slurl)) - { - if (LLSLURL::isSLURLCommand(slurl)) - { - LLStartUp::sSLURLCommand = slurl; - } - else - { - LLURLSimString::setString(slurl); - } - } + LLSLURL start_slurl(clp.getOption("slurl")[0]); + LLStartUp::setStartSLURL(start_slurl); } const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); @@ -2244,18 +2213,10 @@ bool LLAppViewer::initConfiguration() // don't call anotherInstanceRunning() when doing URL handoff, as // it relies on checking a marker file which will not work when running // out of different directories - std::string slurl; - if (!LLStartUp::sSLURLCommand.empty()) - { - slurl = LLStartUp::sSLURLCommand; - } - else if (LLURLSimString::parse()) - { - slurl = LLURLSimString::getURL(); - } - if (!slurl.empty()) + + if (LLStartUp::getStartSLURL().isValid()) { - if (sendURLToOtherInstance(slurl)) + if (sendURLToOtherInstance(LLStartUp::getStartSLURL().getSLURLString())) { // successfully handed off URL to existing instance, exit return false; @@ -2311,9 +2272,9 @@ bool LLAppViewer::initConfiguration() // need to do this here - need to have initialized global settings first std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" ); - if ( nextLoginLocation.length() ) + if ( !nextLoginLocation.empty() ) { - LLURLSimString::setString( nextLoginLocation ); + LLStartUp::setStartSLURL(LLSLURL(nextLoginLocation)); }; gLastRunVersion = gSavedSettings.getString("LastRunVersion"); @@ -2396,7 +2357,7 @@ bool LLAppViewer::initWindow() LLNotificationsUI::LLNotificationManager::getInstance(); - if (gSavedSettings.getBOOL("WindowFullScreen")) + if (gSavedSettings.getBOOL("FullScreen")) { // request to go full screen... which will be delayed until login gViewerWindow->toggleFullscreen(FALSE); @@ -2534,7 +2495,7 @@ void LLAppViewer::writeSystemInfo() // The user is not logged on yet, but record the current grid choice login url // which may have been the intended grid. This can b - gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); + gDebugInfo["GridName"] = LLGridManager::getInstance()->getGridLabel(); // *FIX:Mani - move this down in llappviewerwin32 #ifdef LL_WINDOWS @@ -3025,6 +2986,44 @@ S32 LLAppViewer::getCacheVersion() return cache_version ; } +void dumpVFSCaches() +{ + llinfos << "======= Static VFS ========" << llendl; + gStaticVFS->listFiles(); +#if LL_WINDOWS + llinfos << "======= Dumping static VFS to StaticVFSDump ========" << llendl; + WCHAR w_str[MAX_PATH]; + GetCurrentDirectory(MAX_PATH, w_str); + S32 res = LLFile::mkdir("StaticVFSDump"); + if (res == -1) + { + if (errno != EEXIST) + { + llwarns << "Couldn't create dir StaticVFSDump" << llendl; + } + } + SetCurrentDirectory(utf8str_to_utf16str("StaticVFSDump").c_str()); + gStaticVFS->dumpFiles(); + SetCurrentDirectory(w_str); +#endif + + llinfos << "========= Dynamic VFS ====" << llendl; + gVFS->listFiles(); +#if LL_WINDOWS + llinfos << "========= Dumping dynamic VFS to VFSDump ====" << llendl; + res = LLFile::mkdir("VFSDump"); + if (res == -1) + { + if (errno != EEXIST) + { + llwarns << "Couldn't create dir VFSDump" << llendl; + } + } + SetCurrentDirectory(utf8str_to_utf16str("VFSDump").c_str()); + gVFS->dumpFiles(); + SetCurrentDirectory(w_str); +#endif +} bool LLAppViewer::initCache() { mPurgeCache = false; @@ -3242,11 +3241,12 @@ bool LLAppViewer::initCache() { LLVFile::initClass(); - //llinfos << "Static VFS listing" << llendl; - //gStaticVFS->listFiles(); - - //llinfos << "regular VFS listing" << llendl; - //gVFS->listFiles(); +#ifndef LL_RELEASE_FOR_DOWNLOAD + if (gSavedSettings.getBOOL("DumpVFSCaches")) + { + dumpVFSCaches(); + } +#endif return true; } @@ -3911,7 +3911,7 @@ void LLAppViewer::sendLogoutRequest() gLogoutMaxTime = LOGOUT_REQUEST_TIME; mLogoutRequestSent = TRUE; - gVoiceClient->leaveChannel(); + LLVoiceClient::getInstance()->leaveChannel(); //Set internal status variables and marker files gLogoutInProgress = TRUE; @@ -4324,7 +4324,7 @@ void LLAppViewer::launchUpdater() #endif // *TODO change userserver to be grid on both viewer and sim, since // userserver no longer exists. - query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel(); + query_map["userserver"] = LLGridManager::getInstance()->getGridLabel(); query_map["channel"] = gSavedSettings.getString("VersionChannelName"); // *TODO constantize this guy // *NOTE: This URL is also used in win_setup/lldownloader.cpp @@ -4337,10 +4337,10 @@ void LLAppViewer::launchUpdater() LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ; // if a sim name was passed in via command line parameter (typically through a SLURL) - if ( LLURLSimString::sInstance.mSimString.length() ) + if ( LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION ) { // record the location to start at next time - gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); + gSavedSettings.setString( "NextLoginLocation", LLStartUp::getStartSLURL().getSLURLString()); }; #if LL_WINDOWS diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 60645c46d4..5acd6e11c4 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -193,7 +193,6 @@ private: bool initThreads(); // Initialize viewer threads, return false on failure. bool initConfiguration(); // Initialize settings from the command line/config file. - void initGridChoice(); bool initCache(); // Initialize local client cache. diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index d34bcb4a68..78b0f7ba83 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -604,7 +604,7 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze) {cmd.c_str(), ask_dialog, "-user", - (char*)LLViewerLogin::getInstance()->getGridLabel().c_str(), + (char*)LLGridManager::getInstance()->getGridLabel().c_str(), "-name", LLAppViewer::instance()->getSecondLifeTitle().c_str(), NULL}; diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 44ef39fb7d..0b5f18c330 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -44,7 +44,6 @@ #include "llviewernetwork.h" #include "llviewercontrol.h" #include "llmd5.h" -#include "llurlsimstring.h" #include "llfloaterworldmap.h" #include "llurldispatcher.h" #include <Carbon/Carbon.h> diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 2f90d652e4..27dcb9f1c7 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -37,7 +37,7 @@ // viewer includes #include "llagent.h" #include "llcompilequeue.h" -#include "llfloaterbuycurrency.h" +#include "llbuycurrencyhtml.h" #include "llfilepicker.h" #include "llinventorydefines.h" #include "llinventoryobserver.h" @@ -186,7 +186,7 @@ void LLAssetUploadResponder::uploadFailure(const LLSD& content) S32 price = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", price); - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs", args), price); + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("uploading_costs", args), price ); } else { diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 764d54a987..875ed72a12 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -54,7 +54,9 @@ #include "llfloaterreg.h" #include "llfloaterpay.h" #include "llfloaterworldmap.h" +#include "llgiveinventory.h" #include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType +#include "llinventorypanel.h" #include "llimview.h" // for gIMMgr #include "llmutelist.h" #include "llnotificationsutil.h" // for LLNotificationsUtil @@ -286,7 +288,7 @@ bool LLAvatarActions::isCalling(const LLUUID &id) //static bool LLAvatarActions::canCall() { - return LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + return LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); } // static @@ -429,13 +431,107 @@ void LLAvatarActions::share(const LLUUID& id) } } +namespace action_give_inventory +{ + typedef std::set<LLUUID> uuid_set_t; + + /** + * Checks My Inventory visibility. + */ + static bool is_give_inventory_acceptable() + { + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + if (NULL == active_panel) return false; + + // check selection in the panel + const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); + if (inventory_selected_uuids.empty()) return false; // nothing selected + + bool acceptable = false; + uuid_set_t::const_iterator it = inventory_selected_uuids.begin(); + const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end(); + for (; it != it_end; ++it) + { + LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it); + // any category can be offered. + if (inv_cat) + { + acceptable = true; + continue; + } + + LLViewerInventoryItem* inv_item = gInventory.getItem(*it); + // check if inventory item can be given + if (LLGiveInventory::isInventoryGiveAcceptable(inv_item)) + { + acceptable = true; + continue; + } + + // there are neither item nor category in inventory + acceptable = false; + break; + } + return acceptable; + } + + /** + * Performs "give inventory" operations for provided avatars. + * + * Sends one requests to give all selected inventory items for each passed avatar. + * Avatars are represent by two vectors: names and UUIDs which must be sychronized with each other. + * + * @param avatar_names - avatar names request to be sent. + * @param avatar_uuids - avatar names request to be sent. + */ + static void give_inventory(const std::vector<std::string>& avatar_names, const uuid_vec_t& avatar_uuids) + { + llassert(avatar_names.size() == avatar_uuids.size()); + + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + if (NULL == active_panel) return; + + const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); + if (inventory_selected_uuids.empty()) return; + + S32 count = llmin(avatar_names.size(), avatar_uuids.size()); + + // iterate through avatars + for(S32 i = 0; i < count; ++i) + { + const std::string& avatar_name = avatar_names[i]; + const LLUUID& avatar_uuid = avatar_uuids[i]; + + // Start up IM before give the item + const LLUUID session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, avatar_uuid); + + uuid_set_t::const_iterator it = inventory_selected_uuids.begin(); + const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end(); + + // iterate through selected inventory objects + for (; it != it_end; ++it) + { + LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it); + if (inv_cat) + { + LLGiveInventory::doGiveInventoryCategory(avatar_uuid, inv_cat, session_id); + break; + } + LLViewerInventoryItem* inv_item = gInventory.getItem(*it); + LLGiveInventory::doGiveInventoryItem(avatar_uuid, inv_item, session_id); + } + } + } +} + //static void LLAvatarActions::shareWithAvatars() { - LLFloaterAvatarPicker* picker = - LLFloaterAvatarPicker::show(NULL, FALSE, TRUE); - picker->setOkBtnEnableCb(boost::lambda::constant(false)); + using namespace action_give_inventory; + LLFloaterAvatarPicker* picker = + LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2), TRUE, FALSE); + picker->setOkBtnEnableCb(boost::bind(is_give_inventory_acceptable)); LLNotificationsUtil::add("ShareNotification"); } diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index dfb213716c..3275d784a3 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -32,19 +32,22 @@ #include "llviewerprecompiledheaders.h" +#include "llavatarlist.h" + // common #include "lltrans.h" #include "llcommonutils.h" -#include "llavatarlist.h" -#include "llagentdata.h" // for comparator +// llui +#include "lltextutil.h" // newview +#include "llagentdata.h" // for comparator #include "llavatariconctrl.h" #include "llcallingcard.h" // for LLAvatarTracker #include "llcachename.h" +#include "lllistcontextmenu.h" #include "llrecentpeople.h" -#include "lltextutil.h" #include "lluuid.h" #include "llvoiceclient.h" #include "llviewercontrol.h" // for gSavedSettings @@ -316,9 +319,7 @@ void LLAvatarList::refresh() } // Send refresh_complete signal. - std::vector<LLSD> cur_values; - getValues(cur_values); - mRefreshCompleteSignal(this, LLSD((S32)cur_values.size())); + mRefreshCompleteSignal(this, LLSD((S32)size(false))); } // Commit if we've added/removed items. @@ -401,6 +402,15 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask) return handled; } +void LLAvatarList::setVisible(BOOL visible) +{ + if ( visible == FALSE && mContextMenu ) + { + mContextMenu->hide(); + } + LLFlatListViewEx::setVisible(visible); +} + void LLAvatarList::computeDifference( const uuid_vec_t& vnew_unsorted, uuid_vec_t& vadded, diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index ff090f3a34..fffc6e6e73 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -38,6 +38,7 @@ #include "llavatarlistitem.h" class LLTimer; +class LLListContextMenu; /** * Generic list of avatars. @@ -70,12 +71,14 @@ public: virtual void clear(); + virtual void setVisible(BOOL visible); + void setNameFilter(const std::string& filter); void setDirty(bool val = true, bool force_refresh = false); uuid_vec_t& getIDs() { return mIDs; } bool contains(const LLUUID& id); - void setContextMenu(LLAvatarListItem::ContextMenu* menu) { mContextMenu = menu; } + void setContextMenu(LLListContextMenu* menu) { mContextMenu = menu; } void setSessionID(const LLUUID& session_id) { mSessionID = session_id; } const LLUUID& getSessionID() { return mSessionID; } @@ -125,7 +128,7 @@ private: uuid_vec_t mIDs; LLUUID mSessionID; - LLAvatarListItem::ContextMenu* mContextMenu; + LLListContextMenu* mContextMenu; commit_signal_t mRefreshCompleteSignal; mouse_signal_t mItemDoubleClickSignal; diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 2a51eeacfc..c74075d67f 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -1,6 +1,6 @@ /** * @file llavatarlistitem.cpp - * @avatar list item source file + * @brief avatar list item source file * * $LicenseInfo:firstyear=2009&license=viewergpl$ * @@ -36,12 +36,13 @@ #include "llavataractions.h" #include "llavatarlistitem.h" +#include "llbutton.h" #include "llfloaterreg.h" +#include "lltextutil.h" + #include "llagent.h" -#include "lloutputmonitorctrl.h" #include "llavatariconctrl.h" -#include "lltextutil.h" -#include "llbutton.h" +#include "lloutputmonitorctrl.h" bool LLAvatarListItem::sStaticInitialized = false; S32 LLAvatarListItem::sLeftPadding = 0; diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 3ba2c7a3e3..ba9c3574d5 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -1,6 +1,6 @@ /** * @file llavatarlistitem.h - * @avatar list item header file + * @brief avatar list item header file * * $LicenseInfo:firstyear=2009&license=viewergpl$ * @@ -67,12 +67,6 @@ public: IS_OFFLINE, } EItemState; - class ContextMenu - { - public: - virtual void show(LLView* spawning_view, const uuid_vec_t& selected_uuids, S32 x, S32 y) = 0; - }; - /** * Creates an instance of LLAvatarListItem. * diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 4ebccbe731..ff1e8a9657 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -35,20 +35,32 @@ #define LLBOTTOMTRAY_CPP #include "llbottomtray.h" -#include "llagentcamera.h" -#include "llchiclet.h" +// library includes #include "llfloaterreg.h" #include "llflyoutbutton.h" -#include "llimfloater.h" // for LLIMFloater #include "lllayoutstack.h" -#include "llnearbychatbar.h" +#include "llnotifications.h" #include "llnotificationsutil.h" +#include "lltexteditor.h" + +// newview includes +#include "llagentcamera.h" +#include "llchiclet.h" +#include "llfloatercamera.h" +#include "llimfloater.h" // for LLIMFloater +#include "llnearbychatbar.h" #include "llspeakbutton.h" #include "llsplitbutton.h" #include "llsyswellwindow.h" -#include "llfloatercamera.h" -#include "lltexteditor.h" -#include "llnotifications.h" +#include "lltoolmgr.h" +#include "llviewerparcelmgr.h" + +static void update_build_button_enable_state() +{ + bool can_edit = LLToolMgr::getInstance()->canEdit(); + + LLBottomTray::getInstance()->childSetEnabled("build_btn", can_edit); +} // Build time optimization, generate extern template once in .cpp file template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance(); @@ -61,7 +73,7 @@ namespace const std::string& PANEL_CAMERA_NAME = "cam_panel"; const std::string& PANEL_GESTURE_NAME = "gesture_panel"; - S32 get_panel_min_width(LLLayoutStack* stack, LLPanel* panel) + S32 get_panel_min_width(LLLayoutStack* stack, LLView* panel) { S32 minimal_width = 0; llassert(stack); @@ -144,10 +156,6 @@ LLBottomTray::LLBottomTray(const LLSD&) , mMovementButton(NULL) , mResizeState(RS_NORESIZE) , mBottomTrayContextMenu(NULL) -, mMovementPanel(NULL) -, mCamPanel(NULL) -, mSnapshotPanel(NULL) -, mGesturePanel(NULL) , mCamButton(NULL) , mBottomTrayLite(NULL) , mIsInLiteMode(false) @@ -160,7 +168,7 @@ LLBottomTray::LLBottomTray(const LLSD&) LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml"); - LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraPresets, _2)); + LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); //this is to fix a crash that occurs because LLBottomTray is a singleton //and thus is deleted at the end of the viewers lifetime, but to be cleanly @@ -183,6 +191,19 @@ LLBottomTray::~LLBottomTray() { LLIMMgr::getInstance()->removeSessionObserver(this); } + + if (mNearbyChatBar) + { + // store custom width of chatbar panel. + S32 custom_width = mNearbyChatBar->getRect().getWidth(); + gSavedSettings.setS32("ChatBarCustomWidth", custom_width); + } + + // emulate previous floater behavior to be hidden on startup. + // override effect of save_visibility=true. + // this attribute is necessary to button.initial_callback=Button.SetFloaterToggle works properly: + // i.g when floater changes its visibility - button changes its toggle state. + getChild<LLUICtrl>("search_btn")->setControlValue(false); } // *TODO Vadim: why void* ? @@ -301,7 +322,7 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b // skipped to avoid button blinking if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL) { - mSpeakBtn->setFlyoutBtnEnabled(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()); + mSpeakBtn->setFlyoutBtnEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); } } @@ -361,6 +382,20 @@ S32 LLBottomTray::notifyParent(const LLSD& info) showWellButton("im_well" == chiclet_name ? RS_IM_WELL : RS_NOTIFICATION_WELL, should_be_visible); return 1; } + + if (info.has("action") && info["action"] == "resize") + { + const std::string& name = info["view_name"]; + + // expected only resize of nearby chatbar + if (mNearbyChatBar->getName() != name) return LLPanel::notifyParent(info); + + const S32 new_width = info["new_width"]; + + processChatbarCustomization(new_width); + + return 2; + } return LLPanel::notifyParent(info); } @@ -388,22 +423,12 @@ void LLBottomTray::updateContextMenu(S32 x, S32 y, MASK mask) bool in_edit_box = edit_box->pointInView(local_x, local_y); - LLMenuItemGL* menu_item; - menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Cut"); - if(menu_item) - menu_item->setVisible(in_edit_box); - menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Copy"); - if(menu_item) - menu_item->setVisible(in_edit_box); - menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Paste"); - if(menu_item) - menu_item->setVisible(in_edit_box); - menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Delete"); - if(menu_item) - menu_item->setVisible(in_edit_box); - menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Select_All"); - if(menu_item) - menu_item->setVisible(in_edit_box); + mBottomTrayContextMenu->setItemVisible("Separator", in_edit_box); + mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Cut", in_edit_box); + mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Copy", in_edit_box); + mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Paste", in_edit_box); + mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Delete", in_edit_box); + mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Select_All", in_edit_box); } void LLBottomTray::showGestureButton(BOOL visible) @@ -450,12 +475,8 @@ BOOL LLBottomTray::postBuild() mNearbyChatBar = getChild<LLNearbyChatBar>("chat_bar"); mToolbarStack = getChild<LLLayoutStack>("toolbar_stack"); - mMovementPanel = getChild<LLPanel>("movement_panel"); - mMovementButton = mMovementPanel->getChild<LLButton>("movement_btn"); - mGesturePanel = getChild<LLPanel>("gesture_panel"); - mCamPanel = getChild<LLPanel>("cam_panel"); - mCamButton = mCamPanel->getChild<LLButton>("camera_btn"); - mSnapshotPanel = getChild<LLPanel>("snapshot_panel"); + mMovementButton = getChild<LLButton>("movement_btn"); + mCamButton = getChild<LLButton>("camera_btn"); setRightMouseDownCallback(boost::bind(&LLBottomTray::showBottomTrayContextMenu,this, _2, _3,_4)); mSpeakPanel = getChild<LLPanel>("speak_panel"); @@ -471,23 +492,24 @@ BOOL LLBottomTray::postBuild() mSpeakBtn->setShowToolTip( getString("VoiceControlBtnToolTip") ); // Registering Chat Bar to receive Voice client status change notifications. - gVoiceClient->addObserver(this); - - mObjectDefaultWidthMap[RS_BUTTON_GESTURES] = mGesturePanel->getRect().getWidth(); - mObjectDefaultWidthMap[RS_BUTTON_MOVEMENT] = mMovementPanel->getRect().getWidth(); - mObjectDefaultWidthMap[RS_BUTTON_CAMERA] = mCamPanel->getRect().getWidth(); - mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); + LLVoiceClient::getInstance()->addObserver(this); mNearbyChatBar->getChatBox()->setContextMenu(NULL); mChicletPanel = getChild<LLChicletPanel>("chiclet_list"); - initStateProcessedObjectMap(); + initResizeStateContainers(); + + setButtonsControlsAndListeners(); + + initButtonsVisibility(); // update wells visibility: showWellButton(RS_IM_WELL, !LLIMWellWindow::getInstance()->isWindowEmpty()); showWellButton(RS_NOTIFICATION_WELL, !LLNotificationWellWindow::getInstance()->isWindowEmpty()); + LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&update_build_button_enable_state)); + return TRUE; } @@ -649,6 +671,24 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) if (mNearbyChatBar) log(mNearbyChatBar, "after"); if (mChicletPanel) log(mChicletPanel, "after"); + + + // Restore width of the chatbar on first reshape. + // we can not to do this from postBuild because reshape is called from parent view on startup + // creation after it and reset width according to resize logic. + static bool needs_restore_custom_state = true; + if (mNearbyChatBar && needs_restore_custom_state) + { + // restore custom width of chatbar panel. + S32 new_width = gSavedSettings.getS32("ChatBarCustomWidth"); + if (new_width > 0) + { + processChatbarCustomization(new_width); + mNearbyChatBar->reshape(new_width, mNearbyChatBar->getRect().getHeight()); + } + needs_restore_custom_state = false; + } + } S32 LLBottomTray::processWidthDecreased(S32 delta_width) @@ -711,27 +751,9 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) S32 buttons_freed_width = 0; if (still_should_be_processed) { - processShrinkButtons(&delta_width, &buttons_freed_width); + processShrinkButtons(delta_width, buttons_freed_width); - if (delta_width < 0) - { - processHideButton(RS_BUTTON_SNAPSHOT, &delta_width, &buttons_freed_width); - } - - if (delta_width < 0) - { - processHideButton(RS_BUTTON_CAMERA, &delta_width, &buttons_freed_width); - } - - if (delta_width < 0) - { - processHideButton(RS_BUTTON_MOVEMENT, &delta_width, &buttons_freed_width); - } - - if (delta_width < 0) - { - processHideButton(RS_BUTTON_GESTURES, &delta_width, &buttons_freed_width); - } + processHideButtons(delta_width, buttons_freed_width); if (delta_width < 0) { @@ -776,27 +798,10 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) << llendl; S32 available_width = total_available_width; - if (available_width > 0) - { - processShowButton(RS_BUTTON_GESTURES, &available_width); - } - if (available_width > 0) - { - processShowButton(RS_BUTTON_MOVEMENT, &available_width); - } + processShowButtons(available_width); - if (available_width > 0) - { - processShowButton(RS_BUTTON_CAMERA, &available_width); - } - - if (available_width > 0) - { - processShowButton(RS_BUTTON_SNAPSHOT, &available_width); - } - - processExtendButtons(&available_width); + processExtendButtons(available_width); // if we have to show/extend some buttons but resized delta width is not enough... S32 processed_width = total_available_width - available_width; @@ -853,7 +858,23 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) } } -bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* available_width) +void LLBottomTray::processShowButtons(S32& available_width) +{ + // process buttons from left to right + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + + for (; it != it_end; ++it) + { + // is there available space? + if (available_width <= 0) break; + + // try to show next button + processShowButton(*it, available_width); + } +} + +bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32& available_width) { lldebugs << "Trying to show object type: " << shown_object_type << llendl; llassert(mStateProcessedObjectMap[shown_object_type] != NULL); @@ -869,15 +890,15 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa { //validate if we have enough room to show this button const S32 required_width = panel->getRect().getWidth(); - can_be_shown = *available_width >= required_width; + can_be_shown = available_width >= required_width; if (can_be_shown) { - *available_width -= required_width; + available_width -= required_width; setTrayButtonVisible(shown_object_type, true); lldebugs << "processed object type: " << shown_object_type - << ", rest available width: " << *available_width + << ", rest available width: " << available_width << llendl; mResizeState &= ~shown_object_type; } @@ -885,7 +906,23 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa return can_be_shown; } -void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width) +void LLBottomTray::processHideButtons(S32& required_width, S32& buttons_freed_width) +{ + // process buttons from right to left + resize_state_vec_t::const_reverse_iterator it = mButtonsProcessOrder.rbegin(); + const resize_state_vec_t::const_reverse_iterator it_end = mButtonsProcessOrder.rend(); + + for (; it != it_end; ++it) + { + // is it still necessary to hide a button? + if (required_width >= 0) break; + + // try to hide next button + processHideButton(*it, required_width, buttons_freed_width); + } +} + +void LLBottomTray::processHideButton(EResizeState processed_object_type, S32& required_width, S32& buttons_freed_width) { lldebugs << "Trying to hide object type: " << processed_object_type << llendl; llassert(mStateProcessedObjectMap[processed_object_type] != NULL); @@ -899,11 +936,11 @@ void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* re if (panel->getVisible()) { - *required_width += panel->getRect().getWidth(); + required_width += panel->getRect().getWidth(); - if (*required_width > 0) + if (required_width > 0) { - *buttons_freed_width += *required_width; + buttons_freed_width += required_width; } setTrayButtonVisible(processed_object_type, false); @@ -911,24 +948,29 @@ void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* re mResizeState |= processed_object_type; lldebugs << "processing object type: " << processed_object_type - << ", buttons_freed_width: " << *buttons_freed_width + << ", buttons_freed_width: " << buttons_freed_width << llendl; } } -void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_width) +void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_width) { - processShrinkButton(RS_BUTTON_CAMERA, required_width); + // process buttons from right to left + resize_state_vec_t::const_reverse_iterator it = mButtonsProcessOrder.rbegin(); + const resize_state_vec_t::const_reverse_iterator it_end = mButtonsProcessOrder.rend(); - if (*required_width < 0) - { - processShrinkButton(RS_BUTTON_MOVEMENT, required_width); - } - if (*required_width < 0) + // iterate through buttons in the mButtonsProcessOrder first + for (; it != it_end; ++it) { - processShrinkButton(RS_BUTTON_GESTURES, required_width); + // is it still necessary to hide a button? + if (required_width >= 0) break; + + // try to shrink next button + processShrinkButton(*it, required_width); } - if (*required_width < 0) + + // then shrink Speak button + if (required_width < 0) { S32 panel_min_width = 0; @@ -948,23 +990,23 @@ void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_ mSpeakBtn->setLabelVisible(false); mSpeakPanel->reshape(panel_width - possible_shrink_width, mSpeakPanel->getRect().getHeight()); - *required_width += possible_shrink_width; + required_width += possible_shrink_width; - if (*required_width > 0) + if (required_width > 0) { - *buttons_freed_width += *required_width; + buttons_freed_width += required_width; } - lldebugs << "Shrunk panel: " << panel_name + lldebugs << "Shrunk Speak button panel: " << panel_name << ", shrunk width: " << possible_shrink_width - << ", rest width to process: " << *required_width + << ", rest width to process: " << required_width << llendl; } } } } -void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32* required_width) +void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& required_width) { llassert(mStateProcessedObjectMap[processed_object_type] != NULL); LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; @@ -992,63 +1034,68 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32* // let calculate real width to shrink // 1. apply all possible width - *required_width += possible_shrink_width; + required_width += possible_shrink_width; // 2. it it is too much... - if (*required_width > 0) + if (required_width > 0) { // reduce applied shrunk width to the excessive value. - possible_shrink_width -= *required_width; - *required_width = 0; + possible_shrink_width -= required_width; + required_width = 0; } panel->reshape(panel_width - possible_shrink_width, panel->getRect().getHeight()); lldebugs << "Shrunk panel: " << panel_name << ", shrunk width: " << possible_shrink_width - << ", rest width to process: " << *required_width + << ", rest width to process: " << required_width << llendl; } } } -void LLBottomTray::processExtendButtons(S32* available_width) +void LLBottomTray::processExtendButtons(S32& available_width) { - // do not allow extending any buttons if we have some buttons hidden + // do not allow extending any buttons if we have some buttons hidden via resize if (mResizeState & RS_BUTTONS_CAN_BE_HIDDEN) return; - processExtendButton(RS_BUTTON_GESTURES, available_width); + // process buttons from left to right + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); - if (*available_width > 0) - { - processExtendButton(RS_BUTTON_MOVEMENT, available_width); - } - if (*available_width > 0) + // iterate through buttons in the mButtonsProcessOrder first + for (; it != it_end; ++it) { - processExtendButton(RS_BUTTON_CAMERA, available_width); + // is there available space? + if (available_width <= 0) break; + + // try to extend next button + processExtendButton(*it, available_width); } - if (*available_width > 0) + + // then try to extend Speak button + if (available_width > 0) { S32 panel_max_width = mObjectDefaultWidthMap[RS_BUTTON_SPEAK]; S32 panel_width = mSpeakPanel->getRect().getWidth(); S32 possible_extend_width = panel_max_width - panel_width; - if (possible_extend_width >= 0 && possible_extend_width <= *available_width) // HACK: this button doesn't change size so possible_extend_width will be 0 + if (possible_extend_width >= 0 && possible_extend_width <= available_width) // HACK: this button doesn't change size so possible_extend_width will be 0 { mSpeakBtn->setLabelVisible(true); mSpeakPanel->reshape(panel_max_width, mSpeakPanel->getRect().getHeight()); log(mSpeakBtn, "speak button is extended"); - *available_width -= possible_extend_width; + available_width -= possible_extend_width; - lldebugs << "Extending panel: " << mSpeakPanel->getName() + lldebugs << "Extending Speak button panel: " << mSpeakPanel->getName() << ", extended width: " << possible_extend_width - << ", rest width to process: " << *available_width + << ", rest width to process: " << available_width << llendl; } } } -void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32* available_width) +void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& available_width) { llassert(mStateProcessedObjectMap[processed_object_type] != NULL); LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; @@ -1069,64 +1116,141 @@ void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32* // let calculate real width to extend // 1. apply all possible width - *available_width -= possible_extend_width; + available_width -= possible_extend_width; // 2. it it is too much... - if (*available_width < 0) + if (available_width < 0) { // reduce applied extended width to the excessive value. - possible_extend_width += *available_width; - *available_width = 0; + possible_extend_width += available_width; + available_width = 0; } panel->reshape(panel_width + possible_extend_width, panel->getRect().getHeight()); lldebugs << "Extending panel: " << panel->getName() << ", extended width: " << possible_extend_width - << ", rest width to process: " << *available_width + << ", rest width to process: " << available_width << llendl; } } bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const { + // 0. Check if passed button was previously hidden on resize bool can_be_shown = mResizeState & processed_object_type; if (can_be_shown) { - static MASK MOVEMENT_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES; - static MASK CAMERA_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES | RS_BUTTON_MOVEMENT; - static MASK SNAPSHOT_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES | RS_BUTTON_MOVEMENT | RS_BUTTON_CAMERA; + // Yes, it was. Lets now check that all buttons before it (that can be hidden on resize) + // are already shown - switch(processed_object_type) + // process buttons in direct order (from left to right) + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + + // 1. Find and accumulate all buttons types before one passed into the method. + MASK buttons_before_mask = RS_NORESIZE; + for (; it != it_end; ++it) { - case RS_BUTTON_GESTURES: // Gestures should be shown first - break; - case RS_BUTTON_MOVEMENT: // Move only if gesture is shown - can_be_shown = !(MOVEMENT_PREVIOUS_BUTTONS_MASK & mResizeState); - break; - case RS_BUTTON_CAMERA: - can_be_shown = !(CAMERA_PREVIOUS_BUTTONS_MASK & mResizeState); - break; - case RS_BUTTON_SNAPSHOT: - can_be_shown = !(SNAPSHOT_PREVIOUS_BUTTONS_MASK & mResizeState); - break; - default: // nothing to do here - break; + const EResizeState button_type = *it; + if (button_type == processed_object_type) break; + + buttons_before_mask |= button_type; } + + // 2. Check if some previous buttons are still hidden on resize + can_be_shown = !(buttons_before_mask & mResizeState); } return can_be_shown; } -void LLBottomTray::initStateProcessedObjectMap() +void LLBottomTray::initResizeStateContainers() +{ + // init map with objects should be processed for each type + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild<LLPanel>("gesture_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLPanel>("movement_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLPanel>("cam_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, getChild<LLPanel>("snapshot_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SIDEBAR, getChild<LLPanel>("sidebar_btn_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_BUILD, getChild<LLPanel>("build_btn_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SEARCH, getChild<LLPanel>("search_btn_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_WORLD_MAP, getChild<LLPanel>("world_map_btn_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MINI_MAP, getChild<LLPanel>("mini_map_btn_panel"))); + + // init an order of processed buttons + mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES); + mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT); + mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA); + mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT); + mButtonsProcessOrder.push_back(RS_BUTTON_SIDEBAR); + mButtonsProcessOrder.push_back(RS_BUTTON_BUILD); + mButtonsProcessOrder.push_back(RS_BUTTON_SEARCH); + mButtonsProcessOrder.push_back(RS_BUTTON_WORLD_MAP); + mButtonsProcessOrder.push_back(RS_BUTTON_MINI_MAP); + + // init default widths + + // process buttons that can be hidden on resize... + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + + for (; it != it_end; ++it) + { + const EResizeState button_type = *it; + // is there an appropriate object? + llassert(mStateProcessedObjectMap.count(button_type) > 0); + if (0 == mStateProcessedObjectMap.count(button_type)) continue; + + // set default width for it. + mObjectDefaultWidthMap[button_type] = mStateProcessedObjectMap[button_type]->getRect().getWidth(); + } + + // ... and add Speak button because it also can be shrunk. + mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); + +} + +// this method must be called before restoring of the chat entry field on startup +// because it resets chatbar's width according to resize logic. +void LLBottomTray::initButtonsVisibility() +{ + setVisibleAndFitWidths(RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton")); + setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton")); + setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton")); + setVisibleAndFitWidths(RS_BUTTON_SNAPSHOT, gSavedSettings.getBOOL("ShowSnapshotButton")); + setVisibleAndFitWidths(RS_BUTTON_SIDEBAR, gSavedSettings.getBOOL("ShowSidebarButton")); + setVisibleAndFitWidths(RS_BUTTON_BUILD, gSavedSettings.getBOOL("ShowBuildButton")); + setVisibleAndFitWidths(RS_BUTTON_SEARCH, gSavedSettings.getBOOL("ShowSearchButton")); + setVisibleAndFitWidths(RS_BUTTON_WORLD_MAP, gSavedSettings.getBOOL("ShowWorldMapButton")); + setVisibleAndFitWidths(RS_BUTTON_MINI_MAP, gSavedSettings.getBOOL("ShowMiniMapButton")); +} + +void LLBottomTray::setButtonsControlsAndListeners() { - mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, mGesturePanel)); - mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, mMovementPanel)); - mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, mCamPanel)); - mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel)); - - mDummiesMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild<LLUICtrl>("after_gesture_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLUICtrl>("after_movement_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLUICtrl>("after_cam_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_SPEAK, getChild<LLUICtrl>("after_speak_panel"))); + gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2)); + gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2)); + gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2)); + gSavedSettings.getControl("ShowSnapshotButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SNAPSHOT, _2)); + gSavedSettings.getControl("ShowSidebarButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SIDEBAR, _2)); + gSavedSettings.getControl("ShowBuildButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_BUILD, _2)); + gSavedSettings.getControl("ShowSearchButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SEARCH, _2)); + gSavedSettings.getControl("ShowWorldMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_WORLD_MAP, _2)); + gSavedSettings.getControl("ShowMiniMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MINI_MAP, _2)); + + + LLButton* build_btn = getChild<LLButton>("build_btn"); + // set control name for Build button. It is not enough to link it with Button.SetFloaterToggle in xml + std::string vis_control_name = LLFloaterReg::declareVisibilityControl("build"); + // Set the button control value (toggle state) to the floater visibility control (Sets the value as well) + build_btn->setControlVariable(LLUI::sSettingGroups["floater"]->getControl(vis_control_name)); +} + +bool LLBottomTray::toggleShowButton(LLBottomTray::EResizeState button_type, const LLSD& new_visibility) +{ + if (LLBottomTray::instanceExists()) + { + LLBottomTray::getInstance()->setTrayButtonVisibleIfPossible(button_type, new_visibility.asBoolean()); + } + return true; } void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible) @@ -1140,12 +1264,6 @@ void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool vis } panel->setVisible(visible); - - if (mDummiesMap.count(shown_object_type)) - { - // Hide/show layout panel for dummy icon. - mDummiesMap[shown_object_type]->getParent()->setVisible(visible); - } } void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible, bool raise_notification) @@ -1168,20 +1286,13 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible return false; } - const S32 dummy_width = mDummiesMap.count(object_type) - ? mDummiesMap[object_type]->getParent()->getRect().getWidth() - : 0; - bool is_set = true; if (visible) { - // Assume that only chiclet panel can be auto-resized and - // don't take into account width of dummy widgets + // Assume that only chiclet panel can be auto-resized const S32 available_width = - mChicletPanel->getParent()->getRect().getWidth() - - mChicletPanel->getMinWidth() - - dummy_width; + mChicletPanel->getParent()->getRect().getWidth() - mChicletPanel->getMinWidth(); S32 preferred_width = mObjectDefaultWidthMap[object_type]; S32 current_width = cur_panel->getRect().getWidth(); @@ -1205,17 +1316,18 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible const S32 chatbar_shrunk_width = mNearbyChatBar->getRect().getWidth() - get_panel_min_width(mToolbarStack, mNearbyChatBar); - const S32 sum_of_min_widths = - get_panel_min_width(mToolbarStack, mStateProcessedObjectMap[RS_BUTTON_CAMERA]) + - get_panel_min_width(mToolbarStack, mStateProcessedObjectMap[RS_BUTTON_MOVEMENT]) + - get_panel_min_width(mToolbarStack, mStateProcessedObjectMap[RS_BUTTON_GESTURES]) + - get_panel_min_width(mToolbarStack, mSpeakPanel); + S32 sum_of_min_widths = get_panel_min_width(mToolbarStack, mSpeakPanel); + S32 sum_of_curr_widths = get_curr_width(mSpeakPanel); - const S32 sum_of_curr_widths = - get_curr_width(mStateProcessedObjectMap[RS_BUTTON_CAMERA]) + - get_curr_width(mStateProcessedObjectMap[RS_BUTTON_MOVEMENT]) + - get_curr_width(mStateProcessedObjectMap[RS_BUTTON_GESTURES]) + - get_curr_width(mSpeakPanel); + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + + for (; it != it_end; ++it) + { + LLPanel * cur_panel = mStateProcessedObjectMap[*it]; + sum_of_min_widths += get_panel_min_width(mToolbarStack, cur_panel); + sum_of_curr_widths += get_curr_width(cur_panel); + } const S32 possible_shrunk_width = chatbar_shrunk_width + (sum_of_curr_widths - sum_of_min_widths); @@ -1244,12 +1356,12 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible current_width = result_width; } - is_set = processShowButton(object_type, ¤t_width); + is_set = processShowButton(object_type, current_width); // Shrink buttons if needed if (is_set && decrease_width) { - processWidthDecreased( -result_width - dummy_width ); + processWidthDecreased( -result_width); } } else @@ -1264,7 +1376,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible // Extend other buttons if need if (delta_width) { - processWidthIncreased(delta_width + dummy_width); + processWidthIncreased(delta_width); } } return is_set; @@ -1295,4 +1407,34 @@ void LLBottomTray::showWellButton(EResizeState object_type, bool visible) } } +void LLBottomTray::processChatbarCustomization(S32 new_width) +{ + if (NULL == mNearbyChatBar) return; + + const S32 delta_width = mNearbyChatBar->getRect().getWidth() - new_width; + + if (delta_width == 0) return; + + LLView * chiclet_layout_panel = mChicletPanel->getParent(); + const S32 chiclet_min_width = get_panel_min_width(mToolbarStack, chiclet_layout_panel); + const S32 chiclet_panel_width = chiclet_layout_panel->getRect().getWidth(); + const S32 available_chiclet_shrink_width = chiclet_panel_width - chiclet_min_width; + llassert(available_chiclet_shrink_width >= 0); + + if (delta_width > 0) // panel gets narrowly + { + S32 total_possible_width = delta_width + available_chiclet_shrink_width; + processShowButtons(total_possible_width); + processExtendButtons(total_possible_width); + } + // here (delta_width < 0) // panel gets wider + else //if (-delta_width > available_chiclet_shrink_width) + { + S32 required_width = delta_width + available_chiclet_shrink_width; + S32 buttons_freed_width = 0; + processShrinkButtons(required_width, buttons_freed_width); + processHideButtons(required_width, buttons_freed_width); + } +} + //EOF diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 8395b484cf..c0887df39a 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -120,37 +120,153 @@ private: , RS_BUTTON_SPEAK = 0x0040 , RS_IM_WELL = 0x0080 , RS_NOTIFICATION_WELL = 0x0100 + , RS_BUTTON_BUILD = 0x0200 + , RS_BUTTON_SEARCH = 0x0400 + , RS_BUTTON_WORLD_MAP = 0x0800 + , RS_BUTTON_MINI_MAP = 0x1000 + , RS_BUTTON_SIDEBAR = 0x2000 + + /* + Once new button that can be hidden on resize is added don't forget to update related places: + - RS_BUTTONS_CAN_BE_HIDDEN enum value below. + - initResizeStateContainers(): mStateProcessedObjectMap and mButtonsProcessOrder + */ /** * Specifies buttons which can be hidden when bottom tray is shrunk. * They are: Gestures, Movement (Move), Camera (View), Snapshot + * new: Build, Search, Map, World Map, Mini-Map. */ , RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES + | RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP + | RS_BUTTON_SIDEBAR }EResizeState; + /** + * Updates child controls size and visibility when it is necessary to reduce total width. + * + * Process order: + * - reduce chiclet panel to its minimal width; + * - reduce chatbar to its minimal width; + * - reduce visible buttons from right to left to their minimal width; + * - hide visible buttons from right to left; + * When button is hidden chatbar extended to fill released space if it is necessary. + * + * @param[in] delta_width - value by which bottom tray should be shrunk. It is a negative value. + * @return positive value which bottom tray can not process when it reaches its minimal width. + * Zero if there was enough space to process delta_width. + */ S32 processWidthDecreased(S32 delta_width); + + /** + * Updates child controls size and visibility when it is necessary to extend total width. + * + * Process order: + * - show invisible buttons should be shown from left to right if possible; + * - extend visible buttons from left to right to their default width; + * - extend chatbar to its maximal width; + * - extend chiclet panel to all available space; + * When chatbar & chiclet panels are wider then their minimal width they can be reduced to allow + * a button gets visible in case if passed delta_width is not enough (chatbar first). + * + * @param[in] delta_width - value by which bottom tray should be extended. It is a positive value. + */ void processWidthIncreased(S32 delta_width); + + /** helper function to log debug messages */ void log(LLView* panel, const std::string& descr); - bool processShowButton(EResizeState shown_object_type, S32* available_width); - void processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width); + + /** + * Tries to show hidden by resize buttons using available width. + * + * Gets buttons visible if there is enough space. Reduces available_width in this case. + * + * @params[in, out] available_width - reference to available width to be used to show buttons. + * @see processShowButton() + */ + void processShowButtons(S32& available_width); + + /** + * Tries to show panel with specified button using available width. + * + * Shows button specified by type if there is enough space. Reduces available_width in this case. + * + * @params[in] shown_object_type - type of button to be shown. + * @params[in, out] available_width - reference to available width to be used to show button. + * + * @return true if button can be shown, false otherwise + */ + bool processShowButton(EResizeState shown_object_type, S32& available_width); + + /** + * Hides visible panels with all buttons that may be hidden by resize if it is necessary. + * + * When button gets hidden some space is released in bottom tray. + * This space is taken into account for several consecutive calls for several buttons. + * + * @params[in, out] required_width - reference to required width to be released. This is a negative value. + * Its absolute value is decreased by shown panel width. + * @params[in, out] buttons_freed_width - reference to value released over required one. + * If panel's width is more than required difference is added to buttons_freed_width. + * @see processHideButton() + */ + void processHideButtons(S32& required_width, S32& buttons_freed_width); + + /** + * Hides panel with specified button if it is visible. + * + * When button gets hidden some space is released in bottom tray. + * This space is taken into account for several consecutive calls for several buttons. + * + * @params[in] processed_object_type - type of button to be hide. + * @params[in, out] required_width - reference to required width to be released. This is a negative value. + * Its absolute value is decreased by panel width. + * @params[in, out] buttons_freed_width - reference to value released over required one. + * If panel's width is more than required difference is added to buttons_freed_width. + */ + void processHideButton(EResizeState processed_object_type, S32& required_width, S32& buttons_freed_width); /** * Shrinks shown buttons to reduce total taken space. * - * @param - required_width - width which buttons can use to be shrunk. It is a negative value. + * Shrinks buttons that may be shrunk smoothly first. Then shrinks Speak button. + * + * @param[in, out] required_width - reference to width value which should be released when buttons are shrunk. It is a negative value. * It is increased on the value processed by buttons. + * @params[in, out] buttons_freed_width - reference to value released over required one. + * If width of panel with Speak button is more than required that difference is added + * to buttons_freed_width. + * This is because Speak button shrinks discretely unlike other buttons which are changed smoothly. */ - void processShrinkButtons(S32* required_width, S32* buttons_freed_width); - void processShrinkButton(EResizeState processed_object_type, S32* required_width); + void processShrinkButtons(S32& required_width, S32& buttons_freed_width); + + /** + * Shrinks panel with specified button if it is visible. + * + * @params[in] processed_object_type - type of button to be shrunk. + * @param[in, out] required_width - reference to width value which should be released when button is shrunk. It is a negative value. + * It is increased on the value released by the button. + */ + void processShrinkButton(EResizeState processed_object_type, S32& required_width); /** * Extends shown buttons to increase total taken space. * - * @param - available_width - width which buttons can use to be extended. It is a positive value. - * It is decreased on the value processed by buttons. + * Extends buttons that may be extended smoothly first. Then extends Speak button. + * + * @param[in, out] available_width - reference to width value which buttons can use to be extended. + * It is a positive value. It is decreased on the value processed by buttons. + */ + void processExtendButtons(S32& available_width); + + /** + * Extends shown button to increase total taken space. + * + * @params[in] processed_object_type - type of button to be extended. + * @param[in, out] available_width - reference to width value which button can use to be extended. + * It is a positive value. It is decreased on the value processed by buttons. */ - void processExtendButtons(S32* available_width); - void processExtendButton(EResizeState processed_object_type, S32* available_width); + void processExtendButton(EResizeState processed_object_type, S32& available_width); /** * Determines if specified by type object can be shown. It should be hidden by shrink before. @@ -159,7 +275,37 @@ private: * - Gestures, Move, View, Snapshot */ bool canButtonBeShown(EResizeState processed_object_type) const; - void initStateProcessedObjectMap(); + + /** + * Initializes all containers stored data related to children resize state. + * + * @see mStateProcessedObjectMap + * @see mObjectDefaultWidthMap + * @see mButtonsProcessOrder + */ + void initResizeStateContainers(); + + /** + * Initializes buttons' visibility depend on stored Control Settings. + */ + void initButtonsVisibility(); + + /** + * Initializes listeners of Control Settings to toggle appropriate buttons' visibility. + * + * @see toggleShowButton() + */ + void setButtonsControlsAndListeners(); + + /** + * Toggles visibility of specified button depend on passed value. + * + * @param button_type - type of button to be toggled + * @param new_visibility - new visibility of the button + * + * @see setButtonsControlsAndListeners() + */ + static bool toggleShowButton(EResizeState button_type, const LLSD& new_visibility); /** * Sets passed visibility to object specified by resize type. @@ -197,6 +343,17 @@ private: */ void showWellButton(EResizeState object_type, bool visible); + /** + * Handles a customization of chatbar width. + * + * When chatbar gets wider layout stack will reduce chiclet panel (it is auto-resizable) + * But once chiclet panel reaches its minimal width Stack will force to reduce buttons width. + * including Speak button. The similar behavior is when chatbar gets narrowly. + * This methods force resize behavior to resize buttons properly in these cases. + */ + void processChatbarCustomization(S32 new_width); + + MASK mResizeState; typedef std::map<EResizeState, LLPanel*> state_object_map_t; @@ -205,8 +362,12 @@ private: typedef std::map<EResizeState, S32> state_object_width_map_t; state_object_width_map_t mObjectDefaultWidthMap; - typedef std::map<EResizeState, LLUICtrl*> dummies_map_t; - dummies_map_t mDummiesMap; + typedef std::vector<EResizeState> resize_state_vec_t; + + /** + * Contains order in which child buttons should be processed in show/hide, extend/shrink methods. + */ + resize_state_vec_t mButtonsProcessOrder; protected: @@ -224,10 +385,6 @@ protected: LLNearbyChatBar* mNearbyChatBar; LLLayoutStack* mToolbarStack; LLMenuGL* mBottomTrayContextMenu; - LLPanel* mMovementPanel; - LLPanel* mCamPanel; - LLPanel* mSnapshotPanel; - LLPanel* mGesturePanel; LLButton* mCamButton; LLButton* mMovementButton; LLBottomTrayLite* mBottomTrayLite; diff --git a/indra/newview/llbuycurrencyhtml.cpp b/indra/newview/llbuycurrencyhtml.cpp new file mode 100644 index 0000000000..163829a1ea --- /dev/null +++ b/indra/newview/llbuycurrencyhtml.cpp @@ -0,0 +1,165 @@ +/** + * @file llbuycurrencyhtml.cpp + * @brief Manages Buy Currency HTML floater + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2006-2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterbuycurrency.h" +#include "llbuycurrencyhtml.h" +#include "llfloaterbuycurrencyhtml.h" + +#include "llfloaterreg.h" +#include "llcommandhandler.h" +#include "llviewercontrol.h" + +// support for secondlife:///app/buycurrencyhtml/{ACTION}/{NEXT_ACTION}/{RETURN_CODE} SLapps +class LLBuyCurrencyHTMLHandler : + public LLCommandHandler +{ +public: + // requests will be throttled from a non-trusted browser + LLBuyCurrencyHTMLHandler() : LLCommandHandler( "buycurrencyhtml", UNTRUSTED_ALLOW ) {} + + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) + { + std::string action( "" ); + if ( params.size() >= 1 ) + { + action = params[ 0 ].asString(); + }; + + std::string next_action( "" ); + if ( params.size() >= 2 ) + { + next_action = params[ 1 ].asString(); + }; + + int result_code = 0; + if ( params.size() >= 3 ) + { + result_code = params[ 2 ].asInteger(); + }; + + // open the legacy XUI based currency floater + if ( "open_legacy" == next_action ) + { + LLFloaterBuyCurrency::buyCurrency(); + }; + + // ask the Buy Currency floater to close + // note: this is the last thing we can do so make + // sure any other actions are processed before this. + if ( "close" == action ) + { + LLBuyCurrencyHTML::closeDialog(); + }; + + return true; + }; +}; +LLBuyCurrencyHTMLHandler gBuyCurrencyHTMLHandler; + +//////////////////////////////////////////////////////////////////////////////// +// static +// Opens the legacy XUI based floater or new HTML based one based on +// the QuickBuyCurrency value in settings.xml - this overload is for +// the case where the amount is not requested. +void LLBuyCurrencyHTML::openCurrencyFloater() +{ + if ( gSavedSettings.getBOOL( "QuickBuyCurrency" ) ) + { + // HTML version + LLBuyCurrencyHTML::showDialog( false, "", 0 ); + } + else + { + // legacy version + LLFloaterBuyCurrency::buyCurrency(); + }; +} + +//////////////////////////////////////////////////////////////////////////////// +// static +// Opens the legacy XUI based floater or new HTML based one based on +// the QuickBuyCurrency value in settings.xml - this overload is for +// the case where the amount and a string to display are requested. +void LLBuyCurrencyHTML::openCurrencyFloater( const std::string& message, S32 sum ) +{ + if ( gSavedSettings.getBOOL( "QuickBuyCurrency" ) ) + { + // HTML version + LLBuyCurrencyHTML::showDialog( true, message, sum ); + } + else + { + // legacy version + LLFloaterBuyCurrency::buyCurrency( message, sum ); + }; +} + +//////////////////////////////////////////////////////////////////////////////// +// static +void LLBuyCurrencyHTML::showDialog( bool specific_sum_requested, const std::string& message, S32 sum ) +{ + LLFloaterBuyCurrencyHTML* buy_currency_floater = dynamic_cast< LLFloaterBuyCurrencyHTML* >( LLFloaterReg::getInstance( "buy_currency_html" ) ); + if ( buy_currency_floater ) + { + // pass on flag indicating if we want to buy specific amount and if so, how much + buy_currency_floater->setParams( specific_sum_requested, message, sum ); + + // force navigate to new URL + buy_currency_floater->navigateToFinalURL(); + + // make it visible and raise to front + BOOL visible = TRUE; + buy_currency_floater->setVisible( visible ); + BOOL take_focus = TRUE; + buy_currency_floater->setFrontmost( take_focus ); + + // spec calls for floater to be centered on client window + buy_currency_floater->center(); + } + else + { + llwarns << "Buy Currency (HTML) Floater not found" << llendl; + }; +} + +//////////////////////////////////////////////////////////////////////////////// +// +void LLBuyCurrencyHTML::closeDialog() +{ + LLFloaterBuyCurrencyHTML* buy_currency_floater = dynamic_cast< LLFloaterBuyCurrencyHTML* >(LLFloaterReg::getInstance( "buy_currency_html" ) ); + if ( buy_currency_floater ) + { + buy_currency_floater->closeFloater(); + }; +} diff --git a/indra/newview/llbuycurrencyhtml.h b/indra/newview/llbuycurrencyhtml.h new file mode 100644 index 0000000000..3435bb0451 --- /dev/null +++ b/indra/newview/llbuycurrencyhtml.h @@ -0,0 +1,57 @@ +/** + * @file llbuycurrencyhtml.h + * @brief Manages Buy Currency HTML floater + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2006-2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLBUYCURRENCYHTML_H +#define LL_LLBUYCURRENCYHTML_H + +#include "llsingleton.h" + +class LLFloaterBuyCurrencyHTML; + +class LLBuyCurrencyHTML +{ + public: + // choke point for opening a legacy or new currency floater - this overload is when the L$ sum is not required + static void openCurrencyFloater(); + + // choke point for opening a legacy or new currency floater - this overload is when the L$ sum is required + static void openCurrencyFloater( const std::string& message, S32 sum ); + + // show and give focus to actual currency floater - this is used for both cases + // where the sum is required and where it is not + static void showDialog( bool specific_sum_requested, const std::string& message, S32 sum ); + + // close (and destroy) the currency floater + static void closeDialog(); +}; + +#endif // LL_LLBUYCURRENCYHTML_H diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 5a96613870..dd99c6564c 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -133,7 +133,7 @@ LLCallFloater::~LLCallFloater() if(LLVoiceClient::instanceExists()) { - LLVoiceClient::instance().removeObserver(this); + LLVoiceClient::getInstance()->removeObserver(this); } LLTransientFloaterMgr::getInstance()->removeControlView(this); } @@ -207,7 +207,6 @@ void LLCallFloater::draw() void LLCallFloater::onChange() { if (NULL == mParticipants) return; - updateParticipantsVoiceState(); // Add newly joined participants. @@ -237,11 +236,11 @@ void LLCallFloater::updateSession() LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); if (voice_channel) { - lldebugs << "Current voice channel: " << voice_channel->getSessionID() << llendl; + LL_DEBUGS("Voice") << "Current voice channel: " << voice_channel->getSessionID() << LL_ENDL; if (mSpeakerManager && voice_channel->getSessionID() == mSpeakerManager->getSessionID()) { - lldebugs << "Speaker manager is already set for session: " << voice_channel->getSessionID() << llendl; + LL_DEBUGS("Voice") << "Speaker manager is already set for session: " << voice_channel->getSessionID() << LL_ENDL; return; } else @@ -251,7 +250,6 @@ void LLCallFloater::updateSession() } const LLUUID& session_id = voice_channel ? voice_channel->getSessionID() : LLUUID::null; - lldebugs << "Set speaker manager for session: " << session_id << llendl; LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); if (im_session) @@ -291,7 +289,7 @@ void LLCallFloater::updateSession() { // by default let show nearby chat participants mSpeakerManager = LLLocalSpeakerMgr::getInstance(); - lldebugs << "Set DEFAULT speaker manager" << llendl; + LL_DEBUGS("Voice") << "Set DEFAULT speaker manager" << LL_ENDL; mVoiceType = VC_LOCAL_CHAT; } @@ -470,16 +468,15 @@ void LLCallFloater::updateAgentModeratorState() static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids) { // Get a list of participants from VoiceClient - LLVoiceClient::participantMap *voice_map = LLVoiceClient::getInstance()->getParticipantList(); - if (voice_map) + std::set<LLUUID> participants; + LLVoiceClient::getInstance()->getParticipantList(participants); + + for (std::set<LLUUID>::const_iterator iter = participants.begin(); + iter != participants.end(); ++iter) { - for (LLVoiceClient::participantMap::const_iterator iter = voice_map->begin(); - iter != voice_map->end(); ++iter) - { - LLUUID id = (*iter).second->mAvatarID; - speakers_uuids.push_back(id); - } + speakers_uuids.push_back(*iter); } + } void LLCallFloater::initParticipantsVoiceState() @@ -555,7 +552,7 @@ void LLCallFloater::updateParticipantsVoiceState() uuid_vec_t::iterator speakers_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), participant_id); - lldebugs << "processing speaker: " << item->getAvatarName() << ", " << item->getAvatarId() << llendl; + LL_DEBUGS("Voice") << "processing speaker: " << item->getAvatarName() << ", " << item->getAvatarId() << LL_ENDL; // If an avatarID assigned to a panel is found in a speakers list // obtained from VoiceClient we assign the JOINED status to the owner @@ -728,7 +725,7 @@ void LLCallFloater::connectToChannel(LLVoiceChannel* channel) void LLCallFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) { // check is voice operational and if it doesn't work hide VCP (EXT-4397) - if(LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking()) + if(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()) { updateState(new_state); } diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 79a2631c31..1a6c11fa73 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -700,6 +700,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) args["FIRST"] = first; args["LAST"] = last; } + } } else diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 68c31d87fa..bd14732b4a 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -647,20 +647,19 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull()) { // for object IMs, create a secondlife:///app/objectim SLapp - std::string url = LLSLURL::buildCommand("objectim", chat.mFromID, ""); + std::string url = LLSLURL("objectim", chat.mFromID, "").getSLURLString(); url += "?name=" + chat.mFromName; - url += "&owner=" + args["owner_id"].asString(); + url += "&owner=" + chat.mOwnerID.asString(); std::string slurl = args["slurl"].asString(); if (slurl.empty()) { - LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); - if (region) - { - S32 x, y, z; - LLSLURL::globalPosToXYZ(LLVector3d(chat.mPosAgent), x, y, z); - slurl = region->getName() + llformat("/%d/%d/%d", x, y, z); - } + LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); + if(region) + { + LLSLURL region_slurl(region->getName(), chat.mPosAgent); + slurl = region_slurl.getLocationString(); + } } url += "&slurl=" + slurl; diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 6ee14e8ba9..35a244c461 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -192,7 +192,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification) style_params_name.font.name(font_name); style_params_name.font.size(font_style_size); - style_params_name.link_href = LLSLURL::buildCommand("agent",mFromID,"about"); + style_params_name.link_href = LLSLURL("agent",mFromID,"about").getSLURLString(); msg_text->appendText(str_sender, FALSE, style_params_name); @@ -326,12 +326,14 @@ void LLNearbyChatToastPanel::draw() if(icon) { icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT); - if(mSourceType == CHAT_SOURCE_AGENT) - icon->setValue(mFromID); + if(mSourceType == CHAT_SOURCE_OBJECT) + icon->setValue(LLSD("OBJECT_Icon")); else if(mSourceType == CHAT_SOURCE_SYSTEM) icon->setValue(LLSD("SL_Logo")); - else - icon->setValue(LLSD("OBJECT_Icon")); + else if(mSourceType == CHAT_SOURCE_AGENT) + icon->setValue(mFromID); + else if(!mFromID.isNull()) + icon->setValue(mFromID); } mIsDirty = false; } diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 9c4aa7b964..6897f4ee8e 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -183,20 +183,6 @@ void LLSysWellChiclet::setCounter(S32 counter) mButton->setLabel(s_count); - setNewMessagesState(counter > mCounter); - - // we have to flash to 'Lit' state each time new unread message is coming. - if (counter > mCounter) - { - mFlashToLitTimer->flash(); - } - else if (counter == 0) - { - // if notification is resolved while well is flashing it can leave in the 'Lit' state - // when flashing finishes itself. Let break flashing here. - mFlashToLitTimer->stopFlashing(); - } - mCounter = counter; } @@ -316,7 +302,26 @@ void LLIMWellChiclet::createMenu() void LLIMWellChiclet::messageCountChanged(const LLSD& session_data) { - setCounter(LLBottomTray::getInstance()->getTotalUnreadIMCount()); + const LLUUID& session_id = session_data["session_id"]; + const S32 counter = LLBottomTray::getInstance()->getTotalUnreadIMCount(); + const bool im_not_visible = !LLFloaterReg::instanceVisible("im_container") + && !LLFloaterReg::instanceVisible("impanel", session_id); + + setNewMessagesState(counter > mCounter && im_not_visible); + + // we have to flash to 'Lit' state each time new unread message is coming. + if (counter > mCounter && im_not_visible) + { + mFlashToLitTimer->flash(); + } + else if (counter == 0) + { + // if notification is resolved while well is flashing it can leave in the 'Lit' state + // when flashing finishes itself. Let break flashing here. + mFlashToLitTimer->stopFlashing(); + } + + setCounter(counter); } /************************************************************************/ diff --git a/indra/newview/llcloud.cpp b/indra/newview/llcloud.cpp index af6f4e3286..a4104923e4 100644 --- a/indra/newview/llcloud.cpp +++ b/indra/newview/llcloud.cpp @@ -329,16 +329,7 @@ void LLCloudLayer::setRegion(LLViewerRegion *regionp) void LLCloudLayer::destroy() { - // Kill all of the existing puffs - S32 i, j; - - for (i = 0; i < CLOUD_GROUPS_PER_EDGE; i++) - { - for (j = 0; j < CLOUD_GROUPS_PER_EDGE; j++) - { - mCloudGroups[i][j].cleanup(); - } - } + reset(); delete [] mDensityp; mDensityp = NULL; @@ -348,8 +339,17 @@ void LLCloudLayer::destroy() void LLCloudLayer::reset() { -} + // Kill all of the existing puffs + S32 i, j; + for (i = 0; i < CLOUD_GROUPS_PER_EDGE; i++) + { + for (j = 0; j < CLOUD_GROUPS_PER_EDGE; j++) + { + mCloudGroups[i][j].cleanup(); + } + } +} void LLCloudLayer::setWindPointer(LLWind *windp) { diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 1925b818f2..ee366f4e3c 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -35,10 +35,16 @@ #include "llcofwearables.h" #include "llagentdata.h" +#include "llagentwearables.h" #include "llappearancemgr.h" #include "llinventory.h" #include "llinventoryfunctions.h" +#include "lllistcontextmenu.h" +#include "llmenugl.h" +#include "llviewermenu.h" #include "llwearableitemslist.h" +#include "llpaneloutfitedit.h" +#include "llsidetray.h" static LLRegisterPanelClassWrapper<LLCOFAccordionListAdaptor> t_cof_accodion_list_adaptor("accordion_list_adaptor"); @@ -46,6 +52,117 @@ static LLRegisterPanelClassWrapper<LLCOFWearables> t_cof_wearables("cof_wearable const LLSD REARRANGE = LLSD().with("rearrange", LLSD()); +static const LLWearableItemNameComparator WEARABLE_NAME_COMPARATOR; + + +////////////////////////////////////////////////////////////////////////// + +class CofAttachmentContextMenu : public LLListContextMenu +{ +protected: + + /*virtual*/ LLContextMenu* createMenu() + { + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + + functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); + registrar.add("Attachment.Detach", boost::bind(handleMultiple, take_off, mUUIDs)); + + return createFromFile("menu_cof_attachment.xml"); + } +}; + +////////////////////////////////////////////////////////////////////////// + +class CofClothingContextMenu : public LLListContextMenu +{ +protected: + + /*virtual*/ LLContextMenu* createMenu() + { + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + LLUUID selected_id = mUUIDs.back(); + functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); + + registrar.add("Clothing.TakeOff", boost::bind(handleMultiple, take_off, mUUIDs)); + registrar.add("Clothing.MoveUp", boost::bind(moveWearable, selected_id, false)); + registrar.add("Clothing.MoveDown", boost::bind(moveWearable, selected_id, true)); + registrar.add("Clothing.Edit", boost::bind(LLAgentWearables::editWearable, selected_id)); + + enable_registrar.add("Clothing.OnEnable", boost::bind(&CofClothingContextMenu::onEnable, this, _2)); + + return createFromFile("menu_cof_clothing.xml"); + } + + bool onEnable(const LLSD& data) + { + std::string param = data.asString(); + LLUUID selected_id = mUUIDs.back(); + + if ("move_up" == param) + { + return gAgentWearables.canMoveWearable(selected_id, false); + } + else if ("move_down" == param) + { + return gAgentWearables.canMoveWearable(selected_id, true); + } + else if ("edit" == param) + { + return gAgentWearables.isWearableModifiable(selected_id); + } + return true; + } + + // We don't use LLAppearanceMgr::moveWearable() directly because + // the item may be invalidated between setting the callback and calling it. + static bool moveWearable(const LLUUID& item_id, bool closer_to_body) + { + LLViewerInventoryItem* item = gInventory.getItem(item_id); + return LLAppearanceMgr::instance().moveWearable(item, closer_to_body); + } + +}; + +////////////////////////////////////////////////////////////////////////// + +class CofBodyPartContextMenu : public LLListContextMenu +{ +protected: + + /*virtual*/ LLContextMenu* createMenu() + { + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + LLUUID selected_id = mUUIDs.back(); + + // *HACK* need to pass pointer to LLPanelOutfitEdit instead of LLSideTray::getInstance()->getPanel(). + // LLSideTray::getInstance()->getPanel() is rather slow variant + LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit")); + registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked, panel_oe, selected_id)); + registrar.add("BodyPart.Edit", boost::bind(LLAgentWearables::editWearable, selected_id)); + + enable_registrar.add("BodyPart.OnEnable", boost::bind(&CofBodyPartContextMenu::onEnable, this, _2)); + + return createFromFile("menu_cof_body_part.xml"); + } + + bool onEnable(const LLSD& data) + { + std::string param = data.asString(); + LLUUID selected_id = mUUIDs.back(); + + if ("edit" == param) + { + return gAgentWearables.isWearableModifiable(selected_id); + } + + return true; + } +}; + +////////////////////////////////////////////////////////////////////////// LLCOFWearables::LLCOFWearables() : LLPanel(), mAttachments(NULL), @@ -53,8 +170,17 @@ LLCOFWearables::LLCOFWearables() : LLPanel(), mBodyParts(NULL), mLastSelectedList(NULL) { + mClothingMenu = new CofClothingContextMenu(); + mAttachmentMenu = new CofAttachmentContextMenu(); + mBodyPartMenu = new CofBodyPartContextMenu(); }; +LLCOFWearables::~LLCOFWearables() +{ + delete mClothingMenu; + delete mAttachmentMenu; + delete mBodyPartMenu; +} // virtual BOOL LLCOFWearables::postBuild() @@ -63,6 +189,9 @@ BOOL LLCOFWearables::postBuild() mClothing = getChild<LLFlatListView>("list_clothing"); mBodyParts = getChild<LLFlatListView>("list_body_parts"); + mClothing->setRightMouseDownCallback(boost::bind(&LLCOFWearables::onListRightClick, this, _1, _2, _3, mClothingMenu)); + mAttachments->setRightMouseDownCallback(boost::bind(&LLCOFWearables::onListRightClick, this, _1, _2, _3, mAttachmentMenu)); + mBodyParts->setRightMouseDownCallback(boost::bind(&LLCOFWearables::onListRightClick, this, _1, _2, _3, mBodyPartMenu)); //selection across different list/tabs is not supported mAttachments->setCommitCallback(boost::bind(&LLCOFWearables::onSelectionChange, this, mAttachments)); @@ -73,6 +202,10 @@ BOOL LLCOFWearables::postBuild() mClothing->setCommitOnSelectionChange(true); mBodyParts->setCommitOnSelectionChange(true); + //clothing is sorted according to its position relatively to the body + mAttachments->setComparator(&WEARABLE_NAME_COMPARATOR); + mBodyParts->setComparator(&WEARABLE_NAME_COMPARATOR); + return LLPanel::postBuild(); } @@ -114,7 +247,7 @@ void LLCOFWearables::refresh() populateAttachmentsAndBodypartsLists(cof_items); - LLAppearanceMgr::wearables_by_type_t clothing_by_type(WT_COUNT); + LLAppearanceMgr::wearables_by_type_t clothing_by_type(LLWearableType::WT_COUNT); LLAppearanceMgr::getInstance()->divvyWearablesByType(cof_items, clothing_by_type); populateClothingList(clothing_by_type); @@ -150,7 +283,7 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel LLPanelInventoryListItemBase* item_panel = NULL; if (item_type == LLAssetType::AT_OBJECT) { - item_panel = LLPanelInventoryListItemBase::create(item); + item_panel = buildAttachemntListItem(item); mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); } else if (item_type == LLAssetType::AT_BODYPART) @@ -164,29 +297,30 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel if (mAttachments->size()) { - mAttachments->sort(); //*TODO by Name + mAttachments->sort(); mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false) } if (mBodyParts->size()) { - mBodyParts->sort(); //*TODO by name + mBodyParts->sort(); + mBodyParts->notify(REARRANGE); } - - mBodyParts->notify(REARRANGE); } //create a clothing list item, update verbs and show/hide line separator LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventoryItem* item, bool first, bool last) { llassert(item); - + if (!item) return NULL; LLPanelClothingListItem* item_panel = LLPanelClothingListItem::create(item); if (!item_panel) return NULL; //updating verbs //we don't need to use permissions of a link but of an actual/linked item if (item->getLinkedItem()) item = item->getLinkedItem(); + llassert(item); + if (!item) return NULL; bool allow_modify = item->getPermissions().allowModifyBy(gAgentID); @@ -199,8 +333,8 @@ LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventory //setting callbacks //*TODO move that item panel's inner structure disclosing stuff into the panels item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable); - item_panel->childSetAction("btn_move_up", mCOFCallbacks.mMoveWearableCloser); - item_panel->childSetAction("btn_move_down", mCOFCallbacks.mMoveWearableFurther); + item_panel->childSetAction("btn_move_up", mCOFCallbacks.mMoveWearableFurther); + item_panel->childSetAction("btn_move_down", mCOFCallbacks.mMoveWearableCloser); item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable); //turning on gray separator line for the last item in the items group of the same wearable type @@ -212,14 +346,15 @@ LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventory LLPanelBodyPartsListItem* LLCOFWearables::buildBodypartListItem(LLViewerInventoryItem* item) { llassert(item); - + if (!item) return NULL; LLPanelBodyPartsListItem* item_panel = LLPanelBodyPartsListItem::create(item); if (!item_panel) return NULL; //updating verbs //we don't need to use permissions of a link but of an actual/linked item if (item->getLinkedItem()) item = item->getLinkedItem(); - + llassert(item); + if (!item) return NULL; bool allow_modify = item->getPermissions().allowModifyBy(gAgentID); item_panel->setShowLockButton(!allow_modify); item_panel->setShowEditButton(allow_modify); @@ -232,22 +367,38 @@ LLPanelBodyPartsListItem* LLCOFWearables::buildBodypartListItem(LLViewerInventor return item_panel; } +LLPanelDeletableWearableListItem* LLCOFWearables::buildAttachemntListItem(LLViewerInventoryItem* item) +{ + llassert(item); + if (!item) return NULL; + + LLPanelDeletableWearableListItem* item_panel = LLPanelDeletableWearableListItem::create(item); + if (!item_panel) return NULL; + + //setting callbacks + //*TODO move that item panel's inner structure disclosing stuff into the panels + item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable); + + return item_panel; +} + void LLCOFWearables::populateClothingList(LLAppearanceMgr::wearables_by_type_t& clothing_by_type) { - llassert(clothing_by_type.size() == WT_COUNT); + llassert(clothing_by_type.size() == LLWearableType::WT_COUNT); - for (U32 type = WT_SHIRT; type < WT_COUNT; ++type) + for (U32 type = LLWearableType::WT_SHIRT; type < LLWearableType::WT_COUNT; ++type) { U32 size = clothing_by_type[type].size(); if (!size) continue; LLAppearanceMgr::sortItemsByActualDescription(clothing_by_type[type]); - for (U32 i = 0; i < size; i++) + //clothing items are displayed in reverse order, from furthest ones to closest ones (relatively to the body) + for (U32 i = size; i != 0; --i) { - LLViewerInventoryItem* item = clothing_by_type[type][i]; + LLViewerInventoryItem* item = clothing_by_type[type][i-1]; - LLPanelClothingListItem* item_panel = buildClothingListItem(item, i == 0, i == size - 1); + LLPanelClothingListItem* item_panel = buildClothingListItem(item, i == size, i == 1); if (!item_panel) continue; mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); @@ -262,16 +413,17 @@ void LLCOFWearables::populateClothingList(LLAppearanceMgr::wearables_by_type_t& //adding dummy items for missing wearable types void LLCOFWearables::addClothingTypesDummies(const LLAppearanceMgr::wearables_by_type_t& clothing_by_type) { - llassert(clothing_by_type.size() == WT_COUNT); + llassert(clothing_by_type.size() == LLWearableType::WT_COUNT); - for (U32 type = WT_SHIRT; type < WT_COUNT; type++) + for (U32 type = LLWearableType::WT_SHIRT; type < LLWearableType::WT_COUNT; type++) { U32 size = clothing_by_type[type].size(); if (size) continue; - EWearableType w_type = static_cast<EWearableType>(type); + LLWearableType::EType w_type = static_cast<LLWearableType::EType>(type); LLPanelInventoryListItemBase* item_panel = LLPanelDummyClothingListItem::create(w_type); if(!item_panel) continue; + item_panel->childSetAction("btn_add", mCOFCallbacks.mAddWearable); mClothing->addItem(item_panel, LLUUID::null, ADD_BOTTOM, false); } } @@ -283,6 +435,21 @@ LLUUID LLCOFWearables::getSelectedUUID() return mLastSelectedList->getSelectedUUID(); } +bool LLCOFWearables::getSelectedUUIDs(uuid_vec_t& selected_ids) +{ + if (!mLastSelectedList) return false; + + mLastSelectedList->getSelectedUUIDs(selected_ids); + return selected_ids.size() != 0; +} + +LLPanel* LLCOFWearables::getSelectedItem() +{ + if (!mLastSelectedList) return NULL; + + return mLastSelectedList->getSelectedItem(); +} + void LLCOFWearables::clear() { mAttachments->clear(); @@ -290,4 +457,16 @@ void LLCOFWearables::clear() mBodyParts->clear(); } +void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContextMenu* menu) +{ + if(menu) + { + uuid_vec_t selected_uuids; + if(getSelectedUUIDs(selected_uuids)) + { + menu->show(ctrl, selected_uuids, x, y); + } + } +} + //EOF diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index 2d26bf781f..8f8bda2be8 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -33,12 +33,17 @@ #ifndef LL_LLCOFWEARABLES_H #define LL_LLCOFWEARABLES_H +// llui +#include "llflatlistview.h" #include "llpanel.h" -#include "llinventorymodel.h" + #include "llappearancemgr.h" -#include "llwearableitemslist.h" +#include "llinventorymodel.h" -class LLFlatListView; +class LLListContextMenu; +class LLPanelClothingListItem; +class LLPanelBodyPartsListItem; +class LLPanelDeletableWearableListItem; /** * Adaptor between LLAccordionCtrlTab and LLFlatListView to facilitate communication between them @@ -102,6 +107,7 @@ public: typedef boost::function<void (void*)> cof_callback_t; + cof_callback_t mAddWearable; cof_callback_t mMoveWearableCloser; cof_callback_t mMoveWearableFurther; cof_callback_t mEditWearable; @@ -111,11 +117,14 @@ public: LLCOFWearables(); - virtual ~LLCOFWearables() {}; + virtual ~LLCOFWearables(); /*virtual*/ BOOL postBuild(); LLUUID getSelectedUUID(); + bool getSelectedUUIDs(uuid_vec_t& selected_ids); + + LLPanel* getSelectedItem(); void refresh(); void clear(); @@ -132,6 +141,9 @@ protected: LLPanelClothingListItem* buildClothingListItem(LLViewerInventoryItem* item, bool first, bool last); LLPanelBodyPartsListItem* buildBodypartListItem(LLViewerInventoryItem* item); + LLPanelDeletableWearableListItem* buildAttachemntListItem(LLViewerInventoryItem* item); + + void onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContextMenu* menu); LLFlatListView* mAttachments; LLFlatListView* mClothing; @@ -141,6 +153,9 @@ protected: LLCOFCallbacks mCOFCallbacks; + LLListContextMenu* mClothingMenu; + LLListContextMenu* mAttachmentMenu; + LLListContextMenu* mBodyPartMenu; }; diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index be6c15eab4..fd3df359bd 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -284,7 +284,7 @@ void LLCurrencyUIManager::Impl::startTransaction(TransactionType type, static std::string transactionURI; if (transactionURI.empty()) { - transactionURI = LLViewerLogin::getInstance()->getHelperURI() + "currency.php"; + transactionURI = LLGridManager::getInstance()->getHelperURI() + "currency.php"; } delete mTransaction; diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 1a5d55d793..1571415e63 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -113,9 +113,12 @@ void LLDrawPoolTree::render(S32 pass) iter != mDrawFace.end(); iter++) { LLFace *face = *iter; - face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); - face->mVertexBuffer->drawRange(LLRender::TRIANGLES, 0, face->mVertexBuffer->getRequestedVerts()-1, face->mVertexBuffer->getRequestedIndices(), 0); - gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices()); + if(face->mVertexBuffer.notNull()) + { + face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); + face->mVertexBuffer->drawRange(LLRender::TRIANGLES, 0, face->mVertexBuffer->getRequestedVerts()-1, face->mVertexBuffer->getRequestedIndices(), 0); + gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices()); + } } } } @@ -333,7 +336,7 @@ void LLDrawPoolTree::renderTree(BOOL selecting) S32 stop_depth = 0; F32 app_angle = treep->getAppAngle()*LLVOTree::sTreeFactor; F32 alpha = 1.0; - S32 trunk_LOD = 0; + S32 trunk_LOD = LLVOTree::sMAX_NUM_TREE_LOD_LEVELS; for (S32 j = 0; j < 4; j++) { @@ -344,6 +347,10 @@ void LLDrawPoolTree::renderTree(BOOL selecting) break; } } + if(trunk_LOD >= LLVOTree::sMAX_NUM_TREE_LOD_LEVELS) + { + continue ; //do not render. + } if (app_angle < (THRESH_ANGLE_FOR_BILLBOARD - BLEND_RANGE_FOR_BILLBOARD)) { diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp index ebd767d654..40ce0ebcf4 100644 --- a/indra/newview/lldriverparam.cpp +++ b/indra/newview/lldriverparam.cpp @@ -534,7 +534,7 @@ void LLDriverParam::resetDrivenParams() mDriven.reserve(getInfo()->mDrivenInfoList.size()); } -void LLDriverParam::updateCrossDrivenParams(EWearableType driven_type) +void LLDriverParam::updateCrossDrivenParams(LLWearableType::EType driven_type) { bool needs_update = (getWearableType()==driven_type); @@ -551,7 +551,7 @@ void LLDriverParam::updateCrossDrivenParams(EWearableType driven_type) if (needs_update) { - EWearableType driver_type = (EWearableType)getWearableType(); + LLWearableType::EType driver_type = (LLWearableType::EType)getWearableType(); // If we've gotten here, we've added a new wearable of type "type" // Thus this wearable needs to get updates from the driver wearable. diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h index e963a2d55a..1069f7ad51 100644 --- a/indra/newview/lldriverparam.h +++ b/indra/newview/lldriverparam.h @@ -34,7 +34,7 @@ #define LL_LLDRIVERPARAM_H #include "llviewervisualparam.h" -#include "llwearabledictionary.h" +#include "llwearabletype.h" class LLVOAvatar; class LLWearable; @@ -94,7 +94,7 @@ public: void setWearable(LLWearable *wearablep); void setAvatar(LLVOAvatar *avatarp); - void updateCrossDrivenParams(EWearableType driven_type); + void updateCrossDrivenParams(LLWearableType::EType driven_type); /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index a1336815f7..e0e5b32299 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1376,9 +1376,18 @@ F32 LLFace::getTextureVirtualSize() texel_area = 1.f; } - //apply texel area to face area to get accurate ratio - //face_area /= llclamp(texel_area, 1.f/64.f, 16.f); - F32 face_area = mPixelArea / llclamp(texel_area, 0.015625f, 128.f); + F32 face_area; + if (mVObjp->isSculpted() && texel_area > 1.f) + { + //sculpts can break assumptions about texel area + face_area = mPixelArea; + } + else + { + //apply texel area to face area to get accurate ratio + //face_area /= llclamp(texel_area, 1.f/64.f, 16.f); + face_area = mPixelArea / llclamp(texel_area, 0.015625f, 128.f); + } if(face_area > LLViewerTexture::sMaxSmallImageSize) { diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 50b08f782a..4fdb010162 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -45,10 +45,13 @@ #include "llsecondlifeurls.h" #include "llappviewer.h" +#include "llhttpclient.h" +#include "llnotificationsutil.h" #include "llviewercontrol.h" #include "llworld.h" #include "lldrawpoolterrain.h" #include "llviewertexturelist.h" +#include "llversioninfo.h" #include "llwindow.h" #include "llui.h" #include "llcontrol.h" @@ -62,15 +65,20 @@ #if LL_DARWIN const char FEATURE_TABLE_FILENAME[] = "featuretable_mac.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_mac.%s.txt"; #elif LL_LINUX const char FEATURE_TABLE_FILENAME[] = "featuretable_linux.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_linux.%s.txt"; #elif LL_SOLARIS const char FEATURE_TABLE_FILENAME[] = "featuretable_solaris.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_solaris.%s.txt"; #else const char FEATURE_TABLE_FILENAME[] = "featuretable.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable.%s.txt"; #endif const char GPU_TABLE_FILENAME[] = "gpu_table.txt"; +const char GPU_TABLE_VER_FILENAME[] = "gpu_table.%s.txt"; LLFeatureInfo::LLFeatureInfo(const std::string& name, const BOOL available, const F32 level) : mValid(TRUE), mName(name), mAvailable(available), mRecommendedLevel(level) @@ -215,22 +223,44 @@ BOOL LLFeatureManager::loadFeatureTables() mSkippedFeatures.insert("RenderVBOEnable"); mSkippedFeatures.insert("RenderFogRatio"); - std::string data_path = gDirUtilp->getAppRODataDir(); + // first table is install with app + std::string app_path = gDirUtilp->getAppRODataDir(); + app_path += gDirUtilp->getDirDelimiter(); + app_path += FEATURE_TABLE_FILENAME; - data_path += gDirUtilp->getDirDelimiter(); + // second table is downloaded with HTTP + std::string http_filename = llformat(FEATURE_TABLE_VER_FILENAME, LLVersionInfo::getVersion().c_str()); + std::string http_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, http_filename); - data_path += FEATURE_TABLE_FILENAME; - lldebugs << "Looking for feature table in " << data_path << llendl; + // use HTTP table if it exists + std::string path; + if (gDirUtilp->fileExists(http_path)) + { + path = http_path; + } + else + { + path = app_path; + } + + + return parseFeatureTable(path); +} + + +BOOL LLFeatureManager::parseFeatureTable(std::string filename) +{ + llinfos << "Looking for feature table in " << filename << llendl; llifstream file; std::string name; U32 version; - file.open(data_path); /*Flawfinder: ignore*/ + file.open(filename); /*Flawfinder: ignore*/ if (!file) { - LL_WARNS("RenderInit") << "Unable to open feature table!" << LL_ENDL; + LL_WARNS("RenderInit") << "Unable to open feature table " << filename << LL_ENDL; return FALSE; } @@ -239,7 +269,7 @@ BOOL LLFeatureManager::loadFeatureTables() file >> version; if (name != "version") { - LL_WARNS("RenderInit") << data_path << " does not appear to be a valid feature table!" << LL_ENDL; + LL_WARNS("RenderInit") << filename << " does not appear to be a valid feature table!" << LL_ENDL; return FALSE; } @@ -302,24 +332,44 @@ BOOL LLFeatureManager::loadFeatureTables() void LLFeatureManager::loadGPUClass() { - std::string data_path = gDirUtilp->getAppRODataDir(); - - data_path += gDirUtilp->getDirDelimiter(); - - data_path += GPU_TABLE_FILENAME; - // defaults mGPUClass = GPU_CLASS_UNKNOWN; mGPUString = gGLManager.getRawGLString(); mGPUSupported = FALSE; + // first table is in the app dir + std::string app_path = gDirUtilp->getAppRODataDir(); + app_path += gDirUtilp->getDirDelimiter(); + app_path += GPU_TABLE_FILENAME; + + // second table is downloaded with HTTP + std::string http_filename = llformat(GPU_TABLE_VER_FILENAME, LLVersionInfo::getVersion().c_str()); + std::string http_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, http_filename); + + // use HTTP table if it exists + std::string path; + if (gDirUtilp->fileExists(http_path)) + { + path = http_path; + } + else + { + path = app_path; + } + + parseGPUTable(path); +} + + +void LLFeatureManager::parseGPUTable(std::string filename) +{ llifstream file; - file.open(data_path); /*Flawfinder: ignore*/ + file.open(filename); if (!file) { - LL_WARNS("RenderInit") << "Unable to open GPU table: " << data_path << "!" << LL_ENDL; + LL_WARNS("RenderInit") << "Unable to open GPU table: " << filename << "!" << LL_ENDL; return; } @@ -403,6 +453,70 @@ void LLFeatureManager::loadGPUClass() LL_WARNS("RenderInit") << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << LL_ENDL; } +// responder saves table into file +class LLHTTPFeatureTableResponder : public LLHTTPClient::Responder +{ +public: + + LLHTTPFeatureTableResponder(std::string filename) : + mFilename(filename) + { + } + + + virtual void completedRaw(U32 status, const std::string& reason, + const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) + { + if (isGoodStatus(status)) + { + // write to file + + llinfos << "writing feature table to " << mFilename << llendl; + + S32 file_size = buffer->countAfter(channels.in(), NULL); + if (file_size > 0) + { + // read from buffer + U8* copy_buffer = new U8[file_size]; + buffer->readAfter(channels.in(), NULL, copy_buffer, file_size); + + // write to file + LLAPRFile out(mFilename, LL_APR_WB); + out.write(copy_buffer, file_size); + out.close(); + } + } + + } + +private: + std::string mFilename; +}; + +void fetch_table(std::string table) +{ + const std::string base = "http://viewer-settings.s3.amazonaws.com/"; + + const std::string filename = llformat(table.c_str(), LLVersionInfo::getVersion().c_str()); + + const std::string url = base + filename; + + const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); + + llinfos << "LLFeatureManager fetching " << url << " into " << path << llendl; + + LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path)); +} + +// fetch table(s) from a website (S3) +void LLFeatureManager::fetchHTTPTables() +{ + fetch_table(FEATURE_TABLE_VER_FILENAME); + fetch_table(GPU_TABLE_VER_FILENAME); +} + + void LLFeatureManager::cleanupFeatureTables() { std::for_each(mMaskList.begin(), mMaskList.end(), DeletePairedPointer()); diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index dd218d428f..c2ecede2c5 100644 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -48,6 +48,7 @@ typedef enum EGPUClass GPU_CLASS_3 = 3 } EGPUClass; + class LLFeatureInfo { public: @@ -144,8 +145,13 @@ public: // in the skip list if true void applyFeatures(bool skipFeatures); + // load the dynamic GPU/feature table from a website + void fetchHTTPTables(); + protected: void loadGPUClass(); + BOOL parseFeatureTable(std::string filename); + void parseGPUTable(std::string filename); void initBaseMask(); diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp index 01d3c3f22e..28e159421c 100644 --- a/indra/newview/llfilteredwearablelist.cpp +++ b/indra/newview/llfilteredwearablelist.cpp @@ -37,34 +37,10 @@ #include "llinventoryitemslist.h" #include "llinventorymodel.h" -class LLFindItemsByMask : public LLInventoryCollectFunctor -{ -public: - LLFindItemsByMask(U64 mask) - : mFilterMask(mask) - {} - - virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) - { - if(item) - { - if( mFilterMask & (1LL << item->getInventoryType()) ) - { - return TRUE; - } - } - return FALSE; - } -private: - U64 mFilterMask; -}; - -////////////////////////////////////////////////////////////////////////// - -LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, U64 filter_mask) +LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector) : mWearableList(list) -, mFilterMask(filter_mask) +, mCollector(collector) { llassert(mWearableList); gInventory.addObserver(this); @@ -86,9 +62,9 @@ void LLFilteredWearableListManager::changed(U32 mask) populateList(); } -void LLFilteredWearableListManager::setFilterMask(U64 mask) +void LLFilteredWearableListManager::setFilterCollector(LLInventoryCollectFunctor* collector) { - mFilterMask = mask; + mCollector = collector; populateList(); } @@ -96,14 +72,16 @@ void LLFilteredWearableListManager::populateList() { LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; - LLFindItemsByMask collector(mFilterMask); - gInventory.collectDescendentsIf( - gInventory.getRootFolderID(), - cat_array, - item_array, - LLInventoryModel::EXCLUDE_TRASH, - collector); + if(mCollector) + { + gInventory.collectDescendentsIf( + gInventory.getRootFolderID(), + cat_array, + item_array, + LLInventoryModel::EXCLUDE_TRASH, + *mCollector); + } // Probably will also need to get items from Library (waiting for reply in EXT-6724). diff --git a/indra/newview/llfilteredwearablelist.h b/indra/newview/llfilteredwearablelist.h index 3f42833bb4..b7825c07af 100644 --- a/indra/newview/llfilteredwearablelist.h +++ b/indra/newview/llfilteredwearablelist.h @@ -32,17 +32,18 @@ #ifndef LL_LLFILTEREDWEARABLELIST_H #define LL_LLFILTEREDWEARABLELIST_H +#include "llinventoryfunctions.h" #include "llinventoryobserver.h" class LLInventoryItemsList; -// Class that fills LLInventoryItemsList with filtered data. +// Class that fills LLInventoryItemsList with filtered data (original items only (non-links)). class LLFilteredWearableListManager : public LLInventoryObserver { LOG_CLASS(LLFilteredWearableListManager); public: - LLFilteredWearableListManager(LLInventoryItemsList* list, U64 filter_mask); + LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector); ~LLFilteredWearableListManager(); /** LLInventoryObserver implementation @@ -51,9 +52,9 @@ public: /*virtual*/ void changed(U32 mask); /** - * Sets new filter and applies it immediately + * Sets new collector and applies it immediately */ - void setFilterMask(U64 mask); + void setFilterCollector(LLInventoryCollectFunctor* collector); /** * Populates wearable list with filtered data. @@ -62,7 +63,7 @@ public: private: LLInventoryItemsList* mWearableList; - U64 mFilterMask; + LLInventoryCollectFunctor* mCollector; }; #endif //LL_LLFILTEREDWEARABLELIST_H diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index ef69f39ad2..56bc4a7933 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -266,8 +266,18 @@ LLSD LLFloaterAbout::getInfo() info["J2C_VERSION"] = LLImageJ2C::getEngineInfo(); bool want_fullname = true; info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD(); - info["VIVOX_VERSION"] = gVoiceClient ? gVoiceClient->getAPIVersion() : LLTrans::getString("NotConnected"); - + if(LLVoiceClient::getInstance()->voiceEnabled()) + { + LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion(); + std::ostringstream version_string; + version_string << version.serverType << " " << version.serverVersion << std::endl; + info["VOICE_VERSION"] = version_string.str(); + } + else + { + info["VOICE_VERSION"] = LLTrans::getString("NotConnected"); + } + // TODO: Implement media plugin version query info["QT_WEBKIT_VERSION"] = "4.6 (version number hard-coded)"; diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index d1e99fbd61..b40c19c2c6 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -314,6 +314,18 @@ void LLFloaterAvatarPicker::populateFriend() void LLFloaterAvatarPicker::draw() { + // 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; + if (timer.hasExpired()) + { + timer.setTimerExpirySec(0.33f); // three times per second should be enough. + + // simulate list changes. + onList(); + timer.start(); + } + LLFloater::draw(); if (!mNearMeListComplete && childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("NearMePanel")) { diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index deef85cc6c..847462a6c3 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -84,7 +84,7 @@ static void update_texture_ctrl(LLVOAvatar* avatarp, { if (avatarp->isSelf()) { - const EWearableType wearable_type = tex_entry->mWearableType; + const LLWearableType::EType wearable_type = tex_entry->mWearableType; LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); if (wearable) { @@ -160,8 +160,7 @@ void LLFloaterAvatarTextures::onClickDump(void* data) { if (gAgent.isGodlike()) { - LLFloaterAvatarTextures* self = (LLFloaterAvatarTextures*)data; - LLVOAvatar* avatarp = find_avatar(self->mID); + const LLVOAvatarSelf* avatarp = gAgentAvatarp; if (!avatarp) return; for (S32 i = 0; i < avatarp->getNumTEs(); i++) { @@ -175,7 +174,7 @@ void LLFloaterAvatarTextures::onClickDump(void* data) if (LLVOAvatar::isIndexLocalTexture((ETextureIndex)i)) { LLUUID id = IMG_DEFAULT_AVATAR; - EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i); + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i); if (avatarp->isSelf()) { LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 44c82f1941..46b3695511 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -43,7 +43,7 @@ #include "llagent.h" // for agent id #include "llinventorymodel.h" // for gInventory #include "llfloaterreg.h" -#include "llfloaterinventory.h" // for get_item_icon +#include "llinventoryicon.h" #include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llnotificationsutil.h" @@ -152,9 +152,8 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info) LLSD row; // Compute icon for this item - std::string icon_name = get_item_icon_name(LLAssetType::AT_OBJECT, - LLInventoryType::IT_OBJECT, - 0x0, FALSE); + std::string icon_name = LLInventoryIcon::getIconName(LLAssetType::AT_OBJECT, + LLInventoryType::IT_OBJECT); row["columns"][0]["column"] = "icon"; row["columns"][0]["type"] = "icon"; @@ -253,8 +252,9 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, item_is_multi = TRUE; } - std::string icon_name = get_item_icon_name(inv_item->getType(), + std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), + inv_item->getIsLinkType(), inv_item->getFlags(), item_is_multi); row["columns"][0]["column"] = "icon"; diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index 1d989ad0fd..c35653178a 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -48,7 +48,7 @@ #include "llinventoryfunctions.h" #include "llinventorymodel.h" // for gInventory #include "llfloaterreg.h" -#include "llfloaterinventory.h" // for get_item_icon +#include "llfloaterinventory.h" // for LLInventoryIcon::getIcon #include "llnotificationsutil.h" #include "llselectmgr.h" #include "llscrolllistctrl.h" @@ -221,8 +221,9 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, item_is_multi = TRUE; } - std::string icon_name = get_item_icon_name(inv_item->getType(), + std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), + inv_item->getIsLinkType(), inv_item->getFlags(), item_is_multi); row["columns"][0]["column"] = "icon"; diff --git a/indra/newview/llfloaterbuycurrencyhtml.cpp b/indra/newview/llfloaterbuycurrencyhtml.cpp new file mode 100644 index 0000000000..5815df36d1 --- /dev/null +++ b/indra/newview/llfloaterbuycurrencyhtml.cpp @@ -0,0 +1,119 @@ +/** + * @file llfloaterbuycurrencyhtml.cpp + * @brief buy currency implemented in HTML floater - uses embedded media browser control + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2006-2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterbuycurrencyhtml.h" +#include "llstatusbar.h" + +//////////////////////////////////////////////////////////////////////////////// +// +LLFloaterBuyCurrencyHTML::LLFloaterBuyCurrencyHTML( const LLSD& key ): + LLFloater( key ), + mSpecificSumRequested( false ), + mMessage( "" ), + mSum( 0 ) +{ +} + +//////////////////////////////////////////////////////////////////////////////// +// +BOOL LLFloaterBuyCurrencyHTML::postBuild() +{ + // observer media events + mBrowser = getChild<LLMediaCtrl>( "browser" ); + mBrowser->addObserver( this ); + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////////////// +// +void LLFloaterBuyCurrencyHTML::navigateToFinalURL() +{ + // URL for actual currency buy contents is in XUI file + std::string buy_currency_url = getString( "buy_currency_url" ); + + // replace [LANGUAGE] meta-tag with view language + LLStringUtil::format_map_t replace; + + // viewer language + replace[ "[LANGUAGE]" ] = LLUI::getLanguage(); + + // flag that specific amount requested + replace[ "[SPECIFIC_AMOUNT]" ] = ( mSpecificSumRequested ? "y":"n" ); + + // amount requested + std::ostringstream codec( "" ); + codec << mSum; + replace[ "[SUM]" ] = codec.str(); + + // users' current balance + codec.clear(); + codec.str( "" ); + codec << gStatusBar->getBalance(); + replace[ "[BAL]" ] = codec.str(); + + // message - "This cost L$x,xxx for example + replace[ "[MSG]" ] = LLURI::escape( mMessage ); + LLStringUtil::format( buy_currency_url, replace ); + + // kick off the navigation + mBrowser->navigateTo( buy_currency_url ); +} + +//////////////////////////////////////////////////////////////////////////////// +// +void LLFloaterBuyCurrencyHTML::handleMediaEvent( LLPluginClassMedia* self, EMediaEvent event ) +{ + // placeholder for now - just in case we want to catch media events + if ( LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_COMPLETE == event ) + { + }; +} + +//////////////////////////////////////////////////////////////////////////////// +// +void LLFloaterBuyCurrencyHTML::onClose( bool app_quitting ) +{ + destroy(); +} + +//////////////////////////////////////////////////////////////////////////////// +// +void LLFloaterBuyCurrencyHTML::setParams( bool specific_sum_requested, const std::string& message, S32 sum ) +{ + // save these away - used to construct URL later + mSpecificSumRequested = specific_sum_requested; + mMessage = message; + mSum = sum; +} diff --git a/indra/newview/llfloaterbuycurrencyhtml.h b/indra/newview/llfloaterbuycurrencyhtml.h new file mode 100644 index 0000000000..be7a4d3dd6 --- /dev/null +++ b/indra/newview/llfloaterbuycurrencyhtml.h @@ -0,0 +1,65 @@ +/** + * @file llfloaterbuycurrencyhtml.h + * @brief buy currency implemented in HTML floater - uses embedded media browser control + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2006-2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERBUYCURRENCYHTML_H +#define LL_LLFLOATERBUYCURRENCYHTML_H + +#include "llfloater.h" +#include "llmediactrl.h" + +class LLFloaterBuyCurrencyHTML : + public LLFloater, + public LLViewerMediaObserver +{ + public: + LLFloaterBuyCurrencyHTML( const LLSD& key ); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onClose( bool app_quitting ); + + // inherited from LLViewerMediaObserver + /*virtual*/ void handleMediaEvent( LLPluginClassMedia* self, EMediaEvent event ); + + // allow our controlling parent to tell us paramters + void setParams( bool specific_sum_requested, const std::string& message, S32 sum ); + + // parse and construct URL and set browser to navigate there. + void navigateToFinalURL(); + + private: + LLMediaCtrl* mBrowser; + bool mSpecificSumRequested; + std::string mMessage; + S32 mSum; +}; + +#endif // LL_LLFLOATERBUYCURRENCYHTML_H diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 76a61db5fd..7ca7ace0fc 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -831,7 +831,7 @@ void LLFloaterBuyLandUI::updateNames() else { mParcelSellerName = - LLSLURL::buildCommand("agent", parcelp->getOwnerID(), "inspect"); + LLSLURL("agent", parcelp->getOwnerID(), "inspect").getSLURLString(); } } @@ -860,7 +860,7 @@ void LLFloaterBuyLandUI::startTransaction(TransactionType type, const LLXMLRPCVa static std::string transaction_uri; if (transaction_uri.empty()) { - transaction_uri = LLViewerLogin::getInstance()->getHelperURI() + "landtool.php"; + transaction_uri = LLGridManager::getInstance()->getHelperURI() + "landtool.php"; } const char* method; diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index d84ebef1dd..ca346138fb 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -47,15 +47,19 @@ #include "lltoolfocus.h" #include "llslider.h" +static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item"); + // Constants const F32 CAMERA_BUTTON_DELAY = 0.0f; #define ORBIT "cam_rotate_stick" #define PAN "cam_track_stick" #define ZOOM "zoom" -#define PRESETS "camera_presets" +#define PRESETS "preset_views_list" #define CONTROLS "controls" +bool LLFloaterCamera::sFreeCamera = false; + // Zoom the camera in and out class LLPanelCameraZoom : public LLPanel @@ -78,6 +82,68 @@ private: LLSlider* mSlider; }; +LLPanelCameraItem::Params::Params() +: icon_over("icon_over"), + icon_selected("icon_selected"), + picture("picture"), + text("text"), + selected_picture("selected_picture"), + mousedown_callback("mousedown_callback") +{ +} + +LLPanelCameraItem::LLPanelCameraItem(const LLPanelCameraItem::Params& p) +: LLPanel(p) +{ + LLIconCtrl::Params icon_params = p.picture; + mPicture = LLUICtrlFactory::create<LLIconCtrl>(icon_params); + addChild(mPicture); + + icon_params = p.icon_over; + mIconOver = LLUICtrlFactory::create<LLIconCtrl>(icon_params); + addChild(mIconOver); + + icon_params = p.icon_selected; + mIconSelected = LLUICtrlFactory::create<LLIconCtrl>(icon_params); + addChild(mIconSelected); + + icon_params = p.selected_picture; + mPictureSelected = LLUICtrlFactory::create<LLIconCtrl>(icon_params); + addChild(mPictureSelected); + + LLTextBox::Params text_params = p.text; + mText = LLUICtrlFactory::create<LLTextBox>(text_params); + addChild(mText); + + if (p.mousedown_callback.isProvided()) + { + setCommitCallback(initCommitCallback(p.mousedown_callback)); + } +} + +BOOL LLPanelCameraItem::postBuild() +{ + setMouseEnterCallback(boost::bind(&LLPanelCameraItem::childSetVisible, this, "hovered_icon", true)); + setMouseLeaveCallback(boost::bind(&LLPanelCameraItem::childSetVisible, this, "hovered_icon", false)); + setMouseDownCallback(boost::bind(&LLPanelCameraItem::onAnyMouseClick, this)); + setRightMouseDownCallback(boost::bind(&LLPanelCameraItem::onAnyMouseClick, this)); + return TRUE; +} + +void LLPanelCameraItem::onAnyMouseClick() +{ + if (mCommitSignal) (*mCommitSignal)(this, LLSD()); +} + +void LLPanelCameraItem::setValue(const LLSD& value) +{ + if (!value.isMap()) return;; + if (!value.has("selected")) return; + childSetVisible("selected_icon", value["selected"]); + childSetVisible("picture", !value["selected"]); + childSetVisible("selected_picture", value["selected"]); +} + static LLRegisterPanelClassWrapper<LLPanelCameraZoom> t_camera_zoom_panel("camera_zoom_panel"); //------------------------------------------------------------------------------- @@ -153,16 +219,11 @@ void activate_camera_tool() return false; } -bool LLFloaterCamera::inAvatarViewMode() -{ - return mCurrMode == CAMERA_CTRL_MODE_AVATAR_VIEW; -} - void LLFloaterCamera::resetCameraMode() { LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance(); if (!floater_camera) return; - floater_camera->switchMode(CAMERA_CTRL_MODE_ORBIT); + floater_camera->switchMode(CAMERA_CTRL_MODE_PAN); } void LLFloaterCamera::update() @@ -180,9 +241,13 @@ void LLFloaterCamera::toPrevMode() /*static*/ void LLFloaterCamera::onLeavingMouseLook() { LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance(); - if (floater_camera && floater_camera->inFreeCameraMode()) + if (floater_camera) { - activate_camera_tool(); + floater_camera->updateItemsSelection(); + if(floater_camera->inFreeCameraMode()) + { + activate_camera_tool(); + } } } @@ -216,24 +281,24 @@ void LLFloaterCamera::onClose(bool app_quitting) //We don't care of camera mode if app is quitting if(app_quitting) return; - // When mCurrMode is in CAMERA_CTRL_MODE_ORBIT + // 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. - if (mCurrMode == CAMERA_CTRL_MODE_ORBIT) - mPrevMode = CAMERA_CTRL_MODE_ORBIT; + if (mCurrMode == CAMERA_CTRL_MODE_PAN) + mPrevMode = CAMERA_CTRL_MODE_PAN; // HACK: Should always close as docked to prevent toggleInstance without calling onOpen. if ( !isDocked() ) setDocked(true); - switchMode(CAMERA_CTRL_MODE_ORBIT); + switchMode(CAMERA_CTRL_MODE_PAN); mClosed = TRUE; } LLFloaterCamera::LLFloaterCamera(const LLSD& val) : LLTransientDockableFloater(NULL, true, val), mClosed(FALSE), - mCurrMode(CAMERA_CTRL_MODE_ORBIT), - mPrevMode(CAMERA_CTRL_MODE_ORBIT) + mCurrMode(CAMERA_CTRL_MODE_PAN), + mPrevMode(CAMERA_CTRL_MODE_PAN) { } @@ -247,16 +312,32 @@ BOOL LLFloaterCamera::postBuild() mZoom = getChild<LLPanelCameraZoom>(ZOOM); mTrack = getChild<LLJoystickCameraTrack>(PAN); - assignButton2Mode(CAMERA_CTRL_MODE_ORBIT, "orbit_btn"); + assignButton2Mode(CAMERA_CTRL_MODE_MODES, "avatarview_btn"); assignButton2Mode(CAMERA_CTRL_MODE_PAN, "pan_btn"); - assignButton2Mode(CAMERA_CTRL_MODE_FREE_CAMERA, "freecamera_btn"); - assignButton2Mode(CAMERA_CTRL_MODE_AVATAR_VIEW, "avatarview_btn"); + assignButton2Mode(CAMERA_CTRL_MODE_PRESETS, "presets_btn"); update(); return LLDockableFloater::postBuild(); } +void LLFloaterCamera::fillFlatlistFromPanel (LLFlatListView* list, LLPanel* panel) +{ + // copying child list and then iterating over a copy, because list itself + // is changed in process + const child_list_t child_list = *panel->getChildList(); + child_list_t::const_reverse_iterator iter = child_list.rbegin(); + child_list_t::const_reverse_iterator end = child_list.rend(); + for ( ; iter != end; ++iter) + { + LLView* view = *iter; + LLPanel* item = dynamic_cast<LLPanel*>(view); + if (panel) + list->addItem(item); + } + +} + ECameraControlMode LLFloaterCamera::determineMode() { LLTool* curr_tool = LLToolMgr::getInstance()->getCurrentTool(); @@ -267,10 +348,10 @@ ECameraControlMode LLFloaterCamera::determineMode() if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { - return CAMERA_CTRL_MODE_AVATAR_VIEW; + return CAMERA_CTRL_MODE_PRESETS; } - return CAMERA_CTRL_MODE_ORBIT; + return CAMERA_CTRL_MODE_PAN; } @@ -301,21 +382,16 @@ void LLFloaterCamera::setModeTitle(const ECameraControlMode mode) std::string title; switch(mode) { - case CAMERA_CTRL_MODE_ORBIT: - title = getString("orbit_mode_title"); + case CAMERA_CTRL_MODE_MODES: + title = getString("camera_modes_title"); break; case CAMERA_CTRL_MODE_PAN: title = getString("pan_mode_title"); break; - case CAMERA_CTRL_MODE_AVATAR_VIEW: - title = getString("avatar_view_mode_title"); - break; - case CAMERA_CTRL_MODE_FREE_CAMERA: - title = getString("free_mode_title"); + case CAMERA_CTRL_MODE_PRESETS: + title = getString("presets_mode_title"); break; default: - // title should be provided for all modes - llassert(false); break; } setTitle(title); @@ -327,19 +403,28 @@ void LLFloaterCamera::switchMode(ECameraControlMode mode) switch (mode) { - case CAMERA_CTRL_MODE_ORBIT: - clear_camera_tool(); + case CAMERA_CTRL_MODE_MODES: + if(sFreeCamera) + { + switchMode(CAMERA_CTRL_MODE_FREE_CAMERA); + } break; case CAMERA_CTRL_MODE_PAN: + sFreeCamera = false; clear_camera_tool(); break; case CAMERA_CTRL_MODE_FREE_CAMERA: + sFreeCamera = true; activate_camera_tool(); break; - case CAMERA_CTRL_MODE_AVATAR_VIEW: + case CAMERA_CTRL_MODE_PRESETS: + if(sFreeCamera) + { + switchMode(CAMERA_CTRL_MODE_FREE_CAMERA); + } break; default: @@ -368,66 +453,80 @@ void LLFloaterCamera::assignButton2Mode(ECameraControlMode mode, const std::stri void LLFloaterCamera::updateState() { + childSetVisible(ZOOM, CAMERA_CTRL_MODE_PAN == mCurrMode); + + bool show_presets = (CAMERA_CTRL_MODE_PRESETS == mCurrMode) || (CAMERA_CTRL_MODE_FREE_CAMERA == mCurrMode + && CAMERA_CTRL_MODE_PRESETS == mPrevMode); + childSetVisible(PRESETS, show_presets); + + bool show_camera_modes = CAMERA_CTRL_MODE_MODES == mCurrMode || (CAMERA_CTRL_MODE_FREE_CAMERA == mCurrMode + && CAMERA_CTRL_MODE_MODES == mPrevMode); + childSetVisible("camera_modes_list", show_camera_modes); + + updateItemsSelection(); + + if (CAMERA_CTRL_MODE_FREE_CAMERA == mCurrMode) + { + return; + } + //updating buttons std::map<ECameraControlMode, LLButton*>::const_iterator iter = mMode2Button.begin(); for (; iter != mMode2Button.end(); ++iter) { iter->second->setToggleState(iter->first == mCurrMode); } - - childSetVisible(ORBIT, CAMERA_CTRL_MODE_ORBIT == mCurrMode); - childSetVisible(PAN, CAMERA_CTRL_MODE_PAN == mCurrMode); - childSetVisible(ZOOM, CAMERA_CTRL_MODE_AVATAR_VIEW != mCurrMode); - childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode); - - updateCameraPresetButtons(); setModeTitle(mCurrMode); - - - //hiding or showing the panel with controls by reshaping the floater - bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode; - if (showControls == childIsVisible(CONTROLS)) return; - - childSetVisible(CONTROLS, showControls); - - LLRect rect = getRect(); - LLRect controls_rect; - if (childGetRect(CONTROLS, controls_rect)) - { - S32 floater_header_size = getHeaderHeight(); - S32 height = controls_rect.getHeight() - floater_header_size; - S32 newHeight = rect.getHeight(); - - if (showControls) - { - newHeight += height; - } - else - { - newHeight -= height; - } - - rect.setOriginAndSize(rect.mLeft, rect.mBottom, rect.getWidth(), newHeight); - reshape(rect.getWidth(), rect.getHeight()); - setRect(rect); - - } } -void LLFloaterCamera::updateCameraPresetButtons() +void LLFloaterCamera::updateItemsSelection() { ECameraPreset preset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); - - childSetValue("rear_view", preset == CAMERA_PRESET_REAR_VIEW); - childSetValue("group_view", preset == CAMERA_PRESET_GROUP_VIEW); - childSetValue("front_view", preset == CAMERA_PRESET_FRONT_VIEW); - childSetValue("mouselook_view", gAgentCamera.cameraMouselook()); + LLSD argument; + argument["selected"] = preset == CAMERA_PRESET_REAR_VIEW; + getChild<LLPanelCameraItem>("rear_view")->setValue(argument); + argument["selected"] = preset == CAMERA_PRESET_GROUP_VIEW; + getChild<LLPanelCameraItem>("group_view")->setValue(argument); + argument["selected"] = preset == CAMERA_PRESET_FRONT_VIEW; + getChild<LLPanelCameraItem>("front_view")->setValue(argument); + argument["selected"] = gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK; + getChild<LLPanelCameraItem>("mouselook_view")->setValue(argument); + argument["selected"] = mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA; + getChild<LLPanelCameraItem>("object_view")->setValue(argument); } -void LLFloaterCamera::onClickCameraPresets(const LLSD& param) +void LLFloaterCamera::onClickCameraItem(const LLSD& param) { std::string name = param.asString(); + if ("mouselook_view" == name) + { + gAgentCamera.changeCameraToMouselook(); + } + else if ("object_view" == name) + { + LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); + if (camera_floater) + camera_floater->switchMode(CAMERA_CTRL_MODE_FREE_CAMERA); + } + else + { + switchToPreset(name); + } + + LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); + if (camera_floater) + { + camera_floater->updateItemsSelection(); + camera_floater->fromFreeToPresets(); + } +} + +/*static*/ +void LLFloaterCamera::switchToPreset(const std::string& name) +{ + sFreeCamera = false; + clear_camera_tool(); if ("rear_view" == name) { gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); @@ -440,12 +539,12 @@ void LLFloaterCamera::onClickCameraPresets(const LLSD& param) { gAgentCamera.switchCameraPreset(CAMERA_PRESET_FRONT_VIEW); } - else if ("mouselook_view" == name) +} + +void LLFloaterCamera::fromFreeToPresets() +{ + if (!sFreeCamera && mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA && mPrevMode == CAMERA_CTRL_MODE_PRESETS) { - gAgentCamera.changeCameraToMouselook(); + switchMode(CAMERA_CTRL_MODE_PRESETS); } - - LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); - if (camera_floater) - camera_floater->updateCameraPresetButtons(); } diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index b268839165..8fa7a53996 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -34,6 +34,9 @@ #define LLFLOATERCAMERA_H #include "lltransientdockablefloater.h" +#include "lliconctrl.h" +#include "lltextbox.h" +#include "llflatlistview.h" class LLJoystickCameraRotate; class LLJoystickCameraZoom; @@ -43,10 +46,10 @@ class LLPanelCameraZoom; enum ECameraControlMode { - CAMERA_CTRL_MODE_ORBIT, + CAMERA_CTRL_MODE_MODES, CAMERA_CTRL_MODE_PAN, CAMERA_CTRL_MODE_FREE_CAMERA, - CAMERA_CTRL_MODE_AVATAR_VIEW + CAMERA_CTRL_MODE_PRESETS }; class LLFloaterCamera @@ -58,8 +61,8 @@ public: /* whether in free camera mode */ static bool inFreeCameraMode(); - /* callback for camera presets changing */ - static void onClickCameraPresets(const LLSD& param); + /* callback for camera items selection changing */ + static void onClickCameraItem(const LLSD& param); static void onLeavingMouseLook(); @@ -68,7 +71,14 @@ public: /* determines actual mode and updates ui */ void update(); - + + /*switch to one of the camera presets (front, rear, side)*/ + static void switchToPreset(const std::string& name); + + /* move to CAMERA_CTRL_MODE_PRESETS from CAMERA_CTRL_MODE_FREE_CAMERA if we are on presets panel and + are not in free camera mode*/ + void fromFreeToPresets(); + virtual void onOpen(const LLSD& key); virtual void onClose(bool app_quitting); @@ -88,9 +98,6 @@ private: ECameraControlMode determineMode(); - /* whether in avatar view (first person) mode */ - bool inAvatarViewMode(); - /* resets to the previous mode */ void toPrevMode(); @@ -106,18 +113,59 @@ private: /* updates the state (UI) according to the current mode */ void updateState(); - /* update camera preset buttons toggle state according to the currently selected preset */ - void updateCameraPresetButtons(); + /* update camera modes items selection and camera preset items selection according to the currently selected preset */ + void updateItemsSelection(); void onClickBtn(ECameraControlMode mode); void assignButton2Mode(ECameraControlMode mode, const std::string& button_name); + // fills flatlist with items from given panel + void fillFlatlistFromPanel (LLFlatListView* list, LLPanel* panel); + // set to true when free camera mode is selected in modes list + // remains true until preset camera mode is chosen, or pan button is clicked, or escape pressed + static bool sFreeCamera; BOOL mClosed; ECameraControlMode mPrevMode; ECameraControlMode mCurrMode; std::map<ECameraControlMode, LLButton*> mMode2Button; +}; +/** + * Class used to represent widgets from panel_camera_item.xml- + * panels that contain pictures and text. Pictures are different + * for selected and unselected state (this state is nor stored- icons + * are changed in setValue()). This class doesn't implement selection logic- + * it's items are used inside of flatlist. + */ +class LLPanelCameraItem + : public LLPanel +{ +public: + struct Params : public LLInitParam::Block<Params, LLPanel::Params> + { + Optional<LLIconCtrl::Params> icon_over; + Optional<LLIconCtrl::Params> icon_selected; + Optional<LLIconCtrl::Params> picture; + Optional<LLIconCtrl::Params> selected_picture; + + Optional<LLTextBox::Params> text; + Optional<CommitCallbackParam> mousedown_callback; + Params(); + }; + /*virtual*/ BOOL postBuild(); + /** setting on/off background icon to indicate selected state */ + /*virtual*/ void setValue(const LLSD& value); + // sends commit signal + void onAnyMouseClick(); +protected: + friend class LLUICtrlFactory; + LLPanelCameraItem(const Params&); + LLIconCtrl* mIconOver; + LLIconCtrl* mIconSelected; + LLIconCtrl* mPicture; + LLIconCtrl* mPictureSelected; + LLTextBox* mText; }; #endif diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index cdb9b8edb8..882d12f68e 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -166,7 +166,7 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& if (chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID != LLUUID::null) { - chat.mURL = LLSLURL::buildCommand("agent", chat.mFromID, "inspect"); + chat.mURL = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString(); } // If the chat line has an associated url, link it up to the name. diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp index 774caaec90..a15cef7ea4 100644 --- a/indra/newview/llfloaterchatterbox.cpp +++ b/indra/newview/llfloaterchatterbox.cpp @@ -318,7 +318,7 @@ LLFloaterChatterBox* LLFloaterChatterBox::getInstance() //static LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater() { - if (!LLVoiceClient::voiceEnabled()) + if (!LLVoiceClient::getInstance()->voiceEnabled()) { return NULL; } diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp index 560cc29080..f6cffd4b14 100644 --- a/indra/newview/llfloaterevent.cpp +++ b/indra/newview/llfloaterevent.cpp @@ -192,7 +192,7 @@ void LLFloaterEvent::processEventInfoReply(LLMessageSystem *msg, void **) floater->mTBCategory->setText(floater->mEventInfo.mCategoryStr); floater->mTBDate->setText(floater->mEventInfo.mTimeStr); floater->mTBDesc->setText(floater->mEventInfo.mDesc); - floater->mTBRunBy->setText(LLSLURL::buildCommand("agent", floater->mEventInfo.mRunByID, "inspect")); + floater->mTBRunBy->setText(LLSLURL("agent", floater->mEventInfo.mRunByID, "inspect").getSLURLString()); floater->mTBDuration->setText(llformat("%d:%.2d", floater->mEventInfo.mDuration / 60, floater->mEventInfo.mDuration % 60)); diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp index d2ee3e44c5..930bbe9e6b 100644 --- a/indra/newview/llfloaterhud.cpp +++ b/indra/newview/llfloaterhud.cpp @@ -79,9 +79,6 @@ BOOL LLFloaterHUD::postBuild() mWebBrowser = getChild<LLMediaCtrl>("floater_hud_browser" ); if (mWebBrowser) { - // Open links in internal browser - mWebBrowser->setOpenInExternalBrowser(false); - // This is a "chrome" floater, so we don't want anything to // take focus (as the user needs to be able to walk with // arrow keys during tutorial). diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 2ff483cd34..abdb55ec17 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -42,7 +42,6 @@ #include "llnotificationsutil.h" #include "llparcel.h" #include "message.h" -#include "lluserauth.h" #include "llagent.h" #include "llbutton.h" @@ -647,9 +646,12 @@ void LLPanelLandGeneral::refresh() } // Display claim date - // *TODO:Localize (Time format may need Translating) time_t claim_date = parcel->getClaimDate(); - mTextClaimDate->setText(formatted_time(claim_date)); + std::string claim_date_str = getString("time_stamp_template"); + LLSD substitution; + substitution["datetime"] = (S32) claim_date; + LLStringUtil::format (claim_date_str, substitution); + mTextClaimDate->setText(claim_date_str); mTextClaimDate->setEnabled(is_leased); BOOL enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON) @@ -805,7 +807,7 @@ void LLPanelLandGeneral::refreshNames() else { // Figure out the owner's name - owner = LLSLURL::buildCommand("agent", parcel->getOwnerID(), "inspect"); + owner = LLSLURL("agent", parcel->getOwnerID(), "inspect").getSLURLString(); } if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus()) @@ -817,7 +819,7 @@ void LLPanelLandGeneral::refreshNames() std::string group; if (!parcel->getGroupID().isNull()) { - group = LLSLURL::buildCommand("group", parcel->getGroupID(), "inspect"); + group = LLSLURL("group", parcel->getGroupID(), "inspect").getSLURLString(); } mTextGroup->setText(group); @@ -826,9 +828,9 @@ void LLPanelLandGeneral::refreshNames() const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID(); if(auth_buyer_id.notNull()) { - std::string name; - name = LLSLURL::buildCommand("agent", auth_buyer_id, "inspect"); - mSaleInfoForSale2->setTextArg("[BUYER]", name); + std::string name; + name = LLSLURL("agent", auth_buyer_id, "inspect").getSLURLString(); + mSaleInfoForSale2->setTextArg("[BUYER]", name); } else { diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 5677899dd9..725fc17136 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -232,6 +232,17 @@ void LLFloaterMap::onFocusLost() void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) { LLFloater::reshape(width, height, called_from_parent); + + //fix for ext-7112 + //by default ctrl can't overlap caption area + if(mMap) + { + LLRect map_rect; + map_rect.setLeftTopAndSize( 0, getRect().getHeight(), width, height); + mMap->reshape( width, height, 1); + mMap->setRect(map_rect); + } + updateMinorDirections(); } diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index b744bff084..105d7f9201 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -184,7 +184,7 @@ BOOL LLFloaterNotificationConsole::postBuild() addChannel("Ignore"); addChannel("Visible", true); // all the ones below attach to the Visible channel - addChannel("History"); + addChannel("Persistent"); addChannel("Alerts"); addChannel("AlertModal"); addChannel("Group Notifications"); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index e2c5ad6d02..0eeef0039c 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -599,7 +599,7 @@ void LLFloaterPreference::onBtnOK() llinfos << "Can't close preferences!" << llendl; } - LLPanelLogin::refreshLocation( false ); + LLPanelLogin::updateLocationCombo( false ); } // static @@ -616,7 +616,7 @@ void LLFloaterPreference::onBtnApply( ) apply(); saveSettings(); - LLPanelLogin::refreshLocation( false ); + LLPanelLogin::updateLocationCombo( false ); } // static @@ -1197,7 +1197,7 @@ void LLFloaterPreference::applyResolution() gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth); gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight); - gViewerWindow->requestResolutionUpdate(gSavedSettings.getBOOL("WindowFullScreen")); + gViewerWindow->requestResolutionUpdate(gSavedSettings.getBOOL("FullScreen")); send_agent_update(TRUE); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 3758cbe74f..8c219cb3fd 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -2922,8 +2922,7 @@ bool LLDispatchEstateUpdateInfo::operator()( LLUUID owner_id(strings[1]); regionp->setOwner(owner_id); // Update estate owner name in UI - std::string owner_name = - LLSLURL::buildCommand("agent", owner_id, "inspect"); + std::string owner_name = LLSLURL("agent", owner_id, "inspect").getSLURLString(); panel->setOwnerName(owner_name); U32 estate_id = strtoul(strings[2].c_str(), NULL, 10); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index b42b34835d..f7c8855bf6 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -126,7 +126,9 @@ void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg) // virtual BOOL LLFloaterReporter::postBuild() { - childSetText("abuse_location_edit", LLAgentUI::buildSLURL()); + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl); + childSetText("abuse_location_edit", slurl.getSLURLString()); enableControls(TRUE); @@ -280,7 +282,6 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) { object_owner.append("Unknown"); } - setFromAvatar(mObjectID, object_owner); } else @@ -325,7 +326,8 @@ void LLFloaterReporter::setFromAvatar(const LLUUID& avatar_id, const std::string mAbuserID = mObjectID = avatar_id; mOwnerName = avatar_name; - std::string avatar_link = LLSLURL::buildCommand("agent", mObjectID, "inspect"); + std::string avatar_link = + LLSLURL("agent", mObjectID, "inspect").getSLURLString(); childSetText("owner_name", avatar_link); childSetText("object_name", avatar_name); childSetText("abuser_name_edit", avatar_name); @@ -504,7 +506,7 @@ void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name { childSetText("object_name", object_name); std::string owner_link = - LLSLURL::buildCommand("agent", owner_id, "inspect"); + LLSLURL("agent", owner_id, "inspect").getSLURLString(); childSetText("owner_name", owner_link); childSetText("abuser_name_edit", owner_name); mAbuserID = owner_id; @@ -566,7 +568,7 @@ LLSD LLFloaterReporter::gatherReport() mCopyrightWarningSeen = FALSE; std::ostringstream summary; - if (!LLViewerLogin::getInstance()->isInProductionGrid()) + if (!LLGridManager::getInstance()->isInProductionGrid()) { summary << "Preview "; } diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 980b456497..9dddbd998a 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -94,7 +94,6 @@ private: static void doSellLand(void *userdata); bool onConfirmSale(const LLSD& notification, const LLSD& response); static void doShowObjects(void *userdata); - static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); void callbackAvatarPick(const std::vector<std::string>& names, const uuid_vec_t& ids); @@ -102,6 +101,7 @@ public: virtual BOOL postBuild(); bool setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel); + static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); }; // static @@ -423,11 +423,13 @@ void LLFloaterSellLandUI::doShowObjects(void *userdata) send_parcel_select_objects(parcel->getLocalID(), RT_SELL); + // we shouldn't pass callback functor since it is registered in LLFunctorRegistration LLNotificationsUtil::add("TransferObjectsHighlighted", - LLSD(), LLSD(), - &LLFloaterSellLandUI::callbackHighlightTransferable); + LLSD(), LLSD()); } +static LLNotificationFunctorRegistration tr("TransferObjectsHighlighted", &LLFloaterSellLandUI::callbackHighlightTransferable); + // static bool LLFloaterSellLandUI::callbackHighlightTransferable(const LLSD& notification, const LLSD& data) { diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index e994a18d9b..5bea3325a8 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1145,7 +1145,7 @@ void LLSnapshotLivePreview::saveWeb(std::string url) void LLSnapshotLivePreview::regionNameCallback(std::string url, LLSD body, const std::string& name, S32 x, S32 y, S32 z) { - body["slurl"] = LLSLURL::buildSLURL(name, x, y, z); + body["slurl"] = LLSLURL(name, LLVector3d(x, y, z)).getSLURLString(); LLHTTPClient::post(url, body, new LLSendWebResponder()); @@ -2196,7 +2196,7 @@ bool LLFloaterSnapshot::updateButtons(ESnapshotMode mode) childSetVisible("save", mode == SNAPSHOT_MAIN); childSetVisible("set_profile_pic", mode == SNAPSHOT_MAIN); - childSetVisible("share_to_web", mode == SNAPSHOT_SHARE); +// childSetVisible("share_to_web", mode == SNAPSHOT_SHARE); childSetVisible("share_to_email", mode == SNAPSHOT_SHARE); childSetVisible("save_to_inventory", mode == SNAPSHOT_SAVE); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index d8d7057c4e..a42f6ee00f 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -237,6 +237,7 @@ BOOL LLFloaterTools::postBuild() childSetValue("checkbox stretch textures",(BOOL)gSavedSettings.getBOOL("ScaleStretchTextures")); mTextGridMode = getChild<LLTextBox>("text ruler mode"); mComboGridMode = getChild<LLComboBox>("combobox grid mode"); + mCheckStretchUniformLabel = getChild<LLTextBox>("checkbox uniform label"); // // Create Buttons @@ -316,6 +317,7 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) mComboGridMode(NULL), mCheckStretchUniform(NULL), mCheckStretchTexture(NULL), + mCheckStretchUniformLabel(NULL), mBtnRotateLeft(NULL), mBtnRotateReset(NULL), @@ -632,6 +634,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) //mCheckSelectLinked ->setVisible( edit_visible ); if (mCheckStretchUniform) mCheckStretchUniform->setVisible( edit_visible ); if (mCheckStretchTexture) mCheckStretchTexture->setVisible( edit_visible ); + if (mCheckStretchUniformLabel) mCheckStretchUniformLabel->setVisible( edit_visible ); // Create buttons BOOL create_visible = (tool == LLToolCompCreate::getInstance()); diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index e1f3c9b78c..91431969bb 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -149,6 +149,10 @@ public: LLCheckBoxCtrl* mCheckStretchUniform; LLCheckBoxCtrl* mCheckStretchTexture; + // !HACK! Replacement of mCheckStretchUniform label because LLCheckBoxCtrl + // doesn't support word_wrap of its label. Need to fix truncation bug EXT-6658 + LLTextBox* mCheckStretchUniformLabel; + LLButton *mBtnRotateLeft; LLButton *mBtnRotateReset; LLButton *mBtnRotateRight; diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index f61c86db14..1b6ef0e97a 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -266,11 +266,12 @@ private: class LLPreviewedFloater : public LLFloater { public: - LLPreviewedFloater(LLFloaterUIPreview* floater) - : LLFloater(LLSD()), + LLPreviewedFloater(LLFloaterUIPreview* floater, const Params& params) + : LLFloater(LLSD(), params), mFloaterUIPreview(floater) { } + virtual void draw(); BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); BOOL handleToolTip(S32 x, S32 y, MASK mask); @@ -428,6 +429,7 @@ BOOL LLFloaterUIPreview::postBuild() // Double-click opens the floater, for convenience mFileList->setDoubleClickCallback(boost::bind(&LLFloaterUIPreview::onClickDisplayFloater, this, PRIMARY_FLOATER)); + setDefaultBtn("display_floater"); // get pointers to buttons and link to callbacks mLanguageSelection = main_panel_tmp->getChild<LLComboBox>("language_select_combo"); mLanguageSelection->setCommitCallback(boost::bind(&LLFloaterUIPreview::onLanguageComboSelect, this, mLanguageSelection)); @@ -824,7 +826,11 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) return; // ignore click (this can only happen with empty list; otherwise an item is always selected) } - *floaterp = new LLPreviewedFloater(this); + LLFloater::Params p(LLFloater::getDefaultParams()); + p.min_height=p.header_height; + p.min_width=10; + + *floaterp = new LLPreviewedFloater(this, p); if(!strncmp(path.c_str(),"floater_",8) || !strncmp(path.c_str(), "inspect_", 8)) // if it's a floater @@ -874,6 +880,8 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) } else // if it is a panel... { + (*floaterp)->setCanResize(true); + const LLFloater::Params& floater_params = LLFloater::getDefaultParams(); S32 floater_header_size = floater_params.header_height; diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 002d417e4c..0e802e9736 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -70,11 +70,6 @@ public: completeAny(status, mime_type); } - virtual void error( U32 status, const std::string& reason ) - { - completeAny(status, LLMIMETypes::getDefaultMimeType()); - } - void completeAny(U32 status, const std::string& mime_type) { // Set empty type to none/none. Empty string is reserved for legacy parcels diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp index 638c9f1b8c..63365e3461 100644 --- a/indra/newview/llfloatervoicedevicesettings.cpp +++ b/indra/newview/llfloatervoicedevicesettings.cpp @@ -64,9 +64,6 @@ LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings() // grab "live" mic volume level mMicVolume = gSavedSettings.getF32("AudioLevelMic"); - // ask for new device enumeration - // now do this in onOpen() instead... - //gVoiceClient->refreshDeviceLists(); } LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings() @@ -105,7 +102,7 @@ void LLPanelVoiceDeviceSettings::draw() refresh(); // let user know that volume indicator is not yet available - bool is_in_tuning_mode = gVoiceClient->inTuningMode(); + bool is_in_tuning_mode = LLVoiceClient::getInstance()->inTuningMode(); childSetVisible("wait_text", !is_in_tuning_mode); LLPanel::draw(); @@ -113,7 +110,7 @@ void LLPanelVoiceDeviceSettings::draw() if (is_in_tuning_mode) { const S32 num_bars = 5; - F32 voice_power = gVoiceClient->tuningGetEnergy() / LLVoiceClient::OVERDRIVEN_POWER_LEVEL; + F32 voice_power = LLVoiceClient::getInstance()->tuningGetEnergy() / LLVoiceClient::OVERDRIVEN_POWER_LEVEL; S32 discrete_power = llmin(num_bars, llfloor(voice_power * (F32)num_bars + 0.1f)); for(S32 power_bar_idx = 0; power_bar_idx < num_bars; power_bar_idx++) @@ -194,13 +191,13 @@ void LLPanelVoiceDeviceSettings::refresh() LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); // set mic volume tuning slider based on last mic volume setting F32 current_volume = (F32)volume_slider->getValue().asReal(); - gVoiceClient->tuningSetMicVolume(current_volume); + LLVoiceClient::getInstance()->tuningSetMicVolume(current_volume); // Fill in popup menus mCtrlInputDevices = getChild<LLComboBox>("voice_input_device"); mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device"); - if(!gVoiceClient->deviceSettingsAvailable()) + if(!LLVoiceClient::getInstance()->deviceSettingsAvailable()) { // The combo boxes are disabled, since we can't get the device settings from the daemon just now. // Put the currently set default (ONLY) in the box, and select it. @@ -219,17 +216,16 @@ void LLPanelVoiceDeviceSettings::refresh() } else if (!mDevicesUpdated) { - LLVoiceClient::deviceList *devices; - - LLVoiceClient::deviceList::iterator iter; + LLVoiceDeviceList::const_iterator iter; if(mCtrlInputDevices) { mCtrlInputDevices->removeall(); mCtrlInputDevices->add( getString("default_text"), ADD_BOTTOM ); - devices = gVoiceClient->getCaptureDevices(); - for(iter=devices->begin(); iter != devices->end(); iter++) + for(iter=LLVoiceClient::getInstance()->getCaptureDevices().begin(); + iter != LLVoiceClient::getInstance()->getCaptureDevices().end(); + iter++) { mCtrlInputDevices->add( *iter, ADD_BOTTOM ); } @@ -245,8 +241,8 @@ void LLPanelVoiceDeviceSettings::refresh() mCtrlOutputDevices->removeall(); mCtrlOutputDevices->add( getString("default_text"), ADD_BOTTOM ); - devices = gVoiceClient->getRenderDevices(); - for(iter=devices->begin(); iter != devices->end(); iter++) + for(iter= LLVoiceClient::getInstance()->getRenderDevices().begin(); + iter != LLVoiceClient::getInstance()->getRenderDevices().end(); iter++) { mCtrlOutputDevices->add( *iter, ADD_BOTTOM ); } @@ -268,37 +264,34 @@ void LLPanelVoiceDeviceSettings::initialize() mDevicesUpdated = FALSE; // ask for new device enumeration - gVoiceClient->refreshDeviceLists(); + LLVoiceClient::getInstance()->refreshDeviceLists(); // put voice client in "tuning" mode - gVoiceClient->tuningStart(); + LLVoiceClient::getInstance()->tuningStart(); LLVoiceChannel::suspend(); } void LLPanelVoiceDeviceSettings::cleanup() { - if (gVoiceClient) - { - gVoiceClient->tuningStop(); - } + LLVoiceClient::getInstance()->tuningStop(); LLVoiceChannel::resume(); } // static void LLPanelVoiceDeviceSettings::onCommitInputDevice(LLUICtrl* ctrl, void* user_data) { - if(gVoiceClient) + if(LLVoiceClient::getInstance()) { - gVoiceClient->setCaptureDevice(ctrl->getValue().asString()); + LLVoiceClient::getInstance()->setCaptureDevice(ctrl->getValue().asString()); } } // static void LLPanelVoiceDeviceSettings::onCommitOutputDevice(LLUICtrl* ctrl, void* user_data) { - if(gVoiceClient) + if(LLVoiceClient::getInstance()) { - gVoiceClient->setRenderDevice(ctrl->getValue().asString()); + LLVoiceClient::getInstance()->setRenderDevice(ctrl->getValue().asString()); } } diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index b3223ad494..152360a96e 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -461,7 +461,7 @@ void LLFloaterWorldMap::draw() childSetEnabled("Teleport", (BOOL)tracking_status); // childSetEnabled("Clear", (BOOL)tracking_status); childSetEnabled("Show Destination", (BOOL)tracking_status || LLWorldMap::getInstance()->isTracking()); - childSetEnabled("copy_slurl", (mSLURL.size() > 0) ); + childSetEnabled("copy_slurl", (mSLURL.isValid()) ); setMouseOpaque(TRUE); getDragHandle()->setMouseOpaque(TRUE); @@ -660,14 +660,8 @@ void LLFloaterWorldMap::updateLocation() childSetValue("location", agent_sim_name); // Figure out where user is - LLVector3d agentPos = gAgent.getPositionGlobal(); - - S32 agent_x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) ); - S32 agent_y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) ); - S32 agent_z = llround( (F32)agentPos.mdV[VZ] ); - // Set the current SLURL - mSLURL = LLSLURL::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z); + mSLURL = LLSLURL(agent_sim_name, gAgent.getPositionGlobal()); } } @@ -694,18 +688,15 @@ void LLFloaterWorldMap::updateLocation() } childSetValue("location", sim_name); - - F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS ); - F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS ); // simNameFromPosGlobal can fail, so don't give the user an invalid SLURL if ( gotSimName ) { - mSLURL = LLSLURL::buildSLURL(sim_name, llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ])); + mSLURL = LLSLURL(sim_name, pos_global); } else { // Empty SLURL will disable the "Copy SLURL to clipboard" button - mSLURL = ""; + mSLURL = LLSLURL(); } } } @@ -1174,7 +1165,7 @@ void LLFloaterWorldMap::onClearBtn() mTrackedStatus = LLTracker::TRACKING_NOTHING; LLTracker::stopTracking((void *)(intptr_t)TRUE); LLWorldMap::getInstance()->cancelTracking(); - mSLURL = ""; // Clear the SLURL since it's invalid + mSLURL = LLSLURL(); // Clear the SLURL since it's invalid mSetToUserPosition = TRUE; // Revert back to the current user position } @@ -1197,10 +1188,10 @@ void LLFloaterWorldMap::onClickTeleportBtn() void LLFloaterWorldMap::onCopySLURL() { - getWindow()->copyTextToClipboard(utf8str_to_wstring(mSLURL)); + getWindow()->copyTextToClipboard(utf8str_to_wstring(mSLURL.getSLURLString())); LLSD args; - args["SLURL"] = mSLURL; + args["SLURL"] = mSLURL.getSLURLString(); LLNotificationsUtil::add("CopySLURL", args); } diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index 00f5e788fb..52809ff830 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -43,6 +43,7 @@ #include "llhudtext.h" #include "llmapimagetype.h" #include "lltracker.h" +#include "llslurl.h" class LLEventInfo; class LLFriendObserver; @@ -183,7 +184,7 @@ private: LLTracker::ETrackingStatus mTrackedStatus; std::string mTrackedSimName; std::string mTrackedAvatarName; - std::string mSLURL; + LLSLURL mSLURL; }; extern LLFloaterWorldMap* gFloaterWorldMap; diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index eba4cdfa31..a87f7288fa 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -846,16 +846,16 @@ void LLFolderView::clearSelection() mSelectThisID.setNull(); } -BOOL LLFolderView::getSelectionList(std::set<LLUUID> &selection) const +std::set<LLUUID> LLFolderView::getSelectionList() const { + std::set<LLUUID> selection; for (selected_items_t::const_iterator item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) { selection.insert((*item_it)->getListener()->getUUID()); } - - return (selection.size() != 0); + return selection; } BOOL LLFolderView::startDrag(LLToolDragAndDrop::ESource source) @@ -1744,6 +1744,8 @@ BOOL LLFolderView::handleMouseDown( S32 x, S32 y, MASK mask ) mParentPanel->setFocus(TRUE); + LLEditMenuHandler::gEditMenuHandler = this; + return LLView::handleMouseDown( x, y, mask ); } @@ -2070,8 +2072,7 @@ bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) } - std::set<LLUUID> selected_items; - getSelectionList(selected_items); + std::set<LLUUID> selected_items = getSelectionList(); LLMultiPreview* multi_previewp = NULL; LLMultiProperties* multi_propertiesp = NULL; diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 874723bb1a..0dfdbd364b 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -164,7 +164,7 @@ public: virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items); - virtual BOOL getSelectionList(std::set<LLUUID> &selection) const; + virtual std::set<LLUUID> getSelectionList() const; // make sure if ancestor is selected, descendents are not void sanitizeSelection(); @@ -230,6 +230,7 @@ public: EAcceptance* accept, std::string& tooltip_msg); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) { setShowSelectionContext(FALSE); } virtual void draw(); virtual void deleteAllChildren(); diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 3208218302..54e9bd5383 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -387,6 +387,12 @@ void LLFolderViewItem::extendSelectionFromRoot(LLFolderViewItem* selection) getRoot()->extendSelection(selection, NULL, selected_items); } +std::set<LLUUID> LLFolderViewItem::getSelectionList() const +{ + std::set<LLUUID> selection; + return selection; +} + EInventorySortGroup LLFolderViewItem::getSortGroup() const { return SG_ITEM; @@ -836,6 +842,7 @@ void LLFolderViewItem::draw() static LLUIColor sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE); static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemColor", DEFAULT_WHITE); static LLUIColor sLibraryColor = LLUIColorTable::instance().getColor("InventoryItemLibraryColor", DEFAULT_WHITE); + static LLUIColor sLinkColor = LLUIColorTable::instance().getColor("InventoryItemLinkColor", DEFAULT_WHITE); static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); const Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); @@ -965,6 +972,8 @@ void LLFolderViewItem::draw() } LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor; + const LLViewerInventoryItem *item = getInventoryItem(); + if (item && item->getIsLinkType()) color = sLinkColor; if (in_library) color = sLibraryColor; F32 right_x = 0; diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 655ad89e99..57c722afa4 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -231,7 +231,7 @@ public: virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items){ return FALSE; } // gets multiple-element selection - virtual BOOL getSelectionList(std::set<LLUUID> &selection) const {return TRUE;} + virtual std::set<LLUUID> getSelectionList() const; // Returns true is this object and all of its children can be removed (deleted by user) virtual BOOL isRemovable(); diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp new file mode 100644 index 0000000000..d83d895dd0 --- /dev/null +++ b/indra/newview/llgiveinventory.cpp @@ -0,0 +1,541 @@ +/** + * @file llgiveinventory.cpp + * @brief LLGiveInventory class implementation + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llgiveinventory.h" + +// library includes +#include "llnotificationsutil.h" +#include "lltrans.h" + +// newview includes +#include "llagent.h" +#include "llagentdata.h" +#include "llagentui.h" +#include "llagentwearables.h" +#include "llfloatertools.h" // for gFloaterTool +#include "llhudeffecttrail.h" +#include "llhudmanager.h" +#include "llimview.h" +#include "llinventory.h" +#include "llinventoryfunctions.h" +#include "llmutelist.h" +#include "llrecentpeople.h" +#include "llviewerobjectlist.h" +#include "llvoavatarself.h" + +// MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES +// or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a +// bit from there to give some pad. +const S32 MAX_ITEMS = 42; + +class LLGiveable : public LLInventoryCollectFunctor +{ +public: + LLGiveable() : mCountLosing(0) {} + virtual ~LLGiveable() {} + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); + + S32 countNoCopy() const { return mCountLosing; } +protected: + S32 mCountLosing; +}; + +bool LLGiveable::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + // All categories can be given. + if (cat) + return true; + + bool allowed = false; + if (item) + { + allowed = itemTransferCommonlyAllowed(item); + if (allowed && + !item->getPermissions().allowOperationBy(PERM_TRANSFER, + gAgent.getID())) + { + allowed = FALSE; + } + if (allowed && + !item->getPermissions().allowCopyBy(gAgent.getID())) + { + ++mCountLosing; + } + } + return allowed; +} + +class LLUncopyableItems : public LLInventoryCollectFunctor +{ +public: + LLUncopyableItems() {} + virtual ~LLUncopyableItems() {} + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); +}; + +bool LLUncopyableItems::operator()(LLInventoryCategory* cat, + LLInventoryItem* item) +{ + bool uncopyable = false; + if (item) + { + if (itemTransferCommonlyAllowed(item) && + !item->getPermissions().allowCopyBy(gAgent.getID())) + { + uncopyable = true; + } + } + return uncopyable; +} + +// static +bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item) +{ + if (!item) return false; + + if (!isAgentAvatarValid()) return false; + + if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgentID)) + { + return false; + } + + bool acceptable = true; + switch(item->getType()) + { + case LLAssetType::AT_OBJECT: + if (gAgentAvatarp->isWearingAttachment(item->getUUID())) + { + acceptable = false; + } + break; + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_CLOTHING: + { + BOOL copyable = false; + if (item->getPermissions().allowCopyBy(gAgentID)) copyable = true; + + if (!copyable && gAgentWearables.isWearingItem(item->getUUID())) + { + acceptable = false; + } + } + break; + default: + break; + } + return acceptable; +} + +// static +bool LLGiveInventory::isInventoryGroupGiveAcceptable(const LLInventoryItem* item) +{ + if (!item) return false; + + if (!isAgentAvatarValid()) return false; + + // These permissions are double checked in the simulator in + // LLGroupNoticeInventoryItemFetch::result(). + if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgentID)) + { + return false; + } + if (!item->getPermissions().allowCopyBy(gAgent.getID())) + { + return false; + } + + + bool acceptable = true; + switch(item->getType()) + { + case LLAssetType::AT_OBJECT: + if (gAgentAvatarp->isWearingAttachment(item->getUUID())) + { + acceptable = false; + } + break; + default: + break; + } + return acceptable; +} + +// static +void LLGiveInventory::doGiveInventoryItem(const LLUUID& to_agent, + const LLInventoryItem* item, + const LLUUID& im_session_id/* = LLUUID::null*/) + +{ + llinfos << "LLGiveInventory::giveInventory()" << llendl; + if (!isInventoryGiveAcceptable(item)) + { + return; + } + if (item->getPermissions().allowCopyBy(gAgentID)) + { + // just give it away. + LLGiveInventory::commitGiveInventoryItem(to_agent, item, im_session_id); + } + else + { + // ask if the agent is sure. + LLSD payload; + payload["agent_id"] = to_agent; + payload["item_id"] = item->getUUID(); + LLNotificationsUtil::add("CannotCopyWarning", LLSD(), payload, + &LLGiveInventory::handleCopyProtectedItem); + } +} + +void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, + const LLInventoryCategory* cat, + const LLUUID& im_session_id) + +{ + if (!cat) return; + llinfos << "LLGiveInventory::giveInventoryCategory() - " + << cat->getUUID() << llendl; + + if (!isAgentAvatarValid()) return; + + // Test out how many items are being given. + LLViewerInventoryCategory::cat_array_t cats; + LLViewerInventoryItem::item_array_t items; + LLGiveable giveable; + gInventory.collectDescendentsIf (cat->getUUID(), + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + giveable); + S32 count = cats.count(); + bool complete = true; + for(S32 i = 0; i < count; ++i) + { + if (!gInventory.isCategoryComplete(cats.get(i)->getUUID())) + { + complete = false; + break; + } + } + if (!complete) + { + LLNotificationsUtil::add("IncompleteInventory"); + return; + } + count = items.count() + cats.count(); + if (count > MAX_ITEMS) + { + LLNotificationsUtil::add("TooManyItems"); + return; + } + else if (count == 0) + { + LLNotificationsUtil::add("NoItems"); + return; + } + else + { + if (0 == giveable.countNoCopy()) + { + LLGiveInventory::commitGiveInventoryCategory(to_agent, cat, im_session_id); + } + else + { + LLSD args; + args["COUNT"] = llformat("%d",giveable.countNoCopy()); + LLSD payload; + payload["agent_id"] = to_agent; + payload["folder_id"] = cat->getUUID(); + LLNotificationsUtil::add("CannotCopyCountItems", args, payload, &LLGiveInventory::handleCopyProtectedCategory); + } + } +} + +////////////////////////////////////////////////////////////////////////// +// PRIVATE METHODS +////////////////////////////////////////////////////////////////////////// + +//static +void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im_session_id) +{ + // compute id of possible IM session with agent that has "to_agent" id + LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, to_agent); + // If this item was given by drag-and-drop into an IM panel, log this action in the IM panel chat. + if (im_session_id.notNull()) + { + LLSD args; + gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args); + } + // If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat. + else if (LLIMModel::getInstance()->findIMSession(session_id)) + { + LLSD args; + gIMMgr->addSystemMessage(session_id, "inventory_item_offered", args); + } + // If this item was given by drag-and-drop on avatar while IM panel wasn't open, log this action to IM history. + else + { + std::string full_name; + if (gCacheName->getFullName(to_agent, full_name)) + { + LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, LLTrans::getString("inventory_item_offered-im")); + } + } +} + +// static +bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + LLInventoryItem* item = NULL; + switch(option) + { + case 0: // "Yes" + item = gInventory.getItem(notification["payload"]["item_id"].asUUID()); + if (item) + { + LLGiveInventory::commitGiveInventoryItem(notification["payload"]["agent_id"].asUUID(), + item); + // delete it for now - it will be deleted on the server + // quickly enough. + gInventory.deleteObject(notification["payload"]["item_id"].asUUID()); + gInventory.notifyObservers(); + } + else + { + LLNotificationsUtil::add("CannotGiveItem"); + } + break; + + default: // no, cancel, whatever, who cares, not yes. + LLNotificationsUtil::add("TransactionCancelled"); + break; + } + return false; +} + +// static +void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, + const LLInventoryItem* item, + const LLUUID& im_session_id) +{ + if (!item) return; + std::string name; + LLAgentUI::buildFullname(name); + LLUUID transaction_id; + transaction_id.generate(); + const S32 BUCKET_SIZE = sizeof(U8) + UUID_BYTES; + U8 bucket[BUCKET_SIZE]; + bucket[0] = (U8)item->getType(); + memcpy(&bucket[1], &(item->getUUID().mData), UUID_BYTES); /* Flawfinder: ignore */ + pack_instant_message( + gMessageSystem, + gAgentID, + FALSE, + gAgentSessionID, + to_agent, + name, + item->getName(), + IM_ONLINE, + IM_INVENTORY_OFFERED, + transaction_id, + 0, + LLUUID::null, + gAgent.getPositionAgent(), + NO_TIMESTAMP, + bucket, + BUCKET_SIZE); + gAgent.sendReliableMessage(); + + // VEFFECT: giveInventory + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + effectp->setSourceObject(gAgentAvatarp); + effectp->setTargetObject(gObjectList.findObject(to_agent)); + effectp->setDuration(LL_HUD_DUR_SHORT); + effectp->setColor(LLColor4U(gAgent.getEffectColor())); + gFloaterTools->dirty(); + + LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY); + + logInventoryOffer(to_agent, im_session_id); + + // add buddy to recent people list + LLRecentPeople::instance().add(to_agent); +} + +// static +bool LLGiveInventory::handleCopyProtectedCategory(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + LLInventoryCategory* cat = NULL; + switch(option) + { + case 0: // "Yes" + cat = gInventory.getCategory(notification["payload"]["folder_id"].asUUID()); + if (cat) + { + LLGiveInventory::commitGiveInventoryCategory(notification["payload"]["agent_id"].asUUID(), + cat); + LLViewerInventoryCategory::cat_array_t cats; + LLViewerInventoryItem::item_array_t items; + LLUncopyableItems remove; + gInventory.collectDescendentsIf (cat->getUUID(), + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + remove); + S32 count = items.count(); + for(S32 i = 0; i < count; ++i) + { + gInventory.deleteObject(items.get(i)->getUUID()); + } + gInventory.notifyObservers(); + } + else + { + LLNotificationsUtil::add("CannotGiveCategory"); + } + break; + + default: // no, cancel, whatever, who cares, not yes. + LLNotificationsUtil::add("TransactionCancelled"); + break; + } + return false; +} + +// static +void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, + const LLInventoryCategory* cat, + const LLUUID& im_session_id) + +{ + if (!cat) return; + llinfos << "LLGiveInventory::commitGiveInventoryCategory() - " + << cat->getUUID() << llendl; + + // add buddy to recent people list + LLRecentPeople::instance().add(to_agent); + + // Test out how many items are being given. + LLViewerInventoryCategory::cat_array_t cats; + LLViewerInventoryItem::item_array_t items; + LLGiveable giveable; + gInventory.collectDescendentsIf (cat->getUUID(), + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + giveable); + + // MAX ITEMS is based on (sizeof(uuid)+2) * count must be < + // MTUBYTES or 18 * count < 1200 => count < 1200/18 => + // 66. I've cut it down a bit from there to give some pad. + S32 count = items.count() + cats.count(); + if (count > MAX_ITEMS) + { + LLNotificationsUtil::add("TooManyItems"); + return; + } + else if (count == 0) + { + LLNotificationsUtil::add("NoItems"); + return; + } + else + { + std::string name; + LLAgentUI::buildFullname(name); + LLUUID transaction_id; + transaction_id.generate(); + S32 bucket_size = (sizeof(U8) + UUID_BYTES) * (count + 1); + U8* bucket = new U8[bucket_size]; + U8* pos = bucket; + U8 type = (U8)cat->getType(); + memcpy(pos, &type, sizeof(U8)); /* Flawfinder: ignore */ + pos += sizeof(U8); + memcpy(pos, &(cat->getUUID()), UUID_BYTES); /* Flawfinder: ignore */ + pos += UUID_BYTES; + S32 i; + count = cats.count(); + for(i = 0; i < count; ++i) + { + memcpy(pos, &type, sizeof(U8)); /* Flawfinder: ignore */ + pos += sizeof(U8); + memcpy(pos, &(cats.get(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */ + pos += UUID_BYTES; + } + count = items.count(); + for(i = 0; i < count; ++i) + { + type = (U8)items.get(i)->getType(); + memcpy(pos, &type, sizeof(U8)); /* Flawfinder: ignore */ + pos += sizeof(U8); + memcpy(pos, &(items.get(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */ + pos += UUID_BYTES; + } + pack_instant_message( + gMessageSystem, + gAgent.getID(), + FALSE, + gAgent.getSessionID(), + to_agent, + name, + cat->getName(), + IM_ONLINE, + IM_INVENTORY_OFFERED, + transaction_id, + 0, + LLUUID::null, + gAgent.getPositionAgent(), + NO_TIMESTAMP, + bucket, + bucket_size); + gAgent.sendReliableMessage(); + delete[] bucket; + + // VEFFECT: giveInventoryCategory + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + effectp->setSourceObject(gAgentAvatarp); + effectp->setTargetObject(gObjectList.findObject(to_agent)); + effectp->setDuration(LL_HUD_DUR_SHORT); + effectp->setColor(LLColor4U(gAgent.getEffectColor())); + gFloaterTools->dirty(); + + LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY); + + logInventoryOffer(to_agent, im_session_id); + } +} + +// EOF diff --git a/indra/newview/llgiveinventory.h b/indra/newview/llgiveinventory.h new file mode 100644 index 0000000000..e589a0cc69 --- /dev/null +++ b/indra/newview/llgiveinventory.h @@ -0,0 +1,99 @@ +/** + * @file llgiveinventory.cpp + * @brief LLGiveInventory class declaration + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLGIVEINVENTORY_H +#define LL_LLGIVEINVENTORY_H + +class LLInventoryItem; +class LLInventoryCategory; + +/** + * Class represented give inventory related actions. + * + * It has only static methods and is not intended to be instantiated for now. + */ +class LLGiveInventory +{ +public: + /** + * Checks if inventory item you are attempting to transfer to a resident can be given. + * + * @return true if you can give, otherwise false. + */ + static bool isInventoryGiveAcceptable(const LLInventoryItem* item); + + /** + * Checks if inventory item you are attempting to transfer to a group can be given. + * + * @return true if you can give, otherwise false. + */ + static bool isInventoryGroupGiveAcceptable(const LLInventoryItem* item); + + /** + * Gives passed inventory item to specified avatar in specified session. + */ + static void doGiveInventoryItem(const LLUUID& to_agent, + const LLInventoryItem* item, + const LLUUID& im_session_id = LLUUID::null); + + /** + * Gives passed inventory category to specified avatar in specified session. + */ + static void doGiveInventoryCategory(const LLUUID& to_agent, + const LLInventoryCategory* item, + const LLUUID &session_id = LLUUID::null); + +private: + // this class is not intended to be instantiated. + LLGiveInventory(); + + /** + * logs "Inventory item offered" to IM + */ + static void logInventoryOffer(const LLUUID& to_agent, + const LLUUID &im_session_id = LLUUID::null); + + // give inventory item functionality + static bool handleCopyProtectedItem(const LLSD& notification, const LLSD& response); + static void commitGiveInventoryItem(const LLUUID& to_agent, + const LLInventoryItem* item, + const LLUUID &im_session_id = LLUUID::null); + + // give inventory category functionality + static bool handleCopyProtectedCategory(const LLSD& notification, const LLSD& response); + static void commitGiveInventoryCategory(const LLUUID& to_agent, + const LLInventoryCategory* cat, + const LLUUID &im_session_id = LLUUID::null); + +}; + +#endif // LL_LLGIVEINVENTORY_H diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 252c34cf9c..da5196df45 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -39,13 +39,13 @@ #include "lliconctrl.h" #include "llmenugl.h" #include "lltextbox.h" +#include "lltextutil.h" #include "lltrans.h" // newview #include "llagent.h" #include "llgroupactions.h" #include "llfloaterreg.h" -#include "lltextutil.h" #include "llviewercontrol.h" // for gSavedSettings #include "llviewermenu.h" // for gMenuHolder #include "llvoiceclient.h" @@ -273,7 +273,7 @@ bool LLGroupList::onContextMenuItemEnable(const LLSD& userdata) return gAgent.getGroupID() != selected_group_id; if (userdata.asString() == "call") - return real_group_selected && LLVoiceClient::voiceEnabled()&&gVoiceClient->voiceWorking(); + return real_group_selected && LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); return real_group_selected; } diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index 5b653638f2..47fe641680 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -78,8 +78,8 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, LLVector3 up_axis; if (orthographic) { - right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewHeightRaw(), 0.f); - up_axis.setVec(0.f, 0.f, 1.f / gViewerWindow->getWorldViewHeightRaw()); + right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewHeightScaled(), 0.f); + up_axis.setVec(0.f, 0.f, 1.f / gViewerWindow->getWorldViewHeightScaled()); } else { diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index c0cc3f1985..3aa9d75bc0 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -59,7 +59,6 @@ #include "lltransientfloatermgr.h" #include "llinventorymodel.h" #include "llrootview.h" - #include "llspeakers.h" @@ -1105,6 +1104,21 @@ void LLIMFloater::closeHiddenIMToasts() 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() @@ -1155,3 +1169,31 @@ void LLIMFloater::onIMChicletCreated( const LLUUID& session_id ) } } + +void LLIMFloater::onClickCloseBtn() +{ + + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession( + mSessionID); + + if (session == NULL) + { + llwarns << "Empty session." << llendl; + return; + } + + bool is_call_with_chat = session->isGroupSessionType() + || session->isAdHocSessionType() || session->isP2PSessionType(); + + LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); + + if (is_call_with_chat && voice_channel != NULL && voice_channel->isActive()) + { + LLSD payload; + payload["session_id"] = mSessionID; + LLNotificationsUtil::add("ConfirmLeaveCall", LLSD(), payload, confirmLeaveCallCallback); + return; + } + + LLFloater::onClickCloseBtn(); +} diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index f9dd8b9b85..fef178e3a2 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -50,6 +50,7 @@ class LLInventoryCategory; */ class LLIMFloater : public LLTransientDockableFloater { + LOG_CLASS(LLIMFloater); public: LLIMFloater(const LLUUID& session_id); @@ -120,6 +121,10 @@ public: virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } +protected: + /* virtual */ + void onClickCloseBtn(); + private: // process focus events to set a currently active session /* virtual */ void onFocusLost(); @@ -150,6 +155,8 @@ private: static void closeHiddenIMToasts(); + static void confirmLeaveCallCallback(const LLSD& notification, const LLSD& response); + LLPanelChatControlPanel* mControlPanel; LLUUID mSessionID; S32 mLastMessageIndex; diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 4bdf5f42dc..0e3b78df7f 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -300,7 +300,7 @@ void LLFloaterIMPanel::onVolumeChange(LLUICtrl* source, void* user_data) LLFloaterIMPanel* floaterp = (LLFloaterIMPanel*)user_data; if (floaterp) { - gVoiceClient->setUserVolume(floaterp->mOtherParticipantUUID, (F32)source->getValue().asReal()); + LLVoiceClient::getInstance()->setUserVolume(floaterp->mOtherParticipantUUID, (F32)source->getValue().asReal()); } } @@ -312,7 +312,7 @@ void LLFloaterIMPanel::draw() BOOL enable_connect = (region && region->getCapability("ChatSessionRequest") != "") && mSessionInitialized - && LLVoiceClient::voiceEnabled() + && LLVoiceClient::getInstance()->voiceEnabled() && mCallBackEnabled; // hide/show start call and end call buttons @@ -320,8 +320,8 @@ void LLFloaterIMPanel::draw() if (!voice_channel) return; - childSetVisible("end_call_btn", LLVoiceClient::voiceEnabled() && voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); - childSetVisible("start_call_btn", LLVoiceClient::voiceEnabled() && voice_channel->getState() < LLVoiceChannel::STATE_CALL_STARTED); + childSetVisible("end_call_btn", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); + childSetVisible("start_call_btn", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->getState() < LLVoiceChannel::STATE_CALL_STARTED); childSetEnabled("start_call_btn", enable_connect); childSetEnabled("send_btn", !childGetValue("chat_editor").asString().empty()); @@ -384,11 +384,11 @@ void LLFloaterIMPanel::draw() else { // refresh volume and mute checkbox - childSetVisible("speaker_volume", LLVoiceClient::voiceEnabled() && voice_channel->isActive()); - childSetValue("speaker_volume", gVoiceClient->getUserVolume(mOtherParticipantUUID)); + childSetVisible("speaker_volume", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->isActive()); + childSetValue("speaker_volume", LLVoiceClient::getInstance()->getUserVolume(mOtherParticipantUUID)); childSetValue("mute_btn", LLMuteList::getInstance()->isMuted(mOtherParticipantUUID, LLMute::flagVoiceChat)); - childSetVisible("mute_btn", LLVoiceClient::voiceEnabled() && voice_channel->isActive()); + childSetVisible("mute_btn", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->isActive()); } LLFloater::draw(); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 15dbc03f70..2c1983b6d2 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -43,6 +43,7 @@ #include "llhttpclient.h" #include "llsdutil_math.h" #include "llstring.h" +#include "lltextutil.h" #include "lltrans.h" #include "lluictrlfactory.h" @@ -65,7 +66,6 @@ #include "llnearbychat.h" #include "llspeakers.h" //for LLIMSpeakerMgr #include "lltextbox.h" -#include "lltextutil.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" @@ -342,13 +342,13 @@ LLIMModel::LLIMSession::~LLIMSession() mSpeakers = NULL; // End the text IM session if necessary - if(gVoiceClient && mOtherParticipantID.notNull()) + if(LLVoiceClient::getInstance() && mOtherParticipantID.notNull()) { switch(mType) { case IM_NOTHING_SPECIAL: case IM_SESSION_P2P_INVITE: - gVoiceClient->endUserIMSession(mOtherParticipantID); + LLVoiceClient::getInstance()->endUserIMSession(mOtherParticipantID); break; default: @@ -923,7 +923,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if((offline == IM_OFFLINE) && (LLVoiceClient::getInstance()->isOnlineSIP(other_participant_id))) { // User is online through the OOW connector, but not with a regular viewer. Try to send the message via SLVoice. - sent = gVoiceClient->sendTextMessage(other_participant_id, utf8_text); + sent = LLVoiceClient::getInstance()->sendTextMessage(other_participant_id, utf8_text); } if(!sent) @@ -1720,7 +1720,7 @@ void LLOutgoingCallDialog::show(const LLSD& key) // skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice, // so no reconnection to nearby chat happens (EXT-4397) - bool voice_works = LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + bool voice_works = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); std::string reconnect_nearby = voice_works ? LLTrans::getString("reconnect_nearby") : std::string(); childSetTextArg("nearby", "[RECONNECT_NEARBY]", reconnect_nearby); @@ -1847,8 +1847,8 @@ LLCallDialog(payload) void LLIncomingCallDialog::onLifetimeExpired() { - // check whether a call is valid or not - if (LLVoiceClient::getInstance()->findSession(mPayload["caller_id"].asUUID())) + std::string session_handle = mPayload["session_handle"].asString(); + if (LLVoiceClient::getInstance()->isValidChannel(session_handle)) { // restart notification's timer if call is still valid mLifetimeTimer.start(); @@ -1941,15 +1941,24 @@ void LLIncomingCallDialog::onOpen(const LLSD& key) { LLCallDialog::onOpen(key); + LLStringUtil::format_map_t args; + LLGroupData data; + // if it's a group call, retrieve group name to use it in question + if (gAgent.getGroupData(key["session_id"].asUUID(), data)) + { + args["[GROUP]"] = data.mName; + } // tell the user which voice channel they would be leaving LLVoiceChannel *voice = LLVoiceChannel::getCurrentVoiceChannel(); if (voice && !voice->getSessionName().empty()) { - childSetTextArg("question", "[CURRENT_CHAT]", voice->getSessionName()); + args["[CURRENT_CHAT]"] = voice->getSessionName(); + childSetText("question", getString(key["question_type"].asString(), args)); } else { - childSetTextArg("question", "[CURRENT_CHAT]", getString("localchat")); + args["[CURRENT_CHAT]"] = getString("localchat"); + childSetText("question", getString(key["question_type"].asString(), args)); } } @@ -2083,10 +2092,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response) { if (type == IM_SESSION_P2P_INVITE) { - if(gVoiceClient) + if(LLVoiceClient::getInstance()) { std::string s = mPayload["session_handle"].asString(); - gVoiceClient->declineInvite(s); + LLVoiceClient::getInstance()->declineInvite(s); } } else @@ -2174,11 +2183,8 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) { if (type == IM_SESSION_P2P_INVITE) { - if(gVoiceClient) - { - std::string s = payload["session_handle"].asString(); - gVoiceClient->declineInvite(s); - } + std::string s = payload["session_handle"].asString(); + LLVoiceClient::getInstance()->declineInvite(s); } else { @@ -2483,6 +2489,8 @@ void LLIMMgr::inviteToSession( } std::string notify_box_type; + // voice invite question is different from default only for group call (EXT-7118) + std::string question_type = "VoiceInviteQuestionDefault"; BOOL ad_hoc_invite = FALSE; if(type == IM_SESSION_P2P_INVITE) @@ -2494,6 +2502,7 @@ void LLIMMgr::inviteToSession( { //only really old school groups have voice invitations notify_box_type = "VoiceInviteGroup"; + question_type = "VoiceInviteQuestionGroup"; } else if ( inv_type == INVITATION_TYPE_VOICE ) { @@ -2518,6 +2527,7 @@ void LLIMMgr::inviteToSession( payload["session_handle"] = session_handle; payload["session_uri"] = session_uri; payload["notify_box_type"] = notify_box_type; + payload["question_type"] = question_type; LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(session_id); if (channelp && channelp->callStarted()) @@ -3090,7 +3100,7 @@ public: return; } - if(!LLVoiceClient::voiceEnabled() || !LLVoiceClient::getInstance()->voiceWorking()) + if(!LLVoiceClient::getInstance()->voiceEnabled() || !LLVoiceClient::getInstance()->isVoiceWorking()) { // Don't display voice invites unless the user has voice enabled. return; diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index e48bb77bda..d9fdc876db 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -541,8 +541,7 @@ void LLInspectAvatar::toggleSelectedVoice(bool enabled) void LLInspectAvatar::updateVolumeSlider() { - - bool voice_enabled = gVoiceClient->getVoiceEnabled(mAvatarID); + bool voice_enabled = LLVoiceClient::getInstance()->getVoiceEnabled(mAvatarID); // Do not display volume slider and mute button if it // is ourself or we are not in a voice channel together @@ -572,6 +571,7 @@ void LLInspectAvatar::updateVolumeSlider() volume_slider->setEnabled( !is_muted ); F32 volume; + if (is_muted) { // it's clearer to display their volume as zero @@ -580,7 +580,7 @@ void LLInspectAvatar::updateVolumeSlider() else { // actual volume - volume = gVoiceClient->getUserVolume(mAvatarID); + volume = LLVoiceClient::getInstance()->getUserVolume(mAvatarID); } volume_slider->setValue( (F64)volume ); } @@ -609,7 +609,7 @@ void LLInspectAvatar::onClickMuteVolume() void LLInspectAvatar::onVolumeChange(const LLSD& data) { F32 volume = (F32)data.asReal(); - gVoiceClient->setUserVolume(mAvatarID, volume); + LLVoiceClient::getInstance()->setUserVolume(mAvatarID, volume); } void LLInspectAvatar::nameUpdatedCallback( diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 91cbbbf430..a2b5ffbac4 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -480,7 +480,7 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep) // Objects cannot be created by a group, so use agent URL format LLUUID creator_id = nodep->mPermissions->getCreator(); std::string creator_url = - LLSLURL::buildCommand("agent", creator_id, "about"); + LLSLURL("agent", creator_id, "about").getSLURLString(); args["[CREATOR]"] = creator_url; // created by one user but owned by another @@ -490,12 +490,12 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep) if (group_owned) { owner_id = nodep->mPermissions->getGroup(); - owner_url = LLSLURL::buildCommand("group", owner_id, "about"); + owner_url = LLSLURL("group", owner_id, "about").getSLURLString(); } else { owner_id = nodep->mPermissions->getOwner(); - owner_url = LLSLURL::buildCommand("agent", owner_id, "about"); + owner_url = LLSLURL("agent", owner_id, "about").getSLURLString(); } args["[OWNER]"] = owner_url; diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index 66e4a1bf66..97ff771658 100644 --- a/indra/newview/llinspectremoteobject.cpp +++ b/indra/newview/llinspectremoteobject.cpp @@ -176,11 +176,11 @@ void LLInspectRemoteObject::update() { if (mGroupOwned) { - owner = LLSLURL::buildCommand("group", mOwnerID, "about"); + owner = LLSLURL("group", mOwnerID, "about").getSLURLString(); } else { - owner = LLSLURL::buildCommand("agent", mOwnerID, "about"); + owner = LLSLURL("agent", mOwnerID, "about").getSLURLString(); } } else diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2d08c0a01a..577652fc79 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -41,12 +41,12 @@ #include "llagentwearables.h" #include "llappearancemgr.h" #include "llavataractions.h" -#include "llfloatercustomize.h" #include "llfloateropenobject.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" #include "llfriendcard.h" #include "llgesturemgr.h" +#include "llgiveinventory.h" #include "llimfloater.h" #include "llimview.h" #include "llinventoryclipboard.h" @@ -61,9 +61,11 @@ #include "llpreviewgesture.h" #include "llpreviewtexture.h" #include "llselectmgr.h" +#include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltrans.h" #include "llviewerassettype.h" +#include "llviewermenu.h" #include "llviewermessage.h" #include "llviewerobjectlist.h" #include "llviewerwindow.h" @@ -108,45 +110,6 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& response); void teleport_via_landmark(const LLUUID& asset_id); -std::string ICON_NAME[ICON_NAME_COUNT] = -{ - "Inv_Texture", - "Inv_Sound", - "Inv_CallingCard", - "Inv_CallingCard", - "Inv_Landmark", - "Inv_Landmark", - "Inv_Script", - "Inv_Clothing", - "Inv_Object", - "Inv_Object_Multi", - "Inv_Notecard", - "Inv_Skin", - "Inv_Snapshot", - - "Inv_BodyShape", - "Inv_Skin", - "Inv_Hair", - "Inv_Eye", - "Inv_Shirt", - "Inv_Pants", - "Inv_Shoe", - "Inv_Socks", - "Inv_Jacket", - "Inv_Gloves", - "Inv_Undershirt", - "Inv_Underpants", - "Inv_Skirt", - "Inv_Alpha", - "Inv_Tattoo", - - "Inv_Animation", - "Inv_Gesture", - - "Inv_LinkItem", - "Inv_LinkFolder" -}; - // +=================================================+ // | LLInvFVBridge | // +=================================================+ @@ -156,14 +119,17 @@ LLInvFVBridge::LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : mUUID(uuid), mRoot(root), - mInvType(LLInventoryType::IT_NONE) + mInvType(LLInventoryType::IT_NONE), + mIsLink(FALSE) { mInventoryPanel = inventory->getHandle(); + const LLInventoryObject* obj = getInventoryObject(); + mIsLink = obj && obj->getIsLinkType(); } const std::string& LLInvFVBridge::getName() const { - LLInventoryObject* obj = getInventoryObject(); + const LLInventoryObject* obj = getInventoryObject(); if(obj) { return obj->getName(); @@ -179,7 +145,6 @@ const std::string& LLInvFVBridge::getDisplayName() const // Folders have full perms PermissionMask LLInvFVBridge::getPermissionMask() const { - return PERM_ALL; } @@ -239,6 +204,11 @@ BOOL LLInvFVBridge::isItemMovable() const return TRUE; } +BOOL LLInvFVBridge::isLink() const +{ + return mIsLink; +} + /*virtual*/ /** * @brief Adds this item into clipboard storage @@ -253,9 +223,7 @@ void LLInvFVBridge::cutToClipboard() // *TODO: make sure this does the right thing void LLInvFVBridge::showProperties() { - LLSD key; - key["id"] = mUUID; - LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); + show_item_profile(mUUID); // Disable old properties floater; this is replaced by the sidepanel. /* @@ -645,10 +613,13 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Paste")); } - items.push_back(std::string("Paste As Link")); - if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0) + if (gSavedSettings.getBOOL("InventoryLinking")) { - disabled_items.push_back(std::string("Paste As Link")); + items.push_back(std::string("Paste As Link")); + if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Paste As Link")); + } } items.push_back(std::string("Paste Separator")); @@ -930,7 +901,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, { llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLScriptBridge(inventory, root, uuid); + new_listener = new LLItemBridge(inventory, root, uuid); break; case LLAssetType::AT_OBJECT: @@ -979,7 +950,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, { llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLWearableBridge(inventory, root, uuid, asset_type, inv_type, (EWearableType)flags); + new_listener = new LLWearableBridge(inventory, root, uuid, asset_type, inv_type, (LLWearableType::EType)flags); break; case LLAssetType::AT_CATEGORY: if (actual_asset_type == LLAssetType::AT_LINK_FOLDER) @@ -1025,46 +996,32 @@ void LLInvFVBridge::purgeItem(LLInventoryModel *model, const LLUUID &uuid) } } -bool LLInvFVBridge::isInOutfitsSidePanel() const +BOOL LLInvFVBridge::isInOutfitsSidePanel() const { LLInventoryPanel *my_panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); LLPanelOutfitsInventory *outfit_panel = dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); if (!outfit_panel) - return false; + return FALSE; return outfit_panel->isTabPanel(my_panel); } -bool LLInvFVBridge::canShare() +BOOL LLInvFVBridge::canShare() const { const LLInventoryModel* model = getInventoryModel(); - if(!model) - { - return false; - } + if (!model) return FALSE; - LLViewerInventoryItem *item = model->getItem(mUUID); + const LLViewerInventoryItem *item = model->getItem(mUUID); if (item) { - bool allowed = false; - allowed = LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item); - if (allowed && - !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) - { - allowed = false; - } - if (allowed && - !item->getPermissions().allowCopyBy(gAgent.getID())) - { - allowed = false; - } - return allowed; + if (!LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item)) + return FALSE; + return (BOOL)LLGiveInventory::isInventoryGiveAcceptable(item); } - LLViewerInventoryCategory* cat = model->getCategory(mUUID); - // All categories can be given. - return cat != NULL; + const LLViewerInventoryCategory* cat = model->getCategory(mUUID); + return (cat != NULL); } // +=================================================+ @@ -1242,25 +1199,22 @@ void LLItemBridge::gotoItem() LLUIImagePtr LLItemBridge::getIcon() const { - return LLUI::getUIImage(ICON_NAME[OBJECT_ICON_NAME]); + LLInventoryObject *obj = getInventoryObject(); + if (obj) + { + return LLInventoryIcon::getIcon(obj->getType(), + LLInventoryType::IT_NONE, + mIsLink); + } + + return LLInventoryIcon::getIcon(LLInventoryIcon::ICONNAME_OBJECT); } PermissionMask LLItemBridge::getPermissionMask() const { LLViewerInventoryItem* item = getItem(); PermissionMask perm_mask = 0; - if(item) - { - BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID()); - BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID()); - BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, - gAgent.getID()); - - if (copy) perm_mask |= PERM_COPY; - if (mod) perm_mask |= PERM_MODIFY; - if (xfer) perm_mask |= PERM_TRANSFER; - - } + if (item) perm_mask = item->getPermissionMask(); return perm_mask; } @@ -1405,13 +1359,65 @@ BOOL LLItemBridge::removeItem() { return FALSE; } + + // move it to the trash LLPreview::hide(mUUID, TRUE); LLInventoryModel* model = getInventoryModel(); if(!model) return FALSE; - const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); + const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); LLViewerInventoryItem* item = getItem(); + if (!item) return FALSE; + // Already in trash + if (model->isObjectDescendentOf(mUUID, trash_id)) return FALSE; + + LLNotification::Params params("ConfirmItemDeleteHasLinks"); + params.functor.function(boost::bind(&LLItemBridge::confirmRemoveItem, this, _1, _2)); + + // Check if this item has any links. If generic inventory linking is enabled, + // we can't do this check because we may have items in a folder somewhere that is + // not yet in memory, so we don't want false negatives. (If disabled, then we + // know we only have links in the Outfits folder which we explicitly fetch.) + if (!gSavedSettings.getBOOL("InventoryLinking")) + { + if (!item->getIsLinkType()) + { + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + LLLinkedItemIDMatches is_linked_item_match(mUUID); + gInventory.collectDescendentsIf(gInventory.getRootFolderID(), + cat_array, + item_array, + LLInventoryModel::INCLUDE_TRASH, + is_linked_item_match); + + const U32 num_links = cat_array.size() + item_array.size(); + if (num_links > 0) + { + // Warn if the user is will break any links when deleting this item. + LLNotifications::instance().add(params); + return FALSE; + } + } + } + + LLNotifications::instance().forceResponse(params, 0); + return TRUE; +} + +BOOL LLItemBridge::confirmRemoveItem(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) return FALSE; + + LLInventoryModel* model = getInventoryModel(); + if (!model) return FALSE; + + LLViewerInventoryItem* item = getItem(); + if (!item) return FALSE; + + const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); // if item is not already in trash if(item && !model->isObjectDescendentOf(mUUID, trash_id)) { @@ -1420,11 +1426,7 @@ BOOL LLItemBridge::removeItem() // delete was successful return TRUE; } - else - { - // tried to delete already item in trash (should purge?) - return FALSE; - } + return FALSE; } BOOL LLItemBridge::isItemCopyable() const @@ -1589,8 +1591,12 @@ BOOL LLFolderBridge::isUpToDate() const BOOL LLFolderBridge::isItemCopyable() const { - // Can copy folders to paste-as-link, but not for straight paste. - return TRUE; + if (gSavedSettings.getBOOL("InventoryLinking")) + { + // Can copy folders to paste-as-link, but not for straight paste. + return TRUE; + } + return FALSE; } BOOL LLFolderBridge::copyToClipboard() const @@ -2315,23 +2321,39 @@ LLUIImagePtr LLFolderBridge::getIcon() const return getIcon(preferred_type); } -LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type) +// static +LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type, BOOL is_link) { - // we only have one folder image now - if (preferred_type == LLFolderType::FT_OUTFIT) + // Bypassing LLViewerFolderType::lookup() since + // we aren't using different system folder icons + if (is_link) { - return LLUI::getUIImage("Inv_LookFolderClosed"); + if (preferred_type == LLFolderType::FT_OUTFIT) + return LLUI::getUIImage("Inv_LookFolderClosed_Link"); + else + return LLUI::getUIImage("Inv_FolderClosed_Link"); } - return LLUI::getUIImage("Inv_FolderClosed"); + if (preferred_type == LLFolderType::FT_OUTFIT) + return LLUI::getUIImage("Inv_LookFolderClosed"); + else + return LLUI::getUIImage("Inv_FolderClosed"); } LLUIImagePtr LLFolderBridge::getOpenIcon() const { - if (getPreferredType() == LLFolderType::FT_OUTFIT) + // Bypassing LLViewerFolderType::lookup() since + // we aren't using different system folder icons + if (isLink()) { - return LLUI::getUIImage("Inv_LookFolderOpen"); + if (getPreferredType() == LLFolderType::FT_OUTFIT) + return LLUI::getUIImage("Inv_LookFolderOpen_Link"); + else + return LLUI::getUIImage("Inv_FolderOpen_Link"); } - return LLUI::getUIImage("Inv_FolderOpen"); + if (getPreferredType() == LLFolderType::FT_OUTFIT) + return LLUI::getUIImage("Inv_LookFolderOpen"); + else + return LLUI::getUIImage("Inv_FolderOpen"); } BOOL LLFolderBridge::renameItem(const std::string& new_name) @@ -2895,71 +2917,71 @@ void LLFolderBridge::createNewCategory(void* user_data) void LLFolderBridge::createNewShirt(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SHIRT); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SHIRT); } void LLFolderBridge::createNewPants(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_PANTS); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_PANTS); } void LLFolderBridge::createNewShoes(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SHOES); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SHOES); } void LLFolderBridge::createNewSocks(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SOCKS); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SOCKS); } void LLFolderBridge::createNewJacket(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_JACKET); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_JACKET); } void LLFolderBridge::createNewSkirt(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SKIRT); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SKIRT); } void LLFolderBridge::createNewGloves(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_GLOVES); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_GLOVES); } void LLFolderBridge::createNewUndershirt(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_UNDERSHIRT); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_UNDERSHIRT); } void LLFolderBridge::createNewUnderpants(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_UNDERPANTS); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_UNDERPANTS); } void LLFolderBridge::createNewShape(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SHAPE); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SHAPE); } void LLFolderBridge::createNewSkin(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SKIN); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SKIN); } void LLFolderBridge::createNewHair(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_HAIR); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_HAIR); } void LLFolderBridge::createNewEyes(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_EYES); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_EYES); } // static -void LLFolderBridge::createWearable(LLFolderBridge* bridge, EWearableType type) +void LLFolderBridge::createWearable(LLFolderBridge* bridge, LLWearableType::EType type) { if(!bridge) return; LLUUID parent_id = bridge->getUUID(); @@ -2969,7 +2991,7 @@ void LLFolderBridge::createWearable(LLFolderBridge* bridge, EWearableType type) // Separate function so can be called by global menu as well as right-click // menu. // static -void LLFolderBridge::createWearable(const LLUUID &parent_id, EWearableType type) +void LLFolderBridge::createWearable(const LLUUID &parent_id, LLWearableType::EType type) { LLWearable* wearable = LLWearableList::instance().createNewWearable(type); LLAssetType::EType asset_type = wearable->getAssetType(); @@ -3268,21 +3290,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } // +=================================================+ -// | LLScriptBridge (DEPRECTED) | -// +=================================================+ - -LLUIImagePtr LLScriptBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE); -} - -// +=================================================+ // | LLTextureBridge | // +=================================================+ LLUIImagePtr LLTextureBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_TEXTURE, mInvType, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInvType, mIsLink); } void LLTextureBridge::openItem() @@ -3362,32 +3375,14 @@ void LLTextureBridge::performAction(LLInventoryModel* model, std::string action) // | LLSoundBridge | // +=================================================+ -LLUIImagePtr LLSoundBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SOUND, LLInventoryType::IT_SOUND, 0, FALSE); -} - void LLSoundBridge::openItem() { - LLViewerInventoryItem* item = getItem(); - + const LLViewerInventoryItem* item = getItem(); if (item) { LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } -/* -// Changed this back to the way it USED to work: -// only open the preview dialog through the contextual right-click menu -// double-click just plays the sound - -LLViewerInventoryItem* item = getItem(); -if(item) -{ -openSoundPreview((void*)this); -//send_uuid_sound_trigger(item->getAssetUUID(), 1.0); } -*/ - } void LLSoundBridge::previewItem() { @@ -3452,7 +3447,7 @@ LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory, LLUIImagePtr LLLandmarkBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mIsLink, mVisited, FALSE); } void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -3644,7 +3639,7 @@ LLUIImagePtr LLCallingCardBridge::getIcon() const { online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()); } - return get_item_icon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, mIsLink, online, FALSE); } std::string LLCallingCardBridge::getLabelSuffix() const @@ -3756,7 +3751,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, rv = TRUE; if(drop) { - LLToolDragAndDrop::giveInventory(item->getCreatorUUID(), + LLGiveInventory::doGiveInventoryItem(item->getCreatorUUID(), (LLInventoryItem*)cargo_data); } } @@ -3777,7 +3772,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, rv = TRUE; if(drop) { - LLToolDragAndDrop::giveInventoryCategory( + LLGiveInventory::doGiveInventoryCategory( item->getCreatorUUID(), inv_cat); } @@ -3802,39 +3797,19 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, // | LLNotecardBridge | // +=================================================+ -LLUIImagePtr LLNotecardBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE); -} - void LLNotecardBridge::openItem() { LLViewerInventoryItem* item = getItem(); - if (item) { LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } - -/* - LLViewerInventoryItem* item = getItem(); - if (item) - { - LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES); - } -*/ } - // +=================================================+ // | LLGestureBridge | // +=================================================+ -LLUIImagePtr LLGestureBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, 0, FALSE); -} - LLFontGL::StyleFlags LLGestureBridge::getLabelStyle() const { if( LLGestureMgr::instance().isGestureActive(mUUID) ) @@ -4010,11 +3985,6 @@ void LLGestureBridge::playGesture(const LLUUID& item_id) // | LLAnimationBridge | // +=================================================+ -LLUIImagePtr LLAnimationBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_ANIMATION, LLInventoryType::IT_ANIMATION, 0, FALSE); -} - void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { menuentry_vec_t items; @@ -4099,17 +4069,16 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type, U32 flags) : - LLItemBridge(inventory, root, uuid), - mInvType(type) + LLItemBridge(inventory, root, uuid) { mAttachPt = (flags & 0xff); // low bye of inventory flags - mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE; + mInvType = type; } LLUIImagePtr LLObjectBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_OBJECT, mInvType, mAttachPt, mIsMultiObject ); + return LLInventoryIcon::getIcon(LLAssetType::AT_OBJECT, mInvType, mIsLink, mAttachPt, mIsMultiObject); } LLInventoryObject* LLObjectBridge::getObject() const @@ -4173,21 +4142,9 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action) void LLObjectBridge::openItem() { - LLViewerInventoryItem* item = getItem(); - - if (item) - { - LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); - } - - LLSD key; - key["id"] = mUUID; - LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); - - // Disable old properties floater; this is replaced by the sidepanel. - /* - LLFloaterReg::showInstance("properties", mUUID); - */ + // object double-click action is to wear/unwear object + performAction(getInventoryModel(), + get_is_item_worn(mUUID) ? "detach" : "attach"); } LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const @@ -4429,11 +4386,6 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name) // | LLLSLTextBridge | // +=================================================+ -LLUIImagePtr LLLSLTextBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE); -} - void LLLSLTextBridge::openItem() { LLViewerInventoryItem* item = getItem(); @@ -4453,12 +4405,12 @@ LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLAssetType::EType asset_type, LLInventoryType::EType inv_type, - EWearableType wearable_type) : + LLWearableType::EType wearable_type) : LLItemBridge(inventory, root, uuid), mAssetType( asset_type ), - mInvType(inv_type), mWearableType(wearable_type) { + mInvType = inv_type; } // *NOTE: hack to get from avatar inventory to avatar @@ -4469,7 +4421,7 @@ void wear_inventory_item_on_avatar( LLInventoryItem* item ) lldebugs << "wear_inventory_item_on_avatar( " << item->getName() << " )" << llendl; - LLAppearanceMgr::instance().addCOFItemLink(item); + LLAppearanceMgr::getInstance()->wearItemOnAvatar(item->getUUID(), true, false); } } @@ -4495,15 +4447,13 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category ) << " )" << llendl; - if( gFloaterCustomize ) + if (gAgentCamera.cameraCustomizeAvatar()) { - gFloaterCustomize->askToSaveIfDirty( - boost::bind(remove_inventory_category_from_avatar_step2, _1, category->getUUID())); - } - else - { - remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } + + remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); } struct OnRemoveStruct @@ -4562,7 +4512,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ if (item->getType() == LLAssetType::AT_BODYPART) continue; if (gAgent.isTeen() && item->isWearableType() && - (item->getWearableType() == WT_UNDERPANTS || item->getWearableType() == WT_UNDERSHIRT)) + (item->getWearableType() == LLWearableType::WT_UNDERPANTS || item->getWearableType() == LLWearableType::WT_UNDERSHIRT)) continue; if (get_is_item_worn(item->getUUID())) { @@ -4640,7 +4590,7 @@ std::string LLWearableBridge::getLabelSuffix() const LLUIImagePtr LLWearableBridge::getIcon() const { - return get_item_icon(mAssetType, mInvType, mWearableType, FALSE); + return LLInventoryIcon::getIcon(mAssetType, mInvType, mIsLink, mWearableType, FALSE); } // virtual @@ -4927,19 +4877,12 @@ void LLWearableBridge::onEditOnAvatar(void* user_data) void LLWearableBridge::editOnAvatar() { - LLUUID linked_id = gInventory.getLinkedItemID(mUUID); - const LLWearable* wearable = gAgentWearables.getWearableFromItemID(linked_id); + LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID); if( wearable ) { - // Set the tab to the right wearable. - if (gFloaterCustomize) - gFloaterCustomize->setCurrentWearableType( wearable->getType() ); + LLPanel * panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance"); - if( CAMERA_MODE_CUSTOMIZE_AVATAR != gAgentCamera.getCameraMode() ) - { - // Start Avatar Customization - gAgentCamera.changeCameraToCustomizeAvatar(); - } + LLSidepanelAppearance::editWearable(wearable, panel); } } @@ -4984,10 +4927,10 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, { if( get_is_item_worn( item_id ) ) { - EWearableType type = wearable->getType(); + LLWearableType::EType type = wearable->getType(); - if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES ) ) //&& - //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) + if( !(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES ) ) //&& + //!((!gAgent.isTeen()) && ( type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT )) ) { bool do_remove_all = false; U32 index = gAgentWearables.getWearableIndex(wearable); @@ -5007,23 +4950,25 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, void LLWearableBridge::removeAllClothesFromAvatar() { // Remove COF links. - for (S32 itype = WT_SHAPE; itype < WT_COUNT; ++itype) + for (S32 itype = LLWearableType::WT_SHAPE; itype < LLWearableType::WT_COUNT; ++itype) { - if (itype == WT_SHAPE || itype == WT_SKIN || itype == WT_HAIR || itype == WT_EYES) + if (itype == LLWearableType::WT_SHAPE || itype == LLWearableType::WT_SKIN || itype == LLWearableType::WT_HAIR || itype == LLWearableType::WT_EYES) continue; - // MULTI-WEARABLES: fixed to index 0 - LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>( - gAgentWearables.getWearableInventoryItem((EWearableType)itype, 0)); - if (!item) - continue; - const LLUUID &item_id = gInventory.getLinkedItemID(item->getUUID()); - const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id); - if (!wearable) - continue; - - // Find and remove this item from the COF. - LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false); + for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index) + { + LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>( + gAgentWearables.getWearableInventoryItem((LLWearableType::EType)itype, index)); + if (!item) + continue; + const LLUUID &item_id = item->getUUID(); + const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id); + if (!wearable) + continue; + + // Find and remove this item from the COF. + LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false); + } } gInventory.notifyObservers(); @@ -5057,18 +5002,9 @@ void LLWearableBridge::removeFromAvatar() // | LLLinkItemBridge | // +=================================================+ // For broken item links + std::string LLLinkItemBridge::sPrefix("Link: "); -LLUIImagePtr LLLinkItemBridge::getIcon() const -{ - if (LLViewerInventoryItem *item = getItem()) - { - U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags - bool is_multi = LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags(); - return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi); - } - return get_item_icon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE); -} void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { // *TODO: Translate @@ -5098,16 +5034,24 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) std::string LLLinkFolderBridge::sPrefix("Link: "); LLUIImagePtr LLLinkFolderBridge::getIcon() const { - LLFolderType::EType preferred_type = LLFolderType::FT_NONE; - if (LLViewerInventoryItem *item = getItem()) + LLFolderType::EType folder_type = LLFolderType::FT_NONE; + const LLInventoryObject *obj = getInventoryObject(); + if (obj) { - if (const LLViewerInventoryCategory* cat = item->getLinkedCategory()) + LLViewerInventoryCategory* cat = NULL; + LLInventoryModel* model = getInventoryModel(); + if(model) { - preferred_type = cat->getPreferredType(); + cat = (LLViewerInventoryCategory*)model->getCategory(obj->getLinkedUUID()); + if (cat) + { + folder_type = cat->getPreferredType(); + } } } - return LLFolderBridge::getIcon(preferred_type); + return LLFolderBridge::getIcon(folder_type, TRUE); } + void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { // *TODO: Translate @@ -5525,3 +5469,67 @@ LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_ /** Bridge Actions ** ********************************************************************************/ + +/************************************************************************/ +/* Recent Inventory Panel related classes */ +/************************************************************************/ +void LLRecentItemsFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + LLFolderBridge::buildContextMenu(menu, flags); + + menuentry_vec_t disabled_items, items = getMenuItems(); + + items.erase(std::find(items.begin(), items.end(), std::string("New Folder"))); + items.erase(std::find(items.begin(), items.end(), std::string("New Script"))); + items.erase(std::find(items.begin(), items.end(), std::string("New Note"))); + items.erase(std::find(items.begin(), items.end(), std::string("New Gesture"))); + items.erase(std::find(items.begin(), items.end(), std::string("New Clothes"))); + items.erase(std::find(items.begin(), items.end(), std::string("New Body Parts"))); + + hide_context_entries(menu, items, disabled_items); +} + +LLInvFVBridge* LLRecentInventoryBridgeBuilder::createBridge( + LLAssetType::EType asset_type, + LLAssetType::EType actual_asset_type, + LLInventoryType::EType inv_type, + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags /*= 0x00*/ ) const +{ + LLInvFVBridge* new_listener = NULL; + switch(asset_type) + { + case LLAssetType::AT_CATEGORY: + if (actual_asset_type == LLAssetType::AT_LINK_FOLDER) + { + // *TODO: Create a link folder handler instead if it is necessary + new_listener = LLInventoryFVBridgeBuilder::createBridge( + asset_type, + actual_asset_type, + inv_type, + inventory, + root, + uuid, + flags); + break; + } + new_listener = new LLRecentItemsFolderBridge(inv_type, inventory, root, uuid); + break; + default: + new_listener = LLInventoryFVBridgeBuilder::createBridge( + asset_type, + actual_asset_type, + inv_type, + inventory, + root, + uuid, + flags); + } + return new_listener; + +} + + +// EOF diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index de63bdd76b..c5efefac7e 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -74,21 +74,26 @@ public: U32 flags = 0x00); virtual ~LLInvFVBridge() {} - virtual const LLUUID& getUUID() const { return mUUID; } + BOOL isInOutfitsSidePanel() const; // allow context menus to be customized for side panel + BOOL canShare() const; + //-------------------------------------------------------------------- + // LLInvFVBridge functionality + //-------------------------------------------------------------------- + virtual const LLUUID& getUUID() const { return mUUID; } + virtual void clearDisplayName() {} virtual void restoreItem() {} virtual void restoreToWorld() {} - // LLFolderViewEventListener functions + //-------------------------------------------------------------------- + // Inherited LLFolderViewEventListener functions + //-------------------------------------------------------------------- virtual const std::string& getName() const; virtual const std::string& getDisplayName() const; virtual PermissionMask getPermissionMask() const; virtual LLFolderType::EType getPreferredType() const; virtual time_t getCreationDate() const; - virtual LLFontGL::StyleFlags getLabelStyle() const - { - return LLFontGL::NORMAL; - } + virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } virtual void openItem() {} virtual void closeItem() {} @@ -99,7 +104,7 @@ public: virtual BOOL isItemRemovable() const; virtual BOOL isItemMovable() const; virtual BOOL isItemInTrash() const; - + virtual BOOL isLink() const; //virtual BOOL removeItem() = 0; virtual void removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch); virtual void move(LLFolderViewEventListener* new_parent_bridge) {} @@ -119,14 +124,6 @@ public: void* cargo_data) { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return mInvType; } - // LLInvFVBridge functionality - virtual void clearDisplayName() {} - - // Allow context menus to be customized for side panel. - bool isInOutfitsSidePanel() const; - - bool canShare(); - //-------------------------------------------------------------------- // Convenience functions for adding various common menu options. //-------------------------------------------------------------------- @@ -146,7 +143,7 @@ protected: BOOL isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory? BOOL isAgentInventory() const; // false if lost or in the inventory library - BOOL isCOFFolder() const; // true if COF or descendent of. + BOOL isCOFFolder() const; // true if COF or descendent of virtual BOOL isItemPermissive() const; static void changeItemParent(LLInventoryModel* model, LLViewerInventoryItem* item, @@ -162,11 +159,12 @@ protected: LLFolderView* mRoot; const LLUUID mUUID; // item id LLInventoryType::EType mInvType; + BOOL mIsLink; void purgeItem(LLInventoryModel *model, const LLUUID &uuid); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInvFVBridge +// Class LLInvFVBridgeBuilder // // This class intended to build Folder View Bridge via LLInvFVBridge::createBridge. // It can be overridden with another way of creation necessary Inventory-Folder-View-Bridge. @@ -184,49 +182,6 @@ public: U32 flags = 0x00) const; }; -// Used by LLItemBridge::getIcon -enum EInventoryIcon -{ - TEXTURE_ICON_NAME, - SOUND_ICON_NAME, - CALLINGCARD_ONLINE_ICON_NAME, - CALLINGCARD_OFFLINE_ICON_NAME, - LANDMARK_ICON_NAME, - LANDMARK_VISITED_ICON_NAME, - SCRIPT_ICON_NAME, - CLOTHING_ICON_NAME, - OBJECT_ICON_NAME, - OBJECT_MULTI_ICON_NAME, - NOTECARD_ICON_NAME, - BODYPART_ICON_NAME, - SNAPSHOT_ICON_NAME, - - BODYPART_SHAPE_ICON_NAME, - BODYPART_SKIN_ICON_NAME, - BODYPART_HAIR_ICON_NAME, - BODYPART_EYES_ICON_NAME, - CLOTHING_SHIRT_ICON_NAME, - CLOTHING_PANTS_ICON_NAME, - CLOTHING_SHOES_ICON_NAME, - CLOTHING_SOCKS_ICON_NAME, - CLOTHING_JACKET_ICON_NAME, - CLOTHING_GLOVES_ICON_NAME, - CLOTHING_UNDERSHIRT_ICON_NAME, - CLOTHING_UNDERPANTS_ICON_NAME, - CLOTHING_SKIRT_ICON_NAME, - CLOTHING_ALPHA_ICON_NAME, - CLOTHING_TATTOO_ICON_NAME, - - ANIMATION_ICON_NAME, - GESTURE_ICON_NAME, - - LINKITEM_ICON_NAME, - LINKFOLDER_ICON_NAME, - - ICON_NAME_COUNT -}; -extern std::string ICON_NAME[ICON_NAME_COUNT]; - class LLItemBridge : public LLInvFVBridge { public: @@ -236,7 +191,6 @@ public: LLInvFVBridge(inventory, root, uuid) {} virtual void performAction(LLInventoryModel* model, std::string action); - virtual void selectItem(); virtual void restoreItem(); virtual void restoreToWorld(); @@ -255,28 +209,32 @@ public: virtual BOOL hasChildren() const { return FALSE; } virtual BOOL isUpToDate() const { return TRUE; } - // override for LLInvFVBridge - virtual void clearDisplayName() { mDisplayName.clear(); } + /*virtual*/ void clearDisplayName() { mDisplayName.clear(); } LLViewerInventoryItem* getItem() const; - bool isAddAction(std::string action) const; bool isRemoveAction(std::string action) const; - protected: + BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); virtual BOOL isItemPermissive() const; static void buildDisplayName(LLInventoryItem* item, std::string& name); + mutable std::string mDisplayName; }; class LLFolderBridge : public LLInvFVBridge { - friend class LLInvFVBridge; public: - BOOL dragItemIntoFolder(LLInventoryItem* inv_item, - BOOL drop); - BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, - BOOL drop); + LLFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLInvFVBridge(inventory, root, uuid), + mCallingCards(FALSE), + mWearables(FALSE), + mMenu(NULL) {} + BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop); + BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void closeItem(); @@ -287,7 +245,7 @@ public: virtual LLFolderType::EType getPreferredType() const; virtual LLUIImagePtr getIcon() const; virtual LLUIImagePtr getOpenIcon() const; - static LLUIImagePtr getIcon(LLFolderType::EType preferred_type); + static LLUIImagePtr getIcon(LLFolderType::EType preferred_type, BOOL is_link = FALSE); virtual BOOL renameItem(const std::string& new_name); @@ -311,24 +269,17 @@ public: virtual BOOL isClipboardPasteableAsLink() const; virtual BOOL copyToClipboard() const; - static void createWearable(LLFolderBridge* bridge, EWearableType type); - static void createWearable(const LLUUID &parent_folder_id, EWearableType type); + static void createWearable(LLFolderBridge* bridge, LLWearableType::EType type); + static void createWearable(const LLUUID &parent_folder_id, LLWearableType::EType type); LLViewerInventoryCategory* getCategory() const; protected: - LLFolderBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLInvFVBridge(inventory, root, uuid), - mCallingCards(FALSE), - mWearables(FALSE), - mMenu(NULL) {} - - // menu callbacks + //-------------------------------------------------------------------- + // Menu callbacks + //-------------------------------------------------------------------- static void pasteClipboard(void* user_data); static void createNewCategory(void* user_data); - static void createNewShirt(void* user_data); static void createNewPants(void* user_data); static void createNewShoes(void* user_data); @@ -349,10 +300,17 @@ protected: void modifyOutfit(BOOL append); void determineFolderType(); + menuentry_vec_t getMenuItems() { return mItems; } // returns a copy of current menu items + + + //-------------------------------------------------------------------- + // Messy hacks for handling folder options + //-------------------------------------------------------------------- public: static LLFolderBridge* sSelf; static void staticFolderOptionsMenu(); void folderOptionsMenu(); + private: BOOL mCallingCards; BOOL mWearables; @@ -361,80 +319,59 @@ private: menuentry_vec_t mDisabledItems; }; -// DEPRECATED -class LLScriptBridge : public LLItemBridge -{ - friend class LLInvFVBridge; -public: - LLUIImagePtr getIcon() const; - -protected: - LLScriptBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid ) : - LLItemBridge(inventory, root, uuid) {} -}; - class LLTextureBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual void performAction(LLInventoryModel* model, std::string action); - -protected: LLTextureBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid, LLInventoryType::EType type) : - LLItemBridge(inventory, root, uuid), - mInvType(type) - {} + LLItemBridge(inventory, root, uuid) + { + mInvType = type; + } + virtual LLUIImagePtr getIcon() const; + virtual void openItem(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void performAction(LLInventoryModel* model, std::string action); bool canSaveTexture(void); - LLInventoryType::EType mInvType; }; class LLSoundBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; + LLSoundBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} virtual void openItem(); virtual void previewItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); static void openSoundPreview(void*); - -protected: - LLSoundBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} }; class LLLandmarkBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLLandmarkBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00); virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual LLUIImagePtr getIcon() const; virtual void openItem(); - -protected: - LLLandmarkBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - U32 flags = 0x00); protected: BOOL mVisited; }; class LLCallingCardBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLCallingCardBridge(LLInventoryPanel* inventory, + LLFolderView* folder, + const LLUUID& uuid ); + ~LLCallingCardBridge(); virtual std::string getLabelSuffix() const; //virtual const std::string& getDisplayName() const; virtual LLUIImagePtr getIcon() const; @@ -446,75 +383,57 @@ public: void* cargo_data); void refreshFolderViewItem(); protected: - LLCallingCardBridge(LLInventoryPanel* inventory, - LLFolderView* folder, - const LLUUID& uuid ); - ~LLCallingCardBridge(); -protected: LLCallingCardObserver* mObserver; }; - class LLNotecardBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); -protected: LLNotecardBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} + virtual void openItem(); }; class LLGestureBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; - + LLGestureBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} // Only suffix for gesture items, not task items, because only // gestures in your inventory can be active. virtual LLFontGL::StyleFlags getLabelStyle() const; virtual std::string getLabelSuffix() const; - virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual BOOL removeItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - static void playGesture(const LLUUID& item_id); - -protected: - LLGestureBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) - : LLItemBridge(inventory, root, uuid) {} }; class LLAnimationBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); - -protected: LLAnimationBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void openItem(); }; class LLObjectBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLObjectBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLInventoryType::EType type, + U32 flags); virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); @@ -522,38 +441,32 @@ public: virtual std::string getLabelSuffix() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL renameItem(const std::string& new_name); - LLInventoryObject* getObject() const; protected: - LLObjectBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - LLInventoryType::EType type, - U32 flags); -protected: - static LLUUID sContextMenuItemID; // Only valid while the context menu is open. - LLInventoryType::EType mInvType; + static LLUUID sContextMenuItemID; // Only valid while the context menu is open. U32 mAttachPt; BOOL mIsMultiObject; }; class LLLSLTextBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); -protected: LLLSLTextBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid ) : LLItemBridge(inventory, root, uuid) {} + virtual void openItem(); }; class LLWearableBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLWearableBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLAssetType::EType asset_type, + LLInventoryType::EType inv_type, + LLWearableType::EType wearable_type); virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); @@ -579,52 +492,38 @@ public: static void removeItemFromAvatar(LLViewerInventoryItem *item); static void removeAllClothesFromAvatar(); void removeFromAvatar(); - -protected: - LLWearableBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - LLAssetType::EType asset_type, - LLInventoryType::EType inv_type, - EWearableType wearable_type); protected: LLAssetType::EType mAssetType; - LLInventoryType::EType mInvType; - EWearableType mWearableType; + LLWearableType::EType mWearableType; }; class LLLinkItemBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual const std::string& getPrefix() { return sPrefix; } - virtual LLUIImagePtr getIcon() const; - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); -protected: LLLinkItemBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} + virtual const std::string& getPrefix() { return sPrefix; } + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); protected: static std::string sPrefix; }; class LLLinkFolderBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLLinkFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} virtual const std::string& getPrefix() { return sPrefix; } virtual LLUIImagePtr getIcon() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual void performAction(LLInventoryModel* model, std::string action); virtual void gotoItem(); protected: - LLLinkFolderBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} const LLUUID &getFolderID() const; -protected: static std::string sPrefix; }; @@ -658,6 +557,41 @@ protected: LLInventoryModel* mModel; }; +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Recent Inventory Panel related classes +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +// Overridden version of the Inventory-Folder-View-Bridge for Folders +class LLRecentItemsFolderBridge : public LLFolderBridge +{ +public: + // Creates context menu for Folders related to Recent Inventory Panel. + // Uses base logic and than removes from visible items "New..." menu items. + LLRecentItemsFolderBridge(LLInventoryType::EType type, + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLFolderBridge(inventory, root, uuid) + { + mInvType = type; + } + /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags); +}; + +// Bridge builder to create Inventory-Folder-View-Bridge for Recent Inventory Panel +class LLRecentInventoryBridgeBuilder : public LLInventoryFVBridgeBuilder +{ +public: + // Overrides FolderBridge for Recent Inventory Panel. + // It use base functionality for bridges other than FolderBridge. + virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, + LLAssetType::EType actual_asset_type, + LLInventoryType::EType inv_type, + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00) const; +}; void wear_inventory_item_on_avatar(LLInventoryItem* item); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 901a570487..c90919e8fd 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -41,6 +41,7 @@ #include "llinventorymodelbackgroundfetch.h" #include "llviewercontrol.h" #include "llfolderview.h" +#include "llinventorybridge.h" // linden library includes #include "lltrans.h" @@ -54,7 +55,8 @@ LLInventoryFilter::FilterOps::FilterOps() : mShowFolderState(SHOW_NON_EMPTY_FOLDERS), mPermissions(PERM_NONE), mFilterTypes(FILTERTYPE_OBJECT), - mFilterUUID(LLUUID::null) + mFilterUUID(LLUUID::null), + mIncludeLinks(TRUE) { } @@ -97,23 +99,23 @@ BOOL LLInventoryFilter::check(const LLFolderViewItem* item) return TRUE; } - const LLFolderViewEventListener* listener = item->getListener(); mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos; const BOOL passed_filtertype = checkAgainstFilterType(item); - const BOOL passed = passed_filtertype && - (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos) && - ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions); + const BOOL passed_permissions = checkAgainstPermissions(item); + const BOOL passed = (passed_filtertype && + passed_permissions && + (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)); return passed; } -BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) +BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) const { const LLFolderViewEventListener* listener = item->getListener(); if (!listener) return FALSE; - const LLInventoryType::EType object_type = listener->getInventoryType(); + LLInventoryType::EType object_type = listener->getInventoryType(); const LLUUID object_id = listener->getUUID(); const LLInventoryObject *object = gInventory.getObject(object_id); @@ -128,7 +130,9 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) if (object_type == LLInventoryType::IT_NONE) { if (object && object->getIsLinkType()) + { return FALSE; + } } else if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0)) { @@ -203,6 +207,22 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) return TRUE; } +BOOL LLInventoryFilter::checkAgainstPermissions(const LLFolderViewItem* item) const +{ + const LLFolderViewEventListener* listener = item->getListener(); + if (!listener) return FALSE; + + PermissionMask perm = listener->getPermissionMask(); + const LLInvFVBridge *bridge = dynamic_cast<const LLInvFVBridge *>(item->getListener()); + if (bridge && bridge->isLink()) + { + const LLUUID& linked_uuid = gInventory.getLinkedItemID(bridge->getUUID()); + const LLViewerInventoryItem *linked_item = gInventory.getItem(linked_uuid); + if (linked_item) + perm = linked_item->getPermissionMask(); + } + return (perm & mFilterOps.mPermissions) == mFilterOps.mPermissions; +} const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const { @@ -451,6 +471,18 @@ void LLInventoryFilter::setHoursAgo(U32 hours) mFilterOps.mFilterTypes |= FILTERTYPE_DATE; } +void LLInventoryFilter::setIncludeLinks(BOOL include_links) +{ + if (mFilterOps.mIncludeLinks != include_links) + { + if (!mFilterOps.mIncludeLinks) + setModified(FILTER_LESS_RESTRICTIVE); + else + setModified(FILTER_MORE_RESTRICTIVE); + } + mFilterOps.mIncludeLinks = include_links; +} + void LLInventoryFilter::setShowFolderState(EFolderShow state) { if (mFilterOps.mShowFolderState != state) @@ -826,6 +858,10 @@ U32 LLInventoryFilter::getHoursAgo() const { return mFilterOps.mHoursAgo; } +BOOL LLInventoryFilter::getIncludeLinks() const +{ + return mFilterOps.mIncludeLinks; +} LLInventoryFilter::EFolderShow LLInventoryFilter::getShowFolderState() const { return mFilterOps.mShowFolderState; diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 2376ba5d22..3ef51baefc 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -98,11 +98,15 @@ public: void setHoursAgo(U32 hours); U32 getHoursAgo() const; + void setIncludeLinks(BOOL include_links); + BOOL getIncludeLinks() const; + // +-------------------------------------------------------------------+ // + Execution And Results // +-------------------------------------------------------------------+ BOOL check(const LLFolderViewItem* item); - BOOL checkAgainstFilterType(const LLFolderViewItem* item); + BOOL checkAgainstFilterType(const LLFolderViewItem* item) const; + BOOL checkAgainstPermissions(const LLFolderViewItem* item) const; std::string::size_type getStringMatchOffset() const; // +-------------------------------------------------------------------+ @@ -172,6 +176,7 @@ private: U32 mHoursAgo; EFolderShow mShowFolderState; PermissionMask mPermissions; + BOOL mIncludeLinks; }; U32 mOrder; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 8010d1f43d..0cc4b0e389 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -1,5 +1,5 @@ /** - * @file llfloaterinventory.cpp + * @file llinventoryfunctions.cpp * @brief Implementation of the inventory view and associated stuff. * * $LicenseInfo:firstyear=2001&license=viewergpl$ @@ -52,7 +52,6 @@ #include "llappearancemgr.h" #include "llappviewer.h" //#include "llfirstuse.h" -#include "llfloatercustomize.h" #include "llfocusmgr.h" #include "llfolderview.h" #include "llgesturemgr.h" @@ -74,6 +73,7 @@ #include "llscrollbar.h" #include "llscrollcontainer.h" #include "llselectmgr.h" +#include "llsidetray.h" #include "lltabcontainer.h" #include "lltooldraganddrop.h" #include "lluictrlfactory.h" @@ -87,45 +87,121 @@ BOOL LLInventoryState::sWearNewClothing = FALSE; LLUUID LLInventoryState::sWearNewClothingTransactionID; +// Generates a string containing the path to the item specified by +// item_id. +void append_path(const LLUUID& id, std::string& path) +{ + std::string temp; + const LLInventoryObject* obj = gInventory.getObject(id); + LLUUID parent_id; + if(obj) parent_id = obj->getParentUUID(); + std::string forward_slash("/"); + while(obj) + { + obj = gInventory.getCategory(parent_id); + if(obj) + { + temp.assign(forward_slash + obj->getName() + temp); + parent_id = obj->getParentUUID(); + } + } + path.append(temp); +} + +void change_item_parent(LLInventoryModel* model, + LLViewerInventoryItem* item, + const LLUUID& new_parent_id, + BOOL restamp) +{ + if (item->getParentUUID() != new_parent_id) + { + LLInventoryModel::update_list_t update; + LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(),-1); + update.push_back(old_folder); + LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1); + update.push_back(new_folder); + gInventory.accountForUpdate(update); + + LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); + new_item->setParent(new_parent_id); + new_item->updateParentOnServer(restamp); + model->updateItem(new_item); + model->notifyObservers(); + } +} + + +BOOL get_is_item_worn(const LLUUID& id) +{ + const LLViewerInventoryItem* item = gInventory.getItem(id); + if (!item) + return FALSE; + + switch(item->getType()) + { + case LLAssetType::AT_OBJECT: + { + if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getLinkedUUID())) + return TRUE; + break; + } + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_CLOTHING: + if(gAgentWearables.isWearingItem(item->getLinkedUUID())) + return TRUE; + break; + case LLAssetType::AT_GESTURE: + if (LLGestureMgr::instance().isGestureActive(item->getLinkedUUID())) + return TRUE; + break; + default: + break; + } + return FALSE; +} + +void show_item_profile(const LLUUID& item_uuid) +{ + LLUUID linked_uuid = gInventory.getLinkedItemID(item_uuid); + LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD().with("id", linked_uuid)); +} + +void show_item_original(const LLUUID& item_uuid) +{ + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(); + if (!active_panel) return; + active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_NO); +} ///---------------------------------------------------------------------------- /// LLInventoryCollectFunctor implementations ///---------------------------------------------------------------------------- // static -bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* item) +bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(const LLInventoryItem* item) { if (!item) return false; - bool allowed = false; - switch(item->getType()) { case LLAssetType::AT_CALLINGCARD: - // not allowed + return false; break; - case LLAssetType::AT_OBJECT: if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID())) - { - allowed = true; - } + return true; break; - case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: if(!gAgentWearables.isWearingItem(item->getUUID())) - { - allowed = true; - } + return true; break; default: - allowed = true; + return true; break; } - - return allowed; + return false; } bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) @@ -280,6 +356,26 @@ bool LLFindWearables::operator()(LLInventoryCategory* cat, return FALSE; } +bool LLFindWearablesOfType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + if (!item) return false; + if (item->getType() != LLAssetType::AT_CLOTHING && + item->getType() != LLAssetType::AT_BODYPART) + { + return false; + } + + LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); + if (!vitem || vitem->getWearableType() != mWearableType) return false; + + return true; +} + +void LLFindWearablesOfType::setType(LLWearableType::EType type) +{ + mWearableType = type; +} + ///---------------------------------------------------------------------------- /// LLAssetIDMatches ///---------------------------------------------------------------------------- @@ -406,202 +502,3 @@ void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder) folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); } } - -static void assign_clothing_bodypart_icon(EInventoryIcon &idx, U32 attachment_point) -{ - const EWearableType wearable_type = EWearableType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & attachment_point); - switch(wearable_type) - { - case WT_SHAPE: - idx = BODYPART_SHAPE_ICON_NAME; - break; - case WT_SKIN: - idx = BODYPART_SKIN_ICON_NAME; - break; - case WT_HAIR: - idx = BODYPART_HAIR_ICON_NAME; - break; - case WT_EYES: - idx = BODYPART_EYES_ICON_NAME; - break; - case WT_SHIRT: - idx = CLOTHING_SHIRT_ICON_NAME; - break; - case WT_PANTS: - idx = CLOTHING_PANTS_ICON_NAME; - break; - case WT_SHOES: - idx = CLOTHING_SHOES_ICON_NAME; - break; - case WT_SOCKS: - idx = CLOTHING_SOCKS_ICON_NAME; - break; - case WT_JACKET: - idx = CLOTHING_JACKET_ICON_NAME; - break; - case WT_GLOVES: - idx = CLOTHING_GLOVES_ICON_NAME; - break; - case WT_UNDERSHIRT: - idx = CLOTHING_UNDERSHIRT_ICON_NAME; - break; - case WT_UNDERPANTS: - idx = CLOTHING_UNDERPANTS_ICON_NAME; - break; - case WT_SKIRT: - idx = CLOTHING_SKIRT_ICON_NAME; - break; - case WT_ALPHA: - idx = CLOTHING_ALPHA_ICON_NAME; - break; - case WT_TATTOO: - idx = CLOTHING_TATTOO_ICON_NAME; - break; - default: - break; - } -} - - -const std::string& get_item_icon_name(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ) -{ - EInventoryIcon idx = OBJECT_ICON_NAME; - if ( item_is_multi ) - { - idx = OBJECT_MULTI_ICON_NAME; - } - - switch(asset_type) - { - case LLAssetType::AT_TEXTURE: - if(LLInventoryType::IT_SNAPSHOT == inventory_type) - { - idx = SNAPSHOT_ICON_NAME; - } - else - { - idx = TEXTURE_ICON_NAME; - } - break; - - case LLAssetType::AT_SOUND: - idx = SOUND_ICON_NAME; - break; - case LLAssetType::AT_CALLINGCARD: - if(attachment_point!= 0) - { - idx = CALLINGCARD_ONLINE_ICON_NAME; - } - else - { - idx = CALLINGCARD_OFFLINE_ICON_NAME; - } - break; - case LLAssetType::AT_LANDMARK: - if(attachment_point!= 0) - { - idx = LANDMARK_VISITED_ICON_NAME; - } - else - { - idx = LANDMARK_ICON_NAME; - } - break; - case LLAssetType::AT_SCRIPT: - case LLAssetType::AT_LSL_TEXT: - case LLAssetType::AT_LSL_BYTECODE: - idx = SCRIPT_ICON_NAME; - break; - case LLAssetType::AT_CLOTHING: - idx = CLOTHING_ICON_NAME; - assign_clothing_bodypart_icon(idx, attachment_point); - break; - case LLAssetType::AT_BODYPART: - idx = BODYPART_ICON_NAME; - assign_clothing_bodypart_icon(idx, attachment_point); - break; - case LLAssetType::AT_NOTECARD: - idx = NOTECARD_ICON_NAME; - break; - case LLAssetType::AT_ANIMATION: - idx = ANIMATION_ICON_NAME; - break; - case LLAssetType::AT_GESTURE: - idx = GESTURE_ICON_NAME; - break; - case LLAssetType::AT_LINK: - idx = LINKITEM_ICON_NAME; - break; - case LLAssetType::AT_LINK_FOLDER: - idx = LINKFOLDER_ICON_NAME; - break; - default: - break; - } - - return ICON_NAME[idx]; -} - -LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi) -{ - const std::string& icon_name = get_item_icon_name(asset_type, inventory_type, attachment_point, item_is_multi ); - return LLUI::getUIImage(icon_name); -} - -BOOL get_is_item_worn(const LLUUID& id) -{ - const LLViewerInventoryItem* item = gInventory.getItem(id); - if (!item) - return FALSE; - - switch(item->getType()) - { - case LLAssetType::AT_OBJECT: - { - if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getLinkedUUID())) - return TRUE; - break; - } - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_CLOTHING: - if(gAgentWearables.isWearingItem(item->getLinkedUUID())) - return TRUE; - break; - case LLAssetType::AT_GESTURE: - if (LLGestureMgr::instance().isGestureActive(item->getLinkedUUID())) - return TRUE; - break; - default: - break; - } - return FALSE; -} - - -void change_item_parent(LLInventoryModel* model, - LLViewerInventoryItem* item, - const LLUUID& new_parent_id, - BOOL restamp) -{ - if (item->getParentUUID() != new_parent_id) - { - LLInventoryModel::update_list_t update; - LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(),-1); - update.push_back(old_folder); - LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1); - update.push_back(new_folder); - gInventory.accountForUpdate(update); - - LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); - new_item->setParent(new_parent_id); - new_item->updateParentOnServer(restamp); - model->updateItem(new_item); - model->notifyObservers(); - } -} diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 6f373f7392..bb365573d7 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -40,6 +40,30 @@ /******************************************************************************** ** ** + ** MISCELLANEOUS GLOBAL FUNCTIONS + **/ + +// Is this item or its baseitem is worn, attached, etc... +BOOL get_is_item_worn(const LLUUID& id); + +void show_item_profile(const LLUUID& item_uuid); + +void show_item_original(const LLUUID& item_uuid); + +void change_item_parent(LLInventoryModel* model, + LLViewerInventoryItem* item, + const LLUUID& new_parent_id, + BOOL restamp); + +// Generates a string containing the path to the item specified by item_id. +void append_path(const LLUUID& id, std::string& path); + +/** Miscellaneous global functions + ** ** + *******************************************************************************/ + +/******************************************************************************** + ** ** ** INVENTORY COLLECTOR FUNCTIONS **/ @@ -58,7 +82,7 @@ public: virtual ~LLInventoryCollectFunctor(){}; virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) = 0; - static bool itemTransferCommonlyAllowed(LLInventoryItem* item); + static bool itemTransferCommonlyAllowed(const LLInventoryItem* item); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -228,6 +252,37 @@ public: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLFindNonLinksByMask +// +// +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLFindNonLinksByMask : public LLInventoryCollectFunctor +{ +public: + LLFindNonLinksByMask(U64 mask) + : mFilterMask(mask) + {} + + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) + { + if(item && !item->getIsLinkType() && (mFilterMask & (1LL << item->getInventoryType())) ) + { + return true; + } + + return false; + } + + void setFilterMask(U64 mask) + { + mFilterMask = mask; + } + +private: + U64 mFilterMask; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLFindWearables // // Collects wearables based on item type. @@ -241,6 +296,19 @@ public: LLInventoryItem* item); }; +//Inventory collect functor collecting wearables of a specific wearable type +class LLFindWearablesOfType : public LLInventoryCollectFunctor +{ +public: + LLFindWearablesOfType(LLWearableType::EType type) : mWearableType(type) {} + virtual ~LLFindWearablesOfType() {} + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); + void setType(LLWearableType::EType type); + +private: + LLWearableType::EType mWearableType; +}; + /** Inventory Collector Functions ** ** *******************************************************************************/ @@ -297,25 +365,6 @@ public: virtual void doItem(LLFolderViewItem* item); }; -const std::string& get_item_icon_name(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ); - -LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ); - -// Is this item or its baseitem is worn, attached, etc... -BOOL get_is_item_worn(const LLUUID& id); - - -void change_item_parent(LLInventoryModel* model, - LLViewerInventoryItem* item, - const LLUUID& new_parent_id, - BOOL restamp); - #endif // LL_LLINVENTORYFUNCTIONS_H diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp new file mode 100644 index 0000000000..2fb55f4c1f --- /dev/null +++ b/indra/newview/llinventoryicon.cpp @@ -0,0 +1,187 @@ +/** + * @file llinventoryicon.cpp + * @brief Implementation of the inventory icon. + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llinventoryicon.h" + +#include "lldictionary.h" +#include "llinventorydefines.h" +#include "llui.h" +#include "llwearabletype.h" + +struct IconEntry : public LLDictionaryEntry +{ + IconEntry(const std::string &item_name, + const std::string &link_name) + : + LLDictionaryEntry(item_name), + mLinkName(link_name) + {} + const std::string mLinkName; +}; + +class LLIconDictionary : public LLSingleton<LLIconDictionary>, + public LLDictionary<LLInventoryIcon::EIconName, IconEntry> +{ +public: + LLIconDictionary(); +}; + +LLIconDictionary::LLIconDictionary() +{ + addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("Inv_Texture", "Inv_Texture_Link")); + addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Texture", "Inv_Texture_Link")); + addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("Inv_CallingCard", "Inv_CallingCard_Link")); + addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("Inv_CallingCard", "Inv_CallingCard_Link")); + addEntry(LLInventoryIcon::ICONNAME_LANDMARK, new IconEntry("Inv_Landmark", "Inv_Landmark_Link")); + addEntry(LLInventoryIcon::ICONNAME_LANDMARK_VISITED, new IconEntry("Inv_Landmark", "Inv_Landmark_Link")); + addEntry(LLInventoryIcon::ICONNAME_SCRIPT, new IconEntry("Inv_Script", "Inv_Script_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING, new IconEntry("Inv_Clothing", "Inv_Clothing_Link")); + addEntry(LLInventoryIcon::ICONNAME_OBJECT, new IconEntry("Inv_Object", "Inv_Object_Link")); + addEntry(LLInventoryIcon::ICONNAME_OBJECT_MULTI, new IconEntry("Inv_Object_Multi", "Inv_Object_Multi_Link")); + addEntry(LLInventoryIcon::ICONNAME_NOTECARD, new IconEntry("Inv_Notecard", "Inv_Notecard_Link")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART, new IconEntry("Inv_Skin", "Inv_Skin_Link")); + addEntry(LLInventoryIcon::ICONNAME_SNAPSHOT, new IconEntry("Inv_Snapshot", "Inv_Snapshot_Link")); + + addEntry(LLInventoryIcon::ICONNAME_BODYPART_SHAPE, new IconEntry("Inv_BodyShape", "Inv_BodyShape_Link")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_SKIN, new IconEntry("Inv_Skin", "Inv_Skin_Link")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_HAIR, new IconEntry("Inv_Hair", "Inv_Hair_Link")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_EYES, new IconEntry("Inv_Eye", "Inv_Eye_Link")); + + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHIRT, new IconEntry("Inv_Shirt", "Inv_Shirt_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_PANTS, new IconEntry("Inv_Pants", "Inv_Pants_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHOES, new IconEntry("Inv_Shoe", "Inv_Shoe_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SOCKS, new IconEntry("Inv_Socks", "Inv_Socks_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_JACKET, new IconEntry("Inv_Jacket", "Inv_Jacket_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_GLOVES, new IconEntry("Inv_Gloves", "Inv_Gloves_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT, new IconEntry("Inv_Undershirt", "Inv_Undershirt_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS, new IconEntry("Inv_Underpants", "Inv_Underpants_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SKIRT, new IconEntry("Inv_Skirt", "Inv_Skirt_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, new IconEntry("Inv_Alpha", "Inv_Alpha_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, new IconEntry("Inv_Tattoo", "Inv_Tattoo_Link")); + addEntry(LLInventoryIcon::ICONNAME_ANIMATION, new IconEntry("Inv_Animation", "Inv_Animation_Link")); + addEntry(LLInventoryIcon::ICONNAME_GESTURE, new IconEntry("Inv_Gesture", "Inv_Gesture_Link")); + + addEntry(LLInventoryIcon::ICONNAME_LINKITEM, new IconEntry("Inv_LinkItem", "Inv_LinkItem")); + addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkItem", "Inv_LinkItem")); + + addEntry(LLInventoryIcon::ICONNAME_NONE, new IconEntry("NONE", "NONE")); +} + +LLUIImagePtr LLInventoryIcon::getIcon(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type, + BOOL item_is_link, + U32 misc_flag, + BOOL item_is_multi) +{ + const std::string& icon_name = getIconName(asset_type, inventory_type, item_is_link, misc_flag, item_is_multi); + return LLUI::getUIImage(icon_name); +} + +LLUIImagePtr LLInventoryIcon::getIcon(EIconName idx) +{ + return LLUI::getUIImage(getIconName(idx)); +} + +const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type, + BOOL item_is_link, + U32 misc_flag, + BOOL item_is_multi) +{ + EIconName idx = ICONNAME_OBJECT; + if (item_is_multi) + { + idx = ICONNAME_OBJECT_MULTI; + } + + switch(asset_type) + { + case LLAssetType::AT_TEXTURE: + idx = (inventory_type == LLInventoryType::IT_SNAPSHOT) ? ICONNAME_SNAPSHOT : ICONNAME_TEXTURE; + break; + case LLAssetType::AT_SOUND: + idx = ICONNAME_SOUND; + break; + case LLAssetType::AT_CALLINGCARD: + idx = (misc_flag != 0) ? ICONNAME_CALLINGCARD_ONLINE : ICONNAME_CALLINGCARD_OFFLINE; + break; + case LLAssetType::AT_LANDMARK: + idx = (misc_flag != 0) ? ICONNAME_LANDMARK_VISITED : ICONNAME_LANDMARK; + break; + case LLAssetType::AT_SCRIPT: + case LLAssetType::AT_LSL_TEXT: + case LLAssetType::AT_LSL_BYTECODE: + idx = ICONNAME_SCRIPT; + break; + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_BODYPART: + idx = assignWearableIcon(misc_flag); + break; + case LLAssetType::AT_NOTECARD: + idx = ICONNAME_NOTECARD; + break; + case LLAssetType::AT_ANIMATION: + idx = ICONNAME_ANIMATION; + break; + case LLAssetType::AT_GESTURE: + idx = ICONNAME_GESTURE; + break; + case LLAssetType::AT_LINK: + idx = ICONNAME_LINKITEM; + break; + case LLAssetType::AT_LINK_FOLDER: + idx = ICONNAME_LINKFOLDER; + break; + case LLAssetType::AT_OBJECT: + idx = ICONNAME_OBJECT; + break; + default: + break; + } + + return getIconName(idx, item_is_link); +} + + +const std::string& LLInventoryIcon::getIconName(EIconName idx, BOOL item_is_link) +{ + const IconEntry *entry = LLIconDictionary::instance().lookup(idx); + if (item_is_link) return entry->mLinkName; + return entry->mName; +} + +LLInventoryIcon::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag) +{ + const LLWearableType::EType wearable_type = LLWearableType::EType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & misc_flag); + return LLWearableType::getIconName(wearable_type); +} diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h new file mode 100644 index 0000000000..4cb7a123c4 --- /dev/null +++ b/indra/newview/llinventoryicon.h @@ -0,0 +1,108 @@ +/** + * @file llinventoryfunctions.h + * @brief Miscellaneous inventory-related functions and classes + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLINVENTORYICON_H +#define LL_LLINVENTORYICON_H + +#include "llassettype.h" +#include "llinventorytype.h" +#include "lluiimage.h" + +class LLInventoryIcon +{ +public: + enum EIconName + { + ICONNAME_TEXTURE, + ICONNAME_SOUND, + ICONNAME_CALLINGCARD_ONLINE, + ICONNAME_CALLINGCARD_OFFLINE, + ICONNAME_LANDMARK, + ICONNAME_LANDMARK_VISITED, + ICONNAME_SCRIPT, + ICONNAME_CLOTHING, + ICONNAME_OBJECT, + ICONNAME_OBJECT_MULTI, + ICONNAME_NOTECARD, + ICONNAME_BODYPART, + ICONNAME_SNAPSHOT, + + ICONNAME_BODYPART_SHAPE, + ICONNAME_BODYPART_SKIN, + ICONNAME_BODYPART_HAIR, + ICONNAME_BODYPART_EYES, + ICONNAME_CLOTHING_SHIRT, + ICONNAME_CLOTHING_PANTS, + ICONNAME_CLOTHING_SHOES, + ICONNAME_CLOTHING_SOCKS, + ICONNAME_CLOTHING_JACKET, + ICONNAME_CLOTHING_GLOVES, + ICONNAME_CLOTHING_UNDERSHIRT, + ICONNAME_CLOTHING_UNDERPANTS, + ICONNAME_CLOTHING_SKIRT, + ICONNAME_CLOTHING_ALPHA, + ICONNAME_CLOTHING_TATTOO, + + ICONNAME_ANIMATION, + ICONNAME_GESTURE, + + ICONNAME_LINKITEM, + ICONNAME_LINKFOLDER, + + ICONNAME_COUNT, + + ICONNAME_NONE = -1 + }; + + static const std::string& getIconName(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, + BOOL item_is_link = FALSE, + U32 misc_flag = 0, // different meanings depending on item type + BOOL item_is_multi = FALSE); + static const std::string& getIconName(EIconName idx, + BOOL item_is_link = FALSE); + + static LLUIImagePtr getIcon(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, + BOOL item_is_link = FALSE, + U32 misc_flag = 0, // different meanings depending on item type + BOOL item_is_multi = FALSE); + static LLUIImagePtr getIcon(EIconName idx); + +protected: + static EIconName assignWearableIcon(U32 misc_flag); +}; +#endif // LL_LLINVENTORYICON_H + + + diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 9719de4650..750cdfb678 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -40,11 +40,13 @@ // llcommon #include "llcommonutils.h" +// llui #include "lliconctrl.h" +#include "lltextutil.h" +#include "llcallbacklist.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" -#include "lltextutil.h" #include "lltrans.h" //////////////////////////////////////////////////////////////////////////////// @@ -130,7 +132,7 @@ BOOL LLPanelInventoryListItemBase::postBuild() setIconCtrl(getChild<LLIconCtrl>("item_icon")); setTitleCtrl(getChild<LLTextBox>("item_name")); - mIconImage = get_item_icon(mItem->getType(), mItem->getInventoryType(), mItem->getFlags(), FALSE); + mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), mItem->getIsLinkType(), mItem->getFlags(), FALSE); setNeedsRefresh(true); @@ -320,6 +322,7 @@ LLInventoryItemsList::Params::Params() LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p) : LLFlatListViewEx(p) , mNeedsRefresh(false) +, mForceRefresh(false) { // TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView // but reset to true in all derived classes. This settings might need to @@ -327,11 +330,15 @@ LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p setCommitOnSelectionChange(true); setNoFilteredItemsMsg(LLTrans::getString("InventoryNoMatchingItems")); + + gIdleCallbacks.addFunction(idle, this); } // virtual LLInventoryItemsList::~LLInventoryItemsList() -{} +{ + gIdleCallbacks.deleteFunction(idle, this); +} void LLInventoryItemsList::refreshList(const LLInventoryModel::item_array_t item_array) { @@ -344,12 +351,30 @@ void LLInventoryItemsList::refreshList(const LLInventoryModel::item_array_t item mNeedsRefresh = true; } -void LLInventoryItemsList::draw() +boost::signals2::connection LLInventoryItemsList::setRefreshCompleteCallback(const commit_signal_t::slot_type& cb) +{ + return mRefreshCompleteSignal.connect(cb); +} + +void LLInventoryItemsList::doIdle() { - LLFlatListViewEx::draw(); - if(mNeedsRefresh) + if (!mNeedsRefresh) return; + + if (isInVisibleChain() || mForceRefresh) { refresh(); + + mRefreshCompleteSignal(this, LLSD()); + } +} + +//static +void LLInventoryItemsList::idle(void* user_data) +{ + LLInventoryItemsList* self = static_cast<LLInventoryItemsList*>(user_data); + if ( self ) + { // Do the real idle + self->doIdle(); } } @@ -363,7 +388,7 @@ void LLInventoryItemsList::refresh() computeDifference(getIDs(), added_items, removed_items); bool add_limit_exceeded = false; - unsigned nadded = 0; + unsigned int nadded = 0; uuid_vec_t::const_iterator it = added_items.begin(); for( ; added_items.end() != it; ++it) @@ -375,8 +400,12 @@ void LLInventoryItemsList::refresh() } LLViewerInventoryItem* item = gInventory.getItem(*it); // Do not rearrange items on each adding, let's do that on filter call - addNewItem(item, false); - ++nadded; + llassert(item); + if (item) + { + addNewItem(item, false); + ++nadded; + } } it = removed_items.begin(); @@ -390,6 +419,7 @@ void LLInventoryItemsList::refresh() bool needs_refresh = add_limit_exceeded; setNeedsRefresh(needs_refresh); + setForceRefresh(needs_refresh); } void LLInventoryItemsList::computeDifference( diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index bc04eb6f5b..03ad7c2184 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -42,6 +42,7 @@ // newview #include "llflatlistview.h" +#include "llviewerinventory.h" class LLIconCtrl; class LLTextBox; @@ -120,6 +121,21 @@ public: /* Removes item highlight */ /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); + /** Get the name of a corresponding inventory item */ + const std::string& getItemName() const { return mItem->getName(); } + + /** Get the asset type of a corresponding inventory item */ + LLAssetType::EType getType() const { return mItem->getType(); } + + /** Get the wearable type of a corresponding inventory item */ + LLWearableType::EType getWearableType() const { return mItem->getWearableType(); } + + /** Get the description of a corresponding inventory item */ + const std::string& getDescription() const { return mItem->getDescription(); } + + /** Get the associated inventory item */ + LLViewerInventoryItem* getItem() const { return mItem; } + virtual ~LLPanelInventoryListItemBase(){} protected: @@ -208,14 +224,29 @@ public: void refreshList(const LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array); + boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb); + /** - * Let list know items need to be refreshed in next draw() + * Let list know items need to be refreshed in next doIdle() */ void setNeedsRefresh(bool needs_refresh){ mNeedsRefresh = needs_refresh; } bool getNeedsRefresh(){ return mNeedsRefresh; } - /*virtual*/ void draw(); + /** + * Sets the flag indicating that the list needs to be refreshed even if it is + * not currently visible. + */ + void setForceRefresh(bool force_refresh){ mForceRefresh = force_refresh; } + + /** + * Idle routine used to refresh the list regardless of the current list + * visibility, unlike draw() which is called only for the visible list. + * This is needed for example to filter items of the list hidden by closed + * accordion tab. + */ + void doIdle(); // Real idle routine + static void idle(void* user_data); // static glue to doIdle() protected: friend class LLUICtrlFactory; @@ -225,7 +256,7 @@ protected: /** * Refreshes list items, adds new items and removes deleted items. - * Called from draw() until all new items are added, , + * Called from doIdle() until all new items are added, * maximum 50 items can be added during single call. */ void refresh(); @@ -245,6 +276,10 @@ private: uuid_vec_t mIDs; // IDs of items that were added in refreshList(). // Will be used in refresh() to determine added and removed ids bool mNeedsRefresh; + + bool mForceRefresh; + + commit_signal_t mRefreshCompleteSignal; }; #endif //LL_LLINVENTORYITEMSLIST_H diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 6452ae82f8..2e1c5238d3 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -319,30 +319,18 @@ void LLInventoryModel::unlockDirectDescendentArrays(const LLUUID& cat_id) // specifies 'type' as what it defaults to containing. The category is // not necessarily only for that type. *NOTE: This will create a new // inventory category on the fly if one does not exist. -const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bool create_folder, bool find_in_library) -{ - const LLUUID &rv = findCatUUID(t, find_in_library); - if(rv.isNull() && isInventoryUsable() && (create_folder && !find_in_library)) - { - const LLUUID &root_id = gInventory.getRootFolderID(); - if(root_id.notNull()) - { - return createNewCategory(root_id, t, LLStringUtil::null); - } - } - return rv; -} - -// Internal method which looks for a category with the specified -// preferred type. Returns LLUUID::null if not found. -const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type, bool find_in_library) const +const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType preferred_type, + bool create_folder, + bool find_in_library) { + LLUUID rv = LLUUID::null; + const LLUUID &root_id = (find_in_library) ? gInventory.getLibraryRootFolderID() : gInventory.getRootFolderID(); if(LLFolderType::FT_ROOT_INVENTORY == preferred_type) { - return root_id; + rv = root_id; } - if(root_id.notNull()) + else if (root_id.notNull()) { cat_array_t* cats = NULL; cats = get_ptr_in_map(mParentChildCategoryTree, root_id); @@ -353,12 +341,21 @@ const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type, { if(cats->get(i)->getPreferredType() == preferred_type) { - return cats->get(i)->getUUID(); + rv = cats->get(i)->getUUID(); + break; } } } } - return LLUUID::null; + + if(rv.isNull() && isInventoryUsable() && (create_folder && !find_in_library)) + { + if(root_id.notNull()) + { + return createNewCategory(root_id, preferred_type, LLStringUtil::null); + } + } + return rv; } // Convenience function to create a new category. You could call @@ -569,6 +566,11 @@ const LLUUID& LLInventoryModel::getLinkedItemID(const LLUUID& object_id) const return item->getLinkedUUID(); } +LLViewerInventoryItem* LLInventoryModel::getLinkedItem(const LLUUID& object_id) const +{ + return object_id.notNull() ? getItem(getLinkedItemID(object_id)) : NULL; +} + LLInventoryModel::item_array_t LLInventoryModel::collectLinkedItems(const LLUUID& id, const LLUUID& start_folder_id) { @@ -583,27 +585,6 @@ LLInventoryModel::item_array_t LLInventoryModel::collectLinkedItems(const LLUUID return items; } -// Generates a string containing the path to the item specified by -// item_id. -void LLInventoryModel::appendPath(const LLUUID& id, std::string& path) const -{ - std::string temp; - const LLInventoryObject* obj = getObject(id); - LLUUID parent_id; - if(obj) parent_id = obj->getParentUUID(); - std::string forward_slash("/"); - while(obj) - { - obj = getCategory(parent_id); - if(obj) - { - temp.assign(forward_slash + obj->getName() + temp); - parent_id = obj->getParentUUID(); - } - } - path.append(temp); -} - bool LLInventoryModel::isInventoryUsable() const { bool result = false; @@ -1024,98 +1005,6 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id) } } -void LLInventoryModel::deleteFromServer(LLDynamicArray<LLUUID>& category_ids, - LLDynamicArray<LLUUID>& item_ids) -{ - // Store off tre UUIDS of parents which are being deleted (thus no - // need to increment) and the parents which are being modified. We - // have to increment the version of the parent with each message - // sent upstream since the dataserver will increment each unique - // parent per update message. - std::set<LLUUID> ignore_parents; - update_map_t inc_parents; - - S32 i; - S32 count = category_ids.count(); - BOOL start_new_message = TRUE; - LLMessageSystem* msg = gMessageSystem; - LLPointer<LLViewerInventoryCategory> cat; - for(i = 0; i < count; i++) - { - if(start_new_message) - { - start_new_message = FALSE; - msg->newMessageFast(_PREHASH_RemoveInventoryObjects); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - } - LLUUID cat_id = category_ids.get(i); - - msg->nextBlockFast(_PREHASH_FolderData); - msg->addUUIDFast(_PREHASH_FolderID, cat_id); - cat = getCategory(cat_id); - ignore_parents.insert(cat_id); - addChangedMask(LLInventoryObserver::REMOVE | LLInventoryObserver::STRUCTURE, cat_id); - if(cat.notNull() && (ignore_parents.find(cat->getParentUUID())==ignore_parents.end())) - { - --inc_parents[cat->getParentUUID()]; - } - if(msg->isSendFullFast(_PREHASH_FolderData)) - { - start_new_message = TRUE; - msg->nextBlockFast(_PREHASH_ItemData); - msg->addUUIDFast(_PREHASH_ItemID, LLUUID::null); - gAgent.sendReliableMessage(); - accountForUpdate(inc_parents); - inc_parents.clear(); - } - } - - count = item_ids.count(); - std::set<LLUUID>::iterator not_ignored = ignore_parents.end(); - LLPointer<LLViewerInventoryItem> item; - if((0 == count) && (!start_new_message)) - { - msg->nextBlockFast(_PREHASH_ItemData); - msg->addUUIDFast(_PREHASH_ItemID, LLUUID::null); - } - for(i = 0; i < count; i++) - { - if(start_new_message) - { - start_new_message = FALSE; - msg->newMessageFast(_PREHASH_RemoveInventoryObjects); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_FolderData); - msg->addUUIDFast(_PREHASH_FolderID, LLUUID::null); - } - LLUUID item_id = item_ids.get(i); - msg->nextBlockFast(_PREHASH_ItemData); - msg->addUUIDFast(_PREHASH_ItemID, item_id); - item = getItem(item_id); - addChangedMask(LLInventoryObserver::REMOVE | LLInventoryObserver::STRUCTURE, item_id); - if(item.notNull() && (ignore_parents.find(item->getParentUUID()) == not_ignored)) - { - --inc_parents[item->getParentUUID()]; - } - if(msg->isSendFullFast(_PREHASH_ItemData)) - { - start_new_message = TRUE; - gAgent.sendReliableMessage(); - accountForUpdate(inc_parents); - inc_parents.clear(); - } - } - if(!start_new_message) - { - gAgent.sendReliableMessage(); - accountForUpdate(inc_parents); - } -} - // Add/remove an observer. If the observer is destroyed, be sure to // remove it. void LLInventoryModel::addObserver(LLInventoryObserver* observer) @@ -1206,29 +1095,7 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent) } } -// This method to prepares a set of mock inventory which provides -// minimal functionality before the actual arrival of inventory. -/* -void LLInventoryModel::mock(const LLUUID& root_id) -{ - llinfos << "LLInventoryModel::mock() " << root_id << llendl; - if(root_id.isNull()) - { - llwarns << "Not a valid root id" << llendl; - return; - } - LLPointer<LLViewerInventoryCategory> cat = new LLViewerInventoryCategory( - root_id, - LLUUID::null, - LLAssetType::AT_CATEGORY, - LLFolderType::lookupNewCategoryName(LLFolderType::FT_ROOT_INVENTORY), - gAgent.getID()); - addCategory(cat); - gInventory.buildParentChildMap(); -} -*/ - -//If we get back a normal response, handle it here +// If we get back a normal response, handle it here void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content) { start_new_inventory_observer(); @@ -1301,7 +1168,7 @@ void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::str gInventory.notifyObservers("fetchinventory"); } -bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) +bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) const { if(folder_id.isNull()) { @@ -1329,7 +1196,6 @@ bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) return cat->fetch(); } - void LLInventoryModel::cache( const LLUUID& parent_folder_id, const LLUUID& agent_id) @@ -1383,7 +1249,11 @@ void LLInventoryModel::addCategory(LLViewerInventoryCategory* category) void LLInventoryModel::addItem(LLViewerInventoryItem* item) { - //llinfos << "LLInventoryModel::addItem()" << llendl; + /* + const LLViewerInventoryCategory* cat = gInventory.getCategory(item->getParentUUID()); // Seraph remove for 2.1 + const std::string cat_name = cat ? cat->getName() : "CAT NOT FOUND"; // Seraph remove for 2.1 + llinfos << "Added item [ name:" << item->getName() << " UUID:" << item->getUUID() << " type:" << item->getActualType() << " ] to folder [ name:" << cat_name << " uuid:" << item->getParentUUID() << " ]" << llendl; // Seraph remove for 2.1 + */ llassert(item); if(item) @@ -1837,88 +1707,6 @@ bool LLInventoryModel::loadSkeleton( return rv; } -bool LLInventoryModel::loadMeat(const LLSD& options, const LLUUID& owner_id) -{ - llinfos << "importing inventory for " << owner_id << llendl; - bool rv = true; - for(LLSD::array_const_iterator it = options.beginArray(), - end = options.endArray(); it != end; ++it) - { - LLSD name = (*it)["name"]; - LLSD item_id = (*it)["item_id"]; - LLSD parent_id = (*it)["parent_id"]; - LLSD asset_type = (*it)["type"]; - LLSD data_id = (*it)["data_id"]; - if(name.isDefined() - && item_id.isDefined() - && parent_id.isDefined() - && asset_type.isDefined() - && data_id.isDefined()) - { - LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem; - item->rename(name.asString()); - item->setUUID(item_id.asUUID()); - item->setParent(parent_id.asUUID()); - LLAssetType::EType type = (LLAssetType::EType)asset_type.asInteger(); - item->setType(type); - - LLSD llsd_inv_type = (*it)["inv_type"]; - if(llsd_inv_type.isDefined()) - { - LLInventoryType::EType inv_type = (LLInventoryType::EType)llsd_inv_type.asInteger(); - item->setInventoryType(inv_type); - } - - if(LLAssetType::AT_CALLINGCARD == type) - { - LLPermissions perm; - perm.init(data_id.asUUID(), owner_id, LLUUID::null, LLUUID::null); - item->setPermissions(perm); - } - else - { - LLPermissions default_perm; - default_perm.init(LLUUID::null, owner_id, LLUUID::null, LLUUID::null); - LLSD llsd_perm_mask = (*it)["perm_mask"]; - if(llsd_perm_mask.isDefined()) - { - PermissionMask perm_mask = llsd_perm_mask.asInteger(); - default_perm.initMasks( - perm_mask, perm_mask, perm_mask, perm_mask, perm_mask); - } - else - { - default_perm.initMasks( - PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE); - } - item->setPermissions(default_perm); - item->setAssetUUID(data_id.asUUID()); - } - - LLSD flags = (*it)["flags"]; - if(flags.isDefined()) - { - // Not sure how well LLSD.asInteger() maps to - // unsigned long - using strtoul() - item->setFlags(strtoul(flags.asString().c_str(), NULL, 0)); - } - - LLSD time = (*it)["time"]; - if(time.isDefined()) - { - item->setCreationDate(time.asInteger()); - } - addItem(item); - } - else - { - llwarns << "Unable to import near " << name.asString() << llendl; - rv = false; - } - } - return rv; -} - // This is a brute force method to rebuild the entire parent-child // relations. The overall operation has O(NlogN) performance, which // should be sufficient for our needs. @@ -2186,73 +1974,6 @@ bool LLUUIDAndName::operator>(const LLUUIDAndName& rhs) const return (mID > rhs.mID); } -// Given the current state of the inventory items, figure out the -// clone information. *FIX: This is sub-optimal, since we can insert -// this information snurgically, but this makes sure the implementation -// works before we worry about optimization. -//void LLInventoryModel::recalculateCloneInformation() -//{ -// //dumpInventory(); -// -// // This implements a 'multi-map' like structure to keep track of -// // how many clones we find. -// typedef LLDynamicArray<LLViewerInventoryItem*> viewer_item_array_t; -// typedef std::map<LLUUIDAndName, viewer_item_array_t*> clone_map_t; -// clone_map_t clone_map; -// LLUUIDAndName id_and_name; -// viewer_item_array_t* clones = NULL; -// LLViewerInventoryItem* item = NULL; -// for(item = (LLViewerInventoryItem*)mItemMap.getFirstData(); -// item != NULL; -// item = (LLViewerInventoryItem*)mItemMap.getNextData()) -// { -// if(item->getType() == LLAssetType::AT_CALLINGCARD) -// { -// // if it's a calling card, we key off of the creator id, not -// // the asset id. -// id_and_name.mID = item->getCreatorUUID(); -// } -// else -// { -// // if it's not a calling card, we key clones from the -// // asset id. -// id_and_name.mID = item->getAssetUUID(); -// } -// if(id_and_name.mID == LLUUID::null) -// { -// continue; -// } -// id_and_name.mName = item->getName(); -// if(clone_map.checkData(id_and_name)) -// { -// clones = clone_map.getData(id_and_name); -// } -// else -// { -// clones = new viewer_item_array_t; -// clone_map.addData(id_and_name, clones); -// } -// clones->put(item); -// } -// -// S32 count = 0; -// for(clones = clone_map.getFirstData(); -// clones != NULL; -// clones = clone_map.getNextData()) -// { -// count = clones->count(); -// for(S32 i = 0; i < count; i++) -// { -// item = clones->get(i); -// item->setCloneCount(count - 1); -// //clones[i] = NULL; -// } -// delete clones; -// } -// clone_map.removeAllData(); -// //dumpInventory(); -//} - // static bool LLInventoryModel::loadFromFile(const std::string& filename, LLInventoryModel::cat_array_t& categories, @@ -3098,6 +2819,10 @@ static LLInventoryModel::item_array_t::iterator find_item_iter_by_uuid(LLInvento } // static +// * @param[in, out] items - vector with items to be updated. It should be sorted in a right way +// * before calling this method. +// * @param src_item_id - LLUUID of inventory item to be moved in new position +// * @param dest_item_id - LLUUID of inventory item before which source item should be placed. void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id) { LLInventoryModel::item_array_t::iterator it_src = find_item_iter_by_uuid(items, src_item_id); @@ -3113,6 +2838,7 @@ void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, c items.insert(it_dest, src_item); } +//* @param[in] items vector of items in order to be saved. void LLInventoryModel::saveItemsOrder(const LLInventoryModel::item_array_t& items) { int sortField = 0; @@ -3156,6 +2882,8 @@ static void rearrange_item_order_by_sort_field(LLInventoryModel::item_array_t& i std::sort(items.begin(), items.end(), sort_functor); } +// * @param source_item_id - LLUUID of the source item to be moved into new position +// * @param target_item_id - LLUUID of the target item before which source item should be placed. void LLInventoryModel::rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id) { LLInventoryModel::cat_array_t cats; diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index b7c1b57397..7b56d0bdd1 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -58,17 +58,15 @@ class LLMessageSystem; class LLInventoryCollectFunctor; -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInventoryModel +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// LLInventoryModel // -// This class represents a collection of inventory, and provides -// efficient ways to access that information. This class could in -// theory be used for any place where you need inventory, though it -// optimizes for time efficiency - not space efficiency, probably -// making it inappropriate for use on tasks. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - +// Represents a collection of inventory, and provides efficient ways to access +// that information. +// NOTE: This class could in theory be used for any place where you need +// inventory, though it optimizes for time efficiency - not space efficiency, +// probably making it inappropriate for use on tasks. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLInventoryModel { public: @@ -84,79 +82,129 @@ public: typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t; typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t; typedef std::set<LLUUID> changed_items_t; - - // construction & destruction - LLInventoryModel(); - ~LLInventoryModel(); - - void cleanupInventory(); - + class fetchInventoryResponder : public LLHTTPClient::Responder { public: fetchInventoryResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; void result(const LLSD& content); - void error(U32 status, const std::string& reason); - - public: - typedef std::vector<LLViewerInventoryCategory*> folder_ref_t; protected: LLSD mRequestSD; }; - // - // Accessors - // +/******************************************************************************** + ** ** + ** INITIALIZATION/SETUP + **/ - // Check if one object has a parent chain up to the category specified by UUID. - BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const; + //-------------------------------------------------------------------- + // Constructors / Destructors + //-------------------------------------------------------------------- +public: + LLInventoryModel(); + ~LLInventoryModel(); + void cleanupInventory(); +protected: + void empty(); // empty the entire contents - // Get whatever special folder this object is a child of, if any. - const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const; + //-------------------------------------------------------------------- + // Initialization + //-------------------------------------------------------------------- +public: + // The inventory model usage is sensitive to the initial construction of the model + bool isInventoryUsable() const; +private: + bool mIsAgentInvUsable; // used to handle an invalid inventory state - // Get the object by id. Returns NULL if not found. - // * WARNING: use the pointer returned for read operations - do - // not modify the object values in place or you will break stuff. - LLInventoryObject* getObject(const LLUUID& id) const; + //-------------------------------------------------------------------- + // Root Folders + //-------------------------------------------------------------------- +public: + // The following are set during login with data from the server + void setRootFolderID(const LLUUID& id); + void setLibraryOwnerID(const LLUUID& id); + void setLibraryRootFolderID(const LLUUID& id); - // Get the item by id. Returns NULL if not found. - // * WARNING: use the pointer for read operations - use the - // updateItem() method to actually modify values. - LLViewerInventoryItem* getItem(const LLUUID& id) const; + const LLUUID &getRootFolderID() const; + const LLUUID &getLibraryOwnerID() const; + const LLUUID &getLibraryRootFolderID() const; +private: + LLUUID mRootFolderID; + LLUUID mLibraryRootFolderID; + LLUUID mLibraryOwnerID; + + //-------------------------------------------------------------------- + // Structure + //-------------------------------------------------------------------- +public: + // Methods to load up inventory skeleton & meat. These are used + // during authentication. Returns true if everything parsed. + bool loadSkeleton(const LLSD& options, const LLUUID& owner_id); + void buildParentChildMap(); // brute force method to rebuild the entire parent-child relations + // Call on logout to save a terse representation. + void cache(const LLUUID& parent_folder_id, const LLUUID& agent_id); +private: + // Information for tracking the actual inventory. We index this + // information in a lot of different ways so we can access + // the inventory using several different identifiers. + // mInventory member data is the 'master' list of inventory, and + // mCategoryMap and mItemMap store uuid->object mappings. + typedef std::map<LLUUID, LLPointer<LLViewerInventoryCategory> > cat_map_t; + typedef std::map<LLUUID, LLPointer<LLViewerInventoryItem> > item_map_t; + cat_map_t mCategoryMap; + item_map_t mItemMap; + // This last set of indices is used to map parents to children. + typedef std::map<LLUUID, cat_array_t*> parent_cat_map_t; + typedef std::map<LLUUID, item_array_t*> parent_item_map_t; + parent_cat_map_t mParentChildCategoryTree; + parent_item_map_t mParentChildItemTree; - // Get the category by id. Returns NULL if not found. - // * WARNING: use the pointer for read operations - use the - // updateCategory() method to actually modify values. - LLViewerInventoryCategory* getCategory(const LLUUID& id) const; + //-------------------------------------------------------------------- + // Login + //-------------------------------------------------------------------- +public: + static BOOL getIsFirstTimeInViewer2(); +private: + static BOOL sFirstTimeInViewer2; + const static S32 sCurrentInvCacheVersion; // expected inventory cache version - // Return the number of items or categories - S32 getItemCount() const; - S32 getCategoryCount() const; +/** Initialization/Setup + ** ** + *******************************************************************************/ + +/******************************************************************************** + ** ** + ** ACCESSORS + **/ + + //-------------------------------------------------------------------- + // Descendents + //-------------------------------------------------------------------- +public: + // Make sure we have the descendents in the structure. Returns true + // if a fetch was performed. + bool fetchDescendentsOf(const LLUUID& folder_id) const; // Return the direct descendents of the id provided.Set passed // in values to NULL if the call fails. - // *WARNING: The array provided points straight into the guts of - // this object, and should only be used for read operations, since - // modifications may invalidate the internal state of the - // inventory. + // NOTE: The array provided points straight into the guts of + // this object, and should only be used for read operations, since + // modifications may invalidate the internal state of the inventory. void getDirectDescendentsOf(const LLUUID& cat_id, cat_array_t*& categories, item_array_t*& items) const; - // SJB: Added version to lock the arrays to catch potential logic bugs - void lockDirectDescendentArrays(const LLUUID& cat_id, - cat_array_t*& categories, - item_array_t*& items); - void unlockDirectDescendentArrays(const LLUUID& cat_id); - // Starting with the object specified, add its descendents to the // array provided, but do not add the inventory object specified - // by id. There is no guaranteed order. Neither array will be - // erased before adding objects to it. Do not store a copy of the - // pointers collected - use them, and collect them again later if - // you need to reference the same objects. - enum { EXCLUDE_TRASH = FALSE, INCLUDE_TRASH = TRUE }; + // by id. There is no guaranteed order. + // NOTE: Neither array will be erased before adding objects to it. + // Do not store a copy of the pointers collected - use them, and + // collect them again later if you need to reference the same objects. + enum { + EXCLUDE_TRASH = FALSE, + INCLUDE_TRASH = TRUE + }; void collectDescendents(const LLUUID& id, cat_array_t& categories, item_array_t& items, @@ -172,156 +220,163 @@ public: // Assumes item_id is itself not a linked item. item_array_t collectLinkedItems(const LLUUID& item_id, const LLUUID& start_folder_id = LLUUID::null); + - // Get the inventoryID that this item points to, else just return item_id + // Check if one object has a parent chain up to the category specified by UUID. + BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const; + + //-------------------------------------------------------------------- + // Find + //-------------------------------------------------------------------- +public: + // Returns the uuid of the category that specifies 'type' as what it + // defaults to containing. The category is not necessarily only for that type. + // NOTE: If create_folder is true, this will create a new inventory category + // on the fly if one does not exist. *NOTE: if find_in_library is true it + // will search in the user's library folder instead of "My Inventory" + const LLUUID findCategoryUUIDForType(LLFolderType::EType preferred_type, + bool create_folder = true, + bool find_in_library = false); + + // Get whatever special folder this object is a child of, if any. + const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const; + + // Get the object by id. Returns NULL if not found. + // NOTE: Use the pointer returned for read operations - do + // not modify the object values in place or you will break stuff. + LLInventoryObject* getObject(const LLUUID& id) const; + + // Get the item by id. Returns NULL if not found. + // NOTE: Use the pointer for read operations - use the + // updateItem() method to actually modify values. + LLViewerInventoryItem* getItem(const LLUUID& id) const; + + // Get the category by id. Returns NULL if not found. + // NOTE: Use the pointer for read operations - use the + // updateCategory() method to actually modify values. + LLViewerInventoryCategory* getCategory(const LLUUID& id) const; + + // Get the inventoryID or item that this item points to, else just return object_id const LLUUID& getLinkedItemID(const LLUUID& object_id) const; + LLViewerInventoryItem* getLinkedItem(const LLUUID& object_id) const; +private: + mutable LLPointer<LLViewerInventoryItem> mLastItem; // cache recent lookups - // The inventory model usage is sensitive to the initial construction of the - // model. - bool isInventoryUsable() const; + //-------------------------------------------------------------------- + // Count + //-------------------------------------------------------------------- +public: + // Return the number of items or categories + S32 getItemCount() const; + S32 getCategoryCount() const; + +/** Accessors + ** ** + *******************************************************************************/ - // - // Mutators - // +/******************************************************************************** + ** ** + ** MUTATORS + **/ - // Calling this method with an inventory item will either change - // an existing item with a matching item_id, or will add the item +public: + // Change an existing item with a matching item_id or add the item // to the current inventory. Returns the change mask generated by // the update. No notification will be sent to observers. This // method will only generate network traffic if the item had to be // reparented. - // *NOTE: In usage, you will want to perform cache accounting - // operations in LLInventoryModel::accountForUpdate() or - // LLViewerInventoryItem::updateServer() before calling this - // method. + // NOTE: In usage, you will want to perform cache accounting + // operations in LLInventoryModel::accountForUpdate() or + // LLViewerInventoryItem::updateServer() before calling this method. U32 updateItem(const LLViewerInventoryItem* item); - // Calling this method with an inventory category will either - // change an existing item with the matching id, or it will add + // Change an existing item with the matching id or add // the category. No notifcation will be sent to observers. This // method will only generate network traffic if the item had to be // reparented. - // *NOTE: In usage, you will want to perform cache accounting - // operations in LLInventoryModel::accountForUpdate() or - // LLViewerInventoryCategory::updateServer() before calling this - // method. + // NOTE: In usage, you will want to perform cache accounting + // operations in accountForUpdate() or LLViewerInventoryCategory:: + // updateServer() before calling this method. void updateCategory(const LLViewerInventoryCategory* cat); - // This method will move the specified object id to the specified - // category, update the internal structures. No cache accounting, + // Move the specified object id to the specified category and + // update the internal structures. No cache accounting, // observer notification, or server update is performed. void moveObject(const LLUUID& object_id, const LLUUID& cat_id); - // delete a particular inventory object by ID. This will purge one - // object from the internal data structures maintaining a + //-------------------------------------------------------------------- + // Delete + //-------------------------------------------------------------------- +public: + // Delete a particular inventory object by ID. Will purge one + // object from the internal data structures, maintaining a // consistent internal state. No cache accounting, observer - // notification, or server update is performed. Purges linked items. + // notification, or server update is performed. void deleteObject(const LLUUID& id); + void removeItem(const LLUUID& item_id); - // delete a particular inventory object by ID, and delete it from - // the server. Also updates linked items. + // Delete a particular inventory object by ID, and delete it from + // the server. Also updates linked items. void purgeObject(const LLUUID& id); - void updateLinkedObjectsFromPurge(const LLUUID& baseobj_id); - // This is a method which collects the descendants of the id + // Collects and purges the descendants of the id // provided. If the category is not found, no action is // taken. This method goes through the long winded process of // removing server representation of folders and items while doing // cache accounting in a fairly efficient manner. This method does // not notify observers (though maybe it should...) void purgeDescendentsOf(const LLUUID& id); +protected: + void updateLinkedObjectsFromPurge(const LLUUID& baseobj_id); + + //-------------------------------------------------------------------- + // Reorder + //-------------------------------------------------------------------- +public: + // Changes items order by insertion of the item identified by src_item_id + // before the item identified by dest_item_id. Both items must exist in items array. + // Sorting is stored after method is finished. Only src_item_id is moved before dest_item_id. + static void updateItemsOrder(LLInventoryModel::item_array_t& items, + const LLUUID& src_item_id, + const LLUUID& dest_item_id); + + // Saves current order of the passed items using inventory item sort field. + // Resets 'items' sort fields and saves them on server. + // Is used to save order for Favorites folder. + void saveItemsOrder(const LLInventoryModel::item_array_t& items); - // This method optimally removes the referenced categories and - // items from the current agent's inventory in the database. It - // performs all of the during deletion. The local representation - // is not removed. - void deleteFromServer(LLDynamicArray<LLUUID>& category_ids, - LLDynamicArray<LLUUID>& item_ids); - - // Add/remove an observer. If the observer is destroyed, be sure - // to remove it. - void addObserver(LLInventoryObserver* observer); - void removeObserver(LLInventoryObserver* observer); - BOOL containsObserver(LLInventoryObserver* observer) const; - - // - // Misc Methods - // - - // findCategoryUUIDForType() returns the uuid of the category that - // specifies 'type' as what it defaults to containing. The - // category is not necessarily only for that type. *NOTE: If create_folder is true, this - // will create a new inventory category on the fly if one does not exist. *NOTE: if find_in_library is - // true it will search in the user's library folder instead of "My Inventory" - // SDK: Added flag to specify whether the folder should be created if not found. This fixes the horrible - // multiple trash can bug. - const LLUUID findCategoryUUIDForType(LLFolderType::EType preferred_type, bool create_folder = true, bool find_in_library = false); - - // This gets called by the idle loop. It only updates if new - // state is detected. Call notifyObservers() manually to update - // regardless of whether state change has been indicated. - void idleNotifyObservers(); - - // Call this method to explicitly update everyone on a new state. - // The optional argument 'service_name' is used by Agent Inventory Service [DEV-20328] - void notifyObservers(const std::string service_name=""); - - // This allows outsiders to tell the inventory if something has - // been changed 'under the hood', but outside the control of the - // inventory. For example, if we grant someone modify permissions, - // then that changes the data structures for LLAvatarTracker, but - // potentially affects inventory observers. This API makes sure - // that the next notify will include that notification. - void addChangedMask(U32 mask, const LLUUID& referent); - - const changed_items_t& getChangedIDs() const { return mChangedItemIDs; } - - // This method to prepares a set of mock inventory which provides - // minimal functionality before the actual arrival of inventory. - //void mock(const LLUUID& root_id); - - // Make sure we have the descendents in the structure. Returns true - // if a fetch was performed. - bool fetchDescendentsOf(const LLUUID& folder_id); - - // call this method to request the inventory. - //void requestFromServer(const LLUUID& agent_id); - - // call this method on logout to save a terse representation - void cache(const LLUUID& parent_folder_id, const LLUUID& agent_id); - - // Generates a string containing the path to the item specified by - // item_id. - void appendPath(const LLUUID& id, std::string& path) const; - - // message handling functionality - static void registerCallbacks(LLMessageSystem* msg); + // Rearranges Landmarks inside Favorites folder. + // Moves source landmark before target one. + void rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id); - // Convenience function to create a new category. You could call - // updateCatgory() with a newly generated UUID category, but this - // version will take care of details like what the name should be - // based on preferred type. Returns the UUID of the new - // category. If you want to use the default name based on type, - // pass in a NULL to the 'name parameter. + //-------------------------------------------------------------------- + // Creation + //-------------------------------------------------------------------- +public: + // Returns the UUID of the new category. If you want to use the default + // name based on type, pass in a NULL to the 'name' parameter. LLUUID createNewCategory(const LLUUID& parent_id, LLFolderType::EType preferred_type, const std::string& name); +protected: + // Internal methods that add inventory and make sure that all of + // the internal data structures are consistent. These methods + // should be passed pointers of newly created objects, and the + // instance will take over the memory management from there. + void addCategory(LLViewerInventoryCategory* category); + void addItem(LLViewerInventoryItem* item); + +/** Mutators + ** ** + *******************************************************************************/ - // methods to load up inventory skeleton & meat. These are used - // during authentication. return true if everything parsed. - bool loadSkeleton(const LLSD& options, const LLUUID& owner_id); - bool loadMeat(const LLSD& options, const LLUUID& owner_id); - - // This is a brute force method to rebuild the entire parent-child - // relations. - void buildParentChildMap(); - - // - // Category accounting. - // +/******************************************************************************** + ** ** + ** CATEGORY ACCOUNTING + **/ - // This structure represents the number of items added or removed - // from a category. +public: + // Represents the number of items added or removed from a category. struct LLCategoryUpdate { LLCategoryUpdate() : mDescendentDelta(0) {} @@ -333,8 +388,7 @@ public: }; typedef std::vector<LLCategoryUpdate> update_list_t; - // This structure eixts to make it easier to account for deltas in - // a map. + // This exists to make it easier to account for deltas in a map. struct LLInitializedS32 { LLInitializedS32() : mValue(0) {} @@ -345,102 +399,89 @@ public: }; typedef std::map<LLUUID, LLInitializedS32> update_map_t; - // Call these methods when there are category updates, but call - // them *before* the actual update so the method can do descendent - // accounting correctly. + // Call when there are category updates. Call them *before* the + // actual update so the method can do descendent accounting correctly. void accountForUpdate(const LLCategoryUpdate& update) const; void accountForUpdate(const update_list_t& updates); void accountForUpdate(const update_map_t& updates); - // Return child status of category children. yes/no/maybe + // Return (yes/no/maybe) child status of category children. EHasChildren categoryHasChildren(const LLUUID& cat_id) const; - // returns true iff category version is known and theoretical + // Returns true iff category version is known and theoretical // descendents == actual descendents. bool isCategoryComplete(const LLUUID& cat_id) const; - // callbacks - // Trigger a notification and empty the folder type (FT_TRASH or FT_LOST_AND_FOUND) if confirmed - void emptyFolderType(const std::string notification, LLFolderType::EType folder_type); - bool callbackEmptyFolderType(const LLSD& notification, const LLSD& response, LLFolderType::EType preferred_type); - - // Utility Functions - void removeItem(const LLUUID& item_id); - - // Data about the agent's root folder and root library folder - // are stored here, rather than in LLAgent where it used to be, because - // gInventory is a singleton and represents the agent's inventory. - // The "library" is actually the inventory of a special agent, - // usually Alexandria Linden. - const LLUUID &getRootFolderID() const; - const LLUUID &getLibraryOwnerID() const; - const LLUUID &getLibraryRootFolderID() const; - - // These are set during login with data from the server - void setRootFolderID(const LLUUID& id); - void setLibraryOwnerID(const LLUUID& id); - void setLibraryRootFolderID(const LLUUID& id); +/** Category Accounting + ** ** + *******************************************************************************/ +/******************************************************************************** + ** ** + ** NOTIFICATIONS + **/ - /** - * Changes items order by insertion of the item identified by src_item_id - * BEFORE the item identified by dest_item_id. Both items must exist in items array. - * - * Sorting is stored after method is finished. Only src_item_id is moved before dest_item_id. - * - * @param[in, out] items - vector with items to be updated. It should be sorted in a right way - * before calling this method. - * @param src_item_id - LLUUID of inventory item to be moved in new position - * @param dest_item_id - LLUUID of inventory item before which source item should be placed. - */ - static void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id); - - /** - * Saves current order of the passed items using inventory item sort field. - * - * It reset items' sort fields and saves them on server. - * Is used to save order for Favorites folder. - * - * @param[in] items vector of items in order to be saved. - */ - void saveItemsOrder(const LLInventoryModel::item_array_t& items); +public: + // Called by the idle loop. Only updates if new state is detected. Call + // notifyObservers() manually to update regardless of whether state change + // has been indicated. + void idleNotifyObservers(); - /** - * Rearranges Landmarks inside Favorites folder. - * Moves source landmark before target one. - * - * @param source_item_id - LLUUID of the source item to be moved into new position - * @param target_item_id - LLUUID of the target item before which source item should be placed. - */ - void rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id); + // Call to explicitly update everyone on a new state. The optional argument + // 'service_name' is used by Agent Inventory Service [DEV-20328] + void notifyObservers(const std::string service_name=""); + // Allows outsiders to tell the inventory if something has + // been changed 'under the hood', but outside the control of the + // inventory. The next notify will include that notification. + void addChangedMask(U32 mask, const LLUUID& referent); + const changed_items_t& getChangedIDs() const { return mChangedItemIDs; } protected: + // Updates all linked items pointing to this id. + void addChangedMaskForLinks(const LLUUID& object_id, U32 mask); +private: + // Flag set when notifyObservers is being called, to look for bugs + // where it's called recursively. + BOOL mIsNotifyObservers; + // Variables used to track what has changed since the last notify. + U32 mModifyMask; + changed_items_t mChangedItemIDs; + + //-------------------------------------------------------------------- + // Observers + //-------------------------------------------------------------------- +public: + // If the observer is destroyed, be sure to remove it. + void addObserver(LLInventoryObserver* observer); + void removeObserver(LLInventoryObserver* observer); + BOOL containsObserver(LLInventoryObserver* observer) const; +private: + typedef std::set<LLInventoryObserver*> observer_list_t; + observer_list_t mObservers; + +/** Notifications + ** ** + *******************************************************************************/ - // Internal methods which add inventory and make sure that all of - // the internal data structures are consistent. These methods - // should be passed pointers of newly created objects, and the - // instance will take over the memory management from there. - void addCategory(LLViewerInventoryCategory* category); - void addItem(LLViewerInventoryItem* item); - - // ! DEPRECRATE ! Remove this and add it into findCategoryUUIDForType, - // since that's the only function that uses this. It's too confusing - // having both methods. - // - // Internal method which looks for a category with the specified - // preferred type. Returns LLUUID::null if not found - const LLUUID &findCatUUID(LLFolderType::EType preferred_type, bool find_in_library = false) const; - // Empty the entire contents - void empty(); +/******************************************************************************** + ** ** + ** MISCELLANEOUS + **/ - // Given the current state of the inventory items, figure out the - // clone information. *FIX: This is sub-optimal, since we can - // insert this information snurgically, but this makes sure the - // implementation works before we worry about optimization. - //void recalculateCloneInformation(); + //-------------------------------------------------------------------- + // Callbacks + //-------------------------------------------------------------------- +public: + // Trigger a notification and empty the folder type (FT_TRASH or FT_LOST_AND_FOUND) if confirmed + void emptyFolderType(const std::string notification, LLFolderType::EType folder_type); + bool callbackEmptyFolderType(const LLSD& notification, const LLSD& response, LLFolderType::EType preferred_type); + static void registerCallbacks(LLMessageSystem* msg); - // file import/export. + //-------------------------------------------------------------------- + // File I/O + //-------------------------------------------------------------------- +protected: static bool loadFromFile(const std::string& filename, cat_array_t& categories, item_array_t& items, @@ -449,86 +490,46 @@ protected: const cat_array_t& categories, const item_array_t& items); - // message handling functionality - //static void processUseCachedInventory(LLMessageSystem* msg, void**); + //-------------------------------------------------------------------- + // Message handling functionality + //-------------------------------------------------------------------- +public: static void processUpdateCreateInventoryItem(LLMessageSystem* msg, void**); static void processRemoveInventoryItem(LLMessageSystem* msg, void**); static void processUpdateInventoryFolder(LLMessageSystem* msg, void**); static void processRemoveInventoryFolder(LLMessageSystem* msg, void**); - //static void processExchangeCallingcard(LLMessageSystem* msg, void**); - //static void processAddCallingcard(LLMessageSystem* msg, void**); - //static void processDeclineCallingcard(LLMessageSystem* msg, void**); static void processSaveAssetIntoInventory(LLMessageSystem* msg, void**); static void processBulkUpdateInventory(LLMessageSystem* msg, void**); static void processInventoryDescendents(LLMessageSystem* msg, void**); static void processMoveInventoryItem(LLMessageSystem* msg, void**); static void processFetchInventoryReply(LLMessageSystem* msg, void**); - +protected: bool messageUpdateCore(LLMessageSystem* msg, bool do_accounting); - // Updates all linked items pointing to this id. - void addChangedMaskForLinks(const LLUUID& object_id, U32 mask); - + //-------------------------------------------------------------------- + // Locks + //-------------------------------------------------------------------- +public: + void lockDirectDescendentArrays(const LLUUID& cat_id, + cat_array_t*& categories, + item_array_t*& items); + void unlockDirectDescendentArrays(const LLUUID& cat_id); protected: cat_array_t* getUnlockedCatArray(const LLUUID& id); item_array_t* getUnlockedItemArray(const LLUUID& id); - private: - // Variables used to track what has changed since the last notify. - U32 mModifyMask; - changed_items_t mChangedItemIDs; - std::map<LLUUID, bool> mCategoryLock; std::map<LLUUID, bool> mItemLock; - // cache recent lookups - mutable LLPointer<LLViewerInventoryItem> mLastItem; - - // This last set of indices is used to map parents to children. - typedef std::map<LLUUID, cat_array_t*> parent_cat_map_t; - typedef std::map<LLUUID, item_array_t*> parent_item_map_t; - parent_cat_map_t mParentChildCategoryTree; - parent_item_map_t mParentChildItemTree; - - typedef std::set<LLInventoryObserver*> observer_list_t; - observer_list_t mObservers; - - // Agent inventory folder information. - LLUUID mRootFolderID; - LLUUID mLibraryRootFolderID; - LLUUID mLibraryOwnerID; - - // Expected inventory cache version - const static S32 sCurrentInvCacheVersion; - - // This flag is used to handle an invalid inventory state. - bool mIsAgentInvUsable; - -private: - // Information for tracking the actual inventory. We index this - // information in a lot of different ways so we can access - // the inventory using several different identifiers. - // mInventory member data is the 'master' list of inventory, and - // mCategoryMap and mItemMap store uuid->object mappings. - typedef std::map<LLUUID, LLPointer<LLViewerInventoryCategory> > cat_map_t; - typedef std::map<LLUUID, LLPointer<LLViewerInventoryItem> > item_map_t; - //inv_map_t mInventory; - cat_map_t mCategoryMap; - item_map_t mItemMap; - - // Flag set when notifyObservers is being called, to look for bugs - // where it's called recursively. - BOOL mIsNotifyObservers; + //-------------------------------------------------------------------- + // Debugging + //-------------------------------------------------------------------- public: - // *NOTE: DEBUG functionality void dumpInventory() const; - //////////////////////////////////////////////////////////////////////////////// - // Login status -public: - static BOOL getIsFirstTimeInViewer2(); -private: - static BOOL sFirstTimeInViewer2; +/** Miscellaneous + ** ** + *******************************************************************************/ }; // a special inventory model for the agent diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index cfbc2c3e05..0ff6ab2644 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -46,26 +46,11 @@ const F32 MAX_TIME_FOR_SINGLE_FETCH = 10.f; const S32 MAX_FETCH_RETRIES = 10; -// RN: for some reason, using std::queue in the header file confuses the compiler which thinks it's an xmlrpc_queue -static std::deque<LLUUID> sFetchQueue; -bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) -{ - for (std::deque<LLUUID>::iterator it = sFetchQueue.begin(); - it != sFetchQueue.end(); ++it) - { - const LLUUID& fetch_id = *it; - if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) - return false; - } - return true; -} - - LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() : mBackgroundFetchActive(FALSE), mAllFoldersFetched(FALSE), - mInventoryFetchStarted(FALSE), - mLibraryFetchStarted(FALSE), + mRecursiveInventoryFetchStarted(FALSE), + mRecursiveLibraryFetchStarted(FALSE), mNumFetchRetries(0), mMinTimeBetweenFetches(0.3f), mMaxTimeBetweenFetches(10.f), @@ -80,12 +65,12 @@ LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch() bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() { - return sFetchQueue.empty() && mBulkFetchCount<=0; + return mFetchQueue.empty() && mBulkFetchCount<=0; } bool LLInventoryModelBackgroundFetch::libraryFetchStarted() { - return mLibraryFetchStarted; + return mRecursiveLibraryFetchStarted; } bool LLInventoryModelBackgroundFetch::libraryFetchCompleted() @@ -100,7 +85,7 @@ bool LLInventoryModelBackgroundFetch::libraryFetchInProgress() bool LLInventoryModelBackgroundFetch::inventoryFetchStarted() { - return mInventoryFetchStarted; + return mRecursiveInventoryFetchStarted; } bool LLInventoryModelBackgroundFetch::inventoryFetchCompleted() @@ -123,41 +108,41 @@ BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() return mBackgroundFetchActive; } -void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id) +void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive) { if (!mAllFoldersFetched) { mBackgroundFetchActive = TRUE; if (cat_id.isNull()) { - if (!mInventoryFetchStarted) + if (!mRecursiveInventoryFetchStarted) { - mInventoryFetchStarted = TRUE; - sFetchQueue.push_back(gInventory.getRootFolderID()); + mRecursiveInventoryFetchStarted |= recursive; + mFetchQueue.push_back(FetchQueueInfo(gInventory.getRootFolderID(), recursive)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } - if (!mLibraryFetchStarted) + if (!mRecursiveLibraryFetchStarted) { - mLibraryFetchStarted = TRUE; - sFetchQueue.push_back(gInventory.getLibraryRootFolderID()); + mRecursiveLibraryFetchStarted |= recursive; + mFetchQueue.push_back(FetchQueueInfo(gInventory.getLibraryRootFolderID(), recursive)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } } else { // specific folder requests go to front of queue - if (sFetchQueue.empty() || sFetchQueue.front() != cat_id) + if (mFetchQueue.empty() || mFetchQueue.front().mCatUUID != cat_id) { - sFetchQueue.push_front(cat_id); + mFetchQueue.push_front(FetchQueueInfo(cat_id, recursive)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } if (cat_id == gInventory.getLibraryRootFolderID()) { - mLibraryFetchStarted = TRUE; + mRecursiveLibraryFetchStarted |= recursive; } if (cat_id == gInventory.getRootFolderID()) { - mInventoryFetchStarted = TRUE; + mRecursiveInventoryFetchStarted |= recursive; } } } @@ -166,7 +151,7 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id) void LLInventoryModelBackgroundFetch::findLostItems() { mBackgroundFetchActive = TRUE; - sFetchQueue.push_back(LLUUID::null); + mFetchQueue.push_back(FetchQueueInfo(LLUUID::null, TRUE)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } @@ -183,8 +168,8 @@ void LLInventoryModelBackgroundFetch::stopBackgroundFetch() void LLInventoryModelBackgroundFetch::setAllFoldersFetched() { - if (mInventoryFetchStarted && - mLibraryFetchStarted) + if (mRecursiveInventoryFetchStarted && + mRecursiveLibraryFetchStarted) { mAllFoldersFetched = TRUE; } @@ -210,7 +195,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() //DEPRECATED OLD CODE FOLLOWS. // no more categories to fetch, stop fetch process - if (sFetchQueue.empty()) + if (mFetchQueue.empty()) { llinfos << "Inventory fetch completed" << llendl; @@ -232,7 +217,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() while(1) { - if (sFetchQueue.empty()) + if (mFetchQueue.empty()) { break; } @@ -243,12 +228,13 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() break; } - LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); + const FetchQueueInfo info = mFetchQueue.front(); + LLViewerInventoryCategory* cat = gInventory.getCategory(info.mCatUUID); // category has been deleted, remove from queue. if (!cat) { - sFetchQueue.pop_front(); + mFetchQueue.pop_front(); continue; } @@ -271,10 +257,10 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } } // do I have all my children? - else if (gInventory.isCategoryComplete(sFetchQueue.front())) + else if (gInventory.isCategoryComplete(info.mCatUUID)) { // finished with this category, remove from queue - sFetchQueue.pop_front(); + mFetchQueue.pop_front(); // add all children to queue LLInventoryModel::cat_array_t* categories; @@ -284,7 +270,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() it != categories->end(); ++it) { - sFetchQueue.push_back((*it)->getUUID()); + mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive)); } // we received a response in less than the fast time @@ -303,13 +289,12 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() { // received first packet, but our num descendants does not match db's num descendants // so try again later - LLUUID fetch_id = sFetchQueue.front(); - sFetchQueue.pop_front(); + mFetchQueue.pop_front(); if (mNumFetchRetries++ < MAX_FETCH_RETRIES) { // push on back of queue - sFetchQueue.push_back(fetch_id); + mFetchQueue.push_back(info); } mTimelyFetchPending = FALSE; mFetchTimer.reset(); @@ -334,20 +319,25 @@ void LLInventoryModelBackgroundFetch::incrBulkFetch(S16 fetching) class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder { - public: - LLInventoryModelFetchDescendentsResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; - //LLInventoryModelFetchDescendentsResponder() {}; - void result(const LLSD& content); - void error(U32 status, const std::string& reason); - public: - typedef std::vector<LLViewerInventoryCategory*> folder_ref_t; - protected: - LLSD mRequestSD; +public: + LLInventoryModelFetchDescendentsResponder(const LLSD& request_sd, uuid_vec_t recursive_cats) : + mRequestSD(request_sd), + mRecursiveCatUUIDs(recursive_cats) + {}; + //LLInventoryModelFetchDescendentsResponder() {}; + void result(const LLSD& content); + void error(U32 status, const std::string& reason); +protected: + BOOL getIsRecursive(const LLUUID& cat_id) const; +private: + LLSD mRequestSD; + uuid_vec_t mRecursiveCatUUIDs; // Hack for storing away which cat fetches are recursive. }; //If we get back a normal response, handle it here -void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) +void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) { + LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance(); if (content.has("folders")) { @@ -412,11 +402,12 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) { LLSD category = *category_it; tcategory->fromLLSD(category); - - if (LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted() || - LLInventoryModelBackgroundFetch::instance().libraryFetchStarted()) + + const BOOL recursive = getIsRecursive(tcategory->getUUID()); + + if (recursive) { - sFetchQueue.push_back(tcategory->getUUID()); + fetcher->mFetchQueue.push_back(LLInventoryModelBackgroundFetch::FetchQueueInfo(tcategory->getUUID(), recursive)); } else if ( !gInventory.isCategoryComplete(tcategory->getUUID()) ) { @@ -461,12 +452,12 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) } } - LLInventoryModelBackgroundFetch::instance().incrBulkFetch(-1); + fetcher->incrBulkFetch(-1); - if (LLInventoryModelBackgroundFetch::instance().isBulkFetchProcessingComplete()) + if (fetcher->isBulkFetchProcessingComplete()) { llinfos << "Inventory fetch completed" << llendl; - LLInventoryModelBackgroundFetch::instance().setAllFoldersFetched(); + fetcher->setAllFoldersFetched(); } gInventory.notifyObservers("fetchDescendents"); @@ -475,12 +466,14 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) //If we get back an error (not found, etc...), handle it here void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::string& reason) { + LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance(); + llinfos << "LLInventoryModelFetchDescendentsResponder::error " << status << ": " << reason << llendl; - LLInventoryModelBackgroundFetch::instance().incrBulkFetch(-1); + fetcher->incrBulkFetch(-1); - if (status==499) //timed out. Let's be awesome! + if (status==499) // Timed out. { for(LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray(); folder_it != mRequestSD["folders"].endArray(); @@ -488,24 +481,30 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str { LLSD folder_sd = *folder_it; LLUUID folder_id = folder_sd["folder_id"]; - sFetchQueue.push_front(folder_id); + const BOOL recursive = getIsRecursive(folder_id); + fetcher->mFetchQueue.push_front(LLInventoryModelBackgroundFetch::FetchQueueInfo(folder_id, recursive)); } } else { - if (LLInventoryModelBackgroundFetch::instance().isBulkFetchProcessingComplete()) + if (fetcher->isBulkFetchProcessingComplete()) { - LLInventoryModelBackgroundFetch::instance().setAllFoldersFetched(); + fetcher->setAllFoldersFetched(); } } gInventory.notifyObservers("fetchDescendents"); } +BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat_id) const +{ + return (std::find(mRecursiveCatUUIDs.begin(),mRecursiveCatUUIDs.end(), cat_id) != mRecursiveCatUUIDs.end()); +} + //static Bundle up a bunch of requests to send all at once. void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) { //Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped. - //If there are items in sFetchQueue, we want to check the time since the last bulkFetch was + //If there are items in mFetchQueue, we want to check the time since the last bulkFetch was //sent. If it exceeds our retry time, go ahead and fire off another batch. //Stopbackgroundfetch will be run from the Responder instead of here. @@ -528,11 +527,16 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER) & 0x1; + uuid_vec_t recursive_cats; + LLSD body; LLSD body_lib; - while (!(sFetchQueue.empty()) && (folder_count < max_batch_size)) + + while (!(mFetchQueue.empty()) && (folder_count < max_batch_size)) { - if (sFetchQueue.front().isNull()) //DEV-17797 + const FetchQueueInfo& fetch_info = mFetchQueue.front(); + const LLUUID &cat_id = fetch_info.mCatUUID; + if (cat_id.isNull()) //DEV-17797 { LLSD folder_sd; folder_sd["folder_id"] = LLUUID::null.asString(); @@ -545,7 +549,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) } else { - LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); + const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); if (cat) { @@ -564,9 +568,9 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) body["folders"].append(folder_sd); folder_count++; } - if (mInventoryFetchStarted || mLibraryFetchStarted) - { //Already have this folder but append child folders to list. - // add all children to queue + // May already have this folder, but append child folders to list. + if (fetch_info.mRecursive) + { LLInventoryModel::cat_array_t* categories; LLInventoryModel::item_array_t* items; gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); @@ -574,12 +578,15 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) it != categories->end(); ++it) { - sFetchQueue.push_back((*it)->getUUID()); + mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive)); } } } } - sFetchQueue.pop_front(); + if (fetch_info.mRecursive) + recursive_cats.push_back(cat_id); + + mFetchQueue.pop_front(); } if (folder_count > 0) @@ -587,12 +594,15 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) mBulkFetchCount++; if (body["folders"].size()) { - LLHTTPClient::post(url, body, new LLInventoryModelFetchDescendentsResponder(body),300.0); + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body, recursive_cats); + LLHTTPClient::post(url, body, fetcher, 300.0); } if (body_lib["folders"].size()) { std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents"); - LLHTTPClient::post(url_lib, body_lib, new LLInventoryModelFetchDescendentsResponder(body_lib),300.0); + + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body_lib, recursive_cats); + LLHTTPClient::post(url_lib, body_lib, fetcher, 300.0); } mFetchTimer.reset(); } @@ -601,3 +611,17 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) setAllFoldersFetched(); } } + +bool LLInventoryModelBackgroundFetch::fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const +{ + for (fetch_queue_t::const_iterator it = mFetchQueue.begin(); + it != mFetchQueue.end(); ++it) + { + const LLUUID& fetch_id = (*it).mCatUUID; + if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) + return false; + } + return true; +} + + diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index 94606fae23..c1e37eda8f 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -68,13 +68,15 @@ class LLInventoryCollectFunctor; class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackgroundFetch> { + friend class LLInventoryModelFetchDescendentsResponder; + public: LLInventoryModelBackgroundFetch(); ~LLInventoryModelBackgroundFetch(); // Start and stop background breadth-first fetching of inventory contents. // This gets triggered when performing a filter-search - void start(const LLUUID& cat_id = LLUUID::null); + void start(const LLUUID& cat_id = LLUUID::null, BOOL recursive = TRUE); BOOL backgroundFetchActive(); bool isEverythingFetched(); void incrBulkFetch(S16 fetching); @@ -98,9 +100,20 @@ public: static void backgroundFetchCB(void*); // background fetch idle function void backgroundFetch(); + struct FetchQueueInfo + { + FetchQueueInfo(const LLUUID& id, BOOL recursive) : + mCatUUID(id), mRecursive(recursive) + { + } + LLUUID mCatUUID; + BOOL mRecursive; + }; +protected: + bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const; private: - BOOL mInventoryFetchStarted; - BOOL mLibraryFetchStarted; + BOOL mRecursiveInventoryFetchStarted; + BOOL mRecursiveLibraryFetchStarted; BOOL mAllFoldersFetched; // completing the fetch once per session should be sufficient @@ -113,6 +126,8 @@ private: F32 mMinTimeBetweenFetches; F32 mMaxTimeBetweenFetches; + typedef std::deque<FetchQueueInfo> fetch_queue_t; + fetch_queue_t mFetchQueue; }; #endif // LL_LLINVENTORYMODELBACKGROUNDFETCH_H diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index c24d2ee0ea..8557548887 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -493,7 +493,7 @@ void LLInventoryExistenceObserver::changed(U32 mask) } } -void LLInventoryMoveFromWorldObserver::changed(U32 mask) +void LLInventoryAddItemByAssetObserver::changed(U32 mask) { if(!(mask & LLInventoryObserver::ADD)) { @@ -535,7 +535,7 @@ void LLInventoryMoveFromWorldObserver::changed(U32 mask) } } -void LLInventoryMoveFromWorldObserver::watchAsset(const LLUUID& asset_id) +void LLInventoryAddItemByAssetObserver::watchAsset(const LLUUID& asset_id) { if(asset_id.notNull()) { @@ -551,7 +551,7 @@ void LLInventoryMoveFromWorldObserver::watchAsset(const LLUUID& asset_id) } } -bool LLInventoryMoveFromWorldObserver::isAssetWatched( const LLUUID& asset_id ) +bool LLInventoryAddItemByAssetObserver::isAssetWatched( const LLUUID& asset_id ) { return std::find(mWatchedAssets.begin(), mWatchedAssets.end(), asset_id) != mWatchedAssets.end(); } diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index 036e6ca40d..6d5a86a6fc 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -180,10 +180,10 @@ protected: // something useful. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLInventoryMoveFromWorldObserver : public LLInventoryObserver +class LLInventoryAddItemByAssetObserver : public LLInventoryObserver { public: - LLInventoryMoveFromWorldObserver() : mIsDirty(false) {} + LLInventoryAddItemByAssetObserver() : mIsDirty(false) {} virtual void changed(U32 mask); void watchAsset(const LLUUID& asset_id); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 15c872a7c4..4766c1c227 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -248,6 +248,11 @@ void LLInventoryPanel::setHoursAgo(U32 hours) getFilter()->setHoursAgo(hours); } +void LLInventoryPanel::setIncludeLinks(BOOL include_links) +{ + getFilter()->setIncludeLinks(include_links); +} + void LLInventoryPanel::setShowFolderState(LLInventoryFilter::EFolderShow show) { getFilter()->setShowFolderState(show); @@ -775,8 +780,7 @@ void LLInventoryPanel::doCreate(const LLSD& userdata) bool LLInventoryPanel::beginIMSession() { - std::set<LLUUID> selected_items; - mFolderRoot->getSelectionList(selected_items); + std::set<LLUUID> selected_items = mFolderRoot->getSelectionList(); std::string name; static int session_num = 1; @@ -873,8 +877,7 @@ bool LLInventoryPanel::beginIMSession() bool LLInventoryPanel::attachObject(const LLSD& userdata) { - std::set<LLUUID> selected_items; - mFolderRoot->getSelectionList(selected_items); + std::set<LLUUID> selected_items = mFolderRoot->getSelectionList(); std::string joint_name = userdata.asString(); LLViewerJointAttachment* attachmentp = NULL; @@ -1001,3 +1004,30 @@ BOOL LLInventoryPanel::getIsHiddenFolderType(LLFolderType::EType folder_type) co { return (std::find(mHiddenFolderTypes.begin(), mHiddenFolderTypes.end(), folder_type) != mHiddenFolderTypes.end()); } + + +/************************************************************************/ +/* Recent Inventory Panel related class */ +/************************************************************************/ +class LLInventoryRecentItemsPanel; +static LLDefaultChildRegistry::Register<LLInventoryRecentItemsPanel> t_recent_inventory_panel("recent_inventory_panel"); + +static const LLRecentInventoryBridgeBuilder RECENT_ITEMS_BUILDER; +class LLInventoryRecentItemsPanel : public LLInventoryPanel +{ +public: + struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params> + {}; + +protected: + LLInventoryRecentItemsPanel (const Params&); + friend class LLUICtrlFactory; +}; + +LLInventoryRecentItemsPanel::LLInventoryRecentItemsPanel( const Params& params) +: LLInventoryPanel(params) +{ + // replace bridge builder to have necessary View bridges. + mInvFVBridgeBuilder = &RECENT_ITEMS_BUILDER; +} + diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 160a3d6f23..4373cedf66 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -141,7 +141,8 @@ public: void setSinceLogoff(BOOL sl); void setHoursAgo(U32 hours); BOOL getSinceLogoff(); - + void setIncludeLinks(BOOL include_links); + void setShowFolderState(LLInventoryFilter::EFolderShow show); LLInventoryFilter::EFolderShow getShowFolderState(); void setAllowMultiSelect(BOOL allow) { mFolderRoot->setAllowMultiSelect(allow); } diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 7336efb62a..539ca97a93 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -299,7 +299,7 @@ void LLLandmarkActions::getSLURLfromPosGlobal(const LLVector3d& global_pos, slur bool gotSimName = LLWorldMap::getInstance()->simNameFromPosGlobal(global_pos, sim_name); if (gotSimName) { - std::string slurl = LLSLURL::buildSLURLfromPosGlobal(sim_name, global_pos, escaped); + std::string slurl = LLSLURL(sim_name, global_pos).getSLURLString(); cb(slurl); return; @@ -351,7 +351,7 @@ void LLLandmarkActions::onRegionResponseSLURL(slurl_callback_t cb, bool gotSimName = LLWorldMap::getInstance()->simNameFromPosGlobal(global_pos, sim_name); if (gotSimName) { - slurl = LLSLURL::buildSLURLfromPosGlobal(sim_name, global_pos, escaped); + slurl = LLSLURL(sim_name, global_pos).getSLURLString(); } else { diff --git a/indra/newview/lllistcontextmenu.cpp b/indra/newview/lllistcontextmenu.cpp new file mode 100644 index 0000000000..50e969f6bc --- /dev/null +++ b/indra/newview/lllistcontextmenu.cpp @@ -0,0 +1,125 @@ +/** + * @file lllistcontextmenu.cpp + * @brief Base class of misc lists' context menus + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" + +#include "lllistcontextmenu.h" + +// libs +#include "llmenugl.h" // for LLContextMenu + +// newview +#include "llviewermenu.h" // for LLViewerMenuHolderGL + +LLListContextMenu::LLListContextMenu() +: mMenu(NULL) +{ +} + +LLListContextMenu::~LLListContextMenu() +{ + // do not forget delete LLContextMenu* mMenu. + // It can have registered Enable callbacks which are called from the LLMenuHolderGL::draw() + // via selected item (menu_item_call) by calling LLMenuItemCallGL::buildDrawLabel. + // we can have a crash via using callbacks of deleted instance of ContextMenu. EXT-4725 + + // menu holder deletes its menus on viewer exit, so we have no way to determine if instance + // of mMenu has already been deleted except of using LLHandle. EXT-4762. + if (!mMenuHandle.isDead()) + { + mMenu->die(); + mMenu = NULL; + } +} + +void LLListContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y) +{ + if (mMenu) + { + //preventing parent (menu holder) from deleting already "dead" context menus on exit + LLView* parent = mMenu->getParent(); + if (parent) + { + parent->removeChild(mMenu); + } + delete mMenu; + mMenu = NULL; + mUUIDs.clear(); + } + + if ( uuids.empty() ) + { + return; + } + + mUUIDs.resize(uuids.size()); + std::copy(uuids.begin(), uuids.end(), mUUIDs.begin()); + + mMenu = createMenu(); + if (!mMenu) + { + llwarns << "Context menu creation failed" << llendl; + return; + } + + mMenuHandle = mMenu->getHandle(); + mMenu->show(x, y); + LLMenuGL::showPopup(spawning_view, mMenu, x, y); +} + +void LLListContextMenu::hide() +{ + if(mMenu) + { + mMenu->hide(); + } +} + +// static +void LLListContextMenu::handleMultiple(functor_t functor, const uuid_vec_t& ids) +{ + uuid_vec_t::const_iterator it; + for (it = ids.begin(); it != ids.end(); ++it) + { + functor(*it); + } +} + +// static +LLContextMenu* LLListContextMenu::createFromFile(const std::string& filename) +{ + return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( + filename, LLContextMenu::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); +} + +// EOF diff --git a/indra/newview/lllistcontextmenu.h b/indra/newview/lllistcontextmenu.h new file mode 100644 index 0000000000..09540a833f --- /dev/null +++ b/indra/newview/lllistcontextmenu.h @@ -0,0 +1,84 @@ +/** + * @file lllistcontextmenu.h + * @brief Base class of misc lists' context menus + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLLISTCONTEXTMENU_H +#define LL_LLLISTCONTEXTMENU_H + +#include "llhandle.h" +#include "lluuid.h" +#include "llview.h" + +class LLView; +class LLContextMenu; + +/** + * Context menu for single or multiple list items. + * + * Derived classes must implement contextMenu(). + * + * Typical usage: + * <code> + * my_context_menu->show(parent_view, selected_list_items_ids, x, y); + * </code> + */ +class LLListContextMenu +{ +public: + LLListContextMenu(); + virtual ~LLListContextMenu(); + + /** + * Show the menu at specified coordinates. + * + * @param spawning_view View to spawn at. + * @param uuids An array of list items ids. + * @param x Horizontal coordinate in the spawn_view's coordinate frame. + * @param y Vertical coordinate in the spawn_view's coordinate frame. + */ + virtual void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y); + + virtual void hide(); + +protected: + typedef boost::function<void (const LLUUID& id)> functor_t; + + virtual LLContextMenu* createMenu() = 0; + + static LLContextMenu* createFromFile(const std::string& filename); + static void handleMultiple(functor_t functor, const uuid_vec_t& ids); + + uuid_vec_t mUUIDs; + LLContextMenu* mMenu; + LLHandle<LLView> mMenuHandle; +}; + +#endif // LL_LLLISTCONTEXTMENU_H diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 7abb4f4f16..53a11eff04 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -683,9 +683,8 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data) value["item_type"] = TELEPORT_HISTORY; value["global_pos"] = result->mGlobalPos.getValue(); std::string region_name = result->mTitle.substr(0, result->mTitle.find(',')); - //TODO*: add slurl to teleportitem or parse region name from title - value["tooltip"] = LLSLURL::buildSLURLfromPosGlobal(region_name, - result->mGlobalPos, false); + //TODO*: add Surl to teleportitem or parse region name from title + value["tooltip"] = LLSLURL(region_name, result->mGlobalPos).getSLURLString(); add(result->getTitle(), value); } result = std::find_if(result + 1, th_items.end(), boost::bind( @@ -1043,7 +1042,9 @@ void LLLocationInputCtrl::changeLocationPresentation() if(!mTextEntry->hasSelection() && text == mHumanReadableLocation) { //needs unescaped one - mTextEntry->setText(LLAgentUI::buildSLURL(false)); + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl, false); + mTextEntry->setText(slurl.getSLURLString()); mTextEntry->selectAll(); mMaturityButton->setVisible(FALSE); diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp index e3817eecc4..4e0a7594ba 100644 --- a/indra/newview/llloginhandler.cpp +++ b/indra/newview/llloginhandler.cpp @@ -35,13 +35,14 @@ #include "llloginhandler.h" // viewer includes +#include "llsecapi.h" #include "lllogininstance.h" // to check if logged in yet #include "llpanellogin.h" // save_password_to_disk() #include "llstartup.h" // getStartupState() -#include "llurlsimstring.h" +#include "llslurl.h" #include "llviewercontrol.h" // gSavedSettings #include "llviewernetwork.h" // EGridInfo -#include "llviewerwindow.h" // getWindow() +#include "llviewerwindow.h" // getWindow() // library includes #include "llmd5.h" @@ -60,109 +61,33 @@ bool LLLoginHandler::parseDirectLogin(std::string url) LLURI uri(url); parse(uri.queryMap()); - if (/*mWebLoginKey.isNull() ||*/ - mFirstName.empty() || - mLastName.empty()) - { - return false; - } - else - { - return true; - } + // NOTE: Need to add direct login as per identity evolution + return true; } - void LLLoginHandler::parse(const LLSD& queryMap) { - //mWebLoginKey = queryMap["web_login_key"].asUUID(); - mFirstName = queryMap["first_name"].asString(); - mLastName = queryMap["last_name"].asString(); - EGridInfo grid_choice = GRID_INFO_NONE; - if (queryMap["grid"].asString() == "aditi") - { - grid_choice = GRID_INFO_ADITI; - } - else if (queryMap["grid"].asString() == "agni") - { - grid_choice = GRID_INFO_AGNI; - } - else if (queryMap["grid"].asString() == "siva") - { - grid_choice = GRID_INFO_SIVA; - } - else if (queryMap["grid"].asString() == "damballah") - { - grid_choice = GRID_INFO_DAMBALLAH; - } - else if (queryMap["grid"].asString() == "durga") - { - grid_choice = GRID_INFO_DURGA; - } - else if (queryMap["grid"].asString() == "shakti") - { - grid_choice = GRID_INFO_SHAKTI; - } - else if (queryMap["grid"].asString() == "soma") - { - grid_choice = GRID_INFO_SOMA; - } - else if (queryMap["grid"].asString() == "ganga") - { - grid_choice = GRID_INFO_GANGA; - } - else if (queryMap["grid"].asString() == "vaak") - { - grid_choice = GRID_INFO_VAAK; - } - else if (queryMap["grid"].asString() == "uma") - { - grid_choice = GRID_INFO_UMA; - } - else if (queryMap["grid"].asString() == "mohini") - { - grid_choice = GRID_INFO_MOHINI; - } - else if (queryMap["grid"].asString() == "yami") - { - grid_choice = GRID_INFO_YAMI; - } - else if (queryMap["grid"].asString() == "nandi") + if (queryMap.has("grid")) { - grid_choice = GRID_INFO_NANDI; + LLGridManager::getInstance()->setGridChoice(queryMap["grid"].asString()); } - else if (queryMap["grid"].asString() == "mitra") - { - grid_choice = GRID_INFO_MITRA; - } - else if (queryMap["grid"].asString() == "radha") - { - grid_choice = GRID_INFO_RADHA; - } - else if (queryMap["grid"].asString() == "ravi") - { - grid_choice = GRID_INFO_RAVI; - } - else if (queryMap["grid"].asString() == "aruna") - { - grid_choice = GRID_INFO_ARUNA; - } - - if(grid_choice != GRID_INFO_NONE) - { - LLViewerLogin::getInstance()->setGridChoice(grid_choice); - } - + + std::string startLocation = queryMap["location"].asString(); - + if (startLocation == "specify") { - LLURLSimString::setString(queryMap["region"].asString()); + LLStartUp::setStartSLURL(LLSLURL(LLGridManager::getInstance()->getGridLoginID(), + queryMap["region"].asString())); } - else if (!startLocation.empty()) // "last" or "home" or ??? (let LLURLSimString figure it out) + else if (startLocation == "home") { - LLURLSimString::setString(startLocation); + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME)); + } + else if (startLocation == "last") + { + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST)); } } @@ -220,40 +145,65 @@ bool LLLoginHandler::handle(const LLSD& tokens, return true; } - std::string password = query_map["password"].asString(); - - if (!password.empty()) + if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page { - gSavedSettings.setBOOL("RememberPassword", TRUE); - - if (password.substr(0,3) != "$1$") - { - LLMD5 pass((unsigned char*)password.c_str()); - char md5pass[33]; /* Flawfinder: ignore */ - pass.hex_digest(md5pass); - std::string hashed_password = ll_safe_string(md5pass, 32); - LLStartUp::savePasswordToDisk(hashed_password); - } + // as the login page may change from grid to grid, as well as + // things like username/password/etc, we simply refresh the + // login page to make sure everything is set up correctly + LLPanelLogin::loadLoginPage(); + LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); } - + return true; +} - if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page - { - if (!mFirstName.empty() || !mLastName.empty()) - { - // Fill in the name, and maybe the password - LLPanelLogin::setFields(mFirstName, mLastName, password); - } - //if (mWebLoginKey.isNull()) - //{ - // LLPanelLogin::loadLoginPage(); - //} - //else - //{ - // LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); - //} - LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); - } - return true; + +// Initialize the credentials +// If the passed in URL contains login info, parse +// that into a credential and web login key. Otherwise +// check the command line. If the command line +// does not contain any login creds, load the last saved +// ones from the protected credential store. +// This always returns with a credential structure set in the +// login handler +LLPointer<LLCredential> LLLoginHandler::initializeLoginInfo() +{ + LLPointer<LLCredential> result = NULL; + // so try to load it from the UserLoginInfo + result = loadSavedUserLoginInfo(); + if (result.isNull()) + { + result = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); + } + + return result; +} + + +LLPointer<LLCredential> LLLoginHandler::loadSavedUserLoginInfo() +{ + // load the saved user login info into a LLCredential. + // perhaps this should be moved. + LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); + if (cmd_line_login.size() == 3) + { + + LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str()); + char md5pass[33]; /* Flawfinder: ignore */ + pass.hex_digest(md5pass); + LLSD identifier = LLSD::emptyMap(); + identifier["type"] = "agent"; + identifier["first_name"] = cmd_line_login[0]; + identifier["last_name"] = cmd_line_login[1]; + + LLSD authenticator = LLSD::emptyMap(); + authenticator["type"] = "hash"; + authenticator["algorithm"] = "md5"; + authenticator["secret"] = md5pass; + // yuck, we'll fix this with mani's changes. + gSavedSettings.setBOOL("AutoLogin", TRUE); + return gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), + identifier, authenticator); + } + return NULL; } diff --git a/indra/newview/llloginhandler.h b/indra/newview/llloginhandler.h index ac4648761b..c15b998c91 100644 --- a/indra/newview/llloginhandler.h +++ b/indra/newview/llloginhandler.h @@ -34,6 +34,7 @@ #define LLLOGINHANDLER_H #include "llcommandhandler.h" +#include "llsecapi.h" class LLLoginHandler : public LLCommandHandler { @@ -46,19 +47,15 @@ class LLLoginHandler : public LLCommandHandler // secondlife:///app/login?first=Bob&last=Dobbs bool parseDirectLogin(std::string url); - std::string getFirstName() const { return mFirstName; } - std::string getLastName() const { return mLastName; } - // Web-based login unsupported //LLUUID getWebLoginKey() const { return mWebLoginKey; } + LLPointer<LLCredential> loadSavedUserLoginInfo(); + LLPointer<LLCredential> initializeLoginInfo(); + private: void parse(const LLSD& queryMap); -private: - std::string mFirstName; - std::string mLastName; - //LLUUID mWebLoginKey; }; extern LLLoginHandler gLoginHandler; diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 454fd29fdc..71604291e1 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -48,13 +48,16 @@ // newview #include "llviewernetwork.h" #include "llviewercontrol.h" -#include "llurlsimstring.h" +#include "llslurl.h" +#include "llstartup.h" #include "llfloaterreg.h" #include "llnotifications.h" #include "llwindow.h" #if LL_LINUX || LL_SOLARIS #include "lltrans.h" #endif +#include "llsecapi.h" +#include "llstartup.h" static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback"; static const char * const TOS_LISTENER_NAME = "lllogininstance_tos"; @@ -83,14 +86,14 @@ LLLoginInstance::~LLLoginInstance() { } -void LLLoginInstance::connect(const LLSD& credentials) +void LLLoginInstance::connect(LLPointer<LLCredential> credentials) { std::vector<std::string> uris; - LLViewerLogin::getInstance()->getLoginURIs(uris); + LLGridManager::getInstance()->getLoginURIs(uris); connect(uris.front(), credentials); } -void LLLoginInstance::connect(const std::string& uri, const LLSD& credentials) +void LLLoginInstance::connect(const std::string& uri, LLPointer<LLCredential> credentials) { mAttemptComplete = false; // Reset attempt complete at this point! constructAuthParams(credentials); @@ -102,7 +105,7 @@ void LLLoginInstance::reconnect() // Sort of like connect, only using the pre-existing // request params. std::vector<std::string> uris; - LLViewerLogin::getInstance()->getLoginURIs(uris); + LLGridManager::getInstance()->getLoginURIs(uris); mLoginModule->connect(uris.front(), mRequestData); } @@ -118,7 +121,7 @@ LLSD LLLoginInstance::getResponse() return mResponseData; } -void LLLoginInstance::constructAuthParams(const LLSD& credentials) +void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credential) { // Set up auth request options. //#define LL_MINIMIAL_REQUESTED_OPTIONS @@ -145,8 +148,11 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials) requested_options.append("adult_compliant"); //requested_options.append("inventory-targets"); requested_options.append("buddy-list"); + requested_options.append("newuser-config"); requested_options.append("ui-config"); #endif + requested_options.append("map-server-url"); + requested_options.append("voice-config"); requested_options.append("tutorial_setting"); requested_options.append("login-flags"); requested_options.append("global-textures"); @@ -155,20 +161,18 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials) gSavedSettings.setBOOL("UseDebugMenus", TRUE); requested_options.append("god-connect"); } + + // (re)initialize the request params with creds. + LLSD request_params = user_credential->getLoginParams(); char hashed_mac_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ LLMD5 hashed_mac; - hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES ); + unsigned char MACAddress[MAC_ADDRESS_BYTES]; + LLUUID::getNodeID(MACAddress); + hashed_mac.update( MACAddress, MAC_ADDRESS_BYTES ); hashed_mac.finalize(); hashed_mac.hex_digest(hashed_mac_string); - - // prepend "$1$" to the password to indicate its the md5'd version. - std::string dpasswd("$1$"); - dpasswd.append(credentials["passwd"].asString()); - - // (re)initialize the request params with creds. - LLSD request_params(credentials); - request_params["passwd"] = dpasswd; + request_params["start"] = construct_start_string(); request_params["skipoptional"] = mSkipOptionalUpdate; request_params["agree_to_tos"] = false; // Always false here. Set true in @@ -247,6 +251,15 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) LLSD data(LLSD::emptyMap()); data["message"] = message_response; data["reply_pump"] = TOS_REPLY_PUMP; + if(response.has("error_code")) + { + data["error_code"] = response["error_code"]; + } + if(response.has("certificate")) + { + data["certificate"] = response["certificate"]; + } + LLFloaterReg::showInstance("message_critical", data); LLEventPumps::instance().obtain(TOS_REPLY_PUMP) .listen(TOS_LISTENER_NAME, @@ -452,20 +465,31 @@ bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD& std::string construct_start_string() { std::string start; - if (LLURLSimString::parse()) + LLSLURL start_slurl = LLStartUp::getStartSLURL(); + switch(start_slurl.getType()) { - // a startup URL was specified - std::string unescaped_start = + case LLSLURL::LOCATION: + { + // a startup URL was specified + LLVector3 position = start_slurl.getPosition(); + std::string unescaped_start = STRINGIZE( "uri:" - << LLURLSimString::sInstance.mSimName << "&" - << LLURLSimString::sInstance.mX << "&" - << LLURLSimString::sInstance.mY << "&" - << LLURLSimString::sInstance.mZ); - start = xml_escape_string(unescaped_start); - } - else - { - start = gSavedSettings.getString("LoginLocation"); + << start_slurl.getRegion() << "&" + << position[VX] << "&" + << position[VY] << "&" + << position[VZ]); + start = xml_escape_string(unescaped_start); + break; + } + case LLSLURL::HOME_LOCATION: + { + start = "home"; + break; + } + default: + { + start = "last"; + } } return start; } diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index c8704eddb4..44271bb75e 100644 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -36,6 +36,7 @@ #include "lleventdispatcher.h" #include <boost/scoped_ptr.hpp> #include <boost/function.hpp> +#include "llsecapi.h" class LLLogin; class LLEventStream; class LLNotificationsInterface; @@ -48,8 +49,8 @@ public: LLLoginInstance(); ~LLLoginInstance(); - void connect(const LLSD& credential); // Connect to the current grid choice. - void connect(const std::string& uri, const LLSD& credential); // Connect to the given uri. + void connect(LLPointer<LLCredential> credentials); // Connect to the current grid choice. + void connect(const std::string& uri, LLPointer<LLCredential> credentials); // Connect to the given uri. void reconnect(); // reconnect using the current credentials. void disconnect(); @@ -81,7 +82,7 @@ public: void setUpdaterLauncher(const UpdaterLauncherCallback& ulc) { mUpdaterLauncher = ulc; } private: - void constructAuthParams(const LLSD& credentials); + void constructAuthParams(LLPointer<LLCredential> user_credentials); void updateApp(bool mandatory, const std::string& message); bool updateDialogCallback(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp new file mode 100644 index 0000000000..53243e9807 --- /dev/null +++ b/indra/newview/llmachineid.cpp @@ -0,0 +1,269 @@ +/** + * @file llmachineid.cpp + * @brief retrieves unique machine ids + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "lluuid.h" +#include "llmachineid.h" +#if LL_WINDOWS +#define _WIN32_DCOM +#include <iostream> +using namespace std; +#include <comdef.h> +#include <Wbemidl.h> +#endif +unsigned char static_unique_id[] = {0,0,0,0,0,0}; +bool static has_static_unique_id = false; + +// get an unique machine id. +// NOT THREAD SAFE - do before setting up threads. +// MAC Address doesn't work for Windows 7 since the first returned hardware MAC address changes with each reboot, Go figure?? + +S32 LLMachineID::init() +{ + memset(static_unique_id,0,sizeof(static_unique_id)); + S32 ret_code = 0; +#if LL_WINDOWS +# pragma comment(lib, "wbemuuid.lib") + size_t len = sizeof(static_unique_id); + + // algorithm to detect BIOS serial number found at: + // http://msdn.microsoft.com/en-us/library/aa394077%28VS.85%29.aspx + // we can't use the MAC address since on Windows 7, the first returned MAC address changes with every reboot. + + + HRESULT hres; + + // Step 1: -------------------------------------------------- + // Initialize COM. ------------------------------------------ + + hres = CoInitializeEx(0, COINIT_MULTITHREADED); + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << hres << LL_ENDL; + return 1; // Program has failed. + } + + // Step 2: -------------------------------------------------- + // Set general COM security levels -------------------------- + // Note: If you are using Windows 2000, you need to specify - + // the default authentication credentials for a user by using + // a SOLE_AUTHENTICATION_LIST structure in the pAuthList ---- + // parameter of CoInitializeSecurity ------------------------ + + hres = CoInitializeSecurity( + NULL, + -1, // COM authentication + NULL, // Authentication services + NULL, // Reserved + RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication + RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation + NULL, // Authentication info + EOAC_NONE, // Additional capabilities + NULL // Reserved + ); + + + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL; + CoUninitialize(); + return 1; // Program has failed. + } + + // Step 3: --------------------------------------------------- + // Obtain the initial locator to WMI ------------------------- + + IWbemLocator *pLoc = NULL; + + hres = CoCreateInstance( + CLSID_WbemLocator, + 0, + CLSCTX_INPROC_SERVER, + IID_IWbemLocator, (LPVOID *) &pLoc); + + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL; + CoUninitialize(); + return 1; // Program has failed. + } + + // Step 4: ----------------------------------------------------- + // Connect to WMI through the IWbemLocator::ConnectServer method + + IWbemServices *pSvc = NULL; + + // Connect to the root\cimv2 namespace with + // the current user and obtain pointer pSvc + // to make IWbemServices calls. + hres = pLoc->ConnectServer( + _bstr_t(L"ROOT\\CIMV2"), // Object path of WMI namespace + NULL, // User name. NULL = current user + NULL, // User password. NULL = current + 0, // Locale. NULL indicates current + NULL, // Security flags. + 0, // Authority (e.g. Kerberos) + 0, // Context object + &pSvc // pointer to IWbemServices proxy + ); + + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL; + pLoc->Release(); + CoUninitialize(); + return 1; // Program has failed. + } + + LL_DEBUGS("AppInit") << "Connected to ROOT\\CIMV2 WMI namespace" << LL_ENDL; + + + // Step 5: -------------------------------------------------- + // Set security levels on the proxy ------------------------- + + hres = CoSetProxyBlanket( + pSvc, // Indicates the proxy to set + RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx + RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx + NULL, // Server principal name + RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx + RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx + NULL, // client identity + EOAC_NONE // proxy capabilities + ); + + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL; + pSvc->Release(); + pLoc->Release(); + CoUninitialize(); + return 1; // Program has failed. + } + + // Step 6: -------------------------------------------------- + // Use the IWbemServices pointer to make requests of WMI ---- + + // For example, get the name of the operating system + IEnumWbemClassObject* pEnumerator = NULL; + hres = pSvc->ExecQuery( + bstr_t("WQL"), + bstr_t("SELECT * FROM Win32_OperatingSystem"), + WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, + NULL, + &pEnumerator); + + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL; + pSvc->Release(); + pLoc->Release(); + CoUninitialize(); + return 1; // Program has failed. + } + + // Step 7: ------------------------------------------------- + // Get the data from the query in step 6 ------------------- + + IWbemClassObject *pclsObj = NULL; + ULONG uReturn = 0; + + while (pEnumerator) + { + HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1, + &pclsObj, &uReturn); + + if(0 == uReturn) + { + break; + } + + VARIANT vtProp; + + // Get the value of the Name property + hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0); + LL_DEBUGS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL; + // use characters in the returned Serial Number to create a byte array of size len + BSTR serialNumber ( vtProp.bstrVal); + unsigned int j = 0; + while( vtProp.bstrVal[j] != 0) + { + for (unsigned int i = 0; i < len; i++) + { + if (vtProp.bstrVal[j] == 0) + break; + + static_unique_id[i] = (unsigned int)(static_unique_id[i] + serialNumber[j]); + j++; + } + } + VariantClear(&vtProp); + + pclsObj->Release(); + pclsObj = NULL; + break; + } + + // Cleanup + // ======== + + if (pSvc) + pSvc->Release(); + if (pLoc) + pLoc->Release(); + if (pEnumerator) + pEnumerator->Release(); + CoUninitialize(); + ret_code=0; +#else + unsigned char * staticPtr = (unsigned char *)(&static_unique_id[0]); + ret_code = LLUUID::getNodeID(staticPtr); +#endif + has_static_unique_id = true; + return ret_code; +} + + +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; + return 1; + } + return 0; +} + + + + diff --git a/indra/newview/llmachineid.h b/indra/newview/llmachineid.h new file mode 100644 index 0000000000..8160309b47 --- /dev/null +++ b/indra/newview/llmachineid.h @@ -0,0 +1,56 @@ +/** + * @file llmachineid.h + * @brief retrieves unique machine ids + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLMACHINEID_H +#define LL_LLMACHINEID_H + + +class LLMachineID +{ +public: + LLMachineID(); + virtual ~LLMachineID(); + static S32 getUniqueID(unsigned char *unique_id, size_t len); + static S32 init(); + +protected: + +private: + + +}; + + + + + +#endif // LL_LLMACHINEID_H diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 05cb6ddc4a..7a4ed74c4c 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -78,8 +78,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mBorder(NULL), mFrequentUpdates( true ), mForceUpdate( false ), - mOpenLinksInExternalBrowser( false ), - mOpenLinksInInternalBrowser( false ), mHomePageUrl( "" ), mTrusted(false), mIgnoreUIScale( true ), @@ -167,20 +165,6 @@ void LLMediaCtrl::setTakeFocusOnClick( bool take_focus ) } //////////////////////////////////////////////////////////////////////////////// -// set flag that forces the embedded browser to open links in the external system browser -void LLMediaCtrl::setOpenInExternalBrowser( bool valIn ) -{ - mOpenLinksInExternalBrowser = valIn; -}; - -//////////////////////////////////////////////////////////////////////////////// -// set flag that forces the embedded browser to open links in the internal browser floater -void LLMediaCtrl::setOpenInInternalBrowser( bool valIn ) -{ - mOpenLinksInInternalBrowser = valIn; -}; - -//////////////////////////////////////////////////////////////////////////////// void LLMediaCtrl::setTrusted( bool valIn ) { if(mMediaSource) @@ -944,7 +928,6 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) case MEDIA_EVENT_CLICK_LINK_HREF: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_HREF, target is \"" << self->getClickTarget() << "\", uri is " << self->getClickURL() << LL_ENDL; - onClickLinkHref(self); }; break; @@ -979,95 +962,6 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::onClickLinkHref( LLPluginClassMedia* self ) -{ - // retrieve the event parameters - std::string url = self->getClickURL(); - U32 target_type = self->getClickTargetType(); - - // is there is a target specified for the link? - if (target_type == LLPluginClassMedia::TARGET_EXTERNAL || - target_type == LLPluginClassMedia::TARGET_BLANK ) - { - if (gSavedSettings.getBOOL("UseExternalBrowser")) - { - LLSD payload; - payload["url"] = url; - payload["target_type"] = LLSD::Integer(target_type); - LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, onClickLinkExternalTarget); - } - else - { - clickLinkWithTarget(url, target_type); - } - } - else { - const std::string protocol1( "http://" ); - const std::string protocol2( "https://" ); - if( mOpenLinksInExternalBrowser ) - { - if ( !url.empty() ) - { - if ( LLStringUtil::compareInsensitive( url.substr( 0, protocol1.length() ), protocol1 ) == 0 || - LLStringUtil::compareInsensitive( url.substr( 0, protocol2.length() ), protocol2 ) == 0 ) - { - LLWeb::loadURLExternal( url ); - } - } - } - else - if( mOpenLinksInInternalBrowser ) - { - if ( !url.empty() ) - { - if ( LLStringUtil::compareInsensitive( url.substr( 0, protocol1.length() ), protocol1 ) == 0 || - LLStringUtil::compareInsensitive( url.substr( 0, protocol2.length() ), protocol2 ) == 0 ) - { - llwarns << "Dead, unimplemented path that we used to send to the built-in browser long ago." << llendl; - } - } - } - } -} - -//////////////////////////////////////////////////////////////////////////////// -// static -bool LLMediaCtrl::onClickLinkExternalTarget(const LLSD& notification, const LLSD& response ) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if ( 0 == option ) - { - LLSD payload = notification["payload"]; - std::string url = payload["url"].asString(); - S32 target_type = payload["target_type"].asInteger(); - clickLinkWithTarget(url, target_type); - } - return false; -} - - -//////////////////////////////////////////////////////////////////////////////// -// static -void LLMediaCtrl::clickLinkWithTarget(const std::string& url, const S32& target_type ) -{ - if (target_type == LLPluginClassMedia::TARGET_EXTERNAL) - { - // load target in an external browser - LLWeb::loadURLExternal(url); - } - else if (target_type == LLPluginClassMedia::TARGET_BLANK) - { - // load target in the user's preferred browser - LLWeb::loadURL(url); - } - else { - // unsupported link target - shouldn't happen - LL_WARNS("LinkTarget") << "Unsupported link target type" << LL_ENDL; - } -} - -//////////////////////////////////////////////////////////////////////////////// -// std::string LLMediaCtrl::getCurrentNavUrl() { return mCurrentNavUrl; diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index e55d2f7cd0..310492fe02 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -99,8 +99,6 @@ public: void navigateToLocalPage( const std::string& subdir, const std::string& filename_in ); bool canNavigateBack(); bool canNavigateForward(); - void setOpenInExternalBrowser( bool valIn ); - void setOpenInInternalBrowser( bool valIn ); std::string getCurrentNavUrl(); // By default, we do not handle "secondlife:///app/" SLURLs, because @@ -162,24 +160,17 @@ public: // Incoming media event dispatcher virtual void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); - // handlers for individual events (could be done inside the switch in handleMediaEvent, they're just individual functions for clarity) - void onClickLinkHref( LLPluginClassMedia* self ); - protected: void convertInputCoords(S32& x, S32& y); private: void onVisibilityChange ( const LLSD& new_visibility ); - static bool onClickLinkExternalTarget( const LLSD&, const LLSD& ); - static void clickLinkWithTarget(const std::string& url, const S32& target_type ); const S32 mTextureDepthBytes; LLUUID mMediaTextureID; LLViewBorder* mBorder; bool mFrequentUpdates; bool mForceUpdate; - bool mOpenLinksInExternalBrowser; - bool mOpenLinksInInternalBrowser; bool mTrusted; std::string mHomePageUrl; std::string mCurrentNavUrl; diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp index d670eb6ffd..4c28e98e62 100644 --- a/indra/newview/llmorphview.cpp +++ b/indra/newview/llmorphview.cpp @@ -42,7 +42,6 @@ #include "lldrawpoolavatar.h" #include "llface.h" //#include "llfirstuse.h" -#include "llfloatercustomize.h" #include "llfloatertools.h" #include "llresmgr.h" #include "lltoolmgr.h" @@ -131,14 +130,7 @@ void LLMorphView::setVisible(BOOL visible) if (visible) { - llassert( !gFloaterCustomize ); - gFloaterCustomize = new LLFloaterCustomize(); - gFloaterCustomize->fetchInventory(); - gFloaterCustomize->openFloater(); - - // Must do this _after_ gFloaterView is initialized. - gFloaterCustomize->switchToDefaultSubpart(); - + // TODO: verify some user action has already opened outfit editor? - Nyx initialize(); // First run dialog @@ -146,13 +138,7 @@ void LLMorphView::setVisible(BOOL visible) } else { - if( gFloaterCustomize ) - { - gFloaterView->removeChild( gFloaterCustomize ); - delete gFloaterCustomize; - gFloaterCustomize = NULL; - } - + // TODO: verify some user action has already closed outfit editor ? - Nyx shutdown(); } } diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 2f22512aba..afca9daa67 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -91,12 +91,20 @@ BOOL LLFloaterMove::postBuild() LLDockableFloater::postBuild(); + // Code that implements floater buttons toggling when user moves via keyboard is located in LLAgent::propagate() + mForwardButton = getChild<LLJoystickAgentTurn>("forward btn"); mForwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY); mBackwardButton = getChild<LLJoystickAgentTurn>("backward btn"); mBackwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY); + mSlideLeftButton = getChild<LLJoystickAgentSlide>("move left btn"); + mSlideLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY); + + mSlideRightButton = getChild<LLJoystickAgentSlide>("move right btn"); + mSlideRightButton->setHeldDownDelay(MOVE_BUTTON_DELAY); + mTurnLeftButton = getChild<LLButton>("turn left btn"); mTurnLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY); mTurnLeftButton->setHeldDownCallback(boost::bind(&LLFloaterMove::turnLeft, this)); @@ -125,8 +133,6 @@ BOOL LLFloaterMove::postBuild() btn = getChild<LLButton>("mode_fly_btn"); btn->setCommitCallback(boost::bind(&LLFloaterMove::onFlyButtonClick, this)); - showFlyControls(false); - initModeTooltips(); initModeButtonMap(); @@ -345,33 +351,38 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode) void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode) { - showFlyControls(MM_FLY == newMode); setModeTooltip(newMode); setModeButtonToggleState(newMode); setModeTitle(newMode); } -void LLFloaterMove::showFlyControls(bool bShow) -{ - mMoveUpButton->setVisible(bShow); - mMoveDownButton->setVisible(bShow); -} - void LLFloaterMove::initModeTooltips() { control_tooltip_map_t walkTipMap; walkTipMap.insert(std::make_pair(mForwardButton, getString("walk_forward_tooltip"))); walkTipMap.insert(std::make_pair(mBackwardButton, getString("walk_back_tooltip"))); + walkTipMap.insert(std::make_pair(mSlideLeftButton, getString("walk_left_tooltip"))); + walkTipMap.insert(std::make_pair(mSlideRightButton, getString("walk_right_tooltip"))); + walkTipMap.insert(std::make_pair(mMoveUpButton, getString("jump_tooltip"))); + walkTipMap.insert(std::make_pair(mMoveDownButton, getString("crouch_tooltip"))); mModeControlTooltipsMap[MM_WALK] = walkTipMap; control_tooltip_map_t runTipMap; runTipMap.insert(std::make_pair(mForwardButton, getString("run_forward_tooltip"))); runTipMap.insert(std::make_pair(mBackwardButton, getString("run_back_tooltip"))); + runTipMap.insert(std::make_pair(mSlideLeftButton, getString("run_left_tooltip"))); + runTipMap.insert(std::make_pair(mSlideRightButton, getString("run_right_tooltip"))); + runTipMap.insert(std::make_pair(mMoveUpButton, getString("jump_tooltip"))); + runTipMap.insert(std::make_pair(mMoveDownButton, getString("crouch_tooltip"))); mModeControlTooltipsMap[MM_RUN] = runTipMap; control_tooltip_map_t flyTipMap; flyTipMap.insert(std::make_pair(mForwardButton, getString("fly_forward_tooltip"))); flyTipMap.insert(std::make_pair(mBackwardButton, getString("fly_back_tooltip"))); + flyTipMap.insert(std::make_pair(mSlideLeftButton, getString("fly_left_tooltip"))); + flyTipMap.insert(std::make_pair(mSlideRightButton, getString("fly_right_tooltip"))); + flyTipMap.insert(std::make_pair(mMoveUpButton, getString("fly_up_tooltip"))); + flyTipMap.insert(std::make_pair(mMoveDownButton, getString("fly_down_tooltip"))); mModeControlTooltipsMap[MM_FLY] = flyTipMap; setModeTooltip(MM_WALK); diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index dcca8308d9..fcf643f050 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -88,7 +88,6 @@ private: void onFlyButtonClick(); void initMovementMode(); void setMovementMode(const EMovementMode mode); - void showFlyControls(bool bShow); void initModeTooltips(); void setModeTooltip(const EMovementMode mode); void setModeTitle(const EMovementMode mode); @@ -102,6 +101,8 @@ public: LLJoystickAgentTurn* mForwardButton; LLJoystickAgentTurn* mBackwardButton; + LLJoystickAgentSlide* mSlideLeftButton; + LLJoystickAgentSlide* mSlideRightButton; LLButton* mTurnLeftButton; LLButton* mTurnRightButton; LLButton* mMoveUpButton; diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 0341f2c693..251c60b5bf 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -52,7 +52,6 @@ #include "llsearchcombobox.h" #include "llsidetray.h" #include "llslurl.h" -#include "llurlsimstring.h" #include "llurlregistry.h" #include "llurldispatcher.h" #include "llviewerinventory.h" @@ -507,29 +506,34 @@ void LLNavigationBar::onLocationSelection() std::string region_name; LLVector3 local_coords(128, 128, 0); - S32 x = 0, y = 0, z = 0; // Is the typed location a SLURL? - if (LLSLURL::isSLURL(typed_location)) + LLSLURL slurl = LLSLURL(typed_location); + if (slurl.getType() == LLSLURL::LOCATION) { - // Yes. Extract region name and local coordinates from it. - if (LLURLSimString::parse(LLSLURL::stripProtocol(typed_location), ®ion_name, &x, &y, &z)) - local_coords.set(x, y, z); - else - return; + region_name = slurl.getRegion(); + local_coords = slurl.getPosition(); } - // we have to do this check after previous, because LLUrlRegistry contains handlers for slurl too - //but we need to know whether typed_location is a simple http url. - else if (LLUrlRegistry::instance().isUrl(typed_location)) + else if(!slurl.isValid()) { + // we have to do this check after previous, because LLUrlRegistry contains handlers for slurl too + // but we need to know whether typed_location is a simple http url. + if (LLUrlRegistry::instance().isUrl(typed_location)) + { // display http:// URLs in the media browser, or // anything else is sent to the search floater LLWeb::loadURL(typed_location); return; + } + else + { + // assume that an user has typed the {region name} or possible {region_name, parcel} + region_name = typed_location.substr(0,typed_location.find(',')); + } } else { - // assume that an user has typed the {region name} or possible {region_name, parcel} - region_name = typed_location.substr(0,typed_location.find(',')); + // was an app slurl, home, whatever. Bail + return; } // Resolve the region name to its global coordinates. @@ -561,7 +565,7 @@ void LLNavigationBar::onTeleportFinished(const LLVector3d& global_agent_pos) */ LLAgentUI::buildLocationString(location, LLAgentUI::LOCATION_FORMAT_NO_MATURITY, gAgent.getPosAgentFromGlobal(global_agent_pos)); - std::string tooltip (LLSLURL::buildSLURLfromPosGlobal(gAgent.getRegion()->getName(), global_agent_pos, false)); + std::string tooltip (LLSLURL(gAgent.getRegion()->getName(), global_agent_pos).getSLURLString()); LLLocationHistoryItem item (location, global_agent_pos, tooltip,TYPED_REGION_SLURL);// we can add into history only TYPED location @@ -650,7 +654,7 @@ void LLNavigationBar::onRegionNameResponse( LLVector3d region_pos = from_region_handle(region_handle); LLVector3d global_pos = region_pos + (LLVector3d) local_coords; - llinfos << "Teleporting to: " << LLSLURL::buildSLURLfromPosGlobal(region_name, global_pos, false) << llendl; + llinfos << "Teleporting to: " << LLSLURL(region_name, global_pos).getSLURLString() << llendl; gAgent.teleportViaLocation(global_pos); } diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 1507b7d324..46f531fdd9 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -34,6 +34,7 @@ #include "message.h" +#include "llappviewer.h" #include "llfloaterreg.h" #include "lltrans.h" @@ -69,6 +70,33 @@ static LLChatTypeTrigger sChatTypeTriggers[] = { { "/shout" , CHAT_TYPE_SHOUT} }; +//ext-7367 +//Problem: gesture list control (actually LLScrollListCtrl) didn't actually process mouse wheel message. +// introduce new gesture list subclass to "eat" mouse wheel messages (and probably some other messages) +class LLGestureScrollListCtrl: public LLScrollListCtrl +{ +protected: + friend class LLUICtrlFactory; + LLGestureScrollListCtrl(const LLScrollListCtrl::Params& params) + :LLScrollListCtrl(params) + { + } +public: + BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) + { + LLScrollListCtrl::handleScrollWheel( x, y, clicks ); + return TRUE; + } + //See EXT-6598 + //Mouse hover over separator will result in not processing tooltip message + //So eat this message + BOOL handleToolTip(S32 x, S32 y, MASK mask) + { + LLScrollListCtrl::handleToolTip( x, y, mask ); + return TRUE; + } +}; + LLGestureComboList::Params::Params() : combo_button("combo_button"), combo_list("combo_list") @@ -79,6 +107,7 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) : LLUICtrl(p) , mLabel(p.label) , mViewAllItemIndex(0) + , mGetMoreItemIndex(0) { LLButton::Params button_params = p.combo_button; button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT); @@ -89,13 +118,14 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) addChild(mButton); - LLScrollListCtrl::Params params = p.combo_list; + LLGestureScrollListCtrl::Params params(p.combo_list); + params.name("GestureComboList"); params.commit_callback.function(boost::bind(&LLGestureComboList::onItemSelected, this, _2)); params.visible(false); params.commit_on_keyboard_movement(false); - mList = LLUICtrlFactory::create<LLScrollListCtrl>(params); + mList = LLUICtrlFactory::create<LLGestureScrollListCtrl>(params); addChild(mList); //****************************Gesture Part********************************/ @@ -260,9 +290,12 @@ void LLGestureComboList::refreshGestures() sortByName(); - // store index followed by the last added Gesture and add View All item at bottom - mViewAllItemIndex = idx; - + // store indices for Get More and View All items (idx is the index followed by the last added Gesture) + mGetMoreItemIndex = idx; + mViewAllItemIndex = idx + 1; + + // add Get More and View All items at the bottom + mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex)); mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex)); // Insert label after sorting, at top, with separator below it @@ -318,6 +351,12 @@ void LLGestureComboList::onCommitGesture() return; } + if (mGetMoreItemIndex == index) + { + LLWeb::loadURLExternal(gSavedSettings.getString("GesturesMarketplaceURL")); + return; + } + LLMultiGesture* gesture = mGestures.at(index); if(gesture) { @@ -350,6 +389,7 @@ BOOL LLNearbyChatBar::postBuild() 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 ); @@ -507,6 +547,11 @@ void LLNearbyChatBar::onChatBoxFocusLost(LLFocusableElement* caller, void* userd gAgent.stopTyping(); } +void LLNearbyChatBar::onChatBoxFocusReceived() +{ + mChatBox->setEnabled(!gDisconnected); +} + EChatType LLNearbyChatBar::processChatTypeTriggers(EChatType type, std::string &str) { U32 length = str.length(); diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index dd467d7978..83c174fd10 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -62,6 +62,7 @@ protected: std::vector<LLMultiGesture*> mGestures; std::string mLabel; LLSD::Integer mViewAllItemIndex; + LLSD::Integer mGetMoreItemIndex; public: @@ -121,6 +122,7 @@ 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 onChatBoxFocusReceived(); void sendChat( EChatType type ); void onChatBoxCommit(); diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 3f551f6b32..95b946f307 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -114,8 +114,7 @@ void LLSysHandler::removeExclusiveNotifications(const LLNotificationPtr& notif) const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM( - "ObjectGiveItem"), OBJECT_GIVE_ITEM_UNKNOWN_USER( - "ObjectGiveItemUnknownUser"), PAYMENT_RECIVED("PaymentRecived"), + "ObjectGiveItem"), PAYMENT_RECIVED("PaymentRecived"), ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), USER_GIVE_ITEM("UserGiveItem"), INVENTORY_ACCEPTED("InventoryAccepted"), @@ -327,8 +326,7 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi "SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name; // don't create IM p2p session with objects, it's necessary condition to log - if (notification->getName() != OBJECT_GIVE_ITEM && notification->getName() - != OBJECT_GIVE_ITEM_UNKNOWN_USER) + if (notification->getName() != OBJECT_GIVE_ITEM) { LLUUID from_id = notification->getPayload()["from_id"]; diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp index 316ff4324c..20b40b4e1d 100644 --- a/indra/newview/llnotificationstorage.cpp +++ b/indra/newview/llnotificationstorage.cpp @@ -112,8 +112,8 @@ void LLPersistentNotificationStorage::saveNotifications() LLNotificationPtr notification = *it; // After a notification was placed in Persist channel, it can become - // responded, expired - in this case we are should not save it - if(notification->isRespondedTo() + // responded, expired or canceled - in this case we are should not save it + if(notification->isRespondedTo() || notification->isCancelled() || notification->isExpired()) { continue; @@ -208,7 +208,6 @@ LLNotificationResponderInterface* LLResponderRegistry::createResponder(const std build_map_t::const_iterator it = sBuildMap.find(notification_name); if(sBuildMap.end() == it) { - llwarns << "Responder for notification \'" << notification_name << "\' is not registered" << llendl; return NULL; } responder_constructor_t ctr = it->second; diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 18bd610dd9..8f189a1e9f 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -36,32 +36,65 @@ // llcommon #include "llcommonutils.h" -// llcommon -#include "llcommonutils.h" - #include "llaccordionctrl.h" #include "llaccordionctrltab.h" +#include "llagentwearables.h" #include "llappearancemgr.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" +#include "lllistcontextmenu.h" +#include "lltransutil.h" +#include "llviewermenu.h" +#include "llvoavatar.h" +#include "llvoavatarself.h" #include "llwearableitemslist.h" +////////////////////////////////////////////////////////////////////////// + +class OutfitContextMenu : public LLListContextMenu +{ +protected: + /* virtual */ LLContextMenu* createMenu() + { + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + LLUUID selected_id = mUUIDs.front(); + + registrar.add("Outfit.WearReplace", + boost::bind(&LLAppearanceMgr::replaceCurrentOutfit, &LLAppearanceMgr::instance(), selected_id)); + registrar.add("Outfit.WearAdd", + boost::bind(&LLAppearanceMgr::addCategoryToCurrentOutfit, &LLAppearanceMgr::instance(), selected_id)); + registrar.add("Outfit.TakeOff", + boost::bind(&LLAppearanceMgr::takeOffOutfit, &LLAppearanceMgr::instance(), selected_id)); + // *TODO: implement this + // registrar.add("Outfit.Rename", boost::bind()); + // registrar.add("Outfit.Delete", boost::bind()); + + return createFromFile("menu_outfit_tab.xml"); + } +}; + +////////////////////////////////////////////////////////////////////////// + static LLRegisterPanelClassWrapper<LLOutfitsList> t_outfits_list("outfits_list"); LLOutfitsList::LLOutfitsList() : LLPanel() , mAccordion(NULL) , mListCommands(NULL) - , mSelectedList(NULL) { mCategoriesObserver = new LLInventoryCategoriesObserver(); gInventory.addObserver(mCategoriesObserver); gInventory.addObserver(this); + + mOutfitMenu = new OutfitContextMenu(); } LLOutfitsList::~LLOutfitsList() { + delete mOutfitMenu; + if (gInventory.containsObserver(mCategoriesObserver)) { gInventory.removeObserver(mCategoriesObserver); @@ -143,6 +176,8 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) static LLXMLNodePtr accordionXmlNode = getAccordionTabXMLNode(); LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder<LLAccordionCtrlTab>(accordionXmlNode, NULL, NULL); + tab->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onAccordionTabRightClick, this, + _1, _2, _3, cat_id)); tab->setName(name); tab->setTitle(name); @@ -169,12 +204,32 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) // Setting list commit callback to monitor currently selected wearable item. list->setCommitCallback(boost::bind(&LLOutfitsList::onSelectionChange, this, _1)); + // Setting list refresh callback to apply filter on list change. + list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onFilteredWearableItemsListRefresh, this, _1)); + + list->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onWearableItemsListRightClick, this, _1, _2, _3)); + // Fetch the new outfit contents. cat->fetch(); // Refresh the list of outfit items after fetch(). // Further list updates will be triggered by the category observer. list->updateList(cat_id); + + // If filter is currently applied we store the initial tab state and + // open it to show matched items if any. + if (!mFilterSubString.empty()) + { + tab->notifyChildren(LLSD().with("action","store_state")); + tab->setDisplayChildren(true); + + // Setting mForceRefresh flag will make the list refresh its contents + // even if it is not currently visible. This is required to apply the + // filter to the newly added list. + list->setForceRefresh(true); + + list->setFilterSubString(mFilterSubString); + } } // Handle removed tabs. @@ -183,23 +238,27 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) outfits_map_t::iterator outfits_iter = mOutfitsMap.find((*iter)); if (outfits_iter != mOutfitsMap.end()) { - // An outfit is removed from the list. Do the following: - // 1. Remove outfit accordion tab from accordion. - mAccordion->removeCollapsibleCtrl(outfits_iter->second); - const LLUUID& outfit_id = outfits_iter->first; + LLAccordionCtrlTab* tab = outfits_iter->second; - // 2. Remove outfit category from observer to stop monitoring its changes. + // An outfit is removed from the list. Do the following: + // 1. Remove outfit category from observer to stop monitoring its changes. mCategoriesObserver->removeCategory(outfit_id); - // 3. Reset selection if selected outfit is being removed. - if (mSelectedOutfitUUID == outfit_id) + // 2. Remove selected lists map entry. + mSelectedListsMap.erase(outfit_id); + + // 3. Reset currently selected outfit id if it is being removed. + if (outfit_id == mSelectedOutfitUUID) { - changeOutfitSelection(NULL, LLUUID()); + mSelectedOutfitUUID = LLUUID(); } // 4. Remove category UUID to accordion tab mapping. mOutfitsMap.erase(outfits_iter); + + // 5. Remove outfit tab from accordion. + mAccordion->removeCollapsibleCtrl(tab); } } @@ -229,6 +288,8 @@ void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl) void LLOutfitsList::performAction(std::string action) { + if (mSelectedOutfitUUID.isNull()) return; + LLViewerInventoryCategory* cat = gInventory.getCategory(mSelectedOutfitUUID); if (!cat) return; @@ -244,35 +305,9 @@ void LLOutfitsList::performAction(std::string action) void LLOutfitsList::setFilterSubString(const std::string& string) { - mFilterSubString = string; + applyFilter(string); - for (outfits_map_t::iterator - iter = mOutfitsMap.begin(), - iter_end = mOutfitsMap.end(); - iter != iter_end; ++iter) - { - LLAccordionCtrlTab* tab = iter->second; - if (tab) - { - LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*> (tab->getAccordionView()); - if (list) - { - list->setFilterSubString(mFilterSubString); - } - - if(!mFilterSubString.empty()) - { - //store accordion tab state when filter is not empty - tab->notifyChildren(LLSD().with("action","store_state")); - tab->setDisplayChildren(true); - } - else - { - //restore accordion state after all those accodrion tab manipulations - tab->notifyChildren(LLSD().with("action","restore_state")); - } - } - } + mFilterSubString = string; } ////////////////////////////////////////////////////////////////////////// @@ -339,15 +374,181 @@ void LLOutfitsList::updateOutfitTab(const LLUUID& category_id) void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id) { - // Reset selection in previously selected tab - // if a new one is selected. - if (list && mSelectedList && mSelectedList != list) + MASK mask = gKeyboard->currentMask(TRUE); + + // Reset selection in all previously selected tabs except for the current + // if new selection is started. + if (list && !(mask & MASK_CONTROL)) { - mSelectedList->resetSelection(); + for (wearables_lists_map_t::iterator iter = mSelectedListsMap.begin(); + iter != mSelectedListsMap.end(); + ++iter) + { + LLWearableItemsList* selected_list = (*iter).second; + if (selected_list != list) + { + selected_list->resetSelection(); + } + } + + // Clear current selection. + mSelectedListsMap.clear(); } - mSelectedList = list; + mSelectedListsMap.insert(wearables_lists_map_value_t(category_id, list)); mSelectedOutfitUUID = category_id; } +void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl) +{ + if (!ctrl || mFilterSubString.empty()) + return; + + for (outfits_map_t::iterator + iter = mOutfitsMap.begin(), + iter_end = mOutfitsMap.end(); + iter != iter_end; ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if (!tab) continue; + + LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); + if (list != ctrl) continue; + + std::string title = tab->getTitle(); + LLStringUtil::toUpper(title); + + std::string cur_filter = mFilterSubString; + LLStringUtil::toUpper(cur_filter); + + if (std::string::npos == title.find(cur_filter)) + { + // hide tab if its title doesn't pass filter + // and it has no visible items + tab->setVisible(list->size() != 0); + } + else + { + tab->setTitle(tab->getTitle(), cur_filter); + } + } +} + +void LLOutfitsList::applyFilter(const std::string& new_filter_substring) +{ + for (outfits_map_t::iterator + iter = mOutfitsMap.begin(), + iter_end = mOutfitsMap.end(); + iter != iter_end; ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if (!tab) continue; + + bool more_restrictive = mFilterSubString.size() < new_filter_substring.size() && !new_filter_substring.substr(0, mFilterSubString.size()).compare(mFilterSubString); + + // Restore tab visibility in case of less restrictive filter + // to compare it with updated string if it was previously hidden. + if (!more_restrictive) + { + tab->setVisible(TRUE); + } + + LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); + if (list) + { + list->setFilterSubString(new_filter_substring); + } + + if(mFilterSubString.empty() && !new_filter_substring.empty()) + { + //store accordion tab state when filter is not empty + tab->notifyChildren(LLSD().with("action","store_state")); + } + + if (!new_filter_substring.empty()) + { + std::string title = tab->getTitle(); + LLStringUtil::toUpper(title); + + std::string cur_filter = new_filter_substring; + LLStringUtil::toUpper(cur_filter); + + if (std::string::npos == title.find(cur_filter)) + { + // hide tab if its title doesn't pass filter + // and it has no visible items + tab->setVisible(list->size() != 0); + } + else + { + tab->setTitle(tab->getTitle(), cur_filter); + } + + if (tab->getVisible()) + { + // Open tab if it has passed the filter. + tab->setDisplayChildren(true); + } + else + { + // Set force refresh flag to refresh not visible list + // when some changes occur in it. + list->setForceRefresh(true); + } + } + else + { + // restore tab title when filter is empty + tab->setTitle(tab->getTitle()); + + //restore accordion state after all those accodrion tab manipulations + tab->notifyChildren(LLSD().with("action","restore_state")); + } + } +} + +void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id) +{ + LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl); + if(mOutfitMenu && tab && tab->getHeaderVisible() && cat_id.notNull()) + { + S32 header_bottom = tab->getLocalRect().getHeight() - tab->getHeaderHeight(); + if(y >= header_bottom) + { + // Focus tab header to trigger tab selection change. + LLUICtrl* header = tab->findChild<LLUICtrl>("dd_header"); + if (header) + { + header->setFocus(TRUE); + } + + uuid_vec_t selected_uuids; + selected_uuids.push_back(cat_id); + mOutfitMenu->show(ctrl, selected_uuids, x, y); + } + } +} + +void LLOutfitsList::onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y) +{ + LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl); + if (!list) return; + + uuid_vec_t selected_uuids; + + // Collect seleted items from all selected lists. + for (wearables_lists_map_t::iterator iter = mSelectedListsMap.begin(); + iter != mSelectedListsMap.end(); + ++iter) + { + uuid_vec_t uuids; + (*iter).second->getSelectedUUIDs(uuids); + + S32 prev_size = selected_uuids.size(); + selected_uuids.resize(prev_size + uuids.size()); + std::copy(uuids.begin(), uuids.end(), selected_uuids.begin() + prev_size); + } + + LLWearableItemsList::ContextMenu::instance().show(list, selected_uuids, x, y); +} // EOF diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index d86cf5a703..1da7360c2e 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -41,6 +41,7 @@ class LLAccordionCtrl; class LLAccordionCtrlTab; class LLWearableItemsList; +class LLListContextMenu; /** * @class LLOutfitsList @@ -94,12 +95,30 @@ private: */ void changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id); + /** + * Called upon list refresh event to update tab visibility depending on + * the results of applying filter to the title and list items of the tab. + */ + void onFilteredWearableItemsListRefresh(LLUICtrl* ctrl); + + /** + * Highlights filtered items and hides tabs which haven't passed filter. + */ + void applyFilter(const std::string& new_filter_substring); + + void onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id); + + void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y); + LLInventoryCategoriesObserver* mCategoriesObserver; LLAccordionCtrl* mAccordion; LLPanel* mListCommands; - LLWearableItemsList* mSelectedList; + typedef std::map<LLUUID, LLWearableItemsList*> wearables_lists_map_t; + typedef wearables_lists_map_t::value_type wearables_lists_map_value_t; + wearables_lists_map_t mSelectedListsMap; + LLUUID mSelectedOutfitUUID; std::string mFilterSubString; @@ -107,6 +126,8 @@ private: typedef std::map<LLUUID, LLAccordionCtrlTab*> outfits_map_t; typedef outfits_map_t::value_type outfits_map_value_t; outfits_map_t mOutfitsMap; + + LLListContextMenu* mOutfitMenu; }; #endif //LL_LLOUTFITSLIST_H diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index d6d48a4ead..197a0ef728 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -142,7 +142,7 @@ void LLOutputMonitorCtrl::draw() // Copied from llmediaremotectrl.cpp // *TODO: Give the LLOutputMonitorCtrl an agent-id to monitor, then - // call directly into gVoiceClient to ask if that agent-id is muted, is + // call directly into LLVoiceClient::getInstance() to ask if that agent-id is muted, is // speaking, and what power. This avoids duplicating data, which can get // out of sync. const F32 LEVEL_0 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL / 3.f; @@ -151,14 +151,14 @@ void LLOutputMonitorCtrl::draw() if (getVisible() && mAutoUpdate && !mIsMuted && mSpeakerId.notNull()) { - setPower(gVoiceClient->getCurrentPower(mSpeakerId)); + setPower(LLVoiceClient::getInstance()->getCurrentPower(mSpeakerId)); if(mIsAgentControl) { - setIsTalking(gVoiceClient->getUserPTTState()); + setIsTalking(LLVoiceClient::getInstance()->getUserPTTState()); } else { - setIsTalking(gVoiceClient->getIsSpeaking(mSpeakerId)); + setIsTalking(LLVoiceClient::getInstance()->getIsSpeaking(mSpeakerId)); } } diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index b7454a5066..3a83da67e2 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -143,7 +143,7 @@ private: LLPointer<LLUIImage> mImageLevel2; LLPointer<LLUIImage> mImageLevel3; - /** whether to deal with gVoiceClient directly */ + /** whether to deal with LLVoiceClient::getInstance() directly */ bool mAutoUpdate; /** uuid of a speaker being monitored */ diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index 67e048885f..3f1b23ba14 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -258,7 +258,7 @@ void LLOverlayBar::refresh() { // update "remotes" childSetVisible("media_remote_container", TRUE); - childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); + childSetVisible("voice_remote_container", LLVoiceClient::getInstance()->voiceEnabled()); childSetVisible("state_buttons", TRUE); } diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index dd632ccefe..0b31ffc9a0 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -164,7 +164,7 @@ BOOL LLPanelAvatarNotes::postBuild() resetControls(); resetData(); - gVoiceClient->addObserver((LLVoiceClientStatusObserver*)this); + LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this); return TRUE; } @@ -375,7 +375,7 @@ void LLPanelAvatarNotes::onChange(EStatusType status, const std::string &channel return; } - childSetEnabled("call", LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()); + childSetEnabled("call", LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); } void LLPanelAvatarNotes::setAvatarId(const LLUUID& id) @@ -519,7 +519,7 @@ BOOL LLPanelAvatarProfile::postBuild() pic = getChild<LLTextureCtrl>("real_world_pic"); pic->setFallbackImageName("default_profile_picture.j2c"); - gVoiceClient->addObserver((LLVoiceClientStatusObserver*)this); + LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this); resetControls(); resetData(); @@ -814,7 +814,7 @@ void LLPanelAvatarProfile::onChange(EStatusType status, const std::string &chann return; } - childSetEnabled("call", LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()); + childSetEnabled("call", LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); } void LLPanelAvatarProfile::setAvatarId(const LLUUID& id) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 3c112b8b5e..36f2d05fab 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -50,12 +50,15 @@ #include "llaccordionctrltab.h" #include "llagentwearables.h" #include "llscrollingpanelparam.h" +#include "llradiogroup.h" #include "llcolorswatch.h" #include "lltexturectrl.h" #include "lltextureentry.h" #include "llviewercontrol.h" // gSavedSettings #include "llviewertexturelist.h" +#include "llagentcamera.h" +#include "llmorphview.h" // register panel with appropriate XML static LLRegisterPanelClassWrapper<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable"); @@ -115,7 +118,7 @@ public: public: struct WearableEntry : public LLDictionaryEntry { - WearableEntry(EWearableType type, + WearableEntry(LLWearableType::EType type, const std::string &title, const std::string &desc_title, U8 num_color_swatches, // number of 'color_swatches' @@ -123,7 +126,7 @@ public: U8 num_subparts, ... ); // number of subparts followed by a list of ETextureIndex and ESubparts - const EWearableType mWearableType; + const LLWearableType::EType mWearableType; const std::string mTitle; const std::string mDescTitle; subpart_vec_t mSubparts; @@ -131,12 +134,12 @@ public: texture_vec_t mTextureCtrls; }; - struct Wearables : public LLDictionary<EWearableType, WearableEntry> + struct Wearables : public LLDictionary<LLWearableType::EType, WearableEntry> { Wearables(); } mWearables; - const WearableEntry* getWearable(EWearableType type) const { return mWearables.lookup(type); } + const WearableEntry* getWearable(LLWearableType::EType type) const { return mWearables.lookup(type); } //-------------------------------------------------------------------- // Subparts @@ -212,24 +215,27 @@ LLEditWearableDictionary::~LLEditWearableDictionary() LLEditWearableDictionary::Wearables::Wearables() { - addEntry(WT_SHAPE, new WearableEntry(WT_SHAPE,"edit_shape_title","shape_desc_text",0,0,9, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS, SUBPART_SHAPE_WHOLE)); - addEntry(WT_SKIN, new WearableEntry(WT_SKIN,"edit_skin_title","skin_desc_text",0,3,4, TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL)); - addEntry(WT_HAIR, new WearableEntry(WT_HAIR,"edit_hair_title","hair_desc_text",0,1,4, TEX_HAIR, SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL)); - addEntry(WT_EYES, new WearableEntry(WT_EYES,"edit_eyes_title","eyes_desc_text",0,1,1, TEX_EYES_IRIS, SUBPART_EYES)); - addEntry(WT_SHIRT, new WearableEntry(WT_SHIRT,"edit_shirt_title","shirt_desc_text",1,1,1, TEX_UPPER_SHIRT, TEX_UPPER_SHIRT, SUBPART_SHIRT)); - addEntry(WT_PANTS, new WearableEntry(WT_PANTS,"edit_pants_title","pants_desc_text",1,1,1, TEX_LOWER_PANTS, TEX_LOWER_PANTS, SUBPART_PANTS)); - addEntry(WT_SHOES, new WearableEntry(WT_SHOES,"edit_shoes_title","shoes_desc_text",1,1,1, TEX_LOWER_SHOES, TEX_LOWER_SHOES, SUBPART_SHOES)); - addEntry(WT_SOCKS, new WearableEntry(WT_SOCKS,"edit_socks_title","socks_desc_text",1,1,1, TEX_LOWER_SOCKS, TEX_LOWER_SOCKS, SUBPART_SOCKS)); - addEntry(WT_JACKET, new WearableEntry(WT_JACKET,"edit_jacket_title","jacket_desc_text",1,2,1, TEX_UPPER_JACKET, TEX_UPPER_JACKET, TEX_LOWER_JACKET, SUBPART_JACKET)); - addEntry(WT_GLOVES, new WearableEntry(WT_GLOVES,"edit_gloves_title","gloves_desc_text",1,1,1, TEX_UPPER_GLOVES, TEX_UPPER_GLOVES, SUBPART_GLOVES)); - addEntry(WT_UNDERSHIRT, new WearableEntry(WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text",1,1,1, TEX_UPPER_UNDERSHIRT, TEX_UPPER_UNDERSHIRT, SUBPART_UNDERSHIRT)); - addEntry(WT_UNDERPANTS, new WearableEntry(WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text",1,1,1, TEX_LOWER_UNDERPANTS, TEX_LOWER_UNDERPANTS, SUBPART_UNDERPANTS)); - addEntry(WT_SKIRT, new WearableEntry(WT_SKIRT,"edit_skirt_title","skirt_desc_text",1,1,1, TEX_SKIRT, TEX_SKIRT, SUBPART_SKIRT)); - addEntry(WT_ALPHA, new WearableEntry(WT_ALPHA,"edit_alpha_title","alpha_desc_text",0,5,1, TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA, SUBPART_ALPHA)); - addEntry(WT_TATTOO, new WearableEntry(WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",0,3,1, TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO, SUBPART_TATTOO)); + // note the subpart that is listed first is treated as "default", regardless of what order is in enum. + // Please match the order presented in XUI. -Nyx + // this will affect what camera angle is shown when first editing a wearable + addEntry(LLWearableType::WT_SHAPE, new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text",0,0,9, SUBPART_SHAPE_WHOLE, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS )); + addEntry(LLWearableType::WT_SKIN, new WearableEntry(LLWearableType::WT_SKIN,"edit_skin_title","skin_desc_text",0,3,4, TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL)); + addEntry(LLWearableType::WT_HAIR, new WearableEntry(LLWearableType::WT_HAIR,"edit_hair_title","hair_desc_text",0,1,4, TEX_HAIR, SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL)); + addEntry(LLWearableType::WT_EYES, new WearableEntry(LLWearableType::WT_EYES,"edit_eyes_title","eyes_desc_text",0,1,1, TEX_EYES_IRIS, SUBPART_EYES)); + addEntry(LLWearableType::WT_SHIRT, new WearableEntry(LLWearableType::WT_SHIRT,"edit_shirt_title","shirt_desc_text",1,1,1, TEX_UPPER_SHIRT, TEX_UPPER_SHIRT, SUBPART_SHIRT)); + addEntry(LLWearableType::WT_PANTS, new WearableEntry(LLWearableType::WT_PANTS,"edit_pants_title","pants_desc_text",1,1,1, TEX_LOWER_PANTS, TEX_LOWER_PANTS, SUBPART_PANTS)); + addEntry(LLWearableType::WT_SHOES, new WearableEntry(LLWearableType::WT_SHOES,"edit_shoes_title","shoes_desc_text",1,1,1, TEX_LOWER_SHOES, TEX_LOWER_SHOES, SUBPART_SHOES)); + addEntry(LLWearableType::WT_SOCKS, new WearableEntry(LLWearableType::WT_SOCKS,"edit_socks_title","socks_desc_text",1,1,1, TEX_LOWER_SOCKS, TEX_LOWER_SOCKS, SUBPART_SOCKS)); + addEntry(LLWearableType::WT_JACKET, new WearableEntry(LLWearableType::WT_JACKET,"edit_jacket_title","jacket_desc_text",1,2,1, TEX_UPPER_JACKET, TEX_UPPER_JACKET, TEX_LOWER_JACKET, SUBPART_JACKET)); + addEntry(LLWearableType::WT_GLOVES, new WearableEntry(LLWearableType::WT_GLOVES,"edit_gloves_title","gloves_desc_text",1,1,1, TEX_UPPER_GLOVES, TEX_UPPER_GLOVES, SUBPART_GLOVES)); + addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(LLWearableType::WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text",1,1,1, TEX_UPPER_UNDERSHIRT, TEX_UPPER_UNDERSHIRT, SUBPART_UNDERSHIRT)); + addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(LLWearableType::WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text",1,1,1, TEX_LOWER_UNDERPANTS, TEX_LOWER_UNDERPANTS, SUBPART_UNDERPANTS)); + addEntry(LLWearableType::WT_SKIRT, new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text",1,1,1, TEX_SKIRT, TEX_SKIRT, SUBPART_SKIRT)); + addEntry(LLWearableType::WT_ALPHA, new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text",0,5,1, TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA, SUBPART_ALPHA)); + addEntry(LLWearableType::WT_TATTOO, new WearableEntry(LLWearableType::WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",1,3,1, TEX_HEAD_TATTOO, TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO, SUBPART_TATTOO)); } -LLEditWearableDictionary::WearableEntry::WearableEntry(EWearableType type, +LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType type, const std::string &title, const std::string &desc_title, U8 num_color_swatches, @@ -330,6 +336,7 @@ LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls() addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Color/Tint" )); addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Color/Tint" )); addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Color/Tint" )); + addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Color/Tint" )); } LLEditWearableDictionary::TextureCtrls::TextureCtrls() @@ -442,7 +449,7 @@ get_picker_entry<LLTextureCtrl> (const ETextureIndex index) template <typename CtrlType, class Predicate> const LLEditWearableDictionary::PickerControlEntry* -find_picker_ctrl_entry_if(EWearableType type, const Predicate pred) +find_picker_ctrl_entry_if(LLWearableType::EType type, const Predicate pred) { const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); @@ -475,7 +482,7 @@ find_picker_ctrl_entry_if(EWearableType type, const Predicate pred) template <typename CtrlType> void -for_each_picker_ctrl_entry(LLPanel* panel, EWearableType type, function_t fun) +for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_t fun) { if (!panel) { @@ -615,6 +622,8 @@ BOOL LLPanelEditWearable::postBuild() mPanelTitle = getChild<LLTextBox>("edit_wearable_title"); mDescTitle = getChild<LLTextBox>("description_text"); + getChild<LLRadioGroup>("sex_radio")->setCommitCallback(boost::bind(&LLPanelEditWearable::onCommitSexChange, this)); + // The following panels will be shown/hidden based on what wearable we're editing // body parts mPanelShape = getChild<LLPanel>("edit_shape_panel"); @@ -635,8 +644,16 @@ BOOL LLPanelEditWearable::postBuild() mPanelAlpha = getChild<LLPanel>("edit_alpha_panel"); mPanelTattoo = getChild<LLPanel>("edit_tattoo_panel"); + mTxtAvatarHeight = mPanelShape->getChild<LLTextBox>("avatar_height"); + mWearablePtr = NULL; + configureAlphaCheckbox(LLVOAvatarDefines::TEX_LOWER_ALPHA, "lower alpha texture invisible"); + configureAlphaCheckbox(LLVOAvatarDefines::TEX_UPPER_ALPHA, "upper alpha texture invisible"); + configureAlphaCheckbox(LLVOAvatarDefines::TEX_HEAD_ALPHA, "head alpha texture invisible"); + configureAlphaCheckbox(LLVOAvatarDefines::TEX_EYES_ALPHA, "eye alpha texture invisible"); + configureAlphaCheckbox(LLVOAvatarDefines::TEX_HAIR_ALPHA, "hair alpha texture invisible"); + return TRUE; } @@ -659,9 +676,10 @@ BOOL LLPanelEditWearable::isDirty() const void LLPanelEditWearable::draw() { updateVerbs(); - if (getWearable()) + if (getWearable() && getWearable()->getType() == LLWearableType::WT_SHAPE) { - updatePanelPickerControls(getWearable()->getType()); + //updating avatar height + updateTypeSpecificControls(LLWearableType::WT_SHAPE); } LLPanel::draw(); @@ -683,6 +701,40 @@ void LLPanelEditWearable::onRevertButtonClicked(void* userdata) panel->revertChanges(); } + +void LLPanelEditWearable::onCommitSexChange() +{ + if (!isAgentAvatarValid()) return; + + LLWearableType::EType type = mWearablePtr->getType(); + U32 index = gAgentWearables.getWearableIndex(mWearablePtr); + + if( !gAgentWearables.isWearableModifiable(type, index)) + { + return; + } + + LLViewerVisualParam* param = static_cast<LLViewerVisualParam*>(gAgentAvatarp->getVisualParam( "male" )); + if( !param ) + { + return; + } + + bool is_new_sex_male = (gSavedSettings.getU32("AvatarSex") ? SEX_MALE : SEX_FEMALE) == SEX_MALE; + LLWearable* wearable = gAgentWearables.getWearable(type, index); + if (wearable) + { + wearable->setVisualParamWeight(param->getID(), is_new_sex_male, FALSE); + } + param->setWeight( is_new_sex_male, FALSE ); + + gAgentAvatarp->updateSexDependentLayerSets( FALSE ); + + gAgentAvatarp->updateVisualParams(); + + updateScrollingPanelUI(); +} + void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl) { const LLTextureCtrl* texture_ctrl = dynamic_cast<const LLTextureCtrl*>(ctrl); @@ -694,7 +746,7 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl) if (getWearable()) { - EWearableType type = getWearable()->getType(); + LLWearableType::EType type = getWearable()->getType(); const PickerControlEntryNamePredicate name_pred(texture_ctrl->getName()); const LLEditWearableDictionary::PickerControlEntry* entry = find_picker_ctrl_entry_if<LLTextureCtrl, PickerControlEntryNamePredicate>(type, name_pred); @@ -725,7 +777,7 @@ void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl) { if (getWearable()) { - EWearableType type = getWearable()->getType(); + LLWearableType::EType type = getWearable()->getType(); const PickerControlEntryNamePredicate name_pred(ctrl->getName()); const LLEditWearableDictionary::PickerControlEntry* entry = find_picker_ctrl_entry_if<LLColorSwatchCtrl, PickerControlEntryNamePredicate>(type, name_pred); @@ -747,7 +799,7 @@ void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl) } } -void LLPanelEditWearable::updatePanelPickerControls(EWearableType type) +void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type) { LLPanel* panel = getPanel(type); if (!panel) @@ -823,7 +875,7 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) mWearableItem = gInventory.getItem(mWearablePtr->getItemID()); llassert(mWearableItem); - EWearableType type = wearable->getType(); + LLWearableType::EType type = wearable->getType(); LLPanel *targetPanel = NULL; std::string title; std::string description_title; @@ -849,6 +901,70 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) // Update picker controls state for_each_picker_ctrl_entry <LLColorSwatchCtrl> (targetPanel, type, boost::bind(set_enabled_color_swatch_ctrl, show, _1, _2)); for_each_picker_ctrl_entry <LLTextureCtrl> (targetPanel, type, boost::bind(set_enabled_texture_ctrl, show, _1, _2)); + + showDefaultSubpart(); +} + +void LLPanelEditWearable::showDefaultSubpart() +{ + changeCamera(0); +} + +void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index) +{ + bool expanded = param.asBoolean(); + + if (!mWearablePtr || !gAgentCamera.cameraCustomizeAvatar()) + { + // we don't have a valid wearable we're editing, or we've left the wearable editor + return; + } + + if (expanded) + { + changeCamera(index); + } + +} + +void LLPanelEditWearable::changeCamera(U8 subpart) +{ + const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType()); + if (!wearable_entry) + { + llinfos << "could not get wearable dictionary entry for wearable type: " << mWearablePtr->getType() << llendl; + return; + } + + if (subpart >= wearable_entry->mSubparts.size()) + { + llinfos << "accordion tab expanded for invalid subpart. Wearable type: " << mWearablePtr->getType() << " subpart num: " << subpart << llendl; + return; + } + + ESubpart subpart_e = wearable_entry->mSubparts[subpart]; + const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); + + if (!subpart_entry) + { + llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; + return; + } + + // Update the camera + gMorphView->setCameraDistToDefault(); + gMorphView->setCameraTargetJoint( gAgentAvatarp->getJoint( subpart_entry->mTargetJoint ) ); + gMorphView->setCameraTargetOffset( subpart_entry->mTargetOffset ); + gMorphView->setCameraOffset( subpart_entry->mCameraOffset ); + if (gSavedSettings.getBOOL("AppearanceCameraMovement")) + { + gMorphView->updateCamera(); + } +} + +void LLPanelEditWearable::updateScrollingPanelList() +{ + updateScrollingPanelUI(); } void LLPanelEditWearable::initializePanel() @@ -859,11 +975,14 @@ void LLPanelEditWearable::initializePanel() return; } - EWearableType type = mWearablePtr->getType(); + LLWearableType::EType type = mWearablePtr->getType(); // set name mTextEditor->setText(mWearablePtr->getName()); + // toggle wearable type-specific controls + toggleTypeSpecificControls(type); + // clear and rebuild visual param list const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); if (!wearable_entry) @@ -906,6 +1025,9 @@ void LLPanelEditWearable::initializePanel() // what edit group do we want to extract params for? const std::string edit_group = subpart_entry->mEditGroup; + // initialize callback to ensure camera view changes appropriately. + tab->setDropDownStateChangedCallback(boost::bind(&LLPanelEditWearable::onTabExpandedCollapsed,this,_2,index)); + // storage for ordered list of visual params value_map_t sorted_params; getSortedParams(sorted_params, edit_group); @@ -919,7 +1041,44 @@ void LLPanelEditWearable::initializePanel() for_each_picker_ctrl_entry <LLColorSwatchCtrl> (getPanel(type), type, boost::bind(init_color_swatch_ctrl, this, _1, _2)); for_each_picker_ctrl_entry <LLTextureCtrl> (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2)); + showDefaultSubpart(); updateVerbs(); + + if (getWearable()) + { + LLWearableType::EType type = getWearable()->getType(); + updatePanelPickerControls(type); + updateTypeSpecificControls(type); + } +} + +void LLPanelEditWearable::toggleTypeSpecificControls(LLWearableType::EType type) +{ + // Toggle controls specific to shape editing panel. + { + bool is_shape = (type == LLWearableType::WT_SHAPE); + childSetVisible("sex_radio", is_shape); + childSetVisible("female_icon", is_shape); + childSetVisible("male_icon", is_shape); + } +} + +void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type) +{ + // Update controls specific to shape editing panel. + if (type == LLWearableType::WT_SHAPE) + { + // Update avatar height + std::string avatar_height_str = llformat("%.2f", gAgentAvatarp->mBodySize.mV[VZ]); + mTxtAvatarHeight->setTextArg("[HEIGHT]", avatar_height_str); + } + + if (LLWearableType::WT_ALPHA == type) + { + updateAlphaCheckboxes(); + + initPreviousAlphaTextures(); + } } void LLPanelEditWearable::updateScrollingPanelUI() @@ -930,12 +1089,14 @@ void LLPanelEditWearable::updateScrollingPanelUI() return; } - EWearableType type = mWearablePtr->getType(); + LLWearableType::EType type = mWearablePtr->getType(); LLPanel *panel = getPanel(type); if(panel && (mWearablePtr->getItemID().notNull())) { const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); + llassert(wearable_entry); + if (!wearable_entry) return; U8 num_subparts = wearable_entry->mSubparts.size(); LLScrollingPanelParam::sUpdateDelayFrames = 0; @@ -960,67 +1121,67 @@ void LLPanelEditWearable::updateScrollingPanelUI() } } -LLPanel* LLPanelEditWearable::getPanel(EWearableType type) +LLPanel* LLPanelEditWearable::getPanel(LLWearableType::EType type) { switch (type) { - case WT_SHAPE: + case LLWearableType::WT_SHAPE: return mPanelShape; break; - case WT_SKIN: + case LLWearableType::WT_SKIN: return mPanelSkin; break; - case WT_HAIR: + case LLWearableType::WT_HAIR: return mPanelHair; break; - case WT_EYES: + case LLWearableType::WT_EYES: return mPanelEyes; break; - case WT_SHIRT: + case LLWearableType::WT_SHIRT: return mPanelShirt; break; - case WT_PANTS: + case LLWearableType::WT_PANTS: return mPanelPants; break; - case WT_SHOES: + case LLWearableType::WT_SHOES: return mPanelShoes; break; - case WT_SOCKS: + case LLWearableType::WT_SOCKS: return mPanelSocks; break; - case WT_JACKET: + case LLWearableType::WT_JACKET: return mPanelJacket; break; - case WT_GLOVES: + case LLWearableType::WT_GLOVES: return mPanelGloves; break; - case WT_UNDERSHIRT: + case LLWearableType::WT_UNDERSHIRT: return mPanelUndershirt; break; - case WT_UNDERPANTS: + case LLWearableType::WT_UNDERPANTS: return mPanelUnderpants; break; - case WT_SKIRT: + case LLWearableType::WT_SKIRT: return mPanelSkirt; break; - case WT_ALPHA: + case LLWearableType::WT_ALPHA: return mPanelAlpha; break; - case WT_TATTOO: + case LLWearableType::WT_TATTOO: return mPanelTattoo; break; default: @@ -1089,6 +1250,93 @@ void LLPanelEditWearable::updateVerbs() mBtnRevert->setEnabled(is_dirty); childSetEnabled("save_as_button", is_dirty && can_copy); + + if(isAgentAvatarValid()) + { + // Update viewer's radio buttons (of RadioGroup with control_name="AvatarSex") of Avatar's gender + // with value from "AvatarSex" setting + gSavedSettings.setU32("AvatarSex", (gAgentAvatarp->getSex() == SEX_MALE) ); + } + +} + +void LLPanelEditWearable::configureAlphaCheckbox(LLVOAvatarDefines::ETextureIndex te, const std::string& name) +{ + LLCheckBoxCtrl* checkbox = mPanelAlpha->getChild<LLCheckBoxCtrl>(name); + checkbox->setCommitCallback(boost::bind(&LLPanelEditWearable::onInvisibilityCommit, this, checkbox, te)); + + mAlphaCheckbox2Index[name] = te; +} + +void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LLVOAvatarDefines::ETextureIndex te) +{ + if (!checkbox_ctrl) return; + if (!getWearable()) return; + + llinfos << "onInvisibilityCommit, self " << this << " checkbox_ctrl " << checkbox_ctrl << llendl; + + bool new_invis_state = checkbox_ctrl->get(); + if (new_invis_state) + { + LLLocalTextureObject *lto = getWearable()->getLocalTextureObject(te); + mPreviousAlphaTexture[te] = lto->getID(); + + LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture( IMG_INVISIBLE ); + U32 index = gAgentWearables.getWearableIndex(getWearable()); + gAgentAvatarp->setLocalTexture(te, image, FALSE, index); + gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE); + } + else + { + // Try to restore previous texture, if any. + LLUUID prev_id = mPreviousAlphaTexture[te]; + if (prev_id.isNull() || (prev_id == IMG_INVISIBLE)) + { + prev_id = LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ); + } + if (prev_id.isNull()) return; + + LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(prev_id); + if (!image) return; + + U32 index = gAgentWearables.getWearableIndex(getWearable()); + gAgentAvatarp->setLocalTexture(te, image, FALSE, index); + gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE); + } + + updatePanelPickerControls(getWearable()->getType()); +} + +void LLPanelEditWearable::updateAlphaCheckboxes() +{ + for(string_texture_index_map_t::iterator iter = mAlphaCheckbox2Index.begin(); + iter != mAlphaCheckbox2Index.end(); ++iter ) + { + LLVOAvatarDefines::ETextureIndex te = (LLVOAvatarDefines::ETextureIndex)iter->second; + LLCheckBoxCtrl* ctrl = mPanelAlpha->getChild<LLCheckBoxCtrl>(iter->first); + if (ctrl) + { + ctrl->set(!gAgentAvatarp->isTextureVisible(te, mWearablePtr)); + } + } +} + +void LLPanelEditWearable::initPreviousAlphaTextures() +{ + initPreviousAlphaTextureEntry(TEX_LOWER_ALPHA); + initPreviousAlphaTextureEntry(TEX_UPPER_ALPHA); + initPreviousAlphaTextureEntry(TEX_HEAD_ALPHA); + initPreviousAlphaTextureEntry(TEX_EYES_ALPHA); + initPreviousAlphaTextureEntry(TEX_LOWER_ALPHA); +} + +void LLPanelEditWearable::initPreviousAlphaTextureEntry(LLVOAvatarDefines::ETextureIndex te) +{ + LLLocalTextureObject *lto = getWearable()->getLocalTextureObject(te); + if (lto) + { + mPreviousAlphaTexture[te] = lto->getID(); + } } // EOF diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 76b0ddb3cc..b6b8c0c781 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -1,6 +1,6 @@ /** - * @file llfloatercustomize.h - * @brief The customize avatar floater, triggered by "Appearance..." + * @file llpaneleditwearable.h + * @brief A LLPanel dedicated to the editing of wearables. * * $LicenseInfo:firstyear=2009&license=viewergpl$ * @@ -36,8 +36,10 @@ #include "llpanel.h" #include "llscrollingpanellist.h" #include "llmodaldialog.h" -#include "llwearabledictionary.h" +#include "llvoavatardefines.h" +#include "llwearabletype.h" +class LLCheckBoxCtrl; class LLWearable; class LLTextEditor; class LLTextBox; @@ -63,7 +65,14 @@ public: void saveChanges(); void revertChanges(); + void showDefaultSubpart(); + void onTabExpandedCollapsed(const LLSD& param, U8 index); + + void updateScrollingPanelList(); + static void onRevertButtonClicked(void* userdata); + void onCommitSexChange(); + private: typedef std::map<F32, LLViewerVisualParam*> value_map_t; @@ -71,7 +80,7 @@ private: void showWearable(LLWearable* wearable, BOOL show); void initializePanel(); void updateScrollingPanelUI(); - LLPanel* getPanel(EWearableType type); + LLPanel* getPanel(LLWearableType::EType type); void getSortedParams(value_map_t &sorted_params, const std::string &edit_group); void buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab); // update bottom bar buttons ("Save", "Revert", etc) @@ -79,7 +88,19 @@ private: void onColorSwatchCommit(const LLUICtrl*); void onTexturePickerCommit(const LLUICtrl*); - void updatePanelPickerControls(EWearableType type); + void updatePanelPickerControls(LLWearableType::EType type); + void toggleTypeSpecificControls(LLWearableType::EType type); + void updateTypeSpecificControls(LLWearableType::EType type); + + // changes camera angle to default for selected subpart + void changeCamera(U8 subpart); + + //alpha mask checkboxes + void configureAlphaCheckbox(LLVOAvatarDefines::ETextureIndex te, const std::string& name); + void onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LLVOAvatarDefines::ETextureIndex te); + void updateAlphaCheckboxes(); + void initPreviousAlphaTextures(); + void initPreviousAlphaTextureEntry(LLVOAvatarDefines::ETextureIndex te); // the pointer to the wearable we're editing. NULL means we're not editing a wearable. LLWearable *mWearablePtr; @@ -91,6 +112,7 @@ private: LLTextBox *mPanelTitle; LLTextBox *mDescTitle; + LLTextBox *mTxtAvatarHeight; // This text editor reference will change each time we edit a new wearable - @@ -116,6 +138,12 @@ private: LLPanel *mPanelSkirt; LLPanel *mPanelAlpha; LLPanel *mPanelTattoo; + + typedef std::map<std::string, LLVOAvatarDefines::ETextureIndex> string_texture_index_map_t; + string_texture_index_map_t mAlphaCheckbox2Index; + + typedef std::map<LLVOAvatarDefines::ETextureIndex, LLUUID> s32_uuid_map_t; + s32_uuid_map_t mPreviousAlphaTexture; }; #endif diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index c00b6a4147..d997b83cbb 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -92,8 +92,7 @@ LLPanelGroup::LLPanelGroup() : LLPanel(), LLGroupMgrObserver( LLUUID() ), mSkipRefresh(FALSE), - mButtonJoin(NULL), - mShowingNotifyDialog(false) + mButtonJoin(NULL) { // Set up the factory callbacks. // Roles sub tabs @@ -201,7 +200,7 @@ BOOL LLPanelGroup::postBuild() mJoinText = panel_general->getChild<LLUICtrl>("join_cost_text"); } - gVoiceClient->addObserver(this); + LLVoiceClient::getInstance()->addObserver(this); return TRUE; } @@ -322,7 +321,7 @@ void LLPanelGroup::onChange(EStatusType status, const std::string &channelURI, b return; } - childSetEnabled("btn_call", LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()); + childSetEnabled("btn_call", LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); } void LLPanelGroup::notifyObservers() @@ -629,69 +628,4 @@ void LLPanelGroup::showNotice(const std::string& subject, } -bool LLPanelGroup::canClose() -{ - if(getVisible() == false) - return true; - - bool need_save = false; - std::string mesg; - for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it) - if(need_save|=(*it)->needsApply(mesg)) - break; - if(!need_save) - return false; - // If no message was provided, give a generic one. - if (mesg.empty()) - { - mesg = mDefaultNeedsApplyMesg; - } - // Create a notify box, telling the user about the unapplied tab. - LLSD args; - args["NEEDS_APPLY_MESSAGE"] = mesg; - args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; - - LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2)); - - mShowingNotifyDialog = true; - - return false; -} - -bool LLPanelGroup::notifyChildren(const LLSD& info) -{ - if(info.has("request") && mID.isNull() ) - { - std::string str_action = info["request"]; - - if (str_action == "quit" ) - { - canClose(); - return true; - } - if(str_action == "wait_quit") - return mShowingNotifyDialog; - } - return false; -} -bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - mShowingNotifyDialog = false; - switch (option) - { - case 0: // "Apply Changes" - apply(); - break; - case 1: // "Ignore Changes" - break; - case 2: // "Cancel" - default: - // Do nothing. The user is canceling the action. - // If we were quitting, we didn't really mean it. - LLAppViewer::instance()->abortQuit(); - break; - } - return false; -} diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 359f252383..13a03b0713 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -95,9 +95,6 @@ public: LLOfferInfo* inventory_offer); - bool notifyChildren (const LLSD& info); - bool handleNotifyCallback(const LLSD&, const LLSD&); - protected: virtual void update(LLGroupChange gc); @@ -117,9 +114,6 @@ protected: protected: bool apply(LLPanelGroupTab* tab); - bool canClose(); - - bool mShowingNotifyDialog; LLTimer mRefreshTimer; diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 0a83ba8212..555248e31a 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -212,7 +212,6 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group) if (mInsignia) { mInsignia->setCommitCallback(onCommitAny, this); - mDefaultIconID = mInsignia->getImageAssetID(); } mFounderName = getChild<LLNameBox>("founder_name"); @@ -656,7 +655,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) } else { - mInsignia->setImageAssetID(mDefaultIconID); + mInsignia->setImageAssetName(mInsignia->getDefaultImageName()); } } @@ -846,6 +845,8 @@ void LLPanelGroupGeneral::reset() mInsignia->setEnabled(true); + mInsignia->setImageAssetName(mInsignia->getDefaultImageName()); + { std::string empty_str = ""; mEditCharter->setText(empty_str); diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 6245018871..6f4fa994da 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -95,7 +95,6 @@ private: BOOL mChanged; BOOL mFirstUse; std::string mIncompleteMemberDataStr; - LLUUID mDefaultIconID; // Group information (include any updates in updateChanged) LLLineEditor *mGroupNameEditor; diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 230e484fad..42ff514f09 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -44,7 +44,6 @@ #include "llfloaterinventory.h" #include "llagent.h" #include "llagentui.h" -#include "lltooldraganddrop.h" #include "lllineeditor.h" #include "lltexteditor.h" @@ -60,6 +59,7 @@ #include "llviewerwindow.h" #include "llviewermessage.h" #include "llnotificationsutil.h" +#include "llgiveinventory.h" static LLRegisterPanelClassWrapper<LLPanelGroupNotices> t_panel_group_notices("panel_group_notices"); @@ -162,7 +162,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, { LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data; if(gInventory.getItem(inv_item->getUUID()) - && LLToolDragAndDrop::isInventoryGroupGiveAcceptable(inv_item)) + && LLGiveInventory::isInventoryGroupGiveAcceptable(inv_item)) { // *TODO: get multiple object transfers working *accept = ACCEPT_YES_COPY_SINGLE; @@ -335,9 +335,10 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item) item_is_multi = TRUE; }; - std::string icon_name = get_item_icon_name(inv_item->getType(), + std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), + inv_item->getIsLinkType(), item_is_multi ); mCreateInventoryIcon->setValue(icon_name); @@ -552,9 +553,9 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) row["columns"][0]["column"] = "icon"; if (has_attachment) { - std::string icon_name = get_item_icon_name( + std::string icon_name = LLInventoryIcon::getIconName( (LLAssetType::EType)asset_type, - LLInventoryType::IT_NONE,FALSE, FALSE); + LLInventoryType::IT_NONE); row["columns"][0]["type"] = "icon"; row["columns"][0]["value"] = icon_name; } @@ -620,9 +621,8 @@ void LLPanelGroupNotices::showNotice(const std::string& subject, { mInventoryOffer = inventory_offer; - std::string icon_name = get_item_icon_name(mInventoryOffer->mType, - LLInventoryType::IT_TEXTURE, - 0, FALSE); + std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType, + LLInventoryType::IT_TEXTURE); mViewInventoryIcon->setValue(icon_name); mViewInventoryIcon->setVisible(TRUE); diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 0c24e6ad22..b356fe6bfd 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -118,8 +118,7 @@ LLPanelGroupRoles::LLPanelGroupRoles() mCurrentTab(NULL), mRequestedTab( NULL ), mSubTabContainer( NULL ), - mFirstUse( TRUE ), - mIgnoreTransition( FALSE ) + mFirstUse( TRUE ) { } @@ -145,8 +144,6 @@ BOOL LLPanelGroupRoles::postBuild() llwarns << "Invalid subtab panel: " << panel->getName() << llendl; return FALSE; } - // Add click callbacks to all the tabs. - mSubTabContainer->setCommitCallback(boost::bind(&LLPanelGroupRoles::handleClickSubTab, this)); // Hand the subtab a pointer to this LLPanelGroupRoles, so that it can // look around for the widgets it is interested in. @@ -155,6 +152,8 @@ BOOL LLPanelGroupRoles::postBuild() //subtabp->addObserver(this); } + // Add click callbacks to tab switching. + mSubTabContainer->setValidateBeforeCommit(boost::bind(&LLPanelGroupRoles::handleSubTabSwitch, this, _1)); // Set the current tab to whatever is currently being shown. mCurrentTab = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); @@ -196,30 +195,17 @@ BOOL LLPanelGroupRoles::isVisibleByAgent(LLAgent* agentp) } -void LLPanelGroupRoles::handleClickSubTab() +bool LLPanelGroupRoles::handleSubTabSwitch(const LLSD& data) { - // If we are already handling a transition, - // ignore this. - if (mIgnoreTransition) - { - return; - } - - mRequestedTab = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); - - // Make sure they aren't just clicking the same tab... - if (mRequestedTab == mCurrentTab) + std::string panel_name = data.asString(); + + if(mRequestedTab != NULL)//we already have tab change request { - return; + return false; } - // Try to switch from the current panel to the panel the user selected. - attemptTransition(); -} + mRequestedTab = static_cast<LLPanelGroupTab*>(mSubTabContainer->getPanelByName(panel_name)); -BOOL LLPanelGroupRoles::attemptTransition() -{ - // Check if the current tab needs to be applied. std::string mesg; if (mCurrentTab && mCurrentTab->needsApply(mesg)) { @@ -235,26 +221,14 @@ BOOL LLPanelGroupRoles::attemptTransition() LLNotificationsUtil::add("PanelGroupApply", args, LLSD(), boost::bind(&LLPanelGroupRoles::handleNotifyCallback, this, _1, _2)); mHasModal = TRUE; - // We need to reselect the current tab, since it isn't finished. - if (mSubTabContainer) - { - mIgnoreTransition = TRUE; - mSubTabContainer->selectTabPanel( mCurrentTab ); - mIgnoreTransition = FALSE; - } + // Returning FALSE will block a close action from finishing until // we get a response back from the user. - return FALSE; - } - else - { - // The current panel didn't have anything it needed to apply. - if (mRequestedTab) - { - transitionToTab(); - } - return TRUE; + return false; } + + transitionToTab(); + return true; } void LLPanelGroupRoles::transitionToTab() @@ -271,6 +245,7 @@ void LLPanelGroupRoles::transitionToTab() // This is now the current tab; mCurrentTab = mRequestedTab; mCurrentTab->activate(); + mRequestedTab = 0; } } @@ -278,6 +253,7 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); mHasModal = FALSE; + LLPanelGroupTab* transition_tab = mRequestedTab; switch (option) { case 0: // "Apply Changes" @@ -297,26 +273,20 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS // Skip switching tabs. break; } - - // This panel's info successfully applied. - // Switch to the next panel. - // No break! Continue into 'Ignore Changes' which just switches tabs. - mIgnoreTransition = TRUE; - mSubTabContainer->selectTabPanel( mRequestedTab ); - mIgnoreTransition = FALSE; transitionToTab(); + mSubTabContainer->selectTabPanel( transition_tab ); + break; } case 1: // "Ignore Changes" // Switch to the requested panel without applying changes cancel(); - mIgnoreTransition = TRUE; - mSubTabContainer->selectTabPanel( mRequestedTab ); - mIgnoreTransition = FALSE; transitionToTab(); + mSubTabContainer->selectTabPanel( transition_tab ); break; case 2: // "Cancel" default: + mRequestedTab = NULL; // Do nothing. The user is canceling the action. break; } @@ -827,8 +797,37 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) void LLPanelGroupMembersSubTab::setGroupID(const LLUUID& id) { + //clear members list + if(mMembersList) mMembersList->deleteAllItems(); + if(mAssignedRolesList) mAssignedRolesList->deleteAllItems(); + if(mAllowedActionsList) mAllowedActionsList->deleteAllItems(); + LLPanelGroupSubTab::setGroupID(id); +} + +void LLPanelGroupRolesSubTab::setGroupID(const LLUUID& id) +{ + if(mRolesList) mRolesList->deleteAllItems(); + if(mAssignedMembersList) mAssignedMembersList->deleteAllItems(); + if(mAllowedActionsList) mAllowedActionsList->deleteAllItems(); + + if(mRoleName) mRoleName->clear(); + if(mRoleDescription) mRoleDescription->clear(); + if(mRoleTitle) mRoleTitle->clear(); + + setFooterEnabled(FALSE); + + LLPanelGroupSubTab::setGroupID(id); +} +void LLPanelGroupActionsSubTab::setGroupID(const LLUUID& id) +{ + if(mActionList) mActionList->deleteAllItems(); + if(mActionRoles) mActionRoles->deleteAllItems(); + if(mActionMembers) mActionMembers->deleteAllItems(); + + if(mActionDescription) mActionDescription->clear(); + LLPanelGroupSubTab::setGroupID(id); } @@ -1750,8 +1749,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) mRoleTitle->setKeystrokeCallback(onPropertiesKey, this); mRoleDescription->setCommitOnFocusLost(TRUE); - mRoleDescription->setCommitCallback(onDescriptionCommit, this); - mRoleDescription->setFocusReceivedCallback(boost::bind(onDescriptionFocus, _1, this)); + mRoleDescription->setKeystrokeCallback(boost::bind(&LLPanelGroupRolesSubTab::onDescriptionKeyStroke, this, _1)); setFooterEnabled(FALSE); @@ -2207,14 +2205,10 @@ void LLPanelGroupRolesSubTab::onPropertiesKey(LLLineEditor* ctrl, void* user_dat self->notifyObservers(); } -// static -void LLPanelGroupRolesSubTab::onDescriptionFocus(LLFocusableElement* ctrl, void* user_data) +void LLPanelGroupRolesSubTab::onDescriptionKeyStroke(LLTextEditor* caller) { - LLPanelGroupRolesSubTab* self = static_cast<LLPanelGroupRolesSubTab*>(user_data); - if (!self) return; - - self->mHasRoleChange = TRUE; - self->notifyObservers(); + mHasRoleChange = TRUE; + notifyObservers(); } // static diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 98cebe9882..cb7941ad9e 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -65,7 +65,7 @@ public: virtual BOOL isVisibleByAgent(LLAgent* agentp); - void handleClickSubTab(); + bool handleSubTabSwitch(const LLSD& data); // Checks if the current tab needs to be applied, and tries to switch to the requested tab. BOOL attemptTransition(); @@ -93,7 +93,6 @@ protected: LLPanelGroupTab* mRequestedTab; LLTabContainer* mSubTabContainer; BOOL mFirstUse; - BOOL mIgnoreTransition; std::string mDefaultNeedsApplyMesg; std::string mWantApplyMesg; @@ -245,8 +244,9 @@ public: static void onPropertiesKey(LLLineEditor*, void*); + void onDescriptionKeyStroke(LLTextEditor* caller); + static void onDescriptionCommit(LLUICtrl*, void*); - static void onDescriptionFocus(LLFocusableElement*, void*); static void onMemberVisibilityChange(LLUICtrl*, void*); void handleMemberVisibilityChange(bool value); @@ -258,6 +258,8 @@ public: void handleDeleteRole(); void saveRoleChanges(); + + virtual void setGroupID(const LLUUID& id); protected: void handleActionCheck(LLUICtrl* ctrl, bool force); LLSD createRoleItem(const LLUUID& role_id, std::string name, std::string title, S32 members); @@ -295,6 +297,8 @@ public: virtual void update(LLGroupChange gc); void handleActionSelect(); + + virtual void setGroupID(const LLUUID& id); protected: LLScrollListCtrl* mActionList; LLScrollListCtrl* mActionRoles; diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index c34f0633b9..709bb83fe4 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -81,7 +81,8 @@ void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::E void LLPanelChatControlPanel::updateCallButton() { - bool voice_enabled = LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + // hide/show call button + bool voice_enabled = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId); @@ -124,7 +125,7 @@ BOOL LLPanelChatControlPanel::postBuild() childSetAction("end_call_btn", boost::bind(&LLPanelChatControlPanel::onEndCallButtonClicked, this)); childSetAction("voice_ctrls_btn", boost::bind(&LLPanelChatControlPanel::onOpenVoiceControlsClicked, this)); - gVoiceClient->addObserver(this); + LLVoiceClient::getInstance()->addObserver(this); return TRUE; } diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 0a978d1b26..4bf4f9eac1 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -309,6 +309,25 @@ void LLLandmarksPanel::onTeleport() } // virtual +bool LLLandmarksPanel::isSingleItemSelected() +{ + bool result = false; + + if (mCurrentSelectedList != NULL) + { + LLPlacesFolderView* root_view = + static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder()); + + if (root_view->getSelectedCount() == 1) + { + result = isLandmarkSelected(); + } + } + + return result; +} + +// virtual void LLLandmarksPanel::updateVerbs() { if (!isTabVisible()) @@ -316,8 +335,8 @@ void LLLandmarksPanel::updateVerbs() bool landmark_selected = isLandmarkSelected(); mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport")); - mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map")); mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info")); + mShowOnMapBtn->setEnabled(true); // TODO: mantipov: Uncomment when mShareBtn is supported // Share button should be enabled when neither a folder nor a landmark is selected @@ -974,10 +993,13 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const } else if("create_pick" == command_name) { - std::set<LLUUID> selection; - if ( mCurrentSelectedList && mCurrentSelectedList->getRootFolder()->getSelectionList(selection) ) + if (mCurrentSelectedList) { - return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() ); + std::set<LLUUID> selection = mCurrentSelectedList->getRootFolder()->getSelectionList(); + if (!selection.empty()) + { + return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() ); + } } return false; } diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 2d1eb0f091..8f8d9c2708 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -60,6 +60,7 @@ public: /*virtual*/ void onShowProfile(); /*virtual*/ void onTeleport(); /*virtual*/ void updateVerbs(); + /*virtual*/ bool isSingleItemSelected(); void onSelectionChange(LLPlacesInventoryPanel* inventory_list, const std::deque<LLFolderViewItem*> &items, BOOL user_action); void onSelectorButtonClicked(); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 67aea5544d..c8dae024cf 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -51,11 +51,12 @@ #include "llfocusmgr.h" #include "lllineeditor.h" #include "llnotificationsutil.h" +#include "llsecapi.h" #include "llstartup.h" #include "lltextbox.h" #include "llui.h" #include "lluiconstants.h" -#include "llurlsimstring.h" +#include "llslurl.h" #include "llversioninfo.h" #include "llviewerhelp.h" #include "llviewertexturelist.h" @@ -77,6 +78,7 @@ #pragma warning(disable: 4355) // 'this' used in initializer list #endif // LL_WINDOWS +#include "llsdserialize.h" #define USE_VIEWER_AUTH 0 const S32 BLACK_BORDER_HEIGHT = 160; @@ -104,7 +106,6 @@ public: LLLoginRefreshHandler gLoginRefreshHandler; - // helper class that trys to download a URL from a web site and calls a method // on parent class indicating if the web server is working or not class LLIamHereLogin : public LLHTTPClient::Responder @@ -153,10 +154,6 @@ namespace { boost::intrusive_ptr< LLIamHereLogin > gResponsePtr = 0; }; -void set_start_location(LLUICtrl* ctrl, void* data) -{ - LLURLSimString::setString(ctrl->getValue().asString()); -} //--------------------------------------------------------------------------- // Public methods @@ -187,6 +184,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, delete LLPanelLogin::sInstance; } + mPasswordModified = FALSE; LLPanelLogin::sInstance = this; // add to front so we are the bottom-most child @@ -213,10 +211,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, } #if !USE_VIEWER_AUTH - childSetPrevalidate("first_name_edit", LLTextValidate::validateASCIIPrintableNoSpace); - childSetPrevalidate("last_name_edit", LLTextValidate::validateASCIIPrintableNoSpace); - - childSetCommitCallback("password_edit", mungePassword, this); + childSetPrevalidate("username_edit", LLTextValidate::validateASCIIPrintableNoPipe); getChild<LLLineEditor>("password_edit")->setKeystrokeCallback(onPassKey, this); // change z sort of clickable text to be behind buttons @@ -226,29 +221,17 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLLineEditor* edit = getChild<LLLineEditor>("password_edit"); if (edit) edit->setDrawAsterixes(TRUE); - LLComboBox* combo = getChild<LLComboBox>("start_location_combo"); - - std::string sim_string = LLURLSimString::sInstance.mSimString; - if(sim_string.empty()) - { - LLURLSimString::setString(gSavedSettings.getString("LoginLocation")); - sim_string = LLURLSimString::sInstance.mSimString; - } - - if (!sim_string.empty()) + if(LLStartUp::getStartSLURL().getType() != LLSLURL::LOCATION) { - // Replace "<Type region name>" with this region name - combo->remove(2); - combo->add( sim_string ); - combo->setTextEntry(sim_string); - combo->setCurrentByIndex( 2 ); + LLSLURL slurl(gSavedSettings.getString("LoginLocation")); + LLStartUp::setStartSLURL(slurl); } - - combo->setCommitCallback( &set_start_location, NULL ); + updateLocationCombo(false); LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo"); server_choice_combo->setCommitCallback(onSelectServer, NULL); server_choice_combo->setFocusLostCallback(boost::bind(onServerComboLostFocus, _1)); + updateServerCombo(); childSetAction("connect_btn", onClickConnect, this); @@ -287,34 +270,14 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, web_browser->setTabStop(FALSE); // web_browser->navigateToLocalPage( "loading", "loading.html" ); - if (gSavedSettings.getBOOL("RegInClient")) - { - // need to follow links in the internal browser - web_browser->setOpenInExternalBrowser( false ); - - getChild<LLView>("login_widgets")->setVisible(false); - } - else - { - // make links open in external browser - web_browser->setOpenInExternalBrowser( true ); - - reshapeBrowser(); - } + reshapeBrowser(); // kick off a request to grab the url manually gResponsePtr = LLIamHereLogin::build( this ); - std::string login_page = gSavedSettings.getString("LoginPage"); - if (login_page.empty()) - { - login_page = getString( "real_url" ); - } - LLHTTPClient::head( login_page, gResponsePtr ); -#if !USE_VIEWER_AUTH - // Initialize visibility (and don't force visibility - use prefs) - refreshLocation( false ); -#endif + LLHTTPClient::head( LLGridManager::getInstance()->getLoginPage(), gResponsePtr ); + + updateLocationCombo(false); } @@ -378,21 +341,6 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) } } -void LLPanelLogin::mungePassword(LLUICtrl* caller, void* user_data) -{ - LLPanelLogin* self = (LLPanelLogin*)user_data; - LLLineEditor* editor = (LLLineEditor*)caller; - std::string password = editor->getText(); - - // Re-md5 if we've changed at all - if (password != self->mIncomingPassword) - { - LLMD5 pass((unsigned char *)password.c_str()); - char munged_password[MD5HEX_STR_SIZE]; - pass.hex_digest(munged_password); - self->mMungedPassword = munged_password; - } -} LLPanelLogin::~LLPanelLogin() { @@ -493,14 +441,14 @@ void LLPanelLogin::giveFocus() if( sInstance ) { // Grab focus and move cursor to first blank input field - std::string first = sInstance->childGetText("first_name_edit"); + std::string username = sInstance->childGetText("username_edit"); std::string pass = sInstance->childGetText("password_edit"); - BOOL have_first = !first.empty(); + BOOL have_username = !username.empty(); BOOL have_pass = !pass.empty(); LLLineEditor* edit = NULL; - if (have_first && !have_pass) + if (have_username && !have_pass) { // User saved his name but not his password. Move // focus to password field. @@ -509,7 +457,7 @@ void LLPanelLogin::giveFocus() else { // User doesn't have a name, so start there. - edit = sInstance->getChild<LLLineEditor>("first_name_edit"); + edit = sInstance->getChild<LLLineEditor>("username_edit"); } if (edit) @@ -526,13 +474,12 @@ void LLPanelLogin::showLoginWidgets() { sInstance->childSetVisible("login_widgets", true); LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html"); - web_browser->setOpenInExternalBrowser( true ); sInstance->reshapeBrowser(); // *TODO: Append all the usual login parameters, like first_login=Y etc. std::string splash_screen_url = sInstance->getString("real_url"); web_browser->navigateTo( splash_screen_url, "text/html" ); - LLUICtrl* first_name_edit = sInstance->getChild<LLUICtrl>("first_name_edit"); - first_name_edit->setFocus(TRUE); + LLUICtrl* username_edit = sInstance->getChild<LLUICtrl>("username_edit"); + username_edit->setFocus(TRUE); } // static @@ -554,77 +501,127 @@ void LLPanelLogin::show(const LLRect &rect, } // static -void LLPanelLogin::setFields(const std::string& firstname, - const std::string& lastname, - const std::string& password) +void LLPanelLogin::setFields(LLPointer<LLCredential> credential, + BOOL remember) { if (!sInstance) { llwarns << "Attempted fillFields with no login view shown" << llendl; return; } + LL_INFOS("Credentials") << "Setting login fields to " << *credential << LL_ENDL; - sInstance->childSetText("first_name_edit", firstname); - sInstance->childSetText("last_name_edit", lastname); - - // Max "actual" password length is 16 characters. - // Hex digests are always 32 characters. - if (password.length() == 32) + LLSD identifier = credential->getIdentifier(); + if((std::string)identifier["type"] == "agent") + { + sInstance->childSetText("username_edit", (std::string)identifier["first_name"] + " " + + (std::string)identifier["last_name"]); + } + else if((std::string)identifier["type"] == "account") + { + sInstance->childSetText("username_edit", (std::string)identifier["account_name"]); + } + else + { + sInstance->childSetText("username_edit", std::string()); + } + // if the password exists in the credential, set the password field with + // a filler to get some stars + LLSD authenticator = credential->getAuthenticator(); + LL_INFOS("Credentials") << "Setting authenticator field " << authenticator["type"].asString() << LL_ENDL; + if(authenticator.isMap() && + authenticator.has("secret") && + (authenticator["secret"].asString().size() > 0)) { + // This is a MD5 hex digest of a password. // We don't actually use the password input field, // fill it with MAX_PASSWORD characters so we get a // nice row of asterixes. const std::string filler("123456789!123456"); - sInstance->childSetText("password_edit", filler); - sInstance->mIncomingPassword = filler; - sInstance->mMungedPassword = password; + sInstance->childSetText("password_edit", std::string("123456789!123456")); } else { - // this is a normal text password - sInstance->childSetText("password_edit", password); - sInstance->mIncomingPassword = password; - LLMD5 pass((unsigned char *)password.c_str()); - char munged_password[MD5HEX_STR_SIZE]; - pass.hex_digest(munged_password); - sInstance->mMungedPassword = munged_password; + sInstance->childSetText("password_edit", std::string()); } + sInstance->childSetValue("remember_check", remember); } // static -void LLPanelLogin::addServer(const std::string& server, S32 domain_name) +void LLPanelLogin::getFields(LLPointer<LLCredential>& credential, + BOOL& remember) { if (!sInstance) { - llwarns << "Attempted addServer with no login view shown" << llendl; + llwarns << "Attempted getFields with no login view shown" << llendl; return; } + + // load the credential so we can pass back the stored password or hash if the user did + // not modify the password field. + + credential = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); - LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); - combo->add(server, LLSD(domain_name) ); - combo->setCurrentByIndex(0); -} - -// static -void LLPanelLogin::getFields(std::string *firstname, - std::string *lastname, - std::string *password) -{ - if (!sInstance) + LLSD identifier = LLSD::emptyMap(); + LLSD authenticator = LLSD::emptyMap(); + + if(credential.notNull()) { - llwarns << "Attempted getFields with no login view shown" << llendl; - return; + authenticator = credential->getAuthenticator(); } - *firstname = sInstance->childGetText("first_name_edit"); - LLStringUtil::trim(*firstname); - - *lastname = sInstance->childGetText("last_name_edit"); - LLStringUtil::trim(*lastname); + std::string username = sInstance->childGetText("username_edit"); + LLStringUtil::trim(username); + std::string password = sInstance->childGetText("password_edit"); - *password = sInstance->mMungedPassword; + LL_INFOS2("Credentials", "Authentication") << "retrieving username:" << username << LL_ENDL; + // determine if the username is a first/last form or not. + size_t separator_index = username.find_first_of(' '); + if (separator_index == username.npos) + { + LL_INFOS2("Credentials", "Authentication") << "account: " << username << LL_ENDL; + // single username, so this is a 'clear' identifier + identifier["type"] = CRED_IDENTIFIER_TYPE_ACCOUNT; + identifier["account_name"] = username; + + if (LLPanelLogin::sInstance->mPasswordModified) + { + authenticator = LLSD::emptyMap(); + // password is plaintext + authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR; + authenticator["secret"] = password; + } + } + else + { + std::string first = username.substr(0, separator_index); + std::string last = username.substr(separator_index, username.npos); + LLStringUtil::trim(last); + + if (last.find_first_of(' ') == last.npos) + { + LL_INFOS2("Credentials", "Authentication") << "agent: " << username << LL_ENDL; + // traditional firstname / lastname + identifier["type"] = CRED_IDENTIFIER_TYPE_AGENT; + identifier["first_name"] = first; + identifier["last_name"] = last; + + if (LLPanelLogin::sInstance->mPasswordModified) + { + authenticator = LLSD::emptyMap(); + authenticator["type"] = CRED_AUTHENTICATOR_TYPE_HASH; + authenticator["algorithm"] = "md5"; + LLMD5 pass((const U8 *)password.c_str()); + char md5pass[33]; /* Flawfinder: ignore */ + pass.hex_digest(md5pass); + authenticator["secret"] = md5pass; + } + } + } + credential = gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), identifier, authenticator); + remember = sInstance->childGetValue("remember_check"); } // static @@ -644,64 +641,112 @@ BOOL LLPanelLogin::isGridComboDirty() } // static -void LLPanelLogin::getLocation(std::string &location) +BOOL LLPanelLogin::areCredentialFieldsDirty() { if (!sInstance) { - llwarns << "Attempted getLocation with no login view shown" << llendl; - return; + llwarns << "Attempted getServer with no login view shown" << llendl; } - - LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); - location = combo->getValue().asString(); + else + { + std::string username = sInstance->childGetText("username_edit"); + LLStringUtil::trim(username); + std::string password = sInstance->childGetText("password_edit"); + LLLineEditor* ctrl = sInstance->getChild<LLLineEditor>("username_edit"); + if(ctrl && ctrl->isDirty()) + { + return true; + } + ctrl = sInstance->getChild<LLLineEditor>("password_edit"); + if(ctrl && ctrl->isDirty()) + { + return true; + } + } + return false; } + // static -void LLPanelLogin::refreshLocation( bool force_visible ) +void LLPanelLogin::updateLocationCombo( bool force_visible ) { - if (!sInstance) return; - -#if USE_VIEWER_AUTH - loadLoginPage(); -#else + if (!sInstance) + { + return; + } + + LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); + + switch(LLStartUp::getStartSLURL().getType()) + { + case LLSLURL::LOCATION: + { + + combo->setCurrentByIndex( 2 ); + combo->setTextEntry(LLStartUp::getStartSLURL().getLocationString()); + break; + } + case LLSLURL::HOME_LOCATION: + combo->setCurrentByIndex(1); + break; + default: + combo->setCurrentByIndex(0); + break; + } + BOOL show_start = TRUE; - + if ( ! force_visible ) - { - // Don't show on first run after install - // Otherwise ShowStartLocation defaults to true. show_start = gSavedSettings.getBOOL("ShowStartLocation"); - } - - // Update the value of the location combo. - updateLocationUI(); sInstance->childSetVisible("start_location_combo", show_start); sInstance->childSetVisible("start_location_text", show_start); - + BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid"); + sInstance->childSetVisible("server_combo_text", show_server); sInstance->childSetVisible("server_combo", show_server); - -#endif } // static -void LLPanelLogin::updateLocationUI() +void LLPanelLogin::updateStartSLURL() { if (!sInstance) return; - std::string sim_string = LLURLSimString::sInstance.mSimString; - if (!sim_string.empty()) + LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); + S32 index = combo->getCurrentIndex(); + + switch (index) { - // Replace "<Type region name>" with this region name - LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); - combo->remove(2); - combo->add( sim_string ); - combo->setTextEntry(sim_string); - combo->setCurrentByIndex( 2 ); + case 0: + { + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST)); + break; + } + case 1: + { + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME)); + break; + } + default: + { + LLSLURL slurl = LLSLURL(combo->getValue().asString()); + if(slurl.getType() == LLSLURL::LOCATION) + { + // we've changed the grid, so update the grid selection + LLStartUp::setStartSLURL(slurl); + } + break; + } } } + +void LLPanelLogin::setLocation(const LLSLURL& slurl) +{ + LLStartUp::setStartSLURL(slurl); + updateServer(); +} + // static void LLPanelLogin::closePanel() { @@ -735,15 +780,13 @@ void LLPanelLogin::loadLoginPage() std::ostringstream oStr; - std::string login_page = gSavedSettings.getString("LoginPage"); - if (login_page.empty()) - { - login_page = sInstance->getString( "real_url" ); - } + std::string login_page = LLGridManager::getInstance()->getLoginPage(); + oStr << login_page; // Use the right delimeter depending on how LLURI parses the URL LLURI login_page_uri = LLURI(login_page); + std::string first_query_delimiter = "&"; if (login_page_uri.queryMap().size() == 0) { @@ -775,11 +818,10 @@ void LLPanelLogin::loadLoginPage() curl_free(curl_version); // Grid - char* curl_grid = curl_escape(LLViewerLogin::getInstance()->getGridLabel().c_str(), 0); + char* curl_grid = curl_escape(LLGridManager::getInstance()->getGridLoginID().c_str(), 0); oStr << "&grid=" << curl_grid; curl_free(curl_grid); - - gViewerWindow->setMenuBackgroundColor(false, !LLViewerLogin::getInstance()->isInProductionGrid()); + gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid()); gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); @@ -804,30 +846,20 @@ void LLPanelLogin::loadLoginPage() location = gSavedSettings.getString("LoginLocation"); } - std::string firstname, lastname; + std::string username; if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) { LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); - firstname = cmd_line_login[0].asString(); - lastname = cmd_line_login[1].asString(); + username = cmd_line_login[0].asString() + " " + cmd_line_login[1]; password = cmd_line_login[2].asString(); } - if (firstname.empty()) - { - firstname = gSavedSettings.getString("FirstName"); - } - - if (lastname.empty()) - { - lastname = gSavedSettings.getString("LastName"); - } char* curl_region = curl_escape(region.c_str(), 0); - oStr <<"firstname=" << firstname << - "&lastname=" << lastname << "&location=" << location << "®ion=" << curl_region; + oStr <<"username=" << username << + "&location=" << location << "®ion=" << curl_region; curl_free(curl_region); @@ -860,7 +892,7 @@ void LLPanelLogin::loadLoginPage() #endif LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html"); - + // navigate to the "real" page if (gSavedSettings.getBOOL("RegInClient")) { @@ -909,39 +941,66 @@ void LLPanelLogin::onClickConnect(void *) // JC - Make sure the fields all get committed. sInstance->setFocus(FALSE); - std::string first = sInstance->childGetText("first_name_edit"); - std::string last = sInstance->childGetText("last_name_edit"); - LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); - std::string combo_text = combo->getSimple(); - - bool has_first_and_last = !(first.empty() || last.empty()); - bool has_location = false; - - if(combo_text=="<Type region name>" || combo_text =="") + LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); + LLSD combo_val = combo->getSelectedValue(); + if (combo_val.isUndefined()) { - // *NOTE: Mani - Location field is not always committed by this point! - // This may be duplicate work, but better than not doing the work! - LLURLSimString::sInstance.setString(""); + combo_val = combo->getValue(); } - else + if(combo_val.isUndefined()) + { + LLNotificationsUtil::add("StartRegionEmpty"); + return; + } + try { - // *NOTE: Mani - Location field is not always committed by this point! - LLURLSimString::sInstance.setString(combo_text); - has_location = true; + LLGridManager::getInstance()->setGridChoice(combo_val.asString()); } - - if(!has_first_and_last) + catch (LLInvalidGridName ex) { - LLNotificationsUtil::add("MustHaveAccountToLogIn"); + LLSD args; + args["GRID"] = combo_val.asString(); + LLNotificationsUtil::add("InvalidGrid", args); + return; } - else if(!has_location) + updateStartSLURL(); + std::string username = sInstance->childGetText("username_edit"); + + + if(username.empty()) { - LLNotificationsUtil::add("StartRegionEmpty"); + // user must type in something into the username field + LLNotificationsUtil::add("MustHaveAccountToLogIn"); } else { - // has both first and last name typed - sInstance->mCallback(0, sInstance->mCallbackData); + LLPointer<LLCredential> cred; + BOOL remember; + getFields(cred, remember); + std::string identifier_type; + cred->identifierType(identifier_type); + LLSD allowed_credential_types; + LLGridManager::getInstance()->getLoginIdentifierTypes(allowed_credential_types); + + // check the typed in credential type against the credential types expected by the server. + for(LLSD::array_iterator i = allowed_credential_types.beginArray(); + i != allowed_credential_types.endArray(); + i++) + { + + if(i->asString() == identifier_type) + { + // yay correct credential type + sInstance->mCallback(0, sInstance->mCallbackData); + return; + } + } + + // Right now, maingrid is the only thing that is picky about + // credential format, as it doesn't yet allow account (single username) + // format creds. - Rox. James, we wanna fix the message when we change + // this. + LLNotificationsUtil::add("InvalidCredentialFormat"); } } } @@ -999,6 +1058,8 @@ void LLPanelLogin::onClickHelp(void*) // static void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { + LLPanelLogin *This = (LLPanelLogin *) user_data; + This->mPasswordModified = TRUE; if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE) { // *TODO: use another way to notify user about enabled caps lock, see EXT-6858 @@ -1006,54 +1067,88 @@ void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) } } -// static -void LLPanelLogin::onSelectServer(LLUICtrl*, void*) -{ - // *NOTE: The paramters for this method are ignored. - // LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) - // calls this method. - - // The user twiddled with the grid choice ui. - // apply the selection to the grid setting. - std::string grid_label; - S32 grid_index; - LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); - LLSD combo_val = combo->getValue(); - - if (LLSD::TypeInteger == combo_val.type()) +void LLPanelLogin::updateServer() +{ + try { - grid_index = combo->getValue().asInteger(); - if ((S32)GRID_INFO_OTHER == grid_index) + updateServerCombo(); + // if they've selected another grid, we should load the credentials + // for that grid and set them to the UI. + if(sInstance && !sInstance->areCredentialFieldsDirty()) { - // This happens if the user specifies a custom grid - // via command line. - grid_label = combo->getSimple(); + LLPointer<LLCredential> credential = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); + bool remember = sInstance->childGetValue("remember_check"); + sInstance->setFields(credential, remember); } + // grid changed so show new splash screen (possibly) + loadLoginPage(); + updateLocationCombo(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION); } - else + catch (LLInvalidGridName ex) { - // no valid selection, return other - grid_index = (S32)GRID_INFO_OTHER; - grid_label = combo_val.asString(); + // do nothing } +} - // This new seelction will override preset uris - // from the command line. - LLViewerLogin* vl = LLViewerLogin::getInstance(); - vl->resetURIs(); - if(grid_index != GRID_INFO_OTHER) +void LLPanelLogin::updateServerCombo() +{ + if (!sInstance) { - vl->setGridChoice((EGridInfo)grid_index); + return; } - else + // We add all of the possible values, sorted, and then add a bar and the current value at the top + LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo"); + server_choice_combo->removeall(); + + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(!gSavedSettings.getBOOL("ShowBetaGrids")); + + for (std::map<std::string, std::string>::iterator grid_choice = known_grids.begin(); + grid_choice != known_grids.end(); + grid_choice++) { - vl->setGridChoice(grid_label); + if (!grid_choice->first.empty()) + { + server_choice_combo->add(grid_choice->second, grid_choice->first, ADD_SORTED); + } } + + server_choice_combo->addSeparator(ADD_TOP); + + server_choice_combo->add(LLGridManager::getInstance()->getGridLabel(), + LLGridManager::getInstance()->getGrid(), ADD_TOP); + + server_choice_combo->selectFirstItem(); +} - // grid changed so show new splash screen (possibly) - loadLoginPage(); +// static +void LLPanelLogin::onSelectServer(LLUICtrl*, void*) +{ + // *NOTE: The paramters for this method are ignored. + // LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) + // calls this method. + LL_INFOS("AppInit") << "onSelectServer" << LL_ENDL; + // The user twiddled with the grid choice ui. + // apply the selection to the grid setting. + LLPointer<LLCredential> credential; + + LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); + LLSD combo_val = combo->getSelectedValue(); + if (combo_val.isUndefined()) + { + combo_val = combo->getValue(); + } + + combo = sInstance->getChild<LLComboBox>("start_location_combo"); + combo->setCurrentByIndex(1); + LLStartUp::setStartSLURL(LLSLURL(gSavedSettings.getString("LoginLocation"))); + LLGridManager::getInstance()->setGridChoice(combo_val.asString()); + // This new selection will override preset uris + // from the command line. + updateServer(); + updateLocationCombo(false); + updateLoginPanelLinks(); } void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe) @@ -1066,3 +1161,15 @@ void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe) onSelectServer(combo, NULL); } } + +void LLPanelLogin::updateLoginPanelLinks() +{ + LLSD grid_data; + LLGridManager::getInstance()->getGridInfo(grid_data); + bool system_grid = grid_data.has(GRID_IS_SYSTEM_GRID_VALUE); + + // need to call through sInstance, as it's called from onSelectServer, which + // is static. + sInstance->childSetVisible("create_new_account_text", system_grid); + sInstance->childSetVisible("forgot_password_text", system_grid); +} diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 1fdc3a9361..aa6884ea97 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -41,6 +41,8 @@ class LLLineEditor; class LLUIImage; class LLPanelLoginListener; +class LLSLURL; +class LLCredential; class LLPanelLogin: public LLPanel, @@ -65,20 +67,15 @@ public: void (*callback)(S32 option, void* user_data), void* callback_data); - // Remember password checkbox is set via gSavedSettings "RememberPassword" - static void setFields(const std::string& firstname, const std::string& lastname, - const std::string& password); + static void setFields(LLPointer<LLCredential> credential, BOOL remember); - static void addServer(const std::string& server, S32 domain_name); - static void refreshLocation( bool force_visible ); - static void updateLocationUI(); - - static void getFields(std::string *firstname, std::string *lastname, - std::string *password); + static void getFields(LLPointer<LLCredential>& credential, BOOL& remember); static BOOL isGridComboDirty(); - static void getLocation(std::string &location); - + static BOOL areCredentialFieldsDirty(); + static void setLocation(const LLSLURL& slurl); + + static void updateLocationCombo(bool force_visible); // simply update the combo box static void closePanel(); void setSiteIsAlive( bool alive ); @@ -86,10 +83,10 @@ public: static void loadLoginPage(); static void giveFocus(); static void setAlwaysRefresh(bool refresh); - static void mungePassword(LLUICtrl* caller, void* user_data); // inherited from LLViewerMediaObserver /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); + static void updateServer(); // update the combo box, change the login page to the new server, clear the combo private: friend class LLPanelLoginListener; @@ -103,6 +100,10 @@ private: static void onPassKey(LLLineEditor* caller, void* user_data); static void onSelectServer(LLUICtrl*, void*); static void onServerComboLostFocus(LLFocusableElement*); + static void updateServerCombo(); + static void updateStartSLURL(); + + static void updateLoginPanelLinks(); private: LLPointer<LLUIImage> mLogoImage; @@ -111,8 +112,7 @@ private: void (*mCallback)(S32 option, void *userdata); void* mCallbackData; - std::string mIncomingPassword; - std::string mMungedPassword; + BOOL mPasswordModified; static LLPanelLogin* sInstance; static BOOL sCapslockDidNotification; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 0ba373c51b..54d1b46016 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -167,7 +167,7 @@ BOOL LLPanelMainInventory::postBuild() // Now load the stored settings from disk, if available. std::ostringstream filterSaveName; filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME); - llinfos << "LLPanelMainInventory::init: reading from " << filterSaveName << llendl; + llinfos << "LLPanelMainInventory::init: reading from " << filterSaveName.str() << llendl; llifstream file(filterSaveName.str()); LLSD savedFilterState; if (file.is_open()) @@ -492,6 +492,10 @@ void LLPanelMainInventory::onFilterSelected() { return; } + + BOOL recent_active = ("Recent Items" == mActivePanel->getName()); + childSetVisible("add_btn_panel", !recent_active); + setFilterSubString(mFilterSubString); LLInventoryFilter* filter = mActivePanel->getFilter(); LLFloaterInventoryFinder *finder = getFinder(); @@ -896,14 +900,12 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data) void LLPanelMainInventory::initListCommandsHandlers() { - mListCommands = getChild<LLPanel>("bottom_panel"); - - mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelMainInventory::onGearButtonClick, this)); - mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelMainInventory::onTrashButtonClick, this)); - mListCommands->childSetAction("add_btn", boost::bind(&LLPanelMainInventory::onAddButtonClick, this)); + childSetAction("options_gear_btn", boost::bind(&LLPanelMainInventory::onGearButtonClick, this)); + childSetAction("trash_btn", boost::bind(&LLPanelMainInventory::onTrashButtonClick, this)); + childSetAction("add_btn", boost::bind(&LLPanelMainInventory::onAddButtonClick, this)); - LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn"); - trash_btn->setDragAndDropHandler(boost::bind(&LLPanelMainInventory::handleDragAndDropToTrash, this + mTrashButton = getChild<LLDragAndDropButton>("trash_btn"); + mTrashButton->setDragAndDropHandler(boost::bind(&LLPanelMainInventory::handleDragAndDropToTrash, this , _4 // BOOL drop , _5 // EDragAndDropType cargo_type , _7 // EAcceptance* accept @@ -919,7 +921,7 @@ void LLPanelMainInventory::updateListCommands() { bool trash_enabled = isActionEnabled("delete"); - mListCommands->childSetEnabled("trash_btn", trash_enabled); + mTrashButton->setEnabled(trash_enabled); } void LLPanelMainInventory::onGearButtonClick() @@ -1095,8 +1097,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) if (root) { can_delete = TRUE; - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); + std::set<LLUUID> selection_set = root->getSelectionList(); if (selection_set.empty()) return FALSE; for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); @@ -1186,7 +1187,7 @@ void LLPanelMainInventory::setUploadCostIfNeeded() LLMenuItemBranchGL* upload_menu = mMenuAdd->findChild<LLMenuItemBranchGL>("upload"); if(upload_menu) { - S32 upload_cost = -1;//LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); std::string cost_str; // getPriceUpload() returns -1 if no data available yet. diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index b43e057f83..5a068373f5 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -36,6 +36,7 @@ #include "llpanel.h" #include "llinventoryobserver.h" +#include "lldndbutton.h" #include "llfolderview.h" @@ -145,7 +146,7 @@ protected: */ void setUploadCostIfNeeded(); private: - LLPanel* mListCommands; + LLDragAndDropButton* mTrashButton; LLMenuGL* mMenuGearDefault; LLMenuGL* mMenuAdd; diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 3a82cf6f8b..c557e9b85d 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -48,7 +48,7 @@ #include "llagent.h" #include "llavataractions.h" #include "llcallbacklist.h" -#include "llfloaterbuycurrency.h" +#include "llbuycurrencyhtml.h" #include "llfloaterreg.h" #include "llinventorybridge.h" #include "llinventorydefines.h" @@ -83,16 +83,17 @@ protected: mutable std::string mDisplayName; LLPanelObjectInventory* mPanel; U32 mFlags; + LLAssetType::EType mAssetType; + LLInventoryType::EType mInventoryType; LLInventoryItem* findItem() const; public: - LLTaskInvFVBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - U32 flags=0); - virtual ~LLTaskInvFVBridge( void ) {} + LLTaskInvFVBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name, + U32 flags=0); + virtual ~LLTaskInvFVBridge() {} virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } @@ -149,9 +150,16 @@ LLTaskInvFVBridge::LLTaskInvFVBridge( mUUID(uuid), mName(name), mPanel(panel), - mFlags(flags) + mFlags(flags), + mAssetType(LLAssetType::AT_NONE), + mInventoryType(LLInventoryType::IT_NONE) { - + const LLInventoryItem *item = findItem(); + if (item) + { + mAssetType = item->getType(); + mInventoryType = item->getInventoryType(); + } } LLInventoryItem* LLTaskInvFVBridge::findItem() const @@ -166,11 +174,7 @@ LLInventoryItem* LLTaskInvFVBridge::findItem() const void LLTaskInvFVBridge::showProperties() { - LLSD key; - key["object"] = mPanel->getTaskUUID(); - key["id"] = mUUID; - LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); - + show_item_profile(mUUID); // Disable old properties floater; this is replaced by the sidepanel. /* @@ -345,13 +349,9 @@ time_t LLTaskInvFVBridge::getCreationDate() const LLUIImagePtr LLTaskInvFVBridge::getIcon() const { - BOOL item_is_multi = FALSE; - if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) - { - item_is_multi = TRUE; - } + const BOOL item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS); - return get_item_icon(LLAssetType::AT_OBJECT, LLInventoryType::IT_OBJECT, 0, item_is_multi ); + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, 0, item_is_multi ); } void LLTaskInvFVBridge::openItem() @@ -371,8 +371,7 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { - LLInventoryItem* item; - item = (LLInventoryItem*)(object->getInventoryObject(mUUID)); + LLInventoryItem* item = (LLInventoryItem*)(object->getInventoryObject(mUUID)); if(item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE, GOD_LIKE)) { @@ -613,7 +612,7 @@ void LLTaskInvFVBridge::performAction(LLInventoryModel* model, std::string actio { LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", price); - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_costs", args), price); + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_costs", args), price ); } else { @@ -867,33 +866,14 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, class LLTaskTextureBridge : public LLTaskInvFVBridge { public: - LLTaskTextureBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - LLInventoryType::EType it); + LLTaskTextureBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual void openItem(); -protected: - LLInventoryType::EType mInventoryType; }; -LLTaskTextureBridge::LLTaskTextureBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - LLInventoryType::EType it) : - LLTaskInvFVBridge(panel, uuid, name), - mInventoryType(it) -{ -} - -LLUIImagePtr LLTaskTextureBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_TEXTURE, mInventoryType, 0, FALSE); -} - void LLTaskTextureBridge::openItem() { llinfos << "LLTaskTextureBridge::openItem()" << llendl; @@ -912,31 +892,17 @@ void LLTaskTextureBridge::openItem() class LLTaskSoundBridge : public LLTaskInvFVBridge { public: - LLTaskSoundBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskSoundBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); static void openSoundPreview(void* data); }; -LLTaskSoundBridge::LLTaskSoundBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskSoundBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SOUND, LLInventoryType::IT_SOUND, 0, FALSE); -} - void LLTaskSoundBridge::openItem() { openSoundPreview((void*)this); @@ -1038,28 +1004,12 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) class LLTaskLandmarkBridge : public LLTaskInvFVBridge { public: - LLTaskLandmarkBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); - - virtual LLUIImagePtr getIcon() const; + LLTaskLandmarkBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} }; -LLTaskLandmarkBridge::LLTaskLandmarkBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskLandmarkBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, 0, FALSE); -} - - ///---------------------------------------------------------------------------- /// Class LLTaskCallingCardBridge ///---------------------------------------------------------------------------- @@ -1067,29 +1017,15 @@ LLUIImagePtr LLTaskLandmarkBridge::getIcon() const class LLTaskCallingCardBridge : public LLTaskInvFVBridge { public: - LLTaskCallingCardBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskCallingCardBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual BOOL isItemRenameable() const; virtual BOOL renameItem(const std::string& new_name); }; -LLTaskCallingCardBridge::LLTaskCallingCardBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskCallingCardBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, 0, FALSE); -} - BOOL LLTaskCallingCardBridge::isItemRenameable() const { return FALSE; @@ -1108,36 +1044,21 @@ BOOL LLTaskCallingCardBridge::renameItem(const std::string& new_name) class LLTaskScriptBridge : public LLTaskInvFVBridge { public: - LLTaskScriptBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskScriptBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; //static BOOL enableIfCopyable( void* userdata ); }; -LLTaskScriptBridge::LLTaskScriptBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskScriptBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE); -} - - class LLTaskLSLBridge : public LLTaskScriptBridge { public: - LLTaskLSLBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskLSLBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskScriptBridge(panel, uuid, name) {} virtual void openItem(); virtual BOOL removeItem(); @@ -1146,14 +1067,6 @@ public: //static void copyToInventory(void* userdata); }; -LLTaskLSLBridge::LLTaskLSLBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskScriptBridge(panel, uuid, name) -{ -} - void LLTaskLSLBridge::openItem() { llinfos << "LLTaskLSLBridge::openItem() " << mUUID << llendl; @@ -1189,35 +1102,13 @@ BOOL LLTaskLSLBridge::removeItem() class LLTaskObjectBridge : public LLTaskInvFVBridge { public: - LLTaskObjectBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - U32 flags = 0); - - virtual LLUIImagePtr getIcon() const; + LLTaskObjectBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name, + U32 flags = 0) : + LLTaskInvFVBridge(panel, uuid, name, flags) {} }; -LLTaskObjectBridge::LLTaskObjectBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - U32 flags) : - LLTaskInvFVBridge(panel, uuid, name, flags) -{ -} - -LLUIImagePtr LLTaskObjectBridge::getIcon() const -{ - BOOL item_is_multi = FALSE; - if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) - { - item_is_multi = TRUE; - } - - return get_item_icon(LLAssetType::AT_OBJECT, LLInventoryType::IT_OBJECT, 0, item_is_multi); -} - ///---------------------------------------------------------------------------- /// Class LLTaskNotecardBridge ///---------------------------------------------------------------------------- @@ -1225,29 +1116,15 @@ LLUIImagePtr LLTaskObjectBridge::getIcon() const class LLTaskNotecardBridge : public LLTaskInvFVBridge { public: - LLTaskNotecardBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskNotecardBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual BOOL removeItem(); }; -LLTaskNotecardBridge::LLTaskNotecardBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskNotecardBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE); -} - void LLTaskNotecardBridge::openItem() { LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); @@ -1278,29 +1155,15 @@ BOOL LLTaskNotecardBridge::removeItem() class LLTaskGestureBridge : public LLTaskInvFVBridge { public: - LLTaskGestureBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskGestureBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual BOOL removeItem(); }; -LLTaskGestureBridge::LLTaskGestureBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskGestureBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, 0, FALSE); -} - void LLTaskGestureBridge::openItem() { LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); @@ -1325,29 +1188,15 @@ BOOL LLTaskGestureBridge::removeItem() class LLTaskAnimationBridge : public LLTaskInvFVBridge { public: - LLTaskAnimationBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskAnimationBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual BOOL removeItem(); }; -LLTaskAnimationBridge::LLTaskAnimationBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskAnimationBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_ANIMATION, LLInventoryType::IT_ANIMATION, 0, FALSE); -} - void LLTaskAnimationBridge::openItem() { LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); @@ -1376,33 +1225,18 @@ BOOL LLTaskAnimationBridge::removeItem() class LLTaskWearableBridge : public LLTaskInvFVBridge { public: - LLTaskWearableBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - LLAssetType::EType asset_type, - U32 flags); + LLTaskWearableBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name, + U32 flags) : + LLTaskInvFVBridge(panel, uuid, name, flags) {} virtual LLUIImagePtr getIcon() const; - -protected: - LLAssetType::EType mAssetType; }; -LLTaskWearableBridge::LLTaskWearableBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - LLAssetType::EType asset_type, - U32 flags) : - LLTaskInvFVBridge(panel, uuid, name, flags), - mAssetType( asset_type ) -{ -} - LLUIImagePtr LLTaskWearableBridge::getIcon() const { - return get_item_icon(mAssetType, LLInventoryType::IT_WEARABLE, mFlags, FALSE ); + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, mFlags, FALSE ); } @@ -1414,31 +1248,31 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* LLInventoryObject* object) { LLTaskInvFVBridge* new_bridge = NULL; + const LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(object); + const U32 itemflags = ( NULL == item ? 0 : item->getFlags() ); LLAssetType::EType type = object->getType(); - LLInventoryItem* item = NULL; + switch(type) { case LLAssetType::AT_TEXTURE: - item = (LLInventoryItem*)object; new_bridge = new LLTaskTextureBridge(panel, - object->getUUID(), - object->getName(), - item->getInventoryType()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_SOUND: new_bridge = new LLTaskSoundBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_LANDMARK: new_bridge = new LLTaskLandmarkBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_CALLINGCARD: new_bridge = new LLTaskCallingCardBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_SCRIPT: // OLD SCRIPTS DEPRECATED - JC @@ -1448,51 +1282,42 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* // object->getName()); break; case LLAssetType::AT_OBJECT: - { - item = dynamic_cast<LLInventoryItem*>(object); - U32 flags = ( NULL == item ? 0 : item->getFlags() ); - new_bridge = new LLTaskObjectBridge(panel, - object->getUUID(), - object->getName(), - flags); - } + object->getUUID(), + object->getName(), + itemflags); break; case LLAssetType::AT_NOTECARD: new_bridge = new LLTaskNotecardBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_ANIMATION: new_bridge = new LLTaskAnimationBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_GESTURE: new_bridge = new LLTaskGestureBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_CLOTHING: case LLAssetType::AT_BODYPART: - item = (LLInventoryItem*)object; new_bridge = new LLTaskWearableBridge(panel, - object->getUUID(), - object->getName(), - type, - item->getFlags()); + object->getUUID(), + object->getName(), + itemflags); break; case LLAssetType::AT_CATEGORY: new_bridge = new LLTaskCategoryBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_LSL_TEXT: new_bridge = new LLTaskLSLBridge(panel, - object->getUUID(), - object->getName()); - break; - + object->getUUID(), + object->getName()); break; default: llinfos << "Unhandled inventory type (llassetstorage.h): " @@ -1658,7 +1483,7 @@ void LLPanelObjectInventory::updateInventory() BOOL inventory_has_focus = FALSE; if (mHaveInventory) { - mFolders->getSelectionList(selected_items); + selected_items = mFolders->getSelectionList(); inventory_has_focus = gFocusMgr.childHasKeyboardFocus(mFolders); } diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index daa41e1467..78de384cdc 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -36,6 +36,7 @@ // *TODO: reorder includes to match the coding standard #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" #include "llcofwearables.h" @@ -60,6 +61,7 @@ #include "llinventorymodelbackgroundfetch.h" #include "llpaneloutfitsinventory.h" #include "lluiconstants.h" +#include "llsaveoutfitcombobtn.h" #include "llscrolllistctrl.h" #include "lltextbox.h" #include "lluictrlfactory.h" @@ -67,6 +69,7 @@ #include "llsidepanelappearance.h" #include "lltoggleablemenu.h" #include "llwearablelist.h" +#include "llwearableitemslist.h" static LLRegisterPanelClassWrapper<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit"); @@ -74,14 +77,18 @@ const U64 WEARABLE_MASK = (1LL << LLInventoryType::IT_WEARABLE); const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LLInventoryType::IT_OBJECT); const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK; -static const std::string SAVE_BTN("save_btn"); static const std::string REVERT_BTN("revert_btn"); -class LLInventoryLookObserver : public LLInventoryObserver +class LLCOFObserver : public LLInventoryObserver { public: - LLInventoryLookObserver(LLPanelOutfitEdit *panel) : mPanel(panel) {} - virtual ~LLInventoryLookObserver() + LLCOFObserver(LLPanelOutfitEdit *panel) : mPanel(panel), + mCOFLastVersion(LLViewerInventoryCategory::VERSION_UNKNOWN) + { + gInventory.addObserver(this); + } + + virtual ~LLCOFObserver() { if (gInventory.containsObserver(this)) { @@ -91,51 +98,133 @@ public: virtual void changed(U32 mask) { - if (mask & (LLInventoryObserver::ADD | LLInventoryObserver::REMOVE)) + if (!gInventory.isInventoryUsable()) return; + + bool panel_updated = checkCOF(); + + if (!panel_updated) { - mPanel->updateLookInfo(); + checkBaseOutfit(); } } + protected: + + /** Get a version of an inventory category specified by its UUID */ + static S32 getCategoryVersion(const LLUUID& cat_id) + { + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (!cat) return LLViewerInventoryCategory::VERSION_UNKNOWN; + + return cat->getVersion(); + } + + bool checkCOF() + { + LLUUID cof = LLAppearanceMgr::getInstance()->getCOF(); + if (cof.isNull()) return false; + + S32 cof_version = getCategoryVersion(cof); + + if (cof_version == mCOFLastVersion) return false; + + mCOFLastVersion = cof_version; + + mPanel->update(); + + return true; + } + + void checkBaseOutfit() + { + LLUUID baseoutfit_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID(); + + if (baseoutfit_id == mBaseOutfitId) + { + if (baseoutfit_id.isNull()) return; + + const S32 baseoutfit_ver = getCategoryVersion(baseoutfit_id); + + if (baseoutfit_ver == mBaseOutfitLastVersion) return; + } + else + { + mBaseOutfitId = baseoutfit_id; + mPanel->updateCurrentOutfitName(); + + if (baseoutfit_id.isNull()) return; + + mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId); + } + + mPanel->updateVerbs(); + } + + + + LLPanelOutfitEdit *mPanel; + + //last version number of a COF category + S32 mCOFLastVersion; + + LLUUID mBaseOutfitId; + + S32 mBaseOutfitLastVersion; }; -class LLLookFetchObserver : public LLInventoryFetchDescendentsObserver +class LLCOFDragAndDropObserver : public LLInventoryAddItemByAssetObserver { public: - LLLookFetchObserver(LLPanelOutfitEdit *panel) : - mPanel(panel) - {} - LLLookFetchObserver() {} - virtual void done() - { - mPanel->lookFetched(); - if(gInventory.containsObserver(this)) - { - gInventory.removeObserver(this); - } - } + LLCOFDragAndDropObserver(LLInventoryModel* model); + + virtual ~LLCOFDragAndDropObserver(); + + virtual void done(); + private: - LLPanelOutfitEdit *mPanel; + LLInventoryModel* mModel; }; +inline LLCOFDragAndDropObserver::LLCOFDragAndDropObserver(LLInventoryModel* model): + mModel(model) +{ + if (model != NULL) + { + model->addObserver(this); + } +} + +inline LLCOFDragAndDropObserver::~LLCOFDragAndDropObserver() +{ + if (mModel != NULL && mModel->containsObserver(this)) + { + mModel->removeObserver(this); + } +} +void LLCOFDragAndDropObserver::done() +{ + LLAppearanceMgr::instance().updateAppearanceFromCOF(); +} LLPanelOutfitEdit::LLPanelOutfitEdit() : LLPanel(), - mCurrentOutfitID(), - mFetchLook(NULL), mSearchFilter(NULL), mCOFWearables(NULL), mInventoryItemsPanel(NULL), - mLookObserver(NULL) + mCOFObserver(NULL), + mGearMenu(NULL), + mCOFDragAndDropObserver(NULL), + mInitialized(false), + mAddWearablesPanel(NULL), + mWearableListMaskCollector(NULL), + mWearableListTypeCollector(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); - mFetchLook = new LLLookFetchObserver(this); - mLookObserver = new LLInventoryLookObserver(this); - gInventory.addObserver(mLookObserver); + mCOFObserver = new LLCOFObserver(this); mLookItemTypes.reserve(NUM_LOOK_ITEM_TYPES); for (U32 i = 0; i < NUM_LOOK_ITEM_TYPES; i++) @@ -149,17 +238,12 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() LLPanelOutfitEdit::~LLPanelOutfitEdit() { delete mSavedFolderState; - if (gInventory.containsObserver(mFetchLook)) - { - gInventory.removeObserver(mFetchLook); - } - delete mFetchLook; - - if (gInventory.containsObserver(mLookObserver)) - { - gInventory.removeObserver(mLookObserver); - } - delete mLookObserver; + + delete mCOFObserver; + delete mCOFDragAndDropObserver; + + delete mWearableListMaskCollector; + delete mWearableListTypeCollector; } BOOL LLPanelOutfitEdit::postBuild() @@ -171,13 +255,21 @@ BOOL LLPanelOutfitEdit::postBuild() mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK); mCurrentOutfitName = getChild<LLTextBox>("curr_outfit_name"); + mStatus = getChild<LLTextBox>("status"); + + mFolderViewBtn = getChild<LLButton>("folder_view_btn"); + mListViewBtn = getChild<LLButton>("list_view_btn"); + mAddToOutfitBtn = getChild<LLButton>("add_to_outfit_btn"); childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL); + childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredFolderWearablesPanel, this), NULL); childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredWearablesPanel, this), NULL); + childSetCommitCallback("wearables_gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL); mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list"); mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this)); + mCOFWearables->getCOFCallbacks().mAddWearable = boost::bind(&LLPanelOutfitEdit::onAddWearableClicked, this); mCOFWearables->getCOFCallbacks().mEditWearable = boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this); mCOFWearables->getCOFCallbacks().mDeleteWearable = boost::bind(&LLPanelOutfitEdit::onRemoveFromOutfitClicked, this); mCOFWearables->getCOFCallbacks().mMoveWearableCloser = boost::bind(&LLPanelOutfitEdit::moveWearable, this, true); @@ -185,6 +277,7 @@ BOOL LLPanelOutfitEdit::postBuild() mCOFWearables->childSetAction("add_btn", boost::bind(&LLPanelOutfitEdit::toggleAddWearablesPanel, this)); + mAddWearablesPanel = getChild<LLPanel>("add_wearables_panel"); mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items"); mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK); @@ -192,6 +285,8 @@ BOOL LLPanelOutfitEdit::postBuild() mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); + mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel()); + LLComboBox* type_filter = getChild<LLComboBox>("filter_wearables_combobox"); type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1)); type_filter->removeall(); @@ -204,15 +299,7 @@ BOOL LLPanelOutfitEdit::postBuild() mSearchFilter = getChild<LLFilterEditor>("look_item_filter"); mSearchFilter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onSearchEdit, this, _2)); - /* Removing add to look inline button (not part of mvp for viewer 2) - LLButton::Params add_params; - add_params.name("add_to_look"); - add_params.click_callback.function(boost::bind(&LLPanelOutfitEdit::onAddToLookClicked, this)); - add_params.label("+"); - - mAddToLookBtn = LLUICtrlFactory::create<LLButton>(add_params); - mAddToLookBtn->setEnabled(FALSE); - mAddToLookBtn->setVisible(FALSE); */ + childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this)); mEditWearableBtn = getChild<LLButton>("edit_wearable_btn"); mEditWearableBtn->setEnabled(FALSE); @@ -221,20 +308,27 @@ BOOL LLPanelOutfitEdit::postBuild() childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance())); - childSetAction(SAVE_BTN, boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false)); - childSetAction("save_flyout_btn", boost::bind(&LLPanelOutfitEdit::showSaveMenu, this)); + mWearableListMaskCollector = new LLFindNonLinksByMask(ALL_ITEMS_MASK); + mWearableListTypeCollector = new LLFindWearablesOfType(LLWearableType::WT_NONE); - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar; - save_registar.add("Outfit.Save.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false)); - save_registar.add("Outfit.SaveAsNew.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); - mSaveMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_save_outfit.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - - mWearableListManager = new LLFilteredWearableListManager( - getChild<LLInventoryItemsList>("filtered_wearables_list"), ALL_ITEMS_MASK); + mWearableItemsPanel = getChild<LLPanel>("filtered_wearables_panel"); + mWearableItemsList = getChild<LLInventoryItemsList>("filtered_wearables_list"); + mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mWearableListMaskCollector); + mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this)); return TRUE; } +// virtual +void LLPanelOutfitEdit::onOpen(const LLSD& key) +{ + if (!mInitialized) + { + displayCurrentOutfit(); + mInitialized = true; + } +} + void LLPanelOutfitEdit::moveWearable(bool closer_to_body) { LLUUID item_id = mCOFWearables->getSelectedUUID(); @@ -242,51 +336,55 @@ void LLPanelOutfitEdit::moveWearable(bool closer_to_body) LLViewerInventoryItem* wearable_to_move = gInventory.getItem(item_id); LLAppearanceMgr::getInstance()->moveWearable(wearable_to_move, closer_to_body); - - //*TODO why not to listen to inventory? - updateLookInfo(); } void LLPanelOutfitEdit::toggleAddWearablesPanel() { - childSetVisible("add_wearables_panel", !childIsVisible("add_wearables_panel")); + BOOL current_visibility = mAddWearablesPanel->getVisible(); + mAddWearablesPanel->setVisible(!current_visibility); + + mFolderViewBtn->setVisible(!current_visibility); + mListViewBtn->setVisible(!current_visibility); + mAddToOutfitBtn->setVisible(!current_visibility); + + // Change right dummy icon to fill the toggled buttons space. + childSetVisible("add_wearables_dummy_icon", !current_visibility); + childSetVisible("dummy_right_icon", current_visibility); } void LLPanelOutfitEdit::showWearablesFilter() { - childSetVisible("filter_combobox_panel", childGetValue("filter_button")); -} + bool filter_visible = childGetValue("filter_button"); -void LLPanelOutfitEdit::showFilteredWearablesPanel() -{ - childSetVisible("filtered_wearables_panel", !childIsVisible("filtered_wearables_panel")); -} + childSetVisible("filter_panel", filter_visible); -void LLPanelOutfitEdit::saveOutfit(bool as_new) -{ - if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit()) + if(!filter_visible) { - // we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved. - // If updateBaseOutfit fails, ask for an outfit name anyways - return; + mSearchFilter->clear(); + onSearchEdit(LLStringUtil::null); } +} - LLPanelOutfitsInventory* panel_outfits_inventory = LLPanelOutfitsInventory::findInstance(); - if (panel_outfits_inventory) +void LLPanelOutfitEdit::showFilteredWearablesPanel() +{ + if(switchPanels(mInventoryItemsPanel, mWearableItemsPanel)) { - panel_outfits_inventory->onSave(); + mFolderViewBtn->setToggleState(FALSE); + mFolderViewBtn->setImageOverlay(getString("folder_view_off"), mFolderViewBtn->getImageOverlayHAlign()); + mListViewBtn->setImageOverlay(getString("list_view_on"), mListViewBtn->getImageOverlayHAlign()); } - - //*TODO how to get to know when base outfit is updated or new outfit is created? + mListViewBtn->setToggleState(TRUE); } -void LLPanelOutfitEdit::showSaveMenu() +void LLPanelOutfitEdit::showFilteredFolderWearablesPanel() { - S32 x, y; - LLUI::getMousePositionLocal(this, &x, &y); - - mSaveMenu->updateParent(LLMenuGL::sMenuContainer); - LLMenuGL::showPopup(this, mSaveMenu, x, y); + if(switchPanels(mWearableItemsPanel, mInventoryItemsPanel)) + { + mListViewBtn->setToggleState(FALSE); + mListViewBtn->setImageOverlay(getString("list_view_off"), mListViewBtn->getImageOverlayHAlign()); + mFolderViewBtn->setImageOverlay(getString("folder_view_on"), mFolderViewBtn->getImageOverlayHAlign()); + } + mFolderViewBtn->setToggleState(TRUE); } void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl) @@ -297,7 +395,9 @@ void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl) { U32 curr_filter_type = type_filter->getCurrentIndex(); mInventoryItemsPanel->setFilterTypes(mLookItemTypes[curr_filter_type].inventoryMask); - mWearableListManager->setFilterMask(mLookItemTypes[curr_filter_type].inventoryMask); + + mWearableListMaskCollector->setFilterMask(mLookItemTypes[curr_filter_type].inventoryMask); + mWearableListManager->setFilterCollector(mWearableListMaskCollector); } mSavedFolderState->setApply(TRUE); @@ -324,7 +424,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) if (mSearchString == "") { mInventoryItemsPanel->setFilterSubString(LLStringUtil::null); - + mWearableItemsList->setFilterSubString(LLStringUtil::null); // re-open folders that were initially open mSavedFolderState->setApply(TRUE); mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); @@ -350,30 +450,58 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) // set new filter string mInventoryItemsPanel->setFilterSubString(mSearchString); + mWearableItemsList->setFilterSubString(mSearchString); + } void LLPanelOutfitEdit::onAddToOutfitClicked(void) { - LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); - if (!curr_item) return; + LLUUID selected_id; + if (mInventoryItemsPanel->getVisible()) + { + LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); + if (!curr_item) return; - LLFolderViewEventListener* listenerp = curr_item->getListener(); - if (!listenerp) return; + LLFolderViewEventListener* listenerp = curr_item->getListener(); + if (!listenerp) return; - if (LLAppearanceMgr::getInstance()->wearItemOnAvatar(listenerp->getUUID())) + selected_id = listenerp->getUUID(); + } + else if (mWearableItemsPanel->getVisible()) { - updateLookInfo(); + selected_id = mWearableItemsList->getSelectedUUID(); } + + if (selected_id.isNull()) return; + + LLAppearanceMgr::getInstance()->wearItemOnAvatar(selected_id); } +void LLPanelOutfitEdit::onAddWearableClicked(void) +{ + LLPanelDummyClothingListItem* item = dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem()); + + if(item) + { + showFilteredWearableItemsList(item->getWearableType()); + } +} + +void LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id) +{ + LLViewerInventoryItem* item = gInventory.getLinkedItem(selected_item_id); + + if (item && item->getType() == LLAssetType::AT_BODYPART) + { + showFilteredWearableItemsList(item->getWearableType()); + } +} void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void) { LLUUID id_to_remove = mCOFWearables->getSelectedUUID(); LLAppearanceMgr::getInstance()->removeItemFromAvatar(id_to_remove); - - updateLookInfo(); } @@ -465,32 +593,61 @@ void LLPanelOutfitEdit::onOutfitItemSelectionChange(void) } } -void LLPanelOutfitEdit::changed(U32 mask) -{ -} - -void LLPanelOutfitEdit::lookFetched(void) +void LLPanelOutfitEdit::update() { mCOFWearables->refresh(); updateVerbs(); } -void LLPanelOutfitEdit::updateLookInfo() -{ - if (getVisible()) +BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + if (cargo_data == NULL) + { + llwarns << "cargo_data is NULL" << llendl; + return TRUE; + } + + switch (cargo_type) + { + case DAD_BODYPART: + case DAD_CLOTHING: + case DAD_OBJECT: + case DAD_LINK: + *accept = ACCEPT_YES_MULTI; + break; + default: + *accept = ACCEPT_NO; + } + + if (drop) { - mFetchLook->setFetchID(mCurrentOutfitID); - mFetchLook->startFetch(); - if (mFetchLook->isFinished()) + LLInventoryItem* item = static_cast<LLInventoryItem*>(cargo_data); + + if (LLAssetType::lookupIsAssetIDKnowable(item->getType())) { - mFetchLook->done(); + mCOFDragAndDropObserver->watchAsset(item->getAssetUUID()); + + /* + * Adding request to wear item. If the item is a link, then getLinkedUUID() will + * return the ID of the linked item. Otherwise it will return the item's ID. The + * second argument is used to delay the appearance update until all dragged items + * are added to optimize user experience. + */ + LLAppearanceMgr::instance().addCOFItemLink(item->getLinkedUUID(), false); } else { - gInventory.addObserver(mFetchLook); + // if asset id is not available for the item we must wear it immediately (attachments only) + LLAppearanceMgr::instance().addCOFItemLink(item->getLinkedUUID(), true); } } + + return TRUE; } void LLPanelOutfitEdit::displayCurrentOutfit() @@ -500,8 +657,13 @@ void LLPanelOutfitEdit::displayCurrentOutfit() setVisible(TRUE); } - mCurrentOutfitID = LLAppearanceMgr::getInstance()->getCOF(); + updateCurrentOutfitName(); + + update(); +} +void LLPanelOutfitEdit::updateCurrentOutfitName() +{ std::string current_outfit_name; if (LLAppearanceMgr::getInstance()->getBaseOutfitName(current_outfit_name)) { @@ -511,19 +673,70 @@ void LLPanelOutfitEdit::displayCurrentOutfit() { mCurrentOutfitName->setText(getString("No Outfit")); } - - updateLookInfo(); } //private void LLPanelOutfitEdit::updateVerbs() { + //*TODO implement better handling of COF dirtiness + LLAppearanceMgr::getInstance()->updateIsDirty(); + bool outfit_is_dirty = LLAppearanceMgr::getInstance()->isOutfitDirty(); - - childSetEnabled(SAVE_BTN, outfit_is_dirty); - childSetEnabled(REVERT_BTN, outfit_is_dirty); + bool has_baseoutfit = LLAppearanceMgr::getInstance()->getBaseOutfitUUID().notNull(); + + mSaveComboBtn->setSaveBtnEnabled(outfit_is_dirty); + childSetEnabled(REVERT_BTN, outfit_is_dirty && has_baseoutfit); + + mSaveComboBtn->setMenuItemEnabled("save_outfit", outfit_is_dirty); + + mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing")); + +} - mSaveMenu->setItemEnabled("save_outfit", outfit_is_dirty); +bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel) +{ + if(switch_from_panel && switch_to_panel && !switch_to_panel->getVisible()) + { + switch_from_panel->setVisible(FALSE); + switch_to_panel->setVisible(TRUE); + return true; + } + return false; +} + +void LLPanelOutfitEdit::onGearButtonClick(LLUICtrl* clicked_button) +{ + if(!mGearMenu) + { + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + + registrar.add("Gear.OnClick", boost::bind(&LLPanelOutfitEdit::onGearMenuItemClick, this, _2)); + + mGearMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>( + "menu_cof_gear.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); + mGearMenu->buildDrawLabels(); + mGearMenu->updateParent(LLMenuGL::sMenuContainer); + } + + S32 menu_y = mGearMenu->getRect().getHeight() + clicked_button->getRect().getHeight(); + LLMenuGL::showPopup(clicked_button, mGearMenu, 0, menu_y); +} + +void LLPanelOutfitEdit::onGearMenuItemClick(const LLSD& data) +{ + std::string param = data.asString(); + if("add" == param) + { + // TODO + } +} + +void LLPanelOutfitEdit::showFilteredWearableItemsList(LLWearableType::EType type) +{ + mWearableListTypeCollector->setType(type); + mWearableListManager->setFilterCollector(mWearableListTypeCollector); + mAddWearablesPanel->setVisible(TRUE); + showFilteredWearablesPanel(); } // EOF diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 0074cd517b..1569c55732 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -42,24 +42,30 @@ #include "llremoteparcelrequest.h" #include "llinventory.h" +#include "llinventoryitemslist.h" #include "llinventorymodel.h" class LLButton; class LLCOFWearables; class LLTextBox; class LLInventoryCategory; -class LLInventoryLookObserver; +class LLCOFObserver; +class LLCOFDragAndDropObserver; class LLInventoryPanel; class LLSaveFolderState; class LLFolderViewItem; class LLScrollListCtrl; class LLToggleableMenu; -class LLLookFetchObserver; class LLFilterEditor; class LLFilteredWearableListManager; +class LLMenuGL; +class LLFindNonLinksByMask; +class LLFindWearablesOfType; +class LLSaveOutfitComboBtn; class LLPanelOutfitEdit : public LLPanel { + LOG_CLASS(LLPanelOutfitEdit); public: // NOTE: initialize mLookItemTypes at the index of any new enum you add in the LLPanelOutfitEdit() constructor @@ -82,19 +88,14 @@ public: /*virtual*/ ~LLPanelOutfitEdit(); /*virtual*/ BOOL postBuild(); - /*virtual*/ void changed(U32 mask); - - /*virtual*/ void setParcelID(const LLUUID& parcel_id); - // Sends a request for data about the given parcel, which will - // only update the location if there is none already available. + /*virtual*/ void onOpen(const LLSD& key); void moveWearable(bool closer_to_body); void toggleAddWearablesPanel(); void showWearablesFilter(); void showFilteredWearablesPanel(); - void saveOutfit(bool as_new = false); - void showSaveMenu(); + void showFilteredFolderWearablesPanel(); void onTypeFilterChanged(LLUICtrl* ctrl); void onSearchEdit(const std::string& string); @@ -103,35 +104,66 @@ public: void onOutfitItemSelectionChange(void); void onRemoveFromOutfitClicked(void); void onEditWearableClicked(void); + void onAddWearableClicked(void); + void onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id); void displayCurrentOutfit(); - - void lookFetched(void); - - void updateLookInfo(void); + void updateCurrentOutfitName(); -private: + void update(); void updateVerbs(); + /** + * @brief Helper function. Shows one panel instead of another. + * If panels already switched does nothing and returns false. + * @param switch_from_panel panel to hide + * @param switch_to_panel panel to show + * @retun returns true if switching happened, false if not. + */ + bool switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel); + + virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); + +private: + + void onGearButtonClick(LLUICtrl* clicked_button); + void onGearMenuItemClick(const LLSD& data); + void showFilteredWearableItemsList(LLWearableType::EType type); - //*TODO got rid of mCurrentOutfitID - LLUUID mCurrentOutfitID; LLTextBox* mCurrentOutfitName; + LLTextBox* mStatus; LLInventoryPanel* mInventoryItemsPanel; LLFilterEditor* mSearchFilter; LLSaveFolderState* mSavedFolderState; std::string mSearchString; LLButton* mEditWearableBtn; - LLToggleableMenu* mSaveMenu; + LLButton* mFolderViewBtn; + LLButton* mListViewBtn; + LLButton* mAddToOutfitBtn; + LLPanel* mAddWearablesPanel; + + LLFindNonLinksByMask* mWearableListMaskCollector; + LLFindWearablesOfType* mWearableListTypeCollector; - LLFilteredWearableListManager* mWearableListManager; + LLFilteredWearableListManager* mWearableListManager; + LLInventoryItemsList* mWearableItemsList; + LLPanel* mWearableItemsPanel; + + LLCOFObserver* mCOFObserver; + LLCOFDragAndDropObserver* mCOFDragAndDropObserver; - LLLookFetchObserver* mFetchLook; - LLInventoryLookObserver* mLookObserver; std::vector<LLLookItemType> mLookItemTypes; LLCOFWearables* mCOFWearables; + LLMenuGL* mGearMenu; + bool mInitialized; + std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn; + }; #endif // LL_LLPANELOUTFITEDIT_H diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 59c1fb4f3c..21f69d3470 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -50,6 +50,7 @@ #include "llmodaldialog.h" #include "llnotificationsutil.h" #include "lloutfitslist.h" +#include "llsaveoutfitcombobtn.h" #include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltabcontainer.h" @@ -73,10 +74,12 @@ static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_o LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mMyOutfitsPanel(NULL), mCurrentOutfitPanel(NULL), - mParent(NULL) + mParent(NULL), + mInitialized(false) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); + gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoaded, this)); } LLPanelOutfitsInventory::~LLPanelOutfitsInventory() @@ -90,12 +93,35 @@ BOOL LLPanelOutfitsInventory::postBuild() initTabPanels(); initListCommandsHandlers(); + // Fetch your outfits folder so that the links are in memory. + // ( This is only necessary if we want to show a warning if a user deletes an item that has a + // a link in an outfit, see "ConfirmItemDeleteHasLinks". ) + const LLUUID &outfits_cat = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTFIT, false); + if (outfits_cat.notNull()) + { + LLInventoryModelBackgroundFetch::instance().start(outfits_cat); + } + + mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this, true)); + return TRUE; } // virtual void LLPanelOutfitsInventory::onOpen(const LLSD& key) { + if (!mInitialized) + { + LLSidepanelAppearance* panel_appearance = getAppearanceSP(); + if (panel_appearance) + { + // *TODO: move these methods to LLPanelOutfitsInventory? + panel_appearance->fetchInventory(); + panel_appearance->refreshCurrentOutfitName(); + } + mInitialized = true; + } + // Make sure we know which tab is selected, update the filter, // and update verbs. onTabChange(); @@ -124,11 +150,6 @@ void LLPanelOutfitsInventory::onOpen(const LLSD& key) void LLPanelOutfitsInventory::updateVerbs() { - if (mParent) - { - mParent->updateVerbs(); - } - if (mListCommands) { updateListCommands(); @@ -190,6 +211,7 @@ void LLPanelOutfitsInventory::onWearButtonClick() if (!isCOFPanelActive()) { mMyOutfitsPanel->performAction("replaceoutfit"); + setWearablesLoading(true); } else { @@ -243,8 +265,7 @@ bool LLPanelOutfitsInventory::onSaveCommit(const LLSD& notification, const LLSD& { LLUUID outfit_folder = LLAppearanceMgr::getInstance()->makeNewOutfitLinks(outfit_name); - LLSidepanelAppearance* panel_appearance = - dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance* panel_appearance = getAppearanceSP(); if (panel_appearance) { panel_appearance->showOutfitsInventoryPanel(); @@ -355,7 +376,6 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::onGearButtonClick, this)); mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this)); - mListCommands->childSetAction("make_outfit_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this)); LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn"); @@ -365,11 +385,8 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() , _7 // EAcceptance* accept )); - mCommitCallbackRegistrar.add("panel_outfits_inventory_gear_default.Custom.Action", - boost::bind(&LLPanelOutfitsInventory::onCustomAction, this, _2)); - mEnableCallbackRegistrar.add("panel_outfits_inventory_gear_default.Enable", - boost::bind(&LLPanelOutfitsInventory::isActionEnabled, this, _2)); - mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("panel_outfits_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_outfit_gear.xml", + gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); } void LLPanelOutfitsInventory::updateListCommands() @@ -381,7 +398,7 @@ void LLPanelOutfitsInventory::updateListCommands() mListCommands->childSetEnabled("trash_btn", trash_enabled); mListCommands->childSetEnabled("wear_btn", wear_enabled); mListCommands->childSetVisible("wear_btn", wear_enabled); - mListCommands->childSetEnabled("make_outfit_btn", make_outfit_enabled); + mSaveComboBtn->setSaveBtnEnabled(make_outfit_enabled); } void LLPanelOutfitsInventory::onGearButtonClick() @@ -389,11 +406,6 @@ void LLPanelOutfitsInventory::onGearButtonClick() showActionMenu(mMenuGearDefault,"options_gear_btn"); } -void LLPanelOutfitsInventory::onAddButtonClick() -{ - onSave(); -} - void LLPanelOutfitsInventory::showActionMenu(LLMenuGL* menu, std::string spawning_view_name) { if (menu) @@ -482,8 +494,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) LLFolderView* root = getActivePanel()->getRootFolder(); if (root) { - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); + std::set<LLUUID> selection_set = root->getSelectionList(); can_delete = (selection_set.size() > 0); for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); @@ -504,8 +515,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) LLFolderView* root = getActivePanel()->getRootFolder(); if (root) { - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); + std::set<LLUUID> selection_set = root->getSelectionList(); can_delete = (selection_set.size() > 0); for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); @@ -557,8 +567,7 @@ bool LLPanelOutfitsInventory::hasItemsSelected() LLFolderView* root = getActivePanel()->getRootFolder(); if (root) { - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); + std::set<LLUUID> selection_set = root->getSelectionList(); has_items_selected = (selection_set.size() > 0); } } @@ -642,3 +651,27 @@ BOOL LLPanelOutfitsInventory::isCOFPanelActive() const { return (childGetVisibleTab("appearance_tabs")->getName() == COF_TAB_NAME); } + +void LLPanelOutfitsInventory::setWearablesLoading(bool val) +{ + mListCommands->childSetEnabled("wear_btn", !val); + + llassert(mParent); + if (mParent) + { + mParent->setWearablesLoading(val); + } +} + +void LLPanelOutfitsInventory::onWearablesLoaded() +{ + setWearablesLoading(false); +} + +LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP() +{ + static LLSidepanelAppearance* panel_appearance = + dynamic_cast<LLSidepanelAppearance*> + (LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + return panel_appearance; +} diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 975d99f834..7bdd37c16c 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -46,9 +46,11 @@ class LLButton; class LLMenuGL; class LLSidepanelAppearance; class LLTabContainer; +class LLSaveOutfitComboBtn; class LLPanelOutfitsInventory : public LLPanel { + LOG_CLASS(LLPanelOutfitsInventory); public: LLPanelOutfitsInventory(); virtual ~LLPanelOutfitsInventory(); @@ -72,6 +74,7 @@ public: void setParent(LLSidepanelAppearance *parent); LLFolderView* getRootFolder(); + LLSidepanelAppearance* getAppearanceSP(); static LLPanelOutfitsInventory* findInstance(); @@ -84,7 +87,7 @@ private: LLSaveFolderState* mSavedFolderState; LLTabContainer* mAppearanceTabs; std::string mFilterSubString; - + std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn; public: ////////////////////////////////////////////////////////////////////////////////// // tab panels @@ -115,7 +118,6 @@ protected: void updateListCommands(); void onGearButtonClick(); void onWearButtonClick(); - void onAddButtonClick(); void showActionMenu(LLMenuGL* menu, std::string spawning_view_name); void onTrashButtonClick(); void onClipboardAction(const LLSD& userdata); @@ -123,6 +125,8 @@ protected: void onCustomAction(const LLSD& command_name); bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept); bool hasItemsSelected(); + void setWearablesLoading(bool val); + void onWearablesLoaded(); private: LLPanel* mListCommands; LLMenuGL* mMenuGearDefault; @@ -130,6 +134,8 @@ private: // List Commands // //////////////////////////////////////////////////////////////////////////////// /// + + bool mInitialized; }; #endif //LL_LLPANELOUTFITSINVENTORY_H diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index f2c0f92f9b..0a4af00f78 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -624,7 +624,7 @@ BOOL LLPanelPeople::postBuild() if(recent_view_sort) mRecentViewSortMenuHandle = recent_view_sort->getHandle(); - gVoiceClient->addObserver(this); + LLVoiceClient::getInstance()->addObserver(this); // call this method in case some list is empty and buttons can be in inconsistent state updateButtons(); @@ -825,7 +825,7 @@ void LLPanelPeople::updateButtons() } } - bool enable_calls = gVoiceClient->voiceWorking() && gVoiceClient->voiceEnabled(); + bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled(); buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front())); buttonSetEnabled("view_profile_btn", item_selected); diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 862e32cca8..93be0bda9e 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -42,6 +42,7 @@ #include "llagent.h" #include "llagentdata.h" // for gAgentID #include "llavataractions.h" +#include "llcallingcard.h" // for LLAvatarTracker #include "llviewermenu.h" // for gMenuHolder namespace LLPanelPeopleMenus @@ -49,64 +50,6 @@ namespace LLPanelPeopleMenus NearbyMenu gNearbyMenu; -//== ContextMenu ============================================================== - -ContextMenu::ContextMenu() -: mMenu(NULL) -{ -} - -ContextMenu::~ContextMenu() -{ - // do not forget delete LLContextMenu* mMenu. - // It can have registered Enable callbacks which are called from the LLMenuHolderGL::draw() - // via selected item (menu_item_call) by calling LLMenuItemCallGL::buildDrawLabel. - // we can have a crash via using callbacks of deleted instance of ContextMenu. EXT-4725 - - // menu holder deletes its menus on viewer exit, so we have no way to determine if instance - // of mMenu has already been deleted except of using LLHandle. EXT-4762. - if (!mMenuHandle.isDead()) - { - mMenu->die(); - mMenu = NULL; - } -} - -void ContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y) -{ - if (mMenu) - { - //preventing parent (menu holder) from deleting already "dead" context menus on exit - LLView* parent = mMenu->getParent(); - if (parent) - { - parent->removeChild(mMenu); - } - delete mMenu; - mMenu = NULL; - mUUIDs.clear(); - } - - if ( uuids.empty() ) - return; - - mUUIDs.resize(uuids.size()); - std::copy(uuids.begin(), uuids.end(), mUUIDs.begin()); - - mMenu = createMenu(); - mMenuHandle = mMenu->getHandle(); - mMenu->show(x, y); - LLMenuGL::showPopup(spawning_view, mMenu, x, y); -} - -void ContextMenu::hide() -{ - if(mMenu) - { - mMenu->hide(); - } -} - //== NearbyMenu =============================================================== LLContextMenu* NearbyMenu::createMenu() @@ -135,8 +78,7 @@ LLContextMenu* NearbyMenu::createMenu() enable_registrar.add("Avatar.CheckItem", boost::bind(&NearbyMenu::checkContextMenuItem, this, _2)); // create the context menu from the XUI - return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( - "menu_people_nearby.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); + return createFromFile("menu_people_nearby.xml"); } else { @@ -151,9 +93,7 @@ LLContextMenu* NearbyMenu::createMenu() enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2)); // create the context menu from the XUI - return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu> - ("menu_people_nearby_multiselect.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); - + return createFromFile("menu_people_nearby_multiselect.xml"); } } @@ -175,6 +115,12 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) // - there are selected people // - and there are no friends among selection yet. + //EXT-7389 - disable for more than 1 + if(mUUIDs.size() > 1) + { + return false; + } + bool result = (mUUIDs.size() > 0); uuid_vec_t::const_iterator diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h index 8e12710afc..e1f8790135 100644 --- a/indra/newview/llpanelpeoplemenus.h +++ b/indra/newview/llpanelpeoplemenus.h @@ -33,42 +33,15 @@ #ifndef LL_LLPANELPEOPLEMENUS_H #define LL_LLPANELPEOPLEMENUS_H -#include "llavatarlistitem.h" +#include "lllistcontextmenu.h" namespace LLPanelPeopleMenus { /** - * Base context menu. - */ -class ContextMenu : public LLAvatarListItem::ContextMenu -{ -public: - ContextMenu(); - virtual ~ContextMenu(); - - /** - * Show the menu at specified coordinates. - * - * @param uuids - an array of avatar or group ids - */ - /*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y); - - virtual void hide(); - -protected: - - virtual LLContextMenu* createMenu() = 0; - - uuid_vec_t mUUIDs; - LLContextMenu* mMenu; - LLHandle<LLView> mMenuHandle; -}; - -/** * Menu used in the nearby people list. */ -class NearbyMenu : public ContextMenu +class NearbyMenu : public LLListContextMenu { public: /*virtual*/ LLContextMenu* createMenu(); diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 1a1650c38b..c8abcc83c4 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -50,7 +50,7 @@ #include "llagentui.h" #include "llappviewer.h" #include "llcallbacklist.h" -#include "llfloaterbuycurrency.h" +#include "llbuycurrencyhtml.h" #include "llstatusbar.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" @@ -573,7 +573,7 @@ void LLPanelPlaceProfile::onForSaleBannerClick() { LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", price); - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("buying_selected_land", args), price); + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("buying_selected_land", args), price ); } else { diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 51a11e97e4..028440562d 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -615,8 +615,21 @@ void LLPanelPlaces::onShowOnMapButtonClicked() } else { - if (mActivePanel) + if (mActivePanel && mActivePanel->isSingleItemSelected()) + { mActivePanel->onShowOnMap(); + } + else + { + LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance(); + LLVector3d global_pos = gAgent.getPositionGlobal(); + + if (!global_pos.isExactlyZero() && worldmap_instance) + { + worldmap_instance->trackLocation(global_pos); + LLFloaterReg::showInstance("world_map", "center"); + } + } } } @@ -1072,7 +1085,6 @@ void LLPanelPlaces::updateVerbs() mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); mPlaceInfoBtn->setVisible(!is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn); - mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); if (is_place_info_visible) diff --git a/indra/newview/llpanelplacestab.cpp b/indra/newview/llpanelplacestab.cpp index 42cf3b03a3..0f3c51fb4f 100644 --- a/indra/newview/llpanelplacestab.cpp +++ b/indra/newview/llpanelplacestab.cpp @@ -71,10 +71,7 @@ void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos, std::string sl_url; if ( gotSimName ) { - F32 region_x = (F32)fmod( landmark_global_pos.mdV[VX], (F64)REGION_WIDTH_METERS ); - F32 region_y = (F32)fmod( landmark_global_pos.mdV[VY], (F64)REGION_WIDTH_METERS ); - - sl_url = LLSLURL::buildSLURL(sim_name, llround(region_x), llround(region_y), llround((F32)landmark_global_pos.mdV[VZ])); + sl_url = LLSLURL(sim_name, landmark_global_pos).getSLURLString(); } else { diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h index f4e93a7658..4a155afd71 100644 --- a/indra/newview/llpanelplacestab.h +++ b/indra/newview/llpanelplacestab.h @@ -47,6 +47,7 @@ public: virtual void onShowOnMap() = 0; virtual void onShowProfile() = 0; virtual void onTeleport() = 0; + virtual bool isSingleItemSelected() = 0; bool isTabVisible(); // Check if parent TabContainer is visible. diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index c0b2244038..e8b6c6bfe5 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -477,6 +477,12 @@ void LLTeleportHistoryPanel::onSearchEdit(const std::string& string) } // virtual +bool LLTeleportHistoryPanel::isSingleItemSelected() +{ + return mLastSelectedFlatlList && mLastSelectedFlatlList->getSelectedItem(); +} + +// virtual void LLTeleportHistoryPanel::onShowOnMap() { if (!mLastSelectedFlatlList) @@ -557,7 +563,6 @@ void LLTeleportHistoryPanel::updateVerbs() if (!mLastSelectedFlatlList) { mTeleportBtn->setEnabled(false); - mShowOnMapBtn->setEnabled(false); mShowProfile->setEnabled(false); return; } @@ -565,8 +570,8 @@ void LLTeleportHistoryPanel::updateVerbs() LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem()); mTeleportBtn->setEnabled(NULL != itemp); - mShowOnMapBtn->setEnabled(NULL != itemp); mShowProfile->setEnabled(NULL != itemp); + mShowOnMapBtn->setEnabled(true); } void LLTeleportHistoryPanel::getNextTab(const LLDate& item_date, S32& tab_idx, LLDate& tab_date) diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index a456ca506f..87e7044222 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -47,6 +47,7 @@ class LLFlatListView; class LLTeleportHistoryPanel : public LLPanelPlacesTab { public: + // *TODO: derive from LLListContextMenu? class ContextMenu { public: @@ -77,6 +78,7 @@ public: /*virtual*/ void onTeleport(); ///*virtual*/ void onCopySLURL(); /*virtual*/ void updateVerbs(); + /*virtual*/ bool isSingleItemSelected(); private: @@ -123,4 +125,6 @@ private: LLHandle<LLView> mGearMenuHandle; }; + + #endif //LL_LLPANELTELEPORTHISTORY_H diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index a058548459..4f0946774a 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -37,6 +37,8 @@ #include "llavataractions.h" #include "llagent.h" +#include "llimview.h" +#include "llnotificationsutil.h" #include "llparticipantlist.h" #include "llspeakers.h" #include "llviewercontrol.h" @@ -95,7 +97,7 @@ public: void onChange() { uuid_set_t participant_uuids; - LLVoiceClient::getInstance()->getParticipantsUUIDSet(participant_uuids); + LLVoiceClient::getInstance()->getParticipantList(participant_uuids); // check whether Avaline caller exists among voice participants @@ -558,9 +560,8 @@ void LLParticipantList::addAvatarIDExceptAgent(const LLUUID& avatar_id) } else { - LLVoiceClient::participantState *participant = LLVoiceClient::getInstance()->findParticipantByID(avatar_id); - - mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), participant ? participant->mAccountName : LLTrans::getString("AvatarNameWaiting")); + std::string display_name = LLVoiceClient::getInstance()->getDisplayName(avatar_id); + mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), display_name.empty() ? display_name : LLTrans::getString("AvatarNameWaiting")); mAvalineUpdater->watchAvalineCaller(avatar_id); } adjustParticipant(avatar_id); @@ -647,13 +648,13 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() enable_registrar.add("ParticipantList.CheckItem", boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem, this, _2)); // create the context menu from the XUI - LLContextMenu* main_menu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( - "menu_participant_list.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); + 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()); @@ -664,22 +665,20 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y) { - LLPanelPeopleMenus::ContextMenu::show(spawning_view, uuids, x, 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->childSetVisible("ModerateVoiceMuteSelected", false); - LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceMuteOthers", false); } else { LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteSelected", false); - LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteOthers", false); } } @@ -719,8 +718,10 @@ void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, { return; } + LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mParent.mAvatarList->getItemByValue(speaker_id)); + if (NULL == item) return; - name = speakerp->mDisplayName; + name = item->getAvatarName(); LLMute::EType mute_type; switch (speakerp->mType) @@ -782,16 +783,17 @@ void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdat if (!gAgent.getRegion()) return; bool moderate_selected = userdata.asString() == "selected"; - const LLUUID& selected_avatar_id = mUUIDs.front(); - bool is_muted = isMuted(selected_avatar_id); if (moderate_selected) { + const LLUUID& selected_avatar_id = mUUIDs.front(); + bool is_muted = isMuted(selected_avatar_id); moderateVoiceParticipant(selected_avatar_id, is_muted); } else { - moderateVoiceOtherParticipants(selected_avatar_id, is_muted); + bool unmute_all = userdata.asString() == "unmute_all"; + moderateVoiceAllParticipants(unmute_all); } } @@ -804,15 +806,46 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LL } } -void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute) +void LLParticipantList::LLParticipantListMenu::moderateVoiceAllParticipants(bool unmute) { LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); if (mgr) { - mgr->moderateVoiceOtherParticipants(excluded_avatar_id, unmute); + 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 (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(); @@ -853,7 +886,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& else if (item == "can_call") { bool not_agent = mUUIDs.front() != gAgentID; - bool can_call = not_agent && LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking(); + bool can_call = not_agent && LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); return can_call; } diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index bbef8baaac..3fe45fa591 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -32,8 +32,8 @@ #include "llviewerprecompiledheaders.h" #include "llevent.h" -#include "llpanelpeoplemenus.h" #include "llavatarlist.h" // for LLAvatarItemRecentSpeakerComparator +#include "lllistcontextmenu.h" class LLSpeakerMgr; class LLAvatarList; @@ -148,7 +148,7 @@ class LLParticipantList /** * Menu used in the participant list. */ - class LLParticipantListMenu : public LLPanelPeopleMenus::ContextMenu + class LLParticipantListMenu : public LLListContextMenu { public: LLParticipantListMenu(LLParticipantList& parent):mParent(parent){}; @@ -187,7 +187,7 @@ class LLParticipantList * @param userdata can be "selected" or "others". * * @see moderateVoiceParticipant() - * @see moderateVoiceOtherParticipants() + * @see moderateVoiceAllParticipants() */ void moderateVoice(const LLSD& userdata); @@ -200,22 +200,22 @@ class LLParticipantList * @param[in] avatar_id UUID of avatar to be processed * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted. * - * @see moderateVoiceOtherParticipants() + * @see moderateVoiceAllParticipants() */ void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); /** - * Mutes/Unmutes all avatars except specified for current group voice chat. + * 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. - * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted. * - * @param[in] excluded_avatar_id UUID of avatar NOT to be processed * @param[in] unmute if true - avatars will be muted, otherwise - unmuted. * * @see moderateVoiceParticipant() */ - void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute); + void moderateVoiceAllParticipants(bool unmute); + + static void confirmMuteAllCallback(const LLSD& notification, const LLSD& response); }; /** diff --git a/indra/newview/llsaveoutfitcombobtn.cpp b/indra/newview/llsaveoutfitcombobtn.cpp new file mode 100644 index 0000000000..b9b577084b --- /dev/null +++ b/indra/newview/llsaveoutfitcombobtn.cpp @@ -0,0 +1,97 @@ +/** + * @file llsaveoutfitcombobtn.cpp + * @brief Represents outfit save/save as combo button. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llappearancemgr.h" +#include "llpaneloutfitsinventory.h" +#include "llsaveoutfitcombobtn.h" +#include "llviewermenu.h" + +static const std::string SAVE_BTN("save_btn"); +static const std::string SAVE_FLYOUT_BTN("save_flyout_btn"); + +LLSaveOutfitComboBtn::LLSaveOutfitComboBtn(LLPanel* parent, bool saveAsDefaultAction): + mParent(parent), mSaveAsDefaultAction(saveAsDefaultAction) +{ + // register action mapping before creating menu + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar; + save_registar.add("Outfit.Save.Action", boost::bind( + &LLSaveOutfitComboBtn::saveOutfit, this, false)); + save_registar.add("Outfit.SaveAs.Action", boost::bind( + &LLSaveOutfitComboBtn::saveOutfit, this, true)); + + mParent->childSetAction(SAVE_BTN, boost::bind(&LLSaveOutfitComboBtn::saveOutfit, this, mSaveAsDefaultAction)); + mParent->childSetAction(SAVE_FLYOUT_BTN, boost::bind(&LLSaveOutfitComboBtn::showSaveMenu, this)); + + mSaveMenu = LLUICtrlFactory::getInstance()->createFromFile< + LLToggleableMenu> ("menu_save_outfit.xml", gMenuHolder, + LLViewerMenuHolderGL::child_registry_t::instance()); +} + +void LLSaveOutfitComboBtn::showSaveMenu() +{ + S32 x, y; + LLUI::getMousePositionLocal(mParent, &x, &y); + + mSaveMenu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(mParent, mSaveMenu, x, y); +} + +void LLSaveOutfitComboBtn::saveOutfit(bool as_new) +{ + if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit()) + { + // we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved. + // If updateBaseOutfit fails, ask for an outfit name anyways + return; + } + + LLPanelOutfitsInventory* panel_outfits_inventory = + LLPanelOutfitsInventory::findInstance(); + if (panel_outfits_inventory) + { + panel_outfits_inventory->onSave(); + } + + //*TODO how to get to know when base outfit is updated or new outfit is created? +} + +void LLSaveOutfitComboBtn::setMenuItemEnabled(const std::string& item, bool enabled) +{ + mSaveMenu->setItemEnabled("save_outfit", enabled); +} + +void LLSaveOutfitComboBtn::setSaveBtnEnabled(bool enabled) +{ + mParent->childSetEnabled(SAVE_BTN, enabled); +} diff --git a/indra/newview/llsaveoutfitcombobtn.h b/indra/newview/llsaveoutfitcombobtn.h new file mode 100644 index 0000000000..fec7122194 --- /dev/null +++ b/indra/newview/llsaveoutfitcombobtn.h @@ -0,0 +1,60 @@ +/** + * @file llsaveoutfitcombobtn.h + * @brief Represents outfit save/save as combo button. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLSAVEOUTFITCOMBOBTN_H +#define LL_LLSAVEOUTFITCOMBOBTN_H + +class LLButton; + +#include "lltoggleablemenu.h" + +/** + * Represents outfit Save/Save As combo button. + */ +class LLSaveOutfitComboBtn +{ + LOG_CLASS(LLSaveOutfitComboBtn); +public: + LLSaveOutfitComboBtn(LLPanel* parent, bool saveAsDefaultAction = false); + + void showSaveMenu(); + void saveOutfit(bool as_new = false); + void setMenuItemEnabled(const std::string& item, bool enabled); + void setSaveBtnEnabled(bool enabled); + +private: + bool mSaveAsDefaultAction; + LLPanel* mParent; + LLToggleableMenu* mSaveMenu; +}; + +#endif // LL_LLSAVEOUTFITCOMBOBTN_H diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 11b6c0a3ae..b68fc3b002 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -482,7 +482,7 @@ std::string LLScriptFloaterManager::getObjectName(const LLUUID& notification_id) text = notification->getSubstitutions()["OBJECTNAME"].asString(); break; case LLScriptFloaterManager::OBJ_GIVE_INVENTORY: - text = notification->getSubstitutions()["NAME"].asString(); + text = notification->getSubstitutions()["OBJECTFROMNAME"].asString(); break; default: text = LLTrans::getString("object"); diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index a5518d87d4..242af6981c 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -73,9 +73,9 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param F32 min_weight = param->getMinWeight(); F32 max_weight = param->getMaxWeight(); - mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), min_weight); + mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, min_weight); pos_x = getChild<LLViewBorder>("right_border")->getRect().mLeft + left_border->getBorderWidth(); - mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), max_weight ); + mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, max_weight ); mHintMin->setAllowsUpdates( FALSE ); mHintMax->setAllowsUpdates( FALSE ); diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp new file mode 100644 index 0000000000..9e636f38c0 --- /dev/null +++ b/indra/newview/llsecapi.cpp @@ -0,0 +1,197 @@ +/** + * @file llsecapi.cpp + * @brief Security API for services such as certificate handling + * secure local storage, etc. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" +#include "llsecapi.h" +#include "llsechandler_basic.h" +#include <openssl/evp.h> +#include <openssl/err.h> +#include <map> +#include "llhttpclient.h" + + + +std::map<std::string, LLPointer<LLSecAPIHandler> > gHandlerMap; +LLPointer<LLSecAPIHandler> gSecAPIHandler; + +void initializeSecHandler() +{ + ERR_load_crypto_strings(); + OpenSSL_add_all_algorithms(); + + gHandlerMap[BASIC_SECHANDLER] = new LLSecAPIBasicHandler(); + + + // Currently, we only have the Basic handler, so we can point the main sechandler + // pointer to the basic handler. Later, we'll create a wrapper handler that + // selects the appropriate sechandler as needed, for instance choosing the + // mac keyring handler, with fallback to the basic sechandler + gSecAPIHandler = gHandlerMap[BASIC_SECHANDLER]; + + // initialize all SecAPIHandlers + LLProtectedDataException ex = LLProtectedDataException(""); + std::map<std::string, LLPointer<LLSecAPIHandler> >::const_iterator itr; + for(itr = gHandlerMap.begin(); itr != gHandlerMap.end(); ++itr) + { + LLPointer<LLSecAPIHandler> handler = (*itr).second; + try + { + handler->init(); + } + catch (LLProtectedDataException e) + { + ex = e; + } + } + if (ex.getMessage().length() > 0 ) // an exception was thrown. + { + throw ex; + } + +} +// start using a given security api handler. If the string is empty +// the default is used +LLPointer<LLSecAPIHandler> getSecHandler(const std::string& handler_type) +{ + if (gHandlerMap.find(handler_type) != gHandlerMap.end()) + { + return gHandlerMap[handler_type]; + } + else + { + return LLPointer<LLSecAPIHandler>(NULL); + } +} +// register a handler +void registerSecHandler(const std::string& handler_type, + LLPointer<LLSecAPIHandler>& handler) +{ + gHandlerMap[handler_type] = handler; +} + +std::ostream& operator <<(std::ostream& s, const LLCredential& cred) +{ + return s << (std::string)cred; +} + + +// secapiSSLCertVerifyCallback +// basic callback called when a cert verification is requested. +// calls SECAPI to validate the context +// not initialized in the above initialization function, due to unit tests +// see llappviewer + +int secapiSSLCertVerifyCallback(X509_STORE_CTX *ctx, void *param) +{ + LLURLRequest *req = (LLURLRequest *)param; + LLPointer<LLCertificateStore> store = gSecAPIHandler->getCertificateStore(""); + LLPointer<LLCertificateChain> chain = gSecAPIHandler->getCertificateChain(ctx); + LLSD validation_params = LLSD::emptyMap(); + LLURI uri(req->getURL()); + validation_params[CERT_HOSTNAME] = uri.hostName(); + try + { + // we rely on libcurl to validate the hostname, as libcurl does more extensive validation + // leaving our hostname validation call mechanism for future additions with respect to + // OS native (Mac keyring, windows CAPI) validation. + store->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), chain, validation_params); + } + catch (LLCertValidationTrustException& cert_exception) + { + LL_WARNS("AppInit") << "Cert not trusted: " << cert_exception.getMessage() << LL_ENDL; + return 0; + } + catch (LLCertException& cert_exception) + { + LL_WARNS("AppInit") << "cert error " << cert_exception.getMessage() << LL_ENDL; + return 0; + } + catch (...) + { + LL_WARNS("AppInit") << "cert error " << LL_ENDL; + return 0; + } + return 1; +} + +LLSD LLCredential::getLoginParams() +{ + LLSD result = LLSD::emptyMap(); + try + { + if (mIdentifier["type"].asString() == "agent") + { + // legacy credential + result["passwd"] = "$1$" + mAuthenticator["secret"].asString(); + result["first"] = mIdentifier["first_name"]; + result["last"] = mIdentifier["last_name"]; + + } + else if (mIdentifier["type"].asString() == "account") + { + result["username"] = mIdentifier["account_name"]; + result["passwd"] = mAuthenticator["secret"]; + + } + } + catch (...) + { + // we could have corrupt data, so simply return a null login param if so + LL_WARNS("AppInit") << "Invalid credential" << LL_ENDL; + } + return result; +} + +void LLCredential::identifierType(std::string &idType) +{ + if(mIdentifier.has("type")) + { + idType = mIdentifier["type"].asString(); + } + else { + idType = std::string(); + + } +} + +void LLCredential::authenticatorType(std::string &idType) +{ + if(mAuthenticator.has("type")) + { + idType = mAuthenticator["type"].asString(); + } + else { + idType = std::string(); + + } +} diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h new file mode 100644 index 0000000000..5a1a3879d4 --- /dev/null +++ b/indra/newview/llsecapi.h @@ -0,0 +1,498 @@ +/** + * @file llsecapi.h + * @brief Security API for services such as certificate handling + * secure local storage, etc. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LLSECAPI_H +#define LLSECAPI_H +#include <vector> +#include <openssl/x509.h> +#include <ostream> + +#ifdef LL_WINDOWS +#pragma warning(disable:4250) +#endif // LL_WINDOWS + +// All error handling is via exceptions. + + +#define CERT_SUBJECT_NAME "subject_name" +#define CERT_ISSUER_NAME "issuer_name" +#define CERT_NAME_CN "commonName" + +#define CERT_SUBJECT_NAME_STRING "subject_name_string" +#define CERT_ISSUER_NAME_STRING "issuer_name_string" + +#define CERT_SERIAL_NUMBER "serial_number" + +#define CERT_VALID_FROM "valid_from" +#define CERT_VALID_TO "valid_to" +#define CERT_SHA1_DIGEST "sha1_digest" +#define CERT_MD5_DIGEST "md5_digest" +#define CERT_HOSTNAME "hostname" +#define CERT_BASIC_CONSTRAINTS "basicConstraints" +#define CERT_BASIC_CONSTRAINTS_CA "CA" +#define CERT_BASIC_CONSTRAINTS_PATHLEN "pathLen" + +#define CERT_KEY_USAGE "keyUsage" +#define CERT_KU_DIGITAL_SIGNATURE "digitalSignature" +#define CERT_KU_NON_REPUDIATION "nonRepudiation" +#define CERT_KU_KEY_ENCIPHERMENT "keyEncipherment" +#define CERT_KU_DATA_ENCIPHERMENT "dataEncipherment" +#define CERT_KU_KEY_AGREEMENT "keyAgreement" +#define CERT_KU_CERT_SIGN "certSigning" +#define CERT_KU_CRL_SIGN "crlSigning" +#define CERT_KU_ENCIPHER_ONLY "encipherOnly" +#define CERT_KU_DECIPHER_ONLY "decipherOnly" + +#define BASIC_SECHANDLER "BASIC_SECHANDLER" +#define CERT_VALIDATION_DATE "validation_date" + +#define CERT_EXTENDED_KEY_USAGE "extendedKeyUsage" +#define CERT_EKU_SERVER_AUTH SN_server_auth + +#define CERT_SUBJECT_KEY_IDENTFIER "subjectKeyIdentifier" +#define CERT_AUTHORITY_KEY_IDENTIFIER "authorityKeyIdentifier" +#define CERT_AUTHORITY_KEY_IDENTIFIER_ID "authorityKeyIdentifierId" +#define CERT_AUTHORITY_KEY_IDENTIFIER_NAME "authorityKeyIdentifierName" +#define CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL "authorityKeyIdentifierSerial" + +// validate the current time lies within +// the validation period of the cert +#define VALIDATION_POLICY_TIME 1 + +// validate that the CA, or some cert in the chain +// lies within the certificate store +#define VALIDATION_POLICY_TRUSTED 2 + +// validate that the subject name of +// the cert contains the passed in hostname +// or validates against the hostname +#define VALIDATION_POLICY_HOSTNAME 4 + + +// validate that the cert contains the SSL EKU +#define VALIDATION_POLICY_SSL_KU 8 + +// validate that the cert contains the SSL EKU +#define VALIDATION_POLICY_CA_KU 16 + +#define VALIDATION_POLICY_CA_BASIC_CONSTRAINTS 32 + +// validate that the cert is correct for SSL +#define VALIDATION_POLICY_SSL (VALIDATION_POLICY_TIME | \ + VALIDATION_POLICY_HOSTNAME | \ + VALIDATION_POLICY_TRUSTED | \ + VALIDATION_POLICY_SSL_KU | \ + VALIDATION_POLICY_CA_BASIC_CONSTRAINTS | \ + VALIDATION_POLICY_CA_KU) + + + + + + +class LLProtectedDataException +{ +public: + LLProtectedDataException(const char *msg) + { + LL_WARNS("SECAPI") << "Protected Data Error: " << (std::string)msg << LL_ENDL; + mMsg = (std::string)msg; + } + std::string getMessage() { return mMsg; } +protected: + std::string mMsg; +}; + +// class LLCertificate +// parent class providing an interface for certifiate. +// LLCertificates are considered unmodifiable +// Certificates are pulled out of stores, or created via +// factory calls +class LLCertificate : public LLRefCount +{ + LOG_CLASS(LLCertificate); +public: + LLCertificate() {} + + virtual ~LLCertificate() {} + + // return a PEM encoded certificate. The encoding + // includes the -----BEGIN CERTIFICATE----- and end certificate elements + virtual std::string getPem() const=0; + + // return a DER encoded certificate + virtual std::vector<U8> getBinary() const=0; + + // return an LLSD object containing information about the certificate + // such as its name, signature, expiry time, serial number + virtual void getLLSD(LLSD& llsd)=0; + + // return an openSSL X509 struct for the certificate + virtual X509* getOpenSSLX509() const=0; + +}; + +// class LLCertificateVector +// base class for a list of certificates. + + +class LLCertificateVector : public LLRefCount +{ + +public: + + LLCertificateVector() {}; + virtual ~LLCertificateVector() {}; + + // base iterator implementation class, providing + // the functionality needed for the iterator class. + class iterator_impl : public LLRefCount + { + public: + iterator_impl() {}; + virtual ~iterator_impl() {}; + virtual void seek(bool incr)=0; + virtual LLPointer<iterator_impl> clone() const=0; + virtual bool equals(const LLPointer<iterator_impl>& _iter) const=0; + virtual LLPointer<LLCertificate> get()=0; + }; + + // iterator class + class iterator + { + public: + iterator(LLPointer<iterator_impl> impl) : mImpl(impl) {} + iterator() : mImpl(NULL) {} + iterator(const iterator& _iter) {mImpl = _iter.mImpl->clone(); } + ~iterator() {} + iterator& operator++() { if(mImpl.notNull()) mImpl->seek(true); return *this;} + iterator& operator--() { if(mImpl.notNull()) mImpl->seek(false); return *this;} + + iterator operator++(int) { iterator result = *this; if(mImpl.notNull()) mImpl->seek(true); return result;} + iterator operator--(int) { iterator result = *this; if(mImpl.notNull()) mImpl->seek(false); return result;} + LLPointer<LLCertificate> operator*() { return mImpl->get(); } + + LLPointer<iterator_impl> mImpl; + protected: + friend bool operator==(const LLCertificateVector::iterator& _lhs, const LLCertificateVector::iterator& _rhs); + bool equals(const iterator& _iter) const { return mImpl->equals(_iter.mImpl); } + }; + + // numeric indexer + virtual LLPointer<LLCertificate> operator[](int)=0; + + // Iteration + virtual iterator begin()=0; + + virtual iterator end()=0; + + // find a cert given params + virtual iterator find(const LLSD& params) =0; + + // return the number of certs in the store + virtual int size() const = 0; + + // append the cert to the store. if a copy of the cert already exists in the store, it is removed first + virtual void add(LLPointer<LLCertificate> cert)=0; + + // insert the cert to the store. if a copy of the cert already exists in the store, it is removed first + virtual void insert(iterator location, LLPointer<LLCertificate> cert)=0; + + // remove a certificate from the store + virtual LLPointer<LLCertificate> erase(iterator cert)=0; +}; + +// class LLCertificateChain +// Class representing a chain of certificates in order, with the +// first element being the child cert. +class LLCertificateChain : virtual public LLCertificateVector +{ + +public: + LLCertificateChain() {} + + virtual ~LLCertificateChain() {} + +}; + +// class LLCertificateStore +// represents a store of certificates, typically a store of root CA +// certificates. The store can be persisted, and can be used to validate +// a cert chain +// +class LLCertificateStore : virtual public LLCertificateVector +{ + +public: + + LLCertificateStore() {} + virtual ~LLCertificateStore() {} + + // persist the store + virtual void save()=0; + + // return the store id + virtual std::string storeId() const=0; + + // validate a certificate chain given the params. + // Will throw exceptions on error + + virtual void validate(int validation_policy, + LLPointer<LLCertificateChain> cert_chain, + const LLSD& validation_params) =0; + +}; + + +inline +bool operator==(const LLCertificateVector::iterator& _lhs, const LLCertificateVector::iterator& _rhs) +{ + return _lhs.equals(_rhs); +} +inline +bool operator!=(const LLCertificateVector::iterator& _lhs, const LLCertificateVector::iterator& _rhs) +{ + return !(_lhs == _rhs); +} + + +#define CRED_IDENTIFIER_TYPE_ACCOUNT "account" +#define CRED_IDENTIFIER_TYPE_AGENT "agent" +#define CRED_AUTHENTICATOR_TYPE_CLEAR "clear" +#define CRED_AUTHENTICATOR_TYPE_HASH "hash" +// +// LLCredential - interface for credentials providing the following functionality: +// * persistance of credential information based on grid (for saving username/password) +// * serialization to an OGP identifier/authenticator pair +// +class LLCredential : public LLRefCount +{ +public: + + LLCredential() {} + + LLCredential(const std::string& grid) + { + mGrid = grid; + mIdentifier = LLSD::emptyMap(); + mAuthenticator = LLSD::emptyMap(); + } + + virtual ~LLCredential() {} + + virtual void setCredentialData(const LLSD& identifier, const LLSD& authenticator) + { + mIdentifier = identifier; + mAuthenticator = authenticator; + } + virtual LLSD getIdentifier() { return mIdentifier; } + virtual void identifierType(std::string& idType); + virtual LLSD getAuthenticator() { return mAuthenticator; } + virtual void authenticatorType(std::string& authType); + virtual LLSD getLoginParams(); + virtual std::string getGrid() { return mGrid; } + + + virtual void clearAuthenticator() { mAuthenticator = LLSD(); } + virtual std::string userID() const { return std::string("unknown");} + virtual std::string asString() const { return std::string("unknown");} + operator std::string() const { return asString(); } +protected: + LLSD mIdentifier; + LLSD mAuthenticator; + std::string mGrid; +}; + +std::ostream& operator <<(std::ostream& s, const LLCredential& cred); + + +// All error handling is via exceptions. + +class LLCertException +{ +public: + LLCertException(LLPointer<LLCertificate> cert, const char* msg) + { + + mCert = cert; + + LL_WARNS("SECAPI") << "Certificate Error: " << (std::string)msg << LL_ENDL; + mMsg = (std::string)msg; + } + LLPointer<LLCertificate> getCert() { return mCert; } + std::string getMessage() { return mMsg; } +protected: + LLPointer<LLCertificate> mCert; + std::string mMsg; +}; + +class LLInvalidCertificate : public LLCertException +{ +public: + LLInvalidCertificate(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertInvalid") + { + } +protected: +}; + +class LLCertValidationTrustException : public LLCertException +{ +public: + LLCertValidationTrustException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertUntrusted") + { + } +protected: +}; + +class LLCertValidationHostnameException : public LLCertException +{ +public: + LLCertValidationHostnameException(std::string hostname, + LLPointer<LLCertificate> cert) : LLCertException(cert, "CertInvalidHostname") + { + mHostname = hostname; + } + + std::string getHostname() { return mHostname; } +protected: + std::string mHostname; +}; + +class LLCertValidationExpirationException : public LLCertException +{ +public: + LLCertValidationExpirationException(LLPointer<LLCertificate> cert, + LLDate current_time) : LLCertException(cert, "CertExpired") + { + mTime = current_time; + } + LLDate GetTime() { return mTime; } +protected: + LLDate mTime; +}; + +class LLCertKeyUsageValidationException : public LLCertException +{ +public: + LLCertKeyUsageValidationException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertKeyUsage") + { + } +protected: +}; + +class LLCertBasicConstraintsValidationException : public LLCertException +{ +public: + LLCertBasicConstraintsValidationException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertBasicConstraints") + { + } +protected: +}; + +class LLCertValidationInvalidSignatureException : public LLCertException +{ +public: + LLCertValidationInvalidSignatureException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertInvalidSignature") + { + } +protected: +}; + +// LLSecAPIHandler Class +// Interface handler class for the various security storage handlers. +class LLSecAPIHandler : public LLRefCount +{ +public: + + + LLSecAPIHandler() {} + virtual ~LLSecAPIHandler() {} + + // initialize the SecAPIHandler + virtual void init() {}; + + // instantiate a certificate from a pem string + virtual LLPointer<LLCertificate> getCertificate(const std::string& pem_cert)=0; + + + + // instiate a certificate from an openssl X509 structure + virtual LLPointer<LLCertificate> getCertificate(X509* openssl_cert)=0; + + // instantiate a chain from an X509_STORE_CTX + virtual LLPointer<LLCertificateChain> getCertificateChain(const X509_STORE_CTX* chain)=0; + + // instantiate a cert store given it's id. if a persisted version + // exists, it'll be loaded. If not, one will be created (but not + // persisted) + virtual LLPointer<LLCertificateStore> getCertificateStore(const std::string& store_id)=0; + + // persist data in a protected store + virtual void setProtectedData(const std::string& data_type, + const std::string& data_id, + const LLSD& data)=0; + + // retrieve protected data + virtual LLSD getProtectedData(const std::string& data_type, + const std::string& data_id)=0; + + // delete a protected data item from the store + virtual void deleteProtectedData(const std::string& data_type, + const std::string& data_id)=0; + + virtual LLPointer<LLCredential> createCredential(const std::string& grid, + const LLSD& identifier, + const LLSD& authenticator)=0; + + virtual LLPointer<LLCredential> loadCredential(const std::string& grid)=0; + + virtual void saveCredential(LLPointer<LLCredential> cred, bool save_authenticator)=0; + + virtual void deleteCredential(LLPointer<LLCredential> cred)=0; + +}; + +void initializeSecHandler(); + +// retrieve a security api depending on the api type +LLPointer<LLSecAPIHandler> getSecHandler(const std::string& handler_type); + +void registerSecHandler(const std::string& handler_type, + LLPointer<LLSecAPIHandler>& handler); + +extern LLPointer<LLSecAPIHandler> gSecAPIHandler; + + +int secapiSSLCertVerifyCallback(X509_STORE_CTX *ctx, void *param); + + +#endif // LL_SECAPI_H diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp new file mode 100644 index 0000000000..e191e50c4b --- /dev/null +++ b/indra/newview/llsechandler_basic.cpp @@ -0,0 +1,1665 @@ +/** + * @file llsechandler_basic.cpp + * @brief Security API for services such as certificate handling + * secure local storage, etc. + * + * $LicenseInfo:firstyear=2003&license=viewergpl$ + * + * Copyright (c) 2003-2000, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * +LLS * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" +#include "llsecapi.h" +#include "llsechandler_basic.h" +#include "llsdserialize.h" +#include "llviewernetwork.h" +#include "llxorcipher.h" +#include "llfile.h" +#include "lldir.h" +#include "llviewercontrol.h" +#include <vector> +#include <ios> +#include <openssl/ossl_typ.h> +#include <openssl/x509.h> +#include <openssl/x509v3.h> +#include <openssl/pem.h> +#include <openssl/asn1.h> +#include <openssl/rand.h> +#include <openssl/err.h> +#include <iostream> +#include <iomanip> +#include <time.h> +#include "llmachineid.h" + + + +// 128 bits of salt data... +#define STORE_SALT_SIZE 16 +#define BUFFER_READ_SIZE 256 +std::string cert_string_from_asn1_string(ASN1_STRING* value); +std::string cert_string_from_octet_string(ASN1_OCTET_STRING* value); + +LLSD _basic_constraints_ext(X509* cert); +LLSD _key_usage_ext(X509* cert); +LLSD _ext_key_usage_ext(X509* cert); +LLSD _subject_key_identifier_ext(X509 *cert); +LLSD _authority_key_identifier_ext(X509* cert); + +LLBasicCertificate::LLBasicCertificate(const std::string& pem_cert) +{ + + // BIO_new_mem_buf returns a read only bio, but takes a void* which isn't const + // so we need to cast it. + BIO * pem_bio = BIO_new_mem_buf((void*)pem_cert.c_str(), pem_cert.length()); + if(pem_bio == NULL) + { + LL_WARNS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL; + throw LLInvalidCertificate(this); + } + mCert = NULL; + PEM_read_bio_X509(pem_bio, &mCert, 0, NULL); + BIO_free(pem_bio); + if (!mCert) + { + throw LLInvalidCertificate(this); + } +} + + +LLBasicCertificate::LLBasicCertificate(X509* pCert) +{ + if (!pCert || !pCert->cert_info) + { + throw LLInvalidCertificate(this); + } + mCert = X509_dup(pCert); +} + +LLBasicCertificate::~LLBasicCertificate() +{ + if(mCert) + { + X509_free(mCert); + } +} + +// +// retrieve the pem using the openssl functionality +std::string LLBasicCertificate::getPem() const +{ + char * pem_bio_chars = NULL; + // a BIO is the equivalent of a 'std::stream', and + // can be a file, mem stream, whatever. Grab a memory based + // BIO for the result + BIO *pem_bio = BIO_new(BIO_s_mem()); + if (!pem_bio) + { + LL_WARNS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL; + return std::string(); + } + PEM_write_bio_X509(pem_bio, mCert); + int length = BIO_get_mem_data(pem_bio, &pem_bio_chars); + std::string result = std::string(pem_bio_chars, length); + BIO_free(pem_bio); + return result; +} + +// get the DER encoding for the cert +// DER is a binary encoding format for certs... +std::vector<U8> LLBasicCertificate::getBinary() const +{ + U8 * der_bio_data = NULL; + // get a memory bio + BIO *der_bio = BIO_new(BIO_s_mem()); + if (!der_bio) + { + LL_WARNS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL; + return std::vector<U8>(); + } + i2d_X509_bio(der_bio, mCert); + int length = BIO_get_mem_data(der_bio, &der_bio_data); + std::vector<U8> result(length); + // vectors are guranteed to be a contiguous chunk of memory. + memcpy(&result[0], der_bio_data, length); + BIO_free(der_bio); + return result; +} + + +void LLBasicCertificate::getLLSD(LLSD &llsd) +{ + if (mLLSDInfo.isUndefined()) + { + _initLLSD(); + } + llsd = mLLSDInfo; +} + +// Initialize the LLSD info for the certificate +LLSD& LLBasicCertificate::_initLLSD() +{ + + // call the various helpers to build the LLSD + mLLSDInfo[CERT_SUBJECT_NAME] = cert_name_from_X509_NAME(X509_get_subject_name(mCert)); + mLLSDInfo[CERT_ISSUER_NAME] = cert_name_from_X509_NAME(X509_get_issuer_name(mCert)); + mLLSDInfo[CERT_SUBJECT_NAME_STRING] = cert_string_name_from_X509_NAME(X509_get_subject_name(mCert)); + mLLSDInfo[CERT_ISSUER_NAME_STRING] = cert_string_name_from_X509_NAME(X509_get_issuer_name(mCert)); + ASN1_INTEGER *sn = X509_get_serialNumber(mCert); + if (sn != NULL) + { + mLLSDInfo[CERT_SERIAL_NUMBER] = cert_string_from_asn1_integer(sn); + } + + mLLSDInfo[CERT_VALID_TO] = cert_date_from_asn1_time(X509_get_notAfter(mCert)); + mLLSDInfo[CERT_VALID_FROM] = cert_date_from_asn1_time(X509_get_notBefore(mCert)); + mLLSDInfo[CERT_SHA1_DIGEST] = cert_get_digest("sha1", mCert); + mLLSDInfo[CERT_MD5_DIGEST] = cert_get_digest("md5", mCert); + // add the known extensions + mLLSDInfo[CERT_BASIC_CONSTRAINTS] = _basic_constraints_ext(mCert); + mLLSDInfo[CERT_KEY_USAGE] = _key_usage_ext(mCert); + mLLSDInfo[CERT_EXTENDED_KEY_USAGE] = _ext_key_usage_ext(mCert); + mLLSDInfo[CERT_SUBJECT_KEY_IDENTFIER] = _subject_key_identifier_ext(mCert); + mLLSDInfo[CERT_AUTHORITY_KEY_IDENTIFIER] = _authority_key_identifier_ext(mCert); + return mLLSDInfo; +} + +// Retrieve the basic constraints info +LLSD _basic_constraints_ext(X509* cert) +{ + LLSD result; + BASIC_CONSTRAINTS *bs = (BASIC_CONSTRAINTS *)X509_get_ext_d2i(cert, NID_basic_constraints, NULL, NULL); + if(bs) + { + result = LLSD::emptyMap(); + // Determines whether the cert can be used as a CA + result[CERT_BASIC_CONSTRAINTS_CA] = (bool)bs->ca; + + if(bs->pathlen) + { + // the pathlen determines how deep a certificate chain can be from + // this CA + if((bs->pathlen->type == V_ASN1_NEG_INTEGER) + || !bs->ca) + { + result[CERT_BASIC_CONSTRAINTS_PATHLEN] = 0; + } + else + { + result[CERT_BASIC_CONSTRAINTS_PATHLEN] = (int)ASN1_INTEGER_get(bs->pathlen); + } + } + + } + return result; +} + +// retrieve the key usage, which specifies how the cert can be used. +// +LLSD _key_usage_ext(X509* cert) +{ + LLSD result; + ASN1_STRING *usage_str = (ASN1_STRING *)X509_get_ext_d2i(cert, NID_key_usage, NULL, NULL); + if(usage_str) + { + result = LLSD::emptyArray(); + long usage = 0; + if(usage_str->length > 0) + { + usage = usage_str->data[0]; + if(usage_str->length > 1) + { + usage |= usage_str->data[1] << 8; + } + } + ASN1_STRING_free(usage_str); + if(usage) + { + if(usage & KU_DIGITAL_SIGNATURE) result.append(LLSD((std::string)CERT_KU_DIGITAL_SIGNATURE)); + if(usage & KU_NON_REPUDIATION) result.append(LLSD((std::string)CERT_KU_NON_REPUDIATION)); + if(usage & KU_KEY_ENCIPHERMENT) result.append(LLSD((std::string)CERT_KU_KEY_ENCIPHERMENT)); + if(usage & KU_DATA_ENCIPHERMENT) result.append(LLSD((std::string)CERT_KU_DATA_ENCIPHERMENT)); + if(usage & KU_KEY_AGREEMENT) result.append(LLSD((std::string)CERT_KU_KEY_AGREEMENT)); + if(usage & KU_KEY_CERT_SIGN) result.append(LLSD((std::string)CERT_KU_CERT_SIGN)); + if(usage & KU_CRL_SIGN) result.append(LLSD((std::string)CERT_KU_CRL_SIGN)); + if(usage & KU_ENCIPHER_ONLY) result.append(LLSD((std::string)CERT_KU_ENCIPHER_ONLY)); + if(usage & KU_DECIPHER_ONLY) result.append(LLSD((std::string)CERT_KU_DECIPHER_ONLY)); + } + } + return result; +} + +// retrieve the extended key usage for the cert +LLSD _ext_key_usage_ext(X509* cert) +{ + LLSD result; + EXTENDED_KEY_USAGE *eku = (EXTENDED_KEY_USAGE *)X509_get_ext_d2i(cert, NID_ext_key_usage, NULL, NULL); + if(eku) + { + result = LLSD::emptyArray(); + while(sk_ASN1_OBJECT_num(eku)) + { + ASN1_OBJECT *usage = sk_ASN1_OBJECT_pop(eku); + if(usage) + { + int nid = OBJ_obj2nid(usage); + if (nid) + { + std::string sn = OBJ_nid2sn(nid); + result.append(sn); + } + ASN1_OBJECT_free(usage); + } + } + } + return result; +} + +// retrieve the subject key identifier of the cert +LLSD _subject_key_identifier_ext(X509 *cert) +{ + LLSD result; + ASN1_OCTET_STRING *skeyid = (ASN1_OCTET_STRING *)X509_get_ext_d2i(cert, NID_subject_key_identifier, NULL, NULL); + if(skeyid) + { + result = cert_string_from_octet_string(skeyid); + } + return result; +} + +// retrieve the authority key identifier of the cert +LLSD _authority_key_identifier_ext(X509* cert) +{ + LLSD result; + AUTHORITY_KEYID *akeyid = (AUTHORITY_KEYID *)X509_get_ext_d2i(cert, NID_authority_key_identifier, NULL, NULL); + if(akeyid) + { + result = LLSD::emptyMap(); + if(akeyid->keyid) + { + result[CERT_AUTHORITY_KEY_IDENTIFIER_ID] = cert_string_from_octet_string(akeyid->keyid); + } + if(akeyid->serial) + { + result[CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL] = cert_string_from_asn1_integer(akeyid->serial); + } + } + + // we ignore the issuer name in the authority key identifier, we check the issue name via + // the the issuer name entry in the cert. + + + return result; +} + +// retrieve an openssl x509 object, +// which must be freed by X509_free +X509* LLBasicCertificate::getOpenSSLX509() const +{ + return X509_dup(mCert); +} + +// generate a single string containing the subject or issuer +// name of the cert. +std::string cert_string_name_from_X509_NAME(X509_NAME* name) +{ + char * name_bio_chars = NULL; + // get a memory bio + BIO *name_bio = BIO_new(BIO_s_mem()); + // stream the name into the bio. The name will be in the 'short name' format + X509_NAME_print_ex(name_bio, name, 0, XN_FLAG_RFC2253); + int length = BIO_get_mem_data(name_bio, &name_bio_chars); + std::string result = std::string(name_bio_chars, length); + BIO_free(name_bio); + return result; +} + +// generate an LLSD from a certificate name (issuer or subject name). +// the name will be strings indexed by the 'long form' +LLSD cert_name_from_X509_NAME(X509_NAME* name) +{ + LLSD result = LLSD::emptyMap(); + int name_entries = X509_NAME_entry_count(name); + for (int entry_index=0; entry_index < name_entries; entry_index++) + { + char buffer[32]; + X509_NAME_ENTRY *entry = X509_NAME_get_entry(name, entry_index); + + std::string name_value = std::string((const char*)M_ASN1_STRING_data(X509_NAME_ENTRY_get_data(entry)), + M_ASN1_STRING_length(X509_NAME_ENTRY_get_data(entry))); + + ASN1_OBJECT* name_obj = X509_NAME_ENTRY_get_object(entry); + OBJ_obj2txt(buffer, sizeof(buffer), name_obj, 0); + std::string obj_buffer_str = std::string(buffer); + result[obj_buffer_str] = name_value; + } + + return result; +} + +// Generate a string from an ASN1 integer. ASN1 Integers are +// bignums, so they can be 'infinitely' long, therefore we +// cannot simply use a conversion to U64 or something. +// We retrieve as a readable string for UI + +std::string cert_string_from_asn1_integer(ASN1_INTEGER* value) +{ + std::string result; + BIGNUM *bn = ASN1_INTEGER_to_BN(value, NULL); + if(bn) + { + char * ascii_bn = BN_bn2hex(bn); + + if(ascii_bn) + { + result = ascii_bn; + OPENSSL_free(ascii_bn); + } + BN_free(bn); + } + return result; +} + +// Generate a string from an OCTET string. +// we retrieve as a + +std::string cert_string_from_octet_string(ASN1_OCTET_STRING* value) +{ + + std::stringstream result; + result << std::hex << std::setprecision(2); + for (int i=0; i < value->length; i++) + { + if (i != 0) + { + result << ":"; + } + result << std::setfill('0') << std::setw(2) << (int)value->data[i]; + } + return result.str(); +} + +// Generate a string from an ASN1 integer. ASN1 Integers are +// bignums, so they can be 'infinitely' long, therefore we +// cannot simply use a conversion to U64 or something. +// We retrieve as a readable string for UI + +std::string cert_string_from_asn1_string(ASN1_STRING* value) +{ + char * string_bio_chars = NULL; + std::string result; + // get a memory bio + BIO *string_bio = BIO_new(BIO_s_mem()); + if(!string_bio) + { + // stream the name into the bio. The name will be in the 'short name' format + ASN1_STRING_print_ex(string_bio, value, ASN1_STRFLGS_RFC2253); + int length = BIO_get_mem_data(string_bio, &string_bio_chars); + result = std::string(string_bio_chars, length); + BIO_free(string_bio); + } + else + { + LL_WARNS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL; + } + + return result; +} + +// retrieve a date structure from an ASN1 time, for +// validity checking. +LLDate cert_date_from_asn1_time(ASN1_TIME* asn1_time) +{ + + struct tm timestruct = {0}; + int i = asn1_time->length; + + if (i < 10) + { + return LLDate(); + } + // convert the date from the ASN1 time (which is a string in ZULU time), to + // a timeval. + timestruct.tm_year = (asn1_time->data[0]-'0') * 10 + (asn1_time->data[1]-'0'); + + /* Deal with Year 2000 */ + if (timestruct.tm_year < 70) + timestruct.tm_year += 100; + + timestruct.tm_mon = (asn1_time->data[2]-'0') * 10 + (asn1_time->data[3]-'0') - 1; + timestruct.tm_mday = (asn1_time->data[4]-'0') * 10 + (asn1_time->data[5]-'0'); + timestruct.tm_hour = (asn1_time->data[6]-'0') * 10 + (asn1_time->data[7]-'0'); + timestruct.tm_min = (asn1_time->data[8]-'0') * 10 + (asn1_time->data[9]-'0'); + timestruct.tm_sec = (asn1_time->data[10]-'0') * 10 + (asn1_time->data[11]-'0'); + +#if LL_WINDOWS + return LLDate((F64)_mkgmtime(×truct)); +#else // LL_WINDOWS + return LLDate((F64)timegm(×truct)); +#endif // LL_WINDOWS +} + + +// Generate a string containing a digest. The digest time is 'ssh1' or +// 'md5', and the resulting string is of the form "aa:12:5c:' and so on +std::string cert_get_digest(const std::string& digest_type, X509 *cert) +{ + unsigned char digest_data[BUFFER_READ_SIZE]; + unsigned int len = sizeof(digest_data); + std::stringstream result; + const EVP_MD* digest = NULL; + // we could use EVP_get_digestbyname, but that requires initializer code which + // would require us to complicate things by plumbing it into the system. + if (digest_type == "md5") + { + digest = EVP_md5(); + } + else if (digest_type == "sha1") + { + digest = EVP_sha1(); + } + else + { + return std::string(); + } + + X509_digest(cert, digest, digest_data, &len); + result << std::hex << std::setprecision(2); + for (unsigned int i=0; i < len; i++) + { + if (i != 0) + { + result << ":"; + } + result << std::setfill('0') << std::setw(2) << (int)digest_data[i]; + } + return result.str(); +} + + +// class LLBasicCertificateVector +// This class represents a list of certificates, implemented by a vector of certificate pointers. +// it contains implementations of the virtual functions for iterators, search, add, remove, etc. +// + +// Find a certificate in the list. +// It will find a cert that has minimally the params listed, with the values being the same +LLBasicCertificateVector::iterator LLBasicCertificateVector::find(const LLSD& params) +{ + BOOL found = FALSE; + // loop through the entire vector comparing the values in the certs + // against those passed in via the params. + // params should be a map. Only the items specified in the map will be + // checked, but they must match exactly, even if they're maps or arrays. + + for(iterator cert = begin(); + cert != end(); + cert++) + { + + found= TRUE; + LLSD cert_info; + (*cert)->getLLSD(cert_info); + for (LLSD::map_const_iterator param = params.beginMap(); + param != params.endMap(); + param++) + { + + if (!cert_info.has((std::string)param->first) || + (!valueCompareLLSD(cert_info[(std::string)param->first], param->second))) + { + found = FALSE; + break; + } + } + if (found) + { + return (cert); + } + } + return end(); +} + +// Insert a certificate into the store. If the certificate already +// exists in the store, nothing is done. +void LLBasicCertificateVector::insert(iterator _iter, + LLPointer<LLCertificate> cert) +{ + LLSD cert_info; + cert->getLLSD(cert_info); + if (cert_info.isMap() && cert_info.has(CERT_SHA1_DIGEST)) + { + LLSD existing_cert_info = LLSD::emptyMap(); + existing_cert_info[CERT_MD5_DIGEST] = cert_info[CERT_MD5_DIGEST]; + if(find(existing_cert_info) == end()) + { + BasicIteratorImpl *basic_iter = dynamic_cast<BasicIteratorImpl*>(_iter.mImpl.get()); + llassert(basic_iter); + if (basic_iter) + { + mCerts.insert(basic_iter->mIter, cert); + } + } + } +} + +// remove a certificate from the store +LLPointer<LLCertificate> LLBasicCertificateVector::erase(iterator _iter) +{ + + if (_iter != end()) + { + BasicIteratorImpl *basic_iter = dynamic_cast<BasicIteratorImpl*>(_iter.mImpl.get()); + LLPointer<LLCertificate> result = (*_iter); + mCerts.erase(basic_iter->mIter); + return result; + } + return NULL; +} + + +// +// LLBasicCertificateStore +// This class represents a store of CA certificates. The basic implementation +// uses a pem file such as the legacy CA.pem stored in the existing +// SL implementation. +LLBasicCertificateStore::LLBasicCertificateStore(const std::string& filename) +{ + mFilename = filename; + load_from_file(filename); +} + +void LLBasicCertificateStore::load_from_file(const std::string& filename) +{ + // scan the PEM file extracting each certificate + if (!LLFile::isfile(filename)) + { + return; + } + + BIO* file_bio = BIO_new(BIO_s_file()); + if(file_bio) + { + if (BIO_read_filename(file_bio, filename.c_str()) > 0) + { + X509 *cert_x509 = NULL; + while((PEM_read_bio_X509(file_bio, &cert_x509, 0, NULL)) && + (cert_x509 != NULL)) + { + try + { + add(new LLBasicCertificate(cert_x509)); + } + catch (...) + { + LL_WARNS("SECAPI") << "Failure creating certificate from the certificate store file." << LL_ENDL; + } + X509_free(cert_x509); + cert_x509 = NULL; + } + BIO_free(file_bio); + } + } + else + { + LL_WARNS("SECAPI") << "Could not allocate a file BIO" << LL_ENDL; + } +} + + +LLBasicCertificateStore::~LLBasicCertificateStore() +{ +} + + +// persist the store +void LLBasicCertificateStore::save() +{ + llofstream file_store(mFilename, llofstream::binary); + if(!file_store.fail()) + { + for(iterator cert = begin(); + cert != end(); + cert++) + { + std::string pem = (*cert)->getPem(); + if(!pem.empty()) + { + file_store << (*cert)->getPem() << std::endl; + } + } + file_store.close(); + } + else + { + LL_WARNS("SECAPI") << "Could not open certificate store " << mFilename << "for save" << LL_ENDL; + } +} + +// return the store id +std::string LLBasicCertificateStore::storeId() const +{ + // this is the basic handler which uses the CA.pem store, + // so we ignore this. + return std::string(""); +} + + +// +// LLBasicCertificateChain +// This class represents a chain of certs, each cert being signed by the next cert +// in the chain. Certs must be properly signed by the parent +LLBasicCertificateChain::LLBasicCertificateChain(const X509_STORE_CTX* store) +{ + + // we're passed in a context, which contains a cert, and a blob of untrusted + // certificates which compose the chain. + if((store == NULL) || (store->cert == NULL)) + { + LL_WARNS("SECAPI") << "An invalid store context was passed in when trying to create a certificate chain" << LL_ENDL; + return; + } + // grab the child cert + LLPointer<LLCertificate> current = new LLBasicCertificate(store->cert); + + add(current); + if(store->untrusted != NULL) + { + // if there are other certs in the chain, we build up a vector + // of untrusted certs so we can search for the parents of each + // consecutive cert. + LLBasicCertificateVector untrusted_certs; + for(int i = 0; i < sk_X509_num(store->untrusted); i++) + { + LLPointer<LLCertificate> cert = new LLBasicCertificate(sk_X509_value(store->untrusted, i)); + untrusted_certs.add(cert); + + } + while(untrusted_certs.size() > 0) + { + LLSD find_data = LLSD::emptyMap(); + LLSD cert_data; + current->getLLSD(cert_data); + // we simply build the chain via subject/issuer name as the + // client should not have passed in multiple CA's with the same + // subject name. If they did, it'll come out in the wash during + // validation. + find_data[CERT_SUBJECT_NAME_STRING] = cert_data[CERT_ISSUER_NAME_STRING]; + LLBasicCertificateVector::iterator issuer = untrusted_certs.find(find_data); + if (issuer != untrusted_certs.end()) + { + current = untrusted_certs.erase(issuer); + add(current); + } + else + { + break; + } + } + } +} + + +// subdomain wildcard specifiers can be divided into 3 parts +// the part before the first *, the part after the first * but before +// the second *, and the part after the second *. +// It then iterates over the second for each place in the string +// that it matches. ie if the subdomain was testfoofoobar, and +// the wildcard was test*foo*bar, it would match test, then +// recursively match foofoobar and foobar + +bool _cert_subdomain_wildcard_match(const std::string& subdomain, + const std::string& wildcard) +{ + // split wildcard into the portion before the *, and the portion after + + int wildcard_pos = wildcard.find_first_of('*'); + // check the case where there is no wildcard. + if(wildcard_pos == wildcard.npos) + { + return (subdomain == wildcard); + } + + // we need to match the first part of the subdomain string up to the wildcard + // position + if(subdomain.substr(0, wildcard_pos) != wildcard.substr(0, wildcard_pos)) + { + // the first portions of the strings didn't match + return FALSE; + } + + // as the portion of the wildcard string before the * matched, we need to check the + // portion afterwards. Grab that portion. + std::string new_wildcard_string = wildcard.substr( wildcard_pos+1, wildcard.npos); + if(new_wildcard_string.empty()) + { + // we had nothing after the *, so it's an automatic match + return TRUE; + } + + // grab the portion of the remaining wildcard string before the next '*'. We need to find this + // within the remaining subdomain string. and then recursively check. + std::string new_wildcard_match_string = new_wildcard_string.substr(0, new_wildcard_string.find_first_of('*')); + + // grab the portion of the subdomain after the part that matched the initial wildcard portion + std::string new_subdomain = subdomain.substr(wildcard_pos, subdomain.npos); + + // iterate through the current subdomain, finding instances of the match string. + int sub_pos = new_subdomain.find_first_of(new_wildcard_match_string); + while(sub_pos != std::string::npos) + { + new_subdomain = new_subdomain.substr(sub_pos, std::string::npos); + if(_cert_subdomain_wildcard_match(new_subdomain, new_wildcard_string)) + { + return TRUE; + } + sub_pos = new_subdomain.find_first_of(new_wildcard_match_string, 1); + + + } + // didn't find any instances of the match string that worked in the subdomain, so fail. + return FALSE; +} + + +// RFC2459 does not address wildcards as part of it's name matching +// specification, and there is no RFC specifying wildcard matching, +// RFC2818 does a few statements about wildcard matching, but is very +// general. Generally, wildcard matching is per implementation, although +// it's pretty similar. +// in our case, we use the '*' wildcard character only, within each +// subdomain. The hostname and the CN specification should have the +// same number of subdomains. +// We then iterate that algorithm over each subdomain. +bool _cert_hostname_wildcard_match(const std::string& hostname, const std::string& common_name) +{ + std::string new_hostname = hostname; + std::string new_cn = common_name; + + // find the last '.' in the hostname and the match name. + int subdomain_pos = new_hostname.find_last_of('.'); + int subcn_pos = new_cn.find_last_of('.'); + + // if the last char is a '.', strip it + if(subdomain_pos == (new_hostname.length()-1)) + { + new_hostname = new_hostname.substr(0, subdomain_pos); + subdomain_pos = new_hostname.find_last_of('.'); + } + if(subcn_pos == (new_cn.length()-1)) + { + new_cn = new_cn.substr(0, subcn_pos); + subcn_pos = new_cn.find_last_of('.'); + } + + // Check to see if there are any further '.' in the string. + while((subcn_pos != std::string::npos) && (subdomain_pos != std::string::npos)) + { + // snip out last subdomain in both the match string and the hostname + // The last bit for 'my.current.host.com' would be 'com' + std::string cn_part = new_cn.substr(subcn_pos+1, std::string::npos); + std::string hostname_part = new_hostname.substr(subdomain_pos+1, std::string::npos); + + if(!_cert_subdomain_wildcard_match(new_hostname.substr(subdomain_pos+1, std::string::npos), + cn_part)) + { + return FALSE; + } + new_hostname = new_hostname.substr(0, subdomain_pos); + new_cn = new_cn.substr(0, subcn_pos); + subdomain_pos = new_hostname.find_last_of('.'); + subcn_pos = new_cn.find_last_of('.'); + } + // check to see if the most significant portion of the common name is '*'. If so, we can + // simply return success as child domains are also matched. + if(new_cn == "*") + { + // if it's just a '*' we support all child domains as well, so '*. + return TRUE; + } + + return _cert_subdomain_wildcard_match(new_hostname, new_cn); + +} + +// validate that the LLSD array in llsd_set contains the llsd_value +bool _LLSDArrayIncludesValue(const LLSD& llsd_set, LLSD llsd_value) +{ + for(LLSD::array_const_iterator set_value = llsd_set.beginArray(); + set_value != llsd_set.endArray(); + set_value++) + { + if(valueCompareLLSD((*set_value), llsd_value)) + { + return TRUE; + } + } + return FALSE; +} + +void _validateCert(int validation_policy, + LLPointer<LLCertificate> cert, + const LLSD& validation_params, + int depth) +{ + + LLSD current_cert_info; + cert->getLLSD(current_cert_info); + // check basic properties exist in the cert + if(!current_cert_info.has(CERT_SUBJECT_NAME) || !current_cert_info.has(CERT_SUBJECT_NAME_STRING)) + { + throw LLCertException(cert, "Cert doesn't have a Subject Name"); + } + + if(!current_cert_info.has(CERT_ISSUER_NAME_STRING)) + { + throw LLCertException(cert, "Cert doesn't have an Issuer Name"); + } + + // check basic properties exist in the cert + if(!current_cert_info.has(CERT_VALID_FROM) || !current_cert_info.has(CERT_VALID_TO)) + { + throw LLCertException(cert, "Cert doesn't have an expiration period"); + } + if (!current_cert_info.has(CERT_SHA1_DIGEST)) + { + throw LLCertException(cert, "No SHA1 digest"); + } + + if (validation_policy & VALIDATION_POLICY_TIME) + { + + LLDate validation_date(time(NULL)); + if(validation_params.has(CERT_VALIDATION_DATE)) + { + validation_date = validation_params[CERT_VALIDATION_DATE]; + } + + if((validation_date < current_cert_info[CERT_VALID_FROM].asDate()) || + (validation_date > current_cert_info[CERT_VALID_TO].asDate())) + { + throw LLCertValidationExpirationException(cert, validation_date); + } + } + if (validation_policy & VALIDATION_POLICY_SSL_KU) + { + if (current_cert_info.has(CERT_KEY_USAGE) && current_cert_info[CERT_KEY_USAGE].isArray() && + (!(_LLSDArrayIncludesValue(current_cert_info[CERT_KEY_USAGE], + LLSD((std::string)CERT_KU_DIGITAL_SIGNATURE))) || + !(_LLSDArrayIncludesValue(current_cert_info[CERT_KEY_USAGE], + LLSD((std::string)CERT_KU_KEY_ENCIPHERMENT))))) + { + throw LLCertKeyUsageValidationException(cert); + } + // only validate EKU if the cert has it + if(current_cert_info.has(CERT_EXTENDED_KEY_USAGE) && current_cert_info[CERT_EXTENDED_KEY_USAGE].isArray() && + (!_LLSDArrayIncludesValue(current_cert_info[CERT_EXTENDED_KEY_USAGE], + LLSD((std::string)CERT_EKU_SERVER_AUTH)))) + { + throw LLCertKeyUsageValidationException(cert); + } + } + if (validation_policy & VALIDATION_POLICY_CA_KU) + { + if (current_cert_info.has(CERT_KEY_USAGE) && current_cert_info[CERT_KEY_USAGE].isArray() && + (!_LLSDArrayIncludesValue(current_cert_info[CERT_KEY_USAGE], + (std::string)CERT_KU_CERT_SIGN))) + { + throw LLCertKeyUsageValidationException(cert); + } + } + + // validate basic constraints + if ((validation_policy & VALIDATION_POLICY_CA_BASIC_CONSTRAINTS) && + current_cert_info.has(CERT_BASIC_CONSTRAINTS) && + current_cert_info[CERT_BASIC_CONSTRAINTS].isMap()) + { + if(!current_cert_info[CERT_BASIC_CONSTRAINTS].has(CERT_BASIC_CONSTRAINTS_CA) || + !current_cert_info[CERT_BASIC_CONSTRAINTS][CERT_BASIC_CONSTRAINTS_CA]) + { + throw LLCertBasicConstraintsValidationException(cert); + } + if (current_cert_info[CERT_BASIC_CONSTRAINTS].has(CERT_BASIC_CONSTRAINTS_PATHLEN) && + ((current_cert_info[CERT_BASIC_CONSTRAINTS][CERT_BASIC_CONSTRAINTS_PATHLEN].asInteger() != 0) && + (depth > current_cert_info[CERT_BASIC_CONSTRAINTS][CERT_BASIC_CONSTRAINTS_PATHLEN].asInteger()))) + { + throw LLCertBasicConstraintsValidationException(cert); + } + } +} + +bool _verify_signature(LLPointer<LLCertificate> parent, + LLPointer<LLCertificate> child) +{ + bool verify_result = FALSE; + LLSD cert1, cert2; + parent->getLLSD(cert1); + child->getLLSD(cert2); + X509 *signing_cert = parent->getOpenSSLX509(); + X509 *child_cert = child->getOpenSSLX509(); + if((signing_cert != NULL) && (child_cert != NULL)) + { + EVP_PKEY *pkey = X509_get_pubkey(signing_cert); + + + if(pkey) + { + int verify_code = X509_verify(child_cert, pkey); + verify_result = ( verify_code > 0); + EVP_PKEY_free(pkey); + } + else + { + LL_WARNS("SECAPI") << "Could not validate the cert chain signature, as the public key of the signing cert could not be retrieved" << LL_ENDL; + } + + } + else + { + LL_WARNS("SECAPI") << "Signature verification failed as there are no certs in the chain" << LL_ENDL; + } + if(child_cert) + { + X509_free(child_cert); + } + if(signing_cert) + { + X509_free(signing_cert); + } + return verify_result; +} + + +// validate the certificate chain against a store. +// There are many aspects of cert validatioin policy involved in +// trust validation. The policies in this validation algorithm include +// * Hostname matching for SSL certs +// * Expiration time matching +// * Signature validation +// * Chain trust (is the cert chain trusted against the store) +// * Basic constraints +// * key usage and extended key usage +// TODO: We should add 'authority key identifier' for chaining. +// This algorithm doesn't simply validate the chain by itself +// and verify the last cert is in the certificate store, or points +// to a cert in the store. It validates whether any cert in the chain +// is trusted in the store, even if it's not the last one. +void LLBasicCertificateStore::validate(int validation_policy, + LLPointer<LLCertificateChain> cert_chain, + const LLSD& validation_params) +{ + + if(cert_chain->size() < 1) + { + throw LLCertException(NULL, "No certs in chain"); + } + iterator current_cert = cert_chain->begin(); + LLSD current_cert_info; + LLSD validation_date; + if (validation_params.has(CERT_VALIDATION_DATE)) + { + validation_date = validation_params[CERT_VALIDATION_DATE]; + } + + if (validation_policy & VALIDATION_POLICY_HOSTNAME) + { + (*current_cert)->getLLSD(current_cert_info); + if(!validation_params.has(CERT_HOSTNAME)) + { + throw LLCertException((*current_cert), "No hostname passed in for validation"); + } + if(!current_cert_info.has(CERT_SUBJECT_NAME) || !current_cert_info[CERT_SUBJECT_NAME].has(CERT_NAME_CN)) + { + throw LLInvalidCertificate((*current_cert)); + } + + LL_DEBUGS("SECAPI") << "Validating the hostname " << validation_params[CERT_HOSTNAME].asString() << + "against the cert CN " << current_cert_info[CERT_SUBJECT_NAME][CERT_NAME_CN].asString() << LL_ENDL; + if(!_cert_hostname_wildcard_match(validation_params[CERT_HOSTNAME].asString(), + current_cert_info[CERT_SUBJECT_NAME][CERT_NAME_CN].asString())) + { + throw LLCertValidationHostnameException(validation_params[CERT_HOSTNAME].asString(), + (*current_cert)); + } + } + + // check the cache of already validated certs + X509* cert_x509 = (*current_cert)->getOpenSSLX509(); + if(!cert_x509) + { + throw LLInvalidCertificate((*current_cert)); + } + std::string sha1_hash((const char *)cert_x509->sha1_hash, SHA_DIGEST_LENGTH); + t_cert_cache::iterator cache_entry = mTrustedCertCache.find(sha1_hash); + if(cache_entry != mTrustedCertCache.end()) + { + LL_DEBUGS("SECAPI") << "Found cert in cache" << LL_ENDL; + // this cert is in the cache, so validate the time. + if (validation_policy & VALIDATION_POLICY_TIME) + { + LLDate validation_date(time(NULL)); + if(validation_params.has(CERT_VALIDATION_DATE)) + { + validation_date = validation_params[CERT_VALIDATION_DATE]; + } + + if((validation_date < cache_entry->second.first) || + (validation_date > cache_entry->second.second)) + { + throw LLCertValidationExpirationException((*current_cert), validation_date); + } + } + // successfully found in cache + return; + } + if(current_cert_info.isUndefined()) + { + (*current_cert)->getLLSD(current_cert_info); + } + LLDate from_time = current_cert_info[CERT_VALID_FROM].asDate(); + LLDate to_time = current_cert_info[CERT_VALID_TO].asDate(); + int depth = 0; + LLPointer<LLCertificate> previous_cert; + // loop through the cert chain, validating the current cert against the next one. + while(current_cert != cert_chain->end()) + { + + int local_validation_policy = validation_policy; + if(current_cert == cert_chain->begin()) + { + // for the child cert, we don't validate CA stuff + local_validation_policy &= ~(VALIDATION_POLICY_CA_KU | + VALIDATION_POLICY_CA_BASIC_CONSTRAINTS); + } + else + { + // for non-child certs, we don't validate SSL Key usage + local_validation_policy &= ~VALIDATION_POLICY_SSL_KU; + if(!_verify_signature((*current_cert), + previous_cert)) + { + throw LLCertValidationInvalidSignatureException(previous_cert); + } + } + _validateCert(local_validation_policy, + (*current_cert), + validation_params, + depth); + + // look for a CA in the CA store that may belong to this chain. + LLSD cert_search_params = LLSD::emptyMap(); + // is the cert itself in the store? + cert_search_params[CERT_SHA1_DIGEST] = current_cert_info[CERT_SHA1_DIGEST]; + LLCertificateStore::iterator found_store_cert = find(cert_search_params); + if(found_store_cert != end()) + { + mTrustedCertCache[sha1_hash] = std::pair<LLDate, LLDate>(from_time, to_time); + return; + } + + // is the parent in the cert store? + + cert_search_params = LLSD::emptyMap(); + cert_search_params[CERT_SUBJECT_NAME_STRING] = current_cert_info[CERT_ISSUER_NAME_STRING]; + if (current_cert_info.has(CERT_AUTHORITY_KEY_IDENTIFIER)) + { + LLSD cert_aki = current_cert_info[CERT_AUTHORITY_KEY_IDENTIFIER]; + if(cert_aki.has(CERT_AUTHORITY_KEY_IDENTIFIER_ID)) + { + cert_search_params[CERT_SUBJECT_KEY_IDENTFIER] = cert_aki[CERT_AUTHORITY_KEY_IDENTIFIER_ID]; + } + if(cert_aki.has(CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL)) + { + cert_search_params[CERT_SERIAL_NUMBER] = cert_aki[CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL]; + } + } + found_store_cert = find(cert_search_params); + + if(found_store_cert != end()) + { + // validate the store cert against the depth + _validateCert(validation_policy & VALIDATION_POLICY_CA_BASIC_CONSTRAINTS, + (*found_store_cert), + LLSD(), + depth); + + // verify the signature of the CA + if(!_verify_signature((*found_store_cert), + (*current_cert))) + { + throw LLCertValidationInvalidSignatureException(*current_cert); + } + // successfully validated. + mTrustedCertCache[sha1_hash] = std::pair<LLDate, LLDate>(from_time, to_time); + return; + } + previous_cert = (*current_cert); + current_cert++; + depth++; + if(current_cert != cert_chain->end()) + { + (*current_cert)->getLLSD(current_cert_info); + } + } + if (validation_policy & VALIDATION_POLICY_TRUSTED) + { + // we reached the end without finding a trusted cert. + throw LLCertValidationTrustException((*cert_chain)[cert_chain->size()-1]); + + } + mTrustedCertCache[sha1_hash] = std::pair<LLDate, LLDate>(from_time, to_time); +} + + +// LLSecAPIBasicHandler Class +// Interface handler class for the various security storage handlers. + +// We read the file on construction, and write it on destruction. This +// means multiple processes cannot modify the datastore. +LLSecAPIBasicHandler::LLSecAPIBasicHandler(const std::string& protected_data_file, + const std::string& legacy_password_path) +{ + mProtectedDataFilename = protected_data_file; + mProtectedDataMap = LLSD::emptyMap(); + mLegacyPasswordPath = legacy_password_path; + +} + +LLSecAPIBasicHandler::LLSecAPIBasicHandler() +{ +} + + +void LLSecAPIBasicHandler::init() +{ + mProtectedDataMap = LLSD::emptyMap(); + if (mProtectedDataFilename.length() == 0) + { + mProtectedDataFilename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + "bin_conf.dat"); + mLegacyPasswordPath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "password.dat"); + + mProtectedDataFilename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + "bin_conf.dat"); + std::string store_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + "CA.pem"); + + + LL_DEBUGS("SECAPI") << "Loading certificate store from " << store_file << LL_ENDL; + mStore = new LLBasicCertificateStore(store_file); + + // grab the application CA.pem file that contains the well-known certs shipped + // with the product + std::string ca_file_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); + llinfos << "app path " << ca_file_path << llendl; + LLBasicCertificateStore app_ca_store = LLBasicCertificateStore(ca_file_path); + + // push the applicate CA files into the store, therefore adding any new CA certs that + // updated + for(LLCertificateVector::iterator i = app_ca_store.begin(); + i != app_ca_store.end(); + i++) + { + mStore->add(*i); + } + + } + _readProtectedData(); // initialize mProtectedDataMap + // may throw LLProtectedDataException if saved datamap is not decryptable +} +LLSecAPIBasicHandler::~LLSecAPIBasicHandler() +{ + _writeProtectedData(); +} + +void LLSecAPIBasicHandler::_readProtectedData() +{ + // attempt to load the file into our map + LLPointer<LLSDParser> parser = new LLSDXMLParser(); + llifstream protected_data_stream(mProtectedDataFilename.c_str(), + llifstream::binary); + + if (!protected_data_stream.fail()) { + int offset; + U8 salt[STORE_SALT_SIZE]; + U8 buffer[BUFFER_READ_SIZE]; + U8 decrypted_buffer[BUFFER_READ_SIZE]; + int decrypted_length; + unsigned char unique_id[MAC_ADDRESS_BYTES]; + LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); + LLXORCipher cipher(unique_id, sizeof(unique_id)); + + // read in the salt and key + protected_data_stream.read((char *)salt, STORE_SALT_SIZE); + offset = 0; + if (protected_data_stream.gcount() < STORE_SALT_SIZE) + { + throw LLProtectedDataException("Config file too short."); + } + + cipher.decrypt(salt, STORE_SALT_SIZE); + + // totally lame. As we're not using the OS level protected data, we need to + // at least obfuscate the data. We do this by using a salt stored at the head of the file + // to encrypt the data, therefore obfuscating it from someone using simple existing tools. + // We do include the MAC address as part of the obfuscation, which would require an + // attacker to get the MAC address as well as the protected store, which improves things + // somewhat. It would be better to use the password, but as this store + // will be used to store the SL password when the user decides to have SL remember it, + // so we can't use that. OS-dependent store implementations will use the OS password/storage + // mechanisms and are considered to be more secure. + // We've a strong intent to move to OS dependent protected data stores. + + + // read in the rest of the file. + EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX_init(&ctx); + EVP_DecryptInit(&ctx, EVP_rc4(), salt, NULL); + // allocate memory: + std::string decrypted_data; + + while(protected_data_stream.good()) { + // read data as a block: + protected_data_stream.read((char *)buffer, BUFFER_READ_SIZE); + + EVP_DecryptUpdate(&ctx, decrypted_buffer, &decrypted_length, + buffer, protected_data_stream.gcount()); + decrypted_data.append((const char *)decrypted_buffer, protected_data_stream.gcount()); + } + + // RC4 is a stream cipher, so we don't bother to EVP_DecryptFinal, as there is + // no block padding. + EVP_CIPHER_CTX_cleanup(&ctx); + std::istringstream parse_stream(decrypted_data); + if (parser->parse(parse_stream, mProtectedDataMap, + LLSDSerialize::SIZE_UNLIMITED) == LLSDParser::PARSE_FAILURE) + { + throw LLProtectedDataException("Config file cannot be decrypted."); + } + } +} + +void LLSecAPIBasicHandler::_writeProtectedData() +{ + std::ostringstream formatted_data_ostream; + U8 salt[STORE_SALT_SIZE]; + U8 buffer[BUFFER_READ_SIZE]; + U8 encrypted_buffer[BUFFER_READ_SIZE]; + + + if(mProtectedDataMap.isUndefined()) + { + LLFile::remove(mProtectedDataFilename); + return; + } + // create a string with the formatted data. + LLSDSerialize::toXML(mProtectedDataMap, formatted_data_ostream); + std::istringstream formatted_data_istream(formatted_data_ostream.str()); + // generate the seed + RAND_bytes(salt, STORE_SALT_SIZE); + + + // write to a temp file so we don't clobber the initial file if there is + // an error. + std::string tmp_filename = mProtectedDataFilename + ".tmp"; + + llofstream protected_data_stream(tmp_filename.c_str(), + llofstream::binary); + try + { + + EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX_init(&ctx); + EVP_EncryptInit(&ctx, EVP_rc4(), salt, NULL); + unsigned char unique_id[MAC_ADDRESS_BYTES]; + LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); + LLXORCipher cipher(unique_id, sizeof(unique_id)); + cipher.encrypt(salt, STORE_SALT_SIZE); + protected_data_stream.write((const char *)salt, STORE_SALT_SIZE); + + while (formatted_data_istream.good()) + { + formatted_data_istream.read((char *)buffer, BUFFER_READ_SIZE); + if(formatted_data_istream.gcount() == 0) + { + break; + } + int encrypted_length; + EVP_EncryptUpdate(&ctx, encrypted_buffer, &encrypted_length, + buffer, formatted_data_istream.gcount()); + protected_data_stream.write((const char *)encrypted_buffer, encrypted_length); + } + + // no EVP_EncrypteFinal, as this is a stream cipher + EVP_CIPHER_CTX_cleanup(&ctx); + + protected_data_stream.close(); + } + catch (...) + { + // it's good practice to clean up any secure information on error + // (even though this file isn't really secure. Perhaps in the future + // it may be, however. + LLFile::remove(tmp_filename); + throw LLProtectedDataException("Error writing Protected Data Store"); + } + + // move the temporary file to the specified file location. + if((((LLFile::isfile(mProtectedDataFilename) != 0) && + (LLFile::remove(mProtectedDataFilename) != 0))) || + (LLFile::rename(tmp_filename, mProtectedDataFilename))) + { + LLFile::remove(tmp_filename); + throw LLProtectedDataException("Could not overwrite protected data store"); + } +} + +// instantiate a certificate from a pem string +LLPointer<LLCertificate> LLSecAPIBasicHandler::getCertificate(const std::string& pem_cert) +{ + LLPointer<LLCertificate> result = new LLBasicCertificate(pem_cert); + return result; +} + + + +// instiate a certificate from an openssl X509 structure +LLPointer<LLCertificate> LLSecAPIBasicHandler::getCertificate(X509* openssl_cert) +{ + LLPointer<LLCertificate> result = new LLBasicCertificate(openssl_cert); + return result; +} + +// instantiate a chain from an X509_STORE_CTX +LLPointer<LLCertificateChain> LLSecAPIBasicHandler::getCertificateChain(const X509_STORE_CTX* chain) +{ + LLPointer<LLCertificateChain> result = new LLBasicCertificateChain(chain); + return result; +} + +// instantiate a cert store given it's id. if a persisted version +// exists, it'll be loaded. If not, one will be created (but not +// persisted) +LLPointer<LLCertificateStore> LLSecAPIBasicHandler::getCertificateStore(const std::string& store_id) +{ + return mStore; +} + +// retrieve protected data +LLSD LLSecAPIBasicHandler::getProtectedData(const std::string& data_type, + const std::string& data_id) +{ + + if (mProtectedDataMap.has(data_type) && + mProtectedDataMap[data_type].isMap() && + mProtectedDataMap[data_type].has(data_id)) + { + return mProtectedDataMap[data_type][data_id]; + } + + return LLSD(); +} + +void LLSecAPIBasicHandler::deleteProtectedData(const std::string& data_type, + const std::string& data_id) +{ + if (mProtectedDataMap.has(data_type) && + mProtectedDataMap[data_type].isMap() && + mProtectedDataMap[data_type].has(data_id)) + { + mProtectedDataMap[data_type].erase(data_id); + } +} + + +// +// persist data in a protected store +// +void LLSecAPIBasicHandler::setProtectedData(const std::string& data_type, + const std::string& data_id, + const LLSD& data) +{ + if (!mProtectedDataMap.has(data_type) || !mProtectedDataMap[data_type].isMap()) { + mProtectedDataMap[data_type] = LLSD::emptyMap(); + } + + mProtectedDataMap[data_type][data_id] = data; +} + +// +// Create a credential object from an identifier and authenticator. credentials are +// per grid. +LLPointer<LLCredential> LLSecAPIBasicHandler::createCredential(const std::string& grid, + const LLSD& identifier, + const LLSD& authenticator) +{ + LLPointer<LLSecAPIBasicCredential> result = new LLSecAPIBasicCredential(grid); + result->setCredentialData(identifier, authenticator); + return result; +} + +// Load a credential from the credential store, given the grid +LLPointer<LLCredential> LLSecAPIBasicHandler::loadCredential(const std::string& grid) +{ + LLSD credential = getProtectedData("credential", grid); + LLPointer<LLSecAPIBasicCredential> result = new LLSecAPIBasicCredential(grid); + if(credential.isMap() && + credential.has("identifier")) + { + + LLSD identifier = credential["identifier"]; + LLSD authenticator; + if (credential.has("authenticator")) + { + authenticator = credential["authenticator"]; + } + result->setCredentialData(identifier, authenticator); + } + else + { + // credential was not in protected storage, so pull the credential + // from the legacy store. + std::string first_name = gSavedSettings.getString("FirstName"); + std::string last_name = gSavedSettings.getString("LastName"); + + if ((first_name != "") && + (last_name != "")) + { + LLSD identifier = LLSD::emptyMap(); + LLSD authenticator; + identifier["type"] = "agent"; + identifier["first_name"] = first_name; + identifier["last_name"] = last_name; + + std::string legacy_password = _legacyLoadPassword(); + if (legacy_password.length() > 0) + { + authenticator = LLSD::emptyMap(); + authenticator["type"] = "hash"; + authenticator["algorithm"] = "md5"; + authenticator["secret"] = legacy_password; + } + result->setCredentialData(identifier, authenticator); + } + } + return result; +} + +// Save the credential to the credential store. Save the authenticator also if requested. +// That feature is used to implement the 'remember password' functionality. +void LLSecAPIBasicHandler::saveCredential(LLPointer<LLCredential> cred, bool save_authenticator) +{ + LLSD credential = LLSD::emptyMap(); + credential["identifier"] = cred->getIdentifier(); + if (save_authenticator) + { + credential["authenticator"] = cred->getAuthenticator(); + } + LL_DEBUGS("SECAPI") << "Saving Credential " << cred->getGrid() << ":" << cred->userID() << " " << save_authenticator << LL_ENDL; + setProtectedData("credential", cred->getGrid(), credential); + //*TODO: If we're saving Agni credentials, should we write the + // credentials to the legacy password.dat/etc? + _writeProtectedData(); +} + +// Remove a credential from the credential store. +void LLSecAPIBasicHandler::deleteCredential(LLPointer<LLCredential> cred) +{ + LLSD undefVal; + deleteProtectedData("credential", cred->getGrid()); + cred->setCredentialData(undefVal, undefVal); + _writeProtectedData(); +} + +// load the legacy hash for agni, and decrypt it given the +// mac address +std::string LLSecAPIBasicHandler::_legacyLoadPassword() +{ + const S32 HASHED_LENGTH = 32; + std::vector<U8> buffer(HASHED_LENGTH); + llifstream password_file(mLegacyPasswordPath, llifstream::binary); + + if(password_file.fail()) + { + return std::string(""); + } + + password_file.read((char*)&buffer[0], buffer.size()); + if(password_file.gcount() != buffer.size()) + { + return std::string(""); + } + + // Decipher with MAC address + unsigned char unique_id[MAC_ADDRESS_BYTES]; + LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); + LLXORCipher cipher(unique_id, sizeof(unique_id)); + cipher.decrypt(&buffer[0], buffer.size()); + + return std::string((const char*)&buffer[0], buffer.size()); +} + + +// return an identifier for the user +std::string LLSecAPIBasicCredential::userID() const +{ + if (!mIdentifier.isMap()) + { + return mGrid + "(null)"; + } + else if ((std::string)mIdentifier["type"] == "agent") + { + return (std::string)mIdentifier["first_name"] + "_" + (std::string)mIdentifier["last_name"]; + } + else if ((std::string)mIdentifier["type"] == "account") + { + return (std::string)mIdentifier["account_name"]; + } + + return "unknown"; + +} + +// return a printable user identifier +std::string LLSecAPIBasicCredential::asString() const +{ + if (!mIdentifier.isMap()) + { + return mGrid + ":(null)"; + } + else if ((std::string)mIdentifier["type"] == "agent") + { + return mGrid + ":" + (std::string)mIdentifier["first_name"] + " " + (std::string)mIdentifier["last_name"]; + } + else if ((std::string)mIdentifier["type"] == "account") + { + return mGrid + ":" + (std::string)mIdentifier["account_name"]; + } + + return mGrid + ":(unknown type)"; +} + + +bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs) +{ + if (lhs.type() != rhs.type()) + { + return FALSE; + } + if (lhs.isMap()) + { + // iterate through the map, verifying the right hand side has all of the + // values that the left hand side has. + for (LLSD::map_const_iterator litt = lhs.beginMap(); + litt != lhs.endMap(); + litt++) + { + if (!rhs.has(litt->first)) + { + return FALSE; + } + } + + // Now validate that the left hand side has everything the + // right hand side has, and that the values are equal. + for (LLSD::map_const_iterator ritt = rhs.beginMap(); + ritt != rhs.endMap(); + ritt++) + { + if (!lhs.has(ritt->first)) + { + return FALSE; + } + if (!valueCompareLLSD(lhs[ritt->first], ritt->second)) + { + return FALSE; + } + } + return TRUE; + } + else if (lhs.isArray()) + { + LLSD::array_const_iterator ritt = rhs.beginArray(); + // iterate through the array, comparing + for (LLSD::array_const_iterator litt = lhs.beginArray(); + litt != lhs.endArray(); + litt++) + { + if (!valueCompareLLSD(*ritt, *litt)) + { + return FALSE; + } + ritt++; + } + + return (ritt == rhs.endArray()); + } + else + { + // simple type, compare as string + return (lhs.asString() == rhs.asString()); + } + +} diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h new file mode 100644 index 0000000000..356ea7efcb --- /dev/null +++ b/indra/newview/llsechandler_basic.h @@ -0,0 +1,296 @@ +/** + * @file llsechandler_basic.h + * @brief Security API for services such as certificate handling + * secure local storage, etc. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LLSECHANDLER_BASIC +#define LLSECHANDLER_BASIC + +#include "llsecapi.h" +#include <vector> +#include <openssl/x509.h> + +// helpers +extern LLSD cert_name_from_X509_NAME(X509_NAME* name); +extern std::string cert_string_name_from_X509_NAME(X509_NAME* name); +extern std::string cert_string_from_asn1_integer(ASN1_INTEGER* value); +extern LLDate cert_date_from_asn1_time(ASN1_TIME* asn1_time); +extern std::string cert_get_digest(const std::string& digest_type, X509 *cert); + + +// class LLCertificate +// +class LLBasicCertificate : public LLCertificate +{ +public: + LOG_CLASS(LLBasicCertificate); + + LLBasicCertificate(const std::string& pem_cert); + LLBasicCertificate(X509* openSSLX509); + + virtual ~LLBasicCertificate(); + + virtual std::string getPem() const; + virtual std::vector<U8> getBinary() const; + virtual void getLLSD(LLSD &llsd); + + virtual X509* getOpenSSLX509() const; + + // set llsd elements for testing + void setLLSD(const std::string name, const LLSD& value) { mLLSDInfo[name] = value; } + +protected: + + // certificates are stored as X509 objects, as validation and + // other functionality is via openssl + X509* mCert; + + LLSD& _initLLSD(); + LLSD mLLSDInfo; +}; + + +// class LLBasicCertificateVector +// Class representing a list of certificates +// This implementation uses a stl vector of certificates. +class LLBasicCertificateVector : virtual public LLCertificateVector +{ + +public: + LLBasicCertificateVector() {} + + virtual ~LLBasicCertificateVector() {} + + // Implementation of the basic iterator implementation. + // The implementation uses a vector iterator derived from + // the vector in the LLBasicCertificateVector class + class BasicIteratorImpl : public iterator_impl + { + public: + BasicIteratorImpl(std::vector<LLPointer<LLCertificate> >::iterator _iter) { mIter = _iter;} + virtual ~BasicIteratorImpl() {}; + // seek forward or back. Used by the operator++/operator-- implementations + virtual void seek(bool incr) + { + if(incr) + { + mIter++; + } + else + { + mIter--; + } + } + // create a copy of the iterator implementation class, used by the iterator copy constructor + virtual LLPointer<iterator_impl> clone() const + { + return new BasicIteratorImpl(mIter); + } + + virtual bool equals(const LLPointer<iterator_impl>& _iter) const + { + const BasicIteratorImpl *rhs_iter = dynamic_cast<const BasicIteratorImpl *>(_iter.get()); + llassert(rhs_iter); + if (!rhs_iter) return 0; + return (mIter == rhs_iter->mIter); + } + virtual LLPointer<LLCertificate> get() + { + return *mIter; + } + protected: + friend class LLBasicCertificateVector; + std::vector<LLPointer<LLCertificate> >::iterator mIter; + }; + + // numeric index of the vector + virtual LLPointer<LLCertificate> operator[](int _index) { return mCerts[_index];} + + // Iteration + virtual iterator begin() { return iterator(new BasicIteratorImpl(mCerts.begin())); } + + virtual iterator end() { return iterator(new BasicIteratorImpl(mCerts.end())); } + + // find a cert given params + virtual iterator find(const LLSD& params); + + // return the number of certs in the store + virtual int size() const { return mCerts.size(); } + + // insert the cert to the store. if a copy of the cert already exists in the store, it is removed first + virtual void add(LLPointer<LLCertificate> cert) { insert(end(), cert); } + + // insert the cert to the store. if a copy of the cert already exists in the store, it is removed first + virtual void insert(iterator _iter, LLPointer<LLCertificate> cert); + + // remove a certificate from the store + virtual LLPointer<LLCertificate> erase(iterator _iter); + +protected: + std::vector<LLPointer<LLCertificate> >mCerts; +}; + +// class LLCertificateStore +// represents a store of certificates, typically a store of root CA +// certificates. The store can be persisted, and can be used to validate +// a cert chain +// +class LLBasicCertificateStore : virtual public LLBasicCertificateVector, public LLCertificateStore +{ +public: + LLBasicCertificateStore(const std::string& filename); + void load_from_file(const std::string& filename); + + virtual ~LLBasicCertificateStore(); + + // persist the store + virtual void save(); + + // return the store id + virtual std::string storeId() const; + + // validate a certificate chain against a certificate store, using the + // given validation policy. + virtual void validate(int validation_policy, + LLPointer<LLCertificateChain> ca_chain, + const LLSD& validation_params); + +protected: + std::vector<LLPointer<LLCertificate> > mCerts; + + // cache of cert sha1 hashes to from/to date pairs, to improve + // performance of cert trust. Note, these are not the CA certs, + // but the certs that have been validated against this store. + typedef std::map<std::string, std::pair<LLDate, LLDate> > t_cert_cache; + t_cert_cache mTrustedCertCache; + + std::string mFilename; +}; + +// class LLCertificateChain +// Class representing a chain of certificates in order, with the +// first element being the child cert. +class LLBasicCertificateChain : virtual public LLBasicCertificateVector, public LLCertificateChain +{ + +public: + LLBasicCertificateChain(const X509_STORE_CTX * store); + + virtual ~LLBasicCertificateChain() {} + +}; + + + +// LLSecAPIBasicCredential class +class LLSecAPIBasicCredential : public LLCredential +{ +public: + LLSecAPIBasicCredential(const std::string& grid) : LLCredential(grid) {} + virtual ~LLSecAPIBasicCredential() {} + // return a value representing the user id, (could be guid, name, whatever) + virtual std::string userID() const; + + // printible string identifying the credential. + virtual std::string asString() const; +}; + +// LLSecAPIBasicHandler Class +// Interface handler class for the various security storage handlers. +class LLSecAPIBasicHandler : public LLSecAPIHandler +{ +public: + + LLSecAPIBasicHandler(const std::string& protected_data_filename, + const std::string& legacy_password_path); + LLSecAPIBasicHandler(); + + void init(); + + virtual ~LLSecAPIBasicHandler(); + + // instantiate a certificate from a pem string + virtual LLPointer<LLCertificate> getCertificate(const std::string& pem_cert); + + + // instiate a certificate from an openssl X509 structure + virtual LLPointer<LLCertificate> getCertificate(X509* openssl_cert); + + // instantiate a chain from an X509_STORE_CTX + virtual LLPointer<LLCertificateChain> getCertificateChain(const X509_STORE_CTX* chain); + + // instantiate a cert store given it's id. if a persisted version + // exists, it'll be loaded. If not, one will be created (but not + // persisted) + virtual LLPointer<LLCertificateStore> getCertificateStore(const std::string& store_id); + + // persist data in a protected store + virtual void setProtectedData(const std::string& data_type, + const std::string& data_id, + const LLSD& data); + + // retrieve protected data + virtual LLSD getProtectedData(const std::string& data_type, + const std::string& data_id); + + // delete a protected data item from the store + virtual void deleteProtectedData(const std::string& data_type, + const std::string& data_id); + + // credential management routines + + virtual LLPointer<LLCredential> createCredential(const std::string& grid, + const LLSD& identifier, + const LLSD& authenticator); + + virtual LLPointer<LLCredential> loadCredential(const std::string& grid); + + virtual void saveCredential(LLPointer<LLCredential> cred, bool save_authenticator); + + virtual void deleteCredential(LLPointer<LLCredential> cred); + +protected: + void _readProtectedData(); + void _writeProtectedData(); + std::string _legacyLoadPassword(); + + std::string mProtectedDataFilename; + LLSD mProtectedDataMap; + LLPointer<LLBasicCertificateStore> mStore; + + std::string mLegacyPasswordPath; +}; + +bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs); + +#endif // LLSECHANDLER_BASIC + + + diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 2c26bada20..af16b962e6 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2435,7 +2435,7 @@ BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name) if (identical) { - name = LLSLURL::buildCommand("agent", first_id, "inspect"); + name = LLSLURL("agent", first_id, "inspect").getSLURLString(); } else { @@ -2494,11 +2494,11 @@ BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name) BOOL public_owner = (first_id.isNull() && !first_group_owned); if (first_group_owned) { - name = LLSLURL::buildCommand("group", first_id, "inspect"); + name = LLSLURL("group", first_id, "inspect").getSLURLString(); } else if(!public_owner) { - name = LLSLURL::buildCommand("agent", first_id, "inspect"); + name = LLSLURL("agent", first_id, "inspect").getSLURLString(); } else { @@ -2558,7 +2558,7 @@ BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name) BOOL public_owner = (first_id.isNull()); if(!public_owner) { - name = LLSLURL::buildCommand("agent", first_id, "inspect"); + name = LLSLURL("agent", first_id, "inspect").getSLURLString(); } else { diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 08098e2adb..b66789448f 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -47,6 +47,7 @@ #include "llsidetray.h" #include "lltextbox.h" #include "lluictrlfactory.h" +#include "llviewercontrol.h" #include "llviewerregion.h" #include "llvoavatarself.h" #include "llwearable.h" @@ -97,7 +98,8 @@ LLSidepanelAppearance::LLSidepanelAppearance() : mFilterSubString(LLStringUtil::null), mFilterEditor(NULL), mOutfitEdit(NULL), - mCurrOutfitPanel(NULL) + mCurrOutfitPanel(NULL), + mOpened(false) { } @@ -116,10 +118,7 @@ BOOL LLSidepanelAppearance::postBuild() mEditAppearanceBtn = getChild<LLButton>("editappearance_btn"); mEditAppearanceBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditAppearanceButtonClicked, this)); - childSetAction("edit_outfit_btn", boost::bind(&LLSidepanelAppearance::onEditOutfitButtonClicked, this)); - - mEditBtn = getChild<LLButton>("edit_btn"); - mEditBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditButtonClicked, this)); + childSetAction("edit_outfit_btn", boost::bind(&LLSidepanelAppearance::showOutfitEditPanel, this)); mNewOutfitBtn = getChild<LLButton>("newlook_btn"); mNewOutfitBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onNewOutfitButtonClicked, this)); @@ -151,7 +150,7 @@ BOOL LLSidepanelAppearance::postBuild() LLButton* edit_wearable_back_btn = mEditWearable->getChild<LLButton>("back_btn"); if (edit_wearable_back_btn) { - edit_wearable_back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditWearBackClicked, this)); + edit_wearable_back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::showOutfitEditPanel, this)); } } @@ -164,32 +163,64 @@ BOOL LLSidepanelAppearance::postBuild() mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this); gInventory.addObserver(mOutfitRenameWatcher); + setVisibleCallback(boost::bind(&LLSidepanelAppearance::onVisibilityChange,this,_2)); + return TRUE; } // virtual void LLSidepanelAppearance::onOpen(const LLSD& key) { - fetchInventory(); - refreshCurrentOutfitName(); - updateVerbs(); - - if (mPanelOutfitsInventory) + if (!key.has("type")) { - mPanelOutfitsInventory->onOpen(key); + // No specific panel requested. + // If we're opened for the first time then show My Outfits. + // Else do nothing. + if (!mOpened) + { + showOutfitsInventoryPanel(); + } + } + else + { + // Switch to the requested panel. + // *TODO: replace this crap with LLSideTrayPanelContainer + std::string type = key["type"].asString(); + if (type == "my_outfits") + { + showOutfitsInventoryPanel(); + } + else if (type == "edit_outfit") + { + showOutfitEditPanel(); + } + else if (type == "edit_shape") + { + showWearableEditPanel(); + } } - if(key.size() == 0) - return; - - toggleOutfitEditPanel(TRUE); - updateVerbs(); - - mLookInfoType = key["type"].asString(); + mOpened = true; +} - if (mLookInfoType == "edit_outfit") +void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility) +{ + if (new_visibility.asBoolean()) + { + if ((mOutfitEdit && mOutfitEdit->getVisible()) || (mEditWearable && mEditWearable->getVisible())) + { + if (!gAgentCamera.cameraCustomizeAvatar()) + { + gAgentCamera.changeCameraToCustomizeAvatar(); + } + } + } + else { - mOutfitEdit->displayCurrentOutfit(); + if (gAgentCamera.cameraCustomizeAvatar()) + { + gAgentCamera.changeCameraToDefault(); + } } } @@ -233,6 +264,7 @@ void LLSidepanelAppearance::onOpenOutfitButtonClicked() } } +// *TODO: obsolete? void LLSidepanelAppearance::onEditAppearanceButtonClicked() { if (gAgentWearables.areWearablesLoaded()) @@ -241,26 +273,6 @@ void LLSidepanelAppearance::onEditAppearanceButtonClicked() } } -void LLSidepanelAppearance::onEditOutfitButtonClicked() -{ - LLSD key; - key["type"] = "edit_outfit"; - LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); -} - -void LLSidepanelAppearance::onEditButtonClicked() -{ - toggleOutfitEditPanel(FALSE); - toggleWearableEditPanel(TRUE, NULL); - /*if (mOutfitEdit->getVisible()) - { - } - else - { - mPanelOutfitsInventory->onEdit(); - }*/ -} - void LLSidepanelAppearance::onNewOutfitButtonClicked() { if (!mOutfitEdit->getVisible()) @@ -269,81 +281,110 @@ void LLSidepanelAppearance::onNewOutfitButtonClicked() } } -void LLSidepanelAppearance::onEditWearBackClicked() +void LLSidepanelAppearance::showOutfitsInventoryPanel() { - mEditWearable->saveChanges(); - toggleWearableEditPanel(FALSE, NULL); - toggleOutfitEditPanel(TRUE); + toggleWearableEditPanel(FALSE); + toggleOutfitEditPanel(FALSE); + togglMyOutfitsPanel(TRUE); } -void LLSidepanelAppearance::showOutfitsInventoryPanel() +void LLSidepanelAppearance::showOutfitEditPanel() { - mOutfitEdit->setVisible(FALSE); - - mPanelOutfitsInventory->setVisible(TRUE); + togglMyOutfitsPanel(FALSE); + toggleWearableEditPanel(FALSE, NULL, TRUE); // don't switch out of edit appearance mode + toggleOutfitEditPanel(TRUE); +} - mFilterEditor->setVisible(TRUE); - mEditBtn->setVisible(TRUE); - mNewOutfitBtn->setVisible(TRUE); - mCurrOutfitPanel->setVisible(TRUE); +void LLSidepanelAppearance::showWearableEditPanel(LLWearable *wearable /* = NULL*/) +{ + togglMyOutfitsPanel(FALSE); + toggleOutfitEditPanel(FALSE, TRUE); // don't switch out of edit appearance mode + toggleWearableEditPanel(TRUE, wearable); } -void LLSidepanelAppearance::showOutfitEditPanel() +void LLSidepanelAppearance::togglMyOutfitsPanel(BOOL visible) { - mOutfitEdit->setVisible(TRUE); - - mPanelOutfitsInventory->setVisible(FALSE); + if (!mPanelOutfitsInventory || mPanelOutfitsInventory->getVisible() == visible) + { + // visibility isn't changing, hence nothing to do + return; + } + + mPanelOutfitsInventory->setVisible(visible); + + // *TODO: Move these controls to panel_outfits_inventory.xml + // so that we don't need to toggle them explicitly. + mFilterEditor->setVisible(visible); + mNewOutfitBtn->setVisible(visible); + mCurrOutfitPanel->setVisible(visible); - mFilterEditor->setVisible(FALSE); - mEditBtn->setVisible(FALSE); - mNewOutfitBtn->setVisible(FALSE); - mCurrOutfitPanel->setVisible(FALSE); + if (visible) + { + mPanelOutfitsInventory->onOpen(LLSD()); + } } -void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible) +void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch) { - if (!mOutfitEdit) + if (!mOutfitEdit || mOutfitEdit->getVisible() == visible) + { + // visibility isn't changing, hence nothing to do return; + } mOutfitEdit->setVisible(visible); - if (mPanelOutfitsInventory) mPanelOutfitsInventory->setVisible(!visible); - mFilterEditor->setVisible(!visible); - mEditBtn->setVisible(!visible); - mNewOutfitBtn->setVisible(!visible); - mCurrOutfitPanel->setVisible(!visible); + + if (visible) + { + mOutfitEdit->onOpen(LLSD()); + if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) + { + gAgentCamera.changeCameraToCustomizeAvatar(); + } + } + else if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) + { + gAgentCamera.changeCameraToDefault(); + } } -void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *wearable) +void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *wearable, BOOL disable_camera_switch) { + if (!mEditWearable || mEditWearable->getVisible() == visible) + { + // visibility isn't changing, hence nothing to do + return; + } + if (!wearable) { - wearable = gAgentWearables.getWearable(WT_SHAPE, 0); + wearable = gAgentWearables.getWearable(LLWearableType::WT_SHAPE, 0); } - if (!mEditWearable || !wearable) + if (!wearable) { return; } - mCurrOutfitPanel->setVisible(!visible); - + // Toggle panel visibility. mEditWearable->setVisible(visible); - mEditWearable->setWearable(wearable); - mFilterEditor->setVisible(!visible); - mPanelOutfitsInventory->setVisible(!visible); -} - -void LLSidepanelAppearance::updateVerbs() -{ - bool is_look_info_visible = mOutfitEdit->getVisible(); - if (mPanelOutfitsInventory && !is_look_info_visible) + if (visible) { -// const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL); -// mEditBtn->setEnabled(is_correct_type); + mEditWearable->setWearable(wearable); + mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency + if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) + { + gAgentCamera.changeCameraToCustomizeAvatar(); + } } else { - mEditBtn->setEnabled(FALSE); + // Save changes if closing. + mEditWearable->saveChanges(); + if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) + { + gAgentCamera.changeCameraToDefault(); + } } } @@ -374,11 +415,13 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) } //static -void LLSidepanelAppearance::editWearable(LLWearable *wearable, void *data) +void LLSidepanelAppearance::editWearable(LLWearable *wearable, LLView *data) { - LLSidepanelAppearance *panel = (LLSidepanelAppearance*) data; - panel->toggleOutfitEditPanel(FALSE); - panel->toggleWearableEditPanel(TRUE, wearable); + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data); + if (panel) + { + panel->showWearableEditPanel(wearable); + } } // Fetch currently worn items and only enable the New Look button after everything's been @@ -389,11 +432,11 @@ void LLSidepanelAppearance::fetchInventory() mNewOutfitBtn->setEnabled(false); uuid_vec_t ids; LLUUID item_id; - for(S32 type = (S32)WT_SHAPE; type < (S32)WT_COUNT; ++type) + for(S32 type = (S32)LLWearableType::WT_SHAPE; type < (S32)LLWearableType::WT_COUNT; ++type) { - for (U32 index = 0; index < gAgentWearables.getWearableCount((EWearableType)type); ++index) + for (U32 index = 0; index < gAgentWearables.getWearableCount((LLWearableType::EType)type); ++index) { - item_id = gAgentWearables.getWearableItemID((EWearableType)type, index); + item_id = gAgentWearables.getWearableItemID((LLWearableType::EType)type, index); if(item_id.notNull()) { ids.push_back(item_id); @@ -439,3 +482,25 @@ void LLSidepanelAppearance::inventoryFetched() { mNewOutfitBtn->setEnabled(true); } + +void LLSidepanelAppearance::setWearablesLoading(bool val) +{ + childSetVisible("wearables_loading_indicator", val); + childSetVisible("edit_outfit_btn", !val); +} + +void LLSidepanelAppearance::showDefaultSubpart() +{ + if (mEditWearable->getVisible()) + { + mEditWearable->showDefaultSubpart(); + } +} + +void LLSidepanelAppearance::updateScrollingPanelList() +{ + if (mEditWearable->getVisible()) + { + mEditWearable->updateScrollingPanelList(); + } +} diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 0a2d882a0b..30022ae375 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -47,6 +47,7 @@ class LLPanelOutfitsInventory; class LLSidepanelAppearance : public LLPanel { + LOG_CLASS(LLSidepanelAppearance); public: LLSidepanelAppearance(); virtual ~LLSidepanelAppearance(); @@ -56,28 +57,29 @@ public: void refreshCurrentOutfitName(const std::string& name = ""); - static void editWearable(LLWearable *wearable, void *data); + static void editWearable(LLWearable *wearable, LLView *data); void fetchInventory(); void inventoryFetched(); - void updateVerbs(); void onNewOutfitButtonClicked(); void showOutfitsInventoryPanel(); void showOutfitEditPanel(); + void showWearableEditPanel(LLWearable *wearable = NULL); + void setWearablesLoading(bool val); + void showDefaultSubpart(); + void updateScrollingPanelList(); private: void onFilterEdit(const std::string& search_string); + void onVisibilityChange ( const LLSD& new_visibility ); void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); - void onEditOutfitButtonClicked(); - void onEditButtonClicked(); - void onEditWearBackClicked(); - //@deprecated use showXXX() methods instead - void toggleOutfitEditPanel(BOOL visible); - void toggleWearableEditPanel(BOOL visible, LLWearable* wearable); + void togglMyOutfitsPanel(BOOL visible); + void toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch = FALSE); + void toggleWearableEditPanel(BOOL visible, LLWearable* wearable = NULL, BOOL disable_camera_switch = FALSE); LLFilterEditor* mFilterEditor; LLPanelOutfitsInventory* mPanelOutfitsInventory; @@ -86,7 +88,6 @@ private: LLButton* mOpenOutfitBtn; LLButton* mEditAppearanceBtn; - LLButton* mEditBtn; LLButton* mNewOutfitBtn; LLPanel* mCurrOutfitPanel; @@ -103,9 +104,8 @@ private: // history locations std::string mFilterSubString; - // Information type currently shown in Look Information panel - std::string mLookInfoType; - + // Gets set to true when we're opened for the first time. + bool mOpened; }; #endif //LL_LLSIDEPANELAPPEARANCE_H diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index fa543f1371..fc5143d33b 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -42,6 +42,7 @@ #include "llsidepaneltaskinfo.h" #include "lltabcontainer.h" #include "llselectmgr.h" +#include "llweb.h" static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_inventory"); @@ -70,6 +71,9 @@ BOOL LLSidepanelInventory::postBuild() mShareBtn = mInventoryPanel->getChild<LLButton>("share_btn"); mShareBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShareButtonClicked, this)); + LLButton* shop_btn = mInventoryPanel->getChild<LLButton>("shop_btn"); + shop_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShopButtonClicked, this)); + mWearBtn = mInventoryPanel->getChild<LLButton>("wear_btn"); mWearBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onWearButtonClicked, this)); @@ -155,6 +159,11 @@ void LLSidepanelInventory::onShareButtonClicked() LLAvatarActions::shareWithAvatars(); } +void LLSidepanelInventory::onShopButtonClicked() +{ + LLWeb::loadURLExternal(gSavedSettings.getString("MarketplaceURL")); +} + void LLSidepanelInventory::performActionOnSelection(const std::string &action) { LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); @@ -323,8 +332,7 @@ LLInventoryItem *LLSidepanelInventory::getSelectedItem() U32 LLSidepanelInventory::getSelectedCount() { LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); - std::set<LLUUID> selection_list; - panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(selection_list); + std::set<LLUUID> selection_list = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(); return selection_list.size(); } diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 95eab3571c..2dc17e741d 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -79,6 +79,7 @@ private: protected: void onInfoButtonClicked(); void onShareButtonClicked(); + void onShopButtonClicked(); void onWearButtonClicked(); void onPlayButtonClicked(); void onTeleportButtonClicked(); diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 6ebe55e362..e76397671b 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -125,10 +125,8 @@ BOOL LLSidepanelTaskInfo::postBuild() return TRUE; } -// virtual -void LLSidepanelTaskInfo::setVisible(BOOL visible) +/*virtual*/ void LLSidepanelTaskInfo::handleVisibilityChange ( BOOL visible ) { - LLPanel::setVisible(visible); if (visible) { sActivePanel = this; @@ -137,9 +135,12 @@ void LLSidepanelTaskInfo::setVisible(BOOL visible) else { sActivePanel = NULL; + // drop selection reference + mObjectSelection = NULL; } } + void LLSidepanelTaskInfo::disableAll() { childSetEnabled("perm_modify", FALSE); diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index e41627435f..15274c90db 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -54,7 +54,7 @@ public: virtual ~LLSidepanelTaskInfo(); /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); void setObjectSelection(LLObjectSelectionHandle selection); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 3ec1855484..9159f42968 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -66,6 +66,21 @@ static const std::string TAB_PANEL_CAPTION_TITLE_BOX = "sidetray_tab_title"; LLSideTray* LLSideTray::sInstance = 0; +/** + * Updates visibility of sidetray tabs buttons according to "SidebarWithButtonsVisibility" setting + * + * @param force_set_visible if true method ignores setting value and set buttons visible. + */ +static void update_tabs_buttons_visibility(bool force_set_visible = false) +{ + LLView* side_bar_tabs = gViewerWindow->getRootView()->getChildView("side_bar_tabs"); + if (side_bar_tabs) + { + BOOL visible = LLUI::sSettingGroups["config"]->getBOOL("SidebarWithButtonsVisibility"); + side_bar_tabs->setVisible(force_set_visible || visible); + } +} + LLSideTray* LLSideTray::getInstance() { if (!sInstance) @@ -258,6 +273,8 @@ LLSideTray::LLSideTray(Params& params) p.name = "buttons_panel"; p.mouse_opaque = false; mButtonsPanel = LLUICtrlFactory::create<LLPanel>(p); + + initControlSettings(); } @@ -547,6 +564,7 @@ void LLSideTray::collapseSideBar() reflectCollapseChange(); setFocus( FALSE ); + update_tabs_buttons_visibility(); } void LLSideTray::expandSideBar() @@ -572,6 +590,7 @@ void LLSideTray::expandSideBar() btn->setImageOverlay( mActiveTab->mImageSelected ); } + update_tabs_buttons_visibility(true); } void LLSideTray::highlightFocused() @@ -638,6 +657,9 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para { panel->onOpen(params); } + + update_tabs_buttons_visibility(true); + return panel; } } @@ -720,11 +742,6 @@ bool LLSideTray::isPanelActive(const std::string& panel_name) return (panel->getName() == panel_name); } - -// *TODO: Eliminate magic constants. -static const S32 fake_offset = 132; -static const S32 fake_top_offset = 18; - void LLSideTray::updateSidetrayVisibility() { // set visibility of parent container based on collapsed state @@ -734,3 +751,35 @@ void LLSideTray::updateSidetrayVisibility() } } +void LLSideTray::initControlSettings() +{ + // set listeners to process runtime setting changes + LLUI::sSettingGroups["config"]->getControl("SidebarWithButtonsVisibility")->getSignal()->connect(boost::bind(&LLSideTray::toggleSidetrayAndTabButtonsVisibility, this, _2)); + + // update visibility according to current value + toggleSidetrayAndTabButtonsVisibility(LLUI::sSettingGroups["config"]->getBOOL("SidebarWithButtonsVisibility")); +} + +// sidebar visibility is implemented via its expanding/collapsing +void LLSideTray::toggleSidetrayAndTabButtonsVisibility(const LLSD::Boolean& new_visibility) +{ + // If new_visibility==FALSE it gets invisible but still can be expanded in other ways (Ctrl+I to see My Inventory) + + // store collapsed state to restore it properly on next call + static bool was_collapsed = false; + + if (!new_visibility && !mCollapsed) + { + collapseSideBar(); + was_collapsed = true; + } + // should be visible: expand only if it was expanded when has been collapsed on previous call + else if (new_visibility && was_collapsed) + { + if (mCollapsed) expandSideBar(); + was_collapsed = false; + } + + update_tabs_buttons_visibility(new_visibility); +} + diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 140a9c818a..ed6b376d5c 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -94,7 +94,7 @@ public: * if no such tab - return NULL, otherwise a pointer to the panel * Pass params as array, or they may be overwritten(example - params["name"]="nearby") */ - LLPanel* showPanel (const std::string& panel_name, const LLSD& params); + LLPanel* showPanel (const std::string& panel_name, const LLSD& params = LLSD()); /** * Toggling Side Tray tab which contains "sub_panel" child of "panel_name" panel. @@ -102,7 +102,7 @@ public: * otherwise Side Tray is collapsed. * params are passed to "panel_name" panel onOpen(). */ - void togglePanel (LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params); + void togglePanel (LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params = LLSD()); /* * get the panel (don't show it or do anything else with it) @@ -179,6 +179,16 @@ private: LLSideTray::getInstance()->setEnabled(FALSE); } + /** + * Initializes listener of SidebarWithButtonsVisibility setting and updates state according to it. + */ + void initControlSettings(); + + /** + * Updates Sidebar and its Tab Buttons visibility according to passed value. + */ + void toggleSidetrayAndTabButtonsVisibility(const LLSD::Boolean& new_visibility); + private: LLPanel* mButtonsPanel; diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 5d20e280b5..ff7e479368 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -1,10 +1,11 @@ /** - * @file llslurl.cpp - * @brief SLURL manipulation + * @file llurlsimstring.cpp (was llsimurlstring.cpp) + * @brief Handles "SLURL fragments" like Ahern/123/45 for + * startup processing, login screen, prefs, etc. * - * $LicenseInfo:firstyear=2009&license=viewergpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ * - * Copyright (c) 2009, Linden Research, Inc. + * Copyright (c) 2006-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,13 +13,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -34,155 +34,443 @@ #include "llslurl.h" -#include "llweb.h" - -#include "llurlregistry.h" - -const std::string LLSLURL::PREFIX_SL_HELP = "secondlife://app."; -const std::string LLSLURL::PREFIX_SL = "sl://"; -const std::string LLSLURL::PREFIX_SECONDLIFE = "secondlife://"; -const std::string LLSLURL::PREFIX_SLURL_OLD = "http://slurl.com/secondlife/"; - -// For DnD - even though www.slurl.com redirects to slurl.com in a browser, you can copy and drag +#include "llpanellogin.h" +#include "llviewercontrol.h" +#include "llviewernetwork.h" +#include "llfiltersd2xmlrpc.h" +#include "curl/curl.h" +const char* LLSLURL::SLURL_HTTP_SCHEME = "http"; +const char* LLSLURL::SLURL_HTTPS_SCHEME = "https"; +const char* LLSLURL::SLURL_SECONDLIFE_SCHEME = "secondlife"; +const char* LLSLURL::SLURL_SECONDLIFE_PATH = "secondlife"; +const char* LLSLURL::SLURL_COM = "slurl.com"; +// For DnD - even though www.slurl.com redirects to slurl.com in a browser, you can copy and drag // text with www.slurl.com or a link explicitly pointing at www.slurl.com so testing for this // version is required also. -const std::string LLSLURL::PREFIX_SLURL_WWW = "http://www.slurl.com/secondlife/"; -const std::string LLSLURL::PREFIX_SLURL = "http://maps.secondlife.com/secondlife/"; +const char* LLSLURL::WWW_SLURL_COM = "www.slurl.com"; +const char* LLSLURL::MAPS_SECONDLIFE_COM = "maps.secondlife.com"; +const char* LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME = "x-grid-location-info"; +const char* LLSLURL::SLURL_APP_PATH = "app"; +const char* LLSLURL::SLURL_REGION_PATH = "region"; +const char* LLSLURL::SIM_LOCATION_HOME = "home"; +const char* LLSLURL::SIM_LOCATION_LAST = "last"; -const std::string LLSLURL::APP_TOKEN = "app/"; - -// static -std::string LLSLURL::stripProtocol(const std::string& url) +// resolve a simstring from a slurl +LLSLURL::LLSLURL(const std::string& slurl) { - std::string stripped = url; - if (matchPrefix(stripped, PREFIX_SL_HELP)) - { - stripped.erase(0, PREFIX_SL_HELP.length()); - } - else if (matchPrefix(stripped, PREFIX_SL)) - { - stripped.erase(0, PREFIX_SL.length()); - } - else if (matchPrefix(stripped, PREFIX_SECONDLIFE)) - { - stripped.erase(0, PREFIX_SECONDLIFE.length()); - } - else if (matchPrefix(stripped, PREFIX_SLURL)) + // by default we go to agni. + mType = INVALID; + LL_INFOS("AppInit") << "SLURL: " << slurl << LL_ENDL; + if(slurl == SIM_LOCATION_HOME) { - stripped.erase(0, PREFIX_SLURL.length()); + mType = HOME_LOCATION; } - else if (matchPrefix(stripped, PREFIX_SLURL_OLD)) + else if(slurl.empty() || (slurl == SIM_LOCATION_LAST)) { - stripped.erase(0, PREFIX_SLURL_OLD.length()); + + mType = LAST_LOCATION; } - else if (matchPrefix(stripped, PREFIX_SLURL_WWW)) + else { - stripped.erase(0, PREFIX_SLURL_WWW.length()); + LLURI slurl_uri; + // parse the slurl as a uri + if(slurl.find(':') == std::string::npos) + { + // There may be no scheme ('secondlife:' etc.) passed in. In that case + // we want to normalize the slurl by putting the appropriate scheme + // in front of the slurl. So, we grab the appropriate slurl base + // from the grid manager which may be http://slurl.com/secondlife/ for maingrid, or + // https://<hostname>/region/ for Standalone grid (the word region, not the region name) + // these slurls are typically passed in from the 'starting location' box on the login panel, + // where the user can type in <regionname>/<x>/<y>/<z> + std::string fixed_slurl = LLGridManager::getInstance()->getSLURLBase(); + // the slurl that was passed in might have a prepended /, or not. So, + // we strip off the prepended '/' so we don't end up with http://slurl.com/secondlife/<region>/<x>/<y>/<z> + // or some such. + + if(slurl[0] == '/') + { + fixed_slurl += slurl.substr(1); + } + else + { + fixed_slurl += slurl; + } + // We then load the slurl into a LLURI form + slurl_uri = LLURI(fixed_slurl); + } + else + { + // as we did have a scheme, implying a URI style slurl, we + // simply parse it as a URI + slurl_uri = LLURI(slurl); + } + + LLSD path_array = slurl_uri.pathArray(); + + // determine whether it's a maingrid URI or an Standalone/open style URI + // by looking at the scheme. If it's a 'secondlife:' slurl scheme or + // 'sl:' scheme, we know it's maingrid + + // At the end of this if/else block, we'll have determined the grid, + // and the slurl type (APP or LOCATION) + if(slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME) + { + // parse a maingrid style slurl. We know the grid is maingrid + // so grab it. + // A location slurl for maingrid (with the special schemes) can be in the form + // secondlife://<regionname>/<x>/<y>/<z> + // or + // secondlife://<Grid>/secondlife/<region>/<x>/<y>/<z> + // where if grid is empty, it specifies Agni + + // An app style slurl for maingrid can be + // secondlife://<Grid>/app/<app parameters> + // where an empty grid implies Agni + + // we'll start by checking the top of the 'path' which will be + // either 'app', 'secondlife', or <x>. + + // default to maingrid + + mGrid = MAINGRID; + + if ((path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH) || + (path_array[0].asString() == LLSLURL::SLURL_APP_PATH)) + { + // it's in the form secondlife://<grid>/(app|secondlife) + // so parse the grid name to derive the grid ID + if (!slurl_uri.hostName().empty()) + { + mGrid = LLGridManager::getInstance()->getGridByLabel(slurl_uri.hostName()); + } + else if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH) + { + // If the slurl is in the form secondlife:///secondlife/<region> form, + // then we are in fact on maingrid. + mGrid = MAINGRID; + } + else if(path_array[0].asString() == LLSLURL::SLURL_APP_PATH) + { + // for app style slurls, where no grid name is specified, assume the currently + // selected or logged in grid. + mGrid = LLGridManager::getInstance()->getGrid(); + } + + if(mGrid.empty()) + { + // we couldn't find the grid in the grid manager, so bail + return; + } + // set the type as appropriate. + if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH) + { + mType = LOCATION; + } + else + { + mType = APP; + } + path_array.erase(0); + } + else + { + // it wasn't a /secondlife/<region> or /app/<params>, so it must be secondlife://<region> + // therefore the hostname will be the region name, and it's a location type + mType = LOCATION; + // 'normalize' it so the region name is in fact the head of the path_array + path_array.insert(0, slurl_uri.hostName()); + } + } + else if((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME) || + (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) || + (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME)) + { + // We're dealing with either a Standalone style slurl or slurl.com slurl + if ((slurl_uri.hostName() == LLSLURL::SLURL_COM) || + (slurl_uri.hostName() == LLSLURL::WWW_SLURL_COM) || + (slurl_uri.hostName() == LLSLURL::MAPS_SECONDLIFE_COM)) + { + // slurl.com implies maingrid + mGrid = MAINGRID; + } + else + { + // As it's a Standalone grid/open, we will always have a hostname, as Standalone/open style + // urls are properly formed, unlike the stinky maingrid style + mGrid = slurl_uri.hostName(); + } + if (path_array.size() == 0) + { + // um, we need a path... + return; + } + + // we need to normalize the urls so + // the path portion starts with the 'command' that we want to do + // it can either be region or app. + if ((path_array[0].asString() == LLSLURL::SLURL_REGION_PATH) || + (path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)) + { + // strip off 'region' or 'secondlife' + path_array.erase(0); + // it's a location + mType = LOCATION; + } + else if (path_array[0].asString() == LLSLURL::SLURL_APP_PATH) + { + mType = APP; + path_array.erase(0); + // leave app appended. + } + else + { + // not a valid https/http/x-grid-location-info slurl, so it'll likely just be a URL + return; + } + } + else + { + // invalid scheme, so bail + return; + } + + + if(path_array.size() == 0) + { + // we gotta have some stuff after the specifier as to whether it's a region or command + return; + } + + // now that we know whether it's an app slurl or a location slurl, + // parse the slurl into the proper data structures. + if(mType == APP) + { + // grab the app command type and strip it (could be a command to jump somewhere, + // or whatever ) + mAppCmd = path_array[0].asString(); + path_array.erase(0); + + // Grab the parameters + mAppPath = path_array; + // and the query + mAppQuery = slurl_uri.query(); + mAppQueryMap = slurl_uri.queryMap(); + return; + } + else if(mType == LOCATION) + { + // at this point, head of the path array should be [ <region>, <x>, <y>, <z> ] where x, y and z + // are collectively optional + // are optional + mRegion = LLURI::unescape(path_array[0].asString()); + path_array.erase(0); + + // parse the x, y, z + if(path_array.size() >= 3) + { + + mPosition = LLVector3(path_array); + if((F32(mPosition[VX]) < 0.f) || + (mPosition[VX] > REGION_WIDTH_METERS) || + (F32(mPosition[VY]) < 0.f) || + (mPosition[VY] > REGION_WIDTH_METERS) || + (F32(mPosition[VZ]) < 0.f) || + (mPosition[VZ] > REGION_HEIGHT_METERS)) + { + mType = INVALID; + return; + } + + } + else + { + // if x, y and z were not fully passed in, go to the middle of the region. + // teleport will adjust the actual location to make sure you're on the ground + // and such + mPosition = LLVector3(REGION_WIDTH_METERS/2, REGION_WIDTH_METERS/2, 0); + } + } } - - return stripped; } -// static -bool LLSLURL::isSLURL(const std::string& url) + +// Create a slurl for the middle of the region +LLSLURL::LLSLURL(const std::string& grid, + const std::string& region) { - if (matchPrefix(url, PREFIX_SL_HELP)) return true; - if (matchPrefix(url, PREFIX_SL)) return true; - if (matchPrefix(url, PREFIX_SECONDLIFE)) return true; - if (matchPrefix(url, PREFIX_SLURL)) return true; - if (matchPrefix(url, PREFIX_SLURL_OLD)) return true; - if (matchPrefix(url, PREFIX_SLURL_WWW)) return true; - - return false; + mGrid = grid; + mRegion = region; + mType = LOCATION; + mPosition = LLVector3((F64)REGION_WIDTH_METERS/2, (F64)REGION_WIDTH_METERS/2, 0); } -bool LLSLURL::isValidSLURL(const std::string& url) + + +// create a slurl given the position. The position will be modded with the region +// width handling global positions as well +LLSLURL::LLSLURL(const std::string& grid, + const std::string& region, + const LLVector3& position) { - std::string temp_url(url); - //"www." may appear in DnD- see description of PREFIX_SLURL_WWW. - // If it is found, we remove it because it isn't expected in regexp. - if (matchPrefix(url, PREFIX_SLURL_WWW)) - { - size_t position = url.find("www."); - temp_url.erase(position,4); - } - - return LLUrlRegistry::getInstance()->isUrl(temp_url); + mGrid = grid; + mRegion = region; + S32 x = llround( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) ); + S32 y = llround( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) ); + S32 z = llround( (F32)position[VZ] ); + mType = LOCATION; + mPosition = LLVector3(x, y, z); } -// static -bool LLSLURL::isSLURLCommand(const std::string& url) -{ - if (matchPrefix(url, PREFIX_SL + APP_TOKEN) || - matchPrefix(url, PREFIX_SECONDLIFE + "/" + APP_TOKEN) || - matchPrefix(url, PREFIX_SLURL + APP_TOKEN) || - matchPrefix(url, PREFIX_SLURL_WWW + APP_TOKEN) || - matchPrefix(url, PREFIX_SLURL_OLD + APP_TOKEN) ) - { - return true; - } - return false; +// create a simstring +LLSLURL::LLSLURL(const std::string& region, + const LLVector3& position) +{ + *this = LLSLURL(LLGridManager::getInstance()->getGrid(), + region, position); } -// static -bool LLSLURL::isSLURLHelp(const std::string& url) +// create a slurl from a global position +LLSLURL::LLSLURL(const std::string& grid, + const std::string& region, + const LLVector3d& global_position) { - return matchPrefix(url, PREFIX_SL_HELP); + *this = LLSLURL(grid, + region, LLVector3(global_position.mdV[VX], + global_position.mdV[VY], + global_position.mdV[VZ])); } -// static -std::string LLSLURL::buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z) +// create a slurl from a global position +LLSLURL::LLSLURL(const std::string& region, + const LLVector3d& global_position) { - std::string slurl = PREFIX_SLURL + regionname + llformat("/%d/%d/%d",x,y,z); - slurl = LLWeb::escapeURL( slurl ); - return slurl; + *this = LLSLURL(LLGridManager::getInstance()->getGrid(), + region, global_position); } -// static -std::string LLSLURL::buildCommand(const char* noun, const LLUUID& id, const char* verb) +LLSLURL::LLSLURL(const std::string& command, const LLUUID&id, const std::string& verb) { - std::string slurl = llformat("secondlife:///app/%s/%s/%s", - noun, id.asString().c_str(), verb); - return slurl; + mType = APP; + mAppCmd = command; + mAppPath = LLSD::emptyArray(); + mAppPath.append(LLSD(id)); + mAppPath.append(LLSD(verb)); } -// static -std::string LLSLURL::buildUnescapedSLURL(const std::string& regionname, S32 x, S32 y, S32 z) + +std::string LLSLURL::getSLURLString() const { - std::string unescapedslurl = PREFIX_SLURL + regionname + llformat("/%d/%d/%d",x,y,z); - return unescapedslurl; + switch(mType) + { + case HOME_LOCATION: + return SIM_LOCATION_HOME; + case LAST_LOCATION: + return SIM_LOCATION_LAST; + case LOCATION: + { + // lookup the grid + S32 x = llround( (F32)mPosition[VX] ); + S32 y = llround( (F32)mPosition[VY] ); + S32 z = llround( (F32)mPosition[VZ] ); + return LLGridManager::getInstance()->getSLURLBase(mGrid) + + LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z); + } + case APP: + { + std::ostringstream app_url; + app_url << LLGridManager::getInstance()->getAppSLURLBase() << "/" << mAppCmd; + for(LLSD::array_const_iterator i = mAppPath.beginArray(); + i != mAppPath.endArray(); + i++) + { + app_url << "/" << i->asString(); + } + if(mAppQuery.length() > 0) + { + app_url << "?" << mAppQuery; + } + return app_url.str(); + } + default: + LL_WARNS("AppInit") << "Unexpected SLURL type for SLURL string" << (int)mType << LL_ENDL; + return std::string(); + } } -// static -std::string LLSLURL::buildSLURLfromPosGlobal(const std::string& regionname, - const LLVector3d& global_pos, - bool escaped /*= true*/) +std::string LLSLURL::getLoginString() const { - S32 x, y, z; - globalPosToXYZ(global_pos, x, y, z); - if(escaped) + + std::stringstream unescaped_start; + switch(mType) { - return buildSLURL(regionname, x, y, z); + case LOCATION: + unescaped_start << "uri:" + << mRegion << "&" + << llround(mPosition[0]) << "&" + << llround(mPosition[1]) << "&" + << llround(mPosition[2]); + break; + case HOME_LOCATION: + unescaped_start << "home"; + break; + case LAST_LOCATION: + unescaped_start << "last"; + break; + default: + LL_WARNS("AppInit") << "Unexpected SLURL type for login string" << (int)mType << LL_ENDL; + break; } - else + return xml_escape_string(unescaped_start.str()); +} + +bool LLSLURL::operator==(const LLSLURL& rhs) +{ + if(rhs.mType != mType) return false; + switch(mType) { - return buildUnescapedSLURL(regionname, x, y, z); + case LOCATION: + return ((mGrid == rhs.mGrid) && + (mRegion == rhs.mRegion) && + (mPosition == rhs.mPosition)); + case APP: + return getSLURLString() == rhs.getSLURLString(); + + case HOME_LOCATION: + case LAST_LOCATION: + return true; + default: + return false; } } -// static -bool LLSLURL::matchPrefix(const std::string& url, const std::string& prefix) +bool LLSLURL::operator !=(const LLSLURL& rhs) { - std::string test_prefix = url.substr(0, prefix.length()); - LLStringUtil::toLower(test_prefix); - return test_prefix == prefix; + return !(*this == rhs); } -void LLSLURL::globalPosToXYZ(const LLVector3d& pos, S32& x, S32& y, S32& z) +std::string LLSLURL::getLocationString() const +{ + return llformat("%s/%d/%d/%d", + mRegion.c_str(), + (int)llround(mPosition[0]), + (int)llround(mPosition[1]), + (int)llround(mPosition[2])); +} +std::string LLSLURL::asString() const { - x = llround((F32)fmod(pos.mdV[VX], (F64)REGION_WIDTH_METERS)); - y = llround((F32)fmod(pos.mdV[VY], (F64)REGION_WIDTH_METERS)); - z = llround((F32)pos.mdV[VZ]); + std::ostringstream result; + result << " mAppCmd:" << getAppCmd() << + " mAppPath:" + getAppPath().asString() << + " mAppQueryMap:" + getAppQueryMap().asString() << + " mAppQuery: " + getAppQuery() << + " mGrid: " + getGrid() << + " mRegion: " + getRegion() << + " mPosition: " << + " mType: " << mType << + " mPosition: " << mPosition; + return result.str(); } + diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h index a79a8fc97c..1210c398f1 100644 --- a/indra/newview/llslurl.h +++ b/indra/newview/llslurl.h @@ -1,10 +1,11 @@ -/** +/** * @file llslurl.h - * @brief SLURL manipulation + * @brief Handles "SLURL fragments" like Ahern/123/45 for + * startup processing, login screen, prefs, etc. * - * $LicenseInfo:firstyear=2009&license=viewergpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ * - * Copyright (c) 2009, Linden Research, Inc. + * Copyright (c) 2006-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,13 +13,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -29,85 +29,84 @@ * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ +#ifndef LLSLURL_H +#define LLSLURL_H -#ifndef LL_SLURL_H -#define LL_SLURL_H +#include "llstring.h" -#include <string> -// IAN BUG: where should this live? -// IAN BUG: are static utility functions right? See LLUUID. -// question of whether to have a LLSLURL object or a -// some of this was moved from LLURLDispatcher +// represents a location in a grid -/** - * SLURL manipulation - */ class LLSLURL { public: - static const std::string PREFIX_SL_HELP; - static const std::string PREFIX_SL; - static const std::string PREFIX_SECONDLIFE; - static const std::string PREFIX_SLURL; - static const std::string PREFIX_SLURL_OLD; - static const std::string PREFIX_SLURL_WWW; - - static const std::string APP_TOKEN; - - /** - * Is this any sort of secondlife:// or sl:// URL? - */ - static bool isSLURL(const std::string& url); - - /** - * Returns true if url is proven valid by regexp check from LLUrlRegistry - */ - static bool isValidSLURL(const std::string& url); - - /** - * Is this a special secondlife://app/ URL? - */ - static bool isSLURLCommand(const std::string& url); - - /** - * Not sure what it is. - */ - static bool isSLURLHelp(const std::string& url); - - /** - * builds: http://slurl.com/secondlife/Region%20Name/x/y/z/ escaping result url. - */ - static std::string buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z); - - /// Build a SLURL like secondlife:///app/agent/<uuid>/inspect - static std::string buildCommand(const char* noun, const LLUUID& id, const char* verb); - - /** - * builds: http://slurl.com/secondlife/Region Name/x/y/z/ without escaping result url. - */ - static std::string buildUnescapedSLURL(const std::string& regionname, S32 x, S32 y, S32 z); - - /** - * builds SLURL from global position. Returns escaped or unescaped url. - * Returns escaped url by default. - */ - static std::string buildSLURLfromPosGlobal(const std::string& regionname, - const LLVector3d& global_pos, - bool escaped = true); - /** - * Strip protocol part from the URL. - */ - static std::string stripProtocol(const std::string& url); - - /** - * Convert global position to X, Y Z - */ - static void globalPosToXYZ(const LLVector3d& pos, S32& x, S32& y, S32& z); - -private: - static bool matchPrefix(const std::string& url, const std::string& prefix); - + static const char* SLURL_HTTPS_SCHEME; + static const char* SLURL_HTTP_SCHEME; + static const char* SLURL_SL_SCHEME; + static const char* SLURL_SECONDLIFE_SCHEME; + static const char* SLURL_SECONDLIFE_PATH; + static const char* SLURL_COM; + static const char* WWW_SLURL_COM; + static const char* MAPS_SECONDLIFE_COM; + static const char* SLURL_X_GRID_LOCATION_INFO_SCHEME; + static LLSLURL START_LOCATION; + static const char* SIM_LOCATION_HOME; + static const char* SIM_LOCATION_LAST; + static const char* SLURL_APP_PATH; + static const char* SLURL_REGION_PATH; + + enum SLURL_TYPE { + INVALID, + LOCATION, + HOME_LOCATION, + LAST_LOCATION, + APP, + HELP + }; + + + LLSLURL(): mType(INVALID) { } + LLSLURL(const std::string& slurl); + LLSLURL(const std::string& grid, const std::string& region); + LLSLURL(const std::string& region, const LLVector3& position); + LLSLURL(const std::string& grid, const std::string& region, const LLVector3& position); + LLSLURL(const std::string& grid, const std::string& region, const LLVector3d& global_position); + LLSLURL(const std::string& region, const LLVector3d& global_position); + LLSLURL(const std::string& command, const LLUUID&id, const std::string& verb); + + SLURL_TYPE getType() const { return mType; } + + std::string getSLURLString() const; + std::string getLoginString() const; + std::string getLocationString() const; + std::string getGrid() const { return mGrid; } + std::string getRegion() const { return mRegion; } + LLVector3 getPosition() const { return mPosition; } + std::string getAppCmd() const { return mAppCmd; } + std::string getAppQuery() const { return mAppQuery; } + LLSD getAppQueryMap() const { return mAppQueryMap; } + LLSD getAppPath() const { return mAppPath; } + + bool isValid() const { return mType != INVALID; } + bool isSpatial() const { return (mType == LAST_LOCATION) || (mType == HOME_LOCATION) || (mType == LOCATION); } + + bool operator==(const LLSLURL& rhs); + bool operator!=(const LLSLURL&rhs); + + std::string asString() const ; + +protected: + SLURL_TYPE mType; + + // used for Apps and Help + std::string mAppCmd; + LLSD mAppPath; + LLSD mAppQueryMap; + std::string mAppQuery; + + std::string mGrid; // reference to grid manager grid + std::string mRegion; + LLVector3 mPosition; }; -#endif +#endif // LLSLURL_H diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index c5c311ed33..d7de050636 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -59,9 +59,9 @@ LLSpeakButton::Params::Params() void LLSpeakButton::draw() { - // gVoiceClient is the authoritative global source of info regarding our open-mic state, we merely reflect that state. - bool openmic = gVoiceClient->getUserPTTState(); - bool voiceenabled = gVoiceClient->voiceEnabled(); + // LLVoiceClient::getInstance() is the authoritative global source of info regarding our open-mic state, we merely reflect that state. + bool openmic = LLVoiceClient::getInstance()->getUserPTTState(); + bool voiceenabled = LLVoiceClient::getInstance()->voiceEnabled(); mSpeakBtn->setToggleState(openmic && voiceenabled); mOutputMonitor->setIsMuted(!voiceenabled); LLUICtrl::draw(); @@ -176,11 +176,11 @@ void LLSpeakButton::setLabelVisible(bool visible) void LLSpeakButton::onMouseDown_SpeakBtn() { bool down = true; - gVoiceClient->inputUserControlState(down); // this method knows/care about whether this translates into a toggle-to-talk or down-to-talk + LLVoiceClient::getInstance()->inputUserControlState(down); // this method knows/care about whether this translates into a toggle-to-talk or down-to-talk } void LLSpeakButton::onMouseUp_SpeakBtn() { bool down = false; - gVoiceClient->inputUserControlState(down); + LLVoiceClient::getInstance()->inputUserControlState(down); } diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index ba6a44dff4..bf00b47c21 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -251,6 +251,8 @@ bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_ LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) : mVoiceChannel(channelp) +, mVoiceModerated(false) +, mModerateModeHandledFirstTime(false) { static LLUICachedControl<F32> remove_delay ("SpeakerParticipantRemoveDelay", 10.0); @@ -297,9 +299,36 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin return speakerp; } +// *TODO: Once way to request the current voice channel moderation mode is implemented +// this method with related code should be removed. +/* + Initializes "moderate_mode" of voice session on first join. + + This is WORKAROUND because a way to request the current voice channel moderation mode exists + but is not implemented in viewer yet. See EXT-6937. +*/ +void LLSpeakerMgr::initVoiceModerateMode() +{ + if (!mModerateModeHandledFirstTime && (mVoiceChannel && mVoiceChannel->isActive())) + { + LLPointer<LLSpeaker> speakerp; + + if (mSpeakers.find(gAgentID) != mSpeakers.end()) + { + speakerp = mSpeakers[gAgentID]; + } + + if (speakerp.notNull()) + { + mVoiceModerated = speakerp->mModeratorMutedVoice; + mModerateModeHandledFirstTime = true; + } + } +} + void LLSpeakerMgr::update(BOOL resort_ok) { - if (!gVoiceClient) + if (!LLVoiceClient::getInstance()) { return; } @@ -313,7 +342,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) } // update status of all current speakers - BOOL voice_channel_active = (!mVoiceChannel && gVoiceClient->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()); + BOOL voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()); for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end();) { LLUUID speaker_id = speaker_it->first; @@ -321,21 +350,21 @@ void LLSpeakerMgr::update(BOOL resort_ok) speaker_map_t::iterator cur_speaker_it = speaker_it++; - if (voice_channel_active && gVoiceClient->getVoiceEnabled(speaker_id)) + if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id)) { - speakerp->mSpeechVolume = gVoiceClient->getCurrentPower(speaker_id); - BOOL moderator_muted_voice = gVoiceClient->getIsModeratorMuted(speaker_id); + speakerp->mSpeechVolume = LLVoiceClient::getInstance()->getCurrentPower(speaker_id); + BOOL moderator_muted_voice = LLVoiceClient::getInstance()->getIsModeratorMuted(speaker_id); if (moderator_muted_voice != speakerp->mModeratorMutedVoice) { speakerp->mModeratorMutedVoice = moderator_muted_voice; speakerp->fireEvent(new LLSpeakerVoiceModerationEvent(speakerp)); } - if (gVoiceClient->getOnMuteList(speaker_id) || speakerp->mModeratorMutedVoice) + if (LLVoiceClient::getInstance()->getOnMuteList(speaker_id) || speakerp->mModeratorMutedVoice) { speakerp->mStatus = LLSpeaker::STATUS_MUTED; } - else if (gVoiceClient->getIsSpeaking(speaker_id)) + else if (LLVoiceClient::getInstance()->getIsSpeaking(speaker_id)) { // reset inactivity expiration if (speakerp->mStatus != LLSpeaker::STATUS_SPEAKING) @@ -417,19 +446,21 @@ void LLSpeakerMgr::update(BOOL resort_ok) void LLSpeakerMgr::updateSpeakerList() { // are we bound to the currently active voice channel? - if ((!mVoiceChannel && gVoiceClient->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) - { - LLVoiceClient::participantMap* participants = gVoiceClient->getParticipantList(); - if(participants) + if ((!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) + { + std::set<LLUUID> participants; + LLVoiceClient::getInstance()->getParticipantList(participants); + // add new participants to our list of known speakers + for (std::set<LLUUID>::iterator participant_it = participants.begin(); + participant_it != participants.end(); + ++participant_it) { - LLVoiceClient::participantMap::iterator participant_it; + setSpeaker(*participant_it, + LLVoiceClient::getInstance()->getDisplayName(*participant_it), + LLSpeaker::STATUS_VOICE_ACTIVE, + (LLVoiceClient::getInstance()->isParticipantAvatar(*participant_it)?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL)); + - // add new participants to our list of known speakers - for (participant_it = participants->begin(); participant_it != participants->end(); ++participant_it) - { - LLVoiceClient::participantState* participantp = participant_it->second; - setSpeaker(participantp->mAvatarID, participantp->mDisplayName, LLSpeaker::STATUS_VOICE_ACTIVE, (participantp->isAvatar()?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL)); - } } } } @@ -519,7 +550,7 @@ void LLSpeakerMgr::speakerChatted(const LLUUID& speaker_id) BOOL LLSpeakerMgr::isVoiceActive() { // mVoiceChannel = NULL means current voice channel, whatever it is - return LLVoiceClient::voiceEnabled() && mVoiceChannel && mVoiceChannel->isActive(); + return LLVoiceClient::getInstance()->voiceEnabled() && mVoiceChannel && mVoiceChannel->isActive(); } @@ -759,43 +790,26 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu new ModerationResponder(getSessionID())); } -void LLIMSpeakerMgr::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else) +void LLIMSpeakerMgr::moderateVoiceAllParticipants( bool unmute_everyone ) { - // *TODO: mantipov: add more intellectual processing of several following requests if it is needed. - /* - Such situation should be tested: - "Moderator sends the same second request before first response is come" - Moderator sends "mute everyone else" for A and then for B - two requests to disallow voice chat are sent - UUID of B is stored. - Then first response (to disallow voice chat) is come - request to allow voice for stored avatar (B) - Then second response (to disallow voice chat) is come - have nothing to do, the latest selected speaker is already enabled - - What can happen? - If request to allow voice for stored avatar (B) is processed on server BEFORE - second request to disallow voice chat all speakers will be disabled on voice. - But I'm not sure such situation is possible. - See EXT-3431. - */ - - mReverseVoiceModeratedAvatarID = excluded_avatar_id; - moderateVoiceSession(getSessionID(), !unmute_everyone_else); + if (mVoiceModerated == !unmute_everyone) + { + // session already in requested state. Just force participants which do not match it. + forceVoiceModeratedMode(mVoiceModerated); + } + else + { + // otherwise set moderated mode for a whole session. + moderateVoiceSession(getSessionID(), !unmute_everyone); + } } void LLIMSpeakerMgr::processSessionUpdate(const LLSD& session_update) { - if (mReverseVoiceModeratedAvatarID.isNull()) return; - if (session_update.has("moderated_mode") && session_update["moderated_mode"].has("voice")) { - BOOL voice_moderated = session_update["moderated_mode"]["voice"]; - - moderateVoiceParticipant(mReverseVoiceModeratedAvatarID, voice_moderated); - - mReverseVoiceModeratedAvatarID = LLUUID::null; + mVoiceModerated = session_update["moderated_mode"]["voice"]; } } @@ -815,6 +829,20 @@ void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallo LLHTTPClient::post(url, data, new ModerationResponder(session_id)); } +void LLIMSpeakerMgr::forceVoiceModeratedMode(bool should_be_muted) +{ + 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; + + // participant does not match requested state + if (should_be_muted != (bool)speakerp->mModeratorMutedVoice) + { + moderateVoiceParticipant(speaker_id, !should_be_muted); + } + } +} // // LLActiveSpeakerMgr diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 2bb160b7ce..4a250de82f 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -242,6 +242,13 @@ public: */ bool removeAvalineSpeaker(const LLUUID& speaker_id) { return removeSpeaker(speaker_id); } + /** + * Initializes mVoiceModerated depend on LLSpeaker::mModeratorMutedVoice of agent's participant. + * + * Is used only to implement workaround to initialize mVoiceModerated on first join to group chat. See EXT-6937 + */ + void initVoiceModerateMode(); + protected: virtual void updateSpeakerList(); void setSpeakerNotInChannel(LLSpeaker* speackerp); @@ -258,6 +265,14 @@ protected: * time out speakers when they are not part of current session */ LLSpeakersDelayActionsStorage* mSpeakerDelayRemover; + + // *TODO: should be moved back into LLIMSpeakerMgr when a way to request the current voice channel + // moderation mode is implemented: See EXT-6937 + bool mVoiceModerated; + + // *TODO: To be removed when a way to request the current voice channel + // moderation mode is implemented: See EXT-6937 + bool mModerateModeHandledFirstTime; }; class LLIMSpeakerMgr : public LLSpeakerMgr @@ -279,22 +294,21 @@ public: * @param[in] avatar_id UUID of avatar to be processed * @param[in] unmute if false - specified avatar will be muted, otherwise - unmuted. * - * @see moderateVoiceOtherParticipants() + * @see moderateVoiceAllParticipants() */ void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); /** - * Mutes/Unmutes all avatars except specified for current group voice chat. + * 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. - * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted. + * It calls forceVoiceModeratedMode() in case of session is already in requested state. * - * @param[in] excluded_avatar_id UUID of avatar NOT to be processed - * @param[in] unmute_everyone_else if false - avatars will be muted, otherwise - unmuted. + * @param[in] unmute_everyone if false - avatars will be muted, otherwise - unmuted. * * @see moderateVoiceParticipant() */ - void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else); + void moderateVoiceAllParticipants(bool unmute_everyone); void processSessionUpdate(const LLSD& session_update); @@ -303,7 +317,11 @@ protected: void moderateVoiceSession(const LLUUID& session_id, bool disallow_voice); - LLUUID mReverseVoiceModeratedAvatarID; + /** + * Process all participants to mute/unmute them according to passed voice session state. + */ + void forceVoiceModeratedMode(bool should_be_muted); + }; class LLActiveSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLActiveSpeakerMgr> diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index cc06179481..29237946d2 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -158,7 +158,7 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i mSpeakingIndicators.insert(value_type); speaker_ids_t speakers_uuids; - BOOL is_in_same_voice = LLVoiceClient::getInstance()->findParticipantByID(speaker_id) != NULL; + BOOL is_in_same_voice = LLVoiceClient::getInstance()->isParticipant(speaker_id); speakers_uuids.insert(speaker_id); switchSpeakerIndicators(speakers_uuids, is_in_same_voice); @@ -210,7 +210,7 @@ void SpeakingIndicatorManager::onChange() LL_DEBUGS("SpeakingIndicator") << "Voice participant list was changed, updating indicators" << LL_ENDL; speaker_ids_t speakers_uuids; - LLVoiceClient::getInstance()->getParticipantsUUIDSet(speakers_uuids); + LLVoiceClient::getInstance()->getParticipantList(speakers_uuids); LL_DEBUGS("SpeakingIndicator") << "Switching all OFF, count: " << mSwitchedIndicatorsOn.size() << LL_ENDL; // switch all indicators off diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7ad7799515..6418551517 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -147,7 +147,7 @@ #include "lltrans.h" #include "llui.h" #include "llurldispatcher.h" -#include "llurlsimstring.h" +#include "llslurl.h" #include "llurlhistory.h" #include "llurlwhitelist.h" #include "llvieweraudio.h" @@ -192,6 +192,7 @@ #include "llinventorybridge.h" #include "llappearancemgr.h" #include "llavatariconctrl.h" +#include "llvoicechannel.h" #include "lllogin.h" #include "llevents.h" @@ -224,15 +225,16 @@ extern S32 gStartImageHeight; static bool gGotUseCircuitCodeAck = false; static std::string sInitialOutfit; static std::string sInitialOutfitGender; // "male" or "female" +static boost::signals2::connection sWearablesLoadedCon; static bool gUseCircuitCallbackCalled = false; EStartupState LLStartUp::gStartupState = STATE_FIRST; +LLSLURL LLStartUp::sStartSLURL; -// *NOTE:Mani - to reconcile with giab changes... -static std::string gFirstname; -static std::string gLastname; -static std::string gPassword; +static LLPointer<LLCredential> gUserCredential; +static std::string gDisplayName; +static BOOL gRememberPassword = TRUE; static U64 gFirstSimHandle = 0; static LLHost gFirstSim; @@ -249,7 +251,6 @@ boost::scoped_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener( void login_show(); void login_callback(S32 option, void* userdata); -bool is_hex_string(U8* str, S32 len); void show_first_run_dialog(); bool first_run_dialog_callback(const LLSD& notification, const LLSD& response); void set_startup_status(const F32 frac, const std::string& string, const std::string& msg); @@ -262,6 +263,9 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response); void init_start_screen(S32 location_id); void release_start_screen(); void reset_login(); +LLSD transform_cert_args(LLPointer<LLCertificate> cert); +void general_cert_done(const LLSD& notification, const LLSD& response); +void trust_cert_done(const LLSD& notification, const LLSD& response); void apply_udp_blacklist(const std::string& csv); bool process_login_success_response(); void transition_back_to_login_panel(const std::string& emsg); @@ -364,7 +368,7 @@ bool idle_startup() if ( STATE_FIRST == LLStartUp::getStartupState() ) { - gViewerWindow->showCursor(); + gViewerWindow->showCursor(); gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); ///////////////////////////////////////////////// @@ -381,13 +385,22 @@ bool idle_startup() { LLNotificationsUtil::add("DisplaySetToRecommended"); } + else if ((gSavedSettings.getS32("LastGPUClass") != LLFeatureManager::getInstance()->getGPUClass()) && + (gSavedSettings.getS32("LastGPUClass") != -1)) + { + LLNotificationsUtil::add("DisplaySetToRecommended"); + } else if (!gViewerWindow->getInitAlert().empty()) { LLNotificationsUtil::add(gViewerWindow->getInitAlert()); } gSavedSettings.setS32("LastFeatureVersion", LLFeatureManager::getInstance()->getVersion()); + gSavedSettings.setS32("LastGPUClass", LLFeatureManager::getInstance()->getGPUClass()); + // load dynamic GPU/feature tables from website (S3) + LLFeatureManager::getInstance()->fetchHTTPTables(); + std::string xml_file = LLUI::locateSkin("xui_version.xml"); LLXMLNodePtr root; bool xml_ok = false; @@ -662,69 +675,25 @@ bool idle_startup() // // Log on to system // - if (!LLStartUp::sSLURLCommand.empty()) - { - // this might be a secondlife:///app/login URL - gLoginHandler.parseDirectLogin(LLStartUp::sSLURLCommand); - } - if (!gLoginHandler.getFirstName().empty() - || !gLoginHandler.getLastName().empty() - /*|| !gLoginHandler.getWebLoginKey().isNull()*/ ) - { - // We have at least some login information on a SLURL - gFirstname = gLoginHandler.getFirstName(); - gLastname = gLoginHandler.getLastName(); - LL_DEBUGS("LLStartup") << "STATE_FIRST: setting gFirstname, gLastname from gLoginHandler: '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL; - - // Show the login screen if we don't have everything - show_connect_box = - gFirstname.empty() || gLastname.empty(); - } - else if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) - { - LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); - gFirstname = cmd_line_login[0].asString(); - gLastname = cmd_line_login[1].asString(); - LL_DEBUGS("LLStartup") << "Setting gFirstname, gLastname from gSavedSettings(\"UserLoginInfo\"): '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL; - - LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str()); - char md5pass[33]; /* Flawfinder: ignore */ - pass.hex_digest(md5pass); - gPassword = md5pass; - -#ifdef USE_VIEWER_AUTH - show_connect_box = true; -#else - show_connect_box = false; -#endif - gSavedSettings.setBOOL("AutoLogin", TRUE); - } - else if (gSavedSettings.getBOOL("AutoLogin")) - { - gFirstname = gSavedSettings.getString("FirstName"); - gLastname = gSavedSettings.getString("LastName"); - LL_DEBUGS("LLStartup") << "AutoLogin: setting gFirstname, gLastname from gSavedSettings(\"First|LastName\"): '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL; - gPassword = LLStartUp::loadPasswordFromDisk(); - gSavedSettings.setBOOL("RememberPassword", TRUE); - -#ifdef USE_VIEWER_AUTH - show_connect_box = true; -#else - show_connect_box = false; -#endif + if (gUserCredential.isNull()) + { + gUserCredential = gLoginHandler.initializeLoginInfo(); } - else + if (gUserCredential.isNull()) { - // if not automatically logging in, display login dialog - // a valid grid is selected - gFirstname = gSavedSettings.getString("FirstName"); - gLastname = gSavedSettings.getString("LastName"); - LL_DEBUGS("LLStartup") << "normal login: setting gFirstname, gLastname from gSavedSettings(\"First|LastName\"): '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL; - gPassword = LLStartUp::loadPasswordFromDisk(); - show_connect_box = true; + show_connect_box = TRUE; + } + else if (gSavedSettings.getBOOL("AutoLogin")) + { + gRememberPassword = TRUE; + gSavedSettings.setBOOL("RememberPassword", TRUE); + show_connect_box = false; + } + else + { + gRememberPassword = gSavedSettings.getBOOL("RememberPassword"); + show_connect_box = TRUE; } - - // Go to the next startup state LLStartUp::setStartupState( STATE_BROWSER_INIT ); return FALSE; @@ -756,8 +725,10 @@ bool idle_startup() // Load all the name information out of the login view // NOTE: Hits "Attempted getFields with no login view shown" warning, since we don't // show the login view until login_show() is called below. - // LLPanelLogin::getFields(gFirstname, gLastname, gPassword); - + if (gUserCredential.isNull()) + { + gUserCredential = gLoginHandler.initializeLoginInfo(); + } if (gNoRender) { LL_ERRS("AppInit") << "Need to autologin or use command line with norender!" << LL_ENDL; @@ -768,8 +739,10 @@ bool idle_startup() // Show the login dialog login_show(); // connect dialog is already shown, so fill in the names - LLPanelLogin::setFields( gFirstname, gLastname, gPassword); - + if (gUserCredential.notNull()) + { + LLPanelLogin::setFields( gUserCredential, gRememberPassword); + } LLPanelLogin::giveFocus(); gSavedSettings.setBOOL("FirstRunThisInstall", FALSE); @@ -836,42 +809,39 @@ bool idle_startup() gViewerWindow->moveProgressViewToFront(); //reset the values that could have come in from a slurl - // DEV-42215: Make sure they're not empty -- gFirstname and gLastname + // DEV-42215: Make sure they're not empty -- gUserCredential // might already have been set from gSavedSettings, and it's too bad // to overwrite valid values with empty strings. - if (! gLoginHandler.getFirstName().empty() && ! gLoginHandler.getLastName().empty()) - { - gFirstname = gLoginHandler.getFirstName(); - gLastname = gLoginHandler.getLastName(); - LL_DEBUGS("LLStartup") << "STATE_LOGIN_CLEANUP: setting gFirstname, gLastname from gLoginHandler: '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL; - } if (show_connect_box) { // TODO if not use viewer auth // Load all the name information out of the login view - LLPanelLogin::getFields(&gFirstname, &gLastname, &gPassword); + LLPanelLogin::getFields(gUserCredential, gRememberPassword); // end TODO // HACK: Try to make not jump on login gKeyboard->resetKeys(); } - if (!gFirstname.empty() && !gLastname.empty()) - { - gSavedSettings.setString("FirstName", gFirstname); - gSavedSettings.setString("LastName", gLastname); - - LL_INFOS("AppInit") << "Attempting login as: " << gFirstname << " " << gLastname << LL_ENDL; - gDebugInfo["LoginName"] = gFirstname + " " + gLastname; + // save the credentials + std::string userid = "unknown"; + if(gUserCredential.notNull()) + { + userid = gUserCredential->userID(); + gSecAPIHandler->saveCredential(gUserCredential, gRememberPassword); } - + gSavedSettings.setBOOL("RememberPassword", gRememberPassword); + LL_INFOS("AppInit") << "Attempting login as: " << userid << LL_ENDL; + gDebugInfo["LoginName"] = userid; + // create necessary directories // *FIX: these mkdir's should error check - gDirUtilp->setLindenUserDir(gFirstname, gLastname); + gDirUtilp->setLindenUserDir(userid); LLFile::mkdir(gDirUtilp->getLindenUserDir()); - + // Set PerAccountSettingsFile to the default value. + std::string per_account_settings_file = LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount"); gSavedSettings.setString("PerAccountSettingsFile", gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount"))); @@ -900,9 +870,8 @@ bool idle_startup() { gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath")); } + gDirUtilp->setPerAccountChatLogsDir(userid); - gDirUtilp->setPerAccountChatLogsDir(gFirstname, gLastname); - LLFile::mkdir(gDirUtilp->getChatLogsDir()); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); @@ -923,11 +892,7 @@ bool idle_startup() if (show_connect_box) { - std::string location; - LLPanelLogin::getLocation( location ); - LLURLSimString::setString( location ); - - // END TODO + LLSLURL slurl; LLPanelLogin::closePanel(); } @@ -951,26 +916,21 @@ bool idle_startup() // their last location, or some URL "-url //sim/x/y[/z]" // All accounts have both a home and a last location, and we don't support // more locations than that. Choose the appropriate one. JC - if (LLURLSimString::parse()) - { - // a startup URL was specified - agent_location_id = START_LOCATION_ID_URL; - - // doesn't really matter what location_which is, since - // gAgentStartLookAt will be overwritten when the - // UserLoginLocationReply arrives - location_which = START_LOCATION_ID_LAST; - } - else if (gSavedSettings.getString("LoginLocation") == "last" ) - { - agent_location_id = START_LOCATION_ID_LAST; // last location - location_which = START_LOCATION_ID_LAST; - } - else - { - agent_location_id = START_LOCATION_ID_HOME; // home - location_which = START_LOCATION_ID_HOME; - } + switch (LLStartUp::getStartSLURL().getType()) + { + case LLSLURL::LOCATION: + agent_location_id = START_LOCATION_ID_URL; + location_which = START_LOCATION_ID_LAST; + break; + case LLSLURL::LAST_LOCATION: + agent_location_id = START_LOCATION_ID_LAST; + location_which = START_LOCATION_ID_LAST; + break; + default: + agent_location_id = START_LOCATION_ID_HOME; + location_which = START_LOCATION_ID_HOME; + break; + } gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); @@ -997,7 +957,7 @@ bool idle_startup() if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState()) { - gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); + gDebugInfo["GridName"] = LLGridManager::getInstance()->getGridLabel(); // Update progress status and the display loop. auth_desc = LLTrans::getString("LoginInProgress"); @@ -1021,11 +981,7 @@ bool idle_startup() // This call to LLLoginInstance::connect() starts the // authentication process. - LLSD credentials; - credentials["first"] = gFirstname; - credentials["last"] = gLastname; - credentials["passwd"] = gPassword; - login->connect(credentials); + login->connect(gUserCredential); LLStartUp::setStartupState( STATE_LOGIN_CURL_UNSTUCK ); return FALSE; @@ -1050,10 +1006,11 @@ bool idle_startup() { LL_INFOS("LLStartup") << "Login failed, LLLoginInstance::getResponse(): " << LLLoginInstance::getInstance()->getResponse() << LL_ENDL; + LLSD response = LLLoginInstance::getInstance()->getResponse(); // Still have error conditions that may need some // sort of handling. - std::string reason_response = LLLoginInstance::getInstance()->getResponse("reason"); - std::string message_response = LLLoginInstance::getInstance()->getResponse("message"); + std::string reason_response = response["reason"]; + std::string message_response = response["message"]; if(!message_response.empty()) { @@ -1073,8 +1030,8 @@ bool idle_startup() if(reason_response == "key") { // Couldn't login because user/password is wrong - // Clear the password - gPassword = ""; + // Clear the credential + gUserCredential->clearAuthenticator(); } if(reason_response == "update" @@ -1087,18 +1044,65 @@ bool idle_startup() LLLoginInstance::getInstance()->disconnect(); LLAppViewer::instance()->forceQuit(); } - else + else { - // Don't pop up a notification in the TOS case because - // LLFloaterTOS::onCancel() already scolded the user. - if (reason_response != "tos") + if (reason_response != "tos") { - LLSD args; - args["ERROR_MESSAGE"] = emsg.str(); - LL_INFOS("LLStartup") << "Notification: " << args << LL_ENDL; - LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done); + // Don't pop up a notification in the TOS case because + // LLFloaterTOS::onCancel() already scolded the user. + std::string error_code; + if(response.has("errorcode")) + { + error_code = response["errorcode"].asString(); + } + if ((reason_response == "CURLError") && + (error_code == "SSL_CACERT" || error_code == "SSL_PEER_CERTIFICATE") && + response.has("certificate")) + { + // This was a certificate error, so grab the certificate + // and throw up the appropriate dialog. + LLPointer<LLCertificate> certificate = gSecAPIHandler->getCertificate(response["certificate"]); + if(certificate) + { + LLSD args = transform_cert_args(certificate); + + if(error_code == "SSL_CACERT") + { + // if we are handling an untrusted CA, throw up the dialog + // with the 'trust this CA' button. + LLNotificationsUtil::add("TrustCertificateError", args, response, + trust_cert_done); + + show_connect_box = true; + } + else + { + // the certificate exception returns a unique string for each type of exception. + // we grab this string via the LLUserAuth object, and use that to grab the localized + // string. + args["REASON"] = LLTrans::getString(message_response); + + LLNotificationsUtil::add("GeneralCertificateError", args, response, + general_cert_done); + + reset_login(); + gSavedSettings.setBOOL("AutoLogin", FALSE); + show_connect_box = true; + + } + + } + } + else + { + // This wasn't a certificate error, so throw up the normal + // notificatioin message. + LLSD args; + args["ERROR_MESSAGE"] = emsg.str(); + LL_INFOS("LLStartup") << "Notification: " << args << LL_ENDL; + LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done); + } } - //setup map of datetime strings to codes and slt & local time offset from utc // *TODO: Does this need to be here? LLStringOps::setupDatetimeInfo (false); @@ -1111,7 +1115,12 @@ bool idle_startup() if(process_login_success_response()) { // Pass the user information to the voice chat server interface. - gVoiceClient->userAuthorized(gFirstname, gLastname, gAgentID); + LLVoiceClient::getInstance()->userAuthorized(gUserCredential->userID(), gAgentID); + // create the default proximal channel + LLVoiceChannel::initClass(); + // update the voice settings + LLVoiceClient::getInstance()->updateSettings(); + LLGridManager::getInstance()->setFavorite(); LLStartUp::setStartupState( STATE_WORLD_INIT); } else @@ -1122,6 +1131,7 @@ bool idle_startup() LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done); transition_back_to_login_panel(emsg.str()); show_connect_box = true; + return FALSE; } } return FALSE; @@ -1807,9 +1817,12 @@ bool idle_startup() // thus, do not show this alert. if (!gAgent.isFirstLogin()) { - bool url_ok = LLURLSimString::sInstance.parse(); - if ((url_ok && gAgentStartLocation == "url") || - (!url_ok && ((gAgentStartLocation == gSavedSettings.getString("LoginLocation"))))) + llinfos << "gAgentStartLocation : " << gAgentStartLocation << llendl; + LLSLURL start_slurl = LLStartUp::getStartSLURL(); + + if (((start_slurl.getType() == LLSLURL::LOCATION) && (gAgentStartLocation == "url")) || + ((start_slurl.getType() == LLSLURL::LAST_LOCATION) && (gAgentStartLocation == "last")) || + ((start_slurl.getType() == LLSLURL::HOME_LOCATION) && (gAgentStartLocation == "home"))) { // Start location is OK // Disabled code to restore camera location and focus if logging in to default location @@ -1831,17 +1844,23 @@ bool idle_startup() else { std::string msg; - if (url_ok) + switch(start_slurl.getType()) { - msg = "AvatarMovedDesired"; - } - else if (gSavedSettings.getString("LoginLocation") == "home") - { - msg = "AvatarMovedHome"; - } - else - { - msg = "AvatarMovedLast"; + case LLSLURL::LOCATION: + { + + msg = "AvatarMovedDesired"; + break; + } + case LLSLURL::HOME_LOCATION: + { + msg = "AvatarMovedHome"; + break; + } + default: + { + msg = "AvatarMovedLast"; + } } LLNotificationsUtil::add(msg); } @@ -2057,20 +2076,9 @@ void login_show() #endif LLPanelLogin::show( gViewerWindow->getWindowRectScaled(), - bUseDebugLogin, + bUseDebugLogin || gSavedSettings.getBOOL("SecondLifeEnterprise"), login_callback, NULL ); - // UI textures have been previously loaded in doPreloadImages() - - LL_DEBUGS("AppInit") << "Setting Servers" << LL_ENDL; - - LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel(), LLViewerLogin::getInstance()->getGridChoice()); - - LLViewerLogin* vl = LLViewerLogin::getInstance(); - for(int grid_index = GRID_INFO_ADITI; grid_index < GRID_INFO_OTHER; ++grid_index) - { - LLPanelLogin::addServer(vl->getKnownGridLabel((EGridInfo)grid_index), grid_index); - } } // Callback for when login screen is closed. Option 0 = connect, option 1 = quit. @@ -2086,9 +2094,6 @@ void login_callback(S32 option, void *userdata) } else if (QUIT_OPTION == option) // *TODO: THIS CODE SEEMS TO BE UNREACHABLE!!!!! login_callback is never called with option equal to QUIT_OPTION { - // Make sure we don't save the password if the user is trying to clear it. - std::string first, last, password; - LLPanelLogin::getFields(&first, &last, &password); if (!gSavedSettings.getBOOL("RememberPassword")) { // turn off the setting and write out to disk @@ -2111,142 +2116,6 @@ void login_callback(S32 option, void *userdata) } } - -// static -std::string LLStartUp::loadPasswordFromDisk() -{ - // Only load password if we also intend to save it (otherwise the user - // wonders what we're doing behind his back). JC - BOOL remember_password = gSavedSettings.getBOOL("RememberPassword"); - if (!remember_password) - { - return std::string(""); - } - - std::string hashed_password(""); - - // Look for legacy "marker" password from settings.ini - hashed_password = gSavedSettings.getString("Marker"); - if (!hashed_password.empty()) - { - // Stomp the Marker entry. - gSavedSettings.setString("Marker", ""); - - // Return that password. - return hashed_password; - } - - std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, - "password.dat"); - LLFILE* fp = LLFile::fopen(filepath, "rb"); /* Flawfinder: ignore */ - if (!fp) - { - return hashed_password; - } - - // UUID is 16 bytes, written into ASCII is 32 characters - // without trailing \0 - const S32 HASHED_LENGTH = 32; - U8 buffer[HASHED_LENGTH+1]; - - if (1 != fread(buffer, HASHED_LENGTH, 1, fp)) - { - return hashed_password; - } - - fclose(fp); - - // Decipher with MAC address - LLXORCipher cipher(gMACAddress, 6); - cipher.decrypt(buffer, HASHED_LENGTH); - - buffer[HASHED_LENGTH] = '\0'; - - // Check to see if the mac address generated a bad hashed - // password. It should be a hex-string or else the mac adress has - // changed. This is a security feature to make sure that if you - // get someone's password.dat file, you cannot hack their account. - if(is_hex_string(buffer, HASHED_LENGTH)) - { - hashed_password.assign((char*)buffer); - } - - return hashed_password; -} - - -// static -void LLStartUp::savePasswordToDisk(const std::string& hashed_password) -{ - std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, - "password.dat"); - LLFILE* fp = LLFile::fopen(filepath, "wb"); /* Flawfinder: ignore */ - if (!fp) - { - return; - } - - // Encipher with MAC address - const S32 HASHED_LENGTH = 32; - U8 buffer[HASHED_LENGTH+1]; - - LLStringUtil::copy((char*)buffer, hashed_password.c_str(), HASHED_LENGTH+1); - - LLXORCipher cipher(gMACAddress, 6); - cipher.encrypt(buffer, HASHED_LENGTH); - - if (fwrite(buffer, HASHED_LENGTH, 1, fp) != 1) - { - LL_WARNS("AppInit") << "Short write" << LL_ENDL; - } - - fclose(fp); -} - - -// static -void LLStartUp::deletePasswordFromDisk() -{ - std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, - "password.dat"); - LLFile::remove(filepath); -} - - -bool is_hex_string(U8* str, S32 len) -{ - bool rv = true; - U8* c = str; - while(rv && len--) - { - switch(*c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - ++c; - break; - default: - rv = false; - break; - } - } - return rv; -} - void show_first_run_dialog() { LLNotificationsUtil::add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback); @@ -2288,7 +2157,7 @@ bool login_alert_status(const LLSD& notification, const LLSD& response) // break; case 2: // Teleport // Restart the login process, starting at our home locaton - LLURLSimString::setString("home"); + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME)); LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); break; default: @@ -2508,30 +2377,35 @@ void asset_callback_nothing(LLVFS*, const LLUUID&, LLAssetType::EType, void*, S3 const std::string COMMON_GESTURES_FOLDER = "Common Gestures"; const std::string MALE_GESTURES_FOLDER = "Male Gestures"; const std::string FEMALE_GESTURES_FOLDER = "Female Gestures"; -const std::string MALE_OUTFIT_FOLDER = "Male Shape & Outfit"; -const std::string FEMALE_OUTFIT_FOLDER = "Female Shape & Outfit"; const S32 OPT_CLOSED_WINDOW = -1; const S32 OPT_MALE = 0; const S32 OPT_FEMALE = 1; - +const S32 OPT_TRUST_CERT = 0; +const S32 OPT_CANCEL_TRUST = 1; + bool callback_choose_gender(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +{ + + // These defaults are returned from the server on login. They are set in login.xml. + // If no default is returned from the server, they are retrieved from settings.xml. + + S32 option = LLNotification::getSelectedOption(notification, response); switch(option) { - case OPT_MALE: - LLStartUp::loadInitialOutfit( MALE_OUTFIT_FOLDER, "male" ); - break; - - case OPT_FEMALE: - case OPT_CLOSED_WINDOW: - default: - LLStartUp::loadInitialOutfit( FEMALE_OUTFIT_FOLDER, "female" ); - break; + case OPT_MALE: + LLStartUp::loadInitialOutfit( gSavedSettings.getString("DefaultMaleAvatar"), "male" ); + break; + + case OPT_FEMALE: + case OPT_CLOSED_WINDOW: + default: + LLStartUp::loadInitialOutfit( gSavedSettings.getString("DefaultFemaleAvatar"), "female" ); + break; } return false; } + void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ) { @@ -2566,6 +2440,8 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, } else { + sWearablesLoadedCon = gAgentWearables.addLoadedCallback(LLStartUp::saveInitialOutfit); + bool do_copy = true; bool do_append = false; LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); @@ -2611,6 +2487,24 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, } +//static +void LLStartUp::saveInitialOutfit() +{ + if (sInitialOutfit.empty()) return; + + if (sWearablesLoadedCon.connected()) + { + sWearablesLoadedCon.disconnect(); + } + + LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit); +} + +std::string& LLStartUp::getInitialOutfitName() +{ + return sInitialOutfit; +} + // Loads a bitmap to display during load void init_start_screen(S32 location_id) { @@ -2746,7 +2640,6 @@ void reset_login() //--------------------------------------------------------------------------- -std::string LLStartUp::sSLURLCommand; bool LLStartUp::canGoFullscreen() { @@ -2779,41 +2672,146 @@ void LLStartUp::fontInit() bool LLStartUp::dispatchURL() { // ok, if we've gotten this far and have a startup URL - if (!sSLURLCommand.empty()) + if (!getStartSLURL().isValid()) { - LLMediaCtrl* web = NULL; - const bool trusted_browser = false; - LLURLDispatcher::dispatch(sSLURLCommand, web, trusted_browser); + return false; } - else if (LLURLSimString::parse()) - { + if(getStartSLURL().getType() != LLSLURL::APP) + { + // If we started with a location, but we're already // at that location, don't pop dialogs open. LLVector3 pos = gAgent.getPositionAgent(); - F32 dx = pos.mV[VX] - (F32)LLURLSimString::sInstance.mX; - F32 dy = pos.mV[VY] - (F32)LLURLSimString::sInstance.mY; + LLVector3 slurlpos = getStartSLURL().getPosition(); + F32 dx = pos.mV[VX] - slurlpos.mV[VX]; + F32 dy = pos.mV[VY] - slurlpos.mV[VY]; const F32 SLOP = 2.f; // meters - if( LLURLSimString::sInstance.mSimName != gAgent.getRegion()->getName() + if( getStartSLURL().getRegion() != gAgent.getRegion()->getName() || (dx*dx > SLOP*SLOP) || (dy*dy > SLOP*SLOP) ) { - std::string url = LLURLSimString::getURL(); - LLMediaCtrl* web = NULL; - const bool trusted_browser = false; - LLURLDispatcher::dispatch(url, web, trusted_browser); + LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), + NULL, false); } return true; } return false; } +void LLStartUp::setStartSLURL(const LLSLURL& slurl) +{ + sStartSLURL = slurl; + switch(slurl.getType()) + { + case LLSLURL::HOME_LOCATION: + { + gSavedSettings.setString("LoginLocation", LLSLURL::SIM_LOCATION_HOME); + break; + } + case LLSLURL::LAST_LOCATION: + { + gSavedSettings.setString("LoginLocation", LLSLURL::SIM_LOCATION_LAST); + break; + } + default: + LLGridManager::getInstance()->setGridChoice(slurl.getGrid()); + break; + } +} + bool login_alert_done(const LLSD& notification, const LLSD& response) { LLPanelLogin::giveFocus(); return false; } +// parse the certificate information into args for the +// certificate notifications +LLSD transform_cert_args(LLPointer<LLCertificate> cert) +{ + LLSD args = LLSD::emptyMap(); + std::string value; + LLSD cert_info; + cert->getLLSD(cert_info); + // convert all of the elements in the cert into + // args for the xml dialog, so we have flexability to + // display various parts of the cert by only modifying + // the cert alert dialog xml. + for(LLSD::map_iterator iter = cert_info.beginMap(); + iter != cert_info.endMap(); + iter++) + { + // key usage and extended key usage + // are actually arrays, and we want to format them as comma separated + // strings, so special case those. + LLSDSerialize::toXML(cert_info[iter->first], std::cout); + if((iter->first== std::string(CERT_KEY_USAGE)) | + (iter->first == std::string(CERT_EXTENDED_KEY_USAGE))) + { + value = ""; + LLSD usage = cert_info[iter->first]; + for (LLSD::array_iterator usage_iter = usage.beginArray(); + usage_iter != usage.endArray(); + usage_iter++) + { + + if(usage_iter != usage.beginArray()) + { + value += ", "; + } + + value += (*usage_iter).asString(); + } + + } + else + { + value = iter->second.asString(); + } + + std::string name = iter->first; + std::transform(name.begin(), name.end(), name.begin(), + (int(*)(int))toupper); + args[name.c_str()] = value; + } + return args; +} + + +// when we handle a cert error, give focus back to the login panel +void general_cert_done(const LLSD& notification, const LLSD& response) +{ + LLStartUp::setStartupState( STATE_LOGIN_SHOW ); + LLPanelLogin::giveFocus(); +} + +// check to see if the user wants to trust the cert. +// if they do, add it to the cert store and +void trust_cert_done(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + switch(option) + { + case OPT_TRUST_CERT: + { + LLPointer<LLCertificate> cert = gSecAPIHandler->getCertificate(notification["payload"]["certificate"]); + LLPointer<LLCertificateStore> store = gSecAPIHandler->getCertificateStore(gSavedSettings.getString("CertStore")); + store->add(cert); + store->save(); + LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); + break; + } + case OPT_CANCEL_TRUST: + reset_login(); + gSavedSettings.setBOOL("AutoLogin", FALSE); + LLStartUp::setStartupState( STATE_LOGIN_SHOW ); + default: + LLPanelLogin::giveFocus(); + break; + } + +} void apply_udp_blacklist(const std::string& csv) { @@ -2861,33 +2859,45 @@ bool process_login_success_response() text = response["secure_session_id"].asString(); if(!text.empty()) gAgent.mSecureSessionID.set(text); - text = response["first_name"].asString(); - if(!text.empty()) + // if the response contains a display name, use that, + // otherwise if the response contains a first and/or last name, + // use those. Otherwise use the credential identifier + + gDisplayName = ""; + if (response.has("display_name")) { - // Remove quotes from string. Login.cgi sends these to force - // names that look like numbers into strings. - gFirstname.assign(text); - LLStringUtil::replaceChar(gFirstname, '"', ' '); - LLStringUtil::trim(gFirstname); + gDisplayName.assign(response["display_name"].asString()); + if(!gDisplayName.empty()) + { + // Remove quotes from string. Login.cgi sends these to force + // names that look like numbers into strings. + LLStringUtil::replaceChar(gDisplayName, '"', ' '); + LLStringUtil::trim(gDisplayName); + } } - text = response["last_name"].asString(); - if(!text.empty()) + if(gDisplayName.empty()) { - gLastname.assign(text); - } - gSavedSettings.setString("FirstName", gFirstname); - gSavedSettings.setString("LastName", gLastname); - - if (gSavedSettings.getBOOL("RememberPassword")) - { - // Successful login means the password is valid, so save it. - LLStartUp::savePasswordToDisk(gPassword); + if(response.has("first_name")) + { + gDisplayName.assign(response["first_name"].asString()); + LLStringUtil::replaceChar(gDisplayName, '"', ' '); + LLStringUtil::trim(gDisplayName); + } + if(response.has("last_name")) + { + text.assign(response["last_name"].asString()); + LLStringUtil::replaceChar(text, '"', ' '); + LLStringUtil::trim(text); + if(!gDisplayName.empty()) + { + gDisplayName += " "; + } + gDisplayName += text; + } } - else + if(gDisplayName.empty()) { - // Don't leave password from previous session sitting around - // during this login session. - LLStartUp::deletePasswordFromDisk(); + gDisplayName.assign(gUserCredential->asString()); } // this is their actual ability to access content @@ -2981,7 +2991,7 @@ bool process_login_success_response() // replace the default help URL format gSavedSettings.setString("HelpURLFormat",text); - // don't fall back to Nebraska's pre-connection static help + // don't fall back to Standalone's pre-connection static help gSavedSettings.setBOOL("HelpUseLocal", false); } @@ -3044,6 +3054,37 @@ bool process_login_success_response() LLStringOps::setupDatetimeInfo(pacific_daylight_time); } + // set up the voice configuration. Ultimately, we should pass this up as part of each voice + // channel if we need to move to multiple voice servers per grid. + LLSD voice_config_info = response["voice-config"]; + if(voice_config_info.has("VoiceServerType")) + { + gSavedSettings.setString("VoiceServerType", voice_config_info["VoiceServerType"].asString()); + } + + // Request the map server url + std::string map_server_url = response["map-server-url"]; + if(!map_server_url.empty()) + { + gSavedSettings.setString("MapServerURL", map_server_url); + } + + // Default male and female avatars allowing the user to choose their avatar on first login. + // These may be passed up by SLE to allow choice of enterprise avatars instead of the standard + // "new ruth." Not to be confused with 'initial-outfit' below + LLSD newuser_config = response["newuser-config"][0]; + if(newuser_config.has("DefaultFemaleAvatar")) + { + gSavedSettings.setString("DefaultFemaleAvatar", newuser_config["DefaultFemaleAvatar"].asString()); + } + if(newuser_config.has("DefaultMaleAvatar")) + { + gSavedSettings.setString("DefaultMaleAvatar", newuser_config["DefaultMaleAvatar"].asString()); + } + + // Initial outfit for the user. + // QUESTION: Why can't we simply simply set the users outfit directly + // from a web page into the user info on the server? - Roxie LLSD initial_outfit = response["initial-outfit"][0]; if(initial_outfit.size()) { @@ -3097,7 +3138,7 @@ bool process_login_success_response() bool success = false; // JC: gesture loading done below, when we have an asset system - // in place. Don't delete/clear user_credentials until then. + // in place. Don't delete/clear gUserCredentials until then. if(gAgentID.notNull() && gAgentSessionID.notNull() && gMessageSystem->mOurCircuitCode diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index 92fe9521d3..e1e108ca6a 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -38,6 +38,7 @@ class LLViewerTexture ; class LLEventPump; class LLStartupListener; +class LLSLURL; // functions bool idle_startup(); @@ -101,26 +102,22 @@ public: static void loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ); - // Load MD5 of user's password from local disk file. - static std::string loadPasswordFromDisk(); - - // Record MD5 of user's password for subsequent login. - static void savePasswordToDisk(const std::string& hashed_password); - - // Delete the saved password local disk file. - static void deletePasswordFromDisk(); + //save loaded initial outfit into My Outfits category + static void saveInitialOutfit(); + + static std::string& getInitialOutfitName(); static bool dispatchURL(); // if we have a SLURL or sim string ("Ahern/123/45") that started // the viewer, dispatch it - static std::string sSLURLCommand; - // *HACK: On startup, if we were passed a secondlife://app/do/foo - // command URL, store it for later processing. - static void postStartupState(); + static void setStartSLURL(const LLSLURL& slurl); + static LLSLURL& getStartSLURL() { return sStartSLURL; } private: + static LLSLURL sStartSLURL; + static std::string startupStateToString(EStartupState state); static EStartupState gStartupState; // Do not set directly, use LLStartup::setStartupState static boost::scoped_ptr<LLEventPump> sStateWatcher; diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index b660a2b8ea..5628205dd4 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -41,6 +41,7 @@ #include "llcommandhandler.h" #include "llviewercontrol.h" #include "llfloaterbuycurrency.h" +#include "llbuycurrencyhtml.h" #include "llfloaterlagmeter.h" #include "llpanelnearbymedia.h" #include "llpanelvolumepulldown.h" @@ -509,7 +510,9 @@ S32 LLStatusBar::getSquareMetersLeft() const void LLStatusBar::onClickBuyCurrency() { - LLFloaterBuyCurrency::buyCurrency(); + // open a currency floater - actual one open depends on + // value specified in settings.xml + LLBuyCurrencyHTML::openCurrencyFloater(); } static void onClickHealth(void* ) diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp index 61705c4eb3..8fab3bb361 100644 --- a/indra/newview/llstylemap.cpp +++ b/indra/newview/llstylemap.cpp @@ -51,7 +51,7 @@ const LLStyle::Params &LLStyleMap::lookupAgent(const LLUUID &source) style_params.color.control = "HTMLLinkColor"; style_params.readonly_color.control = "HTMLLinkColor"; style_params.link_href = - LLSLURL::buildCommand("agent", source, "inspect"); + LLSLURL("agent", source, "inspect").getSLURLString(); } else { diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index cbb030836e..cb65756764 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -56,14 +56,11 @@ LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(N mChannel(NULL), mMessageList(NULL), mSysWellChiclet(NULL), - mSeparator(NULL), NOTIFICATION_WELL_ANCHOR_NAME("notification_well_panel"), IM_WELL_ANCHOR_NAME("im_well_panel"), mIsReshapedByUser(false) { - mTypedItemsCount[IT_NOTIFICATION] = 0; - mTypedItemsCount[IT_INSTANT_MESSAGE] = 0; setOverlapsScreenChannel(true); } @@ -75,18 +72,6 @@ BOOL LLSysWellWindow::postBuild() // get a corresponding channel initChannel(); - LLPanel::Params params; - mSeparator = LLUICtrlFactory::create<LLPanel>(params); - LLUICtrlFactory::instance().buildPanel(mSeparator, "panel_separator.xml"); - - LLRect rc = mSeparator->getRect(); - rc.setOriginAndSize(0, 0, mMessageList->getItemsRect().getWidth(), rc.getHeight()); - mSeparator->setRect(rc); - mSeparator->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP); - mSeparator->setVisible(FALSE); - - mMessageList->addItem(mSeparator); - // click on SysWell Window should clear "new message" state (and 'Lit' status). EXT-3147. // mouse up callback is not called in this case. setMouseDownCallback(boost::bind(&LLSysWellWindow::releaseNewMessagesState, this)); @@ -130,7 +115,7 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id) { if(mMessageList->removeItemByValue(id)) { - handleItemRemoved(IT_NOTIFICATION); + mSysWellChiclet->updateWidget(isWindowEmpty()); reshapeWindow(); } else @@ -258,76 +243,7 @@ void LLSysWellWindow::releaseNewMessagesState() //--------------------------------------------------------------------------------- bool LLSysWellWindow::isWindowEmpty() { - // keep in mind, mSeparator is always in the list - return mMessageList->size() == 1; -} - -// *TODO: mantipov: probably is deprecated -void LLSysWellWindow::handleItemAdded(EItemType added_item_type) -{ - bool should_be_shown = ++mTypedItemsCount[added_item_type] == 1 && anotherTypeExists(added_item_type); - - if (should_be_shown && !mSeparator->getVisible()) - { - mSeparator->setVisible(TRUE); - - // refresh list to recalculate mSeparator position - mMessageList->reshape(mMessageList->getRect().getWidth(), mMessageList->getRect().getHeight()); - } - - //fix for EXT-3254 - //set limits for min_height. - S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight(); - - std::vector<LLPanel*> items; - mMessageList->getItems(items); - - if(items.size()>1)//first item is separator - { - S32 min_height; - S32 min_width; - getResizeLimits(&min_width,&min_height); - - min_height = items[1]->getRect().getHeight() + 2 * mMessageList->getBorderWidth() + parent_list_delta_height; - - setResizeLimits(min_width,min_height); - } - mSysWellChiclet->updateWidget(isWindowEmpty()); -} - -void LLSysWellWindow::handleItemRemoved(EItemType removed_item_type) -{ - bool should_be_hidden = --mTypedItemsCount[removed_item_type] == 0; - - if (should_be_hidden && mSeparator->getVisible()) - { - mSeparator->setVisible(FALSE); - - // refresh list to recalculate mSeparator position - mMessageList->reshape(mMessageList->getRect().getWidth(), mMessageList->getRect().getHeight()); - } - mSysWellChiclet->updateWidget(isWindowEmpty()); -} - -bool LLSysWellWindow::anotherTypeExists(EItemType item_type) -{ - bool exists = false; - switch(item_type) - { - case IT_INSTANT_MESSAGE: - if (mTypedItemsCount[IT_NOTIFICATION] > 0) - { - exists = true; - } - break; - case IT_NOTIFICATION: - if (mTypedItemsCount[IT_INSTANT_MESSAGE] > 0) - { - exists = true; - } - break; - } - return exists; + return mMessageList->size() == 0; } /************************************************************************/ @@ -559,8 +475,7 @@ void LLNotificationWellWindow::addItem(LLSysWellItem::Params p) LLSysWellItem* new_item = new LLSysWellItem(p); if (mMessageList->addItem(new_item, value, ADD_TOP)) { - handleItemAdded(IT_NOTIFICATION); - + mSysWellChiclet->updateWidget(isWindowEmpty()); reshapeWindow(); new_item->setOnItemCloseCallback(boost::bind(&LLNotificationWellWindow::onItemClose, this, _1)); @@ -755,9 +670,9 @@ void LLIMWellWindow::addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId) { RowPanel* item = new RowPanel(this, sessionId, chicletCounter, name, otherParticipantId); - if (mMessageList->insertItemAfter(mSeparator, item, sessionId)) + if (mMessageList->addItem(item, sessionId)) { - handleItemAdded(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { @@ -782,7 +697,7 @@ void LLIMWellWindow::delIMRow(const LLUUID& sessionId) if (mMessageList->removeItemByValue(sessionId)) { - handleItemRemoved(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { @@ -810,9 +725,9 @@ void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_messag if (mMessageList->getItemByValue(notification_id) == NULL) { ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message); - if (mMessageList->insertItemAfter(mSeparator, item, notification_id)) + if (mMessageList->addItem(item, notification_id)) { - handleItemAdded(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { @@ -827,7 +742,7 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) { if (mMessageList->removeItemByValue(notification_id)) { - handleItemRemoved(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 296bdf7482..c8215c71ee 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -82,20 +82,12 @@ public: protected: - typedef enum{ - IT_NOTIFICATION, - IT_INSTANT_MESSAGE - }EItemType; - // gets a rect that bounds possible positions for the SysWellWindow on a screen (EXT-1111) void getAllowedRect(LLRect& rect); // init Window's channel virtual void initChannel(); - void handleItemAdded(EItemType added_item_type); - void handleItemRemoved(EItemType removed_item_type); - bool anotherTypeExists(EItemType item_type) ; const std::string NOTIFICATION_WELL_ANCHOR_NAME; const std::string IM_WELL_ANCHOR_NAME; @@ -113,15 +105,6 @@ protected: */ LLSysWellChiclet* mSysWellChiclet; - /** - * Special panel which is used as separator of Notifications & IM Rows. - * It is always presents in the list and shown when it is necessary. - * It should be taken into account when reshaping and checking list size - */ - LLPanel* mSeparator; - - typedef std::map<EItemType, S32> typed_items_count_t; - typed_items_count_t mTypedItemsCount; bool mIsReshapedByUser; }; diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 4262264a1d..7290849fca 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -37,6 +37,7 @@ #include "llagent.h" #include "llimagej2c.h" #include "llimagetga.h" +#include "llnotificationsutil.h" #include "llvfile.h" #include "llvfs.h" #include "llviewerstats.h" @@ -49,6 +50,7 @@ #include "llui.h" #include "llagentwearables.h" #include "llwearable.h" +#include "llviewercontrol.h" #include "llviewervisualparam.h" //#include "../tools/imdebug/imdebug.h" @@ -60,10 +62,12 @@ using namespace LLVOAvatarDefines; //----------------------------------------------------------------------------- LLBakedUploadData::LLBakedUploadData(const LLVOAvatarSelf* avatar, LLTexLayerSet* layerset, - const LLUUID& id) : + const LLUUID& id, + BOOL highest_lod) : mAvatar(avatar), mTexLayerSet(layerset), mID(id), + mHighestLOD(highest_lod), mStartTime(LLFrameTimer::getTotalTime()) // Record starting time { } @@ -80,12 +84,14 @@ LLTexLayerSetBuffer::LLTexLayerSetBuffer(LLTexLayerSet* const owner, S32 width, S32 height) : // ORDER_LAST => must render these after the hints are created. LLViewerDynamicTexture( width, height, 4, LLViewerDynamicTexture::ORDER_LAST, TRUE ), - mNeedsUpdate( TRUE ), - mNeedsUpload( FALSE ), - mUploadPending( FALSE ), // Not used for any logic here, just to sync sending of updates + mNeedsUpdate(TRUE), + mNeedsUpload(FALSE), + mUploadPending(FALSE), // Not used for any logic here, just to sync sending of updates + mNeedsLowResUpload(TRUE), mTexLayerSet(owner) { LLTexLayerSetBuffer::sGLByteCount += getSize(); + mNeedsUploadTimer.start(); } LLTexLayerSetBuffer::~LLTexLayerSetBuffer() @@ -125,7 +131,6 @@ void LLTexLayerSetBuffer::dumpTotalByteCount() void LLTexLayerSetBuffer::requestUpdate() { mNeedsUpdate = TRUE; - // If we're in the middle of uploading a baked texture, we don't care about it any more. // When it's downloaded, ignore it. mUploadID.setNull(); @@ -133,20 +138,24 @@ void LLTexLayerSetBuffer::requestUpdate() void LLTexLayerSetBuffer::requestUpload() { - if (!mNeedsUpload) + // If we requested a new upload but haven't even uploaded + // a low res version of our last upload request, then + // keep the timer ticking instead of resetting it. + if (mNeedsUpload && mNeedsLowResUpload) { - mNeedsUpload = TRUE; - mUploadPending = TRUE; + mNeedsUploadTimer.reset(); } + mNeedsUpload = TRUE; + mNeedsLowResUpload = TRUE; + mUploadPending = TRUE; + mNeedsUploadTimer.unpause(); } void LLTexLayerSetBuffer::cancelUpload() { - if (mNeedsUpload) - { - mNeedsUpload = FALSE; - } + mNeedsUpload = FALSE; mUploadPending = FALSE; + mNeedsUploadTimer.pause(); } void LLTexLayerSetBuffer::pushProjection() const @@ -174,11 +183,12 @@ BOOL LLTexLayerSetBuffer::needsRender() { llassert(mTexLayerSet->getAvatar() == gAgentAvatarp); if (!isAgentAvatarValid()) return FALSE; - BOOL upload_now = mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal() && gAgentQueryManager.hasNoPendingQueries(); + + const BOOL upload_now = isReadyToUpload(); BOOL needs_update = (mNeedsUpdate || upload_now) && !gAgentAvatarp->mAppearanceAnimating; if (needs_update) { - BOOL invalid_skirt = gAgentAvatarp->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(WT_SKIRT); + BOOL invalid_skirt = gAgentAvatarp->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(LLWearableType::WT_SKIRT); if (invalid_skirt) { // we were trying to create a skirt texture @@ -191,6 +201,7 @@ BOOL LLTexLayerSetBuffer::needsRender() needs_update &= mTexLayerSet->isLocalTextureDataAvailable(); } } + return needs_update; } @@ -217,7 +228,7 @@ BOOL LLTexLayerSetBuffer::render() // do we need to upload, and do we have sufficient data to create an uploadable composite? // When do we upload the texture if gAgent.mNumPendingQueries is non-zero? - BOOL upload_now = (gAgentQueryManager.hasNoPendingQueries() && mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal()); + const BOOL upload_now = isReadyToUpload(); BOOL success = TRUE; @@ -226,23 +237,25 @@ BOOL LLTexLayerSetBuffer::render() success &= mTexLayerSet->render( mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight ); gGL.flush(); - if( upload_now ) + if(upload_now) { if (!success) { - llinfos << "Failed attempt to bake " << mTexLayerSet->getBodyRegion() << llendl; + llinfos << "Failed attempt to bake " << mTexLayerSet->getBodyRegionName() << llendl; mUploadPending = FALSE; } else { if (mTexLayerSet->isVisible()) { + mTexLayerSet->getAvatar()->debugBakedTextureUpload(mTexLayerSet->getBakedTexIndex(), FALSE); // FALSE for start of upload, TRUE for finish. readBackAndUpload(); } else { mUploadPending = FALSE; mNeedsUpload = FALSE; + mNeedsUploadTimer.pause(); mTexLayerSet->getAvatar()->setNewBakedTexture(mTexLayerSet->getBakedTexIndex(),IMG_INVISIBLE); } } @@ -264,6 +277,26 @@ bool LLTexLayerSetBuffer::isInitialized(void) const return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated(); } +BOOL LLTexLayerSetBuffer::isReadyToUpload() const +{ + if (!mNeedsUpload) return FALSE; // Don't need to upload if we haven't requested one. + if (!gAgentQueryManager.hasNoPendingQueries()) return FALSE; // Can't upload if there are pending queries. + + // If we requested an upload and have the final LOD ready, then upload. + const BOOL can_highest_lod = mTexLayerSet->isLocalTextureDataFinal(); + if (can_highest_lod) return TRUE; + + const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureTimeout"); + if (texture_timeout) + { + // If we hit our timeout and have textures available at even lower resolution, then upload. + const BOOL is_upload_textures_timeout = mNeedsUploadTimer.getElapsedTimeF32() >= texture_timeout; + const BOOL has_lower_lod = mTexLayerSet->isLocalTextureDataAvailable(); + if (has_lower_lod && is_upload_textures_timeout && mNeedsLowResUpload) return TRUE; + } + return FALSE; +} + BOOL LLTexLayerSetBuffer::updateImmediate() { mNeedsUpdate = TRUE; @@ -287,7 +320,7 @@ void LLTexLayerSetBuffer::readBackAndUpload() glReadPixels(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_color_data ); stop_glerror(); - llinfos << "Baked " << mTexLayerSet->getBodyRegion() << llendl; + llinfos << "Baked " << mTexLayerSet->getBodyRegionName() << llendl; LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES); // We won't need our caches since we're baked now. (Techically, we won't @@ -354,9 +387,12 @@ void LLTexLayerSetBuffer::readBackAndUpload() if( valid ) { + const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal(); // baked_upload_data is owned by the responder and deleted after the request completes - LLBakedUploadData* baked_upload_data = - new LLBakedUploadData(gAgentAvatarp, this->mTexLayerSet, asset_id); + LLBakedUploadData* baked_upload_data = new LLBakedUploadData(gAgentAvatarp, + this->mTexLayerSet, + asset_id, + highest_lod); mUploadID = asset_id; // upload the image @@ -383,8 +419,28 @@ void LLTexLayerSetBuffer::readBackAndUpload() TRUE, // is_priority TRUE); // store_local } + + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + std::string lod_str = highest_lod ? "HighRes" : "LowRes"; + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); + args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); + args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); + args["RESOLUTION"] = lod_str; + LLNotificationsUtil::add("AvatarRezSelfBakeNotification",args); + llinfos << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl; + } - mNeedsUpload = FALSE; + if (highest_lod) + { + mNeedsUpload = FALSE; + mNeedsUploadTimer.pause(); + } + else + { + mNeedsLowResUpload = FALSE; + } } else { @@ -413,12 +469,11 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, { LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata; - if (0 == result && + if ((result == 0) && isAgentAvatarValid() && !gAgentAvatarp->isDead() && - baked_upload_data->mAvatar == gAgentAvatarp && // Sanity check: only the user's avatar should be uploading textures. - baked_upload_data->mTexLayerSet->hasComposite() - ) + (baked_upload_data->mAvatar == gAgentAvatarp) && // Sanity check: only the user's avatar should be uploading textures. + (baked_upload_data->mTexLayerSet->hasComposite())) { LLTexLayerSetBuffer* layerset_buffer = baked_upload_data->mTexLayerSet->getComposite(); @@ -437,10 +492,9 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, { // This is the upload we're currently waiting for. layerset_buffer->mUploadID.setNull(); - layerset_buffer->mUploadPending = FALSE; - if (result >= 0) { + layerset_buffer->mUploadPending = FALSE; LLVOAvatarDefines::ETextureIndex baked_te = gAgentAvatarp->getBakedTE(layerset_buffer->mTexLayerSet); // Update baked texture info with the new UUID U64 now = LLFrameTimer::getTotalTime(); // Record starting time @@ -757,7 +811,7 @@ BOOL LLTexLayerSet::isBodyRegion(const std::string& region) const return mInfo->mBodyRegion == region; } -const std::string LLTexLayerSet::getBodyRegion() const +const std::string LLTexLayerSet::getBodyRegionName() const { return mInfo->mBodyRegion; } @@ -787,7 +841,7 @@ void LLTexLayerSet::cancelUpload() void LLTexLayerSet::createComposite() { - if( !mComposite ) + if(!mComposite) { S32 width = mInfo->mWidth; S32 height = mInfo->mHeight; @@ -822,7 +876,15 @@ void LLTexLayerSet::updateComposite() LLTexLayerSetBuffer* LLTexLayerSet::getComposite() { - createComposite(); + if (!mComposite) + { + createComposite(); + } + return mComposite; +} + +const LLTexLayerSetBuffer* LLTexLayerSet::getComposite() const +{ return mComposite; } @@ -1030,7 +1092,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) } if (mLocalTexture == TEX_NUM_INDICES) { - llwarns << "<texture> element has invalid local_texure attribute: " << mName << " " << local_texture_name << llendl; + llwarns << "<texture> element has invalid local_texture attribute: " << mName << " " << local_texture_name << llendl; return FALSE; } } @@ -1848,7 +1910,7 @@ U32 LLTexLayerTemplate::updateWearableCache() //this isn't a cloneable layer return 0; } - EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)te); + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)te); U32 num_wearables = gAgentWearables.getWearableCount(wearable_type); U32 added = 0; for (U32 i = 0; i < num_wearables; i++) @@ -2168,4 +2230,16 @@ BOOL LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLIma return success; } +const std::string LLTexLayerSetBuffer::dumpTextureInfo() const +{ + if (!isAgentAvatarValid()) return ""; + const BOOL is_high_res = !mNeedsUpload; + const BOOL is_low_res = !mNeedsLowResUpload; + const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); + const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); + std::string text = llformat("[ HiRes:%d LoRes:%d Timer:%d ] %s", + is_high_res, is_low_res, upload_time, + local_texture_info.c_str()); + return text; +} diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index ae280dd063..8f386b5a19 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -253,6 +253,7 @@ public: BOOL isBodyRegion(const std::string& region) const; LLTexLayerSetBuffer* getComposite(); + const LLTexLayerSetBuffer* getComposite() const; // Do not create one if it doesn't exist. void requestUpdate(); void requestUpload(); void cancelUpload(); @@ -272,7 +273,7 @@ public: void cloneTemplates(LLLocalTextureObject *lto, LLVOAvatarDefines::ETextureIndex tex_index, LLWearable* wearable); LLVOAvatarSelf* getAvatar() const { return mAvatar; } - const std::string getBodyRegion() const; + const std::string getBodyRegionName() const; BOOL hasComposite() const { return (mComposite.notNull()); } LLVOAvatarDefines::EBakedTextureIndex getBakedTexIndex() { return mBakedTexIndex; } void setBakedTexIndex( LLVOAvatarDefines::EBakedTextureIndex index) { mBakedTexIndex = index; } @@ -344,22 +345,29 @@ public: S32 result, LLExtStat ext_status); static void dumpTotalByteCount(); + const std::string dumpTextureInfo() const; + virtual void restoreGLTexture(); virtual void destroyGLTexture(); -private: +protected: void pushProjection() const; void popProjection() const; - + BOOL isReadyToUpload() const; + private: LLTexLayerSet* const mTexLayerSet; - BOOL mNeedsUpdate; - BOOL mNeedsUpload; - BOOL mUploadPending; - LLUUID mUploadID; // Identifys the current upload process (null if none). Used to avoid overlaps (eg, when the user rapidly makes two changes outside of Face Edit) + BOOL mNeedsUpdate; // Whether we need to update our baked textures + BOOL mNeedsUpload; // Whether we need to send our baked textures to the server + BOOL mNeedsLowResUpload; // Whether we have sent a lowres version of our baked textures to the server + BOOL mUploadPending; // Whether we have received back the new baked textures + LLUUID mUploadID; // Identifies the current upload process (null if none). Used to avoid overlaps (eg, when the user rapidly makes two changes outside of Face Edit) static S32 sGLByteCount; + + LLFrameTimer mNeedsUploadTimer; // Tracks time since upload was requested + }; // @@ -404,13 +412,18 @@ private: class LLBakedUploadData { public: - LLBakedUploadData(const LLVOAvatarSelf* avatar, LLTexLayerSet* layerset, const LLUUID& id); + LLBakedUploadData(const LLVOAvatarSelf* avatar, + LLTexLayerSet* layerset, + const LLUUID& id, + BOOL highest_lod); ~LLBakedUploadData() {} const LLUUID mID; const LLVOAvatarSelf* mAvatar; // just backlink, don't LLPointer LLTexLayerSet* mTexLayerSet; const U64 mStartTime; // Used to measure time baked texture upload requires + BOOL mHighestLOD; + }; diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp index 5e5d344461..35acf883c7 100644 --- a/indra/newview/lltexlayerparams.cpp +++ b/indra/newview/lltexlayerparams.cpp @@ -234,8 +234,8 @@ BOOL LLTexLayerParamAlpha::getSkip() const } } - EWearableType type = (EWearableType)getWearableType(); - if ((type != WT_INVALID) && !avatar->isWearingWearableType(type)) + LLWearableType::EType type = (LLWearableType::EType)getWearableType(); + if ((type != LLWearableType::WT_INVALID) && !avatar->isWearingWearableType(type)) { return TRUE; } diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index df79725474..9ad2322765 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -401,7 +401,8 @@ bool LLTextureCacheRemoteWorker::doRead() // Second state / stage : identify the cache or not... if (!done && (mState == CACHE)) { - idx = mCache->getHeaderCacheEntry(mID, mImageSize); + LLTextureCache::Entry entry ; + idx = mCache->getHeaderCacheEntry(mID, entry); if (idx < 0) { // The texture is *not* cached. We're done here... @@ -410,6 +411,7 @@ bool LLTextureCacheRemoteWorker::doRead() } else { + mImageSize = entry.mImageSize ; // If the read offset is bigger than the header cache, we read directly from the body // Note that currently, we *never* read with offset from the cache, so the result is *always* HEADER mState = mOffset < TEXTURE_CACHE_ENTRY_SIZE ? HEADER : BODY; @@ -531,13 +533,14 @@ bool LLTextureCacheRemoteWorker::doRead() bool LLTextureCacheRemoteWorker::doWrite() { bool done = false; - S32 idx = -1; + S32 idx = -1; // First state / stage : check that what we're trying to cache is in an OK shape if (mState == INIT) { llassert_always(mOffset == 0); // We currently do not support write offsets llassert_always(mDataSize > 0); // Things will go badly wrong if mDataSize is nul or negative... + llassert_always(mImageSize >= mDataSize); mState = CACHE; } @@ -547,14 +550,19 @@ bool LLTextureCacheRemoteWorker::doWrite() if (!done && (mState == CACHE)) { bool alreadyCached = false; - S32 cur_imagesize = 0; + LLTextureCache::Entry entry ; + // Checks if this image is already in the entry list - idx = mCache->getHeaderCacheEntry(mID, cur_imagesize); - if (idx >= 0 && (cur_imagesize > 0)) + idx = mCache->getHeaderCacheEntry(mID, entry); + if(idx < 0) + { + idx = mCache->setHeaderCacheEntry(mID, entry, mImageSize, mDataSize); // create the new entry. + } + else { - alreadyCached = true; // already there and non empty + alreadyCached = mCache->updateEntry(idx, entry, mImageSize, mDataSize); // update the existing entry. } - idx = mCache->setHeaderCacheEntry(mID, mImageSize); // create or touch the entry + if (idx < 0) { llwarns << "LLTextureCacheWorker: " << mID @@ -564,10 +572,6 @@ bool LLTextureCacheRemoteWorker::doWrite() } else { - if (cur_imagesize > 0 && (mImageSize != cur_imagesize)) - { - alreadyCached = false; // re-write the header if the size changed in all cases - } if (alreadyCached && (mDataSize <= TEXTURE_CACHE_ENTRY_SIZE)) { // Small texture already cached case: we're done with writing @@ -630,7 +634,7 @@ bool LLTextureCacheRemoteWorker::doWrite() { llassert(mDataSize > TEXTURE_CACHE_ENTRY_SIZE); // wouldn't make sense to be here otherwise... S32 file_size = mDataSize - TEXTURE_CACHE_ENTRY_SIZE; - if ((file_size > 0) && mCache->updateTextureEntryList(mID, file_size)) + { // build the cache file name from the UUID std::string filename = mCache->getTextureFileName(mID); @@ -648,10 +652,7 @@ bool LLTextureCacheRemoteWorker::doWrite() done = true; } } - else - { - mDataSize = 0; // no data written - } + // Nothing else to do at that point... done = true; } @@ -825,53 +826,6 @@ std::string LLTextureCache::getTextureFileName(const LLUUID& id) return filename; } -bool LLTextureCache::updateTextureEntryList(const LLUUID& id, S32 bodysize) -{ - bool res = false; - bool purge = false; - { - LLMutexLock lock(&mHeaderMutex); - size_map_t::iterator iter1 = mTexturesSizeMap.find(id); - if (iter1 == mTexturesSizeMap.end() || iter1->second < bodysize) - { - llassert_always(bodysize > 0); - - S32 oldbodysize = 0; - if (iter1 != mTexturesSizeMap.end()) - { - oldbodysize = iter1->second; - } - - Entry entry; - S32 idx = openAndReadEntry(id, entry, false); - if (idx < 0) - { - llwarns << "Failed to open entry: " << id << llendl; - removeCachedTexture(id) ; - return false; - } - else if (oldbodysize != entry.mBodySize) - { - // only happens to 64 bits systems, do not know why. - llwarns << "Entry mismatch in mTextureSizeMap / mHeaderIDMap" - << " idx=" << idx << " oldsize=" << oldbodysize << " entrysize=" << entry.mBodySize << llendl; - } - updateEntry(idx, entry, entry.mImageSize, bodysize); - - if (mTexturesSizeTotal > sCacheMaxTexturesSize) - { - purge = true; - } - res = true; - } - } - if (purge) - { - mDoPurge = TRUE; - } - return res; -} - //debug BOOL LLTextureCache::isInCache(const LLUUID& id) { @@ -1207,55 +1161,64 @@ void LLTextureCache::updateEntryTimeStamp(S32 idx, Entry& entry) { if (!mReadOnly) { - llassert_always(entry.mImageSize > entry.mBodySize); - entry.mTime = time(NULL); mUpdatedEntryMap[idx] = entry ; } } } -//mHeaderMutex is locked before calling this. //update an existing entry, write to header file immediately. -void LLTextureCache::updateEntry(S32 idx, Entry& entry, S32 new_image_size, S32 new_body_size) +bool LLTextureCache::updateEntry(S32 idx, Entry& entry, S32 new_image_size, S32 new_data_size) { - llassert_always(new_image_size > -1) ; - + S32 new_body_size = llmax(0, new_data_size - TEXTURE_CACHE_ENTRY_SIZE) ; + if(new_image_size == entry.mImageSize && new_body_size == entry.mBodySize) { - updateEntryTimeStamp(idx, entry) ; //nothing changed. + return true ; //nothing changed. } - else if (idx >= 0) + else { - if (!mReadOnly) - { - llassert_always(new_image_size > new_body_size) ; + bool purge = false ; - bool update_header = false ; - if(entry.mImageSize < 0) //is a brand-new entry - { - mHeaderIDMap[entry.mID] = idx; - mTexturesSizeMap[entry.mID] = new_body_size ; - mTexturesSizeTotal += new_body_size ; - - // Update Header - update_header = true ; - } - else if (entry.mBodySize != new_body_size) - { - //already in mHeaderIDMap. - mTexturesSizeMap[entry.mID] = new_body_size ; - mTexturesSizeTotal -= entry.mBodySize ; - mTexturesSizeTotal += new_body_size ; - } - entry.mTime = time(NULL); - entry.mImageSize = new_image_size ; - entry.mBodySize = new_body_size ; + lockHeaders() ; + + bool update_header = false ; + if(entry.mImageSize < 0) //is a brand-new entry + { + mHeaderIDMap[entry.mID] = idx; + mTexturesSizeMap[entry.mID] = new_body_size ; + mTexturesSizeTotal += new_body_size ; -// llinfos << "Updating TE: " << idx << ": " << id << " Size: " << entry.mBodySize << " Time: " << entry.mTime << llendl; - writeEntryToHeaderImmediately(idx, entry, update_header) ; + // Update Header + update_header = true ; + } + else if (entry.mBodySize != new_body_size) + { + //already in mHeaderIDMap. + mTexturesSizeMap[entry.mID] = new_body_size ; + mTexturesSizeTotal -= entry.mBodySize ; + mTexturesSizeTotal += new_body_size ; + } + entry.mTime = time(NULL); + entry.mImageSize = new_image_size ; + entry.mBodySize = new_body_size ; + + writeEntryToHeaderImmediately(idx, entry, update_header) ; + + if (mTexturesSizeTotal > sCacheMaxTexturesSize) + { + purge = true; + } + + unlockHeaders() ; + + if (purge) + { + mDoPurge = TRUE; } } + + return false ; } U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries) @@ -1658,39 +1621,37 @@ LLTextureCacheWorker* LLTextureCache::getWriter(handle_t handle) // Called from work thread // Reads imagesize from the header, updates timestamp -S32 LLTextureCache::getHeaderCacheEntry(const LLUUID& id, S32& imagesize) +S32 LLTextureCache::getHeaderCacheEntry(const LLUUID& id, Entry& entry) { - LLMutexLock lock(&mHeaderMutex); - Entry entry; + LLMutexLock lock(&mHeaderMutex); S32 idx = openAndReadEntry(id, entry, false); if (idx >= 0) - { - imagesize = entry.mImageSize; + { updateEntryTimeStamp(idx, entry); // updates time } return idx; } // Writes imagesize to the header, updates timestamp -S32 LLTextureCache::setHeaderCacheEntry(const LLUUID& id, S32 imagesize) +S32 LLTextureCache::setHeaderCacheEntry(const LLUUID& id, Entry& entry, S32 imagesize, S32 datasize) { mHeaderMutex.lock(); - llassert_always(imagesize >= 0); - Entry entry; S32 idx = openAndReadEntry(id, entry, true); + mHeaderMutex.unlock(); + if (idx >= 0) { - updateEntry(idx, entry, imagesize, entry.mBodySize); - mHeaderMutex.unlock(); + updateEntry(idx, entry, imagesize, datasize); } else // retry { - mHeaderMutex.unlock(); readHeaderCache(); // We couldn't write an entry, so refresh the LRU + mHeaderMutex.lock(); llassert_always(!mLRU.empty() || mHeaderEntriesInfo.mEntries < sCacheMaxEntries); mHeaderMutex.unlock(); - idx = setHeaderCacheEntry(id, imagesize); // assert above ensures no inf. recursion + + idx = setHeaderCacheEntry(id, entry, imagesize, datasize); // assert above ensures no inf. recursion } return idx; } diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 5dc06ff401..0fceee3011 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -144,7 +144,6 @@ public: protected: // Accessed by LLTextureCacheWorker - bool updateTextureEntryList(const LLUUID& id, S32 size); std::string getLocalFileName(const LLUUID& id); std::string getTextureFileName(const LLUUID& id); void addCompleted(Responder* responder, bool success); @@ -162,7 +161,7 @@ private: void readEntriesHeader(); void writeEntriesHeader(); S32 openAndReadEntry(const LLUUID& id, Entry& entry, bool create); - void updateEntry(S32 idx, Entry& entry, S32 new_image_size, S32 new_body_size); + bool updateEntry(S32 idx, Entry& entry, S32 new_image_size, S32 new_body_size); void updateEntryTimeStamp(S32 idx, Entry& entry) ; U32 openAndReadEntries(std::vector<Entry>& entries); void writeEntriesAndClose(const std::vector<Entry>& entries); @@ -170,8 +169,8 @@ private: void writeEntryToHeaderImmediately(S32 idx, Entry& entry, bool write_header = false) ; void removeEntry(S32 idx, Entry& entry, std::string& filename); void removeCachedTexture(const LLUUID& id) ; - S32 getHeaderCacheEntry(const LLUUID& id, S32& imagesize); - S32 setHeaderCacheEntry(const LLUUID& id, S32 imagesize); + S32 getHeaderCacheEntry(const LLUUID& id, Entry& entry); + S32 setHeaderCacheEntry(const LLUUID& id, Entry& entry, S32 imagesize, S32 datasize); void writeUpdatedEntries() ; void updatedHeaderEntriesFile() ; void lockHeaders() { mHeaderMutex.lock(); } diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index a1b3c8dabd..a1ab051021 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1137,6 +1137,20 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) } } +void LLTextureCtrl::setImageAssetName(const std::string& name) +{ + LLPointer<LLUIImage> imagep = LLUI::getUIImage(name); + if(imagep) + { + LLViewerFetchedTexture* pTexture = dynamic_cast<LLViewerFetchedTexture*>(imagep->getImage().get()); + if(pTexture) + { + LLUUID id = pTexture->getID(); + setImageAssetID(id); + } + } +} + void LLTextureCtrl::setImageAssetID( const LLUUID& asset_id ) { if( mImageAssetID != asset_id ) @@ -1248,25 +1262,52 @@ void LLTextureCtrl::draw() mTentativeLabel->setVisible( !mTexturep.isNull() && getTentative() ); - // Show "Loading..." string on the top left corner while this texture is loading. // Using the discard level, do not show the string if the texture is almost but not // fully loaded. - if ( mTexturep.notNull() && - (!mTexturep->isFullyLoaded()) && - (mShowLoadingPlaceholder == TRUE) && - (mTexturep->getDiscardLevel() != 1) && - (mTexturep->getDiscardLevel() != 0)) + if (mTexturep.notNull() && + (!mTexturep->isFullyLoaded()) && + (mShowLoadingPlaceholder == TRUE)) { + U32 v_offset = 25; LLFontGL* font = LLFontGL::getFontSansSerif(); - font->renderUTF8( - mLoadingPlaceholderString, 0, - llfloor(interior.mLeft+3), - llfloor(interior.mTop-25), - LLColor4::white, - LLFontGL::LEFT, - LLFontGL::BASELINE, - LLFontGL::DROP_SHADOW); + + // Don't show as loaded if the texture is almost fully loaded (i.e. discard1) unless god + if ((mTexturep->getDiscardLevel() > 1) || gAgent.isGodlike()) + { + font->renderUTF8( + mLoadingPlaceholderString, + 0, + llfloor(interior.mLeft+3), + llfloor(interior.mTop-v_offset), + LLColor4::white, + LLFontGL::LEFT, + LLFontGL::BASELINE, + LLFontGL::DROP_SHADOW); + } + + // Optionally show more detailed information. + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + LLFontGL* font = LLFontGL::getFontSansSerif(); + std::string tdesc; + // Show what % the texture has loaded (0 to 100%, 100 is highest), and what level of detail (5 to 0, 0 is best). + + v_offset += 12; + tdesc = llformat(" PK : %d%%", U32(mTexturep->getDownloadProgress()*100.0)); + font->renderUTF8(tdesc, 0, llfloor(interior.mLeft+3), llfloor(interior.mTop-v_offset), + LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + + v_offset += 12; + tdesc = llformat(" LVL: %d", mTexturep->getDiscardLevel()); + font->renderUTF8(tdesc, 0, llfloor(interior.mLeft+3), llfloor(interior.mTop-v_offset), + LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + + v_offset += 12; + tdesc = llformat(" ID : %s...", (mImageAssetID.asString().substr(0,7)).c_str()); + font->renderUTF8(tdesc, 0, llfloor(interior.mLeft+3), llfloor(interior.mTop-v_offset), + LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + } } LLUICtrl::draw(); diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 837f837430..bcd0a083f2 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -128,7 +128,7 @@ public: virtual void clear(); // Takes a UUID, wraps get/setImageAssetID - virtual void setValue(const LLSD& value ); + virtual void setValue(const LLSD& value); virtual LLSD getValue() const; // LLTextureCtrl interface @@ -142,6 +142,8 @@ public: const LLUUID& getImageItemID() { return mImageItemID; } + virtual void setImageAssetName(const std::string& name); + void setImageAssetID(const LLUUID &image_asset_id); const LLUUID& getImageAssetID() const { return mImageAssetID; } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 3d447dd411..cf3bce2ec1 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -166,6 +166,9 @@ public: mGetReason = reason; } + void setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;} + bool getCanUseHTTP()const {return mCanUseHTTP ;} + protected: LLTextureFetchWorker(LLTextureFetch* fetcher, const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, S32 discard, S32 size); @@ -247,15 +250,17 @@ private: S32 mRequestedSize; S32 mDesiredSize; S32 mFileSize; - S32 mCachedSize; - BOOL mLoaded; + S32 mCachedSize; e_request_state mSentRequest; handle_t mDecodeHandle; + BOOL mLoaded; BOOL mDecoded; BOOL mWritten; BOOL mNeedsAux; BOOL mHaveAllData; BOOL mInLocalCache; + bool mCanUseHTTP ; + bool mCanUseNET ; //can get from asset server. S32 mHTTPFailCount; S32 mRetryAttempt; S32 mActiveCount; @@ -411,6 +416,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, mNeedsAux(FALSE), mHaveAllData(FALSE), mInLocalCache(FALSE), + mCanUseHTTP(true), mHTTPFailCount(0), mRetryAttempt(0), mActiveCount(0), @@ -421,6 +427,8 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, mTotalPackets(0), mImageCodec(IMG_CODEC_INVALID) { + mCanUseNET = mUrl.empty() ; + calcWorkPriority(); mType = host.isOk() ? LLImageBase::TYPE_AVATAR_BAKE : LLImageBase::TYPE_NORMAL; // llinfos << "Create: " << mID << " mHost:" << host << " Discard=" << discard << llendl; @@ -640,11 +648,12 @@ bool LLTextureFetchWorker::doWork(S32 param) return false; } mFileSize = 0; - mLoaded = FALSE; - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it + mLoaded = FALSE; if (mUrl.compare(0, 7, "file://") == 0) { + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it + // read file from local disk std::string filename = mUrl.substr(7, std::string::npos); CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); @@ -653,11 +662,13 @@ bool LLTextureFetchWorker::doWork(S32 param) } else if (mUrl.empty()) { + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it + CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority, offset, size, responder); } - else + else if(mCanUseHTTP) { if (!(mUrl.compare(0, 7, "http://") == 0)) { @@ -667,6 +678,11 @@ bool LLTextureFetchWorker::doWork(S32 param) setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); mState = SEND_HTTP_REQ; } + else + { + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + mState = LOAD_FROM_NETWORK; + } } if (mLoaded) @@ -727,7 +743,7 @@ bool LLTextureFetchWorker::doWork(S32 param) static LLCachedControl<bool> use_http(gSavedSettings,"ImagePipelineUseHTTP"); // if (mHost != LLHost::invalid) get_url = false; - if ( use_http && mUrl.empty())//get http url. + if ( use_http && mCanUseHTTP && mUrl.empty())//get http url. { LLViewerRegion* region = NULL; if (mHost == LLHost::invalid) @@ -750,7 +766,7 @@ bool LLTextureFetchWorker::doWork(S32 param) //llwarns << "Region not found for host: " << mHost << llendl; } } - if (!mUrl.empty()) + if (mCanUseHTTP && !mUrl.empty()) { mState = LLTextureFetchWorker::SEND_HTTP_REQ; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); @@ -891,7 +907,16 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mGetStatus == HTTP_NOT_FOUND) { mHTTPFailCount = max_attempts = 1; // Don't retry - llinfos << "Texture missing from server (404): " << mUrl << llendl; + //llwarns << "Texture missing from server (404): " << mUrl << llendl; + + //roll back to try UDP + if(mCanUseNET) + { + mState = INIT ; + mCanUseHTTP = false ; + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + return false ; + } } else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE) { @@ -1471,7 +1496,7 @@ LLTextureFetch::~LLTextureFetch() } bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, - S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux) + S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http) { if (mDebugPause) { @@ -1533,6 +1558,7 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con worker->mNeedsAux = needs_aux; worker->setImagePriority(priority); worker->setDesiredDiscard(desired_discard, desired_size); + worker->setCanUseHTTP(can_use_http) ; if (!worker->haveWork()) { worker->mState = LLTextureFetchWorker::INIT; @@ -1555,6 +1581,7 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con worker->lockWorkMutex(); worker->mActiveCount++; worker->mNeedsAux = needs_aux; + worker->setCanUseHTTP(can_use_http) ; worker->unlockWorkMutex(); } @@ -2215,7 +2242,7 @@ BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id) } S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& requested_priority_p, - U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p) + U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p, bool& can_use_http) { S32 state = LLTextureFetchWorker::INVALID; F32 data_progress = 0.0f; @@ -2253,6 +2280,7 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r requested_priority = worker->mImagePriority; } fetch_priority = worker->getPriority(); + can_use_http = worker->getCanUseHTTP() ; worker->unlockWorkMutex(); } data_progress_p = data_progress; diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index ef2ec520bf..634e590fe0 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -62,7 +62,7 @@ public: void shutDownImageDecodeThread() ; //called in the main thread after the ImageDecodeThread shuts down. bool createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, - S32 w, S32 h, S32 c, S32 discard, bool needs_aux); + S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http); void deleteRequest(const LLUUID& id, bool cancel); bool getRequestFinished(const LLUUID& id, S32& discard_level, LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux); @@ -77,7 +77,7 @@ public: // Debug BOOL isFromLocalCache(const LLUUID& id); S32 getFetchState(const LLUUID& id, F32& decode_progress_p, F32& requested_priority_p, - U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p); + U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p, bool& can_use_http); void dump(); S32 getNumRequests() ; S32 getNumHTTPRequests() ; diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 43913f3632..7a8b6557bb 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -54,6 +54,11 @@ #include "llviewertexture.h" #include "llviewertexturelist.h" #include "llvovolume.h" + +// For avatar texture view +#include "llvoavatarself.h" +#include "lltexlayer.h" + extern F32 texmem_lower_bound_scale; LLTextureView *gTextureView = NULL; @@ -375,6 +380,86 @@ LLRect LLTextureBar::getRequiredRect() //////////////////////////////////////////////////////////////////////////// +class LLAvatarTexBar : public LLView +{ +public: + struct Params : public LLInitParam::Block<Params, LLView::Params> + { + Mandatory<LLTextureView*> texture_view; + Params() + : texture_view("texture_view") + { + S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + rect(LLRect(0,0,100,line_height * 4)); + } + }; + + LLAvatarTexBar(const Params& p) + : LLView(p), + mTextureView(p.texture_view) + {} + + virtual void draw(); + virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual LLRect getRequiredRect(); // Return the height of this object, given the set options. + +private: + LLTextureView* mTextureView; +}; + +void LLAvatarTexBar::draw() +{ + if (!gSavedSettings.getBOOL("DebugAvatarRezTime")) return; + + LLVOAvatarSelf* avatarp = gAgentAvatarp; + if (!avatarp) return; + + const S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + const S32 v_offset = (S32)((texture_bar_height + 2.5f) * mTextureView->mNumTextureBars + 2.5f); + //---------------------------------------------------------------------------- + LLGLSUIDefault gls_ui; + LLColor4 text_color(1.f, 1.f, 1.f, 1.f); + LLColor4 color; + + U32 line_num = 6; + for (LLVOAvatarDefines::LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().begin(); + baked_iter != LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().end(); + ++baked_iter) + { + const LLVOAvatarDefines::EBakedTextureIndex baked_index = baked_iter->first; + const LLTexLayerSet *layerset = avatarp->debugGetLayerSet(baked_index); + if (!layerset) continue; + const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite(); + if (!layerset_buffer) continue; + std::string text = layerset_buffer->dumpTextureInfo(); + LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*line_num, + text_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); + line_num++; + } + const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureTimeout"); + const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + + const std::string texture_timeout_str = texture_timeout ? llformat("%d",texture_timeout) : "Disabled"; + const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled"; + std::string header_text = llformat("[ Timeout('AvatarBakedTextureTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str()); + LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, 0, v_offset + line_height*line_num, + text_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); +} + +BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask) +{ + return FALSE; +} + +LLRect LLAvatarTexBar::getRequiredRect() +{ + LLRect rect; + rect.mTop = 8; + return rect; +} + +//////////////////////////////////////////////////////////////////////////// + class LLGLTexMemBar : public LLView { public: @@ -412,13 +497,17 @@ void LLGLTexMemBar::draw() F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ; F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ; S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); - S32 v_offset = (S32)((texture_bar_height + 2.5f) * mTextureView->mNumTextureBars + 2.5f); + S32 v_offset = (S32)((texture_bar_height + 2.5f) * mTextureView->mNumTextureBars + 5.0f); //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; LLColor4 text_color(1.f, 1.f, 1.f, 0.75f); LLColor4 color; - std::string text; + std::string text = ""; + + LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6, + text_color, LLFontGL::LEFT, LLFontGL::TOP); + text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB", total_mem, max_total_mem, @@ -640,6 +729,7 @@ LLTextureView::LLTextureView(const LLTextureView::Params& p) setDisplayChildren(TRUE); mGLTexMemBar = 0; + mAvatarTexBar = 0; } LLTextureView::~LLTextureView() @@ -647,6 +737,9 @@ LLTextureView::~LLTextureView() // Children all cleaned up by default view destructor. delete mGLTexMemBar; mGLTexMemBar = 0; + + delete mAvatarTexBar; + mAvatarTexBar = 0; } typedef std::pair<F32,LLViewerFetchedTexture*> decode_pair_t; @@ -684,6 +777,13 @@ void LLTextureView::draw() mGLTexMemBar = 0; } + if (mAvatarTexBar) + { + removeChild(mAvatarTexBar); + mAvatarTexBar->die(); + mAvatarTexBar = 0; + } + typedef std::multiset<decode_pair_t, compare_decode_pair > display_list_t; display_list_t display_image_list; @@ -851,7 +951,14 @@ void LLTextureView::draw() tmbp.texture_view(this); mGLTexMemBar = LLUICtrlFactory::create<LLGLTexMemBar>(tmbp); addChild(mGLTexMemBar); - + + LLAvatarTexBar::Params atbp; + atbp.name("gl avatartex bar"); + atbp.texture_view(this); + mAvatarTexBar = LLUICtrlFactory::create<LLAvatarTexBar>(atbp); + addChild(mAvatarTexBar); + + reshape(getRect().getWidth(), getRect().getHeight(), TRUE); /* diff --git a/indra/newview/lltextureview.h b/indra/newview/lltextureview.h index 435a55df83..dfd9c42c2c 100644 --- a/indra/newview/lltextureview.h +++ b/indra/newview/lltextureview.h @@ -38,11 +38,13 @@ class LLViewerFetchedTexture; class LLTextureBar; class LLGLTexMemBar; +class LLAvatarTexBar; class LLTextureView : public LLContainerView { friend class LLTextureBar; friend class LLGLTexMemBar; + friend class LLAvatarTexBar; protected: LLTextureView(const Params&); friend class LLUICtrlFactory; @@ -73,7 +75,7 @@ private: U32 mNumTextureBars; LLGLTexMemBar* mGLTexMemBar; - + LLAvatarTexBar* mAvatarTexBar; public: static std::set<LLViewerFetchedTexture*> sDebugImages; }; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 2b529a4e50..6c6eda2e68 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -50,6 +50,7 @@ #include "llnotifications.h" #include "llfunctorregistry.h" #include "llrootview.h" +#include "lltransientfloatermgr.h" #include "llviewercontrol.h" // for gSavedSettings const S32 MAX_ALLOWED_MSG_WIDTH = 400; @@ -324,6 +325,9 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mDefaultBtnTimer.start(); mDefaultBtnTimer.setTimerExpirySec(DEFAULT_BUTTON_DELAY); } + + LLTransientFloaterMgr::instance().addControlView( + LLTransientFloaterMgr::GLOBAL, this); } bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std::string& check_control ) @@ -377,6 +381,8 @@ void LLToastAlertPanel::setVisible( BOOL visible ) LLToastAlertPanel::~LLToastAlertPanel() { + LLTransientFloaterMgr::instance().removeControlView( + LLTransientFloaterMgr::GLOBAL, this); } BOOL LLToastAlertPanel::hasTitleBar() const diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index add61c00cf..7eac3867d5 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -133,9 +133,8 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification childSetActionTextbox("attachment", boost::bind( &LLToastGroupNotifyPanel::onClickAttachment, this)); - LLUIImagePtr attachIconImg = get_item_icon(mInventoryOffer->mType, - LLInventoryType::IT_TEXTURE, - 0, FALSE); + LLUIImagePtr attachIconImg = LLInventoryIcon::getIcon(mInventoryOffer->mType, + LLInventoryType::IT_TEXTURE); pAttachIcon->setValue(attachIconImg->getName()); } diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 089163929e..38f67720b7 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -291,7 +291,10 @@ LLToastNotifyPanel::~LLToastNotifyPanel() { // let reusable notification be deleted mNotification->setReusable(false); - LLNotifications::getInstance()->cancel(mNotification); + if (!mNotification->isPersistent()) + { + LLNotifications::getInstance()->cancel(mNotification); + } } } @@ -492,12 +495,6 @@ void LLToastNotifyPanel::onClickButton(void* data) if(is_reusable) { sButtonClickSignal(self->mNotification->getID(), button_name); - - if(new_info && !self->mNotification->isPersistent()) - { - self->mNotification->setResponseFunctor( - boost::bind(&LLOfferInfo::inventory_offer_callback, new_info, _1, _2)); - } } else { diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 774626f19d..8a8bdd2dba 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -38,7 +38,6 @@ // project headers #include "llagent.h" #include "llagentcamera.h" -#include "llagentui.h" #include "llagentwearables.h" #include "llappearancemgr.h" #include "lldictionary.h" @@ -46,31 +45,26 @@ #include "llfloaterreg.h" #include "llfloatertools.h" #include "llgesturemgr.h" +#include "llgiveinventory.h" #include "llhudmanager.h" #include "llhudeffecttrail.h" -#include "llimview.h" +//#include "llimview.h" #include "llinventorybridge.h" #include "llinventorydefines.h" #include "llinventoryfunctions.h" -#include "llmutelist.h" #include "llpreviewnotecard.h" -#include "llrecentpeople.h" #include "llrootview.h" #include "llselectmgr.h" #include "lltoolmgr.h" #include "lltooltip.h" #include "lltrans.h" #include "llviewerobjectlist.h" +#include "llviewerregion.h" #include "llviewerstats.h" #include "llviewerwindow.h" #include "llvoavatarself.h" #include "llworld.h" -// MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES -// or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a -// bit from there to give some pad. -const S32 MAX_ITEMS = 42; - // syntactic sugar #define callMemberFunction(object,ptrToMember) ((object).*(ptrToMember)) @@ -145,29 +139,6 @@ bool LLDroppableItem::operator()(LLInventoryCategory* cat, return allowed; } -class LLUncopyableItems : public LLInventoryCollectFunctor -{ -public: - LLUncopyableItems() {} - virtual ~LLUncopyableItems() {} - virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); -}; - -bool LLUncopyableItems::operator()(LLInventoryCategory* cat, - LLInventoryItem* item) -{ - bool uncopyable = false; - if (item) - { - if (itemTransferCommonlyAllowed(item) && - !item->getPermissions().allowCopyBy(gAgent.getID())) - { - uncopyable = true; - } - } - return uncopyable; -} - class LLDropCopyableItems : public LLInventoryCollectFunctor { public: @@ -195,43 +166,6 @@ bool LLDropCopyableItems::operator()( return allowed; } -class LLGiveable : public LLInventoryCollectFunctor -{ -public: - LLGiveable() : mCountLosing(0) {} - virtual ~LLGiveable() {} - virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); - - S32 countNoCopy() const { return mCountLosing; } -protected: - S32 mCountLosing; -}; - -bool LLGiveable::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - // All categories can be given. - if (cat) - return true; - - bool allowed = false; - if (item) - { - allowed = itemTransferCommonlyAllowed(item); - if (allowed && - !item->getPermissions().allowOperationBy(PERM_TRANSFER, - gAgent.getID())) - { - allowed = FALSE; - } - if (allowed && - !item->getPermissions().allowCopyBy(gAgent.getID())) - { - ++mCountLosing; - } - } - return allowed; -} - // Starts a fetch on folders and items. This is really not used // as an observer in the traditional sense; we're just using it to // request a fetch and we don't care about when/if the response arrives. @@ -1419,422 +1353,6 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, gFloaterTools->dirty(); } -void LLToolDragAndDrop::giveInventory(const LLUUID& to_agent, - LLInventoryItem* item, - const LLUUID& im_session_id) - -{ - llinfos << "LLToolDragAndDrop::giveInventory()" << llendl; - if (!isInventoryGiveAcceptable(item)) - { - return; - } - if (item->getPermissions().allowCopyBy(gAgent.getID())) - { - // just give it away. - LLToolDragAndDrop::commitGiveInventoryItem(to_agent, item, im_session_id); - } - else - { - // ask if the agent is sure. - LLSD payload; - payload["agent_id"] = to_agent; - payload["item_id"] = item->getUUID(); - LLNotificationsUtil::add("CannotCopyWarning", LLSD(), payload, - &LLToolDragAndDrop::handleCopyProtectedItem); - } -} -// static -bool LLToolDragAndDrop::handleCopyProtectedItem(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - LLInventoryItem* item = NULL; - switch(option) - { - case 0: // "Yes" - item = gInventory.getItem(notification["payload"]["item_id"].asUUID()); - if (item) - { - LLToolDragAndDrop::commitGiveInventoryItem(notification["payload"]["agent_id"].asUUID(), - item); - // delete it for now - it will be deleted on the server - // quickly enough. - gInventory.deleteObject(notification["payload"]["item_id"].asUUID()); - gInventory.notifyObservers(); - } - else - { - LLNotificationsUtil::add("CannotGiveItem"); - } - break; - - default: // no, cancel, whatever, who cares, not yes. - LLNotificationsUtil::add("TransactionCancelled"); - break; - } - return false; -} - -// static -void LLToolDragAndDrop::commitGiveInventoryItem(const LLUUID& to_agent, - LLInventoryItem* item, - const LLUUID& im_session_id) -{ - if (!item) return; - std::string name; - LLAgentUI::buildFullname(name); - LLUUID transaction_id; - transaction_id.generate(); - const S32 BUCKET_SIZE = sizeof(U8) + UUID_BYTES; - U8 bucket[BUCKET_SIZE]; - bucket[0] = (U8)item->getType(); - memcpy(&bucket[1], &(item->getUUID().mData), UUID_BYTES); /* Flawfinder: ignore */ - pack_instant_message( - gMessageSystem, - gAgent.getID(), - FALSE, - gAgent.getSessionID(), - to_agent, - name, - item->getName(), - IM_ONLINE, - IM_INVENTORY_OFFERED, - transaction_id, - 0, - LLUUID::null, - gAgent.getPositionAgent(), - NO_TIMESTAMP, - bucket, - BUCKET_SIZE); - gAgent.sendReliableMessage(); - - // VEFFECT: giveInventory - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); - effectp->setSourceObject(gAgentAvatarp); - effectp->setTargetObject(gObjectList.findObject(to_agent)); - effectp->setDuration(LL_HUD_DUR_SHORT); - effectp->setColor(LLColor4U(gAgent.getEffectColor())); - gFloaterTools->dirty(); - - LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY); - - logInventoryOffer(to_agent, im_session_id); - - // add buddy to recent people list - LLRecentPeople::instance().add(to_agent); -} - -//static -void LLToolDragAndDrop::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im_session_id) -{ - // compute id of possible IM session with agent that has "to_agent" id - LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, to_agent); - // If this item was given by drag-and-drop into an IM panel, log this action in the IM panel chat. - if (im_session_id.notNull()) - { - LLSD args; - gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args); - } - // If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat. - else if (LLIMModel::getInstance()->findIMSession(session_id)) - { - LLSD args; - gIMMgr->addSystemMessage(session_id, "inventory_item_offered", args); - } - // If this item was given by drag-and-drop on avatar while IM panel wasn't open, log this action to IM history. - else - { - std::string full_name; - if (gCacheName->getFullName(to_agent, full_name)) - { - LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, LLTrans::getString("inventory_item_offered-im")); - } - } -} - -void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent, - LLInventoryCategory* cat, - const LLUUID& im_session_id) - -{ - if (!cat) return; - llinfos << "LLToolDragAndDrop::giveInventoryCategory() - " - << cat->getUUID() << llendl; - - if (!isAgentAvatarValid()) return; - - // Test out how many items are being given. - LLViewerInventoryCategory::cat_array_t cats; - LLViewerInventoryItem::item_array_t items; - LLGiveable giveable; - gInventory.collectDescendentsIf (cat->getUUID(), - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - giveable); - S32 count = cats.count(); - bool complete = true; - for(S32 i = 0; i < count; ++i) - { - if (!gInventory.isCategoryComplete(cats.get(i)->getUUID())) - { - complete = false; - break; - } - } - if (!complete) - { - LLNotificationsUtil::add("IncompleteInventory"); - return; - } - count = items.count() + cats.count(); - if (count > MAX_ITEMS) - { - LLNotificationsUtil::add("TooManyItems"); - return; - } - else if (count == 0) - { - LLNotificationsUtil::add("NoItems"); - return; - } - else - { - if (0 == giveable.countNoCopy()) - { - LLToolDragAndDrop::commitGiveInventoryCategory(to_agent, cat, im_session_id); - } - else - { - LLSD args; - args["COUNT"] = llformat("%d",giveable.countNoCopy()); - LLSD payload; - payload["agent_id"] = to_agent; - payload["folder_id"] = cat->getUUID(); - LLNotificationsUtil::add("CannotCopyCountItems", args, payload, &LLToolDragAndDrop::handleCopyProtectedCategory); - } - } -} - - -// static -bool LLToolDragAndDrop::handleCopyProtectedCategory(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - LLInventoryCategory* cat = NULL; - switch(option) - { - case 0: // "Yes" - cat = gInventory.getCategory(notification["payload"]["folder_id"].asUUID()); - if (cat) - { - LLToolDragAndDrop::commitGiveInventoryCategory(notification["payload"]["agent_id"].asUUID(), - cat); - LLViewerInventoryCategory::cat_array_t cats; - LLViewerInventoryItem::item_array_t items; - LLUncopyableItems remove; - gInventory.collectDescendentsIf (cat->getUUID(), - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - remove); - S32 count = items.count(); - for(S32 i = 0; i < count; ++i) - { - gInventory.deleteObject(items.get(i)->getUUID()); - } - gInventory.notifyObservers(); - } - else - { - LLNotificationsUtil::add("CannotGiveCategory"); - } - break; - - default: // no, cancel, whatever, who cares, not yes. - LLNotificationsUtil::add("TransactionCancelled"); - break; - } - return false; -} - -// static -void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent, - LLInventoryCategory* cat, - const LLUUID& im_session_id) - -{ - if (!cat) return; - llinfos << "LLToolDragAndDrop::commitGiveInventoryCategory() - " - << cat->getUUID() << llendl; - - // add buddy to recent people list - LLRecentPeople::instance().add(to_agent); - - // Test out how many items are being given. - LLViewerInventoryCategory::cat_array_t cats; - LLViewerInventoryItem::item_array_t items; - LLGiveable giveable; - gInventory.collectDescendentsIf (cat->getUUID(), - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - giveable); - - // MAX ITEMS is based on (sizeof(uuid)+2) * count must be < - // MTUBYTES or 18 * count < 1200 => count < 1200/18 => - // 66. I've cut it down a bit from there to give some pad. - S32 count = items.count() + cats.count(); - if (count > MAX_ITEMS) - { - LLNotificationsUtil::add("TooManyItems"); - return; - } - else if (count == 0) - { - LLNotificationsUtil::add("NoItems"); - return; - } - else - { - std::string name; - LLAgentUI::buildFullname(name); - LLUUID transaction_id; - transaction_id.generate(); - S32 bucket_size = (sizeof(U8) + UUID_BYTES) * (count + 1); - U8* bucket = new U8[bucket_size]; - U8* pos = bucket; - U8 type = (U8)cat->getType(); - memcpy(pos, &type, sizeof(U8)); /* Flawfinder: ignore */ - pos += sizeof(U8); - memcpy(pos, &(cat->getUUID()), UUID_BYTES); /* Flawfinder: ignore */ - pos += UUID_BYTES; - S32 i; - count = cats.count(); - for(i = 0; i < count; ++i) - { - memcpy(pos, &type, sizeof(U8)); /* Flawfinder: ignore */ - pos += sizeof(U8); - memcpy(pos, &(cats.get(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */ - pos += UUID_BYTES; - } - count = items.count(); - for(i = 0; i < count; ++i) - { - type = (U8)items.get(i)->getType(); - memcpy(pos, &type, sizeof(U8)); /* Flawfinder: ignore */ - pos += sizeof(U8); - memcpy(pos, &(items.get(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */ - pos += UUID_BYTES; - } - pack_instant_message( - gMessageSystem, - gAgent.getID(), - FALSE, - gAgent.getSessionID(), - to_agent, - name, - cat->getName(), - IM_ONLINE, - IM_INVENTORY_OFFERED, - transaction_id, - 0, - LLUUID::null, - gAgent.getPositionAgent(), - NO_TIMESTAMP, - bucket, - bucket_size); - gAgent.sendReliableMessage(); - delete[] bucket; - - // VEFFECT: giveInventoryCategory - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); - effectp->setSourceObject(gAgentAvatarp); - effectp->setTargetObject(gObjectList.findObject(to_agent)); - effectp->setDuration(LL_HUD_DUR_SHORT); - effectp->setColor(LLColor4U(gAgent.getEffectColor())); - gFloaterTools->dirty(); - - LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY); - - logInventoryOffer(to_agent, im_session_id); - } -} - -// static -BOOL LLToolDragAndDrop::isInventoryGiveAcceptable(LLInventoryItem* item) -{ - if (!item) - { - return FALSE; - } - if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) - { - return FALSE; - } - BOOL copyable = FALSE; - if (item->getPermissions().allowCopyBy(gAgent.getID())) copyable = TRUE; - - if (!isAgentAvatarValid()) return FALSE; - - BOOL acceptable = TRUE; - switch(item->getType()) - { - case LLAssetType::AT_OBJECT: - if (gAgentAvatarp->isWearingAttachment(item->getUUID())) - { - acceptable = FALSE; - } - break; - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_CLOTHING: - if (!copyable && gAgentWearables.isWearingItem(item->getUUID())) - { - acceptable = FALSE; - } - break; - default: - break; - } - return acceptable; -} - -// Static -BOOL LLToolDragAndDrop::isInventoryGroupGiveAcceptable(LLInventoryItem* item) -{ - if (!item) - { - return FALSE; - } - - // These permissions are double checked in the simulator in - // LLGroupNoticeInventoryItemFetch::result(). - if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) - { - return FALSE; - } - if (!item->getPermissions().allowCopyBy(gAgent.getID())) - { - return FALSE; - } - - if (!isAgentAvatarValid()) return FALSE; - - BOOL acceptable = TRUE; - switch(item->getType()) - { - case LLAssetType::AT_OBJECT: - if (gAgentAvatarp->isWearingAttachment(item->getUUID())) - { - acceptable = FALSE; - } - break; - default: - break; - } - return acceptable; -} - // accessor that looks at permissions, copyability, and names of // inventory items to determine if a drop would be ok. EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LLInventoryItem* item) @@ -1928,13 +1446,13 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ { LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data; if (gInventory.getItem(inv_item->getUUID()) - && LLToolDragAndDrop::isInventoryGiveAcceptable(inv_item)) + && LLGiveInventory::isInventoryGiveAcceptable(inv_item)) { // *TODO: get multiple object transfers working *accept = ACCEPT_YES_COPY_SINGLE; if (drop) { - LLToolDragAndDrop::giveInventory(dest_agent, inv_item, session_id); + LLGiveInventory::doGiveInventoryItem(dest_agent, inv_item, session_id); } } else @@ -1956,7 +1474,7 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ *accept = ACCEPT_YES_COPY_SINGLE; if (drop) { - LLToolDragAndDrop::giveInventoryCategory(dest_agent, inv_cat, session_id); + LLGiveInventory::doGiveInventoryCategory(dest_agent, inv_cat, session_id); } } else @@ -2633,7 +2151,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject( { if (drop) { - giveInventory(obj->getID(), item ); + LLGiveInventory::doGiveInventoryItem(obj->getID(), item ); } // *TODO: deal with all the issues surrounding multi-object // inventory transfers. @@ -2653,13 +2171,13 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventory( LLViewerInventoryCategory* cat; locateInventory(item, cat); if (!item || !item->isFinished()) return ACCEPT_NO; - if (!isInventoryGiveAcceptable(item)) + if (!LLGiveInventory::isInventoryGiveAcceptable(item)) { return ACCEPT_NO; } if (drop && obj) { - giveInventory(obj->getID(), item); + LLGiveInventory::doGiveInventoryItem(obj->getID(), item); } // *TODO: deal with all the issues surrounding multi-object // inventory transfers. @@ -2676,7 +2194,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( LLViewerInventoryCategory* cat; locateInventory(item, cat); if (!cat) return ACCEPT_NO; - giveInventoryCategory(obj->getID(), cat); + LLGiveInventory::doGiveInventoryCategory(obj->getID(), cat); } // *TODO: deal with all the issues surrounding multi-object // inventory transfers. diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 85d003e5fc..18334b5ee1 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -214,32 +214,10 @@ protected: LLToolDragAndDrop::ESource source, const LLUUID& src_id); - - // give inventory item functionality - static bool handleCopyProtectedItem(const LLSD& notification, const LLSD& response); - static void commitGiveInventoryItem(const LLUUID& to_agent, - LLInventoryItem* item, - const LLUUID &im_session_id = LLUUID::null); - - // give inventory category functionality - static bool handleCopyProtectedCategory(const LLSD& notification, const LLSD& response); - static void commitGiveInventoryCategory(const LLUUID& to_agent, - LLInventoryCategory* cat, - const LLUUID &im_session_id = LLUUID::null); - - // log "Inventory item offered" to IM - static void logInventoryOffer(const LLUUID& to_agent, - const LLUUID &im_session_id = LLUUID::null); - public: // helper functions static BOOL isInventoryDropAcceptable(LLViewerObject* obj, LLInventoryItem* item) { return (ACCEPT_YES_COPY_SINGLE <= willObjectAcceptInventory(obj, item)); } - // This simple helper function assumes you are attempting to - // transfer item. returns true if you can give, otherwise false. - static BOOL isInventoryGiveAcceptable(LLInventoryItem* item); - static BOOL isInventoryGroupGiveAcceptable(LLInventoryItem* item); - BOOL dadUpdateInventory(LLViewerObject* obj, BOOL drop); BOOL dadUpdateInventoryCategory(LLViewerObject* obj, BOOL drop); @@ -265,13 +243,6 @@ public: ESource source, const LLUUID& src_id); - static void giveInventory(const LLUUID& to_agent, - LLInventoryItem* item, - const LLUUID &session_id = LLUUID::null); - static void giveInventoryCategory(const LLUUID& to_agent, - LLInventoryCategory* item, - const LLUUID &session_id = LLUUID::null); - static bool handleGiveDragAndDrop(LLUUID agent, LLUUID session, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index 04d873f91b..cae5e93545 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -891,7 +891,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask) // Look for cursor against the edge of the screen // Only works in fullscreen - if (gSavedSettings.getBOOL("WindowFullScreen")) + if (gSavedSettings.getBOOL("FullScreen")) { if (gAgentCamera.cameraThirdPerson() ) { diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index 22176c037f..c1dc1de5e5 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -49,7 +49,6 @@ #include "lldrawable.h" #include "lldrawpoolavatar.h" #include "llface.h" -#include "llfloatercustomize.h" #include "llmorphview.h" #include "llresmgr.h" #include "llselectmgr.h" @@ -79,6 +78,7 @@ LLVisualParamHint::LLVisualParamHint( S32 width, S32 height, LLViewerJointMesh *mesh, LLViewerVisualParam *param, + LLWearable *wearable, F32 param_weight) : LLViewerDynamicTexture(width, height, 3, LLViewerDynamicTexture::ORDER_MIDDLE, TRUE ), @@ -86,6 +86,7 @@ LLVisualParamHint::LLVisualParamHint( mIsVisible( FALSE ), mJointMesh( mesh ), mVisualParam( param ), + mWearablePtr( wearable ), mVisualParamWeight( param_weight ), mAllowsUpdates( TRUE ), mDelayFrames( 0 ), @@ -151,7 +152,7 @@ BOOL LLVisualParamHint::needsRender() void LLVisualParamHint::preRender(BOOL clear_depth) { mLastParamWeight = mVisualParam->getWeight(); - mVisualParam->setWeight(mVisualParamWeight, FALSE); + mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, FALSE); gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, FALSE); gAgentAvatarp->setVisualParamWeight("Blink_Left", 0.f); gAgentAvatarp->setVisualParamWeight("Blink_Right", 0.f); @@ -250,10 +251,12 @@ BOOL LLVisualParamHint::render() gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight); - mVisualParam->setWeight(mLastParamWeight, FALSE); + mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight, FALSE); + gAgentAvatarp->updateVisualParams(); gGL.color4f(1,1,1,1); mGLTexturep->setGLTextureCreated(true); gGL.popUIMatrix(); + return TRUE; } diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h index c332c296bd..3bffefaa55 100644 --- a/indra/newview/lltoolmorph.h +++ b/indra/newview/lltoolmorph.h @@ -62,6 +62,7 @@ public: S32 width, S32 height, LLViewerJointMesh *mesh, LLViewerVisualParam *param, + LLWearable *wearable, F32 param_weight); /*virtual*/ S8 getType() const ; @@ -89,6 +90,7 @@ protected: BOOL mIsVisible; // is this distortion hint visible? LLViewerJointMesh* mJointMesh; // mesh that this distortion applies to LLViewerVisualParam* mVisualParam; // visual param applied by this hint + LLWearable* mWearablePtr; // wearable we're editing F32 mVisualParamWeight; // weight for this visual parameter BOOL mAllowsUpdates; // updates are blocked unless this is true S32 mDelayFrames; // updates are blocked for this many frames diff --git a/indra/newview/llurl.cpp b/indra/newview/llurl.cpp index ab65ead4c5..83a5839a93 100644 --- a/indra/newview/llurl.cpp +++ b/indra/newview/llurl.cpp @@ -286,5 +286,11 @@ const char * LLURL::getFullPath() return(sReturnString); } +const char * LLURL::getAuthority() +{ + strncpy(LLURL::sReturnString,mAuthority, LL_MAX_PATH -1); /* Flawfinder: ignore */ + LLURL::sReturnString[LL_MAX_PATH -1] = '\0'; + return(sReturnString); +} char LLURL::sReturnString[LL_MAX_PATH] = ""; diff --git a/indra/newview/llurl.h b/indra/newview/llurl.h index 9a089dd835..e41b83d29f 100644 --- a/indra/newview/llurl.h +++ b/indra/newview/llurl.h @@ -79,6 +79,7 @@ public: virtual const char *getFQURL() const; virtual const char *getFullPath(); + virtual const char *getAuthority(); virtual const char *updateRelativePath(const LLURL &url); diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index b88069cd48..cbaa7248a2 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2007-2009, Linden Research, Inc. + * Copyright (c) 2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,13 +12,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -45,10 +44,10 @@ #include "llsidetray.h" #include "llslurl.h" #include "llstartup.h" // gStartupState -#include "llurlsimstring.h" #include "llweb.h" #include "llworldmapmessage.h" #include "llurldispatcherlistener.h" +#include "llviewernetwork.h" // library includes #include "llnotificationsutil.h" @@ -59,25 +58,25 @@ static LLURLDispatcherListener sURLDispatcherListener; class LLURLDispatcherImpl { public: - static bool dispatch(const std::string& url, + static bool dispatch(const LLSLURL& slurl, LLMediaCtrl* web, bool trusted_browser); // returns true if handled or explicitly blocked. - static bool dispatchRightClick(const std::string& url); + static bool dispatchRightClick(const LLSLURL& slurl); private: - static bool dispatchCore(const std::string& url, + static bool dispatchCore(const LLSLURL& slurl, bool right_mouse, LLMediaCtrl* web, bool trusted_browser); // handles both left and right click - static bool dispatchHelp(const std::string& url, bool right_mouse); + static bool dispatchHelp(const LLSLURL& slurl, bool right_mouse); // Handles sl://app.floater.html.help by showing Help floater. // Returns true if handled. - static bool dispatchApp(const std::string& url, + static bool dispatchApp(const LLSLURL& slurl, bool right_mouse, LLMediaCtrl* web, bool trusted_browser); @@ -85,16 +84,16 @@ private: // by showing panel in Search floater. // Returns true if handled or explicitly blocked. - static bool dispatchRegion(const std::string& url, bool right_mouse); + static bool dispatchRegion(const LLSLURL& slurl, bool right_mouse); // handles secondlife://Ahern/123/45/67/ // Returns true if handled. - static void regionHandleCallback(U64 handle, const std::string& url, + static void regionHandleCallback(U64 handle, const LLSLURL& slurl, const LLUUID& snapshot_id, bool teleport); // Called by LLWorldMap when a location has been resolved to a // region name - static void regionNameCallback(U64 handle, const std::string& url, + static void regionNameCallback(U64 handle, const LLSLURL& slurl, const LLUUID& snapshot_id, bool teleport); // Called by LLWorldMap when a region name has been resolved to a // location in-world, used by places-panel display. @@ -103,65 +102,58 @@ private: }; // static -bool LLURLDispatcherImpl::dispatchCore(const std::string& url, +bool LLURLDispatcherImpl::dispatchCore(const LLSLURL& slurl, bool right_mouse, LLMediaCtrl* web, bool trusted_browser) { - if (url.empty()) return false; - //if (dispatchHelp(url, right_mouse)) return true; - if (dispatchApp(url, right_mouse, web, trusted_browser)) return true; - if (dispatchRegion(url, right_mouse)) return true; + //if (dispatchHelp(slurl, right_mouse)) return true; + switch(slurl.getType()) + { + case LLSLURL::APP: + return dispatchApp(slurl, right_mouse, web, trusted_browser); + case LLSLURL::LOCATION: + return dispatchRegion(slurl, right_mouse); + default: + return false; + } /* // Inform the user we can't handle this std::map<std::string, std::string> args; - args["SLURL"] = url; + args["SLURL"] = slurl; r; */ - - return false; } // static -bool LLURLDispatcherImpl::dispatch(const std::string& url, +bool LLURLDispatcherImpl::dispatch(const LLSLURL& slurl, LLMediaCtrl* web, bool trusted_browser) { - llinfos << "url: " << url << llendl; const bool right_click = false; - return dispatchCore(url, right_click, web, trusted_browser); + return dispatchCore(slurl, right_click, web, trusted_browser); } // static -bool LLURLDispatcherImpl::dispatchRightClick(const std::string& url) +bool LLURLDispatcherImpl::dispatchRightClick(const LLSLURL& slurl) { - llinfos << "url: " << url << llendl; const bool right_click = true; LLMediaCtrl* web = NULL; const bool trusted_browser = false; - return dispatchCore(url, right_click, web, trusted_browser); + return dispatchCore(slurl, right_click, web, trusted_browser); } // static -bool LLURLDispatcherImpl::dispatchApp(const std::string& url, +bool LLURLDispatcherImpl::dispatchApp(const LLSLURL& slurl, bool right_mouse, LLMediaCtrl* web, bool trusted_browser) { - // ensure the URL is in the secondlife:///app/ format - if (!LLSLURL::isSLURLCommand(url)) - { - return false; - } - - LLURI uri(url); - LLSD pathArray = uri.pathArray(); - pathArray.erase(0); // erase "app" - std::string cmd = pathArray.get(0); - pathArray.erase(0); // erase "cmd" + llinfos << "cmd: " << slurl.getAppCmd() << " path: " << slurl.getAppPath() << " query: " << slurl.getAppQuery() << llendl; + const LLSD& query_map = LLURI::queryMap(slurl.getAppQuery()); bool handled = LLCommandDispatcher::dispatch( - cmd, pathArray, uri.queryMap(), web, trusted_browser); + slurl.getAppCmd(), slurl.getAppPath(), query_map, web, trusted_browser); // alert if we didn't handle this secondlife:///app/ SLURL // (but still return true because it is a valid app SLURL) @@ -173,81 +165,73 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url, } // static -bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mouse) +bool LLURLDispatcherImpl::dispatchRegion(const LLSLURL& slurl, bool right_mouse) { - if (!LLSLURL::isSLURL(url)) - { - return false; - } - - std::string sim_string = LLSLURL::stripProtocol(url); - std::string region_name; - S32 x = 128; - S32 y = 128; - S32 z = 0; - if (! LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z)) - { - return false; - } - + if(slurl.getType() != LLSLURL::LOCATION) + { + return false; + } // Before we're logged in, need to update the startup screen // to tell the user where they are going. if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) { - // Parse it and stash in globals, it will be dispatched in - // STATE_CLEANUP. - LLURLSimString::setString(url); // We're at the login screen, so make sure user can see // the login location box to know where they are going. - LLPanelLogin::refreshLocation( true ); + LLPanelLogin::setLocation(slurl); return true; } // LLFloaterURLDisplay functionality moved to LLPanelPlaces in Side Tray. - //LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); - //if(url_displayp) url_displayp->setName(region_name); + //LLFloaterURLDisplay* slurl_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); + //if(slurl_displayp) slurl_displayp->setName(region_name); // Request a region handle by name - LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, - LLURLDispatcherImpl::regionNameCallback, - url, - false); // don't teleport + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(slurl.getRegion(), + LLURLDispatcherImpl::regionNameCallback, + slurl.getSLURLString(), + false); // don't teleport return true; } /*static*/ -void LLURLDispatcherImpl::regionNameCallback(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport) +void LLURLDispatcherImpl::regionNameCallback(U64 region_handle, const LLSLURL& slurl, const LLUUID& snapshot_id, bool teleport) { - std::string sim_string = LLSLURL::stripProtocol(url); - std::string region_name; - S32 x = 128; - S32 y = 128; - S32 z = 0; - - if (LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z)) - { - regionHandleCallback(region_handle, url, snapshot_id, teleport); - } + + if(slurl.getType() == LLSLURL::LOCATION) + { + regionHandleCallback(region_handle, slurl, snapshot_id, teleport); + } } /* static */ -void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport) +void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL& slurl, const LLUUID& snapshot_id, bool teleport) { - std::string sim_string = LLSLURL::stripProtocol(url); - std::string region_name; - S32 x = 128; - S32 y = 128; - S32 z = 0; - LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z); - - LLVector3 local_pos; - local_pos.mV[VX] = (F32)x; - local_pos.mV[VY] = (F32)y; - local_pos.mV[VZ] = (F32)z; + // we can't teleport cross grid at this point + if((!LLGridManager::getInstance()->isSystemGrid(slurl.getGrid()) || !LLGridManager::getInstance()->isSystemGrid()) && + (slurl.getGrid() != LLGridManager::getInstance()->getGrid())) + { + LLSD args; + args["SLURL"] = slurl.getLocationString(); + args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel(); + LLSD grid_info; + LLGridManager::getInstance()->getGridInfo(slurl.getGrid(), grid_info); + + if(grid_info.has(GRID_LABEL_VALUE)) + { + args["GRID"] = grid_info[GRID_LABEL_VALUE].asString(); + } + else + { + args["GRID"] = slurl.getGrid(); + } + LLNotificationsUtil::add("CantTeleportToGrid", args); + return; + } + LLVector3d global_pos = from_region_handle(region_handle); - global_pos += LLVector3d(local_pos); + global_pos += LLVector3d(slurl.getPosition()); if (teleport) { @@ -271,8 +255,8 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str // LLFloaterURLDisplay functionality moved to LLPanelPlaces in Side Tray. // // display informational floater, allow user to click teleport btn -// LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); -// if(url_displayp) +// LLFloaterURLDisplay* slurl_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); +// if(slurl_displayp) // { // url_displayp->displayParcelInfo(region_handle, local_pos); // if(snapshot_id.notNull()) @@ -287,7 +271,7 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str //--------------------------------------------------------------------------- // Teleportation links are handled here because they are tightly coupled -// to URL parsing and sim-fragment parsing +// to SLURL parsing and sim-fragment parsing class LLTeleportHandler : public LLCommandHandler { public: @@ -303,18 +287,21 @@ public: // a global position, and teleport to it if (tokens.size() < 1) return false; - // Region names may be %20 escaped. - std::string region_name = LLURLSimString::unescapeRegionName(tokens[0]); - - // build secondlife://De%20Haro/123/45/67 for use in callback - std::string url = LLSLURL::PREFIX_SECONDLIFE; - for (int i = 0; i < tokens.size(); ++i) + LLVector3 coords(128, 128, 0); + if (tokens.size() <= 4) { - url += tokens[i].asString() + "/"; + coords = LLVector3(tokens[1].asReal(), + tokens[2].asReal(), + tokens[3].asReal()); } + + // Region names may be %20 escaped. + + std::string region_name = LLURI::unescape(tokens[0]); + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, LLURLDispatcherImpl::regionHandleCallback, - url, + LLSLURL(region_name, coords).getSLURLString(), true); // teleport return true; } @@ -324,21 +311,21 @@ LLTeleportHandler gTeleportHandler; //--------------------------------------------------------------------------- // static -bool LLURLDispatcher::dispatch(const std::string& url, +bool LLURLDispatcher::dispatch(const std::string& slurl, LLMediaCtrl* web, bool trusted_browser) { - return LLURLDispatcherImpl::dispatch(url, web, trusted_browser); + return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), web, trusted_browser); } // static -bool LLURLDispatcher::dispatchRightClick(const std::string& url) +bool LLURLDispatcher::dispatchRightClick(const std::string& slurl) { - return LLURLDispatcherImpl::dispatchRightClick(url); + return LLURLDispatcherImpl::dispatchRightClick(LLSLURL(slurl)); } // static -bool LLURLDispatcher::dispatchFromTextEditor(const std::string& url) +bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl) { // *NOTE: Text editors are considered sources of trusted URLs // in order to make avatar profile links in chat history work. @@ -348,5 +335,7 @@ bool LLURLDispatcher::dispatchFromTextEditor(const std::string& url) // *TODO: Make this trust model more refined. JC const bool trusted_browser = true; LLMediaCtrl* web = NULL; - return LLURLDispatcherImpl::dispatch(url, web, trusted_browser); + return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), web, trusted_browser); } + + diff --git a/indra/newview/llurldispatcher.h b/indra/newview/llurldispatcher.h index ff8a351253..407e417e58 100644 --- a/indra/newview/llurldispatcher.h +++ b/indra/newview/llurldispatcher.h @@ -2,9 +2,9 @@ * @file llurldispatcher.h * @brief Central registry for all SL URL handlers * - * $LicenseInfo:firstyear=2007&license=viewergpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ * - * Copyright (c) 2007-2009, Linden Research, Inc. + * Copyright (c) 2007-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,13 +12,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -31,16 +30,16 @@ */ #ifndef LLURLDISPATCHER_H #define LLURLDISPATCHER_H - class LLMediaCtrl; class LLURLDispatcher { public: - static bool dispatch(const std::string& url, + + static bool dispatch(const std::string& slurl, LLMediaCtrl* web, - bool trusted_browser); + bool trusted_browser); // At startup time and on clicks in internal web browsers, // teleport, open map, or run requested command. // @param url @@ -54,9 +53,9 @@ public: // that navigates to trusted (Linden Lab) pages. // Returns true if someone handled the URL. - static bool dispatchRightClick(const std::string& url); + static bool dispatchRightClick(const std::string& slurl); - static bool dispatchFromTextEditor(const std::string& url); + static bool dispatchFromTextEditor(const std::string& slurl); }; #endif diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp index 1d2687a8c2..8488527185 100644 --- a/indra/newview/llurllineeditorctrl.cpp +++ b/indra/newview/llurllineeditorctrl.cpp @@ -89,7 +89,7 @@ void LLURLLineEditor::copyEscapedURLToClipboard() const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length)); LLWString text_to_copy; - if (LLSLURL::isSLURL(unescaped_text)) + if (LLSLURL(unescaped_text).isValid()) text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text)); else text_to_copy = utf8str_to_wstring(unescaped_text); diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 9559311e3c..1094f030bf 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -157,21 +157,21 @@ void audio_update_volume(bool force_update) LLViewerMedia::setVolume( media_muted ? 0.0f : media_volume ); // Voice - if (gVoiceClient) + if (LLVoiceClient::getInstance()) { F32 voice_volume = gSavedSettings.getF32("AudioLevelVoice"); voice_volume = mute_volume * master_volume * voice_volume; BOOL voice_mute = gSavedSettings.getBOOL("MuteVoice"); - gVoiceClient->setVoiceVolume(voice_mute ? 0.f : voice_volume); - gVoiceClient->setMicGain(voice_mute ? 0.f : gSavedSettings.getF32("AudioLevelMic")); + LLVoiceClient::getInstance()->setVoiceVolume(voice_mute ? 0.f : voice_volume); + LLVoiceClient::getInstance()->setMicGain(voice_mute ? 0.f : gSavedSettings.getF32("AudioLevelMic")); if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized"))) { - gVoiceClient->setMuteMic(true); + LLVoiceClient::getInstance()->setMuteMic(true); } else { - gVoiceClient->setMuteMic(false); + LLVoiceClient::getInstance()->setMuteMic(false); } } } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index ee3b27c8da..f02e15706d 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -70,7 +70,6 @@ #include "llvosurfacepatch.h" #include "llvowlsky.h" #include "llrender.h" -#include "llbottomtray.h" #include "llnavigationbar.h" #include "llfloatertools.h" #include "llpaneloutfitsinventory.h" @@ -443,7 +442,7 @@ bool handleVelocityInterpolate(const LLSD& newvalue) bool handleForceShowGrid(const LLSD& newvalue) { - LLPanelLogin::refreshLocation( false ); + LLPanelLogin::updateServer( ); return true; } @@ -460,30 +459,6 @@ bool toggle_agent_pause(const LLSD& newvalue) return true; } -bool toggle_show_gesture_button(const LLSD& newvalue) -{ - LLBottomTray::getInstance()->showGestureButton(newvalue.asBoolean()); - return true; -} - -bool toggle_show_move_button(const LLSD& newvalue) -{ - LLBottomTray::getInstance()->showMoveButton(newvalue.asBoolean()); - return true; -} - -bool toggle_show_camera_button(const LLSD& newvalue) -{ - LLBottomTray::getInstance()->showCameraButton(newvalue.asBoolean()); - return true; -} - -bool toggle_show_snapshot_button(const LLSD& newvalue) -{ - LLBottomTray::getInstance()->showSnapshotButton(newvalue.asBoolean()); - return true; -} - bool toggle_show_navigation_panel(const LLSD& newvalue) { LLNavigationBar::getInstance()->showNavigationPanel(newvalue.asBoolean()); @@ -638,10 +613,6 @@ void settings_setup_listeners() gSavedSettings.getControl("QAMode")->getSignal()->connect(boost::bind(&show_debug_menus)); gSavedSettings.getControl("UseDebugMenus")->getSignal()->connect(boost::bind(&show_debug_menus)); gSavedSettings.getControl("AgentPause")->getSignal()->connect(boost::bind(&toggle_agent_pause, _2)); - gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&toggle_show_gesture_button, _2)); - gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&toggle_show_move_button, _2)); - gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&toggle_show_camera_button, _2)); - gSavedSettings.getControl("ShowSnapshotButton")->getSignal()->connect(boost::bind(&toggle_show_snapshot_button, _2)); gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&toggle_show_navigation_panel, _2)); gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2)); gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2)); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index f0800e82e7..3482ac508e 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -731,6 +731,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; LLMemType mt_ss(LLMemType::MTYPE_DISPLAY_STATE_SORT); + gPipeline.sAllowRebuildPriorityGroup = TRUE ; gPipeline.stateSort(*LLViewerCamera::getInstance(), result); stop_glerror(); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 506cebfe73..49ea0348f9 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -49,6 +49,7 @@ #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" #include "llfloaterbuycurrency.h" +#include "llfloaterbuycurrencyhtml.h" #include "llfloaterbuyland.h" #include "llfloaterbulkpermission.h" #include "llfloaterbump.h" @@ -141,6 +142,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("beacons", "floater_beacons.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBeacons>); LLFloaterReg::add("bulk_perms", "floater_bulk_perms.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBulkPermission>); LLFloaterReg::add("buy_currency", "floater_buy_currency.xml", &LLFloaterBuyCurrency::buildFloater); + LLFloaterReg::add("buy_currency_html", "floater_buy_currency_html.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuyCurrencyHTML>); LLFloaterReg::add("buy_land", "floater_buy_land.xml", &LLFloaterBuyLand::buildFloater); LLFloaterReg::add("buy_object", "floater_buy_object.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuy>); LLFloaterReg::add("buy_object_contents", "floater_buy_contents.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuyContents>); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index b39ee8b2e0..e2be49e4cc 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -36,7 +36,6 @@ #include "llnotificationsutil.h" #include "llsdserialize.h" #include "message.h" -#include "indra_constants.h" #include "llagent.h" #include "llagentcamera.h" @@ -62,9 +61,9 @@ #include "llviewerwindow.h" #include "lltrans.h" #include "llappearancemgr.h" -#include "llfloatercustomize.h" #include "llcommandhandler.h" #include "llviewermessage.h" +#include "llsidepanelappearance.h" ///---------------------------------------------------------------------------- /// Helper class to store special inventory item names @@ -96,6 +95,42 @@ public: mInventoryItemsDict["New Script"] = LLTrans::getString("New Script"); mInventoryItemsDict["New Folder"] = LLTrans::getString("New Folder"); mInventoryItemsDict["Contents"] = LLTrans::getString("Contents"); + + mInventoryItemsDict["Gesture"] = LLTrans::getString("Gesture"); + mInventoryItemsDict["Male Gestures"] = LLTrans::getString("Male Gestures"); + mInventoryItemsDict["Female Gestures"] = LLTrans::getString("Female Gestures"); + mInventoryItemsDict["Other Gestures"] = LLTrans::getString("Other Gestures"); + mInventoryItemsDict["Speech Gestures"] = LLTrans::getString("Speech Gestures"); + mInventoryItemsDict["Common Gestures"] = LLTrans::getString("Common Gestures"); + + //predefined gestures + + //male + mInventoryItemsDict["Male - Excuse me"] = LLTrans::getString("Male - Excuse me"); + mInventoryItemsDict["Male - Get lost"] = LLTrans::getString("Male - Get lost"); + mInventoryItemsDict["Male - Blow kiss"] = LLTrans::getString("Male - Blow kiss"); + mInventoryItemsDict["Male - Boo"] = LLTrans::getString("Male - Boo"); + mInventoryItemsDict["Male - Bored"] = LLTrans::getString("Male - Bored"); + mInventoryItemsDict["Male - Hey"] = LLTrans::getString("Male - Hey"); + mInventoryItemsDict["Male - Laugh"] = LLTrans::getString("Male - Laugh"); + mInventoryItemsDict["Male - Repulsed"] = LLTrans::getString("Male - Repulsed"); + mInventoryItemsDict["Male - Shrug"] = LLTrans::getString("Male - Shrug"); + mInventoryItemsDict["Male - Stick tougue out"] = LLTrans::getString("Male - Stick tougue out"); + mInventoryItemsDict["Male - Wow"] = LLTrans::getString("Male - Wow"); + + //female + mInventoryItemsDict["FeMale - Excuse me"] = LLTrans::getString("FeMale - Excuse me"); + mInventoryItemsDict["FeMale - Get lost"] = LLTrans::getString("FeMale - Get lost"); + mInventoryItemsDict["FeMale - Blow kiss"] = LLTrans::getString("FeMale - Blow kiss"); + mInventoryItemsDict["FeMale - Boo"] = LLTrans::getString("FeMale - Boo"); + mInventoryItemsDict["Female - Bored"] = LLTrans::getString("Female - Bored"); + mInventoryItemsDict["Female - Hey"] = LLTrans::getString("Female - Hey"); + mInventoryItemsDict["Female - Laugh"] = LLTrans::getString("Female - Laugh"); + mInventoryItemsDict["Female - Repulsed"] = LLTrans::getString("Female - Repulsed"); + mInventoryItemsDict["Female - Shrug"] = LLTrans::getString("Female - Shrug"); + mInventoryItemsDict["Female - Stick tougue out"]= LLTrans::getString("Female - Stick tougue out"); + mInventoryItemsDict["Female - Wow"] = LLTrans::getString("Female - Wow"); + } }; @@ -299,10 +334,14 @@ void LLViewerInventoryItem::fetchFromServer(void) const // we have to check region. It can be null after region was destroyed. See EXT-245 if (region) { - if( ALEXANDRIA_LINDEN_ID.getString() == mPermissions.getOwner().getString()) - url = region->getCapability("FetchLib"); - else - url = region->getCapability("FetchInventory"); + if(gAgent.getID() != mPermissions.getOwner()) + { + url = region->getCapability("FetchLib"); + } + else + { + url = region->getCapability("FetchInventory"); + } } else { @@ -587,7 +626,7 @@ bool LLViewerInventoryCategory::fetch() std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents"); if (!url.empty()) //Capability found. Build up LLSD and use it. { - LLInventoryModelBackgroundFetch::instance().start(mUUID); + LLInventoryModelBackgroundFetch::instance().start(mUUID, false); } else { //Deprecated, but if we don't have a capability, use the old system. @@ -724,8 +763,8 @@ void LLViewerInventoryCategory::determineFolderType() return; if (item->isWearableType()) { - const EWearableType wearable_type = item->getWearableType(); - const std::string& wearable_name = LLWearableDictionary::getTypeName(wearable_type); + const LLWearableType::EType wearable_type = item->getWearableType(); + const std::string& wearable_name = LLWearableType::getTypeName(wearable_type); U64 valid_folder_types = LLViewerFolderType::lookupValidFolderTypes(wearable_name); folder_valid |= valid_folder_types; folder_invalid |= ~valid_folder_types; @@ -841,12 +880,14 @@ void WearOnAvatarCallback::fire(const LLUUID& inv_item) void ModifiedCOFCallback::fire(const LLUUID& inv_item) { LLAppearanceMgr::instance().updateAppearanceFromCOF(); - if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) + // TODO: camera mode may not be changed if a debug setting is tweaked + if( gAgentCamera.cameraCustomizeAvatar() ) { // If we're in appearance editing mode, the current tab may need to be refreshed - if (gFloaterCustomize) + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if (panel) { - gFloaterCustomize->switchToDefaultSubpart(); + panel->showDefaultSubpart(); } } } @@ -909,7 +950,7 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, const LLUUID& parent, const LLTransactionID& transaction_id, const std::string& name, const std::string& desc, LLAssetType::EType asset_type, - LLInventoryType::EType inv_type, EWearableType wtype, + LLInventoryType::EType inv_type, LLWearableType::EType wtype, U32 next_owner_perm, LLPointer<LLInventoryCallback> cb) { @@ -1196,10 +1237,10 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons else { // Use for all clothing and body parts. Adding new wearable types requires updating LLWearableDictionary. - EWearableType wearable_type = LLWearableDictionary::typeNameToType(type_name); - if (wearable_type >= WT_SHAPE && wearable_type < WT_COUNT) + LLWearableType::EType wearable_type = LLWearableType::typeNameToType(type_name); + if (wearable_type >= LLWearableType::WT_SHAPE && wearable_type < LLWearableType::WT_COUNT) { - LLAssetType::EType asset_type = LLWearableDictionary::getAssetType(wearable_type); + LLAssetType::EType asset_type = LLWearableType::getAssetType(wearable_type); LLFolderType::EType folder_type = LLFolderType::assetTypeToFolderType(asset_type); const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(folder_type); LLFolderBridge::createWearable(parent_id, wearable_type); @@ -1537,14 +1578,13 @@ bool LLViewerInventoryItem::isWearableType() const return (getInventoryType() == LLInventoryType::IT_WEARABLE); } -EWearableType LLViewerInventoryItem::getWearableType() const +LLWearableType::EType LLViewerInventoryItem::getWearableType() const { if (!isWearableType()) { - llwarns << "item is not a wearable" << llendl; - return WT_INVALID; + return LLWearableType::WT_INVALID; } - return EWearableType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK); + return LLWearableType::EType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK); } @@ -1650,6 +1690,20 @@ bool LLViewerInventoryItem::checkPermissionsSet(PermissionMask mask) const return ((curr_mask & mask) == mask); } +PermissionMask LLViewerInventoryItem::getPermissionMask() const +{ + const LLPermissions& permissions = getPermissions(); + + BOOL copy = permissions.allowCopyBy(gAgent.getID()); + BOOL mod = permissions.allowModifyBy(gAgent.getID()); + BOOL xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID()); + PermissionMask perm_mask = 0; + if (copy) perm_mask |= PERM_COPY; + if (mod) perm_mask |= PERM_MODIFY; + if (xfer) perm_mask |= PERM_TRANSFER; + return perm_mask; +} + //---------- void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index f296ce35ff..8ab7c9710d 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -74,7 +74,7 @@ public: virtual const LLSaleInfo& getSaleInfo() const; virtual LLInventoryType::EType getInventoryType() const; virtual bool isWearableType() const; - virtual EWearableType getWearableType() const; + virtual LLWearableType::EType getWearableType() const; virtual U32 getFlags() const; virtual time_t getCreationDate() const; virtual U32 getCRC32() const; // really more of a checksum. @@ -159,6 +159,7 @@ public: // Checks the items permissions (for owner, group, or everyone) and returns true if all mask bits are set. bool checkPermissionsSet(PermissionMask mask) const; + PermissionMask getPermissionMask() const; // callback void onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name); @@ -310,14 +311,14 @@ public: extern LLInventoryCallbackManager gInventoryCallbacks; -#define NOT_WEARABLE (EWearableType)0 +#define NOT_WEARABLE (LLWearableType::EType)0 // *TODO: Find a home for these void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, const LLUUID& parent, const LLTransactionID& transaction_id, const std::string& name, const std::string& desc, LLAssetType::EType asset_type, - LLInventoryType::EType inv_type, EWearableType wtype, + LLInventoryType::EType inv_type, LLWearableType::EType wtype, U32 next_owner_perm, LLPointer<LLInventoryCallback> cb); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 1f6687bd83..14e58f4167 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1934,13 +1934,13 @@ void LLViewerMediaImpl::updateVolume() } else if (mProximityCamera > gSavedSettings.getF32("MediaRollOffMin")) { - // attenuated_volume = v / ( 1 + (roll_off_rate * (d - min))^2 + // attenuated_volume = 1 / (roll_off_rate * (d - min))^2 // the +1 is there so that for distance 0 the volume stays the same F64 adjusted_distance = mProximityCamera - gSavedSettings.getF32("MediaRollOffMin"); - F64 attenuation = gSavedSettings.getF32("MediaRollOffRate") * adjusted_distance; - attenuation = attenuation * attenuation; + F64 attenuation = 1.0 + (gSavedSettings.getF32("MediaRollOffRate") * adjusted_distance); + attenuation = 1.0 / (attenuation * attenuation); // the attenuation multiplier should never be more than one since that would increase volume - volume = volume * llmin(1.0, 1 /(attenuation + 1)); + volume = volume * llmin(1.0, attenuation); } } @@ -2808,6 +2808,33 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla } break; + case MEDIA_EVENT_CLICK_LINK_HREF: + { + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_HREF, target is \"" << plugin->getClickTarget() << "\", uri is " << plugin->getClickURL() << LL_ENDL; + // retrieve the event parameters + std::string url = plugin->getClickURL(); + U32 target_type = plugin->getClickTargetType(); + + switch (target_type) + { + case LLPluginClassMedia::TARGET_EXTERNAL: + // force url to external browser + LLWeb::loadURLExternal(url); + break; + case LLPluginClassMedia::TARGET_BLANK: + // open in SL media browser or external browser based on user pref + LLWeb::loadURL(url); + break; + case LLPluginClassMedia::TARGET_NONE: + // ignore this click and let media plugin handle it + break; + case LLPluginClassMedia::TARGET_OTHER: + LL_WARNS("LinkTarget") << "Unsupported link target type" << LL_ENDL; + break; + default: break; + } + }; + break; case MEDIA_EVENT_PLUGIN_FAILED_LAUNCH: { // The plugin failed to load properly. Make sure the timer doesn't retry. diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index c1e851350b..02e450b223 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -215,6 +215,8 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, // We need the aspect ratio, and the 3 components of the bbox as height, width, and depth. F32 aspect_ratio = getBBoxAspectRatio(bbox, normal, &height, &width, &depth); F32 camera_aspect = LLViewerCamera::getInstance()->getAspect(); + + lldebugs << "normal = " << normal << ", aspect_ratio = " << aspect_ratio << ", camera_aspect = " << camera_aspect << llendl; // We will normally use the side of the volume aligned with the short side of the screen (i.e. the height for // a screen in a landscape aspect ratio), however there is an edge case where the aspect ratio of the object is @@ -231,11 +233,15 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, { angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect()); distance = width * 0.5 * padding_factor / tan(angle_of_view * 0.5f ); + + lldebugs << "using width (" << width << "), angle_of_view = " << angle_of_view << ", distance = " << distance << llendl; } else { angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView()); distance = height * 0.5 * padding_factor / tan(angle_of_view * 0.5f ); + + lldebugs << "using height (" << height << "), angle_of_view = " << angle_of_view << ", distance = " << distance << llendl; } distance += depth * 0.5; @@ -440,40 +446,38 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3& LLVector3 bbox_max = bbox.getExtentLocal(); F32 dot1 = 0.f; F32 dot2 = 0.f; + + lldebugs << "bounding box local size = " << bbox_max << ", local_normal = " << local_normal << llendl; // The largest component of the localized normal vector is the depth component // meaning that the other two are the legs of the rectangle. local_normal.abs(); - if(local_normal.mV[VX] > local_normal.mV[VY]) + + // Using temporary variables for these makes the logic a bit more readable. + bool XgtY = (local_normal.mV[VX] > local_normal.mV[VY]); + bool XgtZ = (local_normal.mV[VX] > local_normal.mV[VZ]); + bool YgtZ = (local_normal.mV[VY] > local_normal.mV[VZ]); + + if(XgtY && XgtZ) { - if(local_normal.mV[VX] > local_normal.mV[VZ]) - { - // Use the y and z comps - comp1.mV[VY] = bbox_max.mV[VY]; - comp2.mV[VZ] = bbox_max.mV[VZ]; - *depth = bbox_max.mV[VX]; - } - else - { - // Use the x and y comps - comp1.mV[VY] = bbox_max.mV[VY]; - comp2.mV[VZ] = bbox_max.mV[VZ]; - *depth = bbox_max.mV[VZ]; - } + lldebugs << "x component of normal is longest, using y and z" << llendl; + comp1.mV[VY] = bbox_max.mV[VY]; + comp2.mV[VZ] = bbox_max.mV[VZ]; + *depth = bbox_max.mV[VX]; } - else if(local_normal.mV[VY] > local_normal.mV[VZ]) + else if(!XgtY && YgtZ) { - // Use the x and z comps + lldebugs << "y component of normal is longest, using x and z" << llendl; comp1.mV[VX] = bbox_max.mV[VX]; comp2.mV[VZ] = bbox_max.mV[VZ]; *depth = bbox_max.mV[VY]; } else { - // Use the x and y comps - comp1.mV[VY] = bbox_max.mV[VY]; - comp2.mV[VZ] = bbox_max.mV[VZ]; - *depth = bbox_max.mV[VX]; + lldebugs << "z component of normal is longest, using x and y" << llendl; + comp1.mV[VX] = bbox_max.mV[VX]; + comp2.mV[VY] = bbox_max.mV[VY]; + *depth = bbox_max.mV[VZ]; } // The height is the vector closest to vertical in the bbox coordinate space (highest dot product value) @@ -483,12 +487,20 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3& { *height = comp1.length(); *width = comp2.length(); + + lldebugs << "comp1 = " << comp1 << ", height = " << *height << llendl; + lldebugs << "comp2 = " << comp2 << ", width = " << *width << llendl; } else { *height = comp2.length(); *width = comp1.length(); + + lldebugs << "comp2 = " << comp2 << ", height = " << *height << llendl; + lldebugs << "comp1 = " << comp1 << ", width = " << *width << llendl; } + + lldebugs << "returning " << (*width / *height) << llendl; // Return the aspect ratio. return *width / *height; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7464423f55..69352e6685 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -53,8 +53,7 @@ //#include "llfirstuse.h" #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" -#include "llfloaterbuycurrency.h" -#include "llfloatercustomize.h" +#include "llbuycurrencyhtml.h" #include "llfloatergodtools.h" #include "llfloaterinventory.h" #include "llfloaterland.h" @@ -108,6 +107,7 @@ #include "lluilistener.h" #include "llappearancemgr.h" #include "lltrans.h" +#include "lleconomy.h" using namespace LLVOAvatarDefines; @@ -292,8 +292,8 @@ void handle_toggle_pg(void*); void handle_dump_attachments(void *); void handle_dump_avatar_local_textures(void*); void handle_debug_avatar_textures(void*); -void handle_grab_texture(void*); -BOOL enable_grab_texture(void*); +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*); @@ -430,7 +430,7 @@ void init_menus() gPopupMenuView->setBackgroundColor( color ); // If we are not in production, use a different color to make it apparent. - if (LLViewerLogin::getInstance()->isInProductionGrid()) + if (LLGridManager::getInstance()->isInProductionGrid()) { color = LLUIColorTable::instance().getColor( "MenuBarBgColor" ); } @@ -446,7 +446,7 @@ void init_menus() menu_bar_holder->addChild(gMenuBarView); gViewerWindow->setMenuBackgroundColor(false, - LLViewerLogin::getInstance()->isInProductionGrid()); + LLGridManager::getInstance()->isInProductionGrid()); // Assume L$10 for now, the server will tell us the real cost at login // *TODO:Also fix cost in llfolderview.cpp for Inventory menus @@ -1460,28 +1460,28 @@ class LLAdvancedGrabBakedTexture : public view_listener_t std::string texture_type = userdata.asString(); if ("iris" == texture_type) { - handle_grab_texture( (void*)TEX_EYES_BAKED ); + handle_grab_baked_texture( (void*)BAKED_EYES ); } else if ("head" == texture_type) { - handle_grab_texture( (void*)TEX_HEAD_BAKED ); + handle_grab_baked_texture( (void*)BAKED_HEAD ); } else if ("upper" == texture_type) { - handle_grab_texture( (void*)TEX_UPPER_BAKED ); + handle_grab_baked_texture( (void*)BAKED_UPPER ); } else if ("lower" == texture_type) { - handle_grab_texture( (void*)TEX_SKIRT_BAKED ); + handle_grab_baked_texture( (void*)BAKED_LOWER ); } else if ("skirt" == texture_type) { - handle_grab_texture( (void*)TEX_SKIRT_BAKED ); + handle_grab_baked_texture( (void*)BAKED_SKIRT ); } else if ("hair" == texture_type) { - handle_grab_texture( (void*)TEX_HAIR_BAKED ); -} + handle_grab_baked_texture( (void*)BAKED_HAIR ); + } return true; } @@ -1496,23 +1496,27 @@ class LLAdvancedEnableGrabBakedTexture : public view_listener_t if ("iris" == texture_type) { - new_value = enable_grab_texture( (void*)TEX_EYES_BAKED ); + new_value = enable_grab_baked_texture( (void*)BAKED_EYES ); } else if ("head" == texture_type) { - new_value = enable_grab_texture( (void*)TEX_HEAD_BAKED ); + new_value = enable_grab_baked_texture( (void*)BAKED_HEAD ); } else if ("upper" == texture_type) { - new_value = enable_grab_texture( (void*)TEX_UPPER_BAKED ); + new_value = enable_grab_baked_texture( (void*)BAKED_UPPER ); } else if ("lower" == texture_type) { - new_value = enable_grab_texture( (void*)TEX_LOWER_BAKED ); + new_value = enable_grab_baked_texture( (void*)BAKED_LOWER ); } else if ("skirt" == texture_type) { - new_value = enable_grab_texture( (void*)TEX_SKIRT_BAKED ); + new_value = enable_grab_baked_texture( (void*)BAKED_SKIRT ); + } + else if ("hair" == texture_type) + { + new_value = enable_grab_baked_texture( (void*)BAKED_HAIR ); } return new_value; @@ -3284,7 +3288,7 @@ void handle_buy_object(LLSaleInfo sale_info) { LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", price); - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_object_costs", args), price); + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_object_costs", args), price ); return; } @@ -3468,7 +3472,7 @@ void set_god_level(U8 god_level) if(gViewerWindow) { gViewerWindow->setMenuBackgroundColor(god_level > GOD_NOT, - LLViewerLogin::getInstance()->isInProductionGrid()); + LLGridManager::getInstance()->isInProductionGrid()); } LLSD args; @@ -3508,7 +3512,7 @@ BOOL check_toggle_hacked_godmode(void*) bool enable_toggle_hacked_godmode(void*) { - return !LLViewerLogin::getInstance()->isInProductionGrid(); + return !LLGridManager::getInstance()->isInProductionGrid(); } #endif @@ -3629,6 +3633,14 @@ class LLEditEnableCustomizeAvatar : public view_listener_t } }; +class LLEnableEditShape : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return gAgentWearables.isWearableModifiable(LLWearableType::WT_SHAPE, 0); + } +}; + bool enable_sit_object() { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -3723,17 +3735,15 @@ void reset_view_final( BOOL proceed ); void handle_reset_view() { - if( (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode()) && gFloaterCustomize ) + if (gAgentCamera.cameraCustomizeAvatar()) { - // Show dialog box if needed. - gFloaterCustomize->askToSaveIfDirty( reset_view_final ); - } - else - { - gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); - reset_view_final( TRUE ); - LLFloaterCamera::resetCameraMode(); + // switching to outfit selector should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits")); } + + gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); + reset_view_final( TRUE ); + LLFloaterCamera::resetCameraMode(); } class LLViewResetView : public view_listener_t @@ -4381,7 +4391,7 @@ BOOL enable_take() return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && gAgent.isGodlike()) { return TRUE; @@ -4418,8 +4428,7 @@ void handle_buy_or_take() { LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", total_price); - LLFloaterBuyCurrency::buyCurrency( - LLTrans::getString("BuyingCosts", args), total_price); + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString( "BuyingCosts", args ), total_price ); } } else @@ -4994,7 +5003,7 @@ bool enable_object_delete() TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - (!LLViewerLogin::getInstance()->isInProductionGrid() + (!LLGridManager::getInstance()->isInProductionGrid() && gAgent.isGodlike()) || # endif LLSelectMgr::getInstance()->canDoDelete(); @@ -5597,10 +5606,17 @@ void handle_viewer_disable_message_log(void*) void handle_customize_avatar() { - if (gAgentWearables.areWearablesLoaded()) - { - gAgentCamera.changeCameraToCustomizeAvatar(); - } + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits")); +} + +void handle_edit_outfit() +{ + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); +} + +void handle_edit_shape() +{ + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_shape")); } void handle_report_abuse() @@ -5612,7 +5628,7 @@ void handle_report_abuse() void handle_buy_currency() { - LLFloaterBuyCurrency::buyCurrency(); + LLBuyCurrencyHTML::openCurrencyFloater(); } class LLFloaterVisible : public view_listener_t @@ -6638,7 +6654,7 @@ bool enable_object_take_copy() all_valid = true; #ifndef HACKED_GODLIKE_VIEWER # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (LLViewerLogin::getInstance()->isInProductionGrid() + if (LLGridManager::getInstance()->isInProductionGrid() || !gAgent.isGodlike()) # endif { @@ -6700,7 +6716,7 @@ BOOL enable_save_into_inventory(void*) return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && gAgent.isGodlike()) { return TRUE; @@ -6936,27 +6952,20 @@ void handle_debug_avatar_textures(void*) } } -void handle_grab_texture(void* data) +void handle_grab_baked_texture(void* data) { - ETextureIndex tex_index = (ETextureIndex)((intptr_t)data); + EBakedTextureIndex baked_tex_index = (EBakedTextureIndex)((intptr_t)data); if (!isAgentAvatarValid()) return; - // MULTI-WEARABLE: change to support an index - const LLUUID& asset_id = gAgentAvatarp->grabLocalTexture(tex_index, 0); + const LLUUID& asset_id = gAgentAvatarp->grabBakedTexture(baked_tex_index); LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << llendl; LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE; LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE; const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type)); if(folder_id.notNull()) { - std::string name = "Unknown"; - const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture(tex_index); - if (texture_dict->mIsBakedTexture) - { - EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; - name = "Baked " + LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_index)->mNameCapitalized; - } - name += " Texture"; + std::string name; + name = "Baked " + LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_tex_index)->mNameCapitalized + " Texture"; LLUUID item_id; item_id.generate(); @@ -7009,13 +7018,12 @@ void handle_grab_texture(void* data) } } -BOOL enable_grab_texture(void* data) +BOOL enable_grab_baked_texture(void* data) { - ETextureIndex index = (ETextureIndex)((intptr_t)data); + EBakedTextureIndex index = (EBakedTextureIndex)((intptr_t)data); if (isAgentAvatarValid()) { - // MULTI-WEARABLE: - return gAgentAvatarp->canGrabLocalTexture(index,0); + return gAgentAvatarp->canGrabBakedTexture(index); } return FALSE; } @@ -7474,8 +7482,8 @@ class LLEditEnableTakeOff : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string clothing = userdata.asString(); - EWearableType type = LLWearableDictionary::typeNameToType(clothing); - if (type >= WT_SHAPE && type < WT_COUNT) + LLWearableType::EType type = LLWearableType::typeNameToType(clothing); + if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) return LLAgentWearables::selfHasWearable(type); return false; } @@ -7490,8 +7498,8 @@ class LLEditTakeOff : public view_listener_t LLWearableBridge::removeAllClothesFromAvatar(); else { - EWearableType type = LLWearableDictionary::typeNameToType(clothing); - if (type >= WT_SHAPE && type < WT_COUNT) + LLWearableType::EType type = LLWearableType::typeNameToType(clothing); + if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) { // MULTI-WEARABLES LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(gAgentWearables.getWearableInventoryItem(type,0)); @@ -7648,6 +7656,42 @@ class LLWorldToggleCameraControls : public view_listener_t } }; +class LLUploadCostCalculator : public view_listener_t +{ + std::string mCostStr; + + bool handleEvent(const LLSD& userdata) + { + std::string menu_name = userdata.asString(); + gMenuHolder->childSetLabelArg(menu_name, "[COST]", mCostStr); + + return true; + } + + void calculateCost(); + +public: + LLUploadCostCalculator() + { + calculateCost(); + } +}; + +void LLUploadCostCalculator::calculateCost() +{ + S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + + // getPriceUpload() returns -1 if no data available yet. + if(upload_cost >= 0) + { + mCostStr = llformat("%d", upload_cost); + } + else + { + mCostStr = llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); + } +} + void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y) { static LLMenuGL* show_navbar_context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_hide_navbar.xml", @@ -7689,6 +7733,8 @@ void initialize_menus() enable.add("IsGodCustomerService", boost::bind(&is_god_customer_service)); enable.add("IsGodCustomerService", boost::bind(&is_god_customer_service)); + view_listener_t::addEnable(new LLUploadCostCalculator(), "Upload.CalculateCosts"); + // Agent commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying)); enable.add("Agent.enableFlying", boost::bind(&LLAgent::enableFlying)); @@ -7719,7 +7765,10 @@ void initialize_menus() view_listener_t::addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate"); view_listener_t::addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff"); view_listener_t::addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar"); + view_listener_t::addMenu(new LLEnableEditShape(), "Edit.EnableEditShape"); commit.add("CustomizeAvatar", boost::bind(&handle_customize_avatar)); + commit.add("EditOutfit", boost::bind(&handle_edit_outfit)); + commit.add("EditShape", boost::bind(&handle_edit_shape)); // View menu view_listener_t::addMenu(new LLViewMouselook(), "View.Mouselook"); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index c415d89e9c..5570fe5fec 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -39,7 +39,7 @@ #include "llagentcamera.h" #include "llfilepicker.h" #include "llfloaterreg.h" -#include "llfloaterbuycurrency.h" +#include "llbuycurrencyhtml.h" #include "llfloatersnapshot.h" #include "llimage.h" #include "llimagebmp.h" @@ -811,7 +811,7 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt LLStringUtil::format_map_t args; args["NAME"] = data->mAssetInfo.getName(); args["AMOUNT"] = llformat("%d", expected_upload_cost); - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("UploadingCosts", args), expected_upload_cost); + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("UploadingCosts", args), expected_upload_cost ); is_balance_sufficient = FALSE; } else if(region) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 5dd9623955..5836aff4e7 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -55,8 +55,7 @@ #include "llagent.h" #include "llagentcamera.h" #include "llcallingcard.h" -//#include "llfirstuse.h" -#include "llfloaterbuycurrency.h" +#include "llbuycurrencyhtml.h" #include "llfloaterbuyland.h" #include "llfloaterland.h" #include "llfloaterregioninfo.h" @@ -283,7 +282,7 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_ { LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", amount); - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("giving", args), amount); + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("giving", args), amount ); } } @@ -774,11 +773,11 @@ private: * We can't create it each time items are moved because "drop" event is sent separately for each * element even while multi-dragging. We have to have the only instance of the observer. See EXT-4347. */ -class LLViewerInventoryMoveFromWorldObserver : public LLInventoryMoveFromWorldObserver +class LLViewerInventoryMoveFromWorldObserver : public LLInventoryAddItemByAssetObserver { public: LLViewerInventoryMoveFromWorldObserver() - : LLInventoryMoveFromWorldObserver() + : LLInventoryAddItemByAssetObserver() , mActivePanel(NULL) { @@ -796,7 +795,7 @@ private: mSelectedItems.clear(); if (mActivePanel) { - mActivePanel->getRootFolder()->getSelectionList(mSelectedItems); + mSelectedItems = mActivePanel->getRootFolder()->getSelectionList(); } mSelectedItems.erase(mMoveIntoFolderID); } @@ -829,8 +828,7 @@ private: } // get selected items (without destination folder) - selected_items_t selected_items; - mActivePanel->getRootFolder()->getSelectionList(selected_items); + selected_items_t selected_items = mActivePanel->getRootFolder()->getSelectionList(); selected_items.erase(mMoveIntoFolderID); // compare stored & current sets of selected items @@ -1237,7 +1235,6 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, bool matches(const LLNotificationPtr notification) const { if(notification->getName() == "ObjectGiveItem" - || notification->getName() == "ObjectGiveItemUnknownUser" || notification->getName() == "UserGiveItem") { return (notification->getPayload()["from_id"].asUUID() == blocked_id); @@ -1700,7 +1697,6 @@ void LLOfferInfo::initRespondFunctionMap() if(mRespondFunctions.empty()) { mRespondFunctions["ObjectGiveItem"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2); - mRespondFunctions["ObjectGiveItemUnknownUser"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2); mRespondFunctions["UserGiveItem"] = boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2); } } @@ -1771,30 +1767,6 @@ void inventory_offer_handler(LLOfferInfo* info) return; } - // Name cache callbacks don't store userdata, so can't save - // off the LLOfferInfo. Argh. - BOOL name_found = FALSE; - if (info->mFromGroup) - { - std::string group_name; - if (gCacheName->getGroupName(info->mFromID, group_name)) - { - args["FIRST"] = group_name; - args["LAST"] = ""; - name_found = TRUE; - } - } - else - { - std::string first_name, last_name; - if (gCacheName->getName(info->mFromID, first_name, last_name)) - { - args["FIRST"] = first_name; - args["LAST"] = last_name; - name_found = TRUE; - } - } - // If mObjectID is null then generate the object_id based on msg to prevent // multiple creation of chiclets for same object. LLUUID object_id = info->mObjectID; @@ -1809,9 +1781,9 @@ void inventory_offer_handler(LLOfferInfo* info) payload["give_inventory_notification"] = FALSE; args["OBJECTFROMNAME"] = info->mFromName; args["NAME"] = info->mFromName; - args["NAME_SLURL"] = LLSLURL::buildCommand("agent", info->mFromID, "about"); + args["NAME_SLURL"] = LLSLURL("agent", info->mFromID, "about").getSLURLString(); std::string verb = "select?name=" + LLURI::escape(msg); - args["ITEM_SLURL"] = LLSLURL::buildCommand("inventory", info->mObjectID, verb.c_str()); + args["ITEM_SLURL"] = LLSLURL("inventory", info->mObjectID, verb.c_str()).getSLURLString(); LLNotification::Params p("ObjectGiveItem"); @@ -1823,9 +1795,9 @@ void inventory_offer_handler(LLOfferInfo* info) // Note: sets inventory_task_offer_callback as the callback p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info)); info->mPersist = true; - p.name = name_found ? "ObjectGiveItem" : "ObjectGiveItemUnknownUser"; + p.name = "ObjectGiveItem"; // Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory. - LLNotifications::instance().add(p); + LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, info->mFromGroup == TRUE); } else // Agent -> Agent Inventory Offer { @@ -2354,7 +2326,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["MESSAGE"] = message; - LLNotificationsUtil::add("JoinGroup", args, payload, join_group_response); + // we shouldn't pass callback functor since it is registered in LLFunctorRegistration + LLNotificationsUtil::add("JoinGroup", args, payload); } } break; @@ -2540,10 +2513,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) query_string["groupowned"] = "true"; } - std::ostringstream link; - link << "secondlife:///app/objectim/" << session_id << LLURI::mapToQueryString(query_string); - - chat.mURL = link.str(); + chat.mURL = LLSLURL("objectim", session_id, "").getSLURLString(); chat.mText = message; // Note: lie to Nearby Chat, pretending that this is NOT an IM, because @@ -2551,8 +2521,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); if(SYSTEM_FROM != name && nearby_chat) { + chat.mOwnerID = from_id; LLSD args; - args["owner_id"] = from_id; args["slurl"] = location; args["type"] = LLNotificationsUI::NT_NEARBYCHAT; LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); @@ -2638,7 +2608,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; // *TODO: Translate -> [FIRST] [LAST] (maybe) - args["NAME_SLURL"] = LLSLURL::buildCommand("agent", from_id, "about"); + args["NAME_SLURL"] = LLSLURL("agent", from_id, "about").getSLURLString(); args["MESSAGE"] = message; args["MATURITY_STR"] = region_access_str; args["MATURITY_ICON"] = region_access_icn; @@ -2710,7 +2680,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { - args["NAME_SLURL"] = LLSLURL::buildCommand("agent", from_id, "about"); + args["NAME_SLURL"] = LLSLURL("agent", from_id, "about").getSLURLString(); if(message.empty()) { //support for frienship offers from clients before July 2008 @@ -3082,7 +3052,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // object inspect for an object that is chatting with you LLSD args; args["type"] = LLNotificationsUI::NT_NEARBYCHAT; - args["owner_id"] = owner_id; + chat.mOwnerID = owner_id; LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); } @@ -3474,7 +3444,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) { // Chat the "back" SLURL. (DEV-4907) - LLSD substitution = LLSD().with("[T_SLURL]", gAgent.getTeleportSourceSLURL()); + LLSLURL slurl; + gAgent.getTeleportSourceSLURL(slurl); + LLSD substitution = LLSD().with("[T_SLURL]", slurl.getSLURLString()); std::string completed_from = LLAgent::sTeleportProgressMessages["completed_from"]; LLStringUtil::format(completed_from, substitution); @@ -5875,7 +5847,9 @@ void send_group_notice(const LLUUID& group_id, bool handle_lure_callback(const LLSD& notification, const LLSD& response) { std::string text = response["message"].asString(); - text.append("\r\n").append(LLAgentUI::buildSLURL()); + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl); + text.append("\r\n").append(slurl.getSLURLString()); S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(0 == option) @@ -6318,7 +6292,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLFloaterBuyLand::updateEstateName(estate_name); std::string owner_name = - LLSLURL::buildCommand("agent", estate_owner_id, "inspect"); + LLSLURL("agent", estate_owner_id, "inspect").getSLURLString(); LLPanelEstateCovenant::updateEstateOwnerName(owner_name); LLPanelLandCovenant::updateEstateOwnerName(owner_name); LLFloaterBuyLand::updateEstateOwnerName(owner_name); @@ -6498,3 +6472,4 @@ void LLOfferInfo::forceResponse(InventoryOfferResponse response) params.functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2)); LLNotifications::instance().forceResponse(params, response); } + diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 987d23630a..fec112b9e7 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2006&license=viewergpl$ * - * Copyright (c) 2006-2009, Linden Research, Inc. + * Copyright (c) 2006-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -13,13 +13,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -34,303 +33,542 @@ #include "llviewerprecompiledheaders.h" #include "llviewernetwork.h" +#include "llviewercontrol.h" +#include "llsdserialize.h" +#include "llsecapi.h" +#include "llweb.h" -#include "llevents.h" -#include "net.h" + +const char* DEFAULT_LOGIN_PAGE = "http://secondlife.com/app/login/"; -#include "llviewercontrol.h" -#include "lllogin.h" +const char* SYSTEM_GRID_SLURL_BASE = "secondlife://%s/secondlife/"; +const char* MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/"; +const char* SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app"; -struct LLGridData -{ - const char* mLabel; - const char* mName; - const char* mLoginURI; - const char* mHelperURI; -}; +const char* DEFAULT_SLURL_BASE = "https://%s/region/"; +const char* DEFAULT_APP_SLURL_BASE = "x-grid-location-info://%s/app"; -static LLGridData gGridInfo[GRID_INFO_COUNT] = +LLGridManager::LLGridManager() { - { "None", "", "", ""}, - { "Aditi", - "util.aditi.lindenlab.com", - "https://login.aditi.lindenlab.com/cgi-bin/login.cgi", - "http://aditi-secondlife.webdev.lindenlab.com/helpers/" }, - { "Agni", - "util.agni.lindenlab.com", - "https://login.agni.lindenlab.com/cgi-bin/login.cgi", - "https://secondlife.com/helpers/" }, - { "Aruna", - "util.aruna.lindenlab.com", - "https://login.aruna.lindenlab.com/cgi-bin/login.cgi", - "http://aruna-secondlife.webdev.lindenlab.com/helpers/" }, - { "Bharati", - "util.bharati.lindenlab.com", - "https://login.bharati.lindenlab.com/cgi-bin/login.cgi", - "http://bharati-secondlife.webdev.lindenlab.com/helpers/" }, - { "Chandra", - "util.chandra.lindenlab.com", - "https://login.chandra.lindenlab.com/cgi-bin/login.cgi", - "http://chandra-secondlife.webdev.lindenlab.com/helpers/" }, - { "Damballah", - "util.damballah.lindenlab.com", - "https://login.damballah.lindenlab.com/cgi-bin/login.cgi", - "http://damballah-secondlife.webdev.lindenlab.com/helpers/" }, - { "Danu", - "util.danu.lindenlab.com", - "https://login.danu.lindenlab.com/cgi-bin/login.cgi", - "http://danu-secondlife.webdev.lindenlab.com/helpers/" }, - { "Durga", - "util.durga.lindenlab.com", - "https://login.durga.lindenlab.com/cgi-bin/login.cgi", - "http://durga-secondlife.webdev.lindenlab.com/helpers/" }, - { "Ganga", - "util.ganga.lindenlab.com", - "https://login.ganga.lindenlab.com/cgi-bin/login.cgi", - "http://ganga-secondlife.webdev.lindenlab.com/helpers/" }, - { "Mitra", - "util.mitra.lindenlab.com", - "https://login.mitra.lindenlab.com/cgi-bin/login.cgi", - "http://mitra-secondlife.webdev.lindenlab.com/helpers/" }, - { "Mohini", - "util.mohini.lindenlab.com", - "https://login.mohini.lindenlab.com/cgi-bin/login.cgi", - "http://mohini-secondlife.webdev.lindenlab.com/helpers/" }, - { "Nandi", - "util.nandi.lindenlab.com", - "https://login.nandi.lindenlab.com/cgi-bin/login.cgi", - "http://nandi-secondlife.webdev.lindenlab.com/helpers/" }, - { "Parvati", - "util.parvati.lindenlab.com", - "https://login.parvati.lindenlab.com/cgi-bin/login.cgi", - "http://parvati-secondlife.webdev.lindenlab.com/helpers/" }, - { "Radha", - "util.radha.lindenlab.com", - "https://login.radha.lindenlab.com/cgi-bin/login.cgi", - "http://radha-secondlife.webdev.lindenlab.com/helpers/" }, - { "Ravi", - "util.ravi.lindenlab.com", - "https://login.ravi.lindenlab.com/cgi-bin/login.cgi", - "http://ravi-secondlife.webdev.lindenlab.com/helpers/" }, - { "Siva", - "util.siva.lindenlab.com", - "https://login.siva.lindenlab.com/cgi-bin/login.cgi", - "http://siva-secondlife.webdev.lindenlab.com/helpers/" }, - { "Shakti", - "util.shakti.lindenlab.com", - "https://login.shakti.lindenlab.com/cgi-bin/login.cgi", - "http://shakti-secondlife.webdev.lindenlab.com/helpers/" }, - { "Skanda", - "util.skanda.lindenlab.com", - "https://login.skanda.lindenlab.com/cgi-bin/login.cgi", - "http://skanda-secondlife.webdev.lindenlab.com/helpers/" }, - { "Soma", - "util.soma.lindenlab.com", - "https://login.soma.lindenlab.com/cgi-bin/login.cgi", - "http://soma-secondlife.webdev.lindenlab.com/helpers/" }, - { "Uma", - "util.uma.lindenlab.com", - "https://login.uma.lindenlab.com/cgi-bin/login.cgi", - "http://uma-secondlife.webdev.lindenlab.com/helpers/" }, - { "Vaak", - "util.vaak.lindenlab.com", - "https://login.vaak.lindenlab.com/cgi-bin/login.cgi", - "http://vaak-secondlife.webdev.lindenlab.com/helpers/" }, - { "Yami", - "util.yami.lindenlab.com", - "https://login.yami.lindenlab.com/cgi-bin/login.cgi", - "http://yami-secondlife.webdev.lindenlab.com/helpers/" }, - { "Local", - "localhost", - "https://login.dmz.lindenlab.com/cgi-bin/login.cgi", - "" }, - { "Other", - "", - "https://login.dmz.lindenlab.com/cgi-bin/login.cgi", - "" } -}; - -const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_AGNI; - - -unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ - -LLViewerLogin::LLViewerLogin() : - mGridChoice(DEFAULT_GRID_CHOICE) + // by default, we use the 'grids.xml' file in the user settings directory + // this file is an LLSD file containing multiple grid definitions. + // This file does not contain definitions for secondlife.com grids, + // as that would be a security issue when they are overwritten by + // an attacker. Don't want someone snagging a password. + std::string grid_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + "grids.xml"); + initialize(grid_file); + +} + + +LLGridManager::LLGridManager(const std::string& grid_file) { + // initialize with an explicity grid file for testing. + initialize(grid_file); } - LLViewerLogin::~LLViewerLogin() - { - } +// +// LLGridManager - class for managing the list of known grids, and the current +// selection +// + + +// +// LLGridManager::initialze - initialize the list of known grids based +// on the fixed list of linden grids (fixed for security reasons) +// the grids.xml file +// and the command line. +void LLGridManager::initialize(const std::string& grid_file) +{ + // default grid list. + // Don't move to a modifiable file for security reasons, + mGrid.clear() ; + // set to undefined + mGridList = LLSD(); + mGridFile = grid_file; + // as we don't want an attacker to override our grid list + // to point the default grid to an invalid grid + addSystemGrid("None", "", "", "", DEFAULT_LOGIN_PAGE); + -void LLViewerLogin::setGridChoice(EGridInfo grid) -{ - if(grid < 0 || grid >= GRID_INFO_COUNT) - { - llerrs << "Invalid grid index specified." << llendl; - return; - } - if(mGridChoice != grid || gSavedSettings.getS32("ServerChoice") != grid) + addSystemGrid("Agni", + MAINGRID, + "https://login.agni.lindenlab.com/cgi-bin/login.cgi", + "https://secondlife.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Aditi", + "util.aditi.lindenlab.com", + "https://login.aditi.lindenlab.com/cgi-bin/login.cgi", + "http://aditi-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Aruna", + "util.aruna.lindenlab.com", + "https://login.aruna.lindenlab.com/cgi-bin/login.cgi", + "http://aruna-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Bharati", + "util.bharati.lindenlab.com", + "https://login.bharati.lindenlab.com/cgi-bin/login.cgi", + "http://bharati-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Chandra", + "util.chandra.lindenlab.com", + "https://login.chandra.lindenlab.com/cgi-bin/login.cgi", + "http://chandra-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Damballah", + "util.damballah.lindenlab.com", + "https://login.damballah.lindenlab.com/cgi-bin/login.cgi", + "http://damballah-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Danu", + "util.danu.lindenlab.com", + "https://login.danu.lindenlab.com/cgi-bin/login.cgi", + "http://danu-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Durga", + "util.durga.lindenlab.com", + "https://login.durga.lindenlab.com/cgi-bin/login.cgi", + "http://durga-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Ganga", + "util.ganga.lindenlab.com", + "https://login.ganga.lindenlab.com/cgi-bin/login.cgi", + "http://ganga-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Mitra", + "util.mitra.lindenlab.com", + "https://login.mitra.lindenlab.com/cgi-bin/login.cgi", + "http://mitra-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Mohini", + "util.mohini.lindenlab.com", + "https://login.mohini.lindenlab.com/cgi-bin/login.cgi", + "http://mohini-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Nandi", + "util.nandi.lindenlab.com", + "https://login.nandi.lindenlab.com/cgi-bin/login.cgi", + "http://nandi-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Parvati", + "util.parvati.lindenlab.com", + "https://login.parvati.lindenlab.com/cgi-bin/login.cgi", + "http://parvati-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Radha", + "util.radha.lindenlab.com", + "https://login.radha.lindenlab.com/cgi-bin/login.cgi", + "http://radha-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Ravi", + "util.ravi.lindenlab.com", + "https://login.ravi.lindenlab.com/cgi-bin/login.cgi", + "http://ravi-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Siva", + "util.siva.lindenlab.com", + "https://login.siva.lindenlab.com/cgi-bin/login.cgi", + "http://siva-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Shakti", + "util.shakti.lindenlab.com", + "https://login.shakti.lindenlab.com/cgi-bin/login.cgi", + "http://shakti-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Soma", + "util.soma.lindenlab.com", + "https://login.soma.lindenlab.com/cgi-bin/login.cgi", + "http://soma-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Uma", + "util.uma.lindenlab.com", + "https://login.uma.lindenlab.com/cgi-bin/login.cgi", + "http://uma-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Vaak", + "util.vaak.lindenlab.com", + "https://login.vaak.lindenlab.com/cgi-bin/login.cgi", + "http://vaak-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Yami", + "util.yami.lindenlab.com", + "https://login.yami.lindenlab.com/cgi-bin/login.cgi", + "http://yami-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Local (Linden)", + "localhost", + "https://login.dmz.lindenlab.com/cgi-bin/login.cgi", + "", + DEFAULT_LOGIN_PAGE); + + + LLSD other_grids; + llifstream llsd_xml; + if (!grid_file.empty()) { - mGridChoice = grid; - if(GRID_INFO_LOCAL == mGridChoice) - { - mGridName = LOOPBACK_ADDRESS_STRING; - } - else if(GRID_INFO_OTHER == mGridChoice) + llsd_xml.open( grid_file.c_str(), std::ios::in | std::ios::binary ); + + // parse through the gridfile, inserting grids into the list unless + // they overwrite a linden grid. + if( llsd_xml.is_open()) { - // *FIX:Mani - could this possibly be valid? - mGridName = "other"; - } - else + LLSDSerialize::fromXMLDocument( other_grids, llsd_xml ); + if(other_grids.isMap()) + { + for(LLSD::map_iterator grid_itr = other_grids.beginMap(); + grid_itr != other_grids.endMap(); + ++grid_itr) + { + LLSD::String key_name = grid_itr->first; + LLSD grid = grid_itr->second; + // TODO: Make sure gridfile specified label is not + // a system grid label + LL_DEBUGS("GridManager") << "reading: " << key_name << LL_ENDL; + if (mGridList.has(key_name) && + mGridList[key_name].has(GRID_IS_SYSTEM_GRID_VALUE)) + { + LL_DEBUGS("GridManager") << "Cannot override grid " << key_name << " as it's a system grid" << LL_ENDL; + // If the system grid does exist in the grids file, and it's marked as a favorite, set it as a favorite. + if(grid_itr->second.has(GRID_IS_FAVORITE_VALUE) && grid_itr->second[GRID_IS_FAVORITE_VALUE].asBoolean() ) + { + mGridList[key_name][GRID_IS_FAVORITE_VALUE] = TRUE; + } + } + else + { + try + { + addGrid(grid); + LL_DEBUGS("GridManager") << "Added grid: " << key_name << LL_ENDL; + } + catch (...) + { + } + } + } + llsd_xml.close(); + } + } + } + + // load a grid from the command line. + // if the actual grid name is specified from the command line, + // set it as the 'selected' grid. + std::string cmd_line_grid = gSavedSettings.getString("CmdLineGridChoice"); + if(!cmd_line_grid.empty()) + { + // try to find the grid assuming the command line parameter is + // the case-insensitive 'label' of the grid. ie 'Agni' + mGrid = getGridByLabel(cmd_line_grid); + if(mGrid.empty()) { - mGridName = gGridInfo[mGridChoice].mLabel; + // if we couldn't find it, assume the + // requested grid is the actual grid 'name' or index, + // which would be the dns name of the grid (for non + // linden hosted grids) + // If the grid isn't there, that's ok, as it will be + // automatically added later. + mGrid = cmd_line_grid; } + + } + else + { + // if a grid was not passed in via the command line, grab it from the CurrentGrid setting. + // if there's no current grid, that's ok as it'll be either set by the value passed + // in via the login uri if that's specified, or will default to maingrid + mGrid = gSavedSettings.getString("CurrentGrid"); + } + + if(mGrid.empty()) + { + // no grid was specified so default to maingrid + LL_DEBUGS("GridManager") << "Setting grid to MAINGRID as no grid has been specified " << LL_ENDL; + mGrid = MAINGRID; + + } + + // generate a 'grid list' entry for any command line parameter overrides + // or setting overides that we'll add to the grid list or override + // any grid list entries with. + LLSD grid = LLSD::emptyMap(); + + if(mGridList.has(mGrid)) + { + grid = mGridList[mGrid]; + } + else + { + grid[GRID_VALUE] = mGrid; + // add the grid with the additional values, or update the + // existing grid if it exists with the given values + addGrid(grid); + } - gSavedSettings.setS32("ServerChoice", mGridChoice); - gSavedSettings.setString("CustomServer", ""); + LL_DEBUGS("GridManager") << "Selected grid is " << mGrid << LL_ENDL; + setGridChoice(mGrid); + if(mGridList[mGrid][GRID_LOGIN_URI_VALUE].isArray()) + { + llinfos << "is array" << llendl; } } -void LLViewerLogin::setGridChoice(const std::string& grid_name) +LLGridManager::~LLGridManager() { - // Set the grid choice based on a string. - // The string can be: - // - a grid label from the gGridInfo table - // - an ip address - if(!grid_name.empty()) - { - // find the grid choice from the user setting. - int grid_index = GRID_INFO_NONE; - for(;grid_index < GRID_INFO_OTHER; ++grid_index) - { - if(0 == LLStringUtil::compareInsensitive(gGridInfo[grid_index].mLabel, grid_name)) - { - // Founding a matching label in the list... - setGridChoice((EGridInfo)grid_index); - break; - } - } - - if(GRID_INFO_OTHER == grid_index) - { - // *FIX:MEP Can and should we validate that this is an IP address? - mGridChoice = GRID_INFO_OTHER; - mGridName = grid_name; - gSavedSettings.setS32("ServerChoice", mGridChoice); - gSavedSettings.setString("CustomServer", mGridName); - } - } + saveFavorites(); } -void LLViewerLogin::resetURIs() +void LLGridManager::getGridInfo(const std::string &grid, LLSD& grid_info) { - // Clear URIs when picking a new server - gSavedSettings.setLLSD("CmdLineLoginURI", LLSD::emptyArray()); - gSavedSettings.setString("CmdLineHelperURI", ""); + + grid_info = mGridList[grid]; + + // override any grid data with the command line info. + + LLSD cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI"); + if (cmd_line_login_uri.isString()) + { + grid_info[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray(); + grid_info[GRID_LOGIN_URI_VALUE].append(cmd_line_login_uri); + } + + // override the helper uri if it was passed in + std::string cmd_line_helper_uri = gSavedSettings.getString("CmdLineHelperURI"); + if(!cmd_line_helper_uri.empty()) + { + grid_info[GRID_HELPER_URI_VALUE] = cmd_line_helper_uri; + } + + // override the login page if it was passed in + std::string cmd_line_login_page = gSavedSettings.getString("LoginPage"); + if(!cmd_line_login_page.empty()) + { + grid_info[GRID_LOGIN_PAGE_VALUE] = cmd_line_login_page; + } } -EGridInfo LLViewerLogin::getGridChoice() const + +// +// LLGridManager::addGrid - add a grid to the grid list, populating the needed values +// if they're not populated yet. +// + +void LLGridManager::addGrid(LLSD& grid_data) { - return mGridChoice; + if (grid_data.isMap() && grid_data.has(GRID_VALUE)) + { + std::string grid = utf8str_tolower(grid_data[GRID_VALUE]); + + // grid should be in the form of a dns address + if (!grid.empty() && + grid.find_first_not_of("abcdefghijklmnopqrstuvwxyz1234567890-_. ") != std::string::npos) + { + printf("grid name: %s", grid.c_str()); + throw LLInvalidGridName(grid); + } + + // populate the other values if they don't exist + if (!grid_data.has(GRID_LABEL_VALUE)) + { + grid_data[GRID_LABEL_VALUE] = grid; + } + if (!grid_data.has(GRID_ID_VALUE)) + { + grid_data[GRID_ID_VALUE] = grid; + } + + // if the grid data doesn't include any of the URIs, then + // generate them from the grid, which should be a dns address + if (!grid_data.has(GRID_LOGIN_URI_VALUE)) + { + grid_data[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray(); + grid_data[GRID_LOGIN_URI_VALUE].append(std::string("https://") + + grid + "/cgi-bin/login.cgi"); + } + // Populate to the default values + if (!grid_data.has(GRID_LOGIN_PAGE_VALUE)) + { + grid_data[GRID_LOGIN_PAGE_VALUE] = std::string("http://") + grid + "/app/login/"; + } + if (!grid_data.has(GRID_HELPER_URI_VALUE)) + { + grid_data[GRID_HELPER_URI_VALUE] = std::string("https://") + grid + "/helpers/"; + } + + if (!grid_data.has(GRID_LOGIN_IDENTIFIER_TYPES)) + { + // non system grids and grids that haven't already been configured with values + // get both types of credentials. + grid_data[GRID_LOGIN_IDENTIFIER_TYPES] = LLSD::emptyArray(); + grid_data[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_AGENT); + grid_data[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_ACCOUNT); + } + + LL_DEBUGS("GridManager") << "ADDING: " << grid << LL_ENDL; + mGridList[grid] = grid_data; + } } -std::string LLViewerLogin::getGridLabel() const +// +// LLGridManager::addSystemGrid - helper for adding a system grid. +void LLGridManager::addSystemGrid(const std::string& label, + const std::string& name, + const std::string& login, + const std::string& helper, + const std::string& login_page, + const std::string& login_id) { - if(mGridChoice == GRID_INFO_NONE) + LLSD grid = LLSD::emptyMap(); + grid[GRID_VALUE] = name; + grid[GRID_LABEL_VALUE] = label; + grid[GRID_HELPER_URI_VALUE] = helper; + grid[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray(); + grid[GRID_LOGIN_URI_VALUE].append(login); + grid[GRID_LOGIN_PAGE_VALUE] = login_page; + grid[GRID_IS_SYSTEM_GRID_VALUE] = TRUE; + grid[GRID_LOGIN_IDENTIFIER_TYPES] = LLSD::emptyArray(); + grid[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_AGENT); + + grid[GRID_APP_SLURL_BASE] = SYSTEM_GRID_APP_SLURL_BASE; + if (login_id.empty()) + { + grid[GRID_ID_VALUE] = name; + } + else + { + grid[GRID_ID_VALUE] = login_id; + } + + // only add the system grids beyond agni to the visible list + // if we're building a debug version. + if (name == std::string(MAINGRID)) { - return "None"; + grid[GRID_SLURL_BASE] = MAIN_GRID_SLURL_BASE; + grid[GRID_IS_FAVORITE_VALUE] = TRUE; } - else if(mGridChoice < GRID_INFO_OTHER) + else { - return gGridInfo[mGridChoice].mLabel; + grid[GRID_SLURL_BASE] = llformat(SYSTEM_GRID_SLURL_BASE, label.c_str()); + } + addGrid(grid); +} + +// return a list of grid name -> grid label mappings for UI purposes +std::map<std::string, std::string> LLGridManager::getKnownGrids(bool favorite_only) +{ + std::map<std::string, std::string> result; + for(LLSD::map_iterator grid_iter = mGridList.beginMap(); + grid_iter != mGridList.endMap(); + grid_iter++) + { + if(!favorite_only || grid_iter->second.has(GRID_IS_FAVORITE_VALUE)) + { + result[grid_iter->first] = grid_iter->second[GRID_LABEL_VALUE].asString(); + } } - return mGridName; + return result; } -std::string LLViewerLogin::getKnownGridLabel(EGridInfo grid_index) const + +void LLGridManager::setGridChoice(const std::string& grid) { - if(grid_index > GRID_INFO_NONE && grid_index < GRID_INFO_OTHER) + // Set the grid choice based on a string. + // The string can be: + // - a grid label from the gGridInfo table + // - a hostname + // - an ip address + + // loop through. We could do just a hash lookup but we also want to match + // on label + std::string grid_name = grid; + if(!mGridList.has(grid_name)) + { + // case insensitive + grid_name = getGridByLabel(grid); + } + + if(grid_name.empty()) { - return gGridInfo[grid_index].mLabel; + // the grid was not in the list of grids. + LLSD grid_data = LLSD::emptyMap(); + grid_data[GRID_VALUE] = grid; + addGrid(grid_data); } - return gGridInfo[GRID_INFO_NONE].mLabel; + mGrid = grid; + gSavedSettings.setString("CurrentGrid", grid); } -void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const +std::string LLGridManager::getGridByLabel( const std::string &grid_label, bool case_sensitive) { - // return the login uri set on the command line. - LLControlVariable* c = gSavedSettings.getControl("CmdLineLoginURI"); - if(c) + for(LLSD::map_iterator grid_iter = mGridList.beginMap(); + grid_iter != mGridList.endMap(); + grid_iter++) { - LLSD v = c->getValue(); - if(v.isArray()) + if (grid_iter->second.has(GRID_LABEL_VALUE)) { - for(LLSD::array_const_iterator itr = v.beginArray(); - itr != v.endArray(); ++itr) + if (0 == (case_sensitive?LLStringUtil::compareStrings(grid_label, grid_iter->second[GRID_LABEL_VALUE].asString()): + LLStringUtil::compareInsensitive(grid_label, grid_iter->second[GRID_LABEL_VALUE].asString()))) { - std::string uri = itr->asString(); - if(!uri.empty()) - { - uris.push_back(uri); - } - } - } - else - { - std::string uri = v.asString(); - if(!uri.empty()) - { - uris.push_back(uri); + return grid_iter->first; } } } + return std::string(); +} - // If there was no command line uri... - if(uris.empty()) +void LLGridManager::getLoginURIs(std::vector<std::string>& uris) +{ + uris.clear(); + LLSD cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI"); + if (cmd_line_login_uri.isString()) + { + uris.push_back(cmd_line_login_uri); + return; + } + for (LLSD::array_iterator llsd_uri = mGridList[mGrid][GRID_LOGIN_URI_VALUE].beginArray(); + llsd_uri != mGridList[mGrid][GRID_LOGIN_URI_VALUE].endArray(); + llsd_uri++) { - // If its a known grid choice, get the uri from the table, - // else try the grid name. - if(mGridChoice > GRID_INFO_NONE && mGridChoice < GRID_INFO_OTHER) - { - uris.push_back(gGridInfo[mGridChoice].mLoginURI); - } - else - { - uris.push_back(mGridName); - } + uris.push_back(llsd_uri->asString()); } } -std::string LLViewerLogin::getHelperURI() const +std::string LLGridManager::getHelperURI() { - std::string helper_uri = gSavedSettings.getString("CmdLineHelperURI"); - if (helper_uri.empty()) + std::string cmd_line_helper_uri = gSavedSettings.getString("CmdLineHelperURI"); + if(!cmd_line_helper_uri.empty()) { - // grab URI from selected grid - if(mGridChoice > GRID_INFO_NONE && mGridChoice < GRID_INFO_OTHER) - { - helper_uri = gGridInfo[mGridChoice].mHelperURI; - } - - if (helper_uri.empty()) - { - // what do we do with unnamed/miscellaneous grids? - // for now, operations that rely on the helper URI (currency/land purchasing) will fail - } + return cmd_line_helper_uri; } - return helper_uri; + return mGridList[mGrid][GRID_HELPER_URI_VALUE]; +} + +std::string LLGridManager::getLoginPage() +{ + // override the login page if it was passed in + std::string cmd_line_login_page = gSavedSettings.getString("LoginPage"); + if(!cmd_line_login_page.empty()) + { + return cmd_line_login_page; + } + + return mGridList[mGrid][GRID_LOGIN_PAGE_VALUE]; } -bool LLViewerLogin::isInProductionGrid() +bool LLGridManager::isInProductionGrid() { // *NOTE:Mani This used to compare GRID_INFO_AGNI to gGridChoice, // but it seems that loginURI trumps that. std::vector<std::string> uris; getLoginURIs(uris); + if (uris.size() < 1) + { + return 1; + } LLStringUtil::toLower(uris[0]); if((uris[0].find("agni") != std::string::npos)) { @@ -339,3 +577,51 @@ bool LLViewerLogin::isInProductionGrid() return false; } + +void LLGridManager::saveFavorites() +{ + // filter out just those marked as favorites + LLSD output_grid_list = LLSD::emptyMap(); + for(LLSD::map_iterator grid_iter = mGridList.beginMap(); + grid_iter != mGridList.endMap(); + grid_iter++) + { + if(grid_iter->second.has(GRID_IS_FAVORITE_VALUE)) + { + output_grid_list[grid_iter->first] = grid_iter->second; + } + } + llofstream llsd_xml; + llsd_xml.open( mGridFile.c_str(), std::ios::out | std::ios::binary); + LLSDSerialize::toPrettyXML(output_grid_list, llsd_xml); + llsd_xml.close(); +} + + +// build a slurl for the given region within the selected grid +std::string LLGridManager::getSLURLBase(const std::string& grid) +{ + std::string grid_base; + if(mGridList.has(grid) && mGridList[grid].has(GRID_SLURL_BASE)) + { + return mGridList[grid][GRID_SLURL_BASE].asString(); + } + else + { + return llformat(DEFAULT_SLURL_BASE, grid.c_str()); + } +} + +// build a slurl for the given region within the selected grid +std::string LLGridManager::getAppSLURLBase(const std::string& grid) +{ + std::string grid_base; + if(mGridList.has(grid) && mGridList[grid].has(GRID_APP_SLURL_BASE)) + { + return mGridList[grid][GRID_APP_SLURL_BASE].asString(); + } + else + { + return llformat(DEFAULT_APP_SLURL_BASE, grid.c_str()); + } +} diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h index edae6dc47b..8c3a15b7cf 100644 --- a/indra/newview/llviewernetwork.h +++ b/indra/newview/llviewernetwork.h @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2006&license=viewergpl$ * - * Copyright (c) 2006-2009, Linden Research, Inc. + * Copyright (c) 2006-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -13,13 +13,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -33,83 +32,124 @@ #ifndef LL_LLVIEWERNETWORK_H #define LL_LLVIEWERNETWORK_H + +extern const char* DEFAULT_LOGIN_PAGE; + +#define GRID_VALUE "name" +#define GRID_LABEL_VALUE "label" +#define GRID_ID_VALUE "grid_login_id" +#define GRID_LOGIN_URI_VALUE "login_uri" +#define GRID_HELPER_URI_VALUE "helper_uri" +#define GRID_LOGIN_PAGE_VALUE "login_page" +#define GRID_IS_SYSTEM_GRID_VALUE "system_grid" +#define GRID_IS_FAVORITE_VALUE "favorite" +#define MAINGRID "util.agni.lindenlab.com" +#define GRID_LOGIN_IDENTIFIER_TYPES "login_identifier_types" +// defines slurl formats associated with various grids. +// we need to continue to support existing forms, as slurls +// are shared between viewers that may not understand newer +// forms. +#define GRID_SLURL_BASE "slurl_base" +#define GRID_APP_SLURL_BASE "app_slurl_base" -#include <boost/scoped_ptr.hpp> - -class LLHost; -class LLLogin; - -enum EGridInfo +class LLInvalidGridName { - GRID_INFO_NONE, - GRID_INFO_ADITI, - GRID_INFO_AGNI, - GRID_INFO_ARUNA, - GRID_INFO_BHARATI, - GRID_INFO_CHANDRA, - GRID_INFO_DAMBALLAH, - GRID_INFO_DANU, - GRID_INFO_DURGA, - GRID_INFO_GANGA, - GRID_INFO_MITRA, - GRID_INFO_MOHINI, - GRID_INFO_NANDI, - GRID_INFO_PARVATI, - GRID_INFO_RADHA, - GRID_INFO_RAVI, - GRID_INFO_SIVA, - GRID_INFO_SHAKTI, - GRID_INFO_SKANDA, - GRID_INFO_SOMA, - GRID_INFO_UMA, - GRID_INFO_VAAK, - GRID_INFO_YAMI, - GRID_INFO_LOCAL, - GRID_INFO_OTHER, // IP address set via command line option - GRID_INFO_COUNT +public: + LLInvalidGridName(std::string grid) : mGrid(grid) + { + } +protected: + std::string mGrid; }; + /** - * @brief A class to manage the viewer's login state. + * @brief A class to manage the grids available to the viewer + * including persistance. This class also maintains the currently + * selected grid. * **/ -class LLViewerLogin : public LLSingleton<LLViewerLogin> +class LLGridManager : public LLSingleton<LLGridManager> { public: - LLViewerLogin(); - ~LLViewerLogin(); - - void setGridChoice(EGridInfo grid); - void setGridChoice(const std::string& grid_name); - void resetURIs(); + + // when the grid manager is instantiated, the default grids are automatically + // loaded, and the grids favorites list is loaded from the xml file. + LLGridManager(const std::string& grid_file); + LLGridManager(); + ~LLGridManager(); + + void initialize(const std::string& grid_file); + // grid list management + + // add a grid to the list of grids + void addGrid(LLSD& grid_info); - /** - * @brief Get the enumeration of the grid choice. - * Should only return values > 0 && < GRID_INFO_COUNT - **/ - EGridInfo getGridChoice() const; - - /** - * @brief Get a readable label for the grid choice. - * Returns the readable name for the grid choice. - * If the grid is 'other', returns something - * the string used to specifiy the grid. - **/ - std::string getGridLabel() const; - - std::string getKnownGridLabel(EGridInfo grid_index) const; - - void getLoginURIs(std::vector<std::string>& uris) const; - std::string getHelperURI() const; + // retrieve a map of grid-name <-> label + // by default only return the user visible grids + std::map<std::string, std::string> getKnownGrids(bool favorites_only=FALSE); + + void getGridInfo(const std::string& grid, LLSD &grid_info); + + // current grid management + // select a given grid as the current grid. If the grid + // is not a known grid, then it's assumed to be a dns name for the + // grid, and the various URIs will be automatically generated. + void setGridChoice(const std::string& grid); + + + std::string getGridLabel() { return mGridList[mGrid][GRID_LABEL_VALUE]; } + std::string getGrid() const { return mGrid; } + void getLoginURIs(std::vector<std::string>& uris); + std::string getHelperURI(); + std::string getLoginPage(); + std::string getGridLoginID() { return mGridList[mGrid][GRID_ID_VALUE]; } + std::string getLoginPage(const std::string& grid) { return mGridList[grid][GRID_LOGIN_PAGE_VALUE]; } + void getLoginIdentifierTypes(LLSD& idTypes) { idTypes = mGridList[mGrid][GRID_LOGIN_IDENTIFIER_TYPES]; } + + // build a slurl for the given region within the selected grid + std::string getSLURLBase(const std::string& grid); + std::string getSLURLBase() { return getSLURLBase(mGrid); } + + std::string getAppSLURLBase(const std::string& grid); + std::string getAppSLURLBase() { return getAppSLURLBase(mGrid); } + + void getGridInfo(LLSD &grid_info) { getGridInfo(mGrid, grid_info); } + + std::string getGridByLabel( const std::string &grid_label, bool case_sensitive = false); + + bool isSystemGrid(const std::string& grid) + { + return mGridList.has(grid) && + mGridList[grid].has(GRID_IS_SYSTEM_GRID_VALUE) && + mGridList[grid][GRID_IS_SYSTEM_GRID_VALUE].asBoolean(); + } + bool isSystemGrid() { return isSystemGrid(mGrid); } + // Mark this grid as a favorite that should be persisited on 'save' + // this is currently used to persist a grid after a successful login + void setFavorite() { mGridList[mGrid][GRID_IS_FAVORITE_VALUE] = TRUE; } + bool isInProductionGrid(); + void saveFavorites(); + void clearFavorites(); + +protected: -private: - EGridInfo mGridChoice; - std::string mGridName; + // helper function for adding the predefined grids + void addSystemGrid(const std::string& label, + const std::string& name, + const std::string& login, + const std::string& helper, + const std::string& login_page, + const std::string& login_id = ""); + + + std::string mGrid; + std::string mGridFile; + LLSD mGridList; }; const S32 MAC_ADDRESS_BYTES = 6; -extern unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ #endif diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index bb7933c10e..ee89680fea 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4727,7 +4727,7 @@ BOOL LLViewerObject::permYouOwner() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4764,7 +4764,7 @@ BOOL LLViewerObject::permOwnerModify() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4788,7 +4788,7 @@ BOOL LLViewerObject::permModify() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4812,7 +4812,7 @@ BOOL LLViewerObject::permCopy() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4836,7 +4836,7 @@ BOOL LLViewerObject::permMove() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4860,7 +4860,7 @@ BOOL LLViewerObject::permTransfer() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index b7c265be59..bdc34d0f18 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -768,9 +768,11 @@ void send_stats() system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB(); system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); system["cpu"] = gSysCPU.getCPUString(); + unsigned char MACAddress[MAC_ADDRESS_BYTES]; + LLUUID::getNodeID(MACAddress); std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x", - gMACAddress[0],gMACAddress[1],gMACAddress[2], - gMACAddress[3],gMACAddress[4],gMACAddress[5]); + MACAddress[0],MACAddress[1],MACAddress[2], + MACAddress[3],MACAddress[4],MACAddress[5]); system["mac_address"] = macAddressString; system["serial_number"] = LLAppViewer::instance()->getSerialNumber(); std::string gpu_desc = llformat( diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index c883087cf2..d8a9ce9374 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -492,6 +492,7 @@ void LLViewerTexture::init(bool firstinit) mTextureState = NO_DELETE ; mDontDiscard = FALSE; + mCanResetMaxVirtualSize = true ; mMaxVirtualSize = 0.f; mNeedsGLTexture = FALSE ; mNeedsResetMaxVirtualSize = FALSE ; @@ -540,6 +541,11 @@ void LLViewerTexture::setBoostLevel(S32 level) if(mBoostLevel != LLViewerTexture::BOOST_NONE) { setNoDelete() ; + + if(LLViewerTexture::BOOST_AVATAR_BAKED_SELF == mBoostLevel || LLViewerTexture::BOOST_AVATAR_BAKED == mBoostLevel) + { + mCanResetMaxVirtualSize = false ; + } } if(gAuditTexture) { @@ -613,7 +619,7 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co void LLViewerTexture::resetTextureStats() { - mMaxVirtualSize = 0.0f; + mMaxVirtualSize = 0.0f ; mAdditionalDecodePriority = 0.f ; mNeedsResetMaxVirtualSize = FALSE ; } @@ -1071,6 +1077,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mRequestedDiscardLevel = -1; mRequestedDownloadPriority = 0.f; mFullyLoaded = FALSE; + mCanUseHTTP = true ; mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; @@ -1665,7 +1672,11 @@ void LLViewerFetchedTexture::updateVirtualSize() setAdditionalDecodePriority(facep->getImportanceToCamera()) ; } } - mNeedsResetMaxVirtualSize = TRUE ; + + if(mCanResetMaxVirtualSize) + { + mNeedsResetMaxVirtualSize = TRUE ; + } reorganizeFaceList() ; reorganizeVolumeList(); } @@ -1746,7 +1757,7 @@ bool LLViewerFetchedTexture::updateFetch() else { mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority, - mFetchPriority, mFetchDeltaTime, mRequestDeltaTime); + mFetchPriority, mFetchDeltaTime, mRequestDeltaTime, mCanUseHTTP); } // We may have data ready regardless of whether or not we are finished (e.g. waiting on write) @@ -1882,11 +1893,17 @@ bool LLViewerFetchedTexture::updateFetch() h = mGLTexturep->getHeight(0); c = mComponents; } + + const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + if (override_tex_discard_level != 0) + { + desired_discard = override_tex_discard_level; + } // bypass texturefetch directly by pulling from LLTextureCache bool fetch_request_created = false; fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(mUrl, getID(),getTargetHost(), decode_priority, - w, h, c, desired_discard, needsAux()); + w, h, c, desired_discard, needsAux(), mCanUseHTTP); if (fetch_request_created) { @@ -1894,7 +1911,7 @@ bool LLViewerFetchedTexture::updateFetch() mIsFetching = TRUE; mRequestedDiscardLevel = desired_discard; mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority, - mFetchPriority, mFetchDeltaTime, mRequestDeltaTime); + mFetchPriority, mFetchDeltaTime, mRequestDeltaTime, mCanUseHTTP); } // if createRequest() failed, we're finishing up a request for this UUID, @@ -3291,7 +3308,10 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() } } - mNeedsResetMaxVirtualSize = TRUE ; + if(mCanResetMaxVirtualSize) + { + mNeedsResetMaxVirtualSize = TRUE ; + } reorganizeFaceList() ; reorganizeVolumeList(); diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index a09a711cc7..1bd4cc793d 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -263,6 +263,7 @@ protected: S32 mFullHeight; BOOL mUseMipMaps ; S8 mComponents; + bool mCanResetMaxVirtualSize; mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need? mutable S8 mNeedsGLTexture; mutable BOOL mNeedsResetMaxVirtualSize ; @@ -292,8 +293,8 @@ protected: INACTIVE, //not be used for the last certain period (i.e., 30 seconds). ACTIVE, //just being used, can become inactive if not being used for a certain time (10 seconds). NO_DELETE = 99 //stay in memory, can not be removed. - } LLGLTexureState; - LLGLTexureState mTextureState ; + } LLGLTextureState; + LLGLTextureState mTextureState ; public: static const U32 sCurrentFileVersion; @@ -456,6 +457,8 @@ public: BOOL isFullyLoaded() const; BOOL hasFetcher() const { return mHasFetcher;} + void setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;} + protected: /*virtual*/ void switchToCachedImage(); S32 getCurrentDiscardLevelForFetching() ; @@ -505,6 +508,7 @@ protected: S8 mIsRawImageValid; S8 mHasFetcher; // We've made a fecth request S8 mIsFetching; // Fetch request is active + bool mCanUseHTTP ; //This texture can be fetched through http if true. mutable S8 mIsMissingAsset; // True if we know that there is no image asset with this image id in the database. diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index d8918bdb73..1e3311dafe 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -478,7 +478,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, } else { - //by default, the texure can not be removed from memory even if it is not used. + //by default, the texture can not be removed from memory even if it is not used. //here turn this off //if this texture should be set to NO_DELETE, call setNoDelete() afterwards. imagep->forceActive() ; diff --git a/indra/newview/llviewervisualparam.cpp b/indra/newview/llviewervisualparam.cpp index fad398e00b..422e530dc6 100644 --- a/indra/newview/llviewervisualparam.cpp +++ b/indra/newview/llviewervisualparam.cpp @@ -45,7 +45,7 @@ //----------------------------------------------------------------------------- LLViewerVisualParamInfo::LLViewerVisualParamInfo() : - mWearableType( WT_INVALID ), + mWearableType( LLWearableType::WT_INVALID ), mCrossWearable(FALSE), mCamDist( 0.5f ), mCamAngle( 0.f ), @@ -77,7 +77,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) static LLStdStringHandle wearable_string = LLXmlTree::addAttributeString("wearable"); if( node->getFastAttributeString( wearable_string, wearable) ) { - mWearableType = LLWearableDictionary::typeNameToType( wearable ); + mWearableType = LLWearableType::typeNameToType( wearable ); } static LLStdStringHandle edit_group_string = LLXmlTree::addAttributeString("edit_group"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a96a6bf1b3..d91f232f0e 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -85,7 +85,6 @@ #include "lltooltip.h" #include "llmediaentry.h" #include "llurldispatcher.h" -#include "llurlsimstring.h" // newview includes #include "llagent.h" @@ -107,7 +106,6 @@ #include "llfloaterbuildoptions.h" #include "llfloaterbuyland.h" #include "llfloatercamera.h" -#include "llfloatercustomize.h" #include "llfloaterland.h" #include "llfloaterinspect.h" #include "llfloatermap.h" @@ -622,107 +620,112 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK x = llround((F32)x / mDisplayScale.mV[VX]); y = llround((F32)y / mDisplayScale.mV[VY]); - if (down) - { - buttonstatestr = "down" ; - } - else - { - buttonstatestr = "up" ; - } - - switch (clicktype) - { - case LLMouseHandler::CLICK_LEFT: - mLeftMouseDown = down; - buttonname = "Left"; - break; - case LLMouseHandler::CLICK_RIGHT: - mRightMouseDown = down; - buttonname = "Right"; - break; - case LLMouseHandler::CLICK_MIDDLE: - mMiddleMouseDown = down; - buttonname = "Middle"; - break; - case LLMouseHandler::CLICK_DOUBLELEFT: - mLeftMouseDown = down; - buttonname = "Left Double Click"; - break; - } - - LLView::sMouseHandlerMessage.clear(); + // only send mouse clicks to UI if UI is visible + if(gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { - if (gMenuBarView) - { - // stop ALT-key access to menu - gMenuBarView->resetMenuTrigger(); - } + if (down) + { + buttonstatestr = "down" ; + } + else + { + buttonstatestr = "up" ; + } + + switch (clicktype) + { + case LLMouseHandler::CLICK_LEFT: + mLeftMouseDown = down; + buttonname = "Left"; + break; + case LLMouseHandler::CLICK_RIGHT: + mRightMouseDown = down; + buttonname = "Right"; + break; + case LLMouseHandler::CLICK_MIDDLE: + mMiddleMouseDown = down; + buttonname = "Middle"; + break; + case LLMouseHandler::CLICK_DOUBLELEFT: + mLeftMouseDown = down; + buttonname = "Left Double Click"; + break; + } + + LLView::sMouseHandlerMessage.clear(); - if (gDebugClicks) - { - llinfos << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << llendl; - } + if (gMenuBarView) + { + // stop ALT-key access to menu + gMenuBarView->resetMenuTrigger(); + } - // Make sure we get a corresponding mouseup event, even if the mouse leaves the window - if (down) - mWindow->captureMouse(); - else - mWindow->releaseMouse(); + if (gDebugClicks) + { + llinfos << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << llendl; + } - // Indicate mouse was active - LLUI::resetMouseIdleTimer(); + // Make sure we get a corresponding mouseup event, even if the mouse leaves the window + if (down) + mWindow->captureMouse(); + else + mWindow->releaseMouse(); - // Don't let the user move the mouse out of the window until mouse up. - if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() ) - { - mWindow->setMouseClipping(down); - } + // Indicate mouse was active + LLUI::resetMouseIdleTimer(); - LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); - if( mouse_captor ) - { - S32 local_x; - S32 local_y; - mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); - if (LLView::sDebugMouseHandling) + // Don't let the user move the mouse out of the window until mouse up. + if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() ) { - llinfos << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << llendl; + mWindow->setMouseClipping(down); } - return mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down); - } - - // Topmost view gets a chance before the hierarchy - //LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); - //if (top_ctrl) - //{ - // S32 local_x, local_y; - // top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); - // if (top_ctrl->pointInView(local_x, local_y)) - // { - // return top_ctrl->handleAnyMouseClick(local_x, local_y, mask, clicktype, down) ; - // } - // else - // { - // if (down) - // { - // gFocusMgr.setTopCtrl(NULL); - // } - // } - //} - - // Give the UI views a chance to process the click - if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ) - { - if (LLView::sDebugMouseHandling) + + LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); + if( mouse_captor ) + { + S32 local_x; + S32 local_y; + mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); + if (LLView::sDebugMouseHandling) + { + llinfos << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << llendl; + } + return mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down); + } + + // Topmost view gets a chance before the hierarchy + //LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); + //if (top_ctrl) + //{ + // S32 local_x, local_y; + // top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); + // if (top_ctrl->pointInView(local_x, local_y)) + // { + // return top_ctrl->handleAnyMouseClick(local_x, local_y, mask, clicktype, down) ; + // } + // else + // { + // if (down) + // { + // gFocusMgr.setTopCtrl(NULL); + // } + // } + //} + + // Give the UI views a chance to process the click + if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ) { - llinfos << buttonname << " Mouse " << buttonstatestr << " " << LLView::sMouseHandlerMessage << llendl; + if (LLView::sDebugMouseHandling) + { + llinfos << buttonname << " Mouse " << buttonstatestr << " " << LLView::sMouseHandlerMessage << llendl; + } + return TRUE; + } + else if (LLView::sDebugMouseHandling) + { + llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl; } - return TRUE; - } - else if (LLView::sDebugMouseHandling) - { - llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl; } // Do not allow tool manager to handle mouseclicks if we have disconnected @@ -799,7 +802,7 @@ BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK m BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) { BOOL down = TRUE; - gVoiceClient->middleMouseState(true); + LLVoiceClient::getInstance()->middleMouseState(true); handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down); // Always handled as far as the OS is concerned. @@ -826,20 +829,16 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (slurl_dnd_enabled) { - - // special case SLURLs - // isValidSLURL() call was added here to make sure that dragged SLURL is valid (EXT-4964) - if ( LLSLURL::isSLURL( data ) && LLSLURL::isValidSLURL( data ) ) + LLSLURL dropped_slurl(data); + if(dropped_slurl.isSpatial()) { if (drop) { - LLURLDispatcher::dispatch( data, NULL, true ); - LLURLSimString::setStringRaw( LLSLURL::stripProtocol( data ) ); - LLPanelLogin::refreshLocation( true ); - LLPanelLogin::updateLocationUI(); + LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), NULL, true ); + return LLWindowCallbacks::DND_MOVE; } return LLWindowCallbacks::DND_COPY; - }; + } } if (prim_media_dnd_enabled) @@ -957,7 +956,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) { BOOL down = FALSE; - gVoiceClient->middleMouseState(false); + LLVoiceClient::getInstance()->middleMouseState(false); handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down); // Always handled as far as the OS is concerned. @@ -1074,7 +1073,7 @@ void LLViewerWindow::handleFocusLost(LLWindow *window) BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated) { // Let the voice chat code check for its PTT key. Note that this never affects event processing. - gVoiceClient->keyDown(key, mask); + LLVoiceClient::getInstance()->keyDown(key, mask); if (gAwayTimer.getElapsedTimeF32() > MIN_AFK_TIME) { @@ -1096,7 +1095,7 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated) BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask) { // Let the voice chat code check for its PTT key. Note that this never affects event processing. - gVoiceClient->keyUp(key, mask); + LLVoiceClient::getInstance()->keyUp(key, mask); return FALSE; } @@ -1433,6 +1432,7 @@ LLViewerWindow::LLViewerWindow( if (LLFeatureManager::getInstance()->isSafe() || (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion()) + || (gSavedSettings.getS32("LastGPUClass") != LLFeatureManager::getInstance()->getGPUClass()) || (gSavedSettings.getBOOL("ProbeHardwareOnStartup"))) { LLFeatureManager::getInstance()->applyRecommendedSettings(); @@ -1669,26 +1669,6 @@ void LLViewerWindow::initWorldUI() navbar->showFavoritesPanel(FALSE); } - if (!gSavedSettings.getBOOL("ShowCameraButton")) - { - LLBottomTray::getInstance()->showCameraButton(FALSE); - } - - if (!gSavedSettings.getBOOL("ShowSnapshotButton")) - { - LLBottomTray::getInstance()->showSnapshotButton(FALSE); - } - - if (!gSavedSettings.getBOOL("ShowMoveButton")) - { - LLBottomTray::getInstance()->showMoveButton(FALSE); - } - - if (!gSavedSettings.getBOOL("ShowGestureButton")) - { - LLBottomTray::getInstance()->showGestureButton(FALSE); - } - if ( gHUDView == NULL ) { LLRect hud_rect = full_window; @@ -1915,7 +1895,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) // store the mode the user wants (even if not there yet) - gSavedSettings.setBOOL("WindowFullScreen", mWantFullscreen); + gSavedSettings.setBOOL("FullScreen", mWantFullscreen); // store new settings for the mode we are in, regardless if (!mWindow->getFullscreen()) @@ -1955,7 +1935,7 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible ) // ...and set the menu color appropriately. setMenuBackgroundColor(gAgent.getGodLevel() > GOD_NOT, - LLViewerLogin::getInstance()->isInProductionGrid()); + LLGridManager::getInstance()->isInProductionGrid()); } if ( gStatusBar ) @@ -1976,15 +1956,15 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) LLSD args; LLColor4 new_bg_color; - if(god_mode && LLViewerLogin::getInstance()->isInProductionGrid()) + if(god_mode && LLGridManager::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuBarGodBgColor" ); } - else if(god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) + else if(god_mode && !LLGridManager::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" ); } - else if(!god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) + else if(!god_mode && !LLGridManager::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); } @@ -2200,7 +2180,6 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) } return TRUE; } - // hidden edit menu for cut/copy/paste if (gEditMenu && gEditMenu->handleAcceleratorKey(key, mask)) { @@ -2464,7 +2443,9 @@ void LLViewerWindow::updateUI() // animate layout stacks so we have up to date rect for world view LLLayoutStack::updateClass(); - updateWorldViewRect(); + // use full window for world view when not rendering UI + bool world_view_uses_full_window = !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI); + updateWorldViewRect(world_view_uses_full_window); LLView::sMouseHandlerMessage.clear(); @@ -2514,28 +2495,55 @@ void LLViewerWindow::updateUI() root_view = mRootView; } - // include all ancestors of captor_view as automatically having mouse - if (captor_view) + // only update mouse hover set when UI is visible (since we shouldn't send hover events to invisible UI + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { - LLView* captor_parent_view = captor_view->getParent(); - while(captor_parent_view) + // include all ancestors of captor_view as automatically having mouse + if (captor_view) { - mouse_hover_set.insert(captor_parent_view->getHandle()); - captor_parent_view = captor_parent_view->getParent(); + LLView* captor_parent_view = captor_view->getParent(); + while(captor_parent_view) + { + mouse_hover_set.insert(captor_parent_view->getHandle()); + captor_parent_view = captor_parent_view->getParent(); + } } - } - // aggregate visible views that contain mouse cursor in display order - LLPopupView::popup_list_t popups = mPopupView->getCurrentPopups(); + // aggregate visible views that contain mouse cursor in display order + LLPopupView::popup_list_t popups = mPopupView->getCurrentPopups(); - for(LLPopupView::popup_list_t::iterator popup_it = popups.begin(); popup_it != popups.end(); ++popup_it) - { - LLView* popup = popup_it->get(); - if (popup && popup->calcScreenBoundingRect().pointInRect(x, y)) + for(LLPopupView::popup_list_t::iterator popup_it = popups.begin(); popup_it != popups.end(); ++popup_it) + { + LLView* popup = popup_it->get(); + if (popup && popup->calcScreenBoundingRect().pointInRect(x, y)) + { + // iterator over contents of top_ctrl, and throw into mouse_hover_set + for (LLView::tree_iterator_t it = popup->beginTreeDFS(); + it != popup->endTreeDFS(); + ++it) + { + LLView* viewp = *it; + if (viewp->getVisible() + && viewp->calcScreenBoundingRect().pointInRect(x, y)) + { + // we have a view that contains the mouse, add it to the set + mouse_hover_set.insert(viewp->getHandle()); + } + else + { + // skip this view and all of its children + it.skipDescendants(); + } + } + } + } + + // while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events + if (top_ctrl && top_ctrl->calcScreenBoundingRect().pointInRect(x, y)) { // iterator over contents of top_ctrl, and throw into mouse_hover_set - for (LLView::tree_iterator_t it = popup->beginTreeDFS(); - it != popup->endTreeDFS(); + for (LLView::tree_iterator_t it = top_ctrl->beginTreeDFS(); + it != top_ctrl->endTreeDFS(); ++it) { LLView* viewp = *it; @@ -2552,57 +2560,34 @@ void LLViewerWindow::updateUI() } } } - } - - // while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events - if (top_ctrl && top_ctrl->calcScreenBoundingRect().pointInRect(x, y)) - { - // iterator over contents of top_ctrl, and throw into mouse_hover_set - for (LLView::tree_iterator_t it = top_ctrl->beginTreeDFS(); - it != top_ctrl->endTreeDFS(); - ++it) - { - LLView* viewp = *it; - if (viewp->getVisible() - && viewp->calcScreenBoundingRect().pointInRect(x, y)) - { - // we have a view that contains the mouse, add it to the set - mouse_hover_set.insert(viewp->getHandle()); - } - else - { - // skip this view and all of its children - it.skipDescendants(); - } - } - } - else - { - // walk UI tree in depth-first order - for (LLView::tree_iterator_t it = root_view->beginTreeDFS(); - it != root_view->endTreeDFS(); - ++it) + else { - LLView* viewp = *it; - // calculating the screen rect involves traversing the parent, so this is less than optimal - if (viewp->getVisible() - && viewp->calcScreenBoundingRect().pointInRect(x, y)) + // walk UI tree in depth-first order + for (LLView::tree_iterator_t it = root_view->beginTreeDFS(); + it != root_view->endTreeDFS(); + ++it) { + LLView* viewp = *it; + // calculating the screen rect involves traversing the parent, so this is less than optimal + if (viewp->getVisible() + && viewp->calcScreenBoundingRect().pointInRect(x, y)) + { - // if this view is mouse opaque, nothing behind it should be in mouse_hover_set - if (viewp->getMouseOpaque()) + // if this view is mouse opaque, nothing behind it should be in mouse_hover_set + if (viewp->getMouseOpaque()) + { + // constrain further iteration to children of this widget + it = viewp->beginTreeDFS(); + } + + // we have a view that contains the mouse, add it to the set + mouse_hover_set.insert(viewp->getHandle()); + } + else { - // constrain further iteration to children of this widget - it = viewp->beginTreeDFS(); + // skip this view and all of its children + it.skipDescendants(); } - - // we have a view that contains the mouse, add it to the set - mouse_hover_set.insert(viewp->getHandle()); - } - else - { - // skip this view and all of its children - it.skipDescendants(); } } } @@ -2646,156 +2631,170 @@ void LLViewerWindow::updateUI() // store resulting hover set for next frame swap(mMouseHoverViews, mouse_hover_set); - if( mouse_captor ) - { - // Pass hover events to object capturing mouse events. - S32 local_x; - S32 local_y; - mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); - handled = mouse_captor->handleHover(local_x, local_y, mask); - if (LLView::sDebugMouseHandling) - { - llinfos << "Hover handled by captor " << mouse_captor->getName() << llendl; - } + // only handle hover events when UI is enabled + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { - if( !handled ) + if( mouse_captor ) { - lldebugst(LLERR_USER_INPUT) << "hover not handled by mouse captor" << llendl; + // Pass hover events to object capturing mouse events. + S32 local_x; + S32 local_y; + mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); + handled = mouse_captor->handleHover(local_x, local_y, mask); + if (LLView::sDebugMouseHandling) + { + llinfos << "Hover handled by captor " << mouse_captor->getName() << llendl; + } + + if( !handled ) + { + lldebugst(LLERR_USER_INPUT) << "hover not handled by mouse captor" << llendl; + } } - } - else - { - if (top_ctrl) + else { - 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 (top_ctrl) + { + 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 ) - { - // x and y are from last time mouse was in window - // mMouseInWindow tracks *actual* mouse location - if (mMouseInWindow && mRootView->handleHover(x, y, mask) ) + if ( !handled ) { - if (LLView::sDebugMouseHandling && LLView::sMouseHandlerMessage != last_handle_msg) + // x and y are from last time mouse was in window + // mMouseInWindow tracks *actual* mouse location + if (mMouseInWindow && mRootView->handleHover(x, y, mask) ) { - last_handle_msg = LLView::sMouseHandlerMessage; - llinfos << "Hover" << LLView::sMouseHandlerMessage << llendl; + if (LLView::sDebugMouseHandling && LLView::sMouseHandlerMessage != last_handle_msg) + { + last_handle_msg = LLView::sMouseHandlerMessage; + llinfos << "Hover" << LLView::sMouseHandlerMessage << llendl; + } + handled = TRUE; + } + else if (LLView::sDebugMouseHandling) + { + if (last_handle_msg != LLStringUtil::null) + { + last_handle_msg.clear(); + llinfos << "Hover not handled by view" << llendl; + } } - handled = TRUE; } - else if (LLView::sDebugMouseHandling) + + if (!handled) { - if (last_handle_msg != LLStringUtil::null) + LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); + + if(mMouseInWindow && tool) { - last_handle_msg.clear(); - llinfos << "Hover not handled by view" << llendl; + handled = tool->handleHover(x, y, mask); } } } - if (!handled) + // Show a new tool tip (or update one that is already shown) + BOOL tool_tip_handled = FALSE; + std::string tool_tip_msg; + if( handled + && !mWindow->isCursorHidden()) { - LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); + LLRect screen_sticky_rect = mRootView->getLocalRect(); + S32 local_x, local_y; - if(mMouseInWindow && tool) + if (gSavedSettings.getBOOL("DebugShowXUINames")) { - handled = tool->handleHover(x, y, mask); - } - } - } + LLToolTip::Params params; - // Show a new tool tip (or update one that is already shown) - BOOL tool_tip_handled = FALSE; - std::string tool_tip_msg; - if( handled - && !mWindow->isCursorHidden()) - { - LLRect screen_sticky_rect = mRootView->getLocalRect(); - S32 local_x, local_y; - - if (gSavedSettings.getBOOL("DebugShowXUINames")) - { - LLToolTip::Params params; - - LLView* tooltip_view = mRootView; - LLView::tree_iterator_t end_it = mRootView->endTreeDFS(); - for (LLView::tree_iterator_t it = mRootView->beginTreeDFS(); it != end_it; ++it) - { - LLView* viewp = *it; - LLRect screen_rect; - viewp->localRectToScreen(viewp->getLocalRect(), &screen_rect); - if (!(viewp->getVisible() - && screen_rect.pointInRect(x, y))) - { - it.skipDescendants(); - } - // only report xui names for LLUICtrls, - // and blacklist the various containers we don't care about - else if (dynamic_cast<LLUICtrl*>(viewp) - && viewp != gMenuHolder - && viewp != gFloaterView - && viewp != gConsole) + LLView* tooltip_view = mRootView; + LLView::tree_iterator_t end_it = mRootView->endTreeDFS(); + for (LLView::tree_iterator_t it = mRootView->beginTreeDFS(); it != end_it; ++it) { - if (dynamic_cast<LLFloater*>(viewp)) + LLView* viewp = *it; + LLRect screen_rect; + viewp->localRectToScreen(viewp->getLocalRect(), &screen_rect); + if (!(viewp->getVisible() + && screen_rect.pointInRect(x, y))) { - // constrain search to descendants of this (frontmost) floater - // by resetting iterator - it = viewp->beginTreeDFS(); + it.skipDescendants(); } - - // if we are in a new part of the tree (not a descendent of current tooltip_view) - // then push the results for tooltip_view and start with a new potential view - // NOTE: this emulates visiting only the leaf nodes that meet our criteria - if (!viewp->hasAncestor(tooltip_view)) + // only report xui names for LLUICtrls, + // and blacklist the various containers we don't care about + else if (dynamic_cast<LLUICtrl*>(viewp) + && viewp != gMenuHolder + && viewp != gFloaterView + && viewp != gConsole) { - append_xui_tooltip(tooltip_view, params); - screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); + if (dynamic_cast<LLFloater*>(viewp)) + { + // constrain search to descendants of this (frontmost) floater + // by resetting iterator + it = viewp->beginTreeDFS(); + } + + // if we are in a new part of the tree (not a descendent of current tooltip_view) + // then push the results for tooltip_view and start with a new potential view + // NOTE: this emulates visiting only the leaf nodes that meet our criteria + if (!viewp->hasAncestor(tooltip_view)) + { + append_xui_tooltip(tooltip_view, params); + screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); + } + tooltip_view = viewp; } - tooltip_view = viewp; } - } - append_xui_tooltip(tooltip_view, params); - screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); - - params.sticky_rect = screen_sticky_rect; - params.max_width = 400; + append_xui_tooltip(tooltip_view, params); + screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); + + params.sticky_rect = screen_sticky_rect; + params.max_width = 400; - LLToolTipMgr::instance().show(params); - } - // if there is a mouse captor, nothing else gets a tooltip - else if (mouse_captor) - { - mouse_captor->screenPointToLocal(x, y, &local_x, &local_y); - tool_tip_handled = mouse_captor->handleToolTip(local_x, local_y, mask); - } - else - { - // next is top_ctrl - if (!tool_tip_handled && top_ctrl) - { - top_ctrl->screenPointToLocal(x, y, &local_x, &local_y); - tool_tip_handled = top_ctrl->handleToolTip(local_x, local_y, mask ); + LLToolTipMgr::instance().show(params); } - - if (!tool_tip_handled) + // if there is a mouse captor, nothing else gets a tooltip + else if (mouse_captor) { - local_x = x; local_y = y; - tool_tip_handled = mRootView->handleToolTip(local_x, local_y, mask ); + mouse_captor->screenPointToLocal(x, y, &local_x, &local_y); + tool_tip_handled = mouse_captor->handleToolTip(local_x, local_y, mask); } - - LLTool* current_tool = LLToolMgr::getInstance()->getCurrentTool(); - if (!tool_tip_handled && current_tool) + else { - current_tool->screenPointToLocal(x, y, &local_x, &local_y); - tool_tip_handled = current_tool->handleToolTip(local_x, local_y, mask ); + // next is top_ctrl + if (!tool_tip_handled && top_ctrl) + { + top_ctrl->screenPointToLocal(x, y, &local_x, &local_y); + tool_tip_handled = top_ctrl->handleToolTip(local_x, local_y, mask ); + } + + if (!tool_tip_handled) + { + local_x = x; local_y = y; + tool_tip_handled = mRootView->handleToolTip(local_x, local_y, mask ); + } + + LLTool* current_tool = LLToolMgr::getInstance()->getCurrentTool(); + if (!tool_tip_handled && current_tool) + { + current_tool->screenPointToLocal(x, y, &local_x, &local_y); + tool_tip_handled = current_tool->handleToolTip(local_x, local_y, mask ); + } } + } + } + else + { // just have tools handle hover when UI is turned off + LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); + + if(mMouseInWindow && tool) + { + handled = tool->handleHover(x, y, mask); } - } - + } + updateLayout(); mLastMousePoint = mCurrentMousePoint; @@ -2911,6 +2910,11 @@ void LLViewerWindow::updateMouseDelta() void LLViewerWindow::updateKeyboardFocus() { + if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { + gFocusMgr.setKeyboardFocus(NULL); + } + // clean up current focus LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus()); if (cur_focus) @@ -3013,6 +3017,12 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window) new_world_rect.mTop = llround((F32)new_world_rect.mTop * mDisplayScale.mV[VY]); } + if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE) + { + // use right edge of window, ignoring sidebar + new_world_rect.mRight = mWindowRectRaw.mRight; + } + if (mWorldViewRectRaw != new_world_rect) { mWorldViewRectRaw = new_world_rect; @@ -3983,9 +3993,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei // PRE SNAPSHOT gDisplaySwapBuffers = FALSE; - // if not showing ui, use full window to render world view - updateWorldViewRect(!show_ui); - glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); setCursor(UI_CURSOR_WAIT); @@ -4058,6 +4065,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei //else: keep the current scene scale, re-scale it if necessary after reading out. } + // if not showing ui, use full window to render world view + updateWorldViewRect(!show_ui); + S32 buffer_x_offset = llfloor(((window_width - snapshot_width) * scale_factor) / 2.f); S32 buffer_y_offset = llfloor(((window_height - snapshot_height) * scale_factor) / 2.f); @@ -4541,7 +4551,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) gResizeScreenTexture = TRUE; - if (gFloaterCustomize && gFloaterCustomize->getVisible()) + if (gAgentCamera.cameraCustomizeAvatar()) { LLVisualParamHint::requestHintUpdates(); } @@ -4716,7 +4726,7 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, BOOL was_maximized = gSavedSettings.getBOOL("WindowMaximized"); mWantFullscreen = fullscreen; mShowFullscreenProgress = show_progress_bar; - gSavedSettings.setBOOL("WindowFullScreen", mWantFullscreen); + gSavedSettings.setBOOL("FullScreen", mWantFullscreen); //gResizeScreenTexture = TRUE; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3f021d1f84..7a232afba6 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -95,6 +95,12 @@ #include "llvoiceclient.h" #include "llvoicevisualizer.h" // Ventrella +#include "lldebugmessagebox.h" +extern F32 SPEED_ADJUST_MAX; +extern F32 SPEED_ADJUST_MAX_SEC; +extern F32 ANIM_SPEED_MAX; +extern F32 ANIM_SPEED_MIN; + #if LL_MSVC // disable boost::lexical_cast warning #pragma warning (disable:4702) @@ -102,8 +108,6 @@ #include <boost/lexical_cast.hpp> -#define DISPLAY_AVATAR_LOAD_TIMES - using namespace LLVOAvatarDefines; //----------------------------------------------------------------------------- @@ -669,6 +673,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mTexEyeColor( NULL ), mNeedsSkin(FALSE), mUpdatePeriod(1), + mFullyLoaded(FALSE), + mPreviousFullyLoaded(FALSE), mFullyLoadedInitialized(FALSE), mSupportsAlphaLayers(FALSE) { @@ -748,8 +754,11 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mOohMorph = NULL; mAahMorph = NULL; - mCurrentGesticulationLevel = 0; + mCurrentGesticulationLevel = 0; + mRuthTimer.reset(); + mRuthDebugTimer.reset(); + mDebugExistenceTimer.reset(); } //------------------------------------------------------------------------ @@ -757,6 +766,27 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, //------------------------------------------------------------------------ LLVOAvatar::~LLVOAvatar() { + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + if (!mFullyLoaded) + { + llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' left after " << (U32)mRuthDebugTimer.getElapsedTimeF32() << " seconds as cloud." << llendl; + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezLeftCloudNotification",args); + } + else + { + llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' left." << llendl; + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezLeftNotification",args); + } + + } lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl; mRoot.removeAllChildren(); @@ -828,7 +858,7 @@ BOOL LLVOAvatar::isFullyBaked() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { if (!isTextureDefined(mBakedTextureDatas[i].mTextureIndex) - && ( (i != BAKED_SKIRT) || isWearingWearableType(WT_SKIRT) ) ) + && ( (i != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT) ) ) { return FALSE; } @@ -1114,6 +1144,17 @@ void LLVOAvatar::initClass() { llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl; } + + gAnimLibrary.animStateSetString(ANIM_AGENT_BODY_NOISE,"body_noise"); + gAnimLibrary.animStateSetString(ANIM_AGENT_BREATHE_ROT,"breathe_rot"); + gAnimLibrary.animStateSetString(ANIM_AGENT_EDITING,"editing"); + gAnimLibrary.animStateSetString(ANIM_AGENT_EYE,"eye"); + gAnimLibrary.animStateSetString(ANIM_AGENT_FLY_ADJUST,"fly_adjust"); + gAnimLibrary.animStateSetString(ANIM_AGENT_HAND_MOTION,"hand_motion"); + gAnimLibrary.animStateSetString(ANIM_AGENT_HEAD_ROT,"head_rot"); + gAnimLibrary.animStateSetString(ANIM_AGENT_PELVIS_FIX,"pelvis_fix"); + gAnimLibrary.animStateSetString(ANIM_AGENT_TARGET,"target"); + gAnimLibrary.animStateSetString(ANIM_AGENT_WALK_ADJUST,"walk_adjust"); } @@ -1225,7 +1266,11 @@ void LLVOAvatar::initInstance(void) registerMotion( ANIM_AGENT_EXPRESS_TOOTHSMILE, LLEmote::create ); registerMotion( ANIM_AGENT_EXPRESS_WINK, LLEmote::create ); registerMotion( ANIM_AGENT_EXPRESS_WORRY, LLEmote::create ); + registerMotion( ANIM_AGENT_FEMALE_RUN_NEW, LLKeyframeWalkMotion::create ); + registerMotion( ANIM_AGENT_FEMALE_WALK, LLKeyframeWalkMotion::create ); + registerMotion( ANIM_AGENT_FEMALE_WALK_NEW, LLKeyframeWalkMotion::create ); registerMotion( ANIM_AGENT_RUN, LLKeyframeWalkMotion::create ); + registerMotion( ANIM_AGENT_RUN_NEW, LLKeyframeWalkMotion::create ); registerMotion( ANIM_AGENT_STAND, LLKeyframeStandMotion::create ); registerMotion( ANIM_AGENT_STAND_1, LLKeyframeStandMotion::create ); registerMotion( ANIM_AGENT_STAND_2, LLKeyframeStandMotion::create ); @@ -1235,6 +1280,7 @@ void LLVOAvatar::initInstance(void) registerMotion( ANIM_AGENT_TURNLEFT, LLKeyframeWalkMotion::create ); registerMotion( ANIM_AGENT_TURNRIGHT, LLKeyframeWalkMotion::create ); registerMotion( ANIM_AGENT_WALK, LLKeyframeWalkMotion::create ); + registerMotion( ANIM_AGENT_WALK_NEW, LLKeyframeWalkMotion::create ); // motions without a start/stop bit registerMotion( ANIM_AGENT_BODY_NOISE, LLBodyNoiseMotion::create ); @@ -1270,7 +1316,8 @@ void LLVOAvatar::initInstance(void) //VTPause(); // VTune - mVoiceVisualizer->setVoiceEnabled( gVoiceClient->getVoiceEnabled( mID ) ); + mVoiceVisualizer->setVoiceEnabled( LLVoiceClient::getInstance()->getVoiceEnabled( mID ) ); + } const LLVector3 LLVOAvatar::getRenderPosition() const @@ -2078,9 +2125,24 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, LLMemType mt(LLMemType::MTYPE_AVATAR); LLVector3 old_vel = getVelocity(); + const BOOL has_name = !getNVPair("FirstName"); + // Do base class updates... U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp); + // Print out arrival information once we have name of avatar. + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + if (has_name && getNVPair("FirstName")) + { + mDebugExistenceTimer.reset(); + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezArrivedNotification",args); + llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' arrived." << llendl; + } + } if(retval & LLViewerObject::INVALID_UPDATE) { if (isSelf()) @@ -2116,6 +2178,33 @@ static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Update Avatar"); static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); //------------------------------------------------------------------------ +// LLVOAvatar::dumpAnimationState() +//------------------------------------------------------------------------ +void LLVOAvatar::dumpAnimationState() +{ + llinfos << "==============================================" << llendl; + for (LLVOAvatar::AnimIterator it = mSignaledAnimations.begin(); it != mSignaledAnimations.end(); ++it) + { + LLUUID id = it->first; + std::string playtag = ""; + if (mPlayingAnimations.find(id) != mPlayingAnimations.end()) + { + playtag = "*"; + } + llinfos << gAnimLibrary.animationName(id) << playtag << llendl; + } + for (LLVOAvatar::AnimIterator it = mPlayingAnimations.begin(); it != mPlayingAnimations.end(); ++it) + { + LLUUID id = it->first; + bool is_signaled = mSignaledAnimations.find(id) != mSignaledAnimations.end(); + if (!is_signaled) + { + llinfos << gAnimLibrary.animationName(id) << "!S" << llendl; + } + } +} + +//------------------------------------------------------------------------ // idleUpdate() //------------------------------------------------------------------------ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) @@ -2201,8 +2290,8 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } static LLUICachedControl<bool> visualizers_in_calls("ShowVoiceVisualizersInCalls", false); - bool voice_enabled = (visualizers_in_calls || gVoiceClient->inProximalChannel()) && - gVoiceClient->getVoiceEnabled(mID); + bool voice_enabled = (visualizers_in_calls || LLVoiceClient::getInstance()->inProximalChannel()) && + LLVoiceClient::getInstance()->getVoiceEnabled(mID); idleUpdateVoiceVisualizer( voice_enabled ); idleUpdateMisc( detailed_update ); @@ -2218,6 +2307,7 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) idleUpdateNameTag( root_pos_last ); idleUpdateRenderCost(); idleUpdateTractorBeam(); + return TRUE; } @@ -2265,7 +2355,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) // Notice the calls to "gAwayTimer.reset()". This resets the timer that determines how long the avatar has been // "away", so that the avatar doesn't lapse into away-mode (and slump over) while the user is still talking. //----------------------------------------------------------------------------------------------------------------- - if (gVoiceClient->getIsSpeaking( mID )) + if (LLVoiceClient::getInstance()->getIsSpeaking( mID )) { if (!mVoiceVisualizer->getCurrentlySpeaking()) { @@ -2274,7 +2364,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) //printf( "gAwayTimer.reset();\n" ); } - mVoiceVisualizer->setSpeakingAmplitude( gVoiceClient->getCurrentPower( mID ) ); + mVoiceVisualizer->setSpeakingAmplitude( LLVoiceClient::getInstance()->getCurrentPower( mID ) ); if( isSelf() ) { @@ -2503,7 +2593,7 @@ F32 LLVOAvatar::calcMorphAmount() void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) { // Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync - if ( voice_enabled && (gVoiceClient->lipSyncEnabled()) && gVoiceClient->getIsSpeaking( mID ) ) + if ( voice_enabled && (LLVoiceClient::getInstance()->lipSyncEnabled()) && LLVoiceClient::getInstance()->getIsSpeaking( mID ) ) { F32 ooh_morph_amount = 0.0f; F32 aah_morph_amount = 0.0f; @@ -2774,6 +2864,29 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) const BOOL is_muted = isSelf() ? FALSE : LLMuteList::getInstance()->isMuted(getID()); const BOOL is_cloud = getIsCloud(); + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + if (is_appearance != mNameAppearance) + { + if (is_appearance) + { + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezEnteredAppearanceNotification",args); + llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' entered appearance mode." << llendl; + } + else + { + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezLeftAppearanceNotification",args); + llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' left appearance mode." << llendl; + } + } + } + if (mNameString.empty() || new_name || (!title && !mTitle.empty()) || @@ -3670,7 +3783,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) mMeshLOD[MESH_ID_LOWER_BODY]->updateJointGeometry(); mMeshLOD[MESH_ID_UPPER_BODY]->updateJointGeometry(); - if( isWearingWearableType( WT_SKIRT ) ) + if( isWearingWearableType( LLWearableType::WT_SKIRT ) ) { mMeshLOD[MESH_ID_SKIRT]->updateJointGeometry(); } @@ -3830,7 +3943,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) U32 LLVOAvatar::renderTransparent(BOOL first_pass) { U32 num_indices = 0; - if( isWearingWearableType( WT_SKIRT ) && (mIsDummy || isTextureVisible(TEX_SKIRT_BAKED)) ) + if( isWearingWearableType( LLWearableType::WT_SKIRT ) && (mIsDummy || isTextureVisible(TEX_SKIRT_BAKED)) ) { gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.25f); num_indices += mMeshLOD[MESH_ID_SKIRT]->render(mAdjustedPixelArea, FALSE); @@ -4033,7 +4146,7 @@ void LLVOAvatar::updateTextures() mHasGrey = FALSE; // debug for (U32 texture_index = 0; texture_index < getNumTEs(); texture_index++) { - EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)texture_index); + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)texture_index); U32 num_wearables = gAgentWearables.getWearableCount(wearable_type); const LLTextureEntry *te = getTE(texture_index); const F32 texel_area_ratio = fabs(te->mScaleS * te->mScaleT); @@ -4095,6 +4208,8 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel { mMaxPixelArea = llmax(pixel_area, mMaxPixelArea); mMinPixelArea = llmin(pixel_area, mMinPixelArea); + imagep->resetTextureStats(); + imagep->setCanUseHTTP(false) ; //turn off http fetching for baked textures. imagep->addTextureStats(pixel_area / texel_area_ratio); imagep->setBoostLevel(boost_level); } @@ -4369,34 +4484,79 @@ void LLVOAvatar::resetAnimations() flushAllMotions(); } -//----------------------------------------------------------------------------- -// startMotion() -// id is the asset if of the animation to start -// time_offset is the offset into the animation at which to start playing -//----------------------------------------------------------------------------- -BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) +// Override selectively based on avatar sex and whether we're using new +// animations. +LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - + BOOL use_new_walk_run = gSavedSettings.getBOOL("UseNewWalkRun"); + LLUUID result = id; + // start special case female walk for female avatars if (getSex() == SEX_FEMALE) { if (id == ANIM_AGENT_WALK) { - return LLCharacter::startMotion(ANIM_AGENT_FEMALE_WALK, time_offset); + if (use_new_walk_run) + result = ANIM_AGENT_FEMALE_WALK_NEW; + else + result = ANIM_AGENT_FEMALE_WALK; + } + else if (id == ANIM_AGENT_RUN) + { + // There is no old female run animation, so only override + // in one case. + if (use_new_walk_run) + result = ANIM_AGENT_FEMALE_RUN_NEW; } else if (id == ANIM_AGENT_SIT) { - return LLCharacter::startMotion(ANIM_AGENT_SIT_FEMALE, time_offset); + result = ANIM_AGENT_SIT_FEMALE; } } + else + { + // Male avatar. + if (id == ANIM_AGENT_WALK) + { + if (use_new_walk_run) + result = ANIM_AGENT_WALK_NEW; + } + else if (id == ANIM_AGENT_RUN) + { + if (use_new_walk_run) + result = ANIM_AGENT_RUN_NEW; + } + + } + + return result; + +} + +//----------------------------------------------------------------------------- +// startMotion() +// id is the asset if of the animation to start +// time_offset is the offset into the animation at which to start playing +//----------------------------------------------------------------------------- +BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) +{ + LLMemType mt(LLMemType::MTYPE_AVATAR); + + lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl; - if (isSelf() && id == ANIM_AGENT_AWAY) + LLUUID remap_id = remapMotionID(id); + + if (remap_id != id) + { + lldebugs << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << llendl; + } + + if (isSelf() && remap_id == ANIM_AGENT_AWAY) { gAgent.setAFK(); } - return LLCharacter::startMotion(id, time_offset); + return LLCharacter::startMotion(remap_id, time_offset); } //----------------------------------------------------------------------------- @@ -4404,21 +4564,21 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) //----------------------------------------------------------------------------- BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) { - if (isSelf()) - { - gAgent.onAnimStop(id); - } + lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl; - if (id == ANIM_AGENT_WALK) + LLUUID remap_id = remapMotionID(id); + + if (remap_id != id) { - LLCharacter::stopMotion(ANIM_AGENT_FEMALE_WALK, stop_immediate); + lldebugs << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << llendl; } - else if (id == ANIM_AGENT_SIT) + + if (isSelf()) { - LLCharacter::stopMotion(ANIM_AGENT_SIT_FEMALE, stop_immediate); + gAgent.onAnimStop(remap_id); } - return LLCharacter::stopMotion(id, stop_immediate); + return LLCharacter::stopMotion(remap_id, stop_immediate); } //----------------------------------------------------------------------------- @@ -4821,7 +4981,7 @@ BOOL LLVOAvatar::loadAvatar() } // Uncomment to enable avatar_lad.xml debugging. -/* std::ofstream file; + std::ofstream file; file.open("avatar_lad.log"); for( LLViewerVisualParam* param = (LLViewerVisualParam*) getFirstVisualParam(); param; @@ -4831,7 +4991,7 @@ BOOL LLVOAvatar::loadAvatar() file << std::endl; } - file.close();*/ + file.close(); return TRUE; } @@ -5473,6 +5633,14 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi { S32 attachmentID = ATTACHMENT_ID_FROM_STATE(viewer_object->getState()); + // This should never happen unless the server didn't process the attachment point + // correctly, but putting this check in here to be safe. + if (attachmentID & ATTACHMENT_ADD) + { + llwarns << "Got an attachment with ATTACHMENT_ADD mask, removing ( attach pt:" << attachmentID << " )" << llendl; + attachmentID &= ~ATTACHMENT_ADD; + } + LLViewerJointAttachment* attachment = get_if_there(mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL); if (!attachment) @@ -5855,20 +6023,28 @@ void LLVOAvatar::updateRuthTimer(bool loading) if (mPreviousFullyLoaded) { mRuthTimer.reset(); + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' became cloud." << llendl; + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezCloudNotification",args); + } mRuthDebugTimer.reset(); } - const F32 LOADING_TIMEOUT = 120.f; - if (mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT) + const F32 LOADING_TIMEOUT__SECONDS = 120.f; + if (mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT__SECONDS) { - /* llinfos << "Ruth Timer timeout: Missing texture data for '" << getFullname() << "' " << "( Params loaded : " << !visualParamWeightsAreDefault() << " ) " << "( Lower : " << isTextureDefined(TEX_LOWER_BAKED) << " ) " << "( Upper : " << isTextureDefined(TEX_UPPER_BAKED) << " ) " << "( Head : " << isTextureDefined(TEX_HEAD_BAKED) << " )." << llendl; - */ + LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID()); mRuthTimer.reset(); } @@ -5884,16 +6060,18 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE); -#ifdef DISPLAY_AVATAR_LOAD_TIMES - if (!mPreviousFullyLoaded && !loading && mFullyLoaded) + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { - llinfos << "Avatar '" << getFullname() << "' resolved in " << mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl; - LLSD args; - args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); - args["NAME"] = getFullname(); - LLNotificationsUtil::add("AvatarRezNotification",args); + if (!mPreviousFullyLoaded && !loading && mFullyLoaded) + { + llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() << "sec ] Avatar '" << getFullname() << "' resolved in " << (U32)mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl; + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezNotification",args); + } } -#endif // did our loading state "change" from last call? const S32 UPDATE_RATE = 30; @@ -6198,7 +6376,7 @@ void LLVOAvatar::releaseComponentTextures() const LLVOAvatarDictionary::BakedEntry * bakedDicEntry = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index); // skip if this is a skirt and av is not wearing one, or if we don't have a baked texture UUID if (!isTextureDefined(bakedDicEntry->mTextureIndex) - && ( (baked_index != BAKED_SKIRT) || isWearingWearableType(WT_SKIRT) )) + && ( (baked_index != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT) )) { continue; } @@ -6271,6 +6449,14 @@ BOOL LLVOAvatar::teToColorParams( ETextureIndex te, U32 *param_name ) param_name[2] = 923; //"skirt_blue"; break; + case TEX_HEAD_TATTOO: + case TEX_LOWER_TATTOO: + case TEX_UPPER_TATTOO: + param_name[0] = 1071; //"tattoo_red"; + param_name[1] = 1072; //"tattoo_green"; + param_name[2] = 1073; //"tattoo_blue"; + break; + default: llassert(0); return FALSE; @@ -6346,23 +6532,23 @@ void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const } // Unlike most wearable functions, this works for both self and other. -BOOL LLVOAvatar::isWearingWearableType(EWearableType type) const +BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const { if (mIsDummy) return TRUE; switch(type) { - case WT_SHAPE: - case WT_SKIN: - case WT_HAIR: - case WT_EYES: + case LLWearableType::WT_SHAPE: + case LLWearableType::WT_SKIN: + case LLWearableType::WT_HAIR: + case LLWearableType::WT_EYES: return TRUE; // everyone has all bodyparts default: break; // Do nothing } /* switch(type) - case WT_SHIRT: + case LLWearableType::WT_SHIRT: indicator_te = TEX_UPPER_SHIRT; */ for (LLVOAvatarDictionary::Textures::const_iterator tex_iter = LLVOAvatarDictionary::getInstance()->getTextures().begin(); tex_iter != LLVOAvatarDictionary::getInstance()->getTextures().end(); @@ -6879,9 +7065,9 @@ void LLVOAvatar::dumpArchetypeXML( void* ) apr_file_printf( file, "\n\t<archetype name=\"???\">\n" ); // only body parts, not clothing. - for (S32 type = WT_SHAPE; type <= WT_EYES; type++) + for (S32 type = LLWearableType::WT_SHAPE; type <= LLWearableType::WT_EYES; type++) { - const std::string& wearable_name = LLWearableDictionary::getTypeName((EWearableType)type); + const std::string& wearable_name = LLWearableType::getTypeName((LLWearableType::EType)type); apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() ); for (LLVisualParam* param = gAgentAvatarp->getFirstVisualParam(); param; param = gAgentAvatarp->getNextVisualParam()) @@ -7687,7 +7873,7 @@ void LLVOAvatar::idleUpdateRenderCost() { const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index); ETextureIndex tex_index = baked_dict->mTextureIndex; - if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(WT_SKIRT))) + if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(LLWearableType::WT_SKIRT))) { if (isTextureVisible(tex_index)) { @@ -7795,3 +7981,26 @@ BOOL LLVOAvatar::isTextureDefined(LLVOAvatarDefines::ETextureIndex te, U32 index getImage(te, index)->getID() != IMG_DEFAULT); } +//virtual +BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index) const +{ + if (isIndexLocalTexture(type)) + { + return isTextureDefined(type, index); + } + else + { + // baked textures can use TE images directly + return ((isTextureDefined(type) || isSelf()) + && (getTEImage(type)->getID() != IMG_INVISIBLE + || LLDrawPoolAlpha::sShowDebugAlpha)); + } +} + +//virtual +BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const +{ + // non-self avatars don't have wearables + return FALSE; +} + diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index c80d59966c..3c940e03c0 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -71,9 +71,10 @@ class LLTexGlobalColor; class LLVOAvatarBoneInfo; class LLVOAvatarSkeletonInfo; -//------------------------------------------------------------------------ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatar -//------------------------------------------------------------------------ +// +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLVOAvatar : public LLViewerObject, public LLCharacter @@ -138,13 +139,13 @@ public: virtual void updateSpatialExtents(LLVector3& newMin, LLVector3 &newMax); virtual void getSpatialExtents(LLVector3& newMin, LLVector3& newMax); virtual BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end, - S32 face = -1, // which face to check, -1 = ALL_SIDES - BOOL pick_transparent = FALSE, - S32* face_hit = NULL, // which face was hit - LLVector3* intersection = NULL, // return the intersection point - LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point - LLVector3* normal = NULL, // return the surface normal at the intersection point - LLVector3* bi_normal = NULL); // return the surface bi-normal at the intersection point + S32 face = -1, // which face to check, -1 = ALL_SIDES + BOOL pick_transparent = FALSE, + S32* face_hit = NULL, // which face was hit + LLVector3* intersection = NULL, // return the intersection point + LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point + LLVector3* normal = NULL, // return the surface normal at the intersection point + LLVector3* bi_normal = NULL); // return the surface bi-normal at the intersection point //-------------------------------------------------------------------- // LLCharacter interface and related @@ -157,12 +158,14 @@ public: virtual LLJoint* getCharacterJoint(U32 num); virtual BOOL allocateCharacterJoints(U32 num); + virtual LLUUID remapMotionID(const LLUUID& id); virtual BOOL startMotion(const LLUUID& id, F32 time_offset = 0.f); virtual BOOL stopMotion(const LLUUID& id, BOOL stop_immediate = FALSE); virtual void stopMotionFromSource(const LLUUID& source_id); virtual void requestStopMotion(LLMotion* motion); LLMotion* findMotion(const LLUUID& id) const; void startDefaultMotions(); + void dumpAnimationState(); virtual LLJoint* getJoint(const std::string &name); virtual LLJoint* getRootJoint() { return &mRoot; } @@ -259,7 +262,6 @@ private: S32 mFullyLoadedFrameCounter; LLFrameTimer mFullyLoadedTimer; LLFrameTimer mRuthTimer; - LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez /** State ** ** @@ -462,7 +464,9 @@ public: //-------------------------------------------------------------------- public: virtual BOOL isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const; - BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex index) const; + virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const; + virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const; + protected: BOOL isFullyBaked(); static BOOL areAllNearbyInstancesBaked(S32& grey_avatars); @@ -646,7 +650,7 @@ public: **/ public: - virtual BOOL isWearingWearableType(EWearableType type ) const; + virtual BOOL isWearingWearableType(LLWearableType::EType type ) const; //-------------------------------------------------------------------- // Attachments @@ -892,6 +896,9 @@ private: ** DIAGNOSTICS **/ + //-------------------------------------------------------------------- + // General + //-------------------------------------------------------------------- public: static void dumpArchetypeXML(void*); static void dumpBakedStatus(); @@ -911,6 +918,16 @@ private: F32 mAdjustedPixelArea; std::string mDebugText; + + //-------------------------------------------------------------------- + // Avatar Rez Metrics + //-------------------------------------------------------------------- +public: + F32 debugGetExistenceTimeElapsedF32() const { return mDebugExistenceTimer.getElapsedTimeF32(); } +protected: + LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez + LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory. + /** Diagnostics ** ** *******************************************************************************/ @@ -1028,14 +1045,4 @@ protected: // Shared with LLVOAvatarSelf }; // LLVOAvatar -//------------------------------------------------------------------------ -// Inlines -//------------------------------------------------------------------------ -inline BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex te) const -{ - return ((isTextureDefined(te) || isSelf()) - && (getTEImage(te)->getID() != IMG_INVISIBLE - || LLDrawPoolAlpha::sShowDebugAlpha)); -} - #endif // LL_VO_AVATAR_H diff --git a/indra/newview/llvoavatardefines.cpp b/indra/newview/llvoavatardefines.cpp index 49c4a1a6c8..ed0a4f147d 100644 --- a/indra/newview/llvoavatardefines.cpp +++ b/indra/newview/llvoavatardefines.cpp @@ -46,31 +46,31 @@ using namespace LLVOAvatarDefines; LLVOAvatarDictionary::Textures::Textures() { - addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", TRUE, BAKED_NUM_INDICES, "", WT_SKIN)); - addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", WT_SHIRT)); - addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", WT_PANTS)); - addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", TRUE, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", WT_EYES)); - addEntry(TEX_HAIR, new TextureEntry("hair_grain", TRUE, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", WT_HAIR)); - addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", TRUE, BAKED_NUM_INDICES, "", WT_SKIN)); - addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", TRUE, BAKED_NUM_INDICES, "", WT_SKIN)); - addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", WT_SHOES)); - addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", WT_SOCKS)); - addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", WT_JACKET)); - addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", WT_JACKET)); - addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", TRUE, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", WT_GLOVES)); - addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", WT_UNDERSHIRT)); - addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", WT_UNDERPANTS)); - addEntry(TEX_SKIRT, new TextureEntry("skirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", WT_SKIRT)); + addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); + addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", LLWearableType::WT_SHIRT)); + addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", LLWearableType::WT_PANTS)); + addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", TRUE, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", LLWearableType::WT_EYES)); + addEntry(TEX_HAIR, new TextureEntry("hair_grain", TRUE, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", LLWearableType::WT_HAIR)); + addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); + addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); + addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", LLWearableType::WT_SHOES)); + addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", LLWearableType::WT_SOCKS)); + addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET)); + addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET)); + addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", TRUE, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", LLWearableType::WT_GLOVES)); + addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERSHIRT)); + addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERPANTS)); + addEntry(TEX_SKIRT, new TextureEntry("skirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", LLWearableType::WT_SKIRT)); - addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA)); - addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA)); - addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA)); - addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA)); - addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA)); + addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); - addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", TRUE, BAKED_NUM_INDICES, "", WT_TATTOO)); - addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", WT_TATTOO)); - addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", WT_TATTOO)); + addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); + addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); + addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", FALSE, BAKED_HEAD)); addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", FALSE, BAKED_UPPER)); @@ -86,34 +86,34 @@ LLVOAvatarDictionary::BakedTextures::BakedTextures() addEntry(BAKED_HEAD, new BakedEntry(TEX_HEAD_BAKED, "head", "a4b9dc38-e13b-4df9-b284-751efb0566ff", 3, TEX_HEAD_BODYPAINT, TEX_HEAD_TATTOO, TEX_HEAD_ALPHA, - 5, WT_SHAPE, WT_SKIN, WT_HAIR, WT_TATTOO, WT_ALPHA)); + 5, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_HAIR, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA)); addEntry(BAKED_UPPER, new BakedEntry(TEX_UPPER_BAKED, "upper_body", "5943ff64-d26c-4a90-a8c0-d61f56bd98d4", 7, TEX_UPPER_SHIRT,TEX_UPPER_BODYPAINT, TEX_UPPER_JACKET, TEX_UPPER_GLOVES, TEX_UPPER_UNDERSHIRT, TEX_UPPER_TATTOO, TEX_UPPER_ALPHA, - 8, WT_SHAPE, WT_SKIN, WT_SHIRT, WT_JACKET, WT_GLOVES, WT_UNDERSHIRT, WT_TATTOO, WT_ALPHA)); + 8, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_SHIRT, LLWearableType::WT_JACKET, LLWearableType::WT_GLOVES, LLWearableType::WT_UNDERSHIRT, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA)); addEntry(BAKED_LOWER, new BakedEntry(TEX_LOWER_BAKED, "lower_body", "2944ee70-90a7-425d-a5fb-d749c782ed7d", 8, TEX_LOWER_PANTS,TEX_LOWER_BODYPAINT,TEX_LOWER_SHOES, TEX_LOWER_SOCKS, TEX_LOWER_JACKET, TEX_LOWER_UNDERPANTS, TEX_LOWER_TATTOO, TEX_LOWER_ALPHA, - 9, WT_SHAPE, WT_SKIN, WT_PANTS, WT_SHOES, WT_SOCKS, WT_JACKET, WT_UNDERPANTS, WT_TATTOO, WT_ALPHA)); + 9, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_PANTS, LLWearableType::WT_SHOES, LLWearableType::WT_SOCKS, LLWearableType::WT_JACKET, LLWearableType::WT_UNDERPANTS, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA)); addEntry(BAKED_EYES, new BakedEntry(TEX_EYES_BAKED, "eyes", "27b1bc0f-979f-4b13-95fe-b981c2ba9788", 2, TEX_EYES_IRIS, TEX_EYES_ALPHA, - 2, WT_EYES, WT_ALPHA)); + 2, LLWearableType::WT_EYES, LLWearableType::WT_ALPHA)); addEntry(BAKED_SKIRT, new BakedEntry(TEX_SKIRT_BAKED, "skirt", "03e7e8cb-1368-483b-b6f3-74850838ba63", 1, TEX_SKIRT, - 1, WT_SKIRT)); + 1, LLWearableType::WT_SKIRT)); addEntry(BAKED_HAIR, new BakedEntry(TEX_HAIR_BAKED, "hair", "a60e85a9-74e8-48d8-8a2d-8129f28d9b61", 2, TEX_HAIR, TEX_HAIR_ALPHA, - 2, WT_HAIR, WT_ALPHA)); + 2, LLWearableType::WT_HAIR, LLWearableType::WT_ALPHA)); } LLVOAvatarDictionary::Meshes::Meshes() @@ -170,7 +170,7 @@ LLVOAvatarDictionary::TextureEntry::TextureEntry(const std::string &name, bool is_local_texture, EBakedTextureIndex baked_texture_index, const std::string &default_image_name, - EWearableType wearable_type) : + LLWearableType::EType wearable_type) : LLDictionaryEntry(name), mIsLocalTexture(is_local_texture), mIsBakedTexture(!is_local_texture), @@ -216,7 +216,7 @@ LLVOAvatarDictionary::BakedEntry::BakedEntry(ETextureIndex tex_index, // Read in wearables for (U8 i=0; i < num_wearables; i++) { - EWearableType t = (EWearableType)va_arg(argp,int); + LLWearableType::EType t = (LLWearableType::EType)va_arg(argp,int); mWearables.push_back(t); } } @@ -261,7 +261,7 @@ const LLUUID LLVOAvatarDictionary::getDefaultTextureImageID(ETextureIndex index) } // static -EWearableType LLVOAvatarDictionary::getTEWearableType(ETextureIndex index ) +LLWearableType::EType LLVOAvatarDictionary::getTEWearableType(ETextureIndex index ) { return getInstance()->getTexture(index)->mWearableType; } diff --git a/indra/newview/llvoavatardefines.h b/indra/newview/llvoavatardefines.h index cf3d318159..9c4ee7e716 100644 --- a/indra/newview/llvoavatardefines.h +++ b/indra/newview/llvoavatardefines.h @@ -114,7 +114,7 @@ enum EMeshIndex typedef std::vector<ETextureIndex> texture_vec_t; typedef std::vector<EBakedTextureIndex> bakedtexture_vec_t; typedef std::vector<EMeshIndex> mesh_vec_t; -typedef std::vector<EWearableType> wearables_vec_t; +typedef std::vector<LLWearableType::EType> wearables_vec_t; //------------------------------------------------------------------------ // LLVOAvatarDictionary @@ -145,9 +145,9 @@ public: bool is_local_texture, EBakedTextureIndex baked_texture_index = BAKED_NUM_INDICES, const std::string& default_image_name = "", - EWearableType wearable_type = WT_INVALID); + LLWearableType::EType wearable_type = LLWearableType::WT_INVALID); const std::string mDefaultImageName; - const EWearableType mWearableType; + const LLWearableType::EType mWearableType; // It's either a local texture xor baked BOOL mIsLocalTexture; BOOL mIsBakedTexture; @@ -225,7 +225,7 @@ public: static const LLUUID getDefaultTextureImageID(ETextureIndex index); // Given a texture entry, determine which wearable type owns it. - static EWearableType getTEWearableType(ETextureIndex index); + static LLWearableType::EType getTEWearableType(ETextureIndex index); }; // End LLVOAvatarDictionary diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 63f060b58a..ce8f64404e 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -49,12 +49,14 @@ #include "llhudeffecttrail.h" #include "llhudmanager.h" #include "llinventoryfunctions.h" +#include "llnotificationsutil.h" #include "llselectmgr.h" #include "lltoolgrab.h" // for needsRenderBeam #include "lltoolmgr.h" // for needsRenderBeam #include "lltoolmorph.h" #include "lltrans.h" #include "llviewercamera.h" +#include "llviewercontrol.h" #include "llviewermenu.h" #include "llviewerobjectlist.h" #include "llviewerstats.h" @@ -103,15 +105,7 @@ struct LocalTextureData //----------------------------------------------------------------------------- // Callback data //----------------------------------------------------------------------------- -struct LLAvatarTexData -{ - LLAvatarTexData(const LLUUID& id, ETextureIndex index) : - mAvatarID(id), - mIndex(index) - {} - LLUUID mAvatarID; - ETextureIndex mIndex; -}; + /** ** @@ -143,7 +137,9 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, mRegionCrossingCount(0) { gAgentWearables.setAvatarObject(this); - + + mMotionController.mIsSelf = TRUE; + lldebugs << "Marking avatar as self " << id << llendl; } @@ -156,6 +152,23 @@ void LLVOAvatarSelf::initInstance() // adds attachment points to mScreen among other things LLVOAvatar::initInstance(); + llinfos << "Self avatar object created. Starting timer." << llendl; + mDebugSelfLoadTimer.reset(); + // clear all times to -1 for debugging + for (U32 i =0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i) + { + for (U32 j = 0; j <= MAX_DISCARD_LEVEL; ++j) + { + mDebugTextureLoadTimes[i][j] = -1.0f; + } + } + + for (U32 i =0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i) + { + mDebugBakedTextureTimes[i][0] = -1.0f; + mDebugBakedTextureTimes[i][1] = -1.0f; + } + status &= buildMenus(); if (!status) { @@ -183,7 +196,7 @@ void LLVOAvatarSelf::markDead() param; param = (LLViewerVisualParam*) getNextVisualParam()) { - if (param->getWearableType() != WT_INVALID) + if (param->getWearableType() != LLWearableType::WT_INVALID) { param->setIsDummy(TRUE); } @@ -679,7 +692,7 @@ BOOL LLVOAvatarSelf::setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL if (param->getCrossWearable()) { - EWearableType type = (EWearableType)param->getWearableType(); + LLWearableType::EType type = (LLWearableType::EType)param->getWearableType(); U32 size = gAgentWearables.getWearableCount(type); for (U32 count = 0; count < size; ++count) { @@ -707,9 +720,9 @@ void LLVOAvatarSelf::idleUpdateAppearanceAnimation() gAgentWearables.animateAllWearableParams(calcMorphAmount(), FALSE); // apply wearable visual params to avatar - for (U32 type = 0; type < WT_COUNT; type++) + for (U32 type = 0; type < LLWearableType::WT_COUNT; type++) { - LLWearable *wearable = gAgentWearables.getTopWearable((EWearableType)type); + LLWearable *wearable = gAgentWearables.getTopWearable((LLWearableType::EType)type); if (wearable) { wearable->writeToAvatar(); @@ -943,17 +956,17 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode) } } -/*virtual*/ BOOL LLVOAvatarSelf::isWearingWearableType(EWearableType type ) const +/*virtual*/ BOOL LLVOAvatarSelf::isWearingWearableType(LLWearableType::EType type ) const { return gAgentWearables.getWearableCount(type) > 0; } //----------------------------------------------------------------------------- -// updatedWearable( EWearableType type ) +// updatedWearable( LLWearableType::EType type ) // forces an update to any baked textures relevant to type. // will force an upload of the resulting bake if the second parameter is TRUE //----------------------------------------------------------------------------- -void LLVOAvatarSelf::wearableUpdated( EWearableType type, BOOL upload_result ) +void LLVOAvatarSelf::wearableUpdated( LLWearableType::EType type, BOOL upload_result ) { for (LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDictionary::getInstance()->getBakedTextures().begin(); baked_iter != LLVOAvatarDictionary::getInstance()->getBakedTextures().end(); @@ -974,7 +987,7 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type, BOOL upload_result ) type_iter != baked_dict->mWearables.end(); ++type_iter) { - const EWearableType comp_type = *type_iter; + const LLWearableType::EType comp_type = *type_iter; if (comp_type == type) { if (mBakedTextureDatas[index].mTexLayerSet) @@ -1110,19 +1123,19 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) U32 LLVOAvatarSelf::getNumWearables(LLVOAvatarDefines::ETextureIndex i) const { - EWearableType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); + LLWearableType::EType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); return gAgentWearables.getWearableCount(type); } // virtual void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) { - //llinfos << "onLocalTextureLoaded: " << src_vi->getID() << llendl; const LLUUID& src_id = src_vi->getID(); LLAvatarTexData *data = (LLAvatarTexData *)userdata; ETextureIndex index = data->mIndex; if (!isIndexLocalTexture(index)) return; + LLLocalTextureObject *local_tex_obj = getLocalTextureObject(index, 0); // fix for EXT-268. Preventing using of NULL pointer @@ -1238,7 +1251,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLTexLayerSet* layerset) ++local_tex_iter) { const ETextureIndex tex_index = *local_tex_iter; - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { @@ -1260,6 +1273,8 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLTexLayerSet* layerset) //----------------------------------------------------------------------------- BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) const { + const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { if (layerset == mBakedTextureDatas[i].mTexLayerSet) @@ -1270,11 +1285,11 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons ++local_tex_iter) { const ETextureIndex tex_index = *local_tex_iter; - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { - if (getLocalDiscardLevel(*local_tex_iter, wearable_index) != 0) + if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(override_tex_discard_level)) { return FALSE; } @@ -1287,13 +1302,39 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons return FALSE; } +BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const +{ + const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + + for (U32 i = 0; i < mBakedTextureDatas.size(); i++) + { + const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)i); + for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin(); + local_tex_iter != baked_dict->mLocalTextures.end(); + ++local_tex_iter) + { + const ETextureIndex tex_index = *local_tex_iter; + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); + const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); + for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) + { + if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(override_tex_discard_level)) + { + return FALSE; + } + } + } + } + return TRUE; +} + BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index) const { LLUUID id; BOOL isDefined = TRUE; if (isIndexLocalTexture(type)) { - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(type); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(type); const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); if (index >= wearable_count) { @@ -1319,6 +1360,32 @@ BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 return isDefined; } +//virtual +BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index) const +{ + if (isIndexBakedTexture(type)) + { + return LLVOAvatar::isTextureVisible(type, (U32)0); + } + + LLUUID tex_id = getLocalTextureID(type,index); + return (tex_id != IMG_INVISIBLE) + || (LLDrawPoolAlpha::sShowDebugAlpha); +} + +//virtual +BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const +{ + if (isIndexBakedTexture(type)) + { + return LLVOAvatar::isTextureVisible(type); + } + + U32 index = gAgentWearables.getWearableIndex(wearable); + return isTextureVisible(type,index); +} + + //----------------------------------------------------------------------------- // requestLayerSetUploads() //----------------------------------------------------------------------------- @@ -1333,7 +1400,7 @@ void LLVOAvatarSelf::requestLayerSetUploads() void LLVOAvatarSelf::requestLayerSetUpload(LLVOAvatarDefines::EBakedTextureIndex i) { ETextureIndex tex_index = mBakedTextureDatas[i].mTextureIndex; - bool layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index)); + const BOOL layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index)); if (!layer_baked && mBakedTextureDatas[i].mTexLayerSet) { mBakedTextureDatas[i].mTexLayerSet->requestUpload(); @@ -1350,8 +1417,8 @@ bool LLVOAvatarSelf::hasPendingBakedUploads() const { for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { - BOOL upload_pending = (mBakedTextureDatas[i].mTexLayerSet && mBakedTextureDatas[i].mTexLayerSet->getComposite()->uploadPending()); - if (upload_pending) + LLTexLayerSet* layerset = mBakedTextureDatas[i].mTexLayerSet; + if (layerset && layerset->getComposite() && layerset->getComposite()->uploadPending()) { return true; } @@ -1365,7 +1432,7 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_r { return; } - // llinfos << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegion() << llendl; + // llinfos << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegionName() << llendl; layerset->requestUpdate(); layerset->invalidateMorphMasks(); @@ -1387,6 +1454,7 @@ void LLVOAvatarSelf::invalidateAll() { invalidateComposite(mBakedTextureDatas[i].mTexLayerSet, TRUE); } + mDebugSelfLoadTimer.reset(); } //----------------------------------------------------------------------------- @@ -1435,7 +1503,7 @@ void LLVOAvatarSelf::updateComposites() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { if (mBakedTextureDatas[i].mTexLayerSet - && ((i != BAKED_SKIRT) || isWearingWearableType(WT_SKIRT))) + && ((i != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT))) { mBakedTextureDatas[i].mTexLayerSet->updateComposite(); } @@ -1514,7 +1582,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te llerrs << "Tried to set local texture with invalid type: (" << (U32) type << ", " << index << ")" << llendl; return; } - EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType(type); + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType(type); if (!gAgentWearables.getWearable(wearable_type,index)) { // no wearable is loaded, cannot set the texture. @@ -1700,10 +1768,10 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount() BOOL LLVOAvatarSelf::getIsCloud() { // do we have our body parts? - if (gAgentWearables.getWearableCount(WT_SHAPE) == 0 || - gAgentWearables.getWearableCount(WT_HAIR) == 0 || - gAgentWearables.getWearableCount(WT_EYES) == 0 || - gAgentWearables.getWearableCount(WT_SKIN) == 0) + if (gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE) == 0 || + gAgentWearables.getWearableCount(LLWearableType::WT_HAIR) == 0 || + gAgentWearables.getWearableCount(LLWearableType::WT_EYES) == 0 || + gAgentWearables.getWearableCount(LLWearableType::WT_SKIN) == 0) { return TRUE; } @@ -1729,7 +1797,7 @@ BOOL LLVOAvatarSelf::getIsCloud() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { - if (i == BAKED_SKIRT && !isWearingWearableType(WT_SKIRT)) + if (i == BAKED_SKIRT && !isWearingWearableType(LLWearableType::WT_SKIRT)) continue; const BakedTextureData& texture_data = mBakedTextureDatas[i]; @@ -1748,22 +1816,140 @@ BOOL LLVOAvatarSelf::getIsCloud() return FALSE; } +/*static*/ +void LLVOAvatarSelf::debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +{ + gAgentAvatarp->debugTimingLocalTexLoaded(success, src_vi, src, aux_src, discard_level, final, userdata); +} + +void LLVOAvatarSelf::debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +{ + LLAvatarTexData *data = (LLAvatarTexData *)userdata; + if (!data) + { + return; + } + + ETextureIndex index = data->mIndex; + + if (index < 0 || index >= TEX_NUM_INDICES) + { + return; + } + + if (discard_level >=0 && discard_level <= MAX_DISCARD_LEVEL) // ignore discard level -1, as it means we have no data. + { + mDebugTextureLoadTimes[(U32)index][(U32)discard_level] = mDebugSelfLoadTimer.getElapsedTimeF32(); + } + if (final) + { + delete data; + } +} + +void LLVOAvatarSelf::debugBakedTextureUpload(EBakedTextureIndex index, BOOL finished) +{ + U32 done = 0; + if (finished) + { + done = 1; + } + mDebugBakedTextureTimes[index][done] = mDebugSelfLoadTimer.getElapsedTimeF32(); +} + +const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLTexLayerSet* layerset) const +{ + std::string text=""; + + text = llformat("[Final:%d Avail:%d] ",isLocalTextureDataFinal(layerset), isLocalTextureDataAvailable(layerset)); + + /* if (layerset == mBakedTextureDatas[BAKED_HEAD].mTexLayerSet) + return getLocalDiscardLevel(TEX_HEAD_BODYPAINT) >= 0; */ + for (LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDictionary::getInstance()->getBakedTextures().begin(); + baked_iter != LLVOAvatarDictionary::getInstance()->getBakedTextures().end(); + ++baked_iter) + { + const EBakedTextureIndex baked_index = baked_iter->first; + if (layerset == mBakedTextureDatas[baked_index].mTexLayerSet) + { + const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second; + text += llformat("[%d] '%s' ( ",baked_index, baked_dict->mName.c_str()); + for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin(); + local_tex_iter != baked_dict->mLocalTextures.end(); + ++local_tex_iter) + { + const ETextureIndex tex_index = *local_tex_iter; + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); + const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); + if (wearable_count > 0) + { + text += LLWearableType::getTypeName(wearable_type) + ":"; + for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) + { + const U32 discard_level = getLocalDiscardLevel(tex_index, wearable_index); + std::string discard_str = llformat("%d ",discard_level); + text += llformat("%d ",discard_level); + } + } + } + text += ")"; + break; + } + } + return text; +} + +const std::string LLVOAvatarSelf::debugDumpAllLocalTextureDataInfo() const +{ + std::string text; + const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); -const LLUUID& LLVOAvatarSelf::grabLocalTexture(ETextureIndex type, U32 index) const + for (U32 i = 0; i < mBakedTextureDatas.size(); i++) + { + const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)i); + BOOL is_texture_final = TRUE; + for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin(); + local_tex_iter != baked_dict->mLocalTextures.end(); + ++local_tex_iter) + { + const ETextureIndex tex_index = *local_tex_iter; + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); + const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); + for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) + { + is_texture_final &= (getLocalDiscardLevel(*local_tex_iter, wearable_index) <= (S32)(override_tex_discard_level)); + } + } + text += llformat("%s:%d ",baked_dict->mName.c_str(),is_texture_final); + } + return text; +} + +const LLUUID& LLVOAvatarSelf::grabBakedTexture(EBakedTextureIndex baked_index) const { - if (canGrabLocalTexture(type, index)) + if (canGrabBakedTexture(baked_index)) { - return getTEImage( type )->getID(); + ETextureIndex tex_index = LLVOAvatarDictionary::bakedToLocalTextureIndex(baked_index); + if (tex_index == TEX_NUM_INDICES) + { + return LLUUID::null; + } + return getTEImage( tex_index )->getID(); } return LLUUID::null; } -BOOL LLVOAvatarSelf::canGrabLocalTexture(ETextureIndex type, U32 index) const +BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const { + ETextureIndex tex_index = LLVOAvatarDictionary::bakedToLocalTextureIndex(baked_index); + if (tex_index == TEX_NUM_INDICES) + { + return FALSE; + } // Check if the texture hasn't been baked yet. - if (!isTextureDefined(type, index)) + if (!isTextureDefined(tex_index, 0)) { - lldebugs << "getTEImage( " << (U32) type << ", " << index << " )->getID() == IMG_DEFAULT_AVATAR" << llendl; + lldebugs << "getTEImage( " << (U32) tex_index << " )->getID() == IMG_DEFAULT_AVATAR" << llendl; return FALSE; } @@ -1773,13 +1959,7 @@ BOOL LLVOAvatarSelf::canGrabLocalTexture(ETextureIndex type, U32 index) const // Check permissions of textures that show up in the // baked texture. We don't want people copying people's // work via baked textures. - /* switch(type) - case TEX_EYES_BAKED: - textures.push_back(TEX_EYES_IRIS); */ - const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture(type); - if (!texture_dict->mIsUsedByBakedTexture) return FALSE; - const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_index); for (texture_vec_t::const_iterator iter = baked_dict->mLocalTextures.begin(); iter != baked_dict->mLocalTextures.end(); @@ -1852,7 +2032,7 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe LLLocalTextureObject* LLVOAvatarSelf::getLocalTextureObject(LLVOAvatarDefines::ETextureIndex i, U32 wearable_index) const { - EWearableType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); + LLWearableType::EType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); LLWearable* wearable = gAgentWearables.getWearable(type, wearable_index); if (wearable) { @@ -1907,6 +2087,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture(te); if (texture_dict->mIsBakedTexture) { + debugBakedTextureUpload(texture_dict->mBakedTextureIndex, TRUE); // FALSE for start of upload, TRUE for finish. llinfos << "New baked texture: " << texture_dict->mName << " UUID: " << uuid <<llendl; } else @@ -1919,6 +2100,76 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) if (!hasPendingBakedUploads()) { gAgent.sendAgentSetAppearance(); + + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["TIME"] = llformat("%d",(U32)mDebugSelfLoadTimer.getElapsedTimeF32()); + if (isAllLocalTextureDataFinal()) + { + LLNotificationsUtil::add("AvatarRezSelfBakedDoneNotification",args); + } + else + { + args["STATUS"] = debugDumpAllLocalTextureDataInfo(); + LLNotificationsUtil::add("AvatarRezSelfBakedUpdateNotification",args); + } + } + + outputRezDiagnostics(); + } +} + +void LLVOAvatarSelf::outputRezDiagnostics() const +{ + const F32 final_time = mDebugSelfLoadTimer.getElapsedTimeF32(); + llinfos << "REZTIME: Myself rez stats:" << llendl; + llinfos << "\t Time from avatar creation to load wearables: " << (S32)mDebugTimeWearablesLoaded << llendl; + llinfos << "\t Time from avatar creation to de-cloud: " << (S32)mDebugTimeAvatarVisible << llendl; + llinfos << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << llendl; + llinfos << "\t Load time for each texture: " << llendl; + for (U32 i = 0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i) + { + std::stringstream out; + out << "\t\t (" << i << ") "; + U32 j=0; + for (j=0; j <= MAX_DISCARD_LEVEL; j++) + { + out << "\t"; + S32 load_time = (S32)mDebugTextureLoadTimes[i][j]; + if (load_time == -1) + { + out << "*"; + if (j == 0) + break; + } + else + { + out << load_time; + } + } + + // Don't print out non-existent textures. + if (j != 0) + llinfos << out.str() << llendl; + } + llinfos << "\t Time points for each upload (start / finish)" << llendl; + for (U32 i = 0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i) + { + llinfos << "\t\t (" << i << ") \t" << (S32)mDebugBakedTextureTimes[i][0] << " / " << (S32)mDebugBakedTextureTimes[i][1] << llendl; + } + + for (LLVOAvatarDefines::LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().begin(); + baked_iter != LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().end(); + ++baked_iter) + { + const LLVOAvatarDefines::EBakedTextureIndex baked_index = baked_iter->first; + const LLTexLayerSet *layerset = debugGetLayerSet(baked_index); + if (!layerset) continue; + const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite(); + if (!layerset_buffer) continue; + llinfos << layerset_buffer->dumpTextureInfo() << llendl; } } @@ -2018,7 +2269,6 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) // Don't know if this is needed updateMeshTextures(); - } //----------------------------------------------------------------------------- diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 337d445eac..e461dc07da 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -39,9 +39,10 @@ struct LocalTextureData; -//------------------------------------------------------------------------ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatarSelf -//------------------------------------------------------------------------ +// +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLVOAvatarSelf : public LLVOAvatar { @@ -123,11 +124,11 @@ public: //-------------------------------------------------------------------- public: /*virtual*/ BOOL getIsCloud(); -private: //-------------------------------------------------------------------- // Region state //-------------------------------------------------------------------- +private: U64 mLastRegionHandle; LLFrameTimer mRegionCrossingTimer; S32 mRegionCrossingCount; @@ -178,6 +179,9 @@ public: BOOL isLocalTextureDataFinal(const LLTexLayerSet* layerset) const; // If you want to check all textures of a given type, pass gAgentWearables.getWearableCount() for index /*virtual*/ BOOL isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index) const; + /*virtual*/ BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const; + /*virtual*/ BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const; + //-------------------------------------------------------------------- // Local Textures @@ -187,8 +191,6 @@ public: LLViewerFetchedTexture* getLocalTextureGL(LLVOAvatarDefines::ETextureIndex type, U32 index) const; const LLUUID& getLocalTextureID(LLVOAvatarDefines::ETextureIndex type, U32 index) const; void setLocalTextureTE(U8 te, LLViewerTexture* image, U32 index); - const LLUUID& grabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index) const; - BOOL canGrabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index) const; /*virtual*/ void setLocalTexture(LLVOAvatarDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index); protected: /*virtual*/ void setBakedReady(LLVOAvatarDefines::ETextureIndex type, BOOL baked_version_exists, U32 index); @@ -238,6 +240,10 @@ public: void setupComposites(); void updateComposites(); + const LLUUID& grabBakedTexture(LLVOAvatarDefines::EBakedTextureIndex baked_index) const; + BOOL canGrabBakedTexture(LLVOAvatarDefines::EBakedTextureIndex baked_index) const; + + //-------------------------------------------------------------------- // Scratch textures (used for compositing) //-------------------------------------------------------------------- @@ -272,8 +278,8 @@ protected: **/ public: - /*virtual*/ BOOL isWearingWearableType(EWearableType type) const; - void wearableUpdated(EWearableType type, BOOL upload_result); + /*virtual*/ BOOL isWearingWearableType(LLWearableType::EType type) const; + void wearableUpdated(LLWearableType::EType type, BOOL upload_result); protected: U32 getNumWearables(LLVOAvatarDefines::ETextureIndex i) const; @@ -322,11 +328,46 @@ public: ** DIAGNOSTICS **/ + //-------------------------------------------------------------------- + // General + //-------------------------------------------------------------------- public: static void dumpTotalLocalTextureByteCount(); void dumpLocalTextures() const; static void dumpScratchTextureByteCount(); + //-------------------------------------------------------------------- + // Avatar Rez Metrics + //-------------------------------------------------------------------- +public: + struct LLAvatarTexData + { + LLAvatarTexData(const LLUUID& id, LLVOAvatarDefines::ETextureIndex index) : + mAvatarID(id), + mIndex(index) + {} + LLUUID mAvatarID; + LLVOAvatarDefines::ETextureIndex mIndex; + }; + void debugWearablesLoaded() { mDebugTimeWearablesLoaded = mDebugSelfLoadTimer.getElapsedTimeF32(); } + void debugAvatarVisible() { mDebugTimeAvatarVisible = mDebugSelfLoadTimer.getElapsedTimeF32(); } + void outputRezDiagnostics() const; + void debugBakedTextureUpload(LLVOAvatarDefines::EBakedTextureIndex index, BOOL finished); + static void debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); + + BOOL isAllLocalTextureDataFinal() const; + + const LLTexLayerSet* debugGetLayerSet(LLVOAvatarDefines::EBakedTextureIndex index) const { return mBakedTextureDatas[index].mTexLayerSet; } + const std::string debugDumpLocalTextureDataInfo(const LLTexLayerSet* layerset) const; // Lists out state of this particular baked texture layer + const std::string debugDumpAllLocalTextureDataInfo() const; // Lists out which baked textures are at highest LOD +private: + LLFrameTimer mDebugSelfLoadTimer; + F32 mDebugTimeWearablesLoaded; + F32 mDebugTimeAvatarVisible; + F32 mDebugTextureLoadTimes[LLVOAvatarDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // load time for each texture at each discard level + F32 mDebugBakedTextureTimes[LLVOAvatarDefines::BAKED_NUM_INDICES][2]; // time to start upload and finish upload of each baked texture + void debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); + /** Diagnostics ** ** *******************************************************************************/ diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 7bb1006e93..1b4471a9fe 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -72,9 +72,9 @@ private: void LLVoiceCallCapResponder::error(U32 status, const std::string& reason) { - llwarns << "LLVoiceCallCapResponder::error(" + LL_WARNS("Voice") << "LLVoiceCallCapResponder::error(" << status << ": " << reason << ")" - << llendl; + << LL_ENDL; LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mSessionID); if ( channelp ) { @@ -104,8 +104,8 @@ void LLVoiceCallCapResponder::result(const LLSD& content) LLSD::map_const_iterator iter; for(iter = content.beginMap(); iter != content.endMap(); ++iter) { - llinfos << "LLVoiceCallCapResponder::result got " - << iter->first << llendl; + LL_DEBUGS("Voice") << "LLVoiceCallCapResponder::result got " + << iter->first << LL_ENDL; } channelp->setChannelInfo( @@ -131,10 +131,8 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess { // a voice channel already exists for this session id, so this instance will be orphaned // the end result should simply be the failure to make voice calls - llwarns << "Duplicate voice channels registered for session_id " << session_id << llendl; + LL_WARNS("Voice") << "Duplicate voice channels registered for session_id " << session_id << LL_ENDL; } - - LLVoiceClient::getInstance()->addObserver(this); } LLVoiceChannel::~LLVoiceChannel() @@ -142,7 +140,7 @@ LLVoiceChannel::~LLVoiceChannel() // Must check instance exists here, the singleton MAY have already been destroyed. if(LLVoiceClient::instanceExists()) { - LLVoiceClient::instance().removeObserver(this); + LLVoiceClient::getInstance()->removeObserver(this); } sVoiceChannelMap.erase(mSessionID); @@ -162,13 +160,13 @@ void LLVoiceChannel::setChannelInfo( if (mURI.empty()) { LLNotificationsUtil::add("VoiceChannelJoinFailed", mNotifyArgs); - llwarns << "Received empty URI for channel " << mSessionName << llendl; + LL_WARNS("Voice") << "Received empty URI for channel " << mSessionName << LL_ENDL; deactivate(); } else if (mCredentials.empty()) { LLNotificationsUtil::add("VoiceChannelJoinFailed", mNotifyArgs); - llwarns << "Received empty credentials for channel " << mSessionName << llendl; + LL_WARNS("Voice") << "Received empty credentials for channel " << mSessionName << LL_ENDL; deactivate(); } else @@ -283,13 +281,14 @@ void LLVoiceChannel::deactivate() //Default mic is OFF when leaving voice calls if (gSavedSettings.getBOOL("AutoDisengageMic") && sCurrentVoiceChannel == this && - gVoiceClient->getUserPTTState()) + LLVoiceClient::getInstance()->getUserPTTState()) { gSavedSettings.setBOOL("PTTCurrentlyEnabled", true); - gVoiceClient->inputUserControlState(true); + LLVoiceClient::getInstance()->inputUserControlState(true); } } - + LLVoiceClient::getInstance()->removeObserver(this); + if (sCurrentVoiceChannel == this) { // default channel is proximal channel @@ -329,7 +328,9 @@ void LLVoiceChannel::activate() { setState(STATE_CALL_STARTED); } - + + LLVoiceClient::getInstance()->addObserver(this); + //do not send earlier, channel should be initialized, should not be in STATE_NO_CHANNEL_INFO state sCurrentVoiceChannelChangedSignal(this->mSessionID); } @@ -371,6 +372,11 @@ LLVoiceChannel* LLVoiceChannel::getChannelByURI(std::string uri) } } +LLVoiceChannel* LLVoiceChannel::getCurrentVoiceChannel() +{ + return sCurrentVoiceChannel; +} + void LLVoiceChannel::updateSessionID(const LLUUID& new_session_id) { sVoiceChannelMap.erase(sVoiceChannelMap.find(mSessionID)); @@ -422,7 +428,6 @@ void LLVoiceChannel::initClass() sCurrentVoiceChannel = LLVoiceChannelProximal::getInstance(); } - //static void LLVoiceChannel::suspend() { @@ -438,7 +443,7 @@ void LLVoiceChannel::resume() { if (sSuspended) { - if (gVoiceClient->voiceEnabled()) + if (LLVoiceClient::getInstance()->voiceEnabled()) { if (sSuspendedVoiceChannel) { @@ -508,9 +513,9 @@ void LLVoiceChannelGroup::activate() #endif //Mic default state is OFF on initiating/joining Ad-Hoc/Group calls - if (gVoiceClient->getUserPTTState() && gVoiceClient->getPTTIsToggle()) + if (LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle()) { - gVoiceClient->inputUserControlState(true); + LLVoiceClient::getInstance()->inputUserControlState(true); } } @@ -557,7 +562,7 @@ void LLVoiceChannelGroup::setChannelInfo( else { //*TODO: notify user - llwarns << "Received invalid credentials for channel " << mSessionName << llendl; + LL_WARNS("Voice") << "Received invalid credentials for channel " << mSessionName << LL_ENDL; deactivate(); } } @@ -656,7 +661,6 @@ void LLVoiceChannelGroup::setState(EState state) LLVoiceChannelProximal::LLVoiceChannelProximal() : LLVoiceChannel(LLUUID::null, LLStringUtil::null) { - activate(); } BOOL LLVoiceChannelProximal::isActive() @@ -668,13 +672,13 @@ void LLVoiceChannelProximal::activate() { if (callStarted()) return; - LLVoiceChannel::activate(); - - if (callStarted()) + if((LLVoiceChannel::sCurrentVoiceChannel != this) && (LLVoiceChannel::getState() == STATE_CONNECTED)) { - // this implicitly puts you back in the spatial channel - LLVoiceClient::getInstance()->leaveNonSpatialChannel(); + // we're connected to a non-spatial channel, so disconnect. + LLVoiceClient::getInstance()->leaveNonSpatialChannel(); } + LLVoiceChannel::activate(); + } void LLVoiceChannelProximal::onChange(EStatusType type, const std::string &channelURI, bool proximal) @@ -704,7 +708,7 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status) return; case STATUS_VOICE_DISABLED: //skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749) - if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()) + if(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()) { //TODO: remove or redirect this call status notification // LLCallInfoDialog::show("unavailable", mNotifyArgs); @@ -764,7 +768,7 @@ LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID& session_id, const std::string void LLVoiceChannelP2P::handleStatusChange(EStatusType type) { - llinfos << "P2P CALL CHANNEL STATUS CHANGE: incoming=" << int(mReceivedCall) << " newstatus=" << LLVoiceClientStatusObserver::status2string(type) << " (mState=" << mState << ")" << llendl; + LL_INFOS("Voice") << "P2P CALL CHANNEL STATUS CHANGE: incoming=" << int(mReceivedCall) << " newstatus=" << LLVoiceClientStatusObserver::status2string(type) << " (mState=" << mState << ")" << LL_ENDL; // status updates switch(type) @@ -787,6 +791,12 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type) } mIgnoreNextSessionLeave = FALSE; return; + case STATUS_JOINING: + // because we join session we expect to process session leave event in the future. EXT-7371 + // may be this should be done in the LLVoiceChannel::handleStatusChange. + mIgnoreNextSessionLeave = FALSE; + break; + default: break; } @@ -838,9 +848,9 @@ void LLVoiceChannelP2P::activate() LLRecentPeople::instance().add(mOtherUserID); //Default mic is ON on initiating/joining P2P calls - if (!gVoiceClient->getUserPTTState() && gVoiceClient->getPTTIsToggle()) + if (!LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle()) { - gVoiceClient->inputUserControlState(true); + LLVoiceClient::getInstance()->inputUserControlState(true); } } } @@ -903,7 +913,7 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s void LLVoiceChannelP2P::setState(EState state) { - llinfos << "P2P CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << llendl; + LL_INFOS("Voice") << "P2P CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << LL_ENDL; if (mReceivedCall) // incoming call { diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 941cccacc3..573fab1f4f 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -98,7 +98,8 @@ public: static LLVoiceChannel* getChannelByID(const LLUUID& session_id); static LLVoiceChannel* getChannelByURI(std::string uri); - static LLVoiceChannel* getCurrentVoiceChannel() { return sCurrentVoiceChannel; } + static LLVoiceChannel* getCurrentVoiceChannel(); + static void initClass(); static void suspend(); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 542ec16547..42e44634b6 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1,6 +1,6 @@ /** * @file llvoiceclient.cpp - * @brief Implementation of LLVoiceClient class which is the interface to the voice client process. + * @brief Voice client delegation class implementation. * * $LicenseInfo:firstyear=2001&license=viewergpl$ * @@ -17,8 +17,7 @@ * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -32,5420 +31,313 @@ #include "llviewerprecompiledheaders.h" #include "llvoiceclient.h" - -#include <boost/tokenizer.hpp> - -// library includes -#include "llnotificationsutil.h" -#include "llsdserialize.h" -#include "llsdutil.h" - - -// project includes -#include "llvoavatar.h" -#include "llbufferstream.h" -#include "llfile.h" -#ifdef LL_STANDALONE -# include "expat.h" -#else -# include "expat/expat.h" -#endif -#include "llcallbacklist.h" -#include "llcallingcard.h" // for LLFriendObserver -#include "llviewerregion.h" -#include "llviewernetwork.h" // for gGridChoice -#include "llbase64.h" #include "llviewercontrol.h" -#include "llkeyboard.h" -#include "llappviewer.h" // for gDisconnected, gDisableVoice -#include "llmutelist.h" // to check for muted avatars -#include "llagent.h" -#include "llvoavatarself.h" -#include "llcachename.h" -#include "llimview.h" // for LLIMMgr -#include "llparcel.h" -#include "llviewerparcelmgr.h" -//#include "llfirstuse.h" -#include "llspeakers.h" -#include "lltrans.h" #include "llviewerwindow.h" -#include "llviewercamera.h" -#include "llvoavatarself.h" -#include "llvoicechannel.h" - -// for base64 decoding -#include "apr_base64.h" - -// for SHA1 hash -#include "apr_sha1.h" - -// for MD5 hash -#include "llmd5.h" - -#define USE_SESSION_GROUPS 0 +#include "llvoicevivox.h" +#include "llviewernetwork.h" +#include "llhttpnode.h" +#include "llnotificationsutil.h" +#include "llsdserialize.h" +#include "llui.h" -static bool sConnectingToAgni = false; -F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f; +const F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f; const F32 LLVoiceClient::VOLUME_MIN = 0.f; const F32 LLVoiceClient::VOLUME_DEFAULT = 0.5f; const F32 LLVoiceClient::VOLUME_MAX = 1.0f; -const F32 VOLUME_SCALE_VIVOX = 0.01f; - -const F32 SPEAKING_TIMEOUT = 1.f; - -const int VOICE_MAJOR_VERSION = 1; -const int VOICE_MINOR_VERSION = 0; - -LLVoiceClient *gVoiceClient = NULL; - -// Don't retry connecting to the daemon more frequently than this: -const F32 CONNECT_THROTTLE_SECONDS = 1.0f; - -// Don't send positional updates more frequently than this: -const F32 UPDATE_THROTTLE_SECONDS = 0.1f; - -const F32 LOGIN_RETRY_SECONDS = 10.0f; -const int MAX_LOGIN_RETRIES = 12; - -// Defines the maximum number of times(in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine() -// which is treated as normal. If this number is exceeded we suspect there is a problem with connection -// to voice server (EXT-4313). When voice works correctly, there is from 1 to 15 times. 50 was chosen -// to make sure we don't make mistake when slight connection problems happen- situation when connection to server is -// blocked is VERY rare and it's better to sacrifice response time in this situation for the sake of stability. -const int MAX_NORMAL_JOINING_SPATIAL_NUM = 50; - -static void setUUIDFromStringHash(LLUUID &uuid, const std::string &str) -{ - LLMD5 md5_uuid; - md5_uuid.update((const unsigned char*)str.data(), str.size()); - md5_uuid.finalize(); - md5_uuid.raw_digest(uuid.mData); -} - -static int scale_mic_volume(float volume) -{ - // incoming volume has the range [0.0 ... 2.0], with 1.0 as the default. - // Map it to Vivox levels as follows: 0.0 -> 30, 1.0 -> 50, 2.0 -> 70 - return 30 + (int)(volume * 20.0f); -} - -static int scale_speaker_volume(float volume) -{ - // incoming volume has the range [0.0 ... 1.0], with 0.5 as the default. - // Map it to Vivox levels as follows: 0.0 -> 30, 0.5 -> 50, 1.0 -> 70 - return 30 + (int)(volume * 40.0f); -} - -class LLViewerVoiceAccountProvisionResponder : - public LLHTTPClient::Responder -{ -public: - LLViewerVoiceAccountProvisionResponder(int retries) - { - mRetries = retries; - } - - virtual void error(U32 status, const std::string& reason) - { - if ( mRetries > 0 ) - { - LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, retrying. status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; - if ( gVoiceClient ) gVoiceClient->requestVoiceAccountProvision( - mRetries - 1); - } - else - { - LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, too many retries (giving up). status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; - if ( gVoiceClient ) gVoiceClient->giveUp(); - } - } - - virtual void result(const LLSD& content) - { - if ( gVoiceClient ) - { - std::string voice_sip_uri_hostname; - std::string voice_account_server_uri; - - LL_DEBUGS("Voice") << "ProvisionVoiceAccountRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; - - if(content.has("voice_sip_uri_hostname")) - voice_sip_uri_hostname = content["voice_sip_uri_hostname"].asString(); - - // this key is actually misnamed -- it will be an entire URI, not just a hostname. - if(content.has("voice_account_server_name")) - voice_account_server_uri = content["voice_account_server_name"].asString(); - - gVoiceClient->login( - content["username"].asString(), - content["password"].asString(), - voice_sip_uri_hostname, - voice_account_server_uri); - } - } - -private: - int mRetries; -}; - -/** - * @class LLVivoxProtocolParser - * @brief This class helps construct new LLIOPipe specializations - * @see LLIOPipe - * - * THOROUGH_DESCRIPTION - */ -class LLVivoxProtocolParser : public LLIOPipe -{ - LOG_CLASS(LLVivoxProtocolParser); -public: - LLVivoxProtocolParser(); - virtual ~LLVivoxProtocolParser(); - -protected: - /* @name LLIOPipe virtual implementations - */ - //@{ - /** - * @brief Process the data in buffer - */ - virtual EStatus process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump); - //@} - - std::string mInput; - - // Expat control members - XML_Parser parser; - int responseDepth; - bool ignoringTags; - bool isEvent; - int ignoreDepth; - - // Members for processing responses. The values are transient and only valid within a call to processResponse(). - bool squelchDebugOutput; - int returnCode; - int statusCode; - std::string statusString; - std::string requestId; - std::string actionString; - std::string connectorHandle; - std::string versionID; - std::string accountHandle; - std::string sessionHandle; - std::string sessionGroupHandle; - std::string alias; - std::string applicationString; - - // Members for processing events. The values are transient and only valid within a call to processResponse(). - std::string eventTypeString; - int state; - std::string uriString; - bool isChannel; - bool incoming; - bool enabled; - std::string nameString; - std::string audioMediaString; - std::string displayNameString; - std::string deviceString; - int participantType; - bool isLocallyMuted; - bool isModeratorMuted; - bool isSpeaking; - int volume; - F32 energy; - std::string messageHeader; - std::string messageBody; - std::string notificationType; - bool hasText; - bool hasAudio; - bool hasVideo; - bool terminated; - std::string blockMask; - std::string presenceOnly; - std::string autoAcceptMask; - std::string autoAddAsBuddy; - int numberOfAliases; - std::string subscriptionHandle; - std::string subscriptionType; - - - // Members for processing text between tags - std::string textBuffer; - bool accumulateText; - - void reset(); - - void processResponse(std::string tag); - -static void XMLCALL ExpatStartTag(void *data, const char *el, const char **attr); -static void XMLCALL ExpatEndTag(void *data, const char *el); -static void XMLCALL ExpatCharHandler(void *data, const XML_Char *s, int len); - - void StartTag(const char *tag, const char **attr); - void EndTag(const char *tag); - void CharData(const char *buffer, int length); - -}; - -LLVivoxProtocolParser::LLVivoxProtocolParser() -{ - parser = NULL; - parser = XML_ParserCreate(NULL); - - reset(); -} - -void LLVivoxProtocolParser::reset() -{ - responseDepth = 0; - ignoringTags = false; - accumulateText = false; - energy = 0.f; - hasText = false; - hasAudio = false; - hasVideo = false; - terminated = false; - ignoreDepth = 0; - isChannel = false; - incoming = false; - enabled = false; - isEvent = false; - isLocallyMuted = false; - isModeratorMuted = false; - isSpeaking = false; - participantType = 0; - squelchDebugOutput = false; - returnCode = -1; - state = 0; - statusCode = 0; - volume = 0; - textBuffer.clear(); - alias.clear(); - numberOfAliases = 0; - applicationString.clear(); -} - -//virtual -LLVivoxProtocolParser::~LLVivoxProtocolParser() -{ - if (parser) - XML_ParserFree(parser); -} - -// virtual -LLIOPipe::EStatus LLVivoxProtocolParser::process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump) -{ - LLBufferStream istr(channels, buffer.get()); - std::ostringstream ostr; - while (istr.good()) - { - char buf[1024]; - istr.read(buf, sizeof(buf)); - mInput.append(buf, istr.gcount()); - } - - // Look for input delimiter(s) in the input buffer. If one is found, send the message to the xml parser. - int start = 0; - int delim; - while((delim = mInput.find("\n\n\n", start)) != std::string::npos) - { - - // Reset internal state of the LLVivoxProtocolParser (no effect on the expat parser) - reset(); - - XML_ParserReset(parser, NULL); - XML_SetElementHandler(parser, ExpatStartTag, ExpatEndTag); - XML_SetCharacterDataHandler(parser, ExpatCharHandler); - XML_SetUserData(parser, this); - XML_Parse(parser, mInput.data() + start, delim - start, false); - - // If this message isn't set to be squelched, output the raw XML received. - if(!squelchDebugOutput) - { - LL_DEBUGS("Voice") << "parsing: " << mInput.substr(start, delim - start) << LL_ENDL; - } - - start = delim + 3; - } - - if(start != 0) - mInput = mInput.substr(start); - - LL_DEBUGS("VivoxProtocolParser") << "at end, mInput is: " << mInput << LL_ENDL; - - if(!gVoiceClient->mConnected) - { - // If voice has been disabled, we just want to close the socket. This does so. - LL_INFOS("Voice") << "returning STATUS_STOP" << LL_ENDL; - return STATUS_STOP; - } - - return STATUS_OK; -} - -void XMLCALL LLVivoxProtocolParser::ExpatStartTag(void *data, const char *el, const char **attr) -{ - if (data) - { - LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; - object->StartTag(el, attr); - } -} - -// -------------------------------------------------------------------------------- - -void XMLCALL LLVivoxProtocolParser::ExpatEndTag(void *data, const char *el) -{ - if (data) - { - LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; - object->EndTag(el); - } -} - -// -------------------------------------------------------------------------------- - -void XMLCALL LLVivoxProtocolParser::ExpatCharHandler(void *data, const XML_Char *s, int len) -{ - if (data) - { - LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; - object->CharData(s, len); - } -} - -// -------------------------------------------------------------------------------- - - -void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr) -{ - // Reset the text accumulator. We shouldn't have strings that are inturrupted by new tags - textBuffer.clear(); - // only accumulate text if we're not ignoring tags. - accumulateText = !ignoringTags; - - if (responseDepth == 0) - { - isEvent = !stricmp("Event", tag); - - if (!stricmp("Response", tag) || isEvent) - { - // Grab the attributes - while (*attr) - { - const char *key = *attr++; - const char *value = *attr++; - - if (!stricmp("requestId", key)) - { - requestId = value; - } - else if (!stricmp("action", key)) - { - actionString = value; - } - else if (!stricmp("type", key)) - { - eventTypeString = value; - } - } - } - LL_DEBUGS("VivoxProtocolParser") << tag << " (" << responseDepth << ")" << LL_ENDL; - } - else - { - if (ignoringTags) - { - LL_DEBUGS("VivoxProtocolParser") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; - } - else - { - LL_DEBUGS("VivoxProtocolParser") << tag << " (" << responseDepth << ")" << LL_ENDL; - - // Ignore the InputXml stuff so we don't get confused - if (!stricmp("InputXml", tag)) - { - ignoringTags = true; - ignoreDepth = responseDepth; - accumulateText = false; - - LL_DEBUGS("VivoxProtocolParser") << "starting ignore, ignoreDepth is " << ignoreDepth << LL_ENDL; - } - else if (!stricmp("CaptureDevices", tag)) - { - gVoiceClient->clearCaptureDevices(); - } - else if (!stricmp("RenderDevices", tag)) - { - gVoiceClient->clearRenderDevices(); - } - else if (!stricmp("CaptureDevice", tag)) - { - deviceString.clear(); - } - else if (!stricmp("RenderDevice", tag)) - { - deviceString.clear(); - } - else if (!stricmp("Buddies", tag)) - { - gVoiceClient->deleteAllBuddies(); - } - else if (!stricmp("BlockRules", tag)) - { - gVoiceClient->deleteAllBlockRules(); - } - else if (!stricmp("AutoAcceptRules", tag)) - { - gVoiceClient->deleteAllAutoAcceptRules(); - } - - } - } - responseDepth++; -} - -// -------------------------------------------------------------------------------- - -void LLVivoxProtocolParser::EndTag(const char *tag) -{ - const std::string& string = textBuffer; - - responseDepth--; - - if (ignoringTags) - { - if (ignoreDepth == responseDepth) - { - LL_DEBUGS("VivoxProtocolParser") << "end of ignore" << LL_ENDL; - ignoringTags = false; - } - else - { - LL_DEBUGS("VivoxProtocolParser") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; - } - } - - if (!ignoringTags) - { - LL_DEBUGS("VivoxProtocolParser") << "processing tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; - - // Closing a tag. Finalize the text we've accumulated and reset - if (!stricmp("ReturnCode", tag)) - returnCode = strtol(string.c_str(), NULL, 10); - else if (!stricmp("SessionHandle", tag)) - sessionHandle = string; - else if (!stricmp("SessionGroupHandle", tag)) - sessionGroupHandle = string; - else if (!stricmp("StatusCode", tag)) - statusCode = strtol(string.c_str(), NULL, 10); - else if (!stricmp("StatusString", tag)) - statusString = string; - else if (!stricmp("ParticipantURI", tag)) - uriString = string; - else if (!stricmp("Volume", tag)) - volume = strtol(string.c_str(), NULL, 10); - else if (!stricmp("Energy", tag)) - energy = (F32)strtod(string.c_str(), NULL); - else if (!stricmp("IsModeratorMuted", tag)) - isModeratorMuted = !stricmp(string.c_str(), "true"); - else if (!stricmp("IsSpeaking", tag)) - isSpeaking = !stricmp(string.c_str(), "true"); - else if (!stricmp("Alias", tag)) - alias = string; - else if (!stricmp("NumberOfAliases", tag)) - numberOfAliases = strtol(string.c_str(), NULL, 10); - else if (!stricmp("Application", tag)) - applicationString = string; - else if (!stricmp("ConnectorHandle", tag)) - connectorHandle = string; - else if (!stricmp("VersionID", tag)) - versionID = string; - else if (!stricmp("AccountHandle", tag)) - accountHandle = string; - else if (!stricmp("State", tag)) - state = strtol(string.c_str(), NULL, 10); - else if (!stricmp("URI", tag)) - uriString = string; - else if (!stricmp("IsChannel", tag)) - isChannel = !stricmp(string.c_str(), "true"); - else if (!stricmp("Incoming", tag)) - incoming = !stricmp(string.c_str(), "true"); - else if (!stricmp("Enabled", tag)) - enabled = !stricmp(string.c_str(), "true"); - else if (!stricmp("Name", tag)) - nameString = string; - else if (!stricmp("AudioMedia", tag)) - audioMediaString = string; - else if (!stricmp("ChannelName", tag)) - nameString = string; - else if (!stricmp("DisplayName", tag)) - displayNameString = string; - else if (!stricmp("Device", tag)) - deviceString = string; - else if (!stricmp("AccountName", tag)) - nameString = string; - else if (!stricmp("ParticipantType", tag)) - participantType = strtol(string.c_str(), NULL, 10); - else if (!stricmp("IsLocallyMuted", tag)) - isLocallyMuted = !stricmp(string.c_str(), "true"); - else if (!stricmp("MicEnergy", tag)) - energy = (F32)strtod(string.c_str(), NULL); - else if (!stricmp("ChannelName", tag)) - nameString = string; - else if (!stricmp("ChannelURI", tag)) - uriString = string; - else if (!stricmp("BuddyURI", tag)) - uriString = string; - else if (!stricmp("Presence", tag)) - statusString = string; - else if (!stricmp("CaptureDevice", tag)) - { - gVoiceClient->addCaptureDevice(deviceString); - } - else if (!stricmp("RenderDevice", tag)) - { - gVoiceClient->addRenderDevice(deviceString); - } - else if (!stricmp("Buddy", tag)) - { - gVoiceClient->processBuddyListEntry(uriString, displayNameString); - } - else if (!stricmp("BlockRule", tag)) - { - gVoiceClient->addBlockRule(blockMask, presenceOnly); - } - else if (!stricmp("BlockMask", tag)) - blockMask = string; - else if (!stricmp("PresenceOnly", tag)) - presenceOnly = string; - else if (!stricmp("AutoAcceptRule", tag)) - { - gVoiceClient->addAutoAcceptRule(autoAcceptMask, autoAddAsBuddy); - } - else if (!stricmp("AutoAcceptMask", tag)) - autoAcceptMask = string; - else if (!stricmp("AutoAddAsBuddy", tag)) - autoAddAsBuddy = string; - else if (!stricmp("MessageHeader", tag)) - messageHeader = string; - else if (!stricmp("MessageBody", tag)) - messageBody = string; - else if (!stricmp("NotificationType", tag)) - notificationType = string; - else if (!stricmp("HasText", tag)) - hasText = !stricmp(string.c_str(), "true"); - else if (!stricmp("HasAudio", tag)) - hasAudio = !stricmp(string.c_str(), "true"); - else if (!stricmp("HasVideo", tag)) - hasVideo = !stricmp(string.c_str(), "true"); - else if (!stricmp("Terminated", tag)) - terminated = !stricmp(string.c_str(), "true"); - else if (!stricmp("SubscriptionHandle", tag)) - subscriptionHandle = string; - else if (!stricmp("SubscriptionType", tag)) - subscriptionType = string; - - textBuffer.clear(); - accumulateText= false; - - if (responseDepth == 0) - { - // We finished all of the XML, process the data - processResponse(tag); - } - } -} - -// -------------------------------------------------------------------------------- - -void LLVivoxProtocolParser::CharData(const char *buffer, int length) -{ - /* - This method is called for anything that isn't a tag, which can be text you - want that lies between tags, and a lot of stuff you don't want like file formatting - (tabs, spaces, CR/LF, etc). - - Only copy text if we are in accumulate mode... - */ - if (accumulateText) - textBuffer.append(buffer, length); -} - -// -------------------------------------------------------------------------------- - -void LLVivoxProtocolParser::processResponse(std::string tag) -{ - LL_DEBUGS("VivoxProtocolParser") << tag << LL_ENDL; - - // SLIM SDK: the SDK now returns a statusCode of "200" (OK) for success. This is a change vs. previous SDKs. - // According to Mike S., "The actual API convention is that responses with return codes of 0 are successful, regardless of the status code returned", - // so I believe this will give correct behavior. - - if(returnCode == 0) - statusCode = 0; - - if (isEvent) - { - const char *eventTypeCstr = eventTypeString.c_str(); - if (!stricmp(eventTypeCstr, "AccountLoginStateChangeEvent")) - { - gVoiceClient->accountLoginStateChangeEvent(accountHandle, statusCode, statusString, state); - } - else if (!stricmp(eventTypeCstr, "SessionAddedEvent")) - { - /* - <Event type="SessionAddedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> - <Uri>sip:confctl-1408789@bhr.vivox.com</Uri> - <IsChannel>true</IsChannel> - <Incoming>false</Incoming> - <ChannelName /> - </Event> - */ - gVoiceClient->sessionAddedEvent(uriString, alias, sessionHandle, sessionGroupHandle, isChannel, incoming, nameString, applicationString); - } - else if (!stricmp(eventTypeCstr, "SessionRemovedEvent")) - { - gVoiceClient->sessionRemovedEvent(sessionHandle, sessionGroupHandle); - } - else if (!stricmp(eventTypeCstr, "SessionGroupAddedEvent")) - { - gVoiceClient->sessionGroupAddedEvent(sessionGroupHandle); - } - else if (!stricmp(eventTypeCstr, "MediaStreamUpdatedEvent")) - { - /* - <Event type="MediaStreamUpdatedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> - <StatusCode>200</StatusCode> - <StatusString>OK</StatusString> - <State>2</State> - <Incoming>false</Incoming> - </Event> - */ - gVoiceClient->mediaStreamUpdatedEvent(sessionHandle, sessionGroupHandle, statusCode, statusString, state, incoming); - } - else if (!stricmp(eventTypeCstr, "TextStreamUpdatedEvent")) - { - /* - <Event type="TextStreamUpdatedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg1</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==1</SessionHandle> - <Enabled>true</Enabled> - <State>1</State> - <Incoming>true</Incoming> - </Event> - */ - gVoiceClient->textStreamUpdatedEvent(sessionHandle, sessionGroupHandle, enabled, state, incoming); - } - else if (!stricmp(eventTypeCstr, "ParticipantAddedEvent")) - { - /* - <Event type="ParticipantAddedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg4</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==4</SessionHandle> - <ParticipantUri>sip:xI5auBZ60SJWIk606-1JGRQ==@bhr.vivox.com</ParticipantUri> - <AccountName>xI5auBZ60SJWIk606-1JGRQ==</AccountName> - <DisplayName /> - <ParticipantType>0</ParticipantType> - </Event> - */ - gVoiceClient->participantAddedEvent(sessionHandle, sessionGroupHandle, uriString, alias, nameString, displayNameString, participantType); - } - else if (!stricmp(eventTypeCstr, "ParticipantRemovedEvent")) - { - /* - <Event type="ParticipantRemovedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg4</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==4</SessionHandle> - <ParticipantUri>sip:xtx7YNV-3SGiG7rA1fo5Ndw==@bhr.vivox.com</ParticipantUri> - <AccountName>xtx7YNV-3SGiG7rA1fo5Ndw==</AccountName> - </Event> - */ - gVoiceClient->participantRemovedEvent(sessionHandle, sessionGroupHandle, uriString, alias, nameString); - } - else if (!stricmp(eventTypeCstr, "ParticipantUpdatedEvent")) - { - /* - <Event type="ParticipantUpdatedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> - <ParticipantUri>sip:xFnPP04IpREWNkuw1cOXlhw==@bhr.vivox.com</ParticipantUri> - <IsModeratorMuted>false</IsModeratorMuted> - <IsSpeaking>true</IsSpeaking> - <Volume>44</Volume> - <Energy>0.0879437</Energy> - </Event> - */ - - // These happen so often that logging them is pretty useless. - squelchDebugOutput = true; - - gVoiceClient->participantUpdatedEvent(sessionHandle, sessionGroupHandle, uriString, alias, isModeratorMuted, isSpeaking, volume, energy); - } - else if (!stricmp(eventTypeCstr, "AuxAudioPropertiesEvent")) - { - gVoiceClient->auxAudioPropertiesEvent(energy); - } - else if (!stricmp(eventTypeCstr, "BuddyPresenceEvent")) - { - gVoiceClient->buddyPresenceEvent(uriString, alias, statusString, applicationString); - } - else if (!stricmp(eventTypeCstr, "BuddyAndGroupListChangedEvent")) - { - // The buddy list was updated during parsing. - // Need to recheck against the friends list. - gVoiceClient->buddyListChanged(); - } - else if (!stricmp(eventTypeCstr, "BuddyChangedEvent")) - { - /* - <Event type="BuddyChangedEvent"> - <AccountHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==</AccountHandle> - <BuddyURI>sip:x9fFHFZjOTN6OESF1DUPrZQ==@bhr.vivox.com</BuddyURI> - <DisplayName>Monroe Tester</DisplayName> - <BuddyData /> - <GroupID>0</GroupID> - <ChangeType>Set</ChangeType> - </Event> - */ - // TODO: Question: Do we need to process this at all? - } - else if (!stricmp(eventTypeCstr, "MessageEvent")) - { - gVoiceClient->messageEvent(sessionHandle, uriString, alias, messageHeader, messageBody, applicationString); - } - else if (!stricmp(eventTypeCstr, "SessionNotificationEvent")) - { - gVoiceClient->sessionNotificationEvent(sessionHandle, uriString, notificationType); - } - else if (!stricmp(eventTypeCstr, "SubscriptionEvent")) - { - gVoiceClient->subscriptionEvent(uriString, subscriptionHandle, alias, displayNameString, applicationString, subscriptionType); - } - else if (!stricmp(eventTypeCstr, "SessionUpdatedEvent")) - { - /* - <Event type="SessionUpdatedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> - <Uri>sip:confctl-9@bhd.vivox.com</Uri> - <IsMuted>0</IsMuted> - <Volume>50</Volume> - <TransmitEnabled>1</TransmitEnabled> - <IsFocused>0</IsFocused> - <SpeakerPosition><Position><X>0</X><Y>0</Y><Z>0</Z></Position></SpeakerPosition> - <SessionFontID>0</SessionFontID> - </Event> - */ - // We don't need to process this, but we also shouldn't warn on it, since that confuses people. - } - - else if (!stricmp(eventTypeCstr, "SessionGroupRemovedEvent")) - { - /* - <Event type="SessionGroupRemovedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> - </Event> - */ - // We don't need to process this, but we also shouldn't warn on it, since that confuses people. - } - else - { - LL_WARNS("VivoxProtocolParser") << "Unknown event type " << eventTypeString << LL_ENDL; - } - } - else - { - const char *actionCstr = actionString.c_str(); - if (!stricmp(actionCstr, "Connector.Create.1")) - { - gVoiceClient->connectorCreateResponse(statusCode, statusString, connectorHandle, versionID); - } - else if (!stricmp(actionCstr, "Account.Login.1")) - { - gVoiceClient->loginResponse(statusCode, statusString, accountHandle, numberOfAliases); - } - else if (!stricmp(actionCstr, "Session.Create.1")) - { - gVoiceClient->sessionCreateResponse(requestId, statusCode, statusString, sessionHandle); - } - else if (!stricmp(actionCstr, "SessionGroup.AddSession.1")) - { - gVoiceClient->sessionGroupAddSessionResponse(requestId, statusCode, statusString, sessionHandle); - } - else if (!stricmp(actionCstr, "Session.Connect.1")) - { - gVoiceClient->sessionConnectResponse(requestId, statusCode, statusString); - } - else if (!stricmp(actionCstr, "Account.Logout.1")) - { - gVoiceClient->logoutResponse(statusCode, statusString); - } - else if (!stricmp(actionCstr, "Connector.InitiateShutdown.1")) - { - gVoiceClient->connectorShutdownResponse(statusCode, statusString); - } - else if (!stricmp(actionCstr, "Account.ListBlockRules.1")) - { - gVoiceClient->accountListBlockRulesResponse(statusCode, statusString); - } - else if (!stricmp(actionCstr, "Account.ListAutoAcceptRules.1")) - { - gVoiceClient->accountListAutoAcceptRulesResponse(statusCode, statusString); - } - else if (!stricmp(actionCstr, "Session.Set3DPosition.1")) - { - // We don't need to process these, but they're so spammy we don't want to log them. - squelchDebugOutput = true; - } -/* - else if (!stricmp(actionCstr, "Account.ChannelGetList.1")) - { - gVoiceClient->channelGetListResponse(statusCode, statusString); - } - else if (!stricmp(actionCstr, "Connector.AccountCreate.1")) - { - - } - else if (!stricmp(actionCstr, "Connector.MuteLocalMic.1")) - { - - } - else if (!stricmp(actionCstr, "Connector.MuteLocalSpeaker.1")) - { - - } - else if (!stricmp(actionCstr, "Connector.SetLocalMicVolume.1")) - { - - } - else if (!stricmp(actionCstr, "Connector.SetLocalSpeakerVolume.1")) - { - - } - else if (!stricmp(actionCstr, "Session.ListenerSetPosition.1")) - { - - } - else if (!stricmp(actionCstr, "Session.SpeakerSetPosition.1")) - { - - } - else if (!stricmp(actionCstr, "Session.AudioSourceSetPosition.1")) - { - - } - else if (!stricmp(actionCstr, "Session.GetChannelParticipants.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelCreate.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelUpdate.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelDelete.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelCreateAndInvite.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelFolderCreate.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelFolderUpdate.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelFolderDelete.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelAddModerator.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelDeleteModerator.1")) - { - - } -*/ - } -} - -/////////////////////////////////////////////////////////////////////////////////////////////// - -class LLVoiceClientMuteListObserver : public LLMuteListObserver -{ - /* virtual */ void onChange() { gVoiceClient->muteListChanged();} -}; - -class LLVoiceClientFriendsObserver : public LLFriendObserver -{ -public: - /* virtual */ void changed(U32 mask) { gVoiceClient->updateFriends(mask);} -}; - -static LLVoiceClientMuteListObserver mutelist_listener; -static bool sMuteListListener_listening = false; - -static LLVoiceClientFriendsObserver *friendslist_listener = NULL; - -/////////////////////////////////////////////////////////////////////////////////////////////// - -class LLVoiceClientCapResponder : public LLHTTPClient::Responder -{ -public: - LLVoiceClientCapResponder(void){}; - - virtual void error(U32 status, const std::string& reason); // called with bad status codes - virtual void result(const LLSD& content); - -private: -}; - -void LLVoiceClientCapResponder::error(U32 status, const std::string& reason) -{ - LL_WARNS("Voice") << "LLVoiceClientCapResponder::error(" - << status << ": " << reason << ")" - << LL_ENDL; -} - -void LLVoiceClientCapResponder::result(const LLSD& content) -{ - LLSD::map_const_iterator iter; - - LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; - - if ( content.has("voice_credentials") ) - { - LLSD voice_credentials = content["voice_credentials"]; - std::string uri; - std::string credentials; - - if ( voice_credentials.has("channel_uri") ) - { - uri = voice_credentials["channel_uri"].asString(); - } - if ( voice_credentials.has("channel_credentials") ) - { - credentials = - voice_credentials["channel_credentials"].asString(); - } - - gVoiceClient->setSpatialChannel(uri, credentials); - } -} - - - -#if LL_WINDOWS -static HANDLE sGatewayHandle = 0; - -static bool isGatewayRunning() -{ - bool result = false; - if(sGatewayHandle != 0) - { - DWORD waitresult = WaitForSingleObject(sGatewayHandle, 0); - if(waitresult != WAIT_OBJECT_0) - { - result = true; - } - } - return result; -} -static void killGateway() -{ - if(sGatewayHandle != 0) - { - TerminateProcess(sGatewayHandle,0); - } -} - -#else // Mac and linux - -static pid_t sGatewayPID = 0; -static bool isGatewayRunning() -{ - bool result = false; - if(sGatewayPID != 0) - { - // A kill with signal number 0 has no effect, just does error checking. It should return an error if the process no longer exists. - if(kill(sGatewayPID, 0) == 0) - { - result = true; - } - } - return result; -} - -static void killGateway() -{ - if(sGatewayPID != 0) - { - kill(sGatewayPID, SIGTERM); - } -} - -#endif - -class LLSpeakerVolumeStorage : public LLSingleton<LLSpeakerVolumeStorage> -{ - LOG_CLASS(LLSpeakerVolumeStorage); -public: - - /** - * Stores volume level for specified user. - * - * @param[in] speaker_id - LLUUID of user to store volume level for. - * @param[in] volume - volume level to be stored for user. - */ - void storeSpeakerVolume(const LLUUID& speaker_id, F32 volume); - - /** - * Gets stored volume level for specified speaker - * - * @param[in] speaker_id - LLUUID of user to retrieve volume level for. - * @param[out] volume - set to stored volume if found, otherwise unmodified. - * @return - true if a stored volume is found. - */ - bool getSpeakerVolume(const LLUUID& speaker_id, F32& volume); - - /** - * Removes stored volume level for specified user. - * - * @param[in] speaker_id - LLUUID of user to remove. - */ - void removeSpeakerVolume(const LLUUID& speaker_id); - -private: - friend class LLSingleton<LLSpeakerVolumeStorage>; - LLSpeakerVolumeStorage(); - ~LLSpeakerVolumeStorage(); - - const static std::string SETTINGS_FILE_NAME; - - void load(); - void save(); - - static F32 transformFromLegacyVolume(F32 volume_in); - static F32 transformToLegacyVolume(F32 volume_in); - - typedef std::map<LLUUID, F32> speaker_data_map_t; - speaker_data_map_t mSpeakersData; -}; - -const std::string LLSpeakerVolumeStorage::SETTINGS_FILE_NAME = "volume_settings.xml"; - -LLSpeakerVolumeStorage::LLSpeakerVolumeStorage() -{ - load(); -} - -LLSpeakerVolumeStorage::~LLSpeakerVolumeStorage() -{ - save(); -} - -void LLSpeakerVolumeStorage::storeSpeakerVolume(const LLUUID& speaker_id, F32 volume) -{ - if ((volume >= LLVoiceClient::VOLUME_MIN) && (volume <= LLVoiceClient::VOLUME_MAX)) - { - mSpeakersData[speaker_id] = volume; - - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. - // LL_DEBUGS("Voice") << "Stored volume = " << volume << " for " << id << LL_ENDL; - } - else - { - LL_WARNS("Voice") << "Attempted to store out of range volume " << volume << " for " << speaker_id << LL_ENDL; - llassert(0); - } -} - -bool LLSpeakerVolumeStorage::getSpeakerVolume(const LLUUID& speaker_id, F32& volume) -{ - speaker_data_map_t::const_iterator it = mSpeakersData.find(speaker_id); - - if (it != mSpeakersData.end()) - { - volume = it->second; - - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. - // LL_DEBUGS("Voice") << "Retrieved stored volume = " << volume << " for " << id << LL_ENDL; - - return true; - } - - return false; -} - -void LLSpeakerVolumeStorage::removeSpeakerVolume(const LLUUID& speaker_id) -{ - mSpeakersData.erase(speaker_id); - - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. - // LL_DEBUGS("Voice") << "Removing stored volume for " << id << LL_ENDL; -} - -/* static */ F32 LLSpeakerVolumeStorage::transformFromLegacyVolume(F32 volume_in) -{ - // Convert to linear-logarithmic [0.0..1.0] with 0.5 = 0dB - // from legacy characteristic composed of two square-curves - // that intersect at volume_in = 0.5, volume_out = 0.56 - - F32 volume_out = 0.f; - volume_in = llclamp(volume_in, 0.f, 1.0f); - - if (volume_in <= 0.5f) - { - volume_out = volume_in * volume_in * 4.f * 0.56f; - } - else - { - volume_out = (1.f - 0.56f) * (4.f * volume_in * volume_in - 1.f) / 3.f + 0.56f; - } - - return volume_out; -} - -/* static */ F32 LLSpeakerVolumeStorage::transformToLegacyVolume(F32 volume_in) -{ - // Convert from linear-logarithmic [0.0..1.0] with 0.5 = 0dB - // to legacy characteristic composed of two square-curves - // that intersect at volume_in = 0.56, volume_out = 0.5 - - F32 volume_out = 0.f; - volume_in = llclamp(volume_in, 0.f, 1.0f); - - if (volume_in <= 0.56f) - { - volume_out = sqrt(volume_in / (4.f * 0.56f)); - } - else - { - volume_out = sqrt((3.f * (volume_in - 0.56f) / (1.f - 0.56f) + 1.f) / 4.f); - } - - return volume_out; -} - -void LLSpeakerVolumeStorage::load() -{ - // load per-resident voice volume information - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SETTINGS_FILE_NAME); - - LL_INFOS("Voice") << "Loading stored speaker volumes from: " << filename << LL_ENDL; - - LLSD settings_llsd; - llifstream file; - file.open(filename); - if (file.is_open()) - { - LLSDSerialize::fromXML(settings_llsd, file); - } - - for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); - iter != settings_llsd.endMap(); ++iter) - { - // Maintain compatibility with 1.23 non-linear saved volume levels - F32 volume = transformFromLegacyVolume((F32)iter->second.asReal()); - - storeSpeakerVolume(LLUUID(iter->first), volume); - } -} - -void LLSpeakerVolumeStorage::save() -{ - // If we quit from the login screen we will not have an SL account - // name. Don't try to save, otherwise we'll dump a file in - // C:\Program Files\SecondLife\ or similar. JC - std::string user_dir = gDirUtilp->getLindenUserDir(); - if (!user_dir.empty()) - { - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SETTINGS_FILE_NAME); - LLSD settings_llsd; - - LL_INFOS("Voice") << "Saving stored speaker volumes to: " << filename << LL_ENDL; - - for(speaker_data_map_t::const_iterator iter = mSpeakersData.begin(); iter != mSpeakersData.end(); ++iter) - { - // Maintain compatibility with 1.23 non-linear saved volume levels - F32 volume = transformToLegacyVolume(iter->second); - - settings_llsd[iter->first.asString()] = volume; - } - - llofstream file; - file.open(filename); - LLSDSerialize::toPrettyXML(settings_llsd, file); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////// - -LLVoiceClient::LLVoiceClient() : - mState(stateDisabled), - mSessionTerminateRequested(false), - mRelogRequested(false), - mConnected(false), - mPump(NULL), - mSpatialJoiningNum(0), - - mTuningMode(false), - mTuningEnergy(0.0f), - mTuningMicVolume(0), - mTuningMicVolumeDirty(true), - mTuningSpeakerVolume(0), - mTuningSpeakerVolumeDirty(true), - mTuningExitState(stateDisabled), - - mAreaVoiceDisabled(false), - mAudioSession(NULL), - mAudioSessionChanged(false), - mNextAudioSession(NULL), - - mCurrentParcelLocalID(0), - mNumberOfAliases(0), - mCommandCookie(0), - mLoginRetryCount(0), - - mBuddyListMapPopulated(false), - mBlockRulesListReceived(false), - mAutoAcceptRulesListReceived(false), - mCaptureDeviceDirty(false), - mRenderDeviceDirty(false), - mSpatialCoordsDirty(false), - - mPTTDirty(true), - mPTT(true), - mUsePTT(true), - mPTTIsMiddleMouse(false), - mPTTKey(0), - mPTTIsToggle(false), - mUserPTTState(false), - mMuteMic(false), - mFriendsListDirty(true), - - mEarLocation(0), - mSpeakerVolumeDirty(true), - mSpeakerMuteDirty(true), - mMicVolume(0), - mMicVolumeDirty(true), - - mVoiceEnabled(false), - mWriteInProgress(false), - - mLipSyncEnabled(false) -{ - gVoiceClient = this; - - mAPIVersion = LLTrans::getString("NotConnected"); - - mSpeakerVolume = scale_speaker_volume(0); - -#if LL_DARWIN || LL_LINUX || LL_SOLARIS - // HACK: THIS DOES NOT BELONG HERE - // When the vivox daemon dies, the next write attempt on our socket generates a SIGPIPE, which kills us. - // This should cause us to ignore SIGPIPE and handle the error through proper channels. - // This should really be set up elsewhere. Where should it go? - signal(SIGPIPE, SIG_IGN); - - // Since we're now launching the gateway with fork/exec instead of system(), we need to deal with zombie processes. - // Ignoring SIGCHLD should prevent zombies from being created. Alternately, we could use wait(), but I'd rather not do that. - signal(SIGCHLD, SIG_IGN); -#endif - - // set up state machine - setState(stateDisabled); - - gIdleCallbacks.addFunction(idle, this); -} - -//--------------------------------------------------- - -LLVoiceClient::~LLVoiceClient() -{ -} - -//---------------------------------------------- - -void LLVoiceClient::init(LLPumpIO *pump) -{ - // constructor will set up gVoiceClient - LLVoiceClient::getInstance()->mPump = pump; - LLVoiceClient::getInstance()->updateSettings(); -} - -void LLVoiceClient::terminate() -{ - if(gVoiceClient) - { -// gVoiceClient->leaveAudioSession(); - gVoiceClient->logout(); - // As of SDK version 4885, this should no longer be necessary. It will linger after the socket close if it needs to. - // ms_sleep(2000); - gVoiceClient->connectorShutdown(); - gVoiceClient->closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. - - // This will do unpleasant things on windows. -// killGateway(); - - // Don't do this anymore -- LLSingleton will take care of deleting the object. -// delete gVoiceClient; - - // Hint to other code not to access the voice client anymore. - gVoiceClient = NULL; - } -} - -//--------------------------------------------------- - -void LLVoiceClient::updateSettings() -{ - setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); - setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled")); - std::string keyString = gSavedSettings.getString("PushToTalkButton"); - setPTTKey(keyString); - setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle")); - setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); - - std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); - setCaptureDevice(inputDevice); - std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); - setRenderDevice(outputDevice); - F32 mic_level = gSavedSettings.getF32("AudioLevelMic"); - setMicGain(mic_level); - setLipSyncEnabled(gSavedSettings.getBOOL("LipSyncEnabled")); -} - -///////////////////////////// -// utility functions - -bool LLVoiceClient::writeString(const std::string &str) -{ - bool result = false; - if(mConnected) - { - apr_status_t err; - apr_size_t size = (apr_size_t)str.size(); - apr_size_t written = size; - - //MARK: Turn this on to log outgoing XML -// LL_DEBUGS("Voice") << "sending: " << str << LL_ENDL; - - // check return code - sockets will fail (broken, etc.) - err = apr_socket_send( - mSocket->getSocket(), - (const char*)str.data(), - &written); - - if(err == 0) - { - // Success. - result = true; - } - // TODO: handle partial writes (written is number of bytes written) - // Need to set socket to non-blocking before this will work. -// else if(APR_STATUS_IS_EAGAIN(err)) -// { -// // -// } - else - { - // Assume any socket error means something bad. For now, just close the socket. - char buf[MAX_STRING]; - LL_WARNS("Voice") << "apr error " << err << " ("<< apr_strerror(err, buf, MAX_STRING) << ") sending data to vivox daemon." << LL_ENDL; - daemonDied(); - } - } - - return result; -} - - -///////////////////////////// -// session control messages -void LLVoiceClient::connectorCreate() -{ - std::ostringstream stream; - std::string logpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); - std::string loglevel = "0"; - - // Transition to stateConnectorStarted when the connector handle comes back. - setState(stateConnectorStarting); - - std::string savedLogLevel = gSavedSettings.getString("VivoxDebugLevel"); - - if(savedLogLevel != "-1") - { - LL_DEBUGS("Voice") << "creating connector with logging enabled" << LL_ENDL; - loglevel = "10"; - } - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.Create.1\">" - << "<ClientName>V2 SDK</ClientName>" - << "<AccountManagementServer>" << mVoiceAccountServerURI << "</AccountManagementServer>" - << "<Mode>Normal</Mode>" - << "<Logging>" - << "<Folder>" << logpath << "</Folder>" - << "<FileNamePrefix>Connector</FileNamePrefix>" - << "<FileNameSuffix>.log</FileNameSuffix>" - << "<LogLevel>" << loglevel << "</LogLevel>" - << "</Logging>" - << "<Application>SecondLifeViewer.1</Application>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::connectorShutdown() -{ - setState(stateConnectorStopping); - - if(!mConnectorHandle.empty()) - { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.InitiateShutdown.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "</Request>" - << "\n\n\n"; - - mConnectorHandle.clear(); - - writeString(stream.str()); - } -} - -void LLVoiceClient::userAuthorized(const std::string& firstName, const std::string& lastName, const LLUUID &agentID) -{ - mAccountFirstName = firstName; - mAccountLastName = lastName; - - mAccountDisplayName = firstName; - mAccountDisplayName += " "; - mAccountDisplayName += lastName; - - LL_INFOS("Voice") << "name \"" << mAccountDisplayName << "\" , ID " << agentID << LL_ENDL; - - sConnectingToAgni = LLViewerLogin::getInstance()->isInProductionGrid(); - - mAccountName = nameFromID(agentID); -} - -void LLVoiceClient::requestVoiceAccountProvision(S32 retries) -{ - if ( gAgent.getRegion() && mVoiceEnabled ) - { - std::string url = - gAgent.getRegion()->getCapability( - "ProvisionVoiceAccountRequest"); - - if ( url == "" ) return; - - LLHTTPClient::post( - url, - LLSD(), - new LLViewerVoiceAccountProvisionResponder(retries)); - } -} - -void LLVoiceClient::login( - const std::string& account_name, - const std::string& password, - const std::string& voice_sip_uri_hostname, - const std::string& voice_account_server_uri) -{ - mVoiceSIPURIHostName = voice_sip_uri_hostname; - mVoiceAccountServerURI = voice_account_server_uri; - - if(!mAccountHandle.empty()) - { - // Already logged in. - LL_WARNS("Voice") << "Called while already logged in." << LL_ENDL; - - // Don't process another login. - return; - } - else if ( account_name != mAccountName ) - { - //TODO: error? - LL_WARNS("Voice") << "Wrong account name! " << account_name - << " instead of " << mAccountName << LL_ENDL; - } - else - { - mAccountPassword = password; - } - - std::string debugSIPURIHostName = gSavedSettings.getString("VivoxDebugSIPURIHostName"); - - if( !debugSIPURIHostName.empty() ) - { - mVoiceSIPURIHostName = debugSIPURIHostName; - } - - if( mVoiceSIPURIHostName.empty() ) - { - // we have an empty account server name - // so we fall back to hardcoded defaults - - if(sConnectingToAgni) - { - // Use the release account server - mVoiceSIPURIHostName = "bhr.vivox.com"; - } - else - { - // Use the development account server - mVoiceSIPURIHostName = "bhd.vivox.com"; - } - } - - std::string debugAccountServerURI = gSavedSettings.getString("VivoxDebugVoiceAccountServerURI"); - - if( !debugAccountServerURI.empty() ) - { - mVoiceAccountServerURI = debugAccountServerURI; - } - - if( mVoiceAccountServerURI.empty() ) - { - // If the account server URI isn't specified, construct it from the SIP URI hostname - mVoiceAccountServerURI = "https://www." + mVoiceSIPURIHostName + "/api2/"; - } -} - -void LLVoiceClient::idle(void* user_data) -{ - LLVoiceClient* self = (LLVoiceClient*)user_data; - self->stateMachine(); -} - -std::string LLVoiceClient::state2string(LLVoiceClient::state inState) -{ - std::string result = "UNKNOWN"; - - // Prevent copy-paste errors when updating this list... -#define CASE(x) case x: result = #x; break - - switch(inState) - { - CASE(stateDisableCleanup); - CASE(stateDisabled); - CASE(stateStart); - CASE(stateDaemonLaunched); - CASE(stateConnecting); - CASE(stateConnected); - CASE(stateIdle); - CASE(stateMicTuningStart); - CASE(stateMicTuningRunning); - CASE(stateMicTuningStop); - CASE(stateConnectorStart); - CASE(stateConnectorStarting); - CASE(stateConnectorStarted); - CASE(stateLoginRetry); - CASE(stateLoginRetryWait); - CASE(stateNeedsLogin); - CASE(stateLoggingIn); - CASE(stateLoggedIn); - CASE(stateCreatingSessionGroup); - CASE(stateNoChannel); - CASE(stateJoiningSession); - CASE(stateSessionJoined); - CASE(stateRunning); - CASE(stateLeavingSession); - CASE(stateSessionTerminated); - CASE(stateLoggingOut); - CASE(stateLoggedOut); - CASE(stateConnectorStopping); - CASE(stateConnectorStopped); - CASE(stateConnectorFailed); - CASE(stateConnectorFailedWaiting); - CASE(stateLoginFailed); - CASE(stateLoginFailedWaiting); - CASE(stateJoinSessionFailed); - CASE(stateJoinSessionFailedWaiting); - CASE(stateJail); - } - -#undef CASE - - return result; -} - std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserver::EStatusType inStatus) { std::string result = "UNKNOWN"; - // Prevent copy-paste errors when updating this list... + // Prevent copy-paste errors when updating this list... #define CASE(x) case x: result = #x; break - + switch(inStatus) { - CASE(STATUS_LOGIN_RETRY); - CASE(STATUS_LOGGED_IN); - CASE(STATUS_JOINING); - CASE(STATUS_JOINED); - CASE(STATUS_LEFT_CHANNEL); - CASE(STATUS_VOICE_DISABLED); - CASE(STATUS_VOICE_ENABLED); - CASE(BEGIN_ERROR_STATUS); - CASE(ERROR_CHANNEL_FULL); - CASE(ERROR_CHANNEL_LOCKED); - CASE(ERROR_NOT_AVAILABLE); - CASE(ERROR_UNKNOWN); - default: - break; + CASE(STATUS_LOGIN_RETRY); + CASE(STATUS_LOGGED_IN); + CASE(STATUS_JOINING); + CASE(STATUS_JOINED); + CASE(STATUS_LEFT_CHANNEL); + CASE(STATUS_VOICE_DISABLED); + CASE(BEGIN_ERROR_STATUS); + CASE(ERROR_CHANNEL_FULL); + CASE(ERROR_CHANNEL_LOCKED); + CASE(ERROR_NOT_AVAILABLE); + CASE(ERROR_UNKNOWN); + default: + break; } - + #undef CASE return result; } -void LLVoiceClient::setState(state inState) -{ - LL_DEBUGS("Voice") << "entering state " << state2string(inState) << LL_ENDL; - - mState = inState; -} -void LLVoiceClient::stateMachine() -{ - if(gDisconnected) - { - // The viewer has been disconnected from the sim. Disable voice. - setVoiceEnabled(false); - } - - if(mVoiceEnabled) - { - updatePosition(); - } - else if(mTuningMode) - { - // Tuning mode is special -- it needs to launch SLVoice even if voice is disabled. - } - else - { - if((getState() != stateDisabled) && (getState() != stateDisableCleanup)) - { - // User turned off voice support. Send the cleanup messages, close the socket, and reset. - if(!mConnected) - { - // if voice was turned off after the daemon was launched but before we could connect to it, we may need to issue a kill. - LL_INFOS("Voice") << "Disabling voice before connection to daemon, terminating." << LL_ENDL; - killGateway(); - } - - logout(); - connectorShutdown(); - - setState(stateDisableCleanup); - } - } - - // Check for parcel boundary crossing - { - LLViewerRegion *region = gAgent.getRegion(); - LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - - if(region && parcel) - { - S32 parcelLocalID = parcel->getLocalID(); - std::string regionName = region->getName(); - std::string capURI = region->getCapability("ParcelVoiceInfoRequest"); - -// LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL; - - // The region name starts out empty and gets filled in later. - // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes. - // If either is empty, wait for the next time around. - if(!regionName.empty()) - { - if(!capURI.empty()) - { - if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName)) - { - // We have changed parcels. Initiate a parcel channel lookup. - mCurrentParcelLocalID = parcelLocalID; - mCurrentRegionName = regionName; - - parcelChanged(); - } - } - else - { - LL_WARNS_ONCE("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long." << LL_ENDL; - } - } - } - } - - switch(getState()) - { - //MARK: stateDisableCleanup - case stateDisableCleanup: - // Clean up and reset everything. - closeSocket(); - deleteAllSessions(); - deleteAllBuddies(); - - mConnectorHandle.clear(); - mAccountHandle.clear(); - mAccountPassword.clear(); - mVoiceAccountServerURI.clear(); - - setState(stateDisabled); - break; - - //MARK: stateDisabled - case stateDisabled: - if(mTuningMode || (mVoiceEnabled && !mAccountName.empty())) - { - setState(stateStart); - } - break; - - //MARK: stateStart - case stateStart: - if(gSavedSettings.getBOOL("CmdLineDisableVoice")) - { - // Voice is locked out, we must not launch the vivox daemon. - setState(stateJail); - } - else if(!isGatewayRunning()) - { - if(true) - { - // Launch the voice daemon - - // *FIX:Mani - Using the executable dir instead - // of mAppRODataDir, the working directory from which the app - // is launched. - //std::string exe_path = gDirUtilp->getAppRODataDir(); - std::string exe_path = gDirUtilp->getExecutableDir(); - exe_path += gDirUtilp->getDirDelimiter(); -#if LL_WINDOWS - exe_path += "SLVoice.exe"; -#elif LL_DARWIN - exe_path += "../Resources/SLVoice"; -#else - exe_path += "SLVoice"; -#endif - // See if the vivox executable exists - llstat s; - if(!LLFile::stat(exe_path, &s)) - { - // vivox executable exists. Build the command line and launch the daemon. - // SLIM SDK: these arguments are no longer necessary. -// std::string args = " -p tcp -h -c"; - std::string args; - std::string loglevel = gSavedSettings.getString("VivoxDebugLevel"); - - if(loglevel.empty()) - { - loglevel = "-1"; // turn logging off completely - } - - args += " -ll "; - args += loglevel; - - LL_DEBUGS("Voice") << "Args for SLVoice: " << args << LL_ENDL; - -#if LL_WINDOWS - PROCESS_INFORMATION pinfo; - STARTUPINFOW sinfo; - memset(&sinfo, 0, sizeof(sinfo)); - - std::string exe_dir = gDirUtilp->getExecutableDir(); - - llutf16string exe_path16 = utf8str_to_utf16str(exe_path); - llutf16string exe_dir16 = utf8str_to_utf16str(exe_dir); - llutf16string args16 = utf8str_to_utf16str(args); - // Create a writeable copy to keep Windows happy. - U16 *argscpy_16 = new U16[args16.size() + 1]; - wcscpy_s(argscpy_16,args16.size()+1,args16.c_str()); - if(!CreateProcessW(exe_path16.c_str(), argscpy_16, NULL, NULL, FALSE, 0, NULL, exe_dir16.c_str(), &sinfo, &pinfo)) - { -// DWORD dwErr = GetLastError(); - } - else - { - // foo = pinfo.dwProcessId; // get your pid here if you want to use it later on - // CloseHandle(pinfo.hProcess); // stops leaks - nothing else - sGatewayHandle = pinfo.hProcess; - CloseHandle(pinfo.hThread); // stops leaks - nothing else - } - - delete[] argscpy_16; -#else // LL_WINDOWS - // This should be the same for mac and linux - { - std::vector<std::string> arglist; - arglist.push_back(exe_path); - - // Split the argument string into separate strings for each argument - typedef boost::tokenizer<boost::char_separator<char> > tokenizer; - boost::char_separator<char> sep(" "); - tokenizer tokens(args, sep); - tokenizer::iterator token_iter; - - for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) - { - arglist.push_back(*token_iter); - } - - // create an argv vector for the child process - char **fakeargv = new char*[arglist.size() + 1]; - int i; - for(i=0; i < arglist.size(); i++) - fakeargv[i] = const_cast<char*>(arglist[i].c_str()); - - fakeargv[i] = NULL; - - fflush(NULL); // flush all buffers before the child inherits them - pid_t id = vfork(); - if(id == 0) - { - // child - execv(exe_path.c_str(), fakeargv); - - // If we reach this point, the exec failed. - // Use _exit() instead of exit() per the vfork man page. - _exit(0); - } - - // parent - delete[] fakeargv; - sGatewayPID = id; - } -#endif // LL_WINDOWS - mDaemonHost = LLHost(gSavedSettings.getString("VoiceHost").c_str(), gSavedSettings.getU32("VoicePort")); - } - else - { - LL_INFOS("Voice") << exe_path << " not found." << LL_ENDL; - } - } - else - { - // SLIM SDK: port changed from 44124 to 44125. - // We can connect to a client gateway running on another host. This is useful for testing. - // To do this, launch the gateway on a nearby host like this: - // vivox-gw.exe -p tcp -i 0.0.0.0:44125 - // and put that host's IP address here. - mDaemonHost = LLHost(gSavedSettings.getString("VoiceHost"), gSavedSettings.getU32("VoicePort")); - } - - mUpdateTimer.start(); - mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); - - setState(stateDaemonLaunched); - - // Dirty the states we'll need to sync with the daemon when it comes up. - mPTTDirty = true; - mMicVolumeDirty = true; - mSpeakerVolumeDirty = true; - mSpeakerMuteDirty = true; - // These only need to be set if they're not default (i.e. empty string). - mCaptureDeviceDirty = !mCaptureDevice.empty(); - mRenderDeviceDirty = !mRenderDevice.empty(); - - mMainSessionGroupHandle.clear(); - } - break; - - //MARK: stateDaemonLaunched - case stateDaemonLaunched: - if(mUpdateTimer.hasExpired()) - { - LL_DEBUGS("Voice") << "Connecting to vivox daemon" << LL_ENDL; - - mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); - - if(!mSocket) - { - mSocket = LLSocket::create(gAPRPoolp, LLSocket::STREAM_TCP); - } - - mConnected = mSocket->blockingConnect(mDaemonHost); - if(mConnected) - { - setState(stateConnecting); - } - else - { - // If the connect failed, the socket may have been put into a bad state. Delete it. - closeSocket(); - } - } - break; - - //MARK: stateConnecting - case stateConnecting: - // Can't do this until we have the pump available. - if(mPump) - { - // MBW -- Note to self: pumps and pipes examples in - // indra/test/io.cpp - // indra/test/llpipeutil.{cpp|h} - - // Attach the pumps and pipes - - LLPumpIO::chain_t readChain; - - readChain.push_back(LLIOPipe::ptr_t(new LLIOSocketReader(mSocket))); - readChain.push_back(LLIOPipe::ptr_t(new LLVivoxProtocolParser())); - - mPump->addChain(readChain, NEVER_CHAIN_EXPIRY_SECS); - - setState(stateConnected); - } - - break; - - //MARK: stateConnected - case stateConnected: - // Initial devices query - getCaptureDevicesSendMessage(); - getRenderDevicesSendMessage(); - - mLoginRetryCount = 0; - - setState(stateIdle); - break; - - //MARK: stateIdle - case stateIdle: - // This is the idle state where we're connected to the daemon but haven't set up a connector yet. - if(mTuningMode) - { - mTuningExitState = stateIdle; - setState(stateMicTuningStart); - } - else if(!mVoiceEnabled) - { - // We never started up the connector. This will shut down the daemon. - setState(stateConnectorStopped); - } - else if(!mAccountName.empty()) - { - LLViewerRegion *region = gAgent.getRegion(); - - if(region) - { - if ( region->getCapability("ProvisionVoiceAccountRequest") != "" ) - { - if ( mAccountPassword.empty() ) - { - requestVoiceAccountProvision(); - } - setState(stateConnectorStart); - } - else - { - LL_WARNS_ONCE("Voice") << "region doesn't have ProvisionVoiceAccountRequest capability!" << LL_ENDL; - } - } - } - break; - - //MARK: stateMicTuningStart - case stateMicTuningStart: - if(mUpdateTimer.hasExpired()) - { - if(mCaptureDeviceDirty || mRenderDeviceDirty) - { - // These can't be changed while in tuning mode. Set them before starting. - std::ostringstream stream; - - buildSetCaptureDevice(stream); - buildSetRenderDevice(stream); - - if(!stream.str().empty()) - { - writeString(stream.str()); - } - - // This will come around again in the same state and start the capture, after the timer expires. - mUpdateTimer.start(); - mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); - } - else - { - // duration parameter is currently unused, per Mike S. - tuningCaptureStartSendMessage(10000); - - setState(stateMicTuningRunning); - } - } - - break; - - //MARK: stateMicTuningRunning - case stateMicTuningRunning: - if(!mTuningMode || mCaptureDeviceDirty || mRenderDeviceDirty) - { - // All of these conditions make us leave tuning mode. - setState(stateMicTuningStop); - } - else - { - // process mic/speaker volume changes - if(mTuningMicVolumeDirty || mTuningSpeakerVolumeDirty) - { - std::ostringstream stream; - - if(mTuningMicVolumeDirty) - { - LL_INFOS("Voice") << "setting tuning mic level to " << mTuningMicVolume << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetMicLevel.1\">" - << "<Level>" << mTuningMicVolume << "</Level>" - << "</Request>\n\n\n"; - } - - if(mTuningSpeakerVolumeDirty) - { - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetSpeakerLevel.1\">" - << "<Level>" << mTuningSpeakerVolume << "</Level>" - << "</Request>\n\n\n"; - } - - mTuningMicVolumeDirty = false; - mTuningSpeakerVolumeDirty = false; - - if(!stream.str().empty()) - { - writeString(stream.str()); - } - } - } - break; - - //MARK: stateMicTuningStop - case stateMicTuningStop: - { - // transition out of mic tuning - tuningCaptureStopSendMessage(); - - setState(mTuningExitState); - - // if we exited just to change devices, this will keep us from re-entering too fast. - mUpdateTimer.start(); - mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); - - } - break; - - //MARK: stateConnectorStart - case stateConnectorStart: - if(!mVoiceEnabled) - { - // We were never logged in. This will shut down the connector. - setState(stateLoggedOut); - } - else if(!mVoiceAccountServerURI.empty()) - { - connectorCreate(); - } - break; - - //MARK: stateConnectorStarting - case stateConnectorStarting: // waiting for connector handle - // connectorCreateResponse() will transition from here to stateConnectorStarted. - break; - - //MARK: stateConnectorStarted - case stateConnectorStarted: // connector handle received - if(!mVoiceEnabled) - { - // We were never logged in. This will shut down the connector. - setState(stateLoggedOut); - } - else - { - // The connector is started. Send a login message. - setState(stateNeedsLogin); - } - break; - - //MARK: stateLoginRetry - case stateLoginRetry: - if(mLoginRetryCount == 0) - { - // First retry -- display a message to the user - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGIN_RETRY); - } - - mLoginRetryCount++; - - if(mLoginRetryCount > MAX_LOGIN_RETRIES) - { - LL_WARNS("Voice") << "too many login retries, giving up." << LL_ENDL; - setState(stateLoginFailed); - } - else - { - LL_INFOS("Voice") << "will retry login in " << LOGIN_RETRY_SECONDS << " seconds." << LL_ENDL; - mUpdateTimer.start(); - mUpdateTimer.setTimerExpirySec(LOGIN_RETRY_SECONDS); - setState(stateLoginRetryWait); - } - break; - - //MARK: stateLoginRetryWait - case stateLoginRetryWait: - if(mUpdateTimer.hasExpired()) - { - setState(stateNeedsLogin); - } - break; - - //MARK: stateNeedsLogin - case stateNeedsLogin: - if(!mAccountPassword.empty()) - { - setState(stateLoggingIn); - loginSendMessage(); - } - break; - - //MARK: stateLoggingIn - case stateLoggingIn: // waiting for account handle - // loginResponse() will transition from here to stateLoggedIn. - break; - - //MARK: stateLoggedIn - case stateLoggedIn: // account handle received - - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGGED_IN); - - // request the current set of block rules (we'll need them when updating the friends list) - accountListBlockRulesSendMessage(); - - // request the current set of auto-accept rules - accountListAutoAcceptRulesSendMessage(); - - // Set up the mute list observer if it hasn't been set up already. - if((!sMuteListListener_listening)) - { - LLMuteList::getInstance()->addObserver(&mutelist_listener); - sMuteListListener_listening = true; - } - - // Set up the friends list observer if it hasn't been set up already. - if(friendslist_listener == NULL) - { - friendslist_listener = new LLVoiceClientFriendsObserver; - LLAvatarTracker::instance().addObserver(friendslist_listener); - } - - // Set the initial state of mic mute, local speaker volume, etc. - { - std::ostringstream stream; - - buildLocalAudioUpdates(stream); - - if(!stream.str().empty()) - { - writeString(stream.str()); - } - } - -#if USE_SESSION_GROUPS - // create the main session group - sessionGroupCreateSendMessage(); - - setState(stateCreatingSessionGroup); -#else - // Not using session groups -- skip the stateCreatingSessionGroup state. - setState(stateNoChannel); - - // Initial kick-off of channel lookup logic - parcelChanged(); -#endif - break; - - //MARK: stateCreatingSessionGroup - case stateCreatingSessionGroup: - if(mSessionTerminateRequested || !mVoiceEnabled) - { - // TODO: Question: is this the right way out of this state - setState(stateSessionTerminated); - } - else if(!mMainSessionGroupHandle.empty()) - { - setState(stateNoChannel); - - // Start looped recording (needed for "panic button" anti-griefing tool) - recordingLoopStart(); - // Initial kick-off of channel lookup logic - parcelChanged(); - } - break; - - //MARK: stateNoChannel - case stateNoChannel: - - mSpatialJoiningNum = 0; - // Do this here as well as inside sendPositionalUpdate(). - // Otherwise, if you log in but don't join a proximal channel (such as when your login location has voice disabled), your friends list won't sync. - sendFriendsListUpdates(); - - if(mSessionTerminateRequested || !mVoiceEnabled) - { - // TODO: Question: Is this the right way out of this state? - setState(stateSessionTerminated); - } - else if(mTuningMode) - { - mTuningExitState = stateNoChannel; - setState(stateMicTuningStart); - } - else if(sessionNeedsRelog(mNextAudioSession)) - { - requestRelog(); - setState(stateSessionTerminated); - } - else if(mNextAudioSession) - { - sessionState *oldSession = mAudioSession; - - mAudioSession = mNextAudioSession; - if(!mAudioSession->mReconnect) - { - mNextAudioSession = NULL; - } - - // The old session may now need to be deleted. - reapSession(oldSession); - - if(!mAudioSession->mHandle.empty()) - { - // Connect to a session by session handle - - sessionMediaConnectSendMessage(mAudioSession); - } - else - { - // Connect to a session by URI - sessionCreateSendMessage(mAudioSession, true, false); - } - - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING); - setState(stateJoiningSession); - } - else if(!mSpatialSessionURI.empty()) - { - // If we're not headed elsewhere and have a spatial URI, return to spatial. - switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); - } - break; - - //MARK: stateJoiningSession - case stateJoiningSession: // waiting for session handle - - // If this is true we have problem with connection to voice server (EXT-4313). - // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM. - if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM) - { - // Notify observers to let them know there is problem with voice - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); - llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl; - } - // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for - // example for p2p many times while waiting for response, so it can't be used to detect errors - if(mAudioSession && mAudioSession->mIsSpatial) - { - mSpatialJoiningNum++; - } - - // joinedAudioSession() will transition from here to stateSessionJoined. - if(!mVoiceEnabled) - { - // User bailed out during connect -- jump straight to teardown. - setState(stateSessionTerminated); - } - else if(mSessionTerminateRequested) - { - if(mAudioSession && !mAudioSession->mHandle.empty()) - { - // Only allow direct exits from this state in p2p calls (for cancelling an invite). - // Terminating a half-connected session on other types of calls seems to break something in the vivox gateway. - if(mAudioSession->mIsP2P) - { - sessionMediaDisconnectSendMessage(mAudioSession); - setState(stateSessionTerminated); - } - } - } - break; - - //MARK: stateSessionJoined - case stateSessionJoined: // session handle received - - mSpatialJoiningNum = 0; - // It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4 - // before continuing from this state. They can happen in either order, and if I don't wait for both, things can get stuck. - // For now, the SessionGroup.AddSession response handler sets mSessionHandle and the SessionStateChangeEvent handler transitions to stateSessionJoined. - // This is a cheap way to make sure both have happened before proceeding. - if(mAudioSession && mAudioSession->mVoiceEnabled) - { - // Dirty state that may need to be sync'ed with the daemon. - mPTTDirty = true; - mSpeakerVolumeDirty = true; - mSpatialCoordsDirty = true; - - setState(stateRunning); - - // Start the throttle timer - mUpdateTimer.start(); - mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); - - // Events that need to happen when a session is joined could go here. - // Maybe send initial spatial data? - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINED); - - } - else if(!mVoiceEnabled) - { - // User bailed out during connect -- jump straight to teardown. - setState(stateSessionTerminated); - } - else if(mSessionTerminateRequested) - { - // Only allow direct exits from this state in p2p calls (for cancelling an invite). - // Terminating a half-connected session on other types of calls seems to break something in the vivox gateway. - if(mAudioSession && mAudioSession->mIsP2P) - { - sessionMediaDisconnectSendMessage(mAudioSession); - setState(stateSessionTerminated); - } - } - break; - - //MARK: stateRunning - case stateRunning: // steady state - // Disabling voice or disconnect requested. - if(!mVoiceEnabled || mSessionTerminateRequested) - { - leaveAudioSession(); - } - else - { - - // Figure out whether the PTT state needs to change - { - bool newPTT; - if(mUsePTT) - { - // If configured to use PTT, track the user state. - newPTT = mUserPTTState; - } - else - { - // If not configured to use PTT, it should always be true (otherwise the user will be unable to speak). - newPTT = true; - } - - if(mMuteMic) - { - // This always overrides any other PTT setting. - newPTT = false; - } - - // Dirty if state changed. - if(newPTT != mPTT) - { - mPTT = newPTT; - mPTTDirty = true; - } - } - - if(!inSpatialChannel()) - { - // When in a non-spatial channel, never send positional updates. - mSpatialCoordsDirty = false; - } - else - { - // Do the calculation that enforces the listener<->speaker tether (and also updates the real camera position) - enforceTether(); - } - - // Send an update only if the ptt or mute state has changed (which shouldn't be able to happen that often - // -- the user can only click so fast) or every 10hz, whichever is sooner. - // Sending for every volume update causes an excessive flood of messages whenever a volume slider is dragged. - if((mAudioSession && mAudioSession->mMuteDirty) || mPTTDirty || mUpdateTimer.hasExpired()) - { - mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); - sendPositionalUpdate(); - } - } - break; - - //MARK: stateLeavingSession - case stateLeavingSession: // waiting for terminate session response - // The handler for the Session.Terminate response will transition from here to stateSessionTerminated. - break; - - //MARK: stateSessionTerminated - case stateSessionTerminated: - - // Must do this first, since it uses mAudioSession. - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); - - if(mAudioSession) - { - sessionState *oldSession = mAudioSession; - - mAudioSession = NULL; - // We just notified status observers about this change. Don't do it again. - mAudioSessionChanged = false; - - // The old session may now need to be deleted. - reapSession(oldSession); - } - else - { - LL_WARNS("Voice") << "stateSessionTerminated with NULL mAudioSession" << LL_ENDL; - } - - // Always reset the terminate request flag when we get here. - mSessionTerminateRequested = false; - - if(mVoiceEnabled && !mRelogRequested) - { - // Just leaving a channel, go back to stateNoChannel (the "logged in but have no channel" state). - setState(stateNoChannel); - } - else - { - // Shutting down voice, continue with disconnecting. - logout(); - - // The state machine will take it from here - mRelogRequested = false; - } - - break; - - //MARK: stateLoggingOut - case stateLoggingOut: // waiting for logout response - // The handler for the AccountLoginStateChangeEvent will transition from here to stateLoggedOut. - break; - - //MARK: stateLoggedOut - case stateLoggedOut: // logout response received - - // Once we're logged out, all these things are invalid. - mAccountHandle.clear(); - deleteAllSessions(); - deleteAllBuddies(); - - if(mVoiceEnabled && !mRelogRequested) - { - // User was logged out, but wants to be logged in. Send a new login request. - setState(stateNeedsLogin); - } - else - { - // shut down the connector - connectorShutdown(); - } - break; - - //MARK: stateConnectorStopping - case stateConnectorStopping: // waiting for connector stop - // The handler for the Connector.InitiateShutdown response will transition from here to stateConnectorStopped. - break; - - //MARK: stateConnectorStopped - case stateConnectorStopped: // connector stop received - setState(stateDisableCleanup); - break; - - //MARK: stateConnectorFailed - case stateConnectorFailed: - setState(stateConnectorFailedWaiting); - break; - //MARK: stateConnectorFailedWaiting - case stateConnectorFailedWaiting: - if(!mVoiceEnabled) - { - setState(stateDisableCleanup); - } - break; - - //MARK: stateLoginFailed - case stateLoginFailed: - setState(stateLoginFailedWaiting); - break; - //MARK: stateLoginFailedWaiting - case stateLoginFailedWaiting: - if(!mVoiceEnabled) - { - setState(stateDisableCleanup); - } - break; - - //MARK: stateJoinSessionFailed - case stateJoinSessionFailed: - // Transition to error state. Send out any notifications here. - if(mAudioSession) - { - LL_WARNS("Voice") << "stateJoinSessionFailed: (" << mAudioSession->mErrorStatusCode << "): " << mAudioSession->mErrorStatusString << LL_ENDL; - } - else - { - LL_WARNS("Voice") << "stateJoinSessionFailed with no current session" << LL_ENDL; - } - - notifyStatusObservers(LLVoiceClientStatusObserver::ERROR_UNKNOWN); - setState(stateJoinSessionFailedWaiting); - break; - - //MARK: stateJoinSessionFailedWaiting - case stateJoinSessionFailedWaiting: - // Joining a channel failed, either due to a failed channel name -> sip url lookup or an error from the join message. - // Region crossings may leave this state and try the join again. - if(mSessionTerminateRequested) - { - setState(stateSessionTerminated); - } - break; - - //MARK: stateJail - case stateJail: - // We have given up. Do nothing. - break; - - } - - if(mAudioSession && mAudioSession->mParticipantsChanged) - { - mAudioSession->mParticipantsChanged = false; - mAudioSessionChanged = true; - } - - if(mAudioSessionChanged) - { - mAudioSessionChanged = false; - notifyParticipantObservers(); - } -} - -void LLVoiceClient::closeSocket(void) -{ - mSocket.reset(); - mConnected = false; -} - -void LLVoiceClient::loginSendMessage() -{ - std::ostringstream stream; - - bool autoPostCrashDumps = gSavedSettings.getBOOL("VivoxAutoPostCrashDumps"); - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.Login.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "<AccountName>" << mAccountName << "</AccountName>" - << "<AccountPassword>" << mAccountPassword << "</AccountPassword>" - << "<AudioSessionAnswerMode>VerifyAnswer</AudioSessionAnswerMode>" - << "<EnableBuddiesAndPresence>true</EnableBuddiesAndPresence>" - << "<BuddyManagementMode>Application</BuddyManagementMode>" - << "<ParticipantPropertyFrequency>5</ParticipantPropertyFrequency>" - << (autoPostCrashDumps?"<AutopostCrashDumps>true</AutopostCrashDumps>":"") - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::logout() -{ - // Ensure that we'll re-request provisioning before logging in again - mAccountPassword.clear(); - mVoiceAccountServerURI.clear(); - - setState(stateLoggingOut); - logoutSendMessage(); -} - -void LLVoiceClient::logoutSendMessage() -{ - if(!mAccountHandle.empty()) - { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.Logout.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "</Request>" - << "\n\n\n"; - - mAccountHandle.clear(); - - writeString(stream.str()); - } -} - -void LLVoiceClient::accountListBlockRulesSendMessage() -{ - if(!mAccountHandle.empty()) - { - std::ostringstream stream; - - LL_DEBUGS("Voice") << "requesting block rules" << LL_ENDL; - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.ListBlockRules.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "</Request>" - << "\n\n\n"; - - writeString(stream.str()); - } -} - -void LLVoiceClient::accountListAutoAcceptRulesSendMessage() -{ - if(!mAccountHandle.empty()) - { - std::ostringstream stream; - - LL_DEBUGS("Voice") << "requesting auto-accept rules" << LL_ENDL; - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.ListAutoAcceptRules.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "</Request>" - << "\n\n\n"; - - writeString(stream.str()); - } -} - -void LLVoiceClient::sessionGroupCreateSendMessage() -{ - if(!mAccountHandle.empty()) - { - std::ostringstream stream; - - LL_DEBUGS("Voice") << "creating session group" << LL_ENDL; - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.Create.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<Type>Normal</Type>" - << "</Request>" - << "\n\n\n"; - - writeString(stream.str()); - } -} - -void LLVoiceClient::sessionCreateSendMessage(sessionState *session, bool startAudio, bool startText) -{ - LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; - - session->mCreateInProgress = true; - if(startAudio) - { - session->mMediaConnectInProgress = true; - } - - std::ostringstream stream; - stream - << "<Request requestId=\"" << session->mSIPURI << "\" action=\"Session.Create.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<URI>" << session->mSIPURI << "</URI>"; - - static const std::string allowed_chars = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - "0123456789" - "-._~"; - - if(!session->mHash.empty()) - { - stream - << "<Password>" << LLURI::escape(session->mHash, allowed_chars) << "</Password>" - << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>"; - } - - stream - << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" - << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" - << "<Name>" << mChannelName << "</Name>" - << "</Request>\n\n\n"; - writeString(stream.str()); -} - -void LLVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio, bool startText) -{ - LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; - - session->mCreateInProgress = true; - if(startAudio) - { - session->mMediaConnectInProgress = true; - } - - std::string password; - if(!session->mHash.empty()) - { - static const std::string allowed_chars = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - "0123456789" - "-._~" - ; - password = LLURI::escape(session->mHash, allowed_chars); - } - - std::ostringstream stream; - stream - << "<Request requestId=\"" << session->mSIPURI << "\" action=\"SessionGroup.AddSession.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "<URI>" << session->mSIPURI << "</URI>" - << "<Name>" << mChannelName << "</Name>" - << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" - << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" - << "<Password>" << password << "</Password>" - << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>" - << "</Request>\n\n\n" - ; - - writeString(stream.str()); -} +/////////////////////////////////////////////////////////////////////////////////////////////// -void LLVoiceClient::sessionMediaConnectSendMessage(sessionState *session) +LLVoiceClient::LLVoiceClient() + : + mVoiceModule(NULL), + m_servicePump(NULL) { - LL_DEBUGS("Voice") << "connecting audio to session handle: " << session->mHandle << LL_ENDL; - - session->mMediaConnectInProgress = true; - - std::ostringstream stream; - - stream - << "<Request requestId=\"" << session->mHandle << "\" action=\"Session.MediaConnect.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "<Media>Audio</Media>" - << "</Request>\n\n\n"; - - writeString(stream.str()); } -void LLVoiceClient::sessionTextConnectSendMessage(sessionState *session) -{ - LL_DEBUGS("Voice") << "connecting text to session handle: " << session->mHandle << LL_ENDL; - - std::ostringstream stream; - - stream - << "<Request requestId=\"" << session->mHandle << "\" action=\"Session.TextConnect.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} +//--------------------------------------------------- +// Basic setup/shutdown -void LLVoiceClient::sessionTerminate() +LLVoiceClient::~LLVoiceClient() { - mSessionTerminateRequested = true; } -void LLVoiceClient::requestRelog() +void LLVoiceClient::init(LLPumpIO *pump) { - mSessionTerminateRequested = true; - mRelogRequested = true; + // Initialize all of the voice modules + m_servicePump = pump; } - -void LLVoiceClient::leaveAudioSession() +void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &agentID) { - if(mAudioSession) + // In the future, we should change this to allow voice module registration + // with a table lookup of sorts. + std::string voice_server = gSavedSettings.getString("VoiceServerType"); + LL_DEBUGS("Voice") << "voice server type " << voice_server << LL_ENDL; + if(voice_server == "vivox") { - LL_DEBUGS("Voice") << "leaving session: " << mAudioSession->mSIPURI << LL_ENDL; - - switch(getState()) - { - case stateNoChannel: - // In this case, we want to pretend the join failed so our state machine doesn't get stuck. - // Skip the join failed transition state so we don't send out error notifications. - setState(stateJoinSessionFailedWaiting); - break; - case stateJoiningSession: - case stateSessionJoined: - case stateRunning: - if(!mAudioSession->mHandle.empty()) - { - -#if RECORD_EVERYTHING - // HACK: for testing only - // Save looped recording - std::string savepath("/tmp/vivoxrecording"); - { - time_t now = time(NULL); - const size_t BUF_SIZE = 64; - char time_str[BUF_SIZE]; /* Flawfinder: ignore */ - - strftime(time_str, BUF_SIZE, "%Y-%m-%dT%H:%M:%SZ", gmtime(&now)); - savepath += time_str; - } - recordingLoopSave(savepath); -#endif - - sessionMediaDisconnectSendMessage(mAudioSession); - setState(stateLeavingSession); - } - else - { - LL_WARNS("Voice") << "called with no session handle" << LL_ENDL; - setState(stateSessionTerminated); - } - break; - case stateJoinSessionFailed: - case stateJoinSessionFailedWaiting: - setState(stateSessionTerminated); - break; - - default: - LL_WARNS("Voice") << "called from unknown state" << LL_ENDL; - break; - } + mVoiceModule = (LLVoiceModuleInterface *)LLVivoxVoiceClient::getInstance(); } else { - LL_WARNS("Voice") << "called with no active session" << LL_ENDL; - setState(stateSessionTerminated); + mVoiceModule = NULL; + return; } + mVoiceModule->init(m_servicePump); + mVoiceModule->userAuthorized(user_id, agentID); } -void LLVoiceClient::sessionTerminateSendMessage(sessionState *session) -{ - std::ostringstream stream; - - LL_DEBUGS("Voice") << "Sending Session.Terminate with handle " << session->mHandle << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.Terminate.1\">" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::sessionGroupTerminateSendMessage(sessionState *session) -{ - std::ostringstream stream; - - LL_DEBUGS("Voice") << "Sending SessionGroup.Terminate with handle " << session->mGroupHandle << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.Terminate.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} -void LLVoiceClient::sessionMediaDisconnectSendMessage(sessionState *session) -{ - std::ostringstream stream; - - LL_DEBUGS("Voice") << "Sending Session.MediaDisconnect with handle " << session->mHandle << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.MediaDisconnect.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "<Media>Audio</Media>" - << "</Request>\n\n\n"; - - writeString(stream.str()); - -} - -void LLVoiceClient::sessionTextDisconnectSendMessage(sessionState *session) -{ - std::ostringstream stream; - - LL_DEBUGS("Voice") << "Sending Session.TextDisconnect with handle " << session->mHandle << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.TextDisconnect.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::getCaptureDevicesSendMessage() -{ - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.GetCaptureDevices.1\">" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::getRenderDevicesSendMessage() -{ - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.GetRenderDevices.1\">" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::clearCaptureDevices() -{ - LL_DEBUGS("Voice") << "called" << LL_ENDL; - mCaptureDevices.clear(); -} - -void LLVoiceClient::addCaptureDevice(const std::string& name) -{ - LL_DEBUGS("Voice") << name << LL_ENDL; - - mCaptureDevices.push_back(name); -} - -LLVoiceClient::deviceList *LLVoiceClient::getCaptureDevices() +void LLVoiceClient::terminate() { - return &mCaptureDevices; + if (mVoiceModule) mVoiceModule->terminate(); + mVoiceModule = NULL; } -void LLVoiceClient::setCaptureDevice(const std::string& name) +const LLVoiceVersionInfo LLVoiceClient::getVersion() { - if(name == "Default") + if (mVoiceModule) { - if(!mCaptureDevice.empty()) - { - mCaptureDevice.clear(); - mCaptureDeviceDirty = true; - } + return mVoiceModule->getVersion(); } else { - if(mCaptureDevice != name) - { - mCaptureDevice = name; - mCaptureDeviceDirty = true; - } + LLVoiceVersionInfo result; + result.serverVersion = std::string(); + result.serverType = std::string(); + return result; } } -void LLVoiceClient::clearRenderDevices() -{ - LL_DEBUGS("Voice") << "called" << LL_ENDL; - mRenderDevices.clear(); -} - -void LLVoiceClient::addRenderDevice(const std::string& name) +void LLVoiceClient::updateSettings() { - LL_DEBUGS("Voice") << name << LL_ENDL; - mRenderDevices.push_back(name); + if (mVoiceModule) mVoiceModule->updateSettings(); } -LLVoiceClient::deviceList *LLVoiceClient::getRenderDevices() -{ - return &mRenderDevices; -} - -void LLVoiceClient::setRenderDevice(const std::string& name) -{ - if(name == "Default") - { - if(!mRenderDevice.empty()) - { - mRenderDevice.clear(); - mRenderDeviceDirty = true; - } - } - else - { - if(mRenderDevice != name) - { - mRenderDevice = name; - mRenderDeviceDirty = true; - } - } - -} +//-------------------------------------------------- +// tuning void LLVoiceClient::tuningStart() { - mTuningMode = true; - if(getState() >= stateNoChannel) - { - sessionTerminate(); - } + if (mVoiceModule) mVoiceModule->tuningStart(); } void LLVoiceClient::tuningStop() { - mTuningMode = false; + if (mVoiceModule) mVoiceModule->tuningStop(); } bool LLVoiceClient::inTuningMode() { - bool result = false; - switch(getState()) - { - case stateMicTuningRunning: - result = true; - break; - default: - break; - } - return result; -} - -void LLVoiceClient::tuningRenderStartSendMessage(const std::string& name, bool loop) -{ - mTuningAudioFile = name; - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.RenderAudioStart.1\">" - << "<SoundFilePath>" << mTuningAudioFile << "</SoundFilePath>" - << "<Loop>" << (loop?"1":"0") << "</Loop>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::tuningRenderStopSendMessage() -{ - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.RenderAudioStop.1\">" - << "<SoundFilePath>" << mTuningAudioFile << "</SoundFilePath>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::tuningCaptureStartSendMessage(int duration) -{ - LL_DEBUGS("Voice") << "sending CaptureAudioStart" << LL_ENDL; - - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.CaptureAudioStart.1\">" - << "<Duration>" << duration << "</Duration>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::tuningCaptureStopSendMessage() -{ - LL_DEBUGS("Voice") << "sending CaptureAudioStop" << LL_ENDL; - - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.CaptureAudioStop.1\">" - << "</Request>\n\n\n"; - - writeString(stream.str()); - - mTuningEnergy = 0.0f; -} - -void LLVoiceClient::tuningSetMicVolume(float volume) -{ - int scaled_volume = scale_mic_volume(volume); - - if(scaled_volume != mTuningMicVolume) - { - mTuningMicVolume = scaled_volume; - mTuningMicVolumeDirty = true; - } -} - -void LLVoiceClient::tuningSetSpeakerVolume(float volume) -{ - int scaled_volume = scale_speaker_volume(volume); - - if(scaled_volume != mTuningSpeakerVolume) + if (mVoiceModule) { - mTuningSpeakerVolume = scaled_volume; - mTuningSpeakerVolumeDirty = true; - } -} - -float LLVoiceClient::tuningGetEnergy(void) -{ - return mTuningEnergy; -} - -bool LLVoiceClient::deviceSettingsAvailable() -{ - bool result = true; - - if(!mConnected) - result = false; - - if(mRenderDevices.empty()) - result = false; - - return result; -} - -void LLVoiceClient::refreshDeviceLists(bool clearCurrentList) -{ - if(clearCurrentList) - { - clearCaptureDevices(); - clearRenderDevices(); - } - getCaptureDevicesSendMessage(); - getRenderDevicesSendMessage(); -} - -void LLVoiceClient::daemonDied() -{ - // The daemon died, so the connection is gone. Reset everything and start over. - LL_WARNS("Voice") << "Connection to vivox daemon lost. Resetting state."<< LL_ENDL; - - // Try to relaunch the daemon - setState(stateDisableCleanup); -} - -void LLVoiceClient::giveUp() -{ - // All has failed. Clean up and stop trying. - closeSocket(); - deleteAllSessions(); - deleteAllBuddies(); - - setState(stateJail); -} - -static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVector3d &pos, LLVector3 &vel) -{ - F32 nat[3], nup[3], nl[3], nvel[3]; // the new at, up, left vectors and the new position and velocity - F64 npos[3]; - - // The original XML command was sent like this: - /* - << "<Position>" - << "<X>" << pos[VX] << "</X>" - << "<Y>" << pos[VZ] << "</Y>" - << "<Z>" << pos[VY] << "</Z>" - << "</Position>" - << "<Velocity>" - << "<X>" << mAvatarVelocity[VX] << "</X>" - << "<Y>" << mAvatarVelocity[VZ] << "</Y>" - << "<Z>" << mAvatarVelocity[VY] << "</Z>" - << "</Velocity>" - << "<AtOrientation>" - << "<X>" << l.mV[VX] << "</X>" - << "<Y>" << u.mV[VX] << "</Y>" - << "<Z>" << a.mV[VX] << "</Z>" - << "</AtOrientation>" - << "<UpOrientation>" - << "<X>" << l.mV[VZ] << "</X>" - << "<Y>" << u.mV[VY] << "</Y>" - << "<Z>" << a.mV[VZ] << "</Z>" - << "</UpOrientation>" - << "<LeftOrientation>" - << "<X>" << l.mV [VY] << "</X>" - << "<Y>" << u.mV [VZ] << "</Y>" - << "<Z>" << a.mV [VY] << "</Z>" - << "</LeftOrientation>"; - */ - -#if 1 - // This was the original transform done when building the XML command - nat[0] = left.mV[VX]; - nat[1] = up.mV[VX]; - nat[2] = at.mV[VX]; - - nup[0] = left.mV[VZ]; - nup[1] = up.mV[VY]; - nup[2] = at.mV[VZ]; - - nl[0] = left.mV[VY]; - nl[1] = up.mV[VZ]; - nl[2] = at.mV[VY]; - - npos[0] = pos.mdV[VX]; - npos[1] = pos.mdV[VZ]; - npos[2] = pos.mdV[VY]; - - nvel[0] = vel.mV[VX]; - nvel[1] = vel.mV[VZ]; - nvel[2] = vel.mV[VY]; - - for(int i=0;i<3;++i) { - at.mV[i] = nat[i]; - up.mV[i] = nup[i]; - left.mV[i] = nl[i]; - pos.mdV[i] = npos[i]; + return mVoiceModule->inTuningMode(); } - - // This was the original transform done in the SDK - nat[0] = at.mV[2]; - nat[1] = 0; // y component of at vector is always 0, this was up[2] - nat[2] = -1 * left.mV[2]; - - // We override whatever the application gives us - nup[0] = 0; // x component of up vector is always 0 - nup[1] = 1; // y component of up vector is always 1 - nup[2] = 0; // z component of up vector is always 0 - - nl[0] = at.mV[0]; - nl[1] = 0; // y component of left vector is always zero, this was up[0] - nl[2] = -1 * left.mV[0]; - - npos[2] = pos.mdV[2] * -1.0; - npos[1] = pos.mdV[1]; - npos[0] = pos.mdV[0]; - - for(int i=0;i<3;++i) { - at.mV[i] = nat[i]; - up.mV[i] = nup[i]; - left.mV[i] = nl[i]; - pos.mdV[i] = npos[i]; - } -#else - // This is the compose of the two transforms (at least, that's what I'm trying for) - nat[0] = at.mV[VX]; - nat[1] = 0; // y component of at vector is always 0, this was up[2] - nat[2] = -1 * up.mV[VZ]; - - // We override whatever the application gives us - nup[0] = 0; // x component of up vector is always 0 - nup[1] = 1; // y component of up vector is always 1 - nup[2] = 0; // z component of up vector is always 0 - - nl[0] = left.mV[VX]; - nl[1] = 0; // y component of left vector is always zero, this was up[0] - nl[2] = -1 * left.mV[VY]; - - npos[0] = pos.mdV[VX]; - npos[1] = pos.mdV[VZ]; - npos[2] = pos.mdV[VY] * -1.0; - - nvel[0] = vel.mV[VX]; - nvel[1] = vel.mV[VZ]; - nvel[2] = vel.mV[VY]; - - for(int i=0;i<3;++i) { - at.mV[i] = nat[i]; - up.mV[i] = nup[i]; - left.mV[i] = nl[i]; - pos.mdV[i] = npos[i]; - } - -#endif -} - -void LLVoiceClient::sendPositionalUpdate(void) -{ - std::ostringstream stream; - - if(mSpatialCoordsDirty) - { - LLVector3 l, u, a, vel; - LLVector3d pos; - - mSpatialCoordsDirty = false; - - // Always send both speaker and listener positions together. - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.Set3DPosition.1\">" - << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>"; - - stream << "<SpeakerPosition>"; - -// LL_DEBUGS("Voice") << "Sending speaker position " << mAvatarPosition << LL_ENDL; - l = mAvatarRot.getLeftRow(); - u = mAvatarRot.getUpRow(); - a = mAvatarRot.getFwdRow(); - pos = mAvatarPosition; - vel = mAvatarVelocity; - - // SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore. - // The old transform is replicated by this function. - oldSDKTransform(l, u, a, pos, vel); - - stream - << "<Position>" - << "<X>" << pos.mdV[VX] << "</X>" - << "<Y>" << pos.mdV[VY] << "</Y>" - << "<Z>" << pos.mdV[VZ] << "</Z>" - << "</Position>" - << "<Velocity>" - << "<X>" << vel.mV[VX] << "</X>" - << "<Y>" << vel.mV[VY] << "</Y>" - << "<Z>" << vel.mV[VZ] << "</Z>" - << "</Velocity>" - << "<AtOrientation>" - << "<X>" << a.mV[VX] << "</X>" - << "<Y>" << a.mV[VY] << "</Y>" - << "<Z>" << a.mV[VZ] << "</Z>" - << "</AtOrientation>" - << "<UpOrientation>" - << "<X>" << u.mV[VX] << "</X>" - << "<Y>" << u.mV[VY] << "</Y>" - << "<Z>" << u.mV[VZ] << "</Z>" - << "</UpOrientation>" - << "<LeftOrientation>" - << "<X>" << l.mV [VX] << "</X>" - << "<Y>" << l.mV [VY] << "</Y>" - << "<Z>" << l.mV [VZ] << "</Z>" - << "</LeftOrientation>"; - - stream << "</SpeakerPosition>"; - - stream << "<ListenerPosition>"; - - LLVector3d earPosition; - LLVector3 earVelocity; - LLMatrix3 earRot; - - switch(mEarLocation) - { - case earLocCamera: - default: - earPosition = mCameraPosition; - earVelocity = mCameraVelocity; - earRot = mCameraRot; - break; - - case earLocAvatar: - earPosition = mAvatarPosition; - earVelocity = mAvatarVelocity; - earRot = mAvatarRot; - break; - - case earLocMixed: - earPosition = mAvatarPosition; - earVelocity = mAvatarVelocity; - earRot = mCameraRot; - break; - } - - l = earRot.getLeftRow(); - u = earRot.getUpRow(); - a = earRot.getFwdRow(); - pos = earPosition; - vel = earVelocity; - -// LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL; - - oldSDKTransform(l, u, a, pos, vel); - - stream - << "<Position>" - << "<X>" << pos.mdV[VX] << "</X>" - << "<Y>" << pos.mdV[VY] << "</Y>" - << "<Z>" << pos.mdV[VZ] << "</Z>" - << "</Position>" - << "<Velocity>" - << "<X>" << vel.mV[VX] << "</X>" - << "<Y>" << vel.mV[VY] << "</Y>" - << "<Z>" << vel.mV[VZ] << "</Z>" - << "</Velocity>" - << "<AtOrientation>" - << "<X>" << a.mV[VX] << "</X>" - << "<Y>" << a.mV[VY] << "</Y>" - << "<Z>" << a.mV[VZ] << "</Z>" - << "</AtOrientation>" - << "<UpOrientation>" - << "<X>" << u.mV[VX] << "</X>" - << "<Y>" << u.mV[VY] << "</Y>" - << "<Z>" << u.mV[VZ] << "</Z>" - << "</UpOrientation>" - << "<LeftOrientation>" - << "<X>" << l.mV [VX] << "</X>" - << "<Y>" << l.mV [VY] << "</Y>" - << "<Z>" << l.mV [VZ] << "</Z>" - << "</LeftOrientation>"; - - - stream << "</ListenerPosition>"; - - stream << "</Request>\n\n\n"; - } - - if(mAudioSession && (mAudioSession->mVolumeDirty || mAudioSession->mMuteDirty)) - { - participantMap::iterator iter = mAudioSession->mParticipantsByURI.begin(); - - mAudioSession->mVolumeDirty = false; - mAudioSession->mMuteDirty = false; - - for(; iter != mAudioSession->mParticipantsByURI.end(); iter++) - { - participantState *p = iter->second; - - if(p->mVolumeDirty) - { - // Can't set volume/mute for yourself - if(!p->mIsSelf) - { - // scale from the range 0.0-1.0 to vivox volume in the range 0-100 - S32 volume = llround(p->mVolume / VOLUME_SCALE_VIVOX); - - bool mute = p->mOnMuteList; - - if(mute) - { - // SetParticipantMuteForMe doesn't work in p2p sessions. - // If we want the user to be muted, set their volume to 0 as well. - // This isn't perfect, but it will at least reduce their volume to a minimum. - volume = 0; - - // Mark the current volume level as set to prevent incoming events - // changing it to 0, so that we can return to it when unmuting. - p->mVolumeSet = true; - } - - if(volume == 0) - { - mute = true; - } - - LL_DEBUGS("Voice") << "Setting volume/mute for avatar " << p->mAvatarID << " to " << volume << (mute?"/true":"/false") << LL_ENDL; - - // SLIM SDK: Send both volume and mute commands. - - // Send a "volume for me" command for the user. - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetParticipantVolumeForMe.1\">" - << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>" - << "<ParticipantURI>" << p->mURI << "</ParticipantURI>" - << "<Volume>" << volume << "</Volume>" - << "</Request>\n\n\n"; - - if(!mAudioSession->mIsP2P) - { - // Send a "mute for me" command for the user - // Doesn't work in P2P sessions - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetParticipantMuteForMe.1\">" - << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>" - << "<ParticipantURI>" << p->mURI << "</ParticipantURI>" - << "<Mute>" << (mute?"1":"0") << "</Mute>" - << "<Scope>Audio</Scope>" - << "</Request>\n\n\n"; - } - } - - p->mVolumeDirty = false; - } - } - } - - buildLocalAudioUpdates(stream); - - if(!stream.str().empty()) - { - writeString(stream.str()); - } - - // Friends list updates can be huge, especially on the first voice login of an account with lots of friends. - // Batching them all together can choke SLVoice, so send them in separate writes. - sendFriendsListUpdates(); -} - -void LLVoiceClient::buildSetCaptureDevice(std::ostringstream &stream) -{ - if(mCaptureDeviceDirty) + else { - LL_DEBUGS("Voice") << "Setting input device = \"" << mCaptureDevice << "\"" << LL_ENDL; - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetCaptureDevice.1\">" - << "<CaptureDeviceSpecifier>" << mCaptureDevice << "</CaptureDeviceSpecifier>" - << "</Request>" - << "\n\n\n"; - - mCaptureDeviceDirty = false; + return false; } } -void LLVoiceClient::buildSetRenderDevice(std::ostringstream &stream) +void LLVoiceClient::tuningSetMicVolume(float volume) { - if(mRenderDeviceDirty) - { - LL_DEBUGS("Voice") << "Setting output device = \"" << mRenderDevice << "\"" << LL_ENDL; - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetRenderDevice.1\">" - << "<RenderDeviceSpecifier>" << mRenderDevice << "</RenderDeviceSpecifier>" - << "</Request>" - << "\n\n\n"; - mRenderDeviceDirty = false; - } + if (mVoiceModule) mVoiceModule->tuningSetMicVolume(volume); } -void LLVoiceClient::buildLocalAudioUpdates(std::ostringstream &stream) +void LLVoiceClient::tuningSetSpeakerVolume(float volume) { - buildSetCaptureDevice(stream); - - buildSetRenderDevice(stream); - - if(mPTTDirty) - { - mPTTDirty = false; - - // Send a local mute command. - // NOTE that the state of "PTT" is the inverse of "local mute". - // (i.e. when PTT is true, we send a mute command with "false", and vice versa) - - LL_DEBUGS("Voice") << "Sending MuteLocalMic command with parameter " << (mPTT?"false":"true") << LL_ENDL; - - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "<Value>" << (mPTT?"false":"true") << "</Value>" - << "</Request>\n\n\n"; - - } - - if(mSpeakerMuteDirty) - { - const char *muteval = ((mSpeakerVolume <= scale_speaker_volume(0))?"true":"false"); - - mSpeakerMuteDirty = false; - - LL_INFOS("Voice") << "Setting speaker mute to " << muteval << LL_ENDL; - - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalSpeaker.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "<Value>" << muteval << "</Value>" - << "</Request>\n\n\n"; - - } - - if(mSpeakerVolumeDirty) - { - mSpeakerVolumeDirty = false; - - LL_INFOS("Voice") << "Setting speaker volume to " << mSpeakerVolume << LL_ENDL; - - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.SetLocalSpeakerVolume.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "<Value>" << mSpeakerVolume << "</Value>" - << "</Request>\n\n\n"; - - } - - if(mMicVolumeDirty) - { - mMicVolumeDirty = false; - - LL_INFOS("Voice") << "Setting mic volume to " << mMicVolume << LL_ENDL; - - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.SetLocalMicVolume.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "<Value>" << mMicVolume << "</Value>" - << "</Request>\n\n\n"; - } - - + if (mVoiceModule) mVoiceModule->tuningSetSpeakerVolume(volume); } -void LLVoiceClient::checkFriend(const LLUUID& id) +float LLVoiceClient::tuningGetEnergy(void) { - std::string name; - buddyListEntry *buddy = findBuddy(id); - - // Make sure we don't add a name before it's been looked up. - if(gCacheName->getFullName(id, name)) + if (mVoiceModule) { - - const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id); - bool canSeeMeOnline = false; - if(relationInfo && relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS)) - canSeeMeOnline = true; - - // When we get here, mNeedsSend is true and mInSLFriends is false. Change them as necessary. - - if(buddy) - { - // This buddy is already in both lists. - - if(name != buddy->mDisplayName) - { - // The buddy is in the list with the wrong name. Update it with the correct name. - LL_WARNS("Voice") << "Buddy " << id << " has wrong name (\"" << buddy->mDisplayName << "\" should be \"" << name << "\"), updating."<< LL_ENDL; - buddy->mDisplayName = name; - buddy->mNeedsNameUpdate = true; // This will cause the buddy to be resent. - } - } - else - { - // This buddy was not in the vivox list, needs to be added. - buddy = addBuddy(sipURIFromID(id), name); - buddy->mUUID = id; - } - - // In all the above cases, the buddy is in the SL friends list (which is how we got here). - buddy->mInSLFriends = true; - buddy->mCanSeeMeOnline = canSeeMeOnline; - buddy->mNameResolved = true; - + return mVoiceModule->tuningGetEnergy(); } else { - // This name hasn't been looked up yet. Don't do anything with this buddy list entry until it has. - if(buddy) - { - buddy->mNameResolved = false; - } - - // Initiate a lookup. - // The "lookup completed" callback will ensure that the friends list is rechecked after it completes. - lookupName(id); + return 0.0; } } -void LLVoiceClient::clearAllLists() -{ - // FOR TESTING ONLY - - // This will send the necessary commands to delete ALL buddies, autoaccept rules, and block rules SLVoice tells us about. - buddyListMap::iterator buddy_it; - for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end();) - { - buddyListEntry *buddy = buddy_it->second; - buddy_it++; - - std::ostringstream stream; - if(buddy->mInVivoxBuddies) - { - // delete this entry from the vivox buddy list - buddy->mInVivoxBuddies = false; - LL_DEBUGS("Voice") << "delete " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddyDelete.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" - << "</Request>\n\n\n"; - } +//------------------------------------------------ +// devices - if(buddy->mHasBlockListEntry) - { - // Delete the associated block list entry (so the block list doesn't fill up with junk) - buddy->mHasBlockListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BlockMask>" << buddy->mURI << "</BlockMask>" - << "</Request>\n\n\n"; - } - if(buddy->mHasAutoAcceptListEntry) - { - // Delete the associated auto-accept list entry (so the auto-accept list doesn't fill up with junk) - buddy->mHasAutoAcceptListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" - << "</Request>\n\n\n"; - } - - writeString(stream.str()); - - } -} - -void LLVoiceClient::sendFriendsListUpdates() +bool LLVoiceClient::deviceSettingsAvailable() { - if(mBuddyListMapPopulated && mBlockRulesListReceived && mAutoAcceptRulesListReceived && mFriendsListDirty) + if (mVoiceModule) { - mFriendsListDirty = false; - - if(0) - { - // FOR TESTING ONLY -- clear all buddy list, block list, and auto-accept list entries. - clearAllLists(); - return; - } - - LL_INFOS("Voice") << "Checking vivox buddy list against friends list..." << LL_ENDL; - - buddyListMap::iterator buddy_it; - for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) - { - // reset the temp flags in the local buddy list - buddy_it->second->mInSLFriends = false; - } - - // correlate with the friends list - { - LLCollectAllBuddies collect; - LLAvatarTracker::instance().applyFunctor(collect); - LLCollectAllBuddies::buddy_map_t::const_iterator it = collect.mOnline.begin(); - LLCollectAllBuddies::buddy_map_t::const_iterator end = collect.mOnline.end(); - - for ( ; it != end; ++it) - { - checkFriend(it->second); - } - it = collect.mOffline.begin(); - end = collect.mOffline.end(); - for ( ; it != end; ++it) - { - checkFriend(it->second); - } - } - - LL_INFOS("Voice") << "Sending friend list updates..." << LL_ENDL; - - for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end();) - { - buddyListEntry *buddy = buddy_it->second; - buddy_it++; - - // Ignore entries that aren't resolved yet. - if(buddy->mNameResolved) - { - std::ostringstream stream; - - if(buddy->mInSLFriends && (!buddy->mInVivoxBuddies || buddy->mNeedsNameUpdate)) - { - if(mNumberOfAliases > 0) - { - // Add (or update) this entry in the vivox buddy list - buddy->mInVivoxBuddies = true; - buddy->mNeedsNameUpdate = false; - LL_DEBUGS("Voice") << "add/update " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddySet.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" - << "<DisplayName>" << buddy->mDisplayName << "</DisplayName>" - << "<BuddyData></BuddyData>" // Without this, SLVoice doesn't seem to parse the command. - << "<GroupID>0</GroupID>" - << "</Request>\n\n\n"; - } - } - else if(!buddy->mInSLFriends) - { - // This entry no longer exists in your SL friends list. Remove all traces of it from the Vivox buddy list. - if(buddy->mInVivoxBuddies) - { - // delete this entry from the vivox buddy list - buddy->mInVivoxBuddies = false; - LL_DEBUGS("Voice") << "delete " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddyDelete.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" - << "</Request>\n\n\n"; - } - - if(buddy->mHasBlockListEntry) - { - // Delete the associated block list entry, if any - buddy->mHasBlockListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BlockMask>" << buddy->mURI << "</BlockMask>" - << "</Request>\n\n\n"; - } - if(buddy->mHasAutoAcceptListEntry) - { - // Delete the associated auto-accept list entry, if any - buddy->mHasAutoAcceptListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" - << "</Request>\n\n\n"; - } - } - - if(buddy->mInSLFriends) - { - - if(buddy->mCanSeeMeOnline) - { - // Buddy should not be blocked. - - // If this buddy doesn't already have either a block or autoaccept list entry, we'll update their status when we receive a SubscriptionEvent. - - // If the buddy has a block list entry, delete it. - if(buddy->mHasBlockListEntry) - { - buddy->mHasBlockListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BlockMask>" << buddy->mURI << "</BlockMask>" - << "</Request>\n\n\n"; - - - // If we just deleted a block list entry, add an auto-accept entry. - if(!buddy->mHasAutoAcceptListEntry) - { - buddy->mHasAutoAcceptListEntry = true; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.CreateAutoAcceptRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" - << "<AutoAddAsBuddy>0</AutoAddAsBuddy>" - << "</Request>\n\n\n"; - } - } - } - else - { - // Buddy should be blocked. - - // If this buddy doesn't already have either a block or autoaccept list entry, we'll update their status when we receive a SubscriptionEvent. - - // If this buddy has an autoaccept entry, delete it - if(buddy->mHasAutoAcceptListEntry) - { - buddy->mHasAutoAcceptListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" - << "</Request>\n\n\n"; - - // If we just deleted an auto-accept entry, add a block list entry. - if(!buddy->mHasBlockListEntry) - { - buddy->mHasBlockListEntry = true; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.CreateBlockRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BlockMask>" << buddy->mURI << "</BlockMask>" - << "<PresenceOnly>1</PresenceOnly>" - << "</Request>\n\n\n"; - } - } - } - - if(!buddy->mInSLFriends && !buddy->mInVivoxBuddies) - { - // Delete this entry from the local buddy list. This should NOT invalidate the iterator, - // since it has already been incremented to the next entry. - deleteBuddy(buddy->mURI); - } - - } - writeString(stream.str()); - } - } - } -} - -///////////////////////////// -// Response/Event handlers - -void LLVoiceClient::connectorCreateResponse(int statusCode, std::string &statusString, std::string &connectorHandle, std::string &versionID) -{ - if(statusCode != 0) - { - LL_WARNS("Voice") << "Connector.Create response failure: " << statusString << LL_ENDL; - setState(stateConnectorFailed); + return mVoiceModule->deviceSettingsAvailable(); } else { - // Connector created, move forward. - LL_INFOS("Voice") << "Connector.Create succeeded, Vivox SDK version is " << versionID << LL_ENDL; - mAPIVersion = versionID; - mConnectorHandle = connectorHandle; - if(getState() == stateConnectorStarting) - { - setState(stateConnectorStarted); - } + return false; } } -void LLVoiceClient::loginResponse(int statusCode, std::string &statusString, std::string &accountHandle, int numberOfAliases) -{ - LL_DEBUGS("Voice") << "Account.Login response (" << statusCode << "): " << statusString << LL_ENDL; - - // Status code of 20200 means "bad password". We may want to special-case that at some point. - - if ( statusCode == 401 ) - { - // Login failure which is probably caused by the delay after a user's password being updated. - LL_INFOS("Voice") << "Account.Login response failure (" << statusCode << "): " << statusString << LL_ENDL; - setState(stateLoginRetry); - } - else if(statusCode != 0) - { - LL_WARNS("Voice") << "Account.Login response failure (" << statusCode << "): " << statusString << LL_ENDL; - setState(stateLoginFailed); - } - else - { - // Login succeeded, move forward. - mAccountHandle = accountHandle; - mNumberOfAliases = numberOfAliases; - // This needs to wait until the AccountLoginStateChangeEvent is received. -// if(getState() == stateLoggingIn) -// { -// setState(stateLoggedIn); -// } - } -} - -void LLVoiceClient::sessionCreateResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle) -{ - sessionState *session = findSessionBeingCreatedByURI(requestId); - - if(session) - { - session->mCreateInProgress = false; - } - - if(statusCode != 0) - { - LL_WARNS("Voice") << "Session.Create response failure (" << statusCode << "): " << statusString << LL_ENDL; - if(session) - { - session->mErrorStatusCode = statusCode; - session->mErrorStatusString = statusString; - if(session == mAudioSession) - { - setState(stateJoinSessionFailed); - } - else - { - reapSession(session); - } - } - } - else - { - LL_INFOS("Voice") << "Session.Create response received (success), session handle is " << sessionHandle << LL_ENDL; - if(session) - { - setSessionHandle(session, sessionHandle); - } - } -} - -void LLVoiceClient::sessionGroupAddSessionResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle) -{ - sessionState *session = findSessionBeingCreatedByURI(requestId); - - if(session) - { - session->mCreateInProgress = false; - } - - if(statusCode != 0) - { - LL_WARNS("Voice") << "SessionGroup.AddSession response failure (" << statusCode << "): " << statusString << LL_ENDL; - if(session) - { - session->mErrorStatusCode = statusCode; - session->mErrorStatusString = statusString; - if(session == mAudioSession) - { - setState(stateJoinSessionFailed); - } - else - { - reapSession(session); - } - } - } - else - { - LL_DEBUGS("Voice") << "SessionGroup.AddSession response received (success), session handle is " << sessionHandle << LL_ENDL; - if(session) - { - setSessionHandle(session, sessionHandle); - } - } -} - -void LLVoiceClient::sessionConnectResponse(std::string &requestId, int statusCode, std::string &statusString) +void LLVoiceClient::refreshDeviceLists(bool clearCurrentList) { - sessionState *session = findSession(requestId); - if(statusCode != 0) - { - LL_WARNS("Voice") << "Session.Connect response failure (" << statusCode << "): " << statusString << LL_ENDL; - if(session) - { - session->mMediaConnectInProgress = false; - session->mErrorStatusCode = statusCode; - session->mErrorStatusString = statusString; - if(session == mAudioSession) - setState(stateJoinSessionFailed); - } - } - else - { - LL_DEBUGS("Voice") << "Session.Connect response received (success)" << LL_ENDL; - } + if (mVoiceModule) mVoiceModule->refreshDeviceLists(clearCurrentList); } -void LLVoiceClient::logoutResponse(int statusCode, std::string &statusString) -{ - if(statusCode != 0) - { - LL_WARNS("Voice") << "Account.Logout response failure: " << statusString << LL_ENDL; - // Should this ever fail? do we care if it does? - } -} - -void LLVoiceClient::connectorShutdownResponse(int statusCode, std::string &statusString) +void LLVoiceClient::setCaptureDevice(const std::string& name) { - if(statusCode != 0) - { - LL_WARNS("Voice") << "Connector.InitiateShutdown response failure: " << statusString << LL_ENDL; - // Should this ever fail? do we care if it does? - } - - mConnected = false; + if (mVoiceModule) mVoiceModule->setCaptureDevice(name); - if(getState() == stateConnectorStopping) - { - setState(stateConnectorStopped); - } } -void LLVoiceClient::sessionAddedEvent( - std::string &uriString, - std::string &alias, - std::string &sessionHandle, - std::string &sessionGroupHandle, - bool isChannel, - bool incoming, - std::string &nameString, - std::string &applicationString) +void LLVoiceClient::setRenderDevice(const std::string& name) { - sessionState *session = NULL; - - LL_INFOS("Voice") << "session " << uriString << ", alias " << alias << ", name " << nameString << " handle " << sessionHandle << LL_ENDL; - - session = addSession(uriString, sessionHandle); - if(session) - { - session->mGroupHandle = sessionGroupHandle; - session->mIsChannel = isChannel; - session->mIncoming = incoming; - session->mAlias = alias; - - // Generate a caller UUID -- don't need to do this for channels - if(!session->mIsChannel) - { - if(IDFromName(session->mSIPURI, session->mCallerID)) - { - // Normal URI(base64-encoded UUID) - } - else if(!session->mAlias.empty() && IDFromName(session->mAlias, session->mCallerID)) - { - // Wrong URI, but an alias is available. Stash the incoming URI as an alternate - session->mAlternateSIPURI = session->mSIPURI; - - // and generate a proper URI from the ID. - setSessionURI(session, sipURIFromID(session->mCallerID)); - } - else - { - LL_INFOS("Voice") << "Could not generate caller id from uri, using hash of uri " << session->mSIPURI << LL_ENDL; - setUUIDFromStringHash(session->mCallerID, session->mSIPURI); - session->mSynthesizedCallerID = true; - - // Can't look up the name in this case -- we have to extract it from the URI. - std::string namePortion = nameFromsipURI(session->mSIPURI); - if(namePortion.empty()) - { - // Didn't seem to be a SIP URI, just use the whole provided name. - namePortion = nameString; - } - - // Some incoming names may be separated with an underscore instead of a space. Fix this. - LLStringUtil::replaceChar(namePortion, '_', ' '); - - // Act like we just finished resolving the name (this stores it in all the right places) - avatarNameResolved(session->mCallerID, namePortion); - } - - LL_INFOS("Voice") << "caller ID: " << session->mCallerID << LL_ENDL; - - if(!session->mSynthesizedCallerID) - { - // If we got here, we don't have a proper name. Initiate a lookup. - lookupName(session->mCallerID); - } - } - } + if (mVoiceModule) mVoiceModule->setRenderDevice(name); } -void LLVoiceClient::sessionGroupAddedEvent(std::string &sessionGroupHandle) +const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices() { - LL_DEBUGS("Voice") << "handle " << sessionGroupHandle << LL_ENDL; - -#if USE_SESSION_GROUPS - if(mMainSessionGroupHandle.empty()) + static LLVoiceDeviceList nullCaptureDevices; + if (mVoiceModule) { - // This is the first (i.e. "main") session group. Save its handle. - mMainSessionGroupHandle = sessionGroupHandle; + return mVoiceModule->getCaptureDevices(); } else { - LL_DEBUGS("Voice") << "Already had a session group handle " << mMainSessionGroupHandle << LL_ENDL; - } -#endif -} - -void LLVoiceClient::joinedAudioSession(sessionState *session) -{ - if(mAudioSession != session) - { - sessionState *oldSession = mAudioSession; - - mAudioSession = session; - mAudioSessionChanged = true; - - // The old session may now need to be deleted. - reapSession(oldSession); - } - - // This is the session we're joining. - if(getState() == stateJoiningSession) - { - setState(stateSessionJoined); - - // SLIM SDK: we don't always receive a participant state change for ourselves when joining a channel now. - // Add the current user as a participant here. - participantState *participant = session->addParticipant(sipURIFromName(mAccountName)); - if(participant) - { - participant->mIsSelf = true; - lookupName(participant->mAvatarID); - - LL_INFOS("Voice") << "added self as participant \"" << participant->mAccountName - << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; - } - - if(!session->mIsChannel) - { - // this is a p2p session. Make sure the other end is added as a participant. - participantState *participant = session->addParticipant(session->mSIPURI); - if(participant) - { - if(participant->mAvatarIDValid) - { - lookupName(participant->mAvatarID); - } - else if(!session->mName.empty()) - { - participant->mDisplayName = session->mName; - avatarNameResolved(participant->mAvatarID, session->mName); - } - - // TODO: Question: Do we need to set up mAvatarID/mAvatarIDValid here? - LL_INFOS("Voice") << "added caller as participant \"" << participant->mAccountName - << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; - } - } + return nullCaptureDevices; } } -void LLVoiceClient::sessionRemovedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle) -{ - LL_INFOS("Voice") << "handle " << sessionHandle << LL_ENDL; - - sessionState *session = findSession(sessionHandle); - if(session) - { - leftAudioSession(session); - - // This message invalidates the session's handle. Set it to empty. - setSessionHandle(session); - - // This also means that the session's session group is now empty. - // Terminate the session group so it doesn't leak. - sessionGroupTerminateSendMessage(session); - - // Reset the media state (we now have no info) - session->mMediaStreamState = streamStateUnknown; - session->mTextStreamState = streamStateUnknown; - - // Conditionally delete the session - reapSession(session); - } - else - { - LL_WARNS("Voice") << "unknown session " << sessionHandle << " removed" << LL_ENDL; - } -} -void LLVoiceClient::reapSession(sessionState *session) +const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() { - if(session) + static LLVoiceDeviceList nullRenderDevices; + if (mVoiceModule) { - if(!session->mHandle.empty()) - { - LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (non-null session handle)" << LL_ENDL; - } - else if(session->mCreateInProgress) - { - LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (create in progress)" << LL_ENDL; - } - else if(session->mMediaConnectInProgress) - { - LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (connect in progress)" << LL_ENDL; - } - else if(session == mAudioSession) - { - LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (it's the current session)" << LL_ENDL; - } - else if(session == mNextAudioSession) - { - LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (it's the next session)" << LL_ENDL; - } - else - { - // TODO: Question: Should we check for queued text messages here? - // We don't have a reason to keep tracking this session, so just delete it. - LL_DEBUGS("Voice") << "deleting session " << session->mSIPURI << LL_ENDL; - deleteSession(session); - session = NULL; - } + return mVoiceModule->getRenderDevices(); } else { -// LL_DEBUGS("Voice") << "session is NULL" << LL_ENDL; + return nullRenderDevices; } } -// Returns true if the session seems to indicate we've moved to a region on a different voice server -bool LLVoiceClient::sessionNeedsRelog(sessionState *session) -{ - bool result = false; - - if(session != NULL) - { - // Only make this check for spatial channels (so it won't happen for group or p2p calls) - if(session->mIsSpatial) - { - std::string::size_type atsign; - - atsign = session->mSIPURI.find("@"); - - if(atsign != std::string::npos) - { - std::string urihost = session->mSIPURI.substr(atsign + 1); - if(stricmp(urihost.c_str(), mVoiceSIPURIHostName.c_str())) - { - // The hostname in this URI is different from what we expect. This probably means we need to relog. - - // We could make a ProvisionVoiceAccountRequest and compare the result with the current values of - // mVoiceSIPURIHostName and mVoiceAccountServerURI to be really sure, but this is a pretty good indicator. - - result = true; - } - } - } - } - - return result; -} -void LLVoiceClient::leftAudioSession( - sessionState *session) -{ - if(mAudioSession == session) - { - switch(getState()) - { - case stateJoiningSession: - case stateSessionJoined: - case stateRunning: - case stateLeavingSession: - case stateJoinSessionFailed: - case stateJoinSessionFailedWaiting: - // normal transition - LL_DEBUGS("Voice") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; - setState(stateSessionTerminated); - break; - - case stateSessionTerminated: - // this will happen sometimes -- there are cases where we send the terminate and then go straight to this state. - LL_WARNS("Voice") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; - break; - - default: - LL_WARNS("Voice") << "unexpected SessionStateChangeEvent (left session) in state " << state2string(getState()) << LL_ENDL; - setState(stateSessionTerminated); - break; - } - } -} +//-------------------------------------------------- +// participants -void LLVoiceClient::accountLoginStateChangeEvent( - std::string &accountHandle, - int statusCode, - std::string &statusString, - int state) +void LLVoiceClient::getParticipantList(std::set<LLUUID> &participants) { - LL_DEBUGS("Voice") << "state is " << state << LL_ENDL; - /* - According to Mike S., status codes for this event are: - login_state_logged_out=0, - login_state_logged_in = 1, - login_state_logging_in = 2, - login_state_logging_out = 3, - login_state_resetting = 4, - login_state_error=100 - */ - - switch(state) + if (mVoiceModule) { - case 1: - if(getState() == stateLoggingIn) - { - setState(stateLoggedIn); - } - break; - - case 3: - // The user is in the process of logging out. - setState(stateLoggingOut); - break; - - case 0: - // The user has been logged out. - setState(stateLoggedOut); - break; - - default: - //Used to be a commented out warning - LL_DEBUGS("Voice") << "unknown state: " << state << LL_ENDL; - break; - } -} - -void LLVoiceClient::mediaStreamUpdatedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle, - int statusCode, - std::string &statusString, - int state, - bool incoming) -{ - sessionState *session = findSession(sessionHandle); - - LL_DEBUGS("Voice") << "session " << sessionHandle << ", status code " << statusCode << ", string \"" << statusString << "\"" << LL_ENDL; - - if(session) - { - // We know about this session - - // Save the state for later use - session->mMediaStreamState = state; - - switch(statusCode) - { - case 0: - case 200: - // generic success - // Don't change the saved error code (it may have been set elsewhere) - break; - default: - // save the status code for later - session->mErrorStatusCode = statusCode; - break; - } - - switch(state) - { - case streamStateIdle: - // Standard "left audio session" - session->mVoiceEnabled = false; - session->mMediaConnectInProgress = false; - leftAudioSession(session); - break; - - case streamStateConnected: - session->mVoiceEnabled = true; - session->mMediaConnectInProgress = false; - joinedAudioSession(session); - break; - - case streamStateRinging: - if(incoming) - { - // Send the voice chat invite to the GUI layer - // *TODO: Question: Should we correlate with the mute list here? - session->mIMSessionID = LLIMMgr::computeSessionID(IM_SESSION_P2P_INVITE, session->mCallerID); - session->mVoiceInvitePending = true; - if(session->mName.empty()) - { - lookupName(session->mCallerID); - } - else - { - // Act like we just finished resolving the name - avatarNameResolved(session->mCallerID, session->mName); - } - } - break; - - default: - LL_WARNS("Voice") << "unknown state " << state << LL_ENDL; - break; - - } - + mVoiceModule->getParticipantList(participants); } else { - LL_WARNS("Voice") << "session " << sessionHandle << "not found"<< LL_ENDL; + participants = std::set<LLUUID>(); } } -void LLVoiceClient::textStreamUpdatedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle, - bool enabled, - int state, - bool incoming) +bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) { - sessionState *session = findSession(sessionHandle); - - if(session) - { - // Save the state for later use - session->mTextStreamState = state; - - // We know about this session - switch(state) - { - case 0: // We see this when the text stream closes - LL_DEBUGS("Voice") << "stream closed" << LL_ENDL; - break; - - case 1: // We see this on an incoming call from the Connector - // Try to send any text messages queued for this session. - sendQueuedTextMessages(session); - - // Send the text chat invite to the GUI layer - // TODO: Question: Should we correlate with the mute list here? - session->mTextInvitePending = true; - if(session->mName.empty()) - { - lookupName(session->mCallerID); - } - else - { - // Act like we just finished resolving the name - avatarNameResolved(session->mCallerID, session->mName); - } - break; - - default: - LL_WARNS("Voice") << "unknown state " << state << LL_ENDL; - break; - - } - } + if(mVoiceModule) + { + return mVoiceModule->isParticipant(speaker_id); + } + return false; } -void LLVoiceClient::participantAddedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle, - std::string &uriString, - std::string &alias, - std::string &nameString, - std::string &displayNameString, - int participantType) -{ - sessionState *session = findSession(sessionHandle); - if(session) - { - participantState *participant = session->addParticipant(uriString); - if(participant) - { - participant->mAccountName = nameString; - - LL_DEBUGS("Voice") << "added participant \"" << participant->mAccountName - << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; - - if(participant->mAvatarIDValid) - { - // Initiate a lookup - lookupName(participant->mAvatarID); - } - else - { - // If we don't have a valid avatar UUID, we need to fill in the display name to make the active speakers floater work. - std::string namePortion = nameFromsipURI(uriString); - if(namePortion.empty()) - { - // Problem with the SIP URI, fall back to the display name - namePortion = displayNameString; - } - if(namePortion.empty()) - { - // Problems with both of the above, fall back to the account name - namePortion = nameString; - } - - // Set the display name (which is a hint to the active speakers window not to do its own lookup) - participant->mDisplayName = namePortion; - avatarNameResolved(participant->mAvatarID, namePortion); - } - } - } -} -void LLVoiceClient::participantRemovedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle, - std::string &uriString, - std::string &alias, - std::string &nameString) -{ - sessionState *session = findSession(sessionHandle); - if(session) - { - participantState *participant = session->findParticipant(uriString); - if(participant) - { - session->removeParticipant(participant); - } - else - { - LL_DEBUGS("Voice") << "unknown participant " << uriString << LL_ENDL; - } - } - else - { - LL_DEBUGS("Voice") << "unknown session " << sessionHandle << LL_ENDL; - } -} +//-------------------------------------------------- +// text chat -void LLVoiceClient::participantUpdatedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle, - std::string &uriString, - std::string &alias, - bool isModeratorMuted, - bool isSpeaking, - int volume, - F32 energy) +BOOL LLVoiceClient::isSessionTextIMPossible(const LLUUID& id) { - sessionState *session = findSession(sessionHandle); - if(session) + if (mVoiceModule) { - participantState *participant = session->findParticipant(uriString); - - if(participant) - { - participant->mIsSpeaking = isSpeaking; - participant->mIsModeratorMuted = isModeratorMuted; - - // SLIM SDK: convert range: ensure that energy is set to zero if is_speaking is false - if (isSpeaking) - { - participant->mSpeakingTimeout.reset(); - participant->mPower = energy; - } - else - { - participant->mPower = 0.0f; - } - - // Ignore incoming volume level if it has been explicitly set, or there - // is a volume or mute change pending. - if ( !participant->mVolumeSet && !participant->mVolumeDirty) - { - participant->mVolume = (F32)volume * VOLUME_SCALE_VIVOX; - } - - // *HACK: mantipov: added while working on EXT-3544 - /* - Sometimes LLVoiceClient::participantUpdatedEvent callback is called BEFORE - LLViewerChatterBoxSessionAgentListUpdates::post() sometimes AFTER. - - participantUpdatedEvent updates voice participant state in particular participantState::mIsModeratorMuted - Originally we wanted to update session Speaker Manager to fire LLSpeakerVoiceModerationEvent to fix the EXT-3544 bug. - Calling of the LLSpeakerMgr::update() method was added into LLIMMgr::processAgentListUpdates. - - But in case participantUpdatedEvent() is called after LLViewerChatterBoxSessionAgentListUpdates::post() - voice participant mIsModeratorMuted is changed after speakers are updated in Speaker Manager - and event is not fired. - - So, we have to call LLSpeakerMgr::update() here. In any case it is better than call it - in LLCallFloater::draw() - */ - LLVoiceChannel* voice_cnl = LLVoiceChannel::getCurrentVoiceChannel(); - - // ignore session ID of local chat - if (voice_cnl && voice_cnl->getSessionID().notNull()) - { - LLSpeakerMgr* speaker_manager = LLIMModel::getInstance()->getSpeakerManager(voice_cnl->getSessionID()); - if (speaker_manager) - { - speaker_manager->update(true); - } - } - } - else - { - LL_WARNS("Voice") << "unknown participant: " << uriString << LL_ENDL; - } + return mVoiceModule->isSessionTextIMPossible(id); } else { - LL_INFOS("Voice") << "unknown session " << sessionHandle << LL_ENDL; - } + return FALSE; + } } -void LLVoiceClient::buddyPresenceEvent( - std::string &uriString, - std::string &alias, - std::string &statusString, - std::string &applicationString) +BOOL LLVoiceClient::isSessionCallBackPossible(const LLUUID& id) { - buddyListEntry *buddy = findBuddy(uriString); - - if(buddy) + if (mVoiceModule) { - LL_DEBUGS("Voice") << "Presence event for " << buddy->mDisplayName << " status \"" << statusString << "\", application \"" << applicationString << "\""<< LL_ENDL; - LL_DEBUGS("Voice") << "before: mOnlineSL = " << (buddy->mOnlineSL?"true":"false") << ", mOnlineSLim = " << (buddy->mOnlineSLim?"true":"false") << LL_ENDL; - - if(applicationString.empty()) - { - // This presence event is from a client that doesn't set up the Application string. Do things the old-skool way. - // NOTE: this will be needed to support people who aren't on the 3010-class SDK yet. - - if ( stricmp("Unknown", statusString.c_str())== 0) - { - // User went offline with a non-SLim-enabled viewer. - buddy->mOnlineSL = false; - } - else if ( stricmp("Online", statusString.c_str())== 0) - { - // User came online with a non-SLim-enabled viewer. - buddy->mOnlineSL = true; - } - else - { - // If the user is online through SLim, their status will be "Online-slc", "Away", or something else. - // NOTE: we should never see this unless someone is running an OLD version of SLim -- the versions that should be in use now all set the application string. - buddy->mOnlineSLim = true; - } - } - else if(applicationString.find("SecondLifeViewer") != std::string::npos) - { - // This presence event is from a viewer that sets the application string - if ( stricmp("Unknown", statusString.c_str())== 0) - { - // Viewer says they're offline - buddy->mOnlineSL = false; - } - else - { - // Viewer says they're online - buddy->mOnlineSL = true; - } - } - else - { - // This presence event is from something which is NOT the SL viewer (assume it's SLim). - if ( stricmp("Unknown", statusString.c_str())== 0) - { - // SLim says they're offline - buddy->mOnlineSLim = false; - } - else - { - // SLim says they're online - buddy->mOnlineSLim = true; - } - } - - LL_DEBUGS("Voice") << "after: mOnlineSL = " << (buddy->mOnlineSL?"true":"false") << ", mOnlineSLim = " << (buddy->mOnlineSLim?"true":"false") << LL_ENDL; - - // HACK -- increment the internal change serial number in the LLRelationship (without changing the actual status), so the UI notices the change. - LLAvatarTracker::instance().setBuddyOnline(buddy->mUUID,LLAvatarTracker::instance().isBuddyOnline(buddy->mUUID)); - - notifyFriendObservers(); + return mVoiceModule->isSessionCallBackPossible(id); } else { - LL_DEBUGS("Voice") << "Presence for unknown buddy " << uriString << LL_ENDL; + return FALSE; } } -void LLVoiceClient::messageEvent( - std::string &sessionHandle, - std::string &uriString, - std::string &alias, - std::string &messageHeader, - std::string &messageBody, - std::string &applicationString) -{ - LL_DEBUGS("Voice") << "Message event, session " << sessionHandle << " from " << uriString << LL_ENDL; -// LL_DEBUGS("Voice") << " header " << messageHeader << ", body: \n" << messageBody << LL_ENDL; - - if(messageHeader.find("text/html") != std::string::npos) - { - std::string message; - - { - const std::string startMarker = "<body"; - const std::string startMarker2 = ">"; - const std::string endMarker = "</body>"; - const std::string startSpan = "<span"; - const std::string endSpan = "</span>"; - std::string::size_type start; - std::string::size_type end; - - // Default to displaying the raw string, so the message gets through. - message = messageBody; - - // Find the actual message text within the XML fragment - start = messageBody.find(startMarker); - start = messageBody.find(startMarker2, start); - end = messageBody.find(endMarker); - - if(start != std::string::npos) - { - start += startMarker2.size(); - - if(end != std::string::npos) - end -= start; - - message.assign(messageBody, start, end); - } - else - { - // Didn't find a <body>, try looking for a <span> instead. - start = messageBody.find(startSpan); - start = messageBody.find(startMarker2, start); - end = messageBody.find(endSpan); - - if(start != std::string::npos) - { - start += startMarker2.size(); - - if(end != std::string::npos) - end -= start; - - message.assign(messageBody, start, end); - } - } - } - -// LL_DEBUGS("Voice") << " raw message = \n" << message << LL_ENDL; - - // strip formatting tags - { - std::string::size_type start; - std::string::size_type end; - - while((start = message.find('<')) != std::string::npos) - { - if((end = message.find('>', start + 1)) != std::string::npos) - { - // Strip out the tag - message.erase(start, (end + 1) - start); - } - else - { - // Avoid an infinite loop - break; - } - } - } - - // Decode ampersand-escaped chars - { - std::string::size_type mark = 0; - - // The text may contain text encoded with <, >, and & - mark = 0; - while((mark = message.find("<", mark)) != std::string::npos) - { - message.replace(mark, 4, "<"); - mark += 1; - } - - mark = 0; - while((mark = message.find(">", mark)) != std::string::npos) - { - message.replace(mark, 4, ">"); - mark += 1; - } - - mark = 0; - while((mark = message.find("&", mark)) != std::string::npos) - { - message.replace(mark, 5, "&"); - mark += 1; - } - } - - // strip leading/trailing whitespace (since we always seem to get a couple newlines) - LLStringUtil::trim(message); - -// LL_DEBUGS("Voice") << " stripped message = \n" << message << LL_ENDL; - - sessionState *session = findSession(sessionHandle); - if(session) - { - bool is_busy = gAgent.getBusy(); - bool is_muted = LLMuteList::getInstance()->isMuted(session->mCallerID, session->mName, LLMute::flagTextChat); - bool is_linden = LLMuteList::getInstance()->isLinden(session->mName); - bool quiet_chat = false; - LLChat chat; - - chat.mMuted = is_muted && !is_linden; - - if(!chat.mMuted) - { - chat.mFromID = session->mCallerID; - chat.mFromName = session->mName; - chat.mSourceType = CHAT_SOURCE_AGENT; - - if(is_busy && !is_linden) - { - quiet_chat = true; - // TODO: Question: Return busy mode response here? Or maybe when session is started instead? - } - - LL_DEBUGS("Voice") << "adding message, name " << session->mName << " session " << session->mIMSessionID << ", target " << session->mCallerID << LL_ENDL; - gIMMgr->addMessage(session->mIMSessionID, - session->mCallerID, - session->mName.c_str(), - message.c_str(), - LLStringUtil::null, // default arg - IM_NOTHING_SPECIAL, // default arg - 0, // default arg - LLUUID::null, // default arg - LLVector3::zero, // default arg - true); // prepend name and make it a link to the user's profile - } - } - } -} - -void LLVoiceClient::sessionNotificationEvent(std::string &sessionHandle, std::string &uriString, std::string ¬ificationType) +BOOL LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message) { - sessionState *session = findSession(sessionHandle); - - if(session) + if (mVoiceModule) { - participantState *participant = session->findParticipant(uriString); - if(participant) - { - if (!stricmp(notificationType.c_str(), "Typing")) - { - // Other end started typing - // TODO: The proper way to add a typing notification seems to be LLIMMgr::processIMTypingStart(). - // It requires an LLIMInfo for the message, which we don't have here. - } - else if (!stricmp(notificationType.c_str(), "NotTyping")) - { - // Other end stopped typing - // TODO: The proper way to remove a typing notification seems to be LLIMMgr::processIMTypingStop(). - // It requires an LLIMInfo for the message, which we don't have here. - } - else - { - LL_DEBUGS("Voice") << "Unknown notification type " << notificationType << "for participant " << uriString << " in session " << session->mSIPURI << LL_ENDL; - } - } - else - { - LL_DEBUGS("Voice") << "Unknown participant " << uriString << " in session " << session->mSIPURI << LL_ENDL; - } + return mVoiceModule->sendTextMessage(participant_id, message); } else { - LL_DEBUGS("Voice") << "Unknown session handle " << sessionHandle << LL_ENDL; - } -} - -void LLVoiceClient::subscriptionEvent(std::string &buddyURI, std::string &subscriptionHandle, std::string &alias, std::string &displayName, std::string &applicationString, std::string &subscriptionType) -{ - buddyListEntry *buddy = findBuddy(buddyURI); - - if(!buddy) - { - // Couldn't find buddy by URI, try converting the alias... - if(!alias.empty()) - { - LLUUID id; - if(IDFromName(alias, id)) - { - buddy = findBuddy(id); - } - } - } - - if(buddy) - { - std::ostringstream stream; - - if(buddy->mCanSeeMeOnline) - { - // Sending the response will create an auto-accept rule - buddy->mHasAutoAcceptListEntry = true; - } - else - { - // Sending the response will create a block rule - buddy->mHasBlockListEntry = true; - } - - if(buddy->mInSLFriends) - { - buddy->mInVivoxBuddies = true; - } - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.SendSubscriptionReply.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" - << "<RuleType>" << (buddy->mCanSeeMeOnline?"Allow":"Hide") << "</RuleType>" - << "<AutoAccept>"<< (buddy->mInSLFriends?"1":"0")<< "</AutoAccept>" - << "<SubscriptionHandle>" << subscriptionHandle << "</SubscriptionHandle>" - << "</Request>" - << "\n\n\n"; - - writeString(stream.str()); - } -} - -void LLVoiceClient::auxAudioPropertiesEvent(F32 energy) -{ - LL_DEBUGS("Voice") << "got energy " << energy << LL_ENDL; - mTuningEnergy = energy; -} - -void LLVoiceClient::buddyListChanged() -{ - // This is called after we receive a BuddyAndGroupListChangedEvent. - mBuddyListMapPopulated = true; - mFriendsListDirty = true; -} - -void LLVoiceClient::muteListChanged() -{ - // The user's mute list has been updated. Go through the current participant list and sync it with the mute list. - if(mAudioSession) - { - participantMap::iterator iter = mAudioSession->mParticipantsByURI.begin(); - - for(; iter != mAudioSession->mParticipantsByURI.end(); iter++) - { - participantState *p = iter->second; - - // Check to see if this participant is on the mute list already - if(p->updateMuteState()) - mAudioSession->mMuteDirty = true; - } - } -} - -void LLVoiceClient::updateFriends(U32 mask) -{ - if(mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::POWERS)) - { - // Just resend the whole friend list to the daemon - mFriendsListDirty = true; - } -} - -///////////////////////////// -// Managing list of participants -LLVoiceClient::participantState::participantState(const std::string &uri) : - mURI(uri), - mPTT(false), - mIsSpeaking(false), - mIsModeratorMuted(false), - mLastSpokeTimestamp(0.f), - mPower(0.f), - mVolume(VOLUME_DEFAULT), - mOnMuteList(false), - mVolumeSet(false), - mVolumeDirty(false), - mAvatarIDValid(false), - mIsSelf(false) -{ -} - -LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(const std::string &uri) -{ - participantState *result = NULL; - bool useAlternateURI = false; - - // Note: this is mostly the body of LLVoiceClient::sessionState::findParticipant(), but since we need to know if it - // matched the alternate SIP URI (so we can add it properly), we need to reproduce it here. - { - participantMap::iterator iter = mParticipantsByURI.find(&uri); - - if(iter == mParticipantsByURI.end()) - { - if(!mAlternateSIPURI.empty() && (uri == mAlternateSIPURI)) - { - // This is a p2p session (probably with the SLIM client) with an alternate URI for the other participant. - // Use mSIPURI instead, since it will be properly encoded. - iter = mParticipantsByURI.find(&(mSIPURI)); - useAlternateURI = true; - } - } - - if(iter != mParticipantsByURI.end()) - { - result = iter->second; - } - } - - if(!result) - { - // participant isn't already in one list or the other. - result = new participantState(useAlternateURI?mSIPURI:uri); - mParticipantsByURI.insert(participantMap::value_type(&(result->mURI), result)); - mParticipantsChanged = true; - - // Try to do a reverse transform on the URI to get the GUID back. - { - LLUUID id; - if(IDFromName(result->mURI, id)) - { - result->mAvatarIDValid = true; - result->mAvatarID = id; - } - else - { - // Create a UUID by hashing the URI, but do NOT set mAvatarIDValid. - // This tells code in LLVoiceClient that the ID will not be in the name cache. - setUUIDFromStringHash(result->mAvatarID, uri); - } - } - - if(result->updateMuteState()) - { - mMuteDirty = true; - } - - mParticipantsByUUID.insert(participantUUIDMap::value_type(&(result->mAvatarID), result)); - - if (LLSpeakerVolumeStorage::getInstance()->getSpeakerVolume(result->mAvatarID, result->mVolume)) - { - result->mVolumeDirty = true; - mVolumeDirty = true; - } - - LL_DEBUGS("Voice") << "participant \"" << result->mURI << "\" added." << LL_ENDL; - } - - return result; -} - -bool LLVoiceClient::participantState::updateMuteState() -{ - bool result = false; - - bool isMuted = LLMuteList::getInstance()->isMuted(mAvatarID, LLMute::flagVoiceChat); - if(mOnMuteList != isMuted) - { - mOnMuteList = isMuted; - mVolumeDirty = true; - result = true; - } - return result; -} - -bool LLVoiceClient::participantState::isAvatar() -{ - return mAvatarIDValid; -} - -void LLVoiceClient::sessionState::removeParticipant(LLVoiceClient::participantState *participant) -{ - if(participant) - { - participantMap::iterator iter = mParticipantsByURI.find(&(participant->mURI)); - participantUUIDMap::iterator iter2 = mParticipantsByUUID.find(&(participant->mAvatarID)); - - LL_DEBUGS("Voice") << "participant \"" << participant->mURI << "\" (" << participant->mAvatarID << ") removed." << LL_ENDL; - - if(iter == mParticipantsByURI.end()) - { - LL_ERRS("Voice") << "Internal error: participant " << participant->mURI << " not in URI map" << LL_ENDL; - } - else if(iter2 == mParticipantsByUUID.end()) - { - LL_ERRS("Voice") << "Internal error: participant ID " << participant->mAvatarID << " not in UUID map" << LL_ENDL; - } - else if(iter->second != iter2->second) - { - LL_ERRS("Voice") << "Internal error: participant mismatch!" << LL_ENDL; - } - else - { - mParticipantsByURI.erase(iter); - mParticipantsByUUID.erase(iter2); - - delete participant; - mParticipantsChanged = true; - } - } -} - -void LLVoiceClient::sessionState::removeAllParticipants() -{ - LL_DEBUGS("Voice") << "called" << LL_ENDL; - - while(!mParticipantsByURI.empty()) - { - removeParticipant(mParticipantsByURI.begin()->second); - } - - if(!mParticipantsByUUID.empty()) - { - LL_ERRS("Voice") << "Internal error: empty URI map, non-empty UUID map" << LL_ENDL; - } -} - -LLVoiceClient::participantMap *LLVoiceClient::getParticipantList(void) -{ - participantMap *result = NULL; - if(mAudioSession) - { - result = &(mAudioSession->mParticipantsByURI); - } - return result; -} - -void LLVoiceClient::getParticipantsUUIDSet(std::set<LLUUID>& participant_uuids) -{ - if (NULL == mAudioSession) return; - - participantUUIDMap::const_iterator it = mAudioSession->mParticipantsByUUID.begin(), - it_end = mAudioSession->mParticipantsByUUID.end(); - for (; it != it_end; ++it) - { - participant_uuids.insert((*(*it).first)); - } -} - -LLVoiceClient::participantState *LLVoiceClient::sessionState::findParticipant(const std::string &uri) -{ - participantState *result = NULL; - - participantMap::iterator iter = mParticipantsByURI.find(&uri); - - if(iter == mParticipantsByURI.end()) - { - if(!mAlternateSIPURI.empty() && (uri == mAlternateSIPURI)) - { - // This is a p2p session (probably with the SLIM client) with an alternate URI for the other participant. - // Look up the other URI - iter = mParticipantsByURI.find(&(mSIPURI)); - } - } - - if(iter != mParticipantsByURI.end()) - { - result = iter->second; - } - - return result; -} - -LLVoiceClient::participantState* LLVoiceClient::sessionState::findParticipantByID(const LLUUID& id) -{ - participantState * result = NULL; - participantUUIDMap::iterator iter = mParticipantsByUUID.find(&id); - - if(iter != mParticipantsByUUID.end()) - { - result = iter->second; - } - - return result; -} - -LLVoiceClient::participantState* LLVoiceClient::findParticipantByID(const LLUUID& id) -{ - participantState * result = NULL; - - if(mAudioSession) - { - result = mAudioSession->findParticipantByID(id); - } - - return result; + return FALSE; + } } - -void LLVoiceClient::parcelChanged() +void LLVoiceClient::endUserIMSession(const LLUUID& participant_id) { - if(getState() >= stateNoChannel) - { - // If the user is logged in, start a channel lookup. - LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL; - - std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest"); - LLSD data; - LLHTTPClient::post( - url, - data, - new LLVoiceClientCapResponder); - } - else + if (mVoiceModule) { - // The transition to stateNoChannel needs to kick this off again. - LL_INFOS("Voice") << "not logged in yet, deferring" << LL_ENDL; + mVoiceModule->endUserIMSession(participant_id); } } -void LLVoiceClient::switchChannel( - std::string uri, - bool spatial, - bool no_reconnect, - bool is_p2p, - std::string hash) -{ - bool needsSwitch = false; - - LL_DEBUGS("Voice") - << "called in state " << state2string(getState()) - << " with uri \"" << uri << "\"" - << (spatial?", spatial is true":", spatial is false") - << LL_ENDL; - - switch(getState()) - { - case stateJoinSessionFailed: - case stateJoinSessionFailedWaiting: - case stateNoChannel: - // Always switch to the new URI from these states. - needsSwitch = true; - break; - - default: - if(mSessionTerminateRequested) - { - // If a terminate has been requested, we need to compare against where the URI we're already headed to. - if(mNextAudioSession) - { - if(mNextAudioSession->mSIPURI != uri) - needsSwitch = true; - } - else - { - // mNextAudioSession is null -- this probably means we're on our way back to spatial. - if(!uri.empty()) - { - // We do want to process a switch in this case. - needsSwitch = true; - } - } - } - else - { - // Otherwise, compare against the URI we're in now. - if(mAudioSession) - { - if(mAudioSession->mSIPURI != uri) - { - needsSwitch = true; - } - } - else - { - if(!uri.empty()) - { - // mAudioSession is null -- it's not clear what case would cause this. - // For now, log it as a warning and see if it ever crops up. - LL_WARNS("Voice") << "No current audio session." << LL_ENDL; - } - } - } - break; - } - - if(needsSwitch) - { - if(uri.empty()) - { - // Leave any channel we may be in - LL_DEBUGS("Voice") << "leaving channel" << LL_ENDL; - - sessionState *oldSession = mNextAudioSession; - mNextAudioSession = NULL; - - // The old session may now need to be deleted. - reapSession(oldSession); - - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); - } - else - { - LL_DEBUGS("Voice") << "switching to channel " << uri << LL_ENDL; - - mNextAudioSession = addSession(uri); - mNextAudioSession->mHash = hash; - mNextAudioSession->mIsSpatial = spatial; - mNextAudioSession->mReconnect = !no_reconnect; - mNextAudioSession->mIsP2P = is_p2p; - } - - if(getState() <= stateNoChannel) - { - // We're already set up to join a channel, just needed to fill in the session URI - } - else - { - // State machine will come around and rejoin if uri/handle is not empty. - sessionTerminate(); - } - } -} +//---------------------------------------------- +// channels -void LLVoiceClient::joinSession(sessionState *session) +bool LLVoiceClient::inProximalChannel() { - mNextAudioSession = session; - - if(getState() <= stateNoChannel) + if (mVoiceModule) { - // We're already set up to join a channel, just needed to fill in the session handle + return mVoiceModule->inProximalChannel(); } else { - // State machine will come around and rejoin if uri/handle is not empty. - sessionTerminate(); + return false; } } @@ -5453,1884 +345,608 @@ void LLVoiceClient::setNonSpatialChannel( const std::string &uri, const std::string &credentials) { - switchChannel(uri, false, false, false, credentials); + if (mVoiceModule) mVoiceModule->setNonSpatialChannel(uri, credentials); } void LLVoiceClient::setSpatialChannel( const std::string &uri, const std::string &credentials) { - mSpatialSessionURI = uri; - mSpatialSessionCredentials = credentials; - mAreaVoiceDisabled = mSpatialSessionURI.empty(); - - LL_DEBUGS("Voice") << "got spatial channel uri: \"" << uri << "\"" << LL_ENDL; - - if((mAudioSession && !(mAudioSession->mIsSpatial)) || (mNextAudioSession && !(mNextAudioSession->mIsSpatial))) - { - // User is in a non-spatial chat or joining a non-spatial chat. Don't switch channels. - LL_INFOS("Voice") << "in non-spatial chat, not switching channels" << LL_ENDL; - } - else - { - switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); - } + if (mVoiceModule) mVoiceModule->setSpatialChannel(uri, credentials); } -void LLVoiceClient::callUser(const LLUUID &uuid) -{ - std::string userURI = sipURIFromID(uuid); - - switchChannel(userURI, false, true, true); -} - -LLVoiceClient::sessionState* LLVoiceClient::startUserIMSession(const LLUUID &uuid) +void LLVoiceClient::leaveNonSpatialChannel() { - // Figure out if a session with the user already exists - sessionState *session = findSession(uuid); - if(!session) - { - // No session with user, need to start one. - std::string uri = sipURIFromID(uuid); - session = addSession(uri); - - llassert(session); - if (!session) return NULL; - - session->mIsSpatial = false; - session->mReconnect = false; - session->mIsP2P = true; - session->mCallerID = uuid; - } - - if(session->mHandle.empty()) - { - // Session isn't active -- start it up. - sessionCreateSendMessage(session, false, true); - } - else - { - // Session is already active -- start up text. - sessionTextConnectSendMessage(session); - } - - return session; + if (mVoiceModule) mVoiceModule->leaveNonSpatialChannel(); } -bool LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message) +void LLVoiceClient::leaveChannel(void) { - bool result = false; - - // Attempt to locate the indicated session - sessionState *session = startUserIMSession(participant_id); - if(session) - { - // found the session, attempt to send the message - session->mTextMsgQueue.push(message); - - // Try to send queued messages (will do nothing if the session is not open yet) - sendQueuedTextMessages(session); - - // The message is queued, so we succeed. - result = true; - } - else - { - LL_DEBUGS("Voice") << "Session not found for participant ID " << participant_id << LL_ENDL; - } - - return result; + if (mVoiceModule) mVoiceModule->leaveChannel(); } -void LLVoiceClient::sendQueuedTextMessages(sessionState *session) +std::string LLVoiceClient::getCurrentChannel() { - if(session->mTextStreamState == 1) + if (mVoiceModule) { - if(!session->mTextMsgQueue.empty()) - { - std::ostringstream stream; - - while(!session->mTextMsgQueue.empty()) - { - std::string message = session->mTextMsgQueue.front(); - session->mTextMsgQueue.pop(); - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SendMessage.1\">" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "<MessageHeader>text/HTML</MessageHeader>" - << "<MessageBody>" << message << "</MessageBody>" - << "</Request>" - << "\n\n\n"; - } - writeString(stream.str()); - } + return mVoiceModule->getCurrentChannel(); } else { - // Session isn't connected yet, defer until later. + return std::string(); } } -void LLVoiceClient::endUserIMSession(const LLUUID &uuid) -{ - // Figure out if a session with the user exists - sessionState *session = findSession(uuid); - if(session) - { - // found the session - if(!session->mHandle.empty()) - { - sessionTextDisconnectSendMessage(session); - } - } - else - { - LL_DEBUGS("Voice") << "Session not found for participant ID " << uuid << LL_ENDL; - } -} - -bool LLVoiceClient::answerInvite(std::string &sessionHandle) -{ - // this is only ever used to answer incoming p2p call invites. - - sessionState *session = findSession(sessionHandle); - if(session) - { - session->mIsSpatial = false; - session->mReconnect = false; - session->mIsP2P = true; - joinSession(session); - return true; - } - - return false; -} +//--------------------------------------- +// invitations -bool LLVoiceClient::isOnlineSIP(const LLUUID &id) +void LLVoiceClient::callUser(const LLUUID &uuid) { - bool result = false; - buddyListEntry *buddy = findBuddy(id); - if(buddy) - { - result = buddy->mOnlineSLim; - LL_DEBUGS("Voice") << "Buddy " << buddy->mDisplayName << " is SIP " << (result?"online":"offline") << LL_ENDL; - } - - if(!result) - { - // This user isn't on the buddy list or doesn't show online status through the buddy list, but could be a participant in an existing session if they initiated a text IM. - sessionState *session = findSession(id); - if(session && !session->mHandle.empty()) - { - if((session->mTextStreamState != streamStateUnknown) || (session->mMediaStreamState > streamStateIdle)) - { - LL_DEBUGS("Voice") << "Open session with " << id << " found, returning SIP online state" << LL_ENDL; - // we have a p2p text session open with this user, so by definition they're online. - result = true; - } - } - } - - return result; + if (mVoiceModule) mVoiceModule->callUser(uuid); } -// Returns true if the indicated participant in the current audio session is really an SL avatar. -// Currently this will be false only for PSTN callers into group chats, and PSTN p2p calls. -bool LLVoiceClient::isParticipantAvatar(const LLUUID &id) +bool LLVoiceClient::isValidChannel(std::string &session_handle) { - bool result = true; - sessionState *session = findSession(id); - - if(session != NULL) + if (mVoiceModule) { - // this is a p2p session with the indicated caller, or the session with the specified UUID. - if(session->mSynthesizedCallerID) - result = false; + return mVoiceModule->isValidChannel(session_handle); } else { - // Didn't find a matching session -- check the current audio session for a matching participant - if(mAudioSession != NULL) - { - participantState *participant = findParticipantByID(id); - if(participant != NULL) - { - result = participant->isAvatar(); - } - } + return false; } - - return result; } -// Returns true if calling back the session URI after the session has closed is possible. -// Currently this will be false only for PSTN P2P calls. -bool LLVoiceClient::isSessionCallBackPossible(const LLUUID &session_id) +bool LLVoiceClient::answerInvite(std::string &channelHandle) { - bool result = true; - sessionState *session = findSession(session_id); - - if(session != NULL) - { - result = session->isCallBackPossible(); - } - - return result; -} - -// Returns true if the session can accepte text IM's. -// Currently this will be false only for PSTN P2P calls. -bool LLVoiceClient::isSessionTextIMPossible(const LLUUID &session_id) -{ - bool result = true; - sessionState *session = findSession(session_id); - - if(session != NULL) + if (mVoiceModule) { - result = session->isTextIMPossible(); + return mVoiceModule->answerInvite(channelHandle); } - - return result; -} - - -void LLVoiceClient::declineInvite(std::string &sessionHandle) -{ - sessionState *session = findSession(sessionHandle); - if(session) - { - sessionMediaDisconnectSendMessage(session); - } -} - -void LLVoiceClient::leaveNonSpatialChannel() -{ - LL_DEBUGS("Voice") - << "called in state " << state2string(getState()) - << LL_ENDL; - - // Make sure we don't rejoin the current session. - sessionState *oldNextSession = mNextAudioSession; - mNextAudioSession = NULL; - - // Most likely this will still be the current session at this point, but check it anyway. - reapSession(oldNextSession); - - verifySessionState(); - - sessionTerminate(); -} - -std::string LLVoiceClient::getCurrentChannel() -{ - std::string result; - - if((getState() == stateRunning) && !mSessionTerminateRequested) - { - result = getAudioSessionURI(); - } - - return result; -} - -bool LLVoiceClient::inProximalChannel() -{ - bool result = false; - - if((getState() == stateRunning) && !mSessionTerminateRequested) - { - result = inSpatialChannel(); - } - - return result; -} - -std::string LLVoiceClient::sipURIFromID(const LLUUID &id) -{ - std::string result; - result = "sip:"; - result += nameFromID(id); - result += "@"; - result += mVoiceSIPURIHostName; - - return result; -} - -std::string LLVoiceClient::sipURIFromAvatar(LLVOAvatar *avatar) -{ - std::string result; - if(avatar) - { - result = "sip:"; - result += nameFromID(avatar->getID()); - result += "@"; - result += mVoiceSIPURIHostName; - } - - return result; -} - -std::string LLVoiceClient::nameFromAvatar(LLVOAvatar *avatar) -{ - std::string result; - if(avatar) - { - result = nameFromID(avatar->getID()); - } - return result; -} - -std::string LLVoiceClient::nameFromID(const LLUUID &uuid) -{ - std::string result; - - if (uuid.isNull()) { - //VIVOX, the uuid emtpy look for the mURIString and return that instead. - //result.assign(uuid.mURIStringName); - LLStringUtil::replaceChar(result, '_', ' '); - return result; - } - // Prepending this apparently prevents conflicts with reserved names inside the vivox and diamondware code. - result = "x"; - - // Base64 encode and replace the pieces of base64 that are less compatible - // with e-mail local-parts. - // See RFC-4648 "Base 64 Encoding with URL and Filename Safe Alphabet" - result += LLBase64::encode(uuid.mData, UUID_BYTES); - LLStringUtil::replaceChar(result, '+', '-'); - LLStringUtil::replaceChar(result, '/', '_'); - - // If you need to transform a GUID to this form on the Mac OS X command line, this will do so: - // echo -n x && (echo e669132a-6c43-4ee1-a78d-6c82fff59f32 |xxd -r -p |openssl base64|tr '/+' '_-') - - // The reverse transform can be done with: - // echo 'x5mkTKmxDTuGnjWyC__WfMg==' |cut -b 2- -|tr '_-' '/+' |openssl base64 -d|xxd -p - - return result; -} - -bool LLVoiceClient::IDFromName(const std::string inName, LLUUID &uuid) -{ - bool result = false; - - // SLIM SDK: The "name" may actually be a SIP URI such as: "sip:xFnPP04IpREWNkuw1cOXlhw==@bhr.vivox.com" - // If it is, convert to a bare name before doing the transform. - std::string name = nameFromsipURI(inName); - - // Doesn't look like a SIP URI, assume it's an actual name. - if(name.empty()) - name = inName; - - // This will only work if the name is of the proper form. - // As an example, the account name for Monroe Linden (UUID 1673cfd3-8229-4445-8d92-ec3570e5e587) is: - // "xFnPP04IpREWNkuw1cOXlhw==" - - if((name.size() == 25) && (name[0] == 'x') && (name[23] == '=') && (name[24] == '=')) - { - // The name appears to have the right form. - - // Reverse the transforms done by nameFromID - std::string temp = name; - LLStringUtil::replaceChar(temp, '-', '+'); - LLStringUtil::replaceChar(temp, '_', '/'); - - U8 rawuuid[UUID_BYTES + 1]; - int len = apr_base64_decode_binary(rawuuid, temp.c_str() + 1); - if(len == UUID_BYTES) - { - // The decode succeeded. Stuff the bits into the result's UUID - memcpy(uuid.mData, rawuuid, UUID_BYTES); - result = true; - } - } - - if(!result) + else { - // VIVOX: not a standard account name, just copy the URI name mURIString field - // and hope for the best. bpj - uuid.setNull(); // VIVOX, set the uuid field to nulls + return false; } - - return result; } -std::string LLVoiceClient::displayNameFromAvatar(LLVOAvatar *avatar) +void LLVoiceClient::declineInvite(std::string &channelHandle) { - return avatar->getFullname(); + if (mVoiceModule) mVoiceModule->declineInvite(channelHandle); } -std::string LLVoiceClient::sipURIFromName(std::string &name) -{ - std::string result; - result = "sip:"; - result += name; - result += "@"; - result += mVoiceSIPURIHostName; -// LLStringUtil::toLower(result); +//------------------------------------------ +// Volume/gain - return result; -} -std::string LLVoiceClient::nameFromsipURI(const std::string &uri) -{ - std::string result; - - std::string::size_type sipOffset, atOffset; - sipOffset = uri.find("sip:"); - atOffset = uri.find("@"); - if((sipOffset != std::string::npos) && (atOffset != std::string::npos)) - { - result = uri.substr(sipOffset + 4, atOffset - (sipOffset + 4)); - } - - return result; -} - -bool LLVoiceClient::inSpatialChannel(void) -{ - bool result = false; - - if(mAudioSession) - result = mAudioSession->mIsSpatial; - - return result; -} - -std::string LLVoiceClient::getAudioSessionURI() +void LLVoiceClient::setVoiceVolume(F32 volume) { - std::string result; - - if(mAudioSession) - result = mAudioSession->mSIPURI; - - return result; + if (mVoiceModule) mVoiceModule->setVoiceVolume(volume); } -std::string LLVoiceClient::getAudioSessionHandle() +void LLVoiceClient::setMicGain(F32 volume) { - std::string result; - - if(mAudioSession) - result = mAudioSession->mHandle; - - return result; + if (mVoiceModule) mVoiceModule->setMicGain(volume); } -///////////////////////////// -// Sending updates of current state +//------------------------------------------ +// enable/disable voice features -void LLVoiceClient::enforceTether(void) +bool LLVoiceClient::voiceEnabled() { - LLVector3d tethered = mCameraRequestedPosition; - - // constrain 'tethered' to within 50m of mAvatarPosition. + if (mVoiceModule) { - F32 max_dist = 50.0f; - LLVector3d camera_offset = mCameraRequestedPosition - mAvatarPosition; - F32 camera_distance = (F32)camera_offset.magVec(); - if(camera_distance > max_dist) - { - tethered = mAvatarPosition + - (max_dist / camera_distance) * camera_offset; - } + return mVoiceModule->voiceEnabled(); } - - if(dist_vec(mCameraPosition, tethered) > 0.1) + else { - mCameraPosition = tethered; - mSpatialCoordsDirty = true; + return false; } } -void LLVoiceClient::updatePosition(void) -{ - if(gVoiceClient) - { - LLViewerRegion *region = gAgent.getRegion(); - if(region && isAgentAvatarValid()) - { - LLMatrix3 rot; - LLVector3d pos; - - // TODO: If camera and avatar velocity are actually used by the voice system, we could compute them here... - // They're currently always set to zero. - - // Send the current camera position to the voice code - rot.setRows(LLViewerCamera::getInstance()->getAtAxis(), LLViewerCamera::getInstance()->getLeftAxis (), LLViewerCamera::getInstance()->getUpAxis()); - pos = gAgent.getRegion()->getPosGlobalFromRegion(LLViewerCamera::getInstance()->getOrigin()); - - gVoiceClient->setCameraPosition( - pos, // position - LLVector3::zero, // velocity - rot); // rotation matrix - - // Send the current avatar position to the voice code - rot = gAgentAvatarp->getRootJoint()->getWorldRotation().getMatrix3(); - - pos = gAgentAvatarp->getPositionGlobal(); - // TODO: Can we get the head offset from outside the LLVOAvatar? -// pos += LLVector3d(mHeadOffset); - pos += LLVector3d(0.f, 0.f, 1.f); - - gVoiceClient->setAvatarPosition( - pos, // position - LLVector3::zero, // velocity - rot); // rotation matrix - } - } -} - -void LLVoiceClient::setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) +void LLVoiceClient::setVoiceEnabled(bool enabled) { - mCameraRequestedPosition = position; - - if(mCameraVelocity != velocity) - { - mCameraVelocity = velocity; - mSpatialCoordsDirty = true; - } - - if(mCameraRot != rot) - { - mCameraRot = rot; - mSpatialCoordsDirty = true; - } + if (mVoiceModule) mVoiceModule->setVoiceEnabled(enabled); } -void LLVoiceClient::setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) +void LLVoiceClient::setLipSyncEnabled(BOOL enabled) { - if(dist_vec(mAvatarPosition, position) > 0.1) - { - mAvatarPosition = position; - mSpatialCoordsDirty = true; - } - - if(mAvatarVelocity != velocity) - { - mAvatarVelocity = velocity; - mSpatialCoordsDirty = true; - } - - if(mAvatarRot != rot) - { - mAvatarRot = rot; - mSpatialCoordsDirty = true; - } + if (mVoiceModule) mVoiceModule->setLipSyncEnabled(enabled); } -bool LLVoiceClient::channelFromRegion(LLViewerRegion *region, std::string &name) +BOOL LLVoiceClient::lipSyncEnabled() { - bool result = false; - - if(region) + if (mVoiceModule) { - name = region->getName(); + return mVoiceModule->lipSyncEnabled(); } - - if(!name.empty()) - result = true; - - return result; -} - -void LLVoiceClient::leaveChannel(void) -{ - if(getState() == stateRunning) + else { - LL_DEBUGS("Voice") << "leaving channel for teleport/logout" << LL_ENDL; - mChannelName.clear(); - sessionTerminate(); + return false; } } void LLVoiceClient::setMuteMic(bool muted) { - mMuteMic = muted; + if (mVoiceModule) mVoiceModule->setMuteMic(muted); } -bool LLVoiceClient::getMuteMic() const -{ - return mMuteMic; -} + +// ---------------------------------------------- +// PTT void LLVoiceClient::setUserPTTState(bool ptt) { - mUserPTTState = ptt; + if (mVoiceModule) mVoiceModule->setUserPTTState(ptt); } bool LLVoiceClient::getUserPTTState() { - return mUserPTTState; -} - -void LLVoiceClient::toggleUserPTTState(void) -{ - mUserPTTState = !mUserPTTState; -} - -void LLVoiceClient::setVoiceEnabled(bool enabled) -{ - if (enabled != mVoiceEnabled) - { - mVoiceEnabled = enabled; - LLVoiceClientStatusObserver::EStatusType status; - - if (enabled) - { - LLVoiceChannel::getCurrentVoiceChannel()->activate(); - status = LLVoiceClientStatusObserver::STATUS_VOICE_ENABLED; - } - else - { - // Turning voice off looses your current channel -- this makes sure the UI isn't out of sync when you re-enable it. - LLVoiceChannel::getCurrentVoiceChannel()->deactivate(); - status = LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED; - } - - notifyStatusObservers(status); - } -} - -bool LLVoiceClient::voiceEnabled() -{ - return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice"); -} - -//AD *TODO: investigate possible merge of voiceWorking() and voiceEnabled() into one non-static method -bool LLVoiceClient::voiceWorking() -{ - //Added stateSessionTerminated state to avoid problems with call in parcels with disabled voice (EXT-4758) - // Condition with joining spatial num was added to take into account possible problems with connection to voice - // server(EXT-4313). See bug descriptions and comments for MAX_NORMAL_JOINING_SPATIAL_NUM for more info. - return (mSpatialJoiningNum < MAX_NORMAL_JOINING_SPATIAL_NUM) && (stateLoggedIn <= mState) && (mState <= stateSessionTerminated); -} - -void LLVoiceClient::setLipSyncEnabled(BOOL enabled) -{ - mLipSyncEnabled = enabled; -} - -BOOL LLVoiceClient::lipSyncEnabled() -{ - - if ( mVoiceEnabled && stateDisabled != getState() ) + if (mVoiceModule) { - return mLipSyncEnabled; + return mVoiceModule->getUserPTTState(); } else { - return FALSE; + return false; } } void LLVoiceClient::setUsePTT(bool usePTT) { - if(usePTT && !mUsePTT) - { - // When the user turns on PTT, reset the current state. - mUserPTTState = false; - } - mUsePTT = usePTT; + if (mVoiceModule) mVoiceModule->setUsePTT(usePTT); } void LLVoiceClient::setPTTIsToggle(bool PTTIsToggle) { - if(!PTTIsToggle && mPTTIsToggle) - { - // When the user turns off toggle, reset the current state. - mUserPTTState = false; - } - - mPTTIsToggle = PTTIsToggle; + if (mVoiceModule) mVoiceModule->setPTTIsToggle(PTTIsToggle); } bool LLVoiceClient::getPTTIsToggle() { - return mPTTIsToggle; -} - -void LLVoiceClient::setPTTKey(std::string &key) -{ - if(key == "MiddleMouse") + if (mVoiceModule) { - mPTTIsMiddleMouse = true; + return mVoiceModule->getPTTIsToggle(); } - else - { - mPTTIsMiddleMouse = false; - if(!LLKeyboard::keyFromString(key, &mPTTKey)) - { - // If the call failed, don't match any key. - key = KEY_NONE; - } + else { + return false; } -} -void LLVoiceClient::setEarLocation(S32 loc) -{ - if(mEarLocation != loc) - { - LL_DEBUGS("Voice") << "Setting mEarLocation to " << loc << LL_ENDL; - - mEarLocation = loc; - mSpatialCoordsDirty = true; - } } -void LLVoiceClient::setVoiceVolume(F32 volume) +void LLVoiceClient::inputUserControlState(bool down) { - int scaled_volume = scale_speaker_volume(volume); - - if(scaled_volume != mSpeakerVolume) - { - int min_volume = scale_speaker_volume(0); - if((scaled_volume == min_volume) || (mSpeakerVolume == min_volume)) - { - mSpeakerMuteDirty = true; - } - - mSpeakerVolume = scaled_volume; - mSpeakerVolumeDirty = true; - } + if (mVoiceModule) mVoiceModule->inputUserControlState(down); } -void LLVoiceClient::setMicGain(F32 volume) +void LLVoiceClient::toggleUserPTTState(void) { - int scaled_volume = scale_mic_volume(volume); - - if(scaled_volume != mMicVolume) - { - mMicVolume = scaled_volume; - mMicVolumeDirty = true; - } + if (mVoiceModule) mVoiceModule->toggleUserPTTState(); } void LLVoiceClient::keyDown(KEY key, MASK mask) { - if (gKeyboard->getKeyRepeated(key)) - { - // ignore auto-repeat keys - return; - } - - if(!mPTTIsMiddleMouse) - { - bool down = (mPTTKey != KEY_NONE) - && gKeyboard->getKeyDown(mPTTKey); - inputUserControlState(down); - } + if (mVoiceModule) mVoiceModule->keyDown(key, mask); } void LLVoiceClient::keyUp(KEY key, MASK mask) { - if(!mPTTIsMiddleMouse) - { - bool down = (mPTTKey != KEY_NONE) - && gKeyboard->getKeyDown(mPTTKey); - inputUserControlState(down); - } -} -void LLVoiceClient::inputUserControlState(bool down) -{ - if(mPTTIsToggle) - { - if(down) // toggle open-mic state on 'down' - { - toggleUserPTTState(); - } - } - else // set open-mic state as an absolute - { - setUserPTTState(down); - } + if (mVoiceModule) mVoiceModule->keyUp(key, mask); } void LLVoiceClient::middleMouseState(bool down) { - if(mPTTIsMiddleMouse) - { - inputUserControlState(down); - } + if (mVoiceModule) mVoiceModule->middleMouseState(down); } -///////////////////////////// -// Accessors for data related to nearby speakers + +//------------------------------------------- +// nearby speaker accessors + BOOL LLVoiceClient::getVoiceEnabled(const LLUUID& id) { - BOOL result = FALSE; - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - // I'm not sure what the semantics of this should be. - // For now, if we have any data about the user that came through the chat channel, assume they're voice-enabled. - result = TRUE; - } - - return result; -} - -BOOL LLVoiceClient::getIsSpeaking(const LLUUID& id) -{ - BOOL result = FALSE; - - participantState *participant = findParticipantByID(id); - if(participant) + return mVoiceModule->getVoiceEnabled(id); + } + else { - if (participant->mSpeakingTimeout.getElapsedTimeF32() > SPEAKING_TIMEOUT) - { - participant->mIsSpeaking = FALSE; - } - result = participant->mIsSpeaking; + return FALSE; } - - return result; } -BOOL LLVoiceClient::getIsModeratorMuted(const LLUUID& id) +std::string LLVoiceClient::getDisplayName(const LLUUID& id) { - BOOL result = FALSE; - - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - result = participant->mIsModeratorMuted; + return mVoiceModule->getDisplayName(id); } - - return result; -} - -F32 LLVoiceClient::getCurrentPower(const LLUUID& id) -{ - F32 result = 0; - participantState *participant = findParticipantByID(id); - if(participant) + else { - result = participant->mPower; + return std::string(); } - - return result; } - -std::string LLVoiceClient::getDisplayName(const LLUUID& id) +bool LLVoiceClient::isVoiceWorking() { - std::string result; - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - result = participant->mDisplayName; + return mVoiceModule->isVoiceWorking(); } - - return result; + return false; } - -BOOL LLVoiceClient::getUsingPTT(const LLUUID& id) +BOOL LLVoiceClient::isParticipantAvatar(const LLUUID& id) { - BOOL result = FALSE; - - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - // I'm not sure what the semantics of this should be. - // Does "using PTT" mean they're configured with a push-to-talk button? - // For now, we know there's no PTT mechanism in place, so nobody is using it. + return mVoiceModule->isParticipantAvatar(id); } - - return result; -} - -BOOL LLVoiceClient::getOnMuteList(const LLUUID& id) -{ - BOOL result = FALSE; - - participantState *participant = findParticipantByID(id); - if(participant) + else { - result = participant->mOnMuteList; + return FALSE; } - - return result; } -// External accessors. -F32 LLVoiceClient::getUserVolume(const LLUUID& id) +BOOL LLVoiceClient::isOnlineSIP(const LLUUID& id) { - // Minimum volume will be returned for users with voice disabled - F32 result = VOLUME_MIN; - - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - result = participant->mVolume; - - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. - // LL_DEBUGS("Voice") << "mVolume = " << result << " for " << id << LL_ENDL; + return mVoiceModule->isOnlineSIP(id); } - - return result; -} - -void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) -{ - if(mAudioSession) + else { - participantState *participant = findParticipantByID(id); - if (participant && !participant->mIsSelf) - { - if (!is_approx_equal(volume, VOLUME_DEFAULT)) - { - // Store this volume setting for future sessions if it has been - // changed from the default - LLSpeakerVolumeStorage::getInstance()->storeSpeakerVolume(id, volume); - } - else - { - // Remove stored volume setting if it is returned to the default - LLSpeakerVolumeStorage::getInstance()->removeSpeakerVolume(id); - } - - participant->mVolume = llclamp(volume, VOLUME_MIN, VOLUME_MAX); - participant->mVolumeDirty = true; - mAudioSession->mVolumeDirty = true; - } + return FALSE; } } -std::string LLVoiceClient::getGroupID(const LLUUID& id) +BOOL LLVoiceClient::getIsSpeaking(const LLUUID& id) { - std::string result; - - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - result = participant->mGroupID; + return mVoiceModule->getIsSpeaking(id); } - - return result; -} - -BOOL LLVoiceClient::getAreaVoiceDisabled() -{ - return mAreaVoiceDisabled; -} - -void LLVoiceClient::recordingLoopStart(int seconds, int deltaFramesPerControlFrame) -{ -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Start)" << LL_ENDL; - - if(!mMainSessionGroupHandle.empty()) + else { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Start</RecordingControlType>" - << "<DeltaFramesPerControlFrame>" << deltaFramesPerControlFrame << "</DeltaFramesPerControlFrame>" - << "<Filename>" << "" << "</Filename>" - << "<EnableAudioRecordingEvents>false</EnableAudioRecordingEvents>" - << "<LoopModeDurationSeconds>" << seconds << "</LoopModeDurationSeconds>" - << "</Request>\n\n\n"; - - - writeString(stream.str()); + return FALSE; } } -void LLVoiceClient::recordingLoopSave(const std::string& filename) +BOOL LLVoiceClient::getIsModeratorMuted(const LLUUID& id) { -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Flush)" << LL_ENDL; - - if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + if (mVoiceModule) { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Flush</RecordingControlType>" - << "<Filename>" << filename << "</Filename>" - << "</Request>\n\n\n"; - - writeString(stream.str()); + return mVoiceModule->getIsModeratorMuted(id); } -} - -void LLVoiceClient::recordingStop() -{ -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Stop)" << LL_ENDL; - - if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + else { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Stop</RecordingControlType>" - << "</Request>\n\n\n"; - - writeString(stream.str()); + return FALSE; } } -void LLVoiceClient::filePlaybackStart(const std::string& filename) -{ -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlPlayback (Start)" << LL_ENDL; - - if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) +F32 LLVoiceClient::getCurrentPower(const LLUUID& id) +{ + if (mVoiceModule) + { + return mVoiceModule->getCurrentPower(id); + } + else { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlPlayback.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Start</RecordingControlType>" - << "<Filename>" << filename << "</Filename>" - << "</Request>\n\n\n"; - - writeString(stream.str()); + return 0.0; } } -void LLVoiceClient::filePlaybackStop() +BOOL LLVoiceClient::getOnMuteList(const LLUUID& id) { -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlPlayback (Stop)" << LL_ENDL; - - if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + if (mVoiceModule) { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlPlayback.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Stop</RecordingControlType>" - << "</Request>\n\n\n"; - - writeString(stream.str()); + return mVoiceModule->getOnMuteList(id); + } + else + { + return FALSE; } } -void LLVoiceClient::filePlaybackSetPaused(bool paused) +F32 LLVoiceClient::getUserVolume(const LLUUID& id) { - // TODO: Implement once Vivox gives me a sample + if (mVoiceModule) + { + return mVoiceModule->getUserVolume(id); + } + else + { + return 0.0; + } } -void LLVoiceClient::filePlaybackSetMode(bool vox, float speed) +void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) { - // TODO: Implement once Vivox gives me a sample + if (mVoiceModule) mVoiceModule->setUserVolume(id, volume); } -LLVoiceClient::sessionState::sessionState() : - mErrorStatusCode(0), - mMediaStreamState(streamStateUnknown), - mTextStreamState(streamStateUnknown), - mCreateInProgress(false), - mMediaConnectInProgress(false), - mVoiceInvitePending(false), - mTextInvitePending(false), - mSynthesizedCallerID(false), - mIsChannel(false), - mIsSpatial(false), - mIsP2P(false), - mIncoming(false), - mVoiceEnabled(false), - mReconnect(false), - mVolumeDirty(false), - mMuteDirty(false), - mParticipantsChanged(false) -{ -} +//-------------------------------------------------- +// status observers -LLVoiceClient::sessionState::~sessionState() +void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) { - removeAllParticipants(); + if (mVoiceModule) mVoiceModule->addObserver(observer); } -bool LLVoiceClient::sessionState::isCallBackPossible() +void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) { - // This may change to be explicitly specified by vivox in the future... - // Currently, only PSTN P2P calls cannot be returned. - // Conveniently, this is also the only case where we synthesize a caller UUID. - return !mSynthesizedCallerID; + if (mVoiceModule) mVoiceModule->removeObserver(observer); } -bool LLVoiceClient::sessionState::isTextIMPossible() +void LLVoiceClient::addObserver(LLFriendObserver* observer) { - // This may change to be explicitly specified by vivox in the future... - return !mSynthesizedCallerID; + if (mVoiceModule) mVoiceModule->addObserver(observer); } - -LLVoiceClient::sessionIterator LLVoiceClient::sessionsBegin(void) +void LLVoiceClient::removeObserver(LLFriendObserver* observer) { - return mSessions.begin(); + if (mVoiceModule) mVoiceModule->removeObserver(observer); } -LLVoiceClient::sessionIterator LLVoiceClient::sessionsEnd(void) +void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) { - return mSessions.end(); + if (mVoiceModule) mVoiceModule->addObserver(observer); } - -LLVoiceClient::sessionState *LLVoiceClient::findSession(const std::string &handle) -{ - sessionState *result = NULL; - sessionMap::iterator iter = mSessionsByHandle.find(&handle); - if(iter != mSessionsByHandle.end()) - { - result = iter->second; - } - - return result; -} - -LLVoiceClient::sessionState *LLVoiceClient::findSessionBeingCreatedByURI(const std::string &uri) -{ - sessionState *result = NULL; - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) - { - sessionState *session = *iter; - if(session->mCreateInProgress && (session->mSIPURI == uri)) - { - result = session; - break; - } - } - - return result; -} - -LLVoiceClient::sessionState *LLVoiceClient::findSession(const LLUUID &participant_id) +void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) { - sessionState *result = NULL; - - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) - { - sessionState *session = *iter; - if((session->mCallerID == participant_id) || (session->mIMSessionID == participant_id)) - { - result = session; - break; - } - } - - return result; + if (mVoiceModule) mVoiceModule->removeObserver(observer); } -LLVoiceClient::sessionState *LLVoiceClient::addSession(const std::string &uri, const std::string &handle) +std::string LLVoiceClient::sipURIFromID(const LLUUID &id) { - sessionState *result = NULL; - - if(handle.empty()) + if (mVoiceModule) { - // No handle supplied. - // Check whether there's already a session with this URI - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) - { - sessionState *s = *iter; - if((s->mSIPURI == uri) || (s->mAlternateSIPURI == uri)) - { - // TODO: I need to think about this logic... it's possible that this case should raise an internal error. - result = s; - break; - } - } - } - else // (!handle.empty()) - { - // Check for an existing session with this handle - sessionMap::iterator iter = mSessionsByHandle.find(&handle); - - if(iter != mSessionsByHandle.end()) - { - result = iter->second; - } - } - - if(!result) - { - // No existing session found. - - LL_DEBUGS("Voice") << "adding new session: handle " << handle << " URI " << uri << LL_ENDL; - result = new sessionState(); - result->mSIPURI = uri; - result->mHandle = handle; - - mSessions.insert(result); - - if(!result->mHandle.empty()) - { - mSessionsByHandle.insert(sessionMap::value_type(&(result->mHandle), result)); - } + return mVoiceModule->sipURIFromID(id); } else { - // Found an existing session - - if(uri != result->mSIPURI) - { - // TODO: Should this be an internal error? - LL_DEBUGS("Voice") << "changing uri from " << result->mSIPURI << " to " << uri << LL_ENDL; - setSessionURI(result, uri); - } - - if(handle != result->mHandle) - { - if(handle.empty()) - { - // There's at least one race condition where where addSession was clearing an existing session handle, which caused things to break. - LL_DEBUGS("Voice") << "NOT clearing handle " << result->mHandle << LL_ENDL; - } - else - { - // TODO: Should this be an internal error? - LL_DEBUGS("Voice") << "changing handle from " << result->mHandle << " to " << handle << LL_ENDL; - setSessionHandle(result, handle); - } - } - - LL_DEBUGS("Voice") << "returning existing session: handle " << handle << " URI " << uri << LL_ENDL; - } - - verifySessionState(); - - return result; -} - -void LLVoiceClient::setSessionHandle(sessionState *session, const std::string &handle) -{ - // Have to remove the session from the handle-indexed map before changing the handle, or things will break badly. - - if(!session->mHandle.empty()) - { - // Remove session from the map if it should have been there. - sessionMap::iterator iter = mSessionsByHandle.find(&(session->mHandle)); - if(iter != mSessionsByHandle.end()) - { - if(iter->second != session) - { - LL_ERRS("Voice") << "Internal error: session mismatch!" << LL_ENDL; - } - - mSessionsByHandle.erase(iter); - } - else - { - LL_ERRS("Voice") << "Internal error: session handle not found in map!" << LL_ENDL; - } + return std::string(); } - - session->mHandle = handle; - - if(!handle.empty()) - { - mSessionsByHandle.insert(sessionMap::value_type(&(session->mHandle), session)); - } - - verifySessionState(); } -void LLVoiceClient::setSessionURI(sessionState *session, const std::string &uri) -{ - // There used to be a map of session URIs to sessions, which made this complex.... - session->mSIPURI = uri; - verifySessionState(); -} +/////////////////// +// version checking -void LLVoiceClient::deleteSession(sessionState *session) +class LLViewerRequiredVoiceVersion : public LLHTTPNode { - // Remove the session from the handle map - if(!session->mHandle.empty()) + static BOOL sAlertedUser; + virtual void post( + LLHTTPNode::ResponsePtr response, + const LLSD& context, + const LLSD& input) const { - sessionMap::iterator iter = mSessionsByHandle.find(&(session->mHandle)); - if(iter != mSessionsByHandle.end()) + //You received this messsage (most likely on region cross or + //teleport) + if ( input.has("body") && input["body"].has("major_version") ) { - if(iter->second != session) + int major_voice_version = + input["body"]["major_version"].asInteger(); + // int minor_voice_version = + // input["body"]["minor_version"].asInteger(); + LLVoiceVersionInfo versionInfo = LLVoiceClient::getInstance()->getVersion(); + + if (major_voice_version > 1) { - LL_ERRS("Voice") << "Internal error: session mismatch" << LL_ENDL; + if (!sAlertedUser) + { + //sAlertedUser = TRUE; + LLNotificationsUtil::add("VoiceVersionMismatch"); + gSavedSettings.setBOOL("EnableVoiceChat", FALSE); // toggles listener + } } - mSessionsByHandle.erase(iter); } } +}; - // Remove the session from the URI map - mSessions.erase(session); - - // At this point, the session should be unhooked from all lists and all state should be consistent. - verifySessionState(); - - // If this is the current audio session, clean up the pointer which will soon be dangling. - if(mAudioSession == session) - { - mAudioSession = NULL; - mAudioSessionChanged = true; - } - - // ditto for the next audio session - if(mNextAudioSession == session) - { - mNextAudioSession = NULL; - } - - // delete the session - delete session; -} - -void LLVoiceClient::deleteAllSessions() -{ - LL_DEBUGS("Voice") << "called" << LL_ENDL; - - while(!mSessions.empty()) - { - deleteSession(*(sessionsBegin())); - } - - if(!mSessionsByHandle.empty()) - { - LL_ERRS("Voice") << "Internal error: empty session map, non-empty handle map" << LL_ENDL; - } -} - -void LLVoiceClient::verifySessionState(void) +class LLViewerParcelVoiceInfo : public LLHTTPNode { - // This is mostly intended for debugging problems with session state management. - LL_DEBUGS("Voice") << "Total session count: " << mSessions.size() << " , session handle map size: " << mSessionsByHandle.size() << LL_ENDL; - - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + virtual void post( + LLHTTPNode::ResponsePtr response, + const LLSD& context, + const LLSD& input) const { - sessionState *session = *iter; - - LL_DEBUGS("Voice") << "session " << session << ": handle " << session->mHandle << ", URI " << session->mSIPURI << LL_ENDL; + //the parcel you are in has changed something about its + //voice information - if(!session->mHandle.empty()) + //this is a misnomer, as it can also be when you are not in + //a parcel at all. Should really be something like + //LLViewerVoiceInfoChanged..... + if ( input.has("body") ) { - // every session with a non-empty handle needs to be in the handle map - sessionMap::iterator i2 = mSessionsByHandle.find(&(session->mHandle)); - if(i2 == mSessionsByHandle.end()) - { - LL_ERRS("Voice") << "internal error (handle " << session->mHandle << " not found in session map)" << LL_ENDL; - } - else + LLSD body = input["body"]; + + //body has "region_name" (str), "parcel_local_id"(int), + //"voice_credentials" (map). + + //body["voice_credentials"] has "channel_uri" (str), + //body["voice_credentials"] has "channel_credentials" (str) + + //if we really wanted to be extra careful, + //we'd check the supplied + //local parcel id to make sure it's for the same parcel + //we believe we're in + if ( body.has("voice_credentials") ) { - if(i2->second != session) + LLSD voice_credentials = body["voice_credentials"]; + std::string uri; + std::string credentials; + + if ( voice_credentials.has("channel_uri") ) { - LL_ERRS("Voice") << "internal error (handle " << session->mHandle << " in session map points to another session)" << LL_ENDL; + uri = voice_credentials["channel_uri"].asString(); } + if ( voice_credentials.has("channel_credentials") ) + { + credentials = + voice_credentials["channel_credentials"].asString(); + } + + LLVoiceClient::getInstance()->setSpatialChannel(uri, credentials); } } } - - // check that every entry in the handle map points to a valid session in the session set - for(sessionMap::iterator iter = mSessionsByHandle.begin(); iter != mSessionsByHandle.end(); iter++) - { - sessionState *session = iter->second; - sessionIterator i2 = mSessions.find(session); - if(i2 == mSessions.end()) - { - LL_ERRS("Voice") << "internal error (session for handle " << session->mHandle << " not found in session map)" << LL_ENDL; - } - else - { - if(session->mHandle != (*i2)->mHandle) - { - LL_ERRS("Voice") << "internal error (session for handle " << session->mHandle << " points to session with different handle " << (*i2)->mHandle << ")" << LL_ENDL; - } - } - } -} +}; -LLVoiceClient::buddyListEntry::buddyListEntry(const std::string &uri) : - mURI(uri) -{ - mOnlineSL = false; - mOnlineSLim = false; - mCanSeeMeOnline = true; - mHasBlockListEntry = false; - mHasAutoAcceptListEntry = false; - mNameResolved = false; - mInVivoxBuddies = false; - mInSLFriends = false; - mNeedsNameUpdate = false; -} +const std::string LLSpeakerVolumeStorage::SETTINGS_FILE_NAME = "volume_settings.xml"; -void LLVoiceClient::processBuddyListEntry(const std::string &uri, const std::string &displayName) +LLSpeakerVolumeStorage::LLSpeakerVolumeStorage() { - buddyListEntry *buddy = addBuddy(uri, displayName); - buddy->mInVivoxBuddies = true; + load(); } -LLVoiceClient::buddyListEntry *LLVoiceClient::addBuddy(const std::string &uri) +LLSpeakerVolumeStorage::~LLSpeakerVolumeStorage() { - std::string empty; - buddyListEntry *buddy = addBuddy(uri, empty); - if(buddy->mDisplayName.empty()) - { - buddy->mNameResolved = false; - } - return buddy; + save(); } -LLVoiceClient::buddyListEntry *LLVoiceClient::addBuddy(const std::string &uri, const std::string &displayName) +void LLSpeakerVolumeStorage::storeSpeakerVolume(const LLUUID& speaker_id, F32 volume) { - buddyListEntry *result = NULL; - buddyListMap::iterator iter = mBuddyListMap.find(&uri); - - if(iter != mBuddyListMap.end()) - { - // Found a matching buddy already in the map. - LL_DEBUGS("Voice") << "adding existing buddy " << uri << LL_ENDL; - result = iter->second; - } - - if(!result) + if ((volume >= LLVoiceClient::VOLUME_MIN) && (volume <= LLVoiceClient::VOLUME_MAX)) { - // participant isn't already in one list or the other. - LL_DEBUGS("Voice") << "adding new buddy " << uri << LL_ENDL; - result = new buddyListEntry(uri); - result->mDisplayName = displayName; - - if(IDFromName(uri, result->mUUID)) - { - // Extracted UUID from name successfully. - } - else - { - LL_DEBUGS("Voice") << "Couldn't find ID for buddy " << uri << " (\"" << displayName << "\")" << LL_ENDL; - } - - mBuddyListMap.insert(buddyListMap::value_type(&(result->mURI), result)); - } - - return result; -} + mSpeakersData[speaker_id] = volume; -LLVoiceClient::buddyListEntry *LLVoiceClient::findBuddy(const std::string &uri) -{ - buddyListEntry *result = NULL; - buddyListMap::iterator iter = mBuddyListMap.find(&uri); - if(iter != mBuddyListMap.end()) - { - result = iter->second; + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "Stored volume = " << volume << " for " << id << LL_ENDL; } - - return result; -} - -LLVoiceClient::buddyListEntry *LLVoiceClient::findBuddy(const LLUUID &id) -{ - buddyListEntry *result = NULL; - buddyListMap::iterator iter; - - for(iter = mBuddyListMap.begin(); iter != mBuddyListMap.end(); iter++) + else { - if(iter->second->mUUID == id) - { - result = iter->second; - break; - } + LL_WARNS("Voice") << "Attempted to store out of range volume " << volume << " for " << speaker_id << LL_ENDL; + llassert(0); } - - return result; } -LLVoiceClient::buddyListEntry *LLVoiceClient::findBuddyByDisplayName(const std::string &name) +bool LLSpeakerVolumeStorage::getSpeakerVolume(const LLUUID& speaker_id, F32& volume) { - buddyListEntry *result = NULL; - buddyListMap::iterator iter; - - for(iter = mBuddyListMap.begin(); iter != mBuddyListMap.end(); iter++) - { - if(iter->second->mDisplayName == name) - { - result = iter->second; - break; - } - } + speaker_data_map_t::const_iterator it = mSpeakersData.find(speaker_id); - return result; -} - -void LLVoiceClient::deleteBuddy(const std::string &uri) -{ - buddyListMap::iterator iter = mBuddyListMap.find(&uri); - if(iter != mBuddyListMap.end()) - { - LL_DEBUGS("Voice") << "deleting buddy " << uri << LL_ENDL; - buddyListEntry *buddy = iter->second; - mBuddyListMap.erase(iter); - delete buddy; - } - else + if (it != mSpeakersData.end()) { - LL_DEBUGS("Voice") << "attempt to delete nonexistent buddy " << uri << LL_ENDL; - } - -} + volume = it->second; -void LLVoiceClient::deleteAllBuddies(void) -{ - while(!mBuddyListMap.empty()) - { - deleteBuddy(*(mBuddyListMap.begin()->first)); - } - - // Don't want to correlate with friends list when we've emptied the buddy list. - mBuddyListMapPopulated = false; - - // Don't want to correlate with friends list when we've reset the block rules. - mBlockRulesListReceived = false; - mAutoAcceptRulesListReceived = false; -} + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "Retrieved stored volume = " << volume << " for " << id << LL_ENDL; -void LLVoiceClient::deleteAllBlockRules(void) -{ - // Clear the block list entry flags from all local buddy list entries - buddyListMap::iterator buddy_it; - for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) - { - buddy_it->second->mHasBlockListEntry = false; + return true; } -} -void LLVoiceClient::deleteAllAutoAcceptRules(void) -{ - // Clear the auto-accept list entry flags from all local buddy list entries - buddyListMap::iterator buddy_it; - for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) - { - buddy_it->second->mHasAutoAcceptListEntry = false; - } + return false; } -void LLVoiceClient::addBlockRule(const std::string &blockMask, const std::string &presenceOnly) +void LLSpeakerVolumeStorage::removeSpeakerVolume(const LLUUID& speaker_id) { - buddyListEntry *buddy = NULL; - - // blockMask is the SIP URI of a friends list entry - buddyListMap::iterator iter = mBuddyListMap.find(&blockMask); - if(iter != mBuddyListMap.end()) - { - LL_DEBUGS("Voice") << "block list entry for " << blockMask << LL_ENDL; - buddy = iter->second; - } + mSpeakersData.erase(speaker_id); - if(buddy == NULL) - { - LL_DEBUGS("Voice") << "block list entry for unknown buddy " << blockMask << LL_ENDL; - buddy = addBuddy(blockMask); - } - - if(buddy != NULL) - { - buddy->mHasBlockListEntry = true; - } + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "Removing stored volume for " << id << LL_ENDL; } -void LLVoiceClient::addAutoAcceptRule(const std::string &autoAcceptMask, const std::string &autoAddAsBuddy) +/* static */ F32 LLSpeakerVolumeStorage::transformFromLegacyVolume(F32 volume_in) { - buddyListEntry *buddy = NULL; + // Convert to linear-logarithmic [0.0..1.0] with 0.5 = 0dB + // from legacy characteristic composed of two square-curves + // that intersect at volume_in = 0.5, volume_out = 0.56 - // blockMask is the SIP URI of a friends list entry - buddyListMap::iterator iter = mBuddyListMap.find(&autoAcceptMask); - if(iter != mBuddyListMap.end()) - { - LL_DEBUGS("Voice") << "auto-accept list entry for " << autoAcceptMask << LL_ENDL; - buddy = iter->second; - } + F32 volume_out = 0.f; + volume_in = llclamp(volume_in, 0.f, 1.0f); - if(buddy == NULL) + if (volume_in <= 0.5f) { - LL_DEBUGS("Voice") << "auto-accept list entry for unknown buddy " << autoAcceptMask << LL_ENDL; - buddy = addBuddy(autoAcceptMask); + volume_out = volume_in * volume_in * 4.f * 0.56f; } - - if(buddy != NULL) + else { - buddy->mHasAutoAcceptListEntry = true; + volume_out = (1.f - 0.56f) * (4.f * volume_in * volume_in - 1.f) / 3.f + 0.56f; } -} - -void LLVoiceClient::accountListBlockRulesResponse(int statusCode, const std::string &statusString) -{ - // Block list entries were updated via addBlockRule() during parsing. Just flag that we're done. - mBlockRulesListReceived = true; -} - -void LLVoiceClient::accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString) -{ - // Block list entries were updated via addBlockRule() during parsing. Just flag that we're done. - mAutoAcceptRulesListReceived = true; -} -void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) -{ - mParticipantObservers.insert(observer); -} - -void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) -{ - mParticipantObservers.erase(observer); -} - -void LLVoiceClient::notifyParticipantObservers() -{ - for (observer_set_t::iterator it = mParticipantObservers.begin(); - it != mParticipantObservers.end(); - ) - { - LLVoiceClientParticipantObserver* observer = *it; - observer->onChange(); - // In case onChange() deleted an entry. - it = mParticipantObservers.upper_bound(observer); - } + return volume_out; } -void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) +/* static */ F32 LLSpeakerVolumeStorage::transformToLegacyVolume(F32 volume_in) { - mStatusObservers.insert(observer); -} + // Convert from linear-logarithmic [0.0..1.0] with 0.5 = 0dB + // to legacy characteristic composed of two square-curves + // that intersect at volume_in = 0.56, volume_out = 0.5 -void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) -{ - mStatusObservers.erase(observer); -} + F32 volume_out = 0.f; + volume_in = llclamp(volume_in, 0.f, 1.0f); -void LLVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status) -{ - if(mAudioSession) + if (volume_in <= 0.56f) { - if(status == LLVoiceClientStatusObserver::ERROR_UNKNOWN) - { - switch(mAudioSession->mErrorStatusCode) - { - case 20713: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_FULL; break; - case 20714: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_LOCKED; break; - case 20715: - //invalid channel, we may be using a set of poorly cached - //info - status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; - break; - case 1009: - //invalid username and password - status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; - break; - } - - // Reset the error code to make sure it won't be reused later by accident. - mAudioSession->mErrorStatusCode = 0; - } - else if(status == LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL) - { - switch(mAudioSession->mErrorStatusCode) - { - case 404: // NOT_FOUND - case 480: // TEMPORARILY_UNAVAILABLE - case 408: // REQUEST_TIMEOUT - // call failed because other user was not available - // treat this as an error case - status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; - - // Reset the error code to make sure it won't be reused later by accident. - mAudioSession->mErrorStatusCode = 0; - break; - } - } + volume_out = sqrt(volume_in / (4.f * 0.56f)); } - - LL_DEBUGS("Voice") - << " " << LLVoiceClientStatusObserver::status2string(status) - << ", session URI " << getAudioSessionURI() - << (inSpatialChannel()?", proximal is true":", proximal is false") - << LL_ENDL; - - for (status_observer_set_t::iterator it = mStatusObservers.begin(); - it != mStatusObservers.end(); - ) + else { - LLVoiceClientStatusObserver* observer = *it; - observer->onChange(status, getAudioSessionURI(), inSpatialChannel()); - // In case onError() deleted an entry. - it = mStatusObservers.upper_bound(observer); + volume_out = sqrt((3.f * (volume_in - 0.56f) / (1.f - 0.56f) + 1.f) / 4.f); } + return volume_out; } -void LLVoiceClient::addObserver(LLFriendObserver* observer) -{ - mFriendObservers.insert(observer); -} - -void LLVoiceClient::removeObserver(LLFriendObserver* observer) -{ - mFriendObservers.erase(observer); -} - -void LLVoiceClient::notifyFriendObservers() +void LLSpeakerVolumeStorage::load() { - for (friend_observer_set_t::iterator it = mFriendObservers.begin(); - it != mFriendObservers.end(); - ) - { - LLFriendObserver* observer = *it; - it++; - // The only friend-related thing we notify on is online/offline transitions. - observer->changed(LLFriendObserver::ONLINE); - } -} + // load per-resident voice volume information + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SETTINGS_FILE_NAME); -void LLVoiceClient::lookupName(const LLUUID &id) -{ - BOOL is_group = FALSE; - gCacheName->get(id, is_group, &LLVoiceClient::onAvatarNameLookup); -} + LL_INFOS("Voice") << "Loading stored speaker volumes from: " << filename << LL_ENDL; -//static -void LLVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group) -{ - if(gVoiceClient) + LLSD settings_llsd; + llifstream file; + file.open(filename); + if (file.is_open()) { - std::string name = llformat("%s %s", first.c_str(), last.c_str()); - gVoiceClient->avatarNameResolved(id, name); + LLSDSerialize::fromXML(settings_llsd, file); } -} -void LLVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name) -{ - // If the avatar whose name just resolved is on our friends list, resync the friends list. - if(LLAvatarTracker::instance().getBuddyInfo(id) != NULL) - { - mFriendsListDirty = true; - } - - // Iterate over all sessions. - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); + iter != settings_llsd.endMap(); ++iter) { - sessionState *session = *iter; - - // Check for this user as a participant in this session - participantState *participant = session->findParticipantByID(id); - if(participant) - { - // Found -- fill in the name - participant->mAccountName = name; - // and post a "participants updated" message to listeners later. - session->mParticipantsChanged = true; - } - - // Check whether this is a p2p session whose caller name just resolved - if(session->mCallerID == id) - { - // this session's "caller ID" just resolved. Fill in the name. - session->mName = name; - if(session->mTextInvitePending) - { - session->mTextInvitePending = false; + // Maintain compatibility with 1.23 non-linear saved volume levels + F32 volume = transformFromLegacyVolume((F32)iter->second.asReal()); - // We don't need to call gIMMgr->addP2PSession() here. The first incoming message will create the panel. - } - if(session->mVoiceInvitePending) - { - session->mVoiceInvitePending = false; - - gIMMgr->inviteToSession( - session->mIMSessionID, - session->mName, - session->mCallerID, - session->mName, - IM_SESSION_P2P_INVITE, - LLIMMgr::INVITATION_TYPE_VOICE, - session->mHandle, - session->mSIPURI); - } - - } + storeSpeakerVolume(LLUUID(iter->first), volume); } } -class LLViewerParcelVoiceInfo : public LLHTTPNode +void LLSpeakerVolumeStorage::save() { - virtual void post( - LLHTTPNode::ResponsePtr response, - const LLSD& context, - const LLSD& input) const + // If we quit from the login screen we will not have an SL account + // name. Don't try to save, otherwise we'll dump a file in + // C:\Program Files\SecondLife\ or similar. JC + std::string user_dir = gDirUtilp->getLindenUserDir(); + if (!user_dir.empty()) { - //the parcel you are in has changed something about its - //voice information - - //this is a misnomer, as it can also be when you are not in - //a parcel at all. Should really be something like - //LLViewerVoiceInfoChanged..... - if ( input.has("body") ) - { - LLSD body = input["body"]; - - //body has "region_name" (str), "parcel_local_id"(int), - //"voice_credentials" (map). - - //body["voice_credentials"] has "channel_uri" (str), - //body["voice_credentials"] has "channel_credentials" (str) - - //if we really wanted to be extra careful, - //we'd check the supplied - //local parcel id to make sure it's for the same parcel - //we believe we're in - if ( body.has("voice_credentials") ) - { - LLSD voice_credentials = body["voice_credentials"]; - std::string uri; - std::string credentials; - - if ( voice_credentials.has("channel_uri") ) - { - uri = voice_credentials["channel_uri"].asString(); - } - if ( voice_credentials.has("channel_credentials") ) - { - credentials = - voice_credentials["channel_credentials"].asString(); - } + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SETTINGS_FILE_NAME); + LLSD settings_llsd; - gVoiceClient->setSpatialChannel(uri, credentials); - } - } - } -}; + LL_INFOS("Voice") << "Saving stored speaker volumes to: " << filename << LL_ENDL; -class LLViewerRequiredVoiceVersion : public LLHTTPNode -{ - static BOOL sAlertedUser; - virtual void post( - LLHTTPNode::ResponsePtr response, - const LLSD& context, - const LLSD& input) const - { - //You received this messsage (most likely on region cross or - //teleport) - if ( input.has("body") && input["body"].has("major_version") ) + for(speaker_data_map_t::const_iterator iter = mSpeakersData.begin(); iter != mSpeakersData.end(); ++iter) { - int major_voice_version = - input["body"]["major_version"].asInteger(); -// int minor_voice_version = -// input["body"]["minor_version"].asInteger(); + // Maintain compatibility with 1.23 non-linear saved volume levels + F32 volume = transformToLegacyVolume(iter->second); - if (gVoiceClient && - (major_voice_version > VOICE_MAJOR_VERSION) ) - { - if (!sAlertedUser) - { - //sAlertedUser = TRUE; - LLNotificationsUtil::add("VoiceVersionMismatch"); - gSavedSettings.setBOOL("EnableVoiceChat", FALSE); // toggles listener - } - } + settings_llsd[iter->first.asString()] = volume; } + + llofstream file; + file.open(filename); + LLSDSerialize::toPrettyXML(settings_llsd, file); } -}; +} + BOOL LLViewerRequiredVoiceVersion::sAlertedUser = FALSE; LLHTTPRegistration<LLViewerParcelVoiceInfo> - gHTTPRegistrationMessageParcelVoiceInfo( - "/message/ParcelVoiceInfo"); +gHTTPRegistrationMessageParcelVoiceInfo( + "/message/ParcelVoiceInfo"); LLHTTPRegistration<LLViewerRequiredVoiceVersion> - gHTTPRegistrationMessageRequiredVoiceVersion( - "/message/RequiredVoiceVersion"); +gHTTPRegistrationMessageRequiredVoiceVersion( + "/message/RequiredVoiceVersion"); diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index a29c386182..e08fed7ae9 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -17,8 +17,7 @@ * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -33,7 +32,6 @@ #define LL_VOICE_CLIENT_H class LLVOAvatar; -class LLVivoxProtocolParser; #include "lliopipe.h" #include "llpumpio.h" @@ -42,9 +40,14 @@ class LLVivoxProtocolParser; #include "v3math.h" #include "llframetimer.h" #include "llviewerregion.h" -#include "m3math.h" // LLMatrix3 +#include "llcallingcard.h" // for LLFriendObserver +#include "llsecapi.h" + +// devices + +typedef std::vector<std::string> LLVoiceDeviceList; + -class LLFriendObserver; class LLVoiceClientParticipantObserver { public: @@ -52,6 +55,9 @@ public: virtual void onChange() = 0; }; + +/////////////////////////////////// +/// @class LLVoiceClientStatusObserver class LLVoiceClientStatusObserver { public: @@ -65,11 +71,7 @@ public: STATUS_JOINED, STATUS_LEFT_CHANNEL, STATUS_VOICE_DISABLED, - - // Adding STATUS_VOICE_ENABLED as pair status for STATUS_VOICE_DISABLED - // See LLVoiceClient::setVoiceEnabled() STATUS_VOICE_ENABLED, - BEGIN_ERROR_STATUS, ERROR_CHANNEL_FULL, ERROR_CHANNEL_LOCKED, @@ -83,699 +85,379 @@ public: static std::string status2string(EStatusType inStatus); }; -class LLVoiceClient: public LLSingleton<LLVoiceClient> +struct LLVoiceVersionInfo { - LOG_CLASS(LLVoiceClient); - public: - LLVoiceClient(); - ~LLVoiceClient(); - - public: - static void init(LLPumpIO *pump); // Call this once at application startup (creates connector) - static void terminate(); // Call this to clean up during shutdown - - protected: - bool writeString(const std::string &str); - - public: - - static F32 OVERDRIVEN_POWER_LEVEL; + std::string serverType; + std::string serverVersion; +}; - static const F32 VOLUME_MIN; - static const F32 VOLUME_DEFAULT; - static const F32 VOLUME_MAX; +////////////////////////////////// +/// @class LLVoiceModuleInterface +/// @brief Voice module interface +/// +/// Voice modules should provide an implementation for this interface. +///////////////////////////////// - void updateSettings(); // call after loading settings and whenever they change +class LLVoiceModuleInterface +{ +public: + LLVoiceModuleInterface() {} + virtual ~LLVoiceModuleInterface() {} - void getCaptureDevicesSendMessage(); - void getRenderDevicesSendMessage(); - - void clearCaptureDevices(); - void addCaptureDevice(const std::string& name); - void setCaptureDevice(const std::string& name); - - void clearRenderDevices(); - void addRenderDevice(const std::string& name); - void setRenderDevice(const std::string& name); - - void tuningStart(); - void tuningStop(); - bool inTuningMode(); - bool inTuningStates(); - - void tuningRenderStartSendMessage(const std::string& name, bool loop); - void tuningRenderStopSendMessage(); - - void tuningCaptureStartSendMessage(int duration); - void tuningCaptureStopSendMessage(); - - void tuningSetMicVolume(float volume); - void tuningSetSpeakerVolume(float volume); - float tuningGetEnergy(void); - - // This returns true when it's safe to bring up the "device settings" dialog in the prefs. - // i.e. when the daemon is running and connected, and the device lists are populated. - bool deviceSettingsAvailable(); - - // Requery the vivox daemon for the current list of input/output devices. - // If you pass true for clearCurrentList, deviceSettingsAvailable() will be false until the query has completed - // (use this if you want to know when it's done). - // If you pass false, you'll have no way to know when the query finishes, but the device lists will not appear empty in the interim. - void refreshDeviceLists(bool clearCurrentList = true); - - // Call this if the connection to the daemon terminates unexpectedly. It will attempt to reset everything and relaunch. - void daemonDied(); - - // Call this if we're just giving up on voice (can't provision an account, etc.). It will clean up and go away. - void giveUp(); - - ///////////////////////////// - // Response/Event handlers - void connectorCreateResponse(int statusCode, std::string &statusString, std::string &connectorHandle, std::string &versionID); - void loginResponse(int statusCode, std::string &statusString, std::string &accountHandle, int numberOfAliases); - void sessionCreateResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle); - void sessionGroupAddSessionResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle); - void sessionConnectResponse(std::string &requestId, int statusCode, std::string &statusString); - void logoutResponse(int statusCode, std::string &statusString); - void connectorShutdownResponse(int statusCode, std::string &statusString); - - void accountLoginStateChangeEvent(std::string &accountHandle, int statusCode, std::string &statusString, int state); - void mediaStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, int statusCode, std::string &statusString, int state, bool incoming); - void textStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, bool enabled, int state, bool incoming); - void sessionAddedEvent(std::string &uriString, std::string &alias, std::string &sessionHandle, std::string &sessionGroupHandle, bool isChannel, bool incoming, std::string &nameString, std::string &applicationString); - void sessionGroupAddedEvent(std::string &sessionGroupHandle); - void sessionRemovedEvent(std::string &sessionHandle, std::string &sessionGroupHandle); - void participantAddedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, std::string &nameString, std::string &displayNameString, int participantType); - void participantRemovedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, std::string &nameString); - void participantUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, bool isModeratorMuted, bool isSpeaking, int volume, F32 energy); - void auxAudioPropertiesEvent(F32 energy); - void buddyPresenceEvent(std::string &uriString, std::string &alias, std::string &statusString, std::string &applicationString); - void messageEvent(std::string &sessionHandle, std::string &uriString, std::string &alias, std::string &messageHeader, std::string &messageBody, std::string &applicationString); - void sessionNotificationEvent(std::string &sessionHandle, std::string &uriString, std::string ¬ificationType); - void subscriptionEvent(std::string &buddyURI, std::string &subscriptionHandle, std::string &alias, std::string &displayName, std::string &applicationString, std::string &subscriptionType); - - void buddyListChanged(); - void muteListChanged(); - void updateFriends(U32 mask); - - ///////////////////////////// - // Sending updates of current state -static void updatePosition(void); - void setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); - void setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); - bool channelFromRegion(LLViewerRegion *region, std::string &name); - void leaveChannel(void); // call this on logout or teleport begin - - - void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. - bool getMuteMic() const; - void setUserPTTState(bool ptt); - bool getUserPTTState(); - void toggleUserPTTState(void); - void inputUserControlState(bool down); // interpret any sort of up-down mic-open control input according to ptt-toggle prefs - void setVoiceEnabled(bool enabled); - static bool voiceEnabled(); - // Checks is voice working judging from mState - // Returns true if vivox has successfully logged in and is not in error state - bool voiceWorking(); - void setUsePTT(bool usePTT); - void setPTTIsToggle(bool PTTIsToggle); - bool getPTTIsToggle(); - void setPTTKey(std::string &key); - void setEarLocation(S32 loc); - void setVoiceVolume(F32 volume); - void setMicGain(F32 volume); - void setUserVolume(const LLUUID& id, F32 volume); // sets volume for specified agent, from 0-1 (where .5 is nominal) - void setLipSyncEnabled(BOOL enabled); - BOOL lipSyncEnabled(); - - // PTT key triggering - void keyDown(KEY key, MASK mask); - void keyUp(KEY key, MASK mask); - void middleMouseState(bool down); - - // Return the version of the Vivox library - std::string getAPIVersion() const { return mAPIVersion; } - - ///////////////////////////// - // Accessors for data related to nearby speakers - BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar - BOOL getIsSpeaking(const LLUUID& id); - BOOL getIsModeratorMuted(const LLUUID& id); - F32 getCurrentPower(const LLUUID& id); // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... - BOOL getOnMuteList(const LLUUID& id); - F32 getUserVolume(const LLUUID& id); - std::string getDisplayName(const LLUUID& id); - - // MBW -- XXX -- Not sure how to get this data out of the TVC - BOOL getUsingPTT(const LLUUID& id); - std::string getGroupID(const LLUUID& id); // group ID if the user is in group chat (empty string if not applicable) - - ///////////////////////////// - BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. - // Use this to determine whether to show a "no speech" icon in the menu bar. - - ///////////////////////////// - // Recording controls - void recordingLoopStart(int seconds = 3600, int deltaFramesPerControlFrame = 200); - void recordingLoopSave(const std::string& filename); - void recordingStop(); - - // Playback controls - void filePlaybackStart(const std::string& filename); - void filePlaybackStop(); - void filePlaybackSetPaused(bool paused); - void filePlaybackSetMode(bool vox = false, float speed = 1.0f); - - - // This is used by the string-keyed maps below, to avoid storing the string twice. - // The 'const std::string *' in the key points to a string actually stored in the object referenced by the map. - // The add and delete operations for each map allocate and delete in the right order to avoid dangling references. - // The default compare operation would just compare pointers, which is incorrect, so they must use this comparitor instead. - struct stringMapComparitor - { - bool operator()(const std::string* a, const std::string * b) const - { - return a->compare(*b) < 0; - } - }; - - struct uuidMapComparitor - { - bool operator()(const LLUUID* a, const LLUUID * b) const - { - return *a < *b; - } - }; - - struct participantState - { - public: - participantState(const std::string &uri); - - bool updateMuteState(); // true if mute state has changed - bool isAvatar(); - - std::string mURI; - LLUUID mAvatarID; - std::string mAccountName; - std::string mDisplayName; - LLFrameTimer mSpeakingTimeout; - F32 mLastSpokeTimestamp; - F32 mPower; - F32 mVolume; - std::string mGroupID; - bool mPTT; - bool mIsSpeaking; - bool mIsModeratorMuted; - bool mOnMuteList; // true if this avatar is on the user's mute list (and should be muted) - bool mVolumeSet; // true if incoming volume messages should not change the volume - bool mVolumeDirty; // true if this participant needs a volume command sent (either mOnMuteList or mUserVolume has changed) - bool mAvatarIDValid; - bool mIsSelf; - }; - typedef std::map<const std::string *, participantState*, stringMapComparitor> participantMap; - - typedef std::map<const LLUUID *, participantState*, uuidMapComparitor> participantUUIDMap; - - enum streamState - { - streamStateUnknown = 0, - streamStateIdle = 1, - streamStateConnected = 2, - streamStateRinging = 3, - }; - - struct sessionState - { - public: - sessionState(); - ~sessionState(); - - participantState *addParticipant(const std::string &uri); - // Note: after removeParticipant returns, the participant* that was passed to it will have been deleted. - // Take care not to use the pointer again after that. - void removeParticipant(participantState *participant); - void removeAllParticipants(); - - participantState *findParticipant(const std::string &uri); - participantState *findParticipantByID(const LLUUID& id); - - bool isCallBackPossible(); - bool isTextIMPossible(); - - std::string mHandle; - std::string mGroupHandle; - std::string mSIPURI; - std::string mAlias; - std::string mName; - std::string mAlternateSIPURI; - std::string mHash; // Channel password - std::string mErrorStatusString; - std::queue<std::string> mTextMsgQueue; - - LLUUID mIMSessionID; - LLUUID mCallerID; - int mErrorStatusCode; - int mMediaStreamState; - int mTextStreamState; - bool mCreateInProgress; // True if a Session.Create has been sent for this session and no response has been received yet. - bool mMediaConnectInProgress; // True if a Session.MediaConnect has been sent for this session and no response has been received yet. - bool mVoiceInvitePending; // True if a voice invite is pending for this session (usually waiting on a name lookup) - bool mTextInvitePending; // True if a text invite is pending for this session (usually waiting on a name lookup) - bool mSynthesizedCallerID; // True if the caller ID is a hash of the SIP URI -- this means we shouldn't do a name lookup. - bool mIsChannel; // True for both group and spatial channels (false for p2p, PSTN) - bool mIsSpatial; // True for spatial channels - bool mIsP2P; - bool mIncoming; - bool mVoiceEnabled; - bool mReconnect; // Whether we should try to reconnect to this session if it's dropped - // Set to true when the mute state of someone in the participant list changes. - // The code will have to walk the list to find the changed participant(s). - bool mVolumeDirty; - bool mMuteDirty; - - bool mParticipantsChanged; - participantMap mParticipantsByURI; - participantUUIDMap mParticipantsByUUID; - }; - - participantState *findParticipantByID(const LLUUID& id); - participantMap *getParticipantList(void); - void getParticipantsUUIDSet(std::set<LLUUID>& participant_uuids); - - typedef std::map<const std::string*, sessionState*, stringMapComparitor> sessionMap; - typedef std::set<sessionState*> sessionSet; - - typedef sessionSet::iterator sessionIterator; - sessionIterator sessionsBegin(void); - sessionIterator sessionsEnd(void); - - sessionState *findSession(const std::string &handle); - sessionState *findSessionBeingCreatedByURI(const std::string &uri); - sessionState *findSession(const LLUUID &participant_id); - sessionState *findSessionByCreateID(const std::string &create_id); - - sessionState *addSession(const std::string &uri, const std::string &handle = LLStringUtil::null); - void setSessionHandle(sessionState *session, const std::string &handle = LLStringUtil::null); - void setSessionURI(sessionState *session, const std::string &uri); - void deleteSession(sessionState *session); - void deleteAllSessions(void); + virtual void init(LLPumpIO *pump)=0; // Call this once at application startup (creates connector) + virtual void terminate()=0; // Call this to clean up during shutdown + + virtual void updateSettings()=0; // call after loading settings and whenever they change + + virtual bool isVoiceWorking()=0; // connected to a voice server and voice channel - void verifySessionState(void); + virtual const LLVoiceVersionInfo& getVersion()=0; + + ///////////////////// + /// @name Tuning + //@{ + virtual void tuningStart()=0; + virtual void tuningStop()=0; + virtual bool inTuningMode()=0; + + virtual void tuningSetMicVolume(float volume)=0; + virtual void tuningSetSpeakerVolume(float volume)=0; + virtual float tuningGetEnergy(void)=0; + //@} + + ///////////////////// + /// @name Devices + //@{ + // This returns true when it's safe to bring up the "device settings" dialog in the prefs. + // i.e. when the daemon is running and connected, and the device lists are populated. + virtual bool deviceSettingsAvailable()=0; + + // Requery the vivox daemon for the current list of input/output devices. + // If you pass true for clearCurrentList, deviceSettingsAvailable() will be false until the query has completed + // (use this if you want to know when it's done). + // If you pass false, you'll have no way to know when the query finishes, but the device lists will not appear empty in the interim. + virtual void refreshDeviceLists(bool clearCurrentList = true)=0; + + virtual void setCaptureDevice(const std::string& name)=0; + virtual void setRenderDevice(const std::string& name)=0; + + virtual LLVoiceDeviceList& getCaptureDevices()=0; + virtual LLVoiceDeviceList& getRenderDevices()=0; + + virtual void getParticipantList(std::set<LLUUID> &participants)=0; + virtual bool isParticipant(const LLUUID& speaker_id)=0; + //@} + + //////////////////////////// + /// @ name Channel stuff + //@{ + // returns true iff the user is currently in a proximal (local spatial) channel. + // Note that gestures should only fire if this returns true. + virtual bool inProximalChannel()=0; + + virtual void setNonSpatialChannel(const std::string &uri, + const std::string &credentials)=0; + + virtual void setSpatialChannel(const std::string &uri, + const std::string &credentials)=0; + + virtual void leaveNonSpatialChannel()=0; + + virtual void leaveChannel(void)=0; + + // Returns the URI of the current channel, or an empty string if not currently in a channel. + // NOTE that it will return an empty string if it's in the process of joining a channel. + virtual std::string getCurrentChannel()=0; + //@} + + + ////////////////////////// + /// @name invitations + //@{ + // start a voice channel with the specified user + virtual void callUser(const LLUUID &uuid)=0; + virtual bool isValidChannel(std::string& channelHandle)=0; + virtual bool answerInvite(std::string &channelHandle)=0; + virtual void declineInvite(std::string &channelHandle)=0; + //@} + + ///////////////////////// + /// @name Volume/gain + //@{ + virtual void setVoiceVolume(F32 volume)=0; + virtual void setMicGain(F32 volume)=0; + //@} + + ///////////////////////// + /// @name enable disable voice and features + //@{ + virtual bool voiceEnabled()=0; + virtual void setVoiceEnabled(bool enabled)=0; + virtual void setLipSyncEnabled(BOOL enabled)=0; + virtual BOOL lipSyncEnabled()=0; + virtual void setMuteMic(bool muted)=0; // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. + //@} + + //////////////////////// + /// @name PTT + //@{ + virtual void setUserPTTState(bool ptt)=0; + virtual bool getUserPTTState()=0; + virtual void setUsePTT(bool usePTT)=0; + virtual void setPTTIsToggle(bool PTTIsToggle)=0; + virtual bool getPTTIsToggle()=0; + virtual void toggleUserPTTState(void)=0; + virtual void inputUserControlState(bool down)=0; // interpret any sort of up-down mic-open control input according to ptt-toggle prefs + + virtual void keyDown(KEY key, MASK mask)=0; + virtual void keyUp(KEY key, MASK mask)=0; + virtual void middleMouseState(bool down)=0; + //@} + + ////////////////////////// + /// @name nearby speaker accessors + //@{ + + + virtual BOOL getVoiceEnabled(const LLUUID& id)=0; // true if we've received data for this avatar + virtual std::string getDisplayName(const LLUUID& id)=0; + virtual BOOL isOnlineSIP(const LLUUID &id)=0; + virtual BOOL isParticipantAvatar(const LLUUID &id)=0; + virtual BOOL getIsSpeaking(const LLUUID& id)=0; + virtual BOOL getIsModeratorMuted(const LLUUID& id)=0; + virtual F32 getCurrentPower(const LLUUID& id)=0; // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... + virtual BOOL getOnMuteList(const LLUUID& id)=0; + virtual F32 getUserVolume(const LLUUID& id)=0; + virtual void setUserVolume(const LLUUID& id, F32 volume)=0; // set's volume for specified agent, from 0-1 (where .5 is nominal) + //@} + + ////////////////////////// + /// @name text chat + //@{ + virtual BOOL isSessionTextIMPossible(const LLUUID& id)=0; + virtual BOOL isSessionCallBackPossible(const LLUUID& id)=0; + virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message)=0; + virtual void endUserIMSession(const LLUUID &uuid)=0; + //@} + + // authorize the user + virtual void userAuthorized(const std::string& user_id, + const LLUUID &agentID)=0; + + ////////////////////////////// + /// @name Status notification + //@{ + virtual void addObserver(LLVoiceClientStatusObserver* observer)=0; + virtual void removeObserver(LLVoiceClientStatusObserver* observer)=0; + virtual void addObserver(LLFriendObserver* observer)=0; + virtual void removeObserver(LLFriendObserver* observer)=0; + virtual void addObserver(LLVoiceClientParticipantObserver* observer)=0; + virtual void removeObserver(LLVoiceClientParticipantObserver* observer)=0; + //@} + + virtual std::string sipURIFromID(const LLUUID &id)=0; + //@} + +}; - void joinedAudioSession(sessionState *session); - void leftAudioSession(sessionState *session); - // This is called in several places where the session _may_ need to be deleted. - // It contains logic for whether to delete the session or keep it around. - void reapSession(sessionState *session); - - // Returns true if the session seems to indicate we've moved to a region on a different voice server - bool sessionNeedsRelog(sessionState *session); - - struct buddyListEntry - { - buddyListEntry(const std::string &uri); - std::string mURI; - std::string mDisplayName; - LLUUID mUUID; - bool mOnlineSL; - bool mOnlineSLim; - bool mCanSeeMeOnline; - bool mHasBlockListEntry; - bool mHasAutoAcceptListEntry; - bool mNameResolved; - bool mInSLFriends; - bool mInVivoxBuddies; - bool mNeedsNameUpdate; - }; - - typedef std::map<const std::string*, buddyListEntry*, stringMapComparitor> buddyListMap; - - // This should be called when parsing a buddy list entry sent by SLVoice. - void processBuddyListEntry(const std::string &uri, const std::string &displayName); - - buddyListEntry *addBuddy(const std::string &uri); - buddyListEntry *addBuddy(const std::string &uri, const std::string &displayName); - buddyListEntry *findBuddy(const std::string &uri); - buddyListEntry *findBuddy(const LLUUID &id); - buddyListEntry *findBuddyByDisplayName(const std::string &name); - void deleteBuddy(const std::string &uri); - void deleteAllBuddies(void); - - void deleteAllBlockRules(void); - void addBlockRule(const std::string &blockMask, const std::string &presenceOnly); - void deleteAllAutoAcceptRules(void); - void addAutoAcceptRule(const std::string &autoAcceptMask, const std::string &autoAddAsBuddy); - void accountListBlockRulesResponse(int statusCode, const std::string &statusString); - void accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString); - - ///////////////////////////// - // session control messages - void connectorCreate(); - void connectorShutdown(); - - void requestVoiceAccountProvision(S32 retries = 3); - void userAuthorized( - const std::string& firstName, - const std::string& lastName, - const LLUUID &agentID); - void login( - const std::string& account_name, - const std::string& password, - const std::string& voice_sip_uri_hostname, - const std::string& voice_account_server_uri); - void loginSendMessage(); - void logout(); - void logoutSendMessage(); - - void accountListBlockRulesSendMessage(); - void accountListAutoAcceptRulesSendMessage(); - - void sessionGroupCreateSendMessage(); - void sessionCreateSendMessage(sessionState *session, bool startAudio = true, bool startText = false); - void sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio = true, bool startText = false); - void sessionMediaConnectSendMessage(sessionState *session); // just joins the audio session - void sessionTextConnectSendMessage(sessionState *session); // just joins the text session - void sessionTerminateSendMessage(sessionState *session); - void sessionGroupTerminateSendMessage(sessionState *session); - void sessionMediaDisconnectSendMessage(sessionState *session); - void sessionTextDisconnectSendMessage(sessionState *session); - - // Pokes the state machine to leave the audio session next time around. - void sessionTerminate(); - - // Pokes the state machine to shut down the connector and restart it. - void requestRelog(); - - // Does the actual work to get out of the audio session - void leaveAudioSession(); - - void addObserver(LLVoiceClientParticipantObserver* observer); - void removeObserver(LLVoiceClientParticipantObserver* observer); +class LLVoiceClient: public LLSingleton<LLVoiceClient> +{ + LOG_CLASS(LLVoiceClient); +public: + LLVoiceClient(); + ~LLVoiceClient(); - void addObserver(LLVoiceClientStatusObserver* observer); - void removeObserver(LLVoiceClientStatusObserver* observer); + void init(LLPumpIO *pump); // Call this once at application startup (creates connector) + void terminate(); // Call this to clean up during shutdown + + const LLVoiceVersionInfo getVersion(); + + static const F32 OVERDRIVEN_POWER_LEVEL; - void addObserver(LLFriendObserver* observer); - void removeObserver(LLFriendObserver* observer); - - void lookupName(const LLUUID &id); - static void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); - void avatarNameResolved(const LLUUID &id, const std::string &name); - - typedef std::vector<std::string> deviceList; + static const F32 VOLUME_MIN; + static const F32 VOLUME_DEFAULT; + static const F32 VOLUME_MAX; - deviceList *getCaptureDevices(); - deviceList *getRenderDevices(); - - void setNonSpatialChannel( - const std::string &uri, - const std::string &credentials); - void setSpatialChannel( - const std::string &uri, - const std::string &credentials); - // start a voice session with the specified user - void callUser(const LLUUID &uuid); - - // Send a text message to the specified user, initiating the session if necessary. - bool sendTextMessage(const LLUUID& participant_id, const std::string& message); - - // close any existing text IM session with the specified user - void endUserIMSession(const LLUUID &uuid); - - bool answerInvite(std::string &sessionHandle); - void declineInvite(std::string &sessionHandle); - void leaveNonSpatialChannel(); + void updateSettings(); // call after loading settings and whenever they change - // Returns the URI of the current channel, or an empty string if not currently in a channel. - // NOTE that it will return an empty string if it's in the process of joining a channel. - std::string getCurrentChannel(); - - // returns true iff the user is currently in a proximal (local spatial) channel. - // Note that gestures should only fire if this returns true. - bool inProximalChannel(); + bool isVoiceWorking(); // connected to a voice server and voice channel - std::string sipURIFromID(const LLUUID &id); - - // Returns true if the indicated user is online via SIP presence according to SLVoice. - // Note that we only get SIP presence data for other users that are in our vivox buddy list. - bool isOnlineSIP(const LLUUID &id); - - // Returns true if the indicated participant is really an SL avatar. - // This should be used to control the state of the "profile" button. - // Currently this will be false only for PSTN callers into group chats, and PSTN p2p calls. - bool isParticipantAvatar(const LLUUID &id); - - // Returns true if calling back the session URI after the session has closed is possible. - // Currently this will be false only for PSTN P2P calls. - // NOTE: this will return true if the session can't be found. - bool isSessionCallBackPossible(const LLUUID &session_id); - - // Returns true if the session can accepte text IM's. - // Currently this will be false only for PSTN P2P calls. - // NOTE: this will return true if the session can't be found. - bool isSessionTextIMPossible(const LLUUID &session_id); - - private: - - // internal state for a simple state machine. This is used to deal with the asynchronous nature of some of the messages. - // Note: if you change this list, please make corresponding changes to LLVoiceClient::state2string(). - enum state - { - stateDisableCleanup, - stateDisabled, // Voice is turned off. - stateStart, // Class is initialized, socket is created - stateDaemonLaunched, // Daemon has been launched - stateConnecting, // connect() call has been issued - stateConnected, // connection to the daemon has been made, send some initial setup commands. - stateIdle, // socket is connected, ready for messaging - stateMicTuningStart, - stateMicTuningRunning, - stateMicTuningStop, - stateConnectorStart, // connector needs to be started - stateConnectorStarting, // waiting for connector handle - stateConnectorStarted, // connector handle received - stateLoginRetry, // need to retry login (failed due to changing password) - stateLoginRetryWait, // waiting for retry timer - stateNeedsLogin, // send login request - stateLoggingIn, // waiting for account handle - stateLoggedIn, // account handle received - stateCreatingSessionGroup, // Creating the main session group - stateNoChannel, // - stateJoiningSession, // waiting for session handle - stateSessionJoined, // session handle received - stateRunning, // in session, steady state - stateLeavingSession, // waiting for terminate session response - stateSessionTerminated, // waiting for terminate session response - - stateLoggingOut, // waiting for logout response - stateLoggedOut, // logout response received - stateConnectorStopping, // waiting for connector stop - stateConnectorStopped, // connector stop received - - // We go to this state if the login fails because the account needs to be provisioned. - - // error states. No way to recover from these yet. - stateConnectorFailed, - stateConnectorFailedWaiting, - stateLoginFailed, - stateLoginFailedWaiting, - stateJoinSessionFailed, - stateJoinSessionFailedWaiting, - - stateJail // Go here when all else has failed. Nothing will be retried, we're done. - }; + // tuning + void tuningStart(); + void tuningStop(); + bool inTuningMode(); - state mState; - bool mSessionTerminateRequested; - bool mRelogRequested; - // Number of times (in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine(). - // The larger it is the greater is possibility there is a problem with connection to voice server. - // Introduced while fixing EXT-4313. - int mSpatialJoiningNum; - - void setState(state inState); - state getState(void) { return mState; }; - static std::string state2string(state inState); - - void stateMachine(); - static void idle(void *user_data); - - LLHost mDaemonHost; - LLSocket::ptr_t mSocket; - bool mConnected; - - void closeSocket(void); - - LLPumpIO *mPump; - friend class LLVivoxProtocolParser; - - std::string mAccountName; - std::string mAccountPassword; - std::string mAccountDisplayName; - std::string mAccountFirstName; - std::string mAccountLastName; + void tuningSetMicVolume(float volume); + void tuningSetSpeakerVolume(float volume); + float tuningGetEnergy(void); - bool mTuningMode; - float mTuningEnergy; - std::string mTuningAudioFile; - int mTuningMicVolume; - bool mTuningMicVolumeDirty; - int mTuningSpeakerVolume; - bool mTuningSpeakerVolumeDirty; - state mTuningExitState; // state to return to when we leave tuning mode. + // devices + + // This returns true when it's safe to bring up the "device settings" dialog in the prefs. + // i.e. when the daemon is running and connected, and the device lists are populated. + bool deviceSettingsAvailable(); - std::string mSpatialSessionURI; - std::string mSpatialSessionCredentials; + // Requery the vivox daemon for the current list of input/output devices. + // If you pass true for clearCurrentList, deviceSettingsAvailable() will be false until the query has completed + // (use this if you want to know when it's done). + // If you pass false, you'll have no way to know when the query finishes, but the device lists will not appear empty in the interim. + void refreshDeviceLists(bool clearCurrentList = true); - std::string mMainSessionGroupHandle; // handle of the "main" session group. - - std::string mChannelName; // Name of the channel to be looked up - bool mAreaVoiceDisabled; - sessionState *mAudioSession; // Session state for the current audio session - bool mAudioSessionChanged; // set to true when the above pointer gets changed, so observers can be notified. + void setCaptureDevice(const std::string& name); + void setRenderDevice(const std::string& name); - sessionState *mNextAudioSession; // Session state for the audio session we're trying to join + const LLVoiceDeviceList& getCaptureDevices(); + const LLVoiceDeviceList& getRenderDevices(); -// std::string mSessionURI; // URI of the session we're in. -// std::string mSessionHandle; // returned by ? - - S32 mCurrentParcelLocalID; // Used to detect parcel boundary crossings - std::string mCurrentRegionName; // Used to detect parcel boundary crossings - - std::string mConnectorHandle; // returned by "Create Connector" message - std::string mAccountHandle; // returned by login message - int mNumberOfAliases; - U32 mCommandCookie; + //////////////////////////// + // Channel stuff + // + + // returns true iff the user is currently in a proximal (local spatial) channel. + // Note that gestures should only fire if this returns true. + bool inProximalChannel(); + void setNonSpatialChannel( + const std::string &uri, + const std::string &credentials); + void setSpatialChannel( + const std::string &uri, + const std::string &credentials); + void leaveNonSpatialChannel(); + + // Returns the URI of the current channel, or an empty string if not currently in a channel. + // NOTE that it will return an empty string if it's in the process of joining a channel. + std::string getCurrentChannel(); + // start a voice channel with the specified user + void callUser(const LLUUID &uuid); + bool isValidChannel(std::string& channelHandle); + bool answerInvite(std::string &channelHandle); + void declineInvite(std::string &channelHandle); + void leaveChannel(void); // call this on logout or teleport begin + + + ///////////////////////////// + // Sending updates of current state - std::string mVoiceAccountServerURI; - std::string mVoiceSIPURIHostName; - - int mLoginRetryCount; - - sessionMap mSessionsByHandle; // Active sessions, indexed by session handle. Sessions which are being initiated may not be in this map. - sessionSet mSessions; // All sessions, not indexed. This is the canonical session list. - - bool mBuddyListMapPopulated; - bool mBlockRulesListReceived; - bool mAutoAcceptRulesListReceived; - buddyListMap mBuddyListMap; - - deviceList mCaptureDevices; - deviceList mRenderDevices; - - std::string mCaptureDevice; - std::string mRenderDevice; - bool mCaptureDeviceDirty; - bool mRenderDeviceDirty; - - // This should be called when the code detects we have changed parcels. - // It initiates the call to the server that gets the parcel channel. - void parcelChanged(); - - void switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = ""); - void joinSession(sessionState *session); - -static std::string nameFromAvatar(LLVOAvatar *avatar); -static std::string nameFromID(const LLUUID &id); -static bool IDFromName(const std::string name, LLUUID &uuid); -static std::string displayNameFromAvatar(LLVOAvatar *avatar); - std::string sipURIFromAvatar(LLVOAvatar *avatar); - std::string sipURIFromName(std::string &name); - - // Returns the name portion of the SIP URI if the string looks vaguely like a SIP URI, or an empty string if not. -static std::string nameFromsipURI(const std::string &uri); - bool inSpatialChannel(void); - std::string getAudioSessionURI(); - std::string getAudioSessionHandle(); - - void sendPositionalUpdate(void); - - void buildSetCaptureDevice(std::ostringstream &stream); - void buildSetRenderDevice(std::ostringstream &stream); - void buildLocalAudioUpdates(std::ostringstream &stream); - - void clearAllLists(); - void checkFriend(const LLUUID& id); - void sendFriendsListUpdates(); - - // start a text IM session with the specified user - // This will be asynchronous, the session may be established at a future time. - sessionState* startUserIMSession(const LLUUID& uuid); - void sendQueuedTextMessages(sessionState *session); - - void enforceTether(void); - - bool mSpatialCoordsDirty; - - LLVector3d mCameraPosition; - LLVector3d mCameraRequestedPosition; - LLVector3 mCameraVelocity; - LLMatrix3 mCameraRot; - - LLVector3d mAvatarPosition; - LLVector3 mAvatarVelocity; - LLMatrix3 mAvatarRot; - - bool mPTTDirty; - bool mPTT; - - bool mUsePTT; - bool mPTTIsMiddleMouse; - KEY mPTTKey; - bool mPTTIsToggle; - bool mUserPTTState; - bool mMuteMic; - - // Set to true when the friends list is known to have changed. - bool mFriendsListDirty; - - enum - { - earLocCamera = 0, // ear at camera - earLocAvatar, // ear at avatar - earLocMixed // ear at avatar location/camera direction - }; - - S32 mEarLocation; - - bool mSpeakerVolumeDirty; - bool mSpeakerMuteDirty; - int mSpeakerVolume; + void setVoiceVolume(F32 volume); + void setMicGain(F32 volume); + void setUserVolume(const LLUUID& id, F32 volume); // set's volume for specified agent, from 0-1 (where .5 is nominal) + bool voiceEnabled(); + void setLipSyncEnabled(BOOL enabled); + void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. + void setUserPTTState(bool ptt); + bool getUserPTTState(); + void toggleUserPTTState(void); + void inputUserControlState(bool down); // interpret any sort of up-down mic-open control input according to ptt-toggle prefs + void setVoiceEnabled(bool enabled); + + void setUsePTT(bool usePTT); + void setPTTIsToggle(bool PTTIsToggle); + bool getPTTIsToggle(); + + BOOL lipSyncEnabled(); + + // PTT key triggering + void keyDown(KEY key, MASK mask); + void keyUp(KEY key, MASK mask); + void middleMouseState(bool down); + + + ///////////////////////////// + // Accessors for data related to nearby speakers + BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar + std::string getDisplayName(const LLUUID& id); + BOOL isOnlineSIP(const LLUUID &id); + BOOL isParticipantAvatar(const LLUUID &id); + BOOL getIsSpeaking(const LLUUID& id); + BOOL getIsModeratorMuted(const LLUUID& id); + F32 getCurrentPower(const LLUUID& id); // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... + BOOL getOnMuteList(const LLUUID& id); + F32 getUserVolume(const LLUUID& id); + + ///////////////////////////// + BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. + // Use this to determine whether to show a "no speech" icon in the menu bar. + void getParticipantList(std::set<LLUUID> &participants); + bool isParticipant(const LLUUID& speaker_id); + + ////////////////////////// + /// @name text chat + //@{ + BOOL isSessionTextIMPossible(const LLUUID& id); + BOOL isSessionCallBackPossible(const LLUUID& id); + BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message); + void endUserIMSession(const LLUUID &uuid); + //@} + - int mMicVolume; - bool mMicVolumeDirty; - - bool mVoiceEnabled; - bool mWriteInProgress; - std::string mWriteString; - - LLTimer mUpdateTimer; + void userAuthorized(const std::string& user_id, + const LLUUID &agentID); + + void addObserver(LLVoiceClientStatusObserver* observer); + void removeObserver(LLVoiceClientStatusObserver* observer); + void addObserver(LLFriendObserver* observer); + void removeObserver(LLFriendObserver* observer); + void addObserver(LLVoiceClientParticipantObserver* observer); + void removeObserver(LLVoiceClientParticipantObserver* observer); + + std::string sipURIFromID(const LLUUID &id); - BOOL mLipSyncEnabled; - - std::string mAPIVersion; - - typedef std::set<LLVoiceClientParticipantObserver*> observer_set_t; - observer_set_t mParticipantObservers; - - void notifyParticipantObservers(); +protected: + LLVoiceModuleInterface* mVoiceModule; + LLPumpIO *m_servicePump; +}; - typedef std::set<LLVoiceClientStatusObserver*> status_observer_set_t; - status_observer_set_t mStatusObservers; - - void notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status); +/** + * Speaker volume storage helper class + **/ +class LLSpeakerVolumeStorage : public LLSingleton<LLSpeakerVolumeStorage> +{ + LOG_CLASS(LLSpeakerVolumeStorage); +public: - typedef std::set<LLFriendObserver*> friend_observer_set_t; - friend_observer_set_t mFriendObservers; - void notifyFriendObservers(); + /** + * Stores volume level for specified user. + * + * @param[in] speaker_id - LLUUID of user to store volume level for. + * @param[in] volume - volume level to be stored for user. + */ + void storeSpeakerVolume(const LLUUID& speaker_id, F32 volume); + + /** + * Gets stored volume level for specified speaker + * + * @param[in] speaker_id - LLUUID of user to retrieve volume level for. + * @param[out] volume - set to stored volume if found, otherwise unmodified. + * @return - true if a stored volume is found. + */ + bool getSpeakerVolume(const LLUUID& speaker_id, F32& volume); + + /** + * Removes stored volume level for specified user. + * + * @param[in] speaker_id - LLUUID of user to remove. + */ + void removeSpeakerVolume(const LLUUID& speaker_id); + +private: + friend class LLSingleton<LLSpeakerVolumeStorage>; + LLSpeakerVolumeStorage(); + ~LLSpeakerVolumeStorage(); + + const static std::string SETTINGS_FILE_NAME; + + void load(); + void save(); + + static F32 transformFromLegacyVolume(F32 volume_in); + static F32 transformToLegacyVolume(F32 volume_in); + + typedef std::map<LLUUID, F32> speaker_data_map_t; + speaker_data_map_t mSpeakersData; }; -extern LLVoiceClient *gVoiceClient; - #endif //LL_VOICE_CLIENT_H diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp new file mode 100644 index 0000000000..c6c155f0f0 --- /dev/null +++ b/indra/newview/llvoicevivox.cpp @@ -0,0 +1,6953 @@ + /** + * @file LLVivoxVoiceClient.cpp + * @brief Implementation of LLVivoxVoiceClient class which is the interface to the voice client process. + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llvoicevivox.h" + +#include <boost/tokenizer.hpp> + +#include "llsdutil.h" + +#include "llvoavatarself.h" +#include "llbufferstream.h" +#include "llfile.h" +#ifdef LL_STANDALONE +# include "expat.h" +#else +# include "expat/expat.h" +#endif +#include "llcallbacklist.h" +#include "llviewerregion.h" +#include "llviewernetwork.h" // for gGridChoice +#include "llbase64.h" +#include "llviewercontrol.h" +#include "llkeyboard.h" +#include "llappviewer.h" // for gDisconnected, gDisableVoice +#include "llmutelist.h" // to check for muted avatars +#include "llagent.h" +#include "llcachename.h" +#include "llimview.h" // for LLIMMgr +#include "llparcel.h" +#include "llviewerparcelmgr.h" +//#include "llfirstuse.h" +#include "llspeakers.h" +#include "llviewerwindow.h" +#include "llviewercamera.h" + +#include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel +#include "llviewernetwork.h" +#include "llnotificationsutil.h" + +// for base64 decoding +#include "apr_base64.h" + +// for SHA1 hash +#include "apr_sha1.h" + +// for MD5 hash +#include "llmd5.h" + +#define USE_SESSION_GROUPS 0 + +const F32 VOLUME_SCALE_VIVOX = 0.01f; + +const F32 SPEAKING_TIMEOUT = 1.f; + +static const std::string VOICE_SERVER_TYPE = "Vivox"; + +// Don't retry connecting to the daemon more frequently than this: +const F32 CONNECT_THROTTLE_SECONDS = 1.0f; + +// Don't send positional updates more frequently than this: +const F32 UPDATE_THROTTLE_SECONDS = 0.1f; + +const F32 LOGIN_RETRY_SECONDS = 10.0f; +const int MAX_LOGIN_RETRIES = 12; + +// Defines the maximum number of times(in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine() +// which is treated as normal. If this number is exceeded we suspect there is a problem with connection +// to voice server (EXT-4313). When voice works correctly, there is from 1 to 15 times. 50 was chosen +// to make sure we don't make mistake when slight connection problems happen- situation when connection to server is +// blocked is VERY rare and it's better to sacrifice response time in this situation for the sake of stability. +const int MAX_NORMAL_JOINING_SPATIAL_NUM = 50; + + +static void setUUIDFromStringHash(LLUUID &uuid, const std::string &str) +{ + LLMD5 md5_uuid; + md5_uuid.update((const unsigned char*)str.data(), str.size()); + md5_uuid.finalize(); + md5_uuid.raw_digest(uuid.mData); +} + +static int scale_mic_volume(float volume) +{ + // incoming volume has the range [0.0 ... 2.0], with 1.0 as the default. + // Map it to Vivox levels as follows: 0.0 -> 30, 1.0 -> 50, 2.0 -> 70 + return 30 + (int)(volume * 20.0f); +} + +static int scale_speaker_volume(float volume) +{ + // incoming volume has the range [0.0 ... 1.0], with 0.5 as the default. + // Map it to Vivox levels as follows: 0.0 -> 30, 0.5 -> 50, 1.0 -> 70 + return 30 + (int)(volume * 40.0f); + +} + +class LLVivoxVoiceAccountProvisionResponder : + public LLHTTPClient::Responder +{ +public: + LLVivoxVoiceAccountProvisionResponder(int retries) + { + mRetries = retries; + } + + virtual void error(U32 status, const std::string& reason) + { + if ( mRetries > 0 ) + { + LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, retrying. status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; + LLVivoxVoiceClient::getInstance()->requestVoiceAccountProvision( + mRetries - 1); + } + else + { + LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, too many retries (giving up). status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; + LLVivoxVoiceClient::getInstance()->giveUp(); + } + } + + virtual void result(const LLSD& content) + { + + std::string voice_sip_uri_hostname; + std::string voice_account_server_uri; + + LL_DEBUGS("Voice") << "ProvisionVoiceAccountRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; + + if(content.has("voice_sip_uri_hostname")) + voice_sip_uri_hostname = content["voice_sip_uri_hostname"].asString(); + + // this key is actually misnamed -- it will be an entire URI, not just a hostname. + if(content.has("voice_account_server_name")) + voice_account_server_uri = content["voice_account_server_name"].asString(); + + LLVivoxVoiceClient::getInstance()->login( + content["username"].asString(), + content["password"].asString(), + voice_sip_uri_hostname, + voice_account_server_uri); + + } + +private: + int mRetries; +}; + + + +/////////////////////////////////////////////////////////////////////////////////////////////// + +class LLVivoxVoiceClientMuteListObserver : public LLMuteListObserver +{ + /* virtual */ void onChange() { LLVivoxVoiceClient::getInstance()->muteListChanged();} +}; + +class LLVivoxVoiceClientFriendsObserver : public LLFriendObserver +{ +public: + /* virtual */ void changed(U32 mask) { LLVivoxVoiceClient::getInstance()->updateFriends(mask);} +}; + +static LLVivoxVoiceClientMuteListObserver mutelist_listener; +static bool sMuteListListener_listening = false; + +static LLVivoxVoiceClientFriendsObserver *friendslist_listener = NULL; + +/////////////////////////////////////////////////////////////////////////////////////////////// + +class LLVivoxVoiceClientCapResponder : public LLHTTPClient::Responder +{ +public: + LLVivoxVoiceClientCapResponder(void){}; + + virtual void error(U32 status, const std::string& reason); // called with bad status codes + virtual void result(const LLSD& content); + +private: +}; + +void LLVivoxVoiceClientCapResponder::error(U32 status, const std::string& reason) +{ + LL_WARNS("Voice") << "LLVivoxVoiceClientCapResponder::error(" + << status << ": " << reason << ")" + << LL_ENDL; +} + +void LLVivoxVoiceClientCapResponder::result(const LLSD& content) +{ + LLSD::map_const_iterator iter; + + LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; + + if ( content.has("voice_credentials") ) + { + LLSD voice_credentials = content["voice_credentials"]; + std::string uri; + std::string credentials; + + if ( voice_credentials.has("channel_uri") ) + { + uri = voice_credentials["channel_uri"].asString(); + } + if ( voice_credentials.has("channel_credentials") ) + { + credentials = + voice_credentials["channel_credentials"].asString(); + } + + LLVivoxVoiceClient::getInstance()->setSpatialChannel(uri, credentials); + } +} + + + +#if LL_WINDOWS +static HANDLE sGatewayHandle = 0; + +static bool isGatewayRunning() +{ + bool result = false; + if(sGatewayHandle != 0) + { + DWORD waitresult = WaitForSingleObject(sGatewayHandle, 0); + if(waitresult != WAIT_OBJECT_0) + { + result = true; + } + } + return result; +} +static void killGateway() +{ + if(sGatewayHandle != 0) + { + TerminateProcess(sGatewayHandle,0); + } +} + +#else // Mac and linux + +static pid_t sGatewayPID = 0; +static bool isGatewayRunning() +{ + bool result = false; + if(sGatewayPID != 0) + { + // A kill with signal number 0 has no effect, just does error checking. It should return an error if the process no longer exists. + if(kill(sGatewayPID, 0) == 0) + { + result = true; + } + } + return result; +} + +static void killGateway() +{ + if(sGatewayPID != 0) + { + kill(sGatewayPID, SIGTERM); + } +} + +#endif + +/////////////////////////////////////////////////////////////////////////////////////////////// + +LLVivoxVoiceClient::LLVivoxVoiceClient() : + mState(stateDisabled), + mSessionTerminateRequested(false), + mRelogRequested(false), + mConnected(false), + mPump(NULL), + mSpatialJoiningNum(0), + + mTuningMode(false), + mTuningEnergy(0.0f), + mTuningMicVolume(0), + mTuningMicVolumeDirty(true), + mTuningSpeakerVolume(0), + mTuningSpeakerVolumeDirty(true), + mTuningExitState(stateDisabled), + + mAreaVoiceDisabled(false), + mAudioSession(NULL), + mAudioSessionChanged(false), + mNextAudioSession(NULL), + + mCurrentParcelLocalID(0), + mNumberOfAliases(0), + mCommandCookie(0), + mLoginRetryCount(0), + + mBuddyListMapPopulated(false), + mBlockRulesListReceived(false), + mAutoAcceptRulesListReceived(false), + mCaptureDeviceDirty(false), + mRenderDeviceDirty(false), + mSpatialCoordsDirty(false), + + mPTTDirty(true), + mPTT(true), + mUsePTT(true), + mPTTIsMiddleMouse(false), + mPTTKey(0), + mPTTIsToggle(false), + mUserPTTState(false), + mMuteMic(false), + mFriendsListDirty(true), + + mEarLocation(0), + mSpeakerVolumeDirty(true), + mSpeakerMuteDirty(true), + mMicVolume(0), + mMicVolumeDirty(true), + + mVoiceEnabled(false), + mWriteInProgress(false), + + mLipSyncEnabled(false) + + + +{ + mSpeakerVolume = scale_speaker_volume(0); + + mVoiceVersion.serverVersion = ""; + mVoiceVersion.serverType = VOICE_SERVER_TYPE; + + // gMuteListp isn't set up at this point, so we defer this until later. +// gMuteListp->addObserver(&mutelist_listener); + + +#if LL_DARWIN || LL_LINUX || LL_SOLARIS + // HACK: THIS DOES NOT BELONG HERE + // When the vivox daemon dies, the next write attempt on our socket generates a SIGPIPE, which kills us. + // This should cause us to ignore SIGPIPE and handle the error through proper channels. + // This should really be set up elsewhere. Where should it go? + signal(SIGPIPE, SIG_IGN); + + // Since we're now launching the gateway with fork/exec instead of system(), we need to deal with zombie processes. + // Ignoring SIGCHLD should prevent zombies from being created. Alternately, we could use wait(), but I'd rather not do that. + signal(SIGCHLD, SIG_IGN); +#endif + + // set up state machine + setState(stateDisabled); + + gIdleCallbacks.addFunction(idle, this); +} + +//--------------------------------------------------- + +LLVivoxVoiceClient::~LLVivoxVoiceClient() +{ +} + +//---------------------------------------------- + +void LLVivoxVoiceClient::init(LLPumpIO *pump) +{ + // constructor will set up LLVoiceClient::getInstance() + LLVivoxVoiceClient::getInstance()->mPump = pump; +} + +void LLVivoxVoiceClient::terminate() +{ + +// leaveAudioSession(); + logout(); + // As of SDK version 4885, this should no longer be necessary. It will linger after the socket close if it needs to. + // ms_sleep(2000); + connectorShutdown(); + closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. + + // This will do unpleasant things on windows. +// killGateway(); + + + +} + +const LLVoiceVersionInfo& LLVivoxVoiceClient::getVersion() +{ + return mVoiceVersion; +} + +//--------------------------------------------------- + +void LLVivoxVoiceClient::updateSettings() +{ + setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); + setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled")); + std::string keyString = gSavedSettings.getString("PushToTalkButton"); + setPTTKey(keyString); + setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle")); + setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); + + std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); + setCaptureDevice(inputDevice); + std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); + setRenderDevice(outputDevice); + F32 mic_level = gSavedSettings.getF32("AudioLevelMic"); + setMicGain(mic_level); + setLipSyncEnabled(gSavedSettings.getBOOL("LipSyncEnabled")); +} + +///////////////////////////// +// utility functions + +bool LLVivoxVoiceClient::writeString(const std::string &str) +{ + bool result = false; + if(mConnected) + { + apr_status_t err; + apr_size_t size = (apr_size_t)str.size(); + apr_size_t written = size; + + //MARK: Turn this on to log outgoing XML +// LL_DEBUGS("Voice") << "sending: " << str << LL_ENDL; + + // check return code - sockets will fail (broken, etc.) + err = apr_socket_send( + mSocket->getSocket(), + (const char*)str.data(), + &written); + + if(err == 0) + { + // Success. + result = true; + } + // TODO: handle partial writes (written is number of bytes written) + // Need to set socket to non-blocking before this will work. +// else if(APR_STATUS_IS_EAGAIN(err)) +// { +// // +// } + else + { + // Assume any socket error means something bad. For now, just close the socket. + char buf[MAX_STRING]; + LL_WARNS("Voice") << "apr error " << err << " ("<< apr_strerror(err, buf, MAX_STRING) << ") sending data to vivox daemon." << LL_ENDL; + daemonDied(); + } + } + + return result; +} + + +///////////////////////////// +// session control messages +void LLVivoxVoiceClient::connectorCreate() +{ + std::ostringstream stream; + std::string logpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); + std::string loglevel = "0"; + + // Transition to stateConnectorStarted when the connector handle comes back. + setState(stateConnectorStarting); + + std::string savedLogLevel = gSavedSettings.getString("VivoxDebugLevel"); + + if(savedLogLevel != "-1") + { + LL_DEBUGS("Voice") << "creating connector with logging enabled" << LL_ENDL; + loglevel = "10"; + } + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.Create.1\">" + << "<ClientName>V2 SDK</ClientName>" + << "<AccountManagementServer>" << mVoiceAccountServerURI << "</AccountManagementServer>" + << "<Mode>Normal</Mode>" + << "<Logging>" + << "<Folder>" << logpath << "</Folder>" + << "<FileNamePrefix>Connector</FileNamePrefix>" + << "<FileNameSuffix>.log</FileNameSuffix>" + << "<LogLevel>" << loglevel << "</LogLevel>" + << "</Logging>" + << "<Application>SecondLifeViewer.1</Application>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::connectorShutdown() +{ + setState(stateConnectorStopping); + + if(!mConnectorHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.InitiateShutdown.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "</Request>" + << "\n\n\n"; + + mConnectorHandle.clear(); + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &agentID) +{ + + mAccountDisplayName = user_id; + + LL_INFOS("Voice") << "name \"" << mAccountDisplayName << "\" , ID " << agentID << LL_ENDL; + + mAccountName = nameFromID(agentID); +} + +void LLVivoxVoiceClient::requestVoiceAccountProvision(S32 retries) +{ + if ( gAgent.getRegion() && mVoiceEnabled ) + { + std::string url = + gAgent.getRegion()->getCapability( + "ProvisionVoiceAccountRequest"); + + if ( url == "" ) return; + + LLHTTPClient::post( + url, + LLSD(), + new LLVivoxVoiceAccountProvisionResponder(retries)); + } +} + +void LLVivoxVoiceClient::login( + const std::string& account_name, + const std::string& password, + const std::string& voice_sip_uri_hostname, + const std::string& voice_account_server_uri) +{ + mVoiceSIPURIHostName = voice_sip_uri_hostname; + mVoiceAccountServerURI = voice_account_server_uri; + + if(!mAccountHandle.empty()) + { + // Already logged in. + LL_WARNS("Voice") << "Called while already logged in." << LL_ENDL; + + // Don't process another login. + return; + } + else if ( account_name != mAccountName ) + { + //TODO: error? + LL_WARNS("Voice") << "Wrong account name! " << account_name + << " instead of " << mAccountName << LL_ENDL; + } + else + { + mAccountPassword = password; + } + + std::string debugSIPURIHostName = gSavedSettings.getString("VivoxDebugSIPURIHostName"); + + if( !debugSIPURIHostName.empty() ) + { + mVoiceSIPURIHostName = debugSIPURIHostName; + } + + if( mVoiceSIPURIHostName.empty() ) + { + // we have an empty account server name + // so we fall back to hardcoded defaults + + if(LLGridManager::getInstance()->isInProductionGrid()) + { + // Use the release account server + mVoiceSIPURIHostName = "bhr.vivox.com"; + } + else + { + // Use the development account server + mVoiceSIPURIHostName = "bhd.vivox.com"; + } + } + + std::string debugAccountServerURI = gSavedSettings.getString("VivoxDebugVoiceAccountServerURI"); + + if( !debugAccountServerURI.empty() ) + { + mVoiceAccountServerURI = debugAccountServerURI; + } + + if( mVoiceAccountServerURI.empty() ) + { + // If the account server URI isn't specified, construct it from the SIP URI hostname + mVoiceAccountServerURI = "https://www." + mVoiceSIPURIHostName + "/api2/"; + } +} + +void LLVivoxVoiceClient::idle(void* user_data) +{ + LLVivoxVoiceClient* self = (LLVivoxVoiceClient*)user_data; + self->stateMachine(); +} + +std::string LLVivoxVoiceClient::state2string(LLVivoxVoiceClient::state inState) +{ + std::string result = "UNKNOWN"; + + // Prevent copy-paste errors when updating this list... +#define CASE(x) case x: result = #x; break + + switch(inState) + { + CASE(stateDisableCleanup); + CASE(stateDisabled); + CASE(stateStart); + CASE(stateDaemonLaunched); + CASE(stateConnecting); + CASE(stateConnected); + CASE(stateIdle); + CASE(stateMicTuningStart); + CASE(stateMicTuningRunning); + CASE(stateMicTuningStop); + CASE(stateConnectorStart); + CASE(stateConnectorStarting); + CASE(stateConnectorStarted); + CASE(stateLoginRetry); + CASE(stateLoginRetryWait); + CASE(stateNeedsLogin); + CASE(stateLoggingIn); + CASE(stateLoggedIn); + CASE(stateCreatingSessionGroup); + CASE(stateNoChannel); + CASE(stateJoiningSession); + CASE(stateSessionJoined); + CASE(stateRunning); + CASE(stateLeavingSession); + CASE(stateSessionTerminated); + CASE(stateLoggingOut); + CASE(stateLoggedOut); + CASE(stateConnectorStopping); + CASE(stateConnectorStopped); + CASE(stateConnectorFailed); + CASE(stateConnectorFailedWaiting); + CASE(stateLoginFailed); + CASE(stateLoginFailedWaiting); + CASE(stateJoinSessionFailed); + CASE(stateJoinSessionFailedWaiting); + CASE(stateJail); + } + +#undef CASE + + return result; +} + + + +void LLVivoxVoiceClient::setState(state inState) +{ + LL_DEBUGS("Voice") << "entering state " << state2string(inState) << LL_ENDL; + + mState = inState; +} + +void LLVivoxVoiceClient::stateMachine() +{ + if(gDisconnected) + { + // The viewer has been disconnected from the sim. Disable voice. + setVoiceEnabled(false); + } + + if(mVoiceEnabled) + { + updatePosition(); + } + else if(mTuningMode) + { + // Tuning mode is special -- it needs to launch SLVoice even if voice is disabled. + } + else + { + if((getState() != stateDisabled) && (getState() != stateDisableCleanup)) + { + // User turned off voice support. Send the cleanup messages, close the socket, and reset. + if(!mConnected) + { + // if voice was turned off after the daemon was launched but before we could connect to it, we may need to issue a kill. + LL_INFOS("Voice") << "Disabling voice before connection to daemon, terminating." << LL_ENDL; + killGateway(); + } + + logout(); + connectorShutdown(); + + setState(stateDisableCleanup); + } + } + + // Check for parcel boundary crossing + { + LLViewerRegion *region = gAgent.getRegion(); + LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + + if(region && parcel) + { + S32 parcelLocalID = parcel->getLocalID(); + std::string regionName = region->getName(); + std::string capURI = region->getCapability("ParcelVoiceInfoRequest"); + +// LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL; + + // The region name starts out empty and gets filled in later. + // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes. + // If either is empty, wait for the next time around. + if(!regionName.empty()) + { + if(!capURI.empty()) + { + if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName)) + { + // We have changed parcels. Initiate a parcel channel lookup. + mCurrentParcelLocalID = parcelLocalID; + mCurrentRegionName = regionName; + + parcelChanged(); + } + } + else + { + LL_WARNS_ONCE("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long." << LL_ENDL; + } + } + } + } + + switch(getState()) + { + //MARK: stateDisableCleanup + case stateDisableCleanup: + // Clean up and reset everything. + closeSocket(); + deleteAllSessions(); + deleteAllBuddies(); + + mConnectorHandle.clear(); + mAccountHandle.clear(); + mAccountPassword.clear(); + mVoiceAccountServerURI.clear(); + + setState(stateDisabled); + break; + + //MARK: stateDisabled + case stateDisabled: + if(mTuningMode || (mVoiceEnabled && !mAccountName.empty())) + { + setState(stateStart); + } + break; + + //MARK: stateStart + case stateStart: + if(gSavedSettings.getBOOL("CmdLineDisableVoice")) + { + // Voice is locked out, we must not launch the vivox daemon. + setState(stateJail); + } + else if(!isGatewayRunning()) + { + if(true) + { + // Launch the voice daemon + + // *FIX:Mani - Using the executable dir instead + // of mAppRODataDir, the working directory from which the app + // is launched. + //std::string exe_path = gDirUtilp->getAppRODataDir(); + std::string exe_path = gDirUtilp->getExecutableDir(); + exe_path += gDirUtilp->getDirDelimiter(); +#if LL_WINDOWS + exe_path += "SLVoice.exe"; +#elif LL_DARWIN + exe_path += "../Resources/SLVoice"; +#else + exe_path += "SLVoice"; +#endif + // See if the vivox executable exists + llstat s; + if(!LLFile::stat(exe_path, &s)) + { + // vivox executable exists. Build the command line and launch the daemon. + // SLIM SDK: these arguments are no longer necessary. +// std::string args = " -p tcp -h -c"; + std::string args; + std::string cmd; + std::string loglevel = gSavedSettings.getString("VivoxDebugLevel"); + + if(loglevel.empty()) + { + loglevel = "-1"; // turn logging off completely + } + + args += " -ll "; + args += loglevel; + + LL_DEBUGS("Voice") << "Args for SLVoice: " << args << LL_ENDL; + +#if LL_WINDOWS + PROCESS_INFORMATION pinfo; + STARTUPINFOA sinfo; + + memset(&sinfo, 0, sizeof(sinfo)); + + std::string exe_dir = gDirUtilp->getAppRODataDir(); + cmd = "SLVoice.exe"; + cmd += args; + + // So retarded. Windows requires that the second parameter to CreateProcessA be writable (non-const) string... + char *args2 = new char[args.size() + 1]; + strcpy(args2, args.c_str()); + if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo)) + { +// DWORD dwErr = GetLastError(); + } + else + { + // foo = pinfo.dwProcessId; // get your pid here if you want to use it later on + // CloseHandle(pinfo.hProcess); // stops leaks - nothing else + sGatewayHandle = pinfo.hProcess; + CloseHandle(pinfo.hThread); // stops leaks - nothing else + } + + delete[] args2; +#else // LL_WINDOWS + // This should be the same for mac and linux + { + std::vector<std::string> arglist; + arglist.push_back(exe_path); + + // Split the argument string into separate strings for each argument + typedef boost::tokenizer<boost::char_separator<char> > tokenizer; + boost::char_separator<char> sep(" "); + tokenizer tokens(args, sep); + tokenizer::iterator token_iter; + + for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) + { + arglist.push_back(*token_iter); + } + + // create an argv vector for the child process + char **fakeargv = new char*[arglist.size() + 1]; + int i; + for(i=0; i < arglist.size(); i++) + fakeargv[i] = const_cast<char*>(arglist[i].c_str()); + + fakeargv[i] = NULL; + + fflush(NULL); // flush all buffers before the child inherits them + pid_t id = vfork(); + if(id == 0) + { + // child + execv(exe_path.c_str(), fakeargv); + + // If we reach this point, the exec failed. + // Use _exit() instead of exit() per the vfork man page. + _exit(0); + } + + // parent + delete[] fakeargv; + sGatewayPID = id; + } +#endif // LL_WINDOWS + mDaemonHost = LLHost(gSavedSettings.getString("VivoxVoiceHost").c_str(), gSavedSettings.getU32("VivoxVoicePort")); + } + else + { + LL_INFOS("Voice") << exe_path << " not found." << LL_ENDL; + } + } + else + { + // SLIM SDK: port changed from 44124 to 44125. + // We can connect to a client gateway running on another host. This is useful for testing. + // To do this, launch the gateway on a nearby host like this: + // vivox-gw.exe -p tcp -i 0.0.0.0:44125 + // and put that host's IP address here. + mDaemonHost = LLHost(gSavedSettings.getString("VivoxVoiceHost"), gSavedSettings.getU32("VivoxVoicePort")); + } + + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); + + setState(stateDaemonLaunched); + + // Dirty the states we'll need to sync with the daemon when it comes up. + mPTTDirty = true; + mMicVolumeDirty = true; + mSpeakerVolumeDirty = true; + mSpeakerMuteDirty = true; + // These only need to be set if they're not default (i.e. empty string). + mCaptureDeviceDirty = !mCaptureDevice.empty(); + mRenderDeviceDirty = !mRenderDevice.empty(); + + mMainSessionGroupHandle.clear(); + } + break; + + //MARK: stateDaemonLaunched + case stateDaemonLaunched: + if(mUpdateTimer.hasExpired()) + { + LL_DEBUGS("Voice") << "Connecting to vivox daemon:" << mDaemonHost << LL_ENDL; + + mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); + + if(!mSocket) + { + mSocket = LLSocket::create(gAPRPoolp, LLSocket::STREAM_TCP); + } + + mConnected = mSocket->blockingConnect(mDaemonHost); + if(mConnected) + { + setState(stateConnecting); + } + else + { + // If the connect failed, the socket may have been put into a bad state. Delete it. + closeSocket(); + } + } + break; + + //MARK: stateConnecting + case stateConnecting: + // Can't do this until we have the pump available. + if(mPump) + { + // MBW -- Note to self: pumps and pipes examples in + // indra/test/io.cpp + // indra/test/llpipeutil.{cpp|h} + + // Attach the pumps and pipes + + LLPumpIO::chain_t readChain; + + readChain.push_back(LLIOPipe::ptr_t(new LLIOSocketReader(mSocket))); + readChain.push_back(LLIOPipe::ptr_t(new LLVivoxProtocolParser())); + + mPump->addChain(readChain, NEVER_CHAIN_EXPIRY_SECS); + + setState(stateConnected); + } + + break; + + //MARK: stateConnected + case stateConnected: + // Initial devices query + getCaptureDevicesSendMessage(); + getRenderDevicesSendMessage(); + + mLoginRetryCount = 0; + + setState(stateIdle); + break; + + //MARK: stateIdle + case stateIdle: + // This is the idle state where we're connected to the daemon but haven't set up a connector yet. + if(mTuningMode) + { + mTuningExitState = stateIdle; + setState(stateMicTuningStart); + } + else if(!mVoiceEnabled) + { + // We never started up the connector. This will shut down the daemon. + setState(stateConnectorStopped); + } + else if(!mAccountName.empty()) + { + LLViewerRegion *region = gAgent.getRegion(); + + if(region) + { + if ( region->getCapability("ProvisionVoiceAccountRequest") != "" ) + { + if ( mAccountPassword.empty() ) + { + requestVoiceAccountProvision(); + } + setState(stateConnectorStart); + } + else + { + LL_WARNS_ONCE("Voice") << "region doesn't have ProvisionVoiceAccountRequest capability!" << LL_ENDL; + } + } + } + break; + + //MARK: stateMicTuningStart + case stateMicTuningStart: + if(mUpdateTimer.hasExpired()) + { + if(mCaptureDeviceDirty || mRenderDeviceDirty) + { + // These can't be changed while in tuning mode. Set them before starting. + std::ostringstream stream; + + buildSetCaptureDevice(stream); + buildSetRenderDevice(stream); + + if(!stream.str().empty()) + { + writeString(stream.str()); + } + + // This will come around again in the same state and start the capture, after the timer expires. + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); + } + else + { + // duration parameter is currently unused, per Mike S. + tuningCaptureStartSendMessage(10000); + + setState(stateMicTuningRunning); + } + } + + break; + + //MARK: stateMicTuningRunning + case stateMicTuningRunning: + if(!mTuningMode || mCaptureDeviceDirty || mRenderDeviceDirty) + { + // All of these conditions make us leave tuning mode. + setState(stateMicTuningStop); + } + else + { + // process mic/speaker volume changes + if(mTuningMicVolumeDirty || mTuningSpeakerVolumeDirty) + { + std::ostringstream stream; + + if(mTuningMicVolumeDirty) + { + LL_INFOS("Voice") << "setting tuning mic level to " << mTuningMicVolume << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetMicLevel.1\">" + << "<Level>" << mTuningMicVolume << "</Level>" + << "</Request>\n\n\n"; + } + + if(mTuningSpeakerVolumeDirty) + { + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetSpeakerLevel.1\">" + << "<Level>" << mTuningSpeakerVolume << "</Level>" + << "</Request>\n\n\n"; + } + + mTuningMicVolumeDirty = false; + mTuningSpeakerVolumeDirty = false; + + if(!stream.str().empty()) + { + writeString(stream.str()); + } + } + } + break; + + //MARK: stateMicTuningStop + case stateMicTuningStop: + { + // transition out of mic tuning + tuningCaptureStopSendMessage(); + + setState(mTuningExitState); + + // if we exited just to change devices, this will keep us from re-entering too fast. + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); + + } + break; + + //MARK: stateConnectorStart + case stateConnectorStart: + if(!mVoiceEnabled) + { + // We were never logged in. This will shut down the connector. + setState(stateLoggedOut); + } + else if(!mVoiceAccountServerURI.empty()) + { + connectorCreate(); + } + break; + + //MARK: stateConnectorStarting + case stateConnectorStarting: // waiting for connector handle + // connectorCreateResponse() will transition from here to stateConnectorStarted. + break; + + //MARK: stateConnectorStarted + case stateConnectorStarted: // connector handle received + if(!mVoiceEnabled) + { + // We were never logged in. This will shut down the connector. + setState(stateLoggedOut); + } + else + { + // The connector is started. Send a login message. + setState(stateNeedsLogin); + } + break; + + //MARK: stateLoginRetry + case stateLoginRetry: + if(mLoginRetryCount == 0) + { + // First retry -- display a message to the user + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGIN_RETRY); + } + + mLoginRetryCount++; + + if(mLoginRetryCount > MAX_LOGIN_RETRIES) + { + LL_WARNS("Voice") << "too many login retries, giving up." << LL_ENDL; + setState(stateLoginFailed); + LLSD args; + std::stringstream errs; + errs << mVoiceAccountServerURI << "\n:UDP: 3478, 3479, 5060, 5062, 12000-17000"; + args["HOSTID"] = errs.str(); + if (LLGridManager::getInstance()->isSystemGrid()) + { + LLNotificationsUtil::add("NoVoiceConnect", args); + } + else + { + LLNotificationsUtil::add("NoVoiceConnect-GIAB", args); + } + } + else + { + LL_INFOS("Voice") << "will retry login in " << LOGIN_RETRY_SECONDS << " seconds." << LL_ENDL; + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(LOGIN_RETRY_SECONDS); + setState(stateLoginRetryWait); + } + break; + + //MARK: stateLoginRetryWait + case stateLoginRetryWait: + if(mUpdateTimer.hasExpired()) + { + setState(stateNeedsLogin); + } + break; + + //MARK: stateNeedsLogin + case stateNeedsLogin: + if(!mAccountPassword.empty()) + { + setState(stateLoggingIn); + loginSendMessage(); + } + break; + + //MARK: stateLoggingIn + case stateLoggingIn: // waiting for account handle + // loginResponse() will transition from here to stateLoggedIn. + break; + + //MARK: stateLoggedIn + case stateLoggedIn: // account handle received + + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGGED_IN); + + // request the current set of block rules (we'll need them when updating the friends list) + accountListBlockRulesSendMessage(); + + // request the current set of auto-accept rules + accountListAutoAcceptRulesSendMessage(); + + // Set up the mute list observer if it hasn't been set up already. + if((!sMuteListListener_listening)) + { + LLMuteList::getInstance()->addObserver(&mutelist_listener); + sMuteListListener_listening = true; + } + + // Set up the friends list observer if it hasn't been set up already. + if(friendslist_listener == NULL) + { + friendslist_listener = new LLVivoxVoiceClientFriendsObserver; + LLAvatarTracker::instance().addObserver(friendslist_listener); + } + + // Set the initial state of mic mute, local speaker volume, etc. + { + std::ostringstream stream; + + buildLocalAudioUpdates(stream); + + if(!stream.str().empty()) + { + writeString(stream.str()); + } + } + +#if USE_SESSION_GROUPS + // create the main session group + sessionGroupCreateSendMessage(); + + setState(stateCreatingSessionGroup); +#else + // Not using session groups -- skip the stateCreatingSessionGroup state. + setState(stateNoChannel); + + // Initial kick-off of channel lookup logic + parcelChanged(); +#endif + break; + + //MARK: stateCreatingSessionGroup + case stateCreatingSessionGroup: + if(mSessionTerminateRequested || !mVoiceEnabled) + { + // *TODO: Question: is this the right way out of this state + setState(stateSessionTerminated); + } + else if(!mMainSessionGroupHandle.empty()) + { + setState(stateNoChannel); + + // Start looped recording (needed for "panic button" anti-griefing tool) + recordingLoopStart(); + + // Initial kick-off of channel lookup logic + parcelChanged(); + } + break; + + //MARK: stateNoChannel + case stateNoChannel: + + LL_DEBUGS("Voice") << "State No Channel" << LL_ENDL; + mSpatialJoiningNum = 0; + // Do this here as well as inside sendPositionalUpdate(). + // Otherwise, if you log in but don't join a proximal channel (such as when your login location has voice disabled), your friends list won't sync. + sendFriendsListUpdates(); + + if(mSessionTerminateRequested || !mVoiceEnabled) + { + // TODO: Question: Is this the right way out of this state? + setState(stateSessionTerminated); + } + else if(mTuningMode) + { + mTuningExitState = stateNoChannel; + setState(stateMicTuningStart); + } + else if(sessionNeedsRelog(mNextAudioSession)) + { + requestRelog(); + setState(stateSessionTerminated); + } + else if(mNextAudioSession) + { + sessionState *oldSession = mAudioSession; + + mAudioSession = mNextAudioSession; + if(!mAudioSession->mReconnect) + { + mNextAudioSession = NULL; + } + + // The old session may now need to be deleted. + reapSession(oldSession); + + if(!mAudioSession->mHandle.empty()) + { + // Connect to a session by session handle + + sessionMediaConnectSendMessage(mAudioSession); + } + else + { + // Connect to a session by URI + sessionCreateSendMessage(mAudioSession, true, false); + } + + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING); + setState(stateJoiningSession); + } + else if(!mSpatialSessionURI.empty()) + { + // If we're not headed elsewhere and have a spatial URI, return to spatial. + switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); + } + break; + + //MARK: stateJoiningSession + case stateJoiningSession: // waiting for session handle + + // If this is true we have problem with connection to voice server (EXT-4313). + // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM. + if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM) + { + // Notify observers to let them know there is problem with voice + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); + llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl; + } + + // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for + // example for p2p many times while waiting for response, so it can't be used to detect errors + if(mAudioSession && mAudioSession->mIsSpatial) + { + mSpatialJoiningNum++; + } + + // joinedAudioSession() will transition from here to stateSessionJoined. + if(!mVoiceEnabled) + { + // User bailed out during connect -- jump straight to teardown. + setState(stateSessionTerminated); + } + else if(mSessionTerminateRequested) + { + if(mAudioSession && !mAudioSession->mHandle.empty()) + { + // Only allow direct exits from this state in p2p calls (for cancelling an invite). + // Terminating a half-connected session on other types of calls seems to break something in the vivox gateway. + if(mAudioSession->mIsP2P) + { + sessionMediaDisconnectSendMessage(mAudioSession); + setState(stateSessionTerminated); + } + } + } + break; + + //MARK: stateSessionJoined + case stateSessionJoined: // session handle received + + mSpatialJoiningNum = 0; + // It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4 + // before continuing from this state. They can happen in either order, and if I don't wait for both, things can get stuck. + // For now, the SessionGroup.AddSession response handler sets mSessionHandle and the SessionStateChangeEvent handler transitions to stateSessionJoined. + // This is a cheap way to make sure both have happened before proceeding. + if(mAudioSession && mAudioSession->mVoiceEnabled) + { + // Dirty state that may need to be sync'ed with the daemon. + mPTTDirty = true; + mSpeakerVolumeDirty = true; + mSpatialCoordsDirty = true; + + setState(stateRunning); + + // Start the throttle timer + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); + + // Events that need to happen when a session is joined could go here. + // Maybe send initial spatial data? + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINED); + + } + else if(!mVoiceEnabled) + { + // User bailed out during connect -- jump straight to teardown. + setState(stateSessionTerminated); + } + else if(mSessionTerminateRequested) + { + // Only allow direct exits from this state in p2p calls (for cancelling an invite). + // Terminating a half-connected session on other types of calls seems to break something in the vivox gateway. + if(mAudioSession && mAudioSession->mIsP2P) + { + sessionMediaDisconnectSendMessage(mAudioSession); + setState(stateSessionTerminated); + } + } + break; + + //MARK: stateRunning + case stateRunning: // steady state + // Disabling voice or disconnect requested. + if(!mVoiceEnabled || mSessionTerminateRequested) + { + leaveAudioSession(); + } + else + { + + // Figure out whether the PTT state needs to change + { + bool newPTT; + if(mUsePTT) + { + // If configured to use PTT, track the user state. + newPTT = mUserPTTState; + } + else + { + // If not configured to use PTT, it should always be true (otherwise the user will be unable to speak). + newPTT = true; + } + + if(mMuteMic) + { + // This always overrides any other PTT setting. + newPTT = false; + } + + // Dirty if state changed. + if(newPTT != mPTT) + { + mPTT = newPTT; + mPTTDirty = true; + } + } + + if(!inSpatialChannel()) + { + // When in a non-spatial channel, never send positional updates. + mSpatialCoordsDirty = false; + } + else + { + // Do the calculation that enforces the listener<->speaker tether (and also updates the real camera position) + enforceTether(); + } + + // Send an update only if the ptt or mute state has changed (which shouldn't be able to happen that often + // -- the user can only click so fast) or every 10hz, whichever is sooner. + // Sending for every volume update causes an excessive flood of messages whenever a volume slider is dragged. + if((mAudioSession && mAudioSession->mMuteDirty) || mPTTDirty || mUpdateTimer.hasExpired()) + { + mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); + sendPositionalUpdate(); + } + } + break; + + //MARK: stateLeavingSession + case stateLeavingSession: // waiting for terminate session response + // The handler for the Session.Terminate response will transition from here to stateSessionTerminated. + break; + + //MARK: stateSessionTerminated + case stateSessionTerminated: + + // Must do this first, since it uses mAudioSession. + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); + + if(mAudioSession) + { + sessionState *oldSession = mAudioSession; + + mAudioSession = NULL; + // We just notified status observers about this change. Don't do it again. + mAudioSessionChanged = false; + + // The old session may now need to be deleted. + reapSession(oldSession); + } + else + { + LL_WARNS("Voice") << "stateSessionTerminated with NULL mAudioSession" << LL_ENDL; + } + + // Always reset the terminate request flag when we get here. + mSessionTerminateRequested = false; + + if(mVoiceEnabled && !mRelogRequested) + { + // Just leaving a channel, go back to stateNoChannel (the "logged in but have no channel" state). + setState(stateNoChannel); + } + else + { + // Shutting down voice, continue with disconnecting. + logout(); + + // The state machine will take it from here + mRelogRequested = false; + } + + break; + + //MARK: stateLoggingOut + case stateLoggingOut: // waiting for logout response + // The handler for the AccountLoginStateChangeEvent will transition from here to stateLoggedOut. + break; + + //MARK: stateLoggedOut + case stateLoggedOut: // logout response received + + // Once we're logged out, all these things are invalid. + mAccountHandle.clear(); + deleteAllSessions(); + deleteAllBuddies(); + + if(mVoiceEnabled && !mRelogRequested) + { + // User was logged out, but wants to be logged in. Send a new login request. + setState(stateNeedsLogin); + } + else + { + // shut down the connector + connectorShutdown(); + } + break; + + //MARK: stateConnectorStopping + case stateConnectorStopping: // waiting for connector stop + // The handler for the Connector.InitiateShutdown response will transition from here to stateConnectorStopped. + break; + + //MARK: stateConnectorStopped + case stateConnectorStopped: // connector stop received + setState(stateDisableCleanup); + break; + + //MARK: stateConnectorFailed + case stateConnectorFailed: + setState(stateConnectorFailedWaiting); + break; + //MARK: stateConnectorFailedWaiting + case stateConnectorFailedWaiting: + if(!mVoiceEnabled) + { + setState(stateDisableCleanup); + } + break; + + //MARK: stateLoginFailed + case stateLoginFailed: + setState(stateLoginFailedWaiting); + break; + //MARK: stateLoginFailedWaiting + case stateLoginFailedWaiting: + if(!mVoiceEnabled) + { + setState(stateDisableCleanup); + } + break; + + //MARK: stateJoinSessionFailed + case stateJoinSessionFailed: + // Transition to error state. Send out any notifications here. + if(mAudioSession) + { + LL_WARNS("Voice") << "stateJoinSessionFailed: (" << mAudioSession->mErrorStatusCode << "): " << mAudioSession->mErrorStatusString << LL_ENDL; + } + else + { + LL_WARNS("Voice") << "stateJoinSessionFailed with no current session" << LL_ENDL; + } + + notifyStatusObservers(LLVoiceClientStatusObserver::ERROR_UNKNOWN); + setState(stateJoinSessionFailedWaiting); + break; + + //MARK: stateJoinSessionFailedWaiting + case stateJoinSessionFailedWaiting: + // Joining a channel failed, either due to a failed channel name -> sip url lookup or an error from the join message. + // Region crossings may leave this state and try the join again. + if(mSessionTerminateRequested) + { + setState(stateSessionTerminated); + } + break; + + //MARK: stateJail + case stateJail: + // We have given up. Do nothing. + break; + + } + + if(mAudioSession && mAudioSession->mParticipantsChanged) + { + mAudioSession->mParticipantsChanged = false; + mAudioSessionChanged = true; + } + + if(mAudioSessionChanged) + { + mAudioSessionChanged = false; + notifyParticipantObservers(); + } +} + +void LLVivoxVoiceClient::closeSocket(void) +{ + mSocket.reset(); + mConnected = false; +} + +void LLVivoxVoiceClient::loginSendMessage() +{ + std::ostringstream stream; + + bool autoPostCrashDumps = gSavedSettings.getBOOL("VivoxAutoPostCrashDumps"); + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.Login.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<AccountName>" << mAccountName << "</AccountName>" + << "<AccountPassword>" << mAccountPassword << "</AccountPassword>" + << "<AudioSessionAnswerMode>VerifyAnswer</AudioSessionAnswerMode>" + << "<EnableBuddiesAndPresence>true</EnableBuddiesAndPresence>" + << "<BuddyManagementMode>Application</BuddyManagementMode>" + << "<ParticipantPropertyFrequency>5</ParticipantPropertyFrequency>" + << (autoPostCrashDumps?"<AutopostCrashDumps>true</AutopostCrashDumps>":"") + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::logout() +{ + // Ensure that we'll re-request provisioning before logging in again + mAccountPassword.clear(); + mVoiceAccountServerURI.clear(); + + setState(stateLoggingOut); + logoutSendMessage(); +} + +void LLVivoxVoiceClient::logoutSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.Logout.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + mAccountHandle.clear(); + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::accountListBlockRulesSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "requesting block rules" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.ListBlockRules.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::accountListAutoAcceptRulesSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "requesting auto-accept rules" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.ListAutoAcceptRules.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::sessionGroupCreateSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "creating session group" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.Create.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<Type>Normal</Type>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::sessionCreateSendMessage(sessionState *session, bool startAudio, bool startText) +{ + LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; + + session->mCreateInProgress = true; + if(startAudio) + { + session->mMediaConnectInProgress = true; + } + + std::ostringstream stream; + stream + << "<Request requestId=\"" << session->mSIPURI << "\" action=\"Session.Create.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<URI>" << session->mSIPURI << "</URI>"; + + static const std::string allowed_chars = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789" + "-._~"; + + if(!session->mHash.empty()) + { + stream + << "<Password>" << LLURI::escape(session->mHash, allowed_chars) << "</Password>" + << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>"; + } + + stream + << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" + << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" + << "<Name>" << mChannelName << "</Name>" + << "</Request>\n\n\n"; + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio, bool startText) +{ + LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; + + session->mCreateInProgress = true; + if(startAudio) + { + session->mMediaConnectInProgress = true; + } + + std::string password; + if(!session->mHash.empty()) + { + static const std::string allowed_chars = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789" + "-._~" + ; + password = LLURI::escape(session->mHash, allowed_chars); + } + + std::ostringstream stream; + stream + << "<Request requestId=\"" << session->mSIPURI << "\" action=\"SessionGroup.AddSession.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "<URI>" << session->mSIPURI << "</URI>" + << "<Name>" << mChannelName << "</Name>" + << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" + << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" + << "<Password>" << password << "</Password>" + << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>" + << "</Request>\n\n\n" + ; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionMediaConnectSendMessage(sessionState *session) +{ + LL_DEBUGS("Voice") << "connecting audio to session handle: " << session->mHandle << LL_ENDL; + + session->mMediaConnectInProgress = true; + + std::ostringstream stream; + + stream + << "<Request requestId=\"" << session->mHandle << "\" action=\"Session.MediaConnect.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "<Media>Audio</Media>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionTextConnectSendMessage(sessionState *session) +{ + LL_DEBUGS("Voice") << "connecting text to session handle: " << session->mHandle << LL_ENDL; + + std::ostringstream stream; + + stream + << "<Request requestId=\"" << session->mHandle << "\" action=\"Session.TextConnect.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionTerminate() +{ + mSessionTerminateRequested = true; +} + +void LLVivoxVoiceClient::requestRelog() +{ + mSessionTerminateRequested = true; + mRelogRequested = true; +} + + +void LLVivoxVoiceClient::leaveAudioSession() +{ + if(mAudioSession) + { + LL_DEBUGS("Voice") << "leaving session: " << mAudioSession->mSIPURI << LL_ENDL; + + switch(getState()) + { + case stateNoChannel: + // In this case, we want to pretend the join failed so our state machine doesn't get stuck. + // Skip the join failed transition state so we don't send out error notifications. + setState(stateJoinSessionFailedWaiting); + break; + case stateJoiningSession: + case stateSessionJoined: + case stateRunning: + if(!mAudioSession->mHandle.empty()) + { + +#if RECORD_EVERYTHING + // HACK: for testing only + // Save looped recording + std::string savepath("/tmp/vivoxrecording"); + { + time_t now = time(NULL); + const size_t BUF_SIZE = 64; + char time_str[BUF_SIZE]; /* Flawfinder: ignore */ + + strftime(time_str, BUF_SIZE, "%Y-%m-%dT%H:%M:%SZ", gmtime(&now)); + savepath += time_str; + } + recordingLoopSave(savepath); +#endif + + sessionMediaDisconnectSendMessage(mAudioSession); + setState(stateLeavingSession); + } + else + { + LL_WARNS("Voice") << "called with no session handle" << LL_ENDL; + setState(stateSessionTerminated); + } + break; + case stateJoinSessionFailed: + case stateJoinSessionFailedWaiting: + setState(stateSessionTerminated); + break; + + default: + LL_WARNS("Voice") << "called from unknown state" << LL_ENDL; + break; + } + } + else + { + LL_WARNS("Voice") << "called with no active session" << LL_ENDL; + setState(stateSessionTerminated); + } +} + +void LLVivoxVoiceClient::sessionTerminateSendMessage(sessionState *session) +{ + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Sending Session.Terminate with handle " << session->mHandle << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.Terminate.1\">" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionGroupTerminateSendMessage(sessionState *session) +{ + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Sending SessionGroup.Terminate with handle " << session->mGroupHandle << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.Terminate.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionMediaDisconnectSendMessage(sessionState *session) +{ + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Sending Session.MediaDisconnect with handle " << session->mHandle << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.MediaDisconnect.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "<Media>Audio</Media>" + << "</Request>\n\n\n"; + + writeString(stream.str()); + +} + +void LLVivoxVoiceClient::sessionTextDisconnectSendMessage(sessionState *session) +{ + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Sending Session.TextDisconnect with handle " << session->mHandle << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.TextDisconnect.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::getCaptureDevicesSendMessage() +{ + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.GetCaptureDevices.1\">" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::getRenderDevicesSendMessage() +{ + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.GetRenderDevices.1\">" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::clearCaptureDevices() +{ + LL_DEBUGS("Voice") << "called" << LL_ENDL; + mCaptureDevices.clear(); +} + +void LLVivoxVoiceClient::addCaptureDevice(const std::string& name) +{ + LL_DEBUGS("Voice") << name << LL_ENDL; + + mCaptureDevices.push_back(name); +} + +LLVoiceDeviceList& LLVivoxVoiceClient::getCaptureDevices() +{ + return mCaptureDevices; +} + +void LLVivoxVoiceClient::setCaptureDevice(const std::string& name) +{ + if(name == "Default") + { + if(!mCaptureDevice.empty()) + { + mCaptureDevice.clear(); + mCaptureDeviceDirty = true; + } + } + else + { + if(mCaptureDevice != name) + { + mCaptureDevice = name; + mCaptureDeviceDirty = true; + } + } +} + +void LLVivoxVoiceClient::clearRenderDevices() +{ + LL_DEBUGS("Voice") << "called" << LL_ENDL; + mRenderDevices.clear(); +} + +void LLVivoxVoiceClient::addRenderDevice(const std::string& name) +{ + LL_DEBUGS("Voice") << name << LL_ENDL; + mRenderDevices.push_back(name); +} + +LLVoiceDeviceList& LLVivoxVoiceClient::getRenderDevices() +{ + return mRenderDevices; +} + +void LLVivoxVoiceClient::setRenderDevice(const std::string& name) +{ + if(name == "Default") + { + if(!mRenderDevice.empty()) + { + mRenderDevice.clear(); + mRenderDeviceDirty = true; + } + } + else + { + if(mRenderDevice != name) + { + mRenderDevice = name; + mRenderDeviceDirty = true; + } + } + +} + +void LLVivoxVoiceClient::tuningStart() +{ + mTuningMode = true; + LL_DEBUGS("Voice") << "Starting tuning" << LL_ENDL; + if(getState() >= stateNoChannel) + { + LL_DEBUGS("Voice") << "no channel" << LL_ENDL; + sessionTerminate(); + } +} + +void LLVivoxVoiceClient::tuningStop() +{ + mTuningMode = false; +} + +bool LLVivoxVoiceClient::inTuningMode() +{ + bool result = false; + switch(getState()) + { + case stateMicTuningRunning: + result = true; + break; + default: + break; + } + return result; +} + +void LLVivoxVoiceClient::tuningRenderStartSendMessage(const std::string& name, bool loop) +{ + mTuningAudioFile = name; + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.RenderAudioStart.1\">" + << "<SoundFilePath>" << mTuningAudioFile << "</SoundFilePath>" + << "<Loop>" << (loop?"1":"0") << "</Loop>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::tuningRenderStopSendMessage() +{ + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.RenderAudioStop.1\">" + << "<SoundFilePath>" << mTuningAudioFile << "</SoundFilePath>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::tuningCaptureStartSendMessage(int duration) +{ + LL_DEBUGS("Voice") << "sending CaptureAudioStart" << LL_ENDL; + + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.CaptureAudioStart.1\">" + << "<Duration>" << duration << "</Duration>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::tuningCaptureStopSendMessage() +{ + LL_DEBUGS("Voice") << "sending CaptureAudioStop" << LL_ENDL; + + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.CaptureAudioStop.1\">" + << "</Request>\n\n\n"; + + writeString(stream.str()); + + mTuningEnergy = 0.0f; +} + +void LLVivoxVoiceClient::tuningSetMicVolume(float volume) +{ + int scaled_volume = scale_mic_volume(volume); + + if(scaled_volume != mTuningMicVolume) + { + mTuningMicVolume = scaled_volume; + mTuningMicVolumeDirty = true; + } +} + +void LLVivoxVoiceClient::tuningSetSpeakerVolume(float volume) +{ + int scaled_volume = scale_speaker_volume(volume); + + if(scaled_volume != mTuningSpeakerVolume) + { + mTuningSpeakerVolume = scaled_volume; + mTuningSpeakerVolumeDirty = true; + } +} + +float LLVivoxVoiceClient::tuningGetEnergy(void) +{ + return mTuningEnergy; +} + +bool LLVivoxVoiceClient::deviceSettingsAvailable() +{ + bool result = true; + + if(!mConnected) + result = false; + + if(mRenderDevices.empty()) + result = false; + + return result; +} + +void LLVivoxVoiceClient::refreshDeviceLists(bool clearCurrentList) +{ + if(clearCurrentList) + { + clearCaptureDevices(); + clearRenderDevices(); + } + getCaptureDevicesSendMessage(); + getRenderDevicesSendMessage(); +} + +void LLVivoxVoiceClient::daemonDied() +{ + // The daemon died, so the connection is gone. Reset everything and start over. + LL_WARNS("Voice") << "Connection to vivox daemon lost. Resetting state."<< LL_ENDL; + + // Try to relaunch the daemon + setState(stateDisableCleanup); +} + +void LLVivoxVoiceClient::giveUp() +{ + // All has failed. Clean up and stop trying. + closeSocket(); + deleteAllSessions(); + deleteAllBuddies(); + + setState(stateJail); +} + +static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVector3d &pos, LLVector3 &vel) +{ + F32 nat[3], nup[3], nl[3], nvel[3]; // the new at, up, left vectors and the new position and velocity + F64 npos[3]; + + // The original XML command was sent like this: + /* + << "<Position>" + << "<X>" << pos[VX] << "</X>" + << "<Y>" << pos[VZ] << "</Y>" + << "<Z>" << pos[VY] << "</Z>" + << "</Position>" + << "<Velocity>" + << "<X>" << mAvatarVelocity[VX] << "</X>" + << "<Y>" << mAvatarVelocity[VZ] << "</Y>" + << "<Z>" << mAvatarVelocity[VY] << "</Z>" + << "</Velocity>" + << "<AtOrientation>" + << "<X>" << l.mV[VX] << "</X>" + << "<Y>" << u.mV[VX] << "</Y>" + << "<Z>" << a.mV[VX] << "</Z>" + << "</AtOrientation>" + << "<UpOrientation>" + << "<X>" << l.mV[VZ] << "</X>" + << "<Y>" << u.mV[VY] << "</Y>" + << "<Z>" << a.mV[VZ] << "</Z>" + << "</UpOrientation>" + << "<LeftOrientation>" + << "<X>" << l.mV [VY] << "</X>" + << "<Y>" << u.mV [VZ] << "</Y>" + << "<Z>" << a.mV [VY] << "</Z>" + << "</LeftOrientation>"; + */ + +#if 1 + // This was the original transform done when building the XML command + nat[0] = left.mV[VX]; + nat[1] = up.mV[VX]; + nat[2] = at.mV[VX]; + + nup[0] = left.mV[VZ]; + nup[1] = up.mV[VY]; + nup[2] = at.mV[VZ]; + + nl[0] = left.mV[VY]; + nl[1] = up.mV[VZ]; + nl[2] = at.mV[VY]; + + npos[0] = pos.mdV[VX]; + npos[1] = pos.mdV[VZ]; + npos[2] = pos.mdV[VY]; + + nvel[0] = vel.mV[VX]; + nvel[1] = vel.mV[VZ]; + nvel[2] = vel.mV[VY]; + + for(int i=0;i<3;++i) { + at.mV[i] = nat[i]; + up.mV[i] = nup[i]; + left.mV[i] = nl[i]; + pos.mdV[i] = npos[i]; + } + + // This was the original transform done in the SDK + nat[0] = at.mV[2]; + nat[1] = 0; // y component of at vector is always 0, this was up[2] + nat[2] = -1 * left.mV[2]; + + // We override whatever the application gives us + nup[0] = 0; // x component of up vector is always 0 + nup[1] = 1; // y component of up vector is always 1 + nup[2] = 0; // z component of up vector is always 0 + + nl[0] = at.mV[0]; + nl[1] = 0; // y component of left vector is always zero, this was up[0] + nl[2] = -1 * left.mV[0]; + + npos[2] = pos.mdV[2] * -1.0; + npos[1] = pos.mdV[1]; + npos[0] = pos.mdV[0]; + + for(int i=0;i<3;++i) { + at.mV[i] = nat[i]; + up.mV[i] = nup[i]; + left.mV[i] = nl[i]; + pos.mdV[i] = npos[i]; + } +#else + // This is the compose of the two transforms (at least, that's what I'm trying for) + nat[0] = at.mV[VX]; + nat[1] = 0; // y component of at vector is always 0, this was up[2] + nat[2] = -1 * up.mV[VZ]; + + // We override whatever the application gives us + nup[0] = 0; // x component of up vector is always 0 + nup[1] = 1; // y component of up vector is always 1 + nup[2] = 0; // z component of up vector is always 0 + + nl[0] = left.mV[VX]; + nl[1] = 0; // y component of left vector is always zero, this was up[0] + nl[2] = -1 * left.mV[VY]; + + npos[0] = pos.mdV[VX]; + npos[1] = pos.mdV[VZ]; + npos[2] = pos.mdV[VY] * -1.0; + + nvel[0] = vel.mV[VX]; + nvel[1] = vel.mV[VZ]; + nvel[2] = vel.mV[VY]; + + for(int i=0;i<3;++i) { + at.mV[i] = nat[i]; + up.mV[i] = nup[i]; + left.mV[i] = nl[i]; + pos.mdV[i] = npos[i]; + } + +#endif +} + +void LLVivoxVoiceClient::sendPositionalUpdate(void) +{ + std::ostringstream stream; + + if(mSpatialCoordsDirty) + { + LLVector3 l, u, a, vel; + LLVector3d pos; + + mSpatialCoordsDirty = false; + + // Always send both speaker and listener positions together. + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.Set3DPosition.1\">" + << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>"; + + stream << "<SpeakerPosition>"; + +// LL_DEBUGS("Voice") << "Sending speaker position " << mAvatarPosition << LL_ENDL; + l = mAvatarRot.getLeftRow(); + u = mAvatarRot.getUpRow(); + a = mAvatarRot.getFwdRow(); + pos = mAvatarPosition; + vel = mAvatarVelocity; + + // SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore. + // The old transform is replicated by this function. + oldSDKTransform(l, u, a, pos, vel); + + stream + << "<Position>" + << "<X>" << pos.mdV[VX] << "</X>" + << "<Y>" << pos.mdV[VY] << "</Y>" + << "<Z>" << pos.mdV[VZ] << "</Z>" + << "</Position>" + << "<Velocity>" + << "<X>" << vel.mV[VX] << "</X>" + << "<Y>" << vel.mV[VY] << "</Y>" + << "<Z>" << vel.mV[VZ] << "</Z>" + << "</Velocity>" + << "<AtOrientation>" + << "<X>" << a.mV[VX] << "</X>" + << "<Y>" << a.mV[VY] << "</Y>" + << "<Z>" << a.mV[VZ] << "</Z>" + << "</AtOrientation>" + << "<UpOrientation>" + << "<X>" << u.mV[VX] << "</X>" + << "<Y>" << u.mV[VY] << "</Y>" + << "<Z>" << u.mV[VZ] << "</Z>" + << "</UpOrientation>" + << "<LeftOrientation>" + << "<X>" << l.mV [VX] << "</X>" + << "<Y>" << l.mV [VY] << "</Y>" + << "<Z>" << l.mV [VZ] << "</Z>" + << "</LeftOrientation>"; + + stream << "</SpeakerPosition>"; + + stream << "<ListenerPosition>"; + + LLVector3d earPosition; + LLVector3 earVelocity; + LLMatrix3 earRot; + + switch(mEarLocation) + { + case earLocCamera: + default: + earPosition = mCameraPosition; + earVelocity = mCameraVelocity; + earRot = mCameraRot; + break; + + case earLocAvatar: + earPosition = mAvatarPosition; + earVelocity = mAvatarVelocity; + earRot = mAvatarRot; + break; + + case earLocMixed: + earPosition = mAvatarPosition; + earVelocity = mAvatarVelocity; + earRot = mCameraRot; + break; + } + + l = earRot.getLeftRow(); + u = earRot.getUpRow(); + a = earRot.getFwdRow(); + pos = earPosition; + vel = earVelocity; + +// LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL; + + oldSDKTransform(l, u, a, pos, vel); + + stream + << "<Position>" + << "<X>" << pos.mdV[VX] << "</X>" + << "<Y>" << pos.mdV[VY] << "</Y>" + << "<Z>" << pos.mdV[VZ] << "</Z>" + << "</Position>" + << "<Velocity>" + << "<X>" << vel.mV[VX] << "</X>" + << "<Y>" << vel.mV[VY] << "</Y>" + << "<Z>" << vel.mV[VZ] << "</Z>" + << "</Velocity>" + << "<AtOrientation>" + << "<X>" << a.mV[VX] << "</X>" + << "<Y>" << a.mV[VY] << "</Y>" + << "<Z>" << a.mV[VZ] << "</Z>" + << "</AtOrientation>" + << "<UpOrientation>" + << "<X>" << u.mV[VX] << "</X>" + << "<Y>" << u.mV[VY] << "</Y>" + << "<Z>" << u.mV[VZ] << "</Z>" + << "</UpOrientation>" + << "<LeftOrientation>" + << "<X>" << l.mV [VX] << "</X>" + << "<Y>" << l.mV [VY] << "</Y>" + << "<Z>" << l.mV [VZ] << "</Z>" + << "</LeftOrientation>"; + + + stream << "</ListenerPosition>"; + + stream << "</Request>\n\n\n"; + } + + if(mAudioSession && (mAudioSession->mVolumeDirty || mAudioSession->mMuteDirty)) + { + participantMap::iterator iter = mAudioSession->mParticipantsByURI.begin(); + + mAudioSession->mVolumeDirty = false; + mAudioSession->mMuteDirty = false; + + for(; iter != mAudioSession->mParticipantsByURI.end(); iter++) + { + participantState *p = iter->second; + + if(p->mVolumeDirty) + { + // Can't set volume/mute for yourself + if(!p->mIsSelf) + { + // scale from the range 0.0-1.0 to vivox volume in the range 0-100 + S32 volume = llround(p->mVolume / VOLUME_SCALE_VIVOX); + bool mute = p->mOnMuteList; + + if(mute) + { + // SetParticipantMuteForMe doesn't work in p2p sessions. + // If we want the user to be muted, set their volume to 0 as well. + // This isn't perfect, but it will at least reduce their volume to a minimum. + volume = 0; + // Mark the current volume level as set to prevent incoming events + // changing it to 0, so that we can return to it when unmuting. + p->mVolumeSet = true; + } + + if(volume == 0) + { + mute = true; + } + + LL_DEBUGS("Voice") << "Setting volume/mute for avatar " << p->mAvatarID << " to " << volume << (mute?"/true":"/false") << LL_ENDL; + + // SLIM SDK: Send both volume and mute commands. + + // Send a "volume for me" command for the user. + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetParticipantVolumeForMe.1\">" + << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>" + << "<ParticipantURI>" << p->mURI << "</ParticipantURI>" + << "<Volume>" << volume << "</Volume>" + << "</Request>\n\n\n"; + + if(!mAudioSession->mIsP2P) + { + // Send a "mute for me" command for the user + // Doesn't work in P2P sessions + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetParticipantMuteForMe.1\">" + << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>" + << "<ParticipantURI>" << p->mURI << "</ParticipantURI>" + << "<Mute>" << (mute?"1":"0") << "</Mute>" + << "<Scope>Audio</Scope>" + << "</Request>\n\n\n"; + } + } + + p->mVolumeDirty = false; + } + } + } + + buildLocalAudioUpdates(stream); + + if(!stream.str().empty()) + { + writeString(stream.str()); + } + + // Friends list updates can be huge, especially on the first voice login of an account with lots of friends. + // Batching them all together can choke SLVoice, so send them in separate writes. + sendFriendsListUpdates(); +} + +void LLVivoxVoiceClient::buildSetCaptureDevice(std::ostringstream &stream) +{ + if(mCaptureDeviceDirty) + { + LL_DEBUGS("Voice") << "Setting input device = \"" << mCaptureDevice << "\"" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetCaptureDevice.1\">" + << "<CaptureDeviceSpecifier>" << mCaptureDevice << "</CaptureDeviceSpecifier>" + << "</Request>" + << "\n\n\n"; + + mCaptureDeviceDirty = false; + } +} + +void LLVivoxVoiceClient::buildSetRenderDevice(std::ostringstream &stream) +{ + if(mRenderDeviceDirty) + { + LL_DEBUGS("Voice") << "Setting output device = \"" << mRenderDevice << "\"" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetRenderDevice.1\">" + << "<RenderDeviceSpecifier>" << mRenderDevice << "</RenderDeviceSpecifier>" + << "</Request>" + << "\n\n\n"; + mRenderDeviceDirty = false; + } +} + +void LLVivoxVoiceClient::buildLocalAudioUpdates(std::ostringstream &stream) +{ + buildSetCaptureDevice(stream); + + buildSetRenderDevice(stream); + + if(mPTTDirty) + { + mPTTDirty = false; + + // Send a local mute command. + // NOTE that the state of "PTT" is the inverse of "local mute". + // (i.e. when PTT is true, we send a mute command with "false", and vice versa) + + LL_DEBUGS("Voice") << "Sending MuteLocalMic command with parameter " << (mPTT?"false":"true") << LL_ENDL; + + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>" << (mPTT?"false":"true") << "</Value>" + << "</Request>\n\n\n"; + + } + + if(mSpeakerMuteDirty) + { + const char *muteval = ((mSpeakerVolume <= scale_speaker_volume(0))?"true":"false"); + + mSpeakerMuteDirty = false; + + LL_INFOS("Voice") << "Setting speaker mute to " << muteval << LL_ENDL; + + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalSpeaker.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>" << muteval << "</Value>" + << "</Request>\n\n\n"; + + } + + if(mSpeakerVolumeDirty) + { + mSpeakerVolumeDirty = false; + + LL_INFOS("Voice") << "Setting speaker volume to " << mSpeakerVolume << LL_ENDL; + + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.SetLocalSpeakerVolume.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>" << mSpeakerVolume << "</Value>" + << "</Request>\n\n\n"; + + } + + if(mMicVolumeDirty) + { + mMicVolumeDirty = false; + + LL_INFOS("Voice") << "Setting mic volume to " << mMicVolume << LL_ENDL; + + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.SetLocalMicVolume.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>" << mMicVolume << "</Value>" + << "</Request>\n\n\n"; + } + + +} + +void LLVivoxVoiceClient::checkFriend(const LLUUID& id) +{ + std::string name; + buddyListEntry *buddy = findBuddy(id); + + // Make sure we don't add a name before it's been looked up. + if(gCacheName->getFullName(id, name)) + { + + const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id); + bool canSeeMeOnline = false; + if(relationInfo && relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS)) + canSeeMeOnline = true; + + // When we get here, mNeedsSend is true and mInSLFriends is false. Change them as necessary. + + if(buddy) + { + // This buddy is already in both lists. + + if(name != buddy->mDisplayName) + { + // The buddy is in the list with the wrong name. Update it with the correct name. + LL_WARNS("Voice") << "Buddy " << id << " has wrong name (\"" << buddy->mDisplayName << "\" should be \"" << name << "\"), updating."<< LL_ENDL; + buddy->mDisplayName = name; + buddy->mNeedsNameUpdate = true; // This will cause the buddy to be resent. + } + } + else + { + // This buddy was not in the vivox list, needs to be added. + buddy = addBuddy(sipURIFromID(id), name); + buddy->mUUID = id; + } + + // In all the above cases, the buddy is in the SL friends list (which is how we got here). + buddy->mInSLFriends = true; + buddy->mCanSeeMeOnline = canSeeMeOnline; + buddy->mNameResolved = true; + + } + else + { + // This name hasn't been looked up yet. Don't do anything with this buddy list entry until it has. + if(buddy) + { + buddy->mNameResolved = false; + } + + // Initiate a lookup. + // The "lookup completed" callback will ensure that the friends list is rechecked after it completes. + lookupName(id); + } +} + +void LLVivoxVoiceClient::clearAllLists() +{ + // FOR TESTING ONLY + + // This will send the necessary commands to delete ALL buddies, autoaccept rules, and block rules SLVoice tells us about. + buddyListMap::iterator buddy_it; + for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end();) + { + buddyListEntry *buddy = buddy_it->second; + buddy_it++; + + std::ostringstream stream; + + if(buddy->mInVivoxBuddies) + { + // delete this entry from the vivox buddy list + buddy->mInVivoxBuddies = false; + LL_DEBUGS("Voice") << "delete " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddyDelete.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" + << "</Request>\n\n\n"; + } + + if(buddy->mHasBlockListEntry) + { + // Delete the associated block list entry (so the block list doesn't fill up with junk) + buddy->mHasBlockListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BlockMask>" << buddy->mURI << "</BlockMask>" + << "</Request>\n\n\n"; + } + if(buddy->mHasAutoAcceptListEntry) + { + // Delete the associated auto-accept list entry (so the auto-accept list doesn't fill up with junk) + buddy->mHasAutoAcceptListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" + << "</Request>\n\n\n"; + } + + writeString(stream.str()); + + } +} + +void LLVivoxVoiceClient::sendFriendsListUpdates() +{ + if(mBuddyListMapPopulated && mBlockRulesListReceived && mAutoAcceptRulesListReceived && mFriendsListDirty) + { + mFriendsListDirty = false; + + if(0) + { + // FOR TESTING ONLY -- clear all buddy list, block list, and auto-accept list entries. + clearAllLists(); + return; + } + + LL_INFOS("Voice") << "Checking vivox buddy list against friends list..." << LL_ENDL; + + buddyListMap::iterator buddy_it; + for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) + { + // reset the temp flags in the local buddy list + buddy_it->second->mInSLFriends = false; + } + + // correlate with the friends list + { + LLCollectAllBuddies collect; + LLAvatarTracker::instance().applyFunctor(collect); + LLCollectAllBuddies::buddy_map_t::const_iterator it = collect.mOnline.begin(); + LLCollectAllBuddies::buddy_map_t::const_iterator end = collect.mOnline.end(); + + for ( ; it != end; ++it) + { + checkFriend(it->second); + } + it = collect.mOffline.begin(); + end = collect.mOffline.end(); + for ( ; it != end; ++it) + { + checkFriend(it->second); + } + } + + LL_INFOS("Voice") << "Sending friend list updates..." << LL_ENDL; + + for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end();) + { + buddyListEntry *buddy = buddy_it->second; + buddy_it++; + + // Ignore entries that aren't resolved yet. + if(buddy->mNameResolved) + { + std::ostringstream stream; + + if(buddy->mInSLFriends && (!buddy->mInVivoxBuddies || buddy->mNeedsNameUpdate)) + { + if(mNumberOfAliases > 0) + { + // Add (or update) this entry in the vivox buddy list + buddy->mInVivoxBuddies = true; + buddy->mNeedsNameUpdate = false; + LL_DEBUGS("Voice") << "add/update " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddySet.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" + << "<DisplayName>" << buddy->mDisplayName << "</DisplayName>" + << "<BuddyData></BuddyData>" // Without this, SLVoice doesn't seem to parse the command. + << "<GroupID>0</GroupID>" + << "</Request>\n\n\n"; + } + } + else if(!buddy->mInSLFriends) + { + // This entry no longer exists in your SL friends list. Remove all traces of it from the Vivox buddy list. + if(buddy->mInVivoxBuddies) + { + // delete this entry from the vivox buddy list + buddy->mInVivoxBuddies = false; + LL_DEBUGS("Voice") << "delete " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddyDelete.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" + << "</Request>\n\n\n"; + } + + if(buddy->mHasBlockListEntry) + { + // Delete the associated block list entry, if any + buddy->mHasBlockListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BlockMask>" << buddy->mURI << "</BlockMask>" + << "</Request>\n\n\n"; + } + if(buddy->mHasAutoAcceptListEntry) + { + // Delete the associated auto-accept list entry, if any + buddy->mHasAutoAcceptListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" + << "</Request>\n\n\n"; + } + } + + if(buddy->mInSLFriends) + { + + if(buddy->mCanSeeMeOnline) + { + // Buddy should not be blocked. + + // If this buddy doesn't already have either a block or autoaccept list entry, we'll update their status when we receive a SubscriptionEvent. + + // If the buddy has a block list entry, delete it. + if(buddy->mHasBlockListEntry) + { + buddy->mHasBlockListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BlockMask>" << buddy->mURI << "</BlockMask>" + << "</Request>\n\n\n"; + + + // If we just deleted a block list entry, add an auto-accept entry. + if(!buddy->mHasAutoAcceptListEntry) + { + buddy->mHasAutoAcceptListEntry = true; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.CreateAutoAcceptRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" + << "<AutoAddAsBuddy>0</AutoAddAsBuddy>" + << "</Request>\n\n\n"; + } + } + } + else + { + // Buddy should be blocked. + + // If this buddy doesn't already have either a block or autoaccept list entry, we'll update their status when we receive a SubscriptionEvent. + + // If this buddy has an autoaccept entry, delete it + if(buddy->mHasAutoAcceptListEntry) + { + buddy->mHasAutoAcceptListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" + << "</Request>\n\n\n"; + + // If we just deleted an auto-accept entry, add a block list entry. + if(!buddy->mHasBlockListEntry) + { + buddy->mHasBlockListEntry = true; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.CreateBlockRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BlockMask>" << buddy->mURI << "</BlockMask>" + << "<PresenceOnly>1</PresenceOnly>" + << "</Request>\n\n\n"; + } + } + } + + if(!buddy->mInSLFriends && !buddy->mInVivoxBuddies) + { + // Delete this entry from the local buddy list. This should NOT invalidate the iterator, + // since it has already been incremented to the next entry. + deleteBuddy(buddy->mURI); + } + + } + writeString(stream.str()); + } + } + } +} + +///////////////////////////// +// Response/Event handlers + +void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &statusString, std::string &connectorHandle, std::string &versionID) +{ + if(statusCode != 0) + { + LL_WARNS("Voice") << "Connector.Create response failure: " << statusString << LL_ENDL; + setState(stateConnectorFailed); + LLSD args; + std::stringstream errs; + errs << mVoiceAccountServerURI << "\n:UDP: 3478, 3479, 5060, 5062, 12000-17000"; + args["HOSTID"] = errs.str(); + if (LLGridManager::getInstance()->isSystemGrid()) + { + LLNotificationsUtil::add("NoVoiceConnect", args); + } + else + { + LLNotificationsUtil::add("NoVoiceConnect-GIAB", args); + } + } + else + { + // Connector created, move forward. + LL_INFOS("Voice") << "Connector.Create succeeded, Vivox SDK version is " << versionID << LL_ENDL; + mVoiceVersion.serverVersion = versionID; + mConnectorHandle = connectorHandle; + if(getState() == stateConnectorStarting) + { + setState(stateConnectorStarted); + } + } +} + +void LLVivoxVoiceClient::loginResponse(int statusCode, std::string &statusString, std::string &accountHandle, int numberOfAliases) +{ + LL_DEBUGS("Voice") << "Account.Login response (" << statusCode << "): " << statusString << LL_ENDL; + + // Status code of 20200 means "bad password". We may want to special-case that at some point. + + if ( statusCode == 401 ) + { + // Login failure which is probably caused by the delay after a user's password being updated. + LL_INFOS("Voice") << "Account.Login response failure (" << statusCode << "): " << statusString << LL_ENDL; + setState(stateLoginRetry); + } + else if(statusCode != 0) + { + LL_WARNS("Voice") << "Account.Login response failure (" << statusCode << "): " << statusString << LL_ENDL; + setState(stateLoginFailed); + } + else + { + // Login succeeded, move forward. + mAccountHandle = accountHandle; + mNumberOfAliases = numberOfAliases; + // This needs to wait until the AccountLoginStateChangeEvent is received. +// if(getState() == stateLoggingIn) +// { +// setState(stateLoggedIn); +// } + } +} + +void LLVivoxVoiceClient::sessionCreateResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle) +{ + sessionState *session = findSessionBeingCreatedByURI(requestId); + + if(session) + { + session->mCreateInProgress = false; + } + + if(statusCode != 0) + { + LL_WARNS("Voice") << "Session.Create response failure (" << statusCode << "): " << statusString << LL_ENDL; + if(session) + { + session->mErrorStatusCode = statusCode; + session->mErrorStatusString = statusString; + if(session == mAudioSession) + { + setState(stateJoinSessionFailed); + } + else + { + reapSession(session); + } + } + } + else + { + LL_INFOS("Voice") << "Session.Create response received (success), session handle is " << sessionHandle << LL_ENDL; + if(session) + { + setSessionHandle(session, sessionHandle); + } + } +} + +void LLVivoxVoiceClient::sessionGroupAddSessionResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle) +{ + sessionState *session = findSessionBeingCreatedByURI(requestId); + + if(session) + { + session->mCreateInProgress = false; + } + + if(statusCode != 0) + { + LL_WARNS("Voice") << "SessionGroup.AddSession response failure (" << statusCode << "): " << statusString << LL_ENDL; + if(session) + { + session->mErrorStatusCode = statusCode; + session->mErrorStatusString = statusString; + if(session == mAudioSession) + { + setState(stateJoinSessionFailed); + } + else + { + reapSession(session); + } + } + } + else + { + LL_DEBUGS("Voice") << "SessionGroup.AddSession response received (success), session handle is " << sessionHandle << LL_ENDL; + if(session) + { + setSessionHandle(session, sessionHandle); + } + } +} + +void LLVivoxVoiceClient::sessionConnectResponse(std::string &requestId, int statusCode, std::string &statusString) +{ + sessionState *session = findSession(requestId); + if(statusCode != 0) + { + LL_WARNS("Voice") << "Session.Connect response failure (" << statusCode << "): " << statusString << LL_ENDL; + if(session) + { + session->mMediaConnectInProgress = false; + session->mErrorStatusCode = statusCode; + session->mErrorStatusString = statusString; + if(session == mAudioSession) + setState(stateJoinSessionFailed); + } + } + else + { + LL_DEBUGS("Voice") << "Session.Connect response received (success)" << LL_ENDL; + } +} + +void LLVivoxVoiceClient::logoutResponse(int statusCode, std::string &statusString) +{ + if(statusCode != 0) + { + LL_WARNS("Voice") << "Account.Logout response failure: " << statusString << LL_ENDL; + // Should this ever fail? do we care if it does? + } +} + +void LLVivoxVoiceClient::connectorShutdownResponse(int statusCode, std::string &statusString) +{ + if(statusCode != 0) + { + LL_WARNS("Voice") << "Connector.InitiateShutdown response failure: " << statusString << LL_ENDL; + // Should this ever fail? do we care if it does? + } + + mConnected = false; + + if(getState() == stateConnectorStopping) + { + setState(stateConnectorStopped); + } +} + +void LLVivoxVoiceClient::sessionAddedEvent( + std::string &uriString, + std::string &alias, + std::string &sessionHandle, + std::string &sessionGroupHandle, + bool isChannel, + bool incoming, + std::string &nameString, + std::string &applicationString) +{ + sessionState *session = NULL; + + LL_INFOS("Voice") << "session " << uriString << ", alias " << alias << ", name " << nameString << " handle " << sessionHandle << LL_ENDL; + + session = addSession(uriString, sessionHandle); + if(session) + { + session->mGroupHandle = sessionGroupHandle; + session->mIsChannel = isChannel; + session->mIncoming = incoming; + session->mAlias = alias; + + // Generate a caller UUID -- don't need to do this for channels + if(!session->mIsChannel) + { + if(IDFromName(session->mSIPURI, session->mCallerID)) + { + // Normal URI(base64-encoded UUID) + } + else if(!session->mAlias.empty() && IDFromName(session->mAlias, session->mCallerID)) + { + // Wrong URI, but an alias is available. Stash the incoming URI as an alternate + session->mAlternateSIPURI = session->mSIPURI; + + // and generate a proper URI from the ID. + setSessionURI(session, sipURIFromID(session->mCallerID)); + } + else + { + LL_INFOS("Voice") << "Could not generate caller id from uri, using hash of uri " << session->mSIPURI << LL_ENDL; + setUUIDFromStringHash(session->mCallerID, session->mSIPURI); + session->mSynthesizedCallerID = true; + + // Can't look up the name in this case -- we have to extract it from the URI. + std::string namePortion = nameFromsipURI(session->mSIPURI); + if(namePortion.empty()) + { + // Didn't seem to be a SIP URI, just use the whole provided name. + namePortion = nameString; + } + + // Some incoming names may be separated with an underscore instead of a space. Fix this. + LLStringUtil::replaceChar(namePortion, '_', ' '); + + // Act like we just finished resolving the name (this stores it in all the right places) + avatarNameResolved(session->mCallerID, namePortion); + } + + LL_INFOS("Voice") << "caller ID: " << session->mCallerID << LL_ENDL; + + if(!session->mSynthesizedCallerID) + { + // If we got here, we don't have a proper name. Initiate a lookup. + lookupName(session->mCallerID); + } + } + } +} + +void LLVivoxVoiceClient::sessionGroupAddedEvent(std::string &sessionGroupHandle) +{ + LL_DEBUGS("Voice") << "handle " << sessionGroupHandle << LL_ENDL; + +#if USE_SESSION_GROUPS + if(mMainSessionGroupHandle.empty()) + { + // This is the first (i.e. "main") session group. Save its handle. + mMainSessionGroupHandle = sessionGroupHandle; + } + else + { + LL_DEBUGS("Voice") << "Already had a session group handle " << mMainSessionGroupHandle << LL_ENDL; + } +#endif +} + +void LLVivoxVoiceClient::joinedAudioSession(sessionState *session) +{ + LL_DEBUGS("Voice") << "Joined Audio Session" << LL_ENDL; + if(mAudioSession != session) + { + sessionState *oldSession = mAudioSession; + + mAudioSession = session; + mAudioSessionChanged = true; + + // The old session may now need to be deleted. + reapSession(oldSession); + } + + // This is the session we're joining. + if(getState() == stateJoiningSession) + { + setState(stateSessionJoined); + + // SLIM SDK: we don't always receive a participant state change for ourselves when joining a channel now. + // Add the current user as a participant here. + participantState *participant = session->addParticipant(sipURIFromName(mAccountName)); + if(participant) + { + participant->mIsSelf = true; + lookupName(participant->mAvatarID); + + LL_INFOS("Voice") << "added self as participant \"" << participant->mAccountName + << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; + } + + if(!session->mIsChannel) + { + // this is a p2p session. Make sure the other end is added as a participant. + participantState *participant = session->addParticipant(session->mSIPURI); + if(participant) + { + if(participant->mAvatarIDValid) + { + lookupName(participant->mAvatarID); + } + else if(!session->mName.empty()) + { + participant->mDisplayName = session->mName; + avatarNameResolved(participant->mAvatarID, session->mName); + } + + // TODO: Question: Do we need to set up mAvatarID/mAvatarIDValid here? + LL_INFOS("Voice") << "added caller as participant \"" << participant->mAccountName + << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; + } + } + } +} + +void LLVivoxVoiceClient::sessionRemovedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle) +{ + LL_INFOS("Voice") << "handle " << sessionHandle << LL_ENDL; + + sessionState *session = findSession(sessionHandle); + if(session) + { + leftAudioSession(session); + + // This message invalidates the session's handle. Set it to empty. + setSessionHandle(session); + + // This also means that the session's session group is now empty. + // Terminate the session group so it doesn't leak. + sessionGroupTerminateSendMessage(session); + + // Reset the media state (we now have no info) + session->mMediaStreamState = streamStateUnknown; + session->mTextStreamState = streamStateUnknown; + + // Conditionally delete the session + reapSession(session); + } + else + { + LL_WARNS("Voice") << "unknown session " << sessionHandle << " removed" << LL_ENDL; + } +} + +void LLVivoxVoiceClient::reapSession(sessionState *session) +{ + if(session) + { + if(!session->mHandle.empty()) + { + LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (non-null session handle)" << LL_ENDL; + } + else if(session->mCreateInProgress) + { + LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (create in progress)" << LL_ENDL; + } + else if(session->mMediaConnectInProgress) + { + LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (connect in progress)" << LL_ENDL; + } + else if(session == mAudioSession) + { + LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (it's the current session)" << LL_ENDL; + } + else if(session == mNextAudioSession) + { + LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (it's the next session)" << LL_ENDL; + } + else + { + // TODO: Question: Should we check for queued text messages here? + // We don't have a reason to keep tracking this session, so just delete it. + LL_DEBUGS("Voice") << "deleting session " << session->mSIPURI << LL_ENDL; + deleteSession(session); + session = NULL; + } + } + else + { +// LL_DEBUGS("Voice") << "session is NULL" << LL_ENDL; + } +} + +// Returns true if the session seems to indicate we've moved to a region on a different voice server +bool LLVivoxVoiceClient::sessionNeedsRelog(sessionState *session) +{ + bool result = false; + + if(session != NULL) + { + // Only make this check for spatial channels (so it won't happen for group or p2p calls) + if(session->mIsSpatial) + { + std::string::size_type atsign; + + atsign = session->mSIPURI.find("@"); + + if(atsign != std::string::npos) + { + std::string urihost = session->mSIPURI.substr(atsign + 1); + if(stricmp(urihost.c_str(), mVoiceSIPURIHostName.c_str())) + { + // The hostname in this URI is different from what we expect. This probably means we need to relog. + + // We could make a ProvisionVoiceAccountRequest and compare the result with the current values of + // mVoiceSIPURIHostName and mVoiceAccountServerURI to be really sure, but this is a pretty good indicator. + + result = true; + } + } + } + } + + return result; +} + +void LLVivoxVoiceClient::leftAudioSession( + sessionState *session) +{ + if(mAudioSession == session) + { + switch(getState()) + { + case stateJoiningSession: + case stateSessionJoined: + case stateRunning: + case stateLeavingSession: + case stateJoinSessionFailed: + case stateJoinSessionFailedWaiting: + // normal transition + LL_DEBUGS("Voice") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; + setState(stateSessionTerminated); + break; + + case stateSessionTerminated: + // this will happen sometimes -- there are cases where we send the terminate and then go straight to this state. + LL_WARNS("Voice") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; + break; + + default: + LL_WARNS("Voice") << "unexpected SessionStateChangeEvent (left session) in state " << state2string(getState()) << LL_ENDL; + setState(stateSessionTerminated); + break; + } + } +} + +void LLVivoxVoiceClient::accountLoginStateChangeEvent( + std::string &accountHandle, + int statusCode, + std::string &statusString, + int state) +{ + /* + According to Mike S., status codes for this event are: + login_state_logged_out=0, + login_state_logged_in = 1, + login_state_logging_in = 2, + login_state_logging_out = 3, + login_state_resetting = 4, + login_state_error=100 + */ + + LL_DEBUGS("Voice") << "state change event: " << state << LL_ENDL; + switch(state) + { + case 1: + if(getState() == stateLoggingIn) + { + setState(stateLoggedIn); + } + break; + + case 3: + // The user is in the process of logging out. + setState(stateLoggingOut); + break; + + case 0: + // The user has been logged out. + setState(stateLoggedOut); + break; + + default: + //Used to be a commented out warning + LL_DEBUGS("Voice") << "unknown state: " << state << LL_ENDL; + break; + } +} + +void LLVivoxVoiceClient::mediaStreamUpdatedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle, + int statusCode, + std::string &statusString, + int state, + bool incoming) +{ + sessionState *session = findSession(sessionHandle); + + LL_DEBUGS("Voice") << "session " << sessionHandle << ", status code " << statusCode << ", string \"" << statusString << "\"" << LL_ENDL; + + if(session) + { + // We know about this session + + // Save the state for later use + session->mMediaStreamState = state; + + switch(statusCode) + { + case 0: + case 200: + // generic success + // Don't change the saved error code (it may have been set elsewhere) + break; + default: + // save the status code for later + session->mErrorStatusCode = statusCode; + break; + } + + switch(state) + { + case streamStateIdle: + // Standard "left audio session" + session->mVoiceEnabled = false; + session->mMediaConnectInProgress = false; + leftAudioSession(session); + break; + + case streamStateConnected: + session->mVoiceEnabled = true; + session->mMediaConnectInProgress = false; + joinedAudioSession(session); + break; + + case streamStateRinging: + if(incoming) + { + // Send the voice chat invite to the GUI layer + // TODO: Question: Should we correlate with the mute list here? + session->mIMSessionID = LLIMMgr::computeSessionID(IM_SESSION_P2P_INVITE, session->mCallerID); + session->mVoiceInvitePending = true; + if(session->mName.empty()) + { + lookupName(session->mCallerID); + } + else + { + // Act like we just finished resolving the name + avatarNameResolved(session->mCallerID, session->mName); + } + } + break; + + default: + LL_WARNS("Voice") << "unknown state " << state << LL_ENDL; + break; + + } + + } + else + { + LL_WARNS("Voice") << "session " << sessionHandle << "not found"<< LL_ENDL; + } +} + +void LLVivoxVoiceClient::textStreamUpdatedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle, + bool enabled, + int state, + bool incoming) +{ + sessionState *session = findSession(sessionHandle); + + if(session) + { + // Save the state for later use + session->mTextStreamState = state; + + // We know about this session + switch(state) + { + case 0: // We see this when the text stream closes + LL_DEBUGS("Voice") << "stream closed" << LL_ENDL; + break; + + case 1: // We see this on an incoming call from the Connector + // Try to send any text messages queued for this session. + sendQueuedTextMessages(session); + + // Send the text chat invite to the GUI layer + // TODO: Question: Should we correlate with the mute list here? + session->mTextInvitePending = true; + if(session->mName.empty()) + { + lookupName(session->mCallerID); + } + else + { + // Act like we just finished resolving the name + avatarNameResolved(session->mCallerID, session->mName); + } + break; + + default: + LL_WARNS("Voice") << "unknown state " << state << LL_ENDL; + break; + + } + } +} + +void LLVivoxVoiceClient::participantAddedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle, + std::string &uriString, + std::string &alias, + std::string &nameString, + std::string &displayNameString, + int participantType) +{ + sessionState *session = findSession(sessionHandle); + if(session) + { + participantState *participant = session->addParticipant(uriString); + if(participant) + { + participant->mAccountName = nameString; + + LL_DEBUGS("Voice") << "added participant \"" << participant->mAccountName + << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; + + if(participant->mAvatarIDValid) + { + // Initiate a lookup + lookupName(participant->mAvatarID); + } + else + { + // If we don't have a valid avatar UUID, we need to fill in the display name to make the active speakers floater work. + std::string namePortion = nameFromsipURI(uriString); + if(namePortion.empty()) + { + // Problem with the SIP URI, fall back to the display name + namePortion = displayNameString; + } + if(namePortion.empty()) + { + // Problems with both of the above, fall back to the account name + namePortion = nameString; + } + + // Set the display name (which is a hint to the active speakers window not to do its own lookup) + participant->mDisplayName = namePortion; + avatarNameResolved(participant->mAvatarID, namePortion); + } + } + } +} + +void LLVivoxVoiceClient::participantRemovedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle, + std::string &uriString, + std::string &alias, + std::string &nameString) +{ + sessionState *session = findSession(sessionHandle); + if(session) + { + participantState *participant = session->findParticipant(uriString); + if(participant) + { + session->removeParticipant(participant); + } + else + { + LL_DEBUGS("Voice") << "unknown participant " << uriString << LL_ENDL; + } + } + else + { + LL_DEBUGS("Voice") << "unknown session " << sessionHandle << LL_ENDL; + } +} + + +void LLVivoxVoiceClient::participantUpdatedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle, + std::string &uriString, + std::string &alias, + bool isModeratorMuted, + bool isSpeaking, + int volume, + F32 energy) +{ + sessionState *session = findSession(sessionHandle); + if(session) + { + participantState *participant = session->findParticipant(uriString); + + if(participant) + { + participant->mIsSpeaking = isSpeaking; + participant->mIsModeratorMuted = isModeratorMuted; + + // SLIM SDK: convert range: ensure that energy is set to zero if is_speaking is false + if (isSpeaking) + { + participant->mSpeakingTimeout.reset(); + participant->mPower = energy; + } + else + { + participant->mPower = 0.0f; + } + + // Ignore incoming volume level if it has been explicitly set, or there + // is a volume or mute change pending. + if ( !participant->mVolumeSet && !participant->mVolumeDirty) + { + participant->mVolume = (F32)volume * VOLUME_SCALE_VIVOX; + } + + // *HACK: mantipov: added while working on EXT-3544 + /* + Sometimes LLVoiceClient::participantUpdatedEvent callback is called BEFORE + LLViewerChatterBoxSessionAgentListUpdates::post() sometimes AFTER. + + participantUpdatedEvent updates voice participant state in particular participantState::mIsModeratorMuted + Originally we wanted to update session Speaker Manager to fire LLSpeakerVoiceModerationEvent to fix the EXT-3544 bug. + Calling of the LLSpeakerMgr::update() method was added into LLIMMgr::processAgentListUpdates. + + But in case participantUpdatedEvent() is called after LLViewerChatterBoxSessionAgentListUpdates::post() + voice participant mIsModeratorMuted is changed after speakers are updated in Speaker Manager + and event is not fired. + + So, we have to call LLSpeakerMgr::update() here. In any case it is better than call it + in LLCallFloater::draw() + */ + LLVoiceChannel* voice_cnl = LLVoiceChannel::getCurrentVoiceChannel(); + + // ignore session ID of local chat + if (voice_cnl && voice_cnl->getSessionID().notNull()) + { + LLSpeakerMgr* speaker_manager = LLIMModel::getInstance()->getSpeakerManager(voice_cnl->getSessionID()); + if (speaker_manager) + { + speaker_manager->update(true); + + // also initialize voice moderate_mode depend on Agent's participant. See EXT-6937. + // *TODO: remove once a way to request the current voice channel moderation mode is implemented. + if (gAgentID == participant->mAvatarID) + { + speaker_manager->initVoiceModerateMode(); + } + } + } + } + else + { + LL_WARNS("Voice") << "unknown participant: " << uriString << LL_ENDL; + } + } + else + { + LL_INFOS("Voice") << "unknown session " << sessionHandle << LL_ENDL; + } +} + +void LLVivoxVoiceClient::buddyPresenceEvent( + std::string &uriString, + std::string &alias, + std::string &statusString, + std::string &applicationString) +{ + buddyListEntry *buddy = findBuddy(uriString); + + if(buddy) + { + LL_DEBUGS("Voice") << "Presence event for " << buddy->mDisplayName << " status \"" << statusString << "\", application \"" << applicationString << "\""<< LL_ENDL; + LL_DEBUGS("Voice") << "before: mOnlineSL = " << (buddy->mOnlineSL?"true":"false") << ", mOnlineSLim = " << (buddy->mOnlineSLim?"true":"false") << LL_ENDL; + + if(applicationString.empty()) + { + // This presence event is from a client that doesn't set up the Application string. Do things the old-skool way. + // NOTE: this will be needed to support people who aren't on the 3010-class SDK yet. + + if ( stricmp("Unknown", statusString.c_str())== 0) + { + // User went offline with a non-SLim-enabled viewer. + buddy->mOnlineSL = false; + } + else if ( stricmp("Online", statusString.c_str())== 0) + { + // User came online with a non-SLim-enabled viewer. + buddy->mOnlineSL = true; + } + else + { + // If the user is online through SLim, their status will be "Online-slc", "Away", or something else. + // NOTE: we should never see this unless someone is running an OLD version of SLim -- the versions that should be in use now all set the application string. + buddy->mOnlineSLim = true; + } + } + else if(applicationString.find("SecondLifeViewer") != std::string::npos) + { + // This presence event is from a viewer that sets the application string + if ( stricmp("Unknown", statusString.c_str())== 0) + { + // Viewer says they're offline + buddy->mOnlineSL = false; + } + else + { + // Viewer says they're online + buddy->mOnlineSL = true; + } + } + else + { + // This presence event is from something which is NOT the SL viewer (assume it's SLim). + if ( stricmp("Unknown", statusString.c_str())== 0) + { + // SLim says they're offline + buddy->mOnlineSLim = false; + } + else + { + // SLim says they're online + buddy->mOnlineSLim = true; + } + } + + LL_DEBUGS("Voice") << "after: mOnlineSL = " << (buddy->mOnlineSL?"true":"false") << ", mOnlineSLim = " << (buddy->mOnlineSLim?"true":"false") << LL_ENDL; + + // HACK -- increment the internal change serial number in the LLRelationship (without changing the actual status), so the UI notices the change. + LLAvatarTracker::instance().setBuddyOnline(buddy->mUUID,LLAvatarTracker::instance().isBuddyOnline(buddy->mUUID)); + + notifyFriendObservers(); + } + else + { + LL_DEBUGS("Voice") << "Presence for unknown buddy " << uriString << LL_ENDL; + } +} + +void LLVivoxVoiceClient::messageEvent( + std::string &sessionHandle, + std::string &uriString, + std::string &alias, + std::string &messageHeader, + std::string &messageBody, + std::string &applicationString) +{ + LL_DEBUGS("Voice") << "Message event, session " << sessionHandle << " from " << uriString << LL_ENDL; +// LL_DEBUGS("Voice") << " header " << messageHeader << ", body: \n" << messageBody << LL_ENDL; + + if(messageHeader.find("text/html") != std::string::npos) + { + std::string message; + + { + const std::string startMarker = "<body"; + const std::string startMarker2 = ">"; + const std::string endMarker = "</body>"; + const std::string startSpan = "<span"; + const std::string endSpan = "</span>"; + std::string::size_type start; + std::string::size_type end; + + // Default to displaying the raw string, so the message gets through. + message = messageBody; + + // Find the actual message text within the XML fragment + start = messageBody.find(startMarker); + start = messageBody.find(startMarker2, start); + end = messageBody.find(endMarker); + + if(start != std::string::npos) + { + start += startMarker2.size(); + + if(end != std::string::npos) + end -= start; + + message.assign(messageBody, start, end); + } + else + { + // Didn't find a <body>, try looking for a <span> instead. + start = messageBody.find(startSpan); + start = messageBody.find(startMarker2, start); + end = messageBody.find(endSpan); + + if(start != std::string::npos) + { + start += startMarker2.size(); + + if(end != std::string::npos) + end -= start; + + message.assign(messageBody, start, end); + } + } + } + +// LL_DEBUGS("Voice") << " raw message = \n" << message << LL_ENDL; + + // strip formatting tags + { + std::string::size_type start; + std::string::size_type end; + + while((start = message.find('<')) != std::string::npos) + { + if((end = message.find('>', start + 1)) != std::string::npos) + { + // Strip out the tag + message.erase(start, (end + 1) - start); + } + else + { + // Avoid an infinite loop + break; + } + } + } + + // Decode ampersand-escaped chars + { + std::string::size_type mark = 0; + + // The text may contain text encoded with <, >, and & + mark = 0; + while((mark = message.find("<", mark)) != std::string::npos) + { + message.replace(mark, 4, "<"); + mark += 1; + } + + mark = 0; + while((mark = message.find(">", mark)) != std::string::npos) + { + message.replace(mark, 4, ">"); + mark += 1; + } + + mark = 0; + while((mark = message.find("&", mark)) != std::string::npos) + { + message.replace(mark, 5, "&"); + mark += 1; + } + } + + // strip leading/trailing whitespace (since we always seem to get a couple newlines) + LLStringUtil::trim(message); + +// LL_DEBUGS("Voice") << " stripped message = \n" << message << LL_ENDL; + + sessionState *session = findSession(sessionHandle); + if(session) + { + bool is_busy = gAgent.getBusy(); + bool is_muted = LLMuteList::getInstance()->isMuted(session->mCallerID, session->mName, LLMute::flagTextChat); + bool is_linden = LLMuteList::getInstance()->isLinden(session->mName); + bool quiet_chat = false; + LLChat chat; + + chat.mMuted = is_muted && !is_linden; + + if(!chat.mMuted) + { + chat.mFromID = session->mCallerID; + chat.mFromName = session->mName; + chat.mSourceType = CHAT_SOURCE_AGENT; + + if(is_busy && !is_linden) + { + quiet_chat = true; + // TODO: Question: Return busy mode response here? Or maybe when session is started instead? + } + + LL_DEBUGS("Voice") << "adding message, name " << session->mName << " session " << session->mIMSessionID << ", target " << session->mCallerID << LL_ENDL; + gIMMgr->addMessage(session->mIMSessionID, + session->mCallerID, + session->mName.c_str(), + message.c_str(), + LLStringUtil::null, // default arg + IM_NOTHING_SPECIAL, // default arg + 0, // default arg + LLUUID::null, // default arg + LLVector3::zero, // default arg + true); // prepend name and make it a link to the user's profile + + } + } + } +} + +void LLVivoxVoiceClient::sessionNotificationEvent(std::string &sessionHandle, std::string &uriString, std::string ¬ificationType) +{ + sessionState *session = findSession(sessionHandle); + + if(session) + { + participantState *participant = session->findParticipant(uriString); + if(participant) + { + if (!stricmp(notificationType.c_str(), "Typing")) + { + // Other end started typing + // TODO: The proper way to add a typing notification seems to be LLIMMgr::processIMTypingStart(). + // It requires an LLIMInfo for the message, which we don't have here. + } + else if (!stricmp(notificationType.c_str(), "NotTyping")) + { + // Other end stopped typing + // TODO: The proper way to remove a typing notification seems to be LLIMMgr::processIMTypingStop(). + // It requires an LLIMInfo for the message, which we don't have here. + } + else + { + LL_DEBUGS("Voice") << "Unknown notification type " << notificationType << "for participant " << uriString << " in session " << session->mSIPURI << LL_ENDL; + } + } + else + { + LL_DEBUGS("Voice") << "Unknown participant " << uriString << " in session " << session->mSIPURI << LL_ENDL; + } + } + else + { + LL_DEBUGS("Voice") << "Unknown session handle " << sessionHandle << LL_ENDL; + } +} + +void LLVivoxVoiceClient::subscriptionEvent(std::string &buddyURI, std::string &subscriptionHandle, std::string &alias, std::string &displayName, std::string &applicationString, std::string &subscriptionType) +{ + buddyListEntry *buddy = findBuddy(buddyURI); + + if(!buddy) + { + // Couldn't find buddy by URI, try converting the alias... + if(!alias.empty()) + { + LLUUID id; + if(IDFromName(alias, id)) + { + buddy = findBuddy(id); + } + } + } + + if(buddy) + { + std::ostringstream stream; + + if(buddy->mCanSeeMeOnline) + { + // Sending the response will create an auto-accept rule + buddy->mHasAutoAcceptListEntry = true; + } + else + { + // Sending the response will create a block rule + buddy->mHasBlockListEntry = true; + } + + if(buddy->mInSLFriends) + { + buddy->mInVivoxBuddies = true; + } + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.SendSubscriptionReply.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" + << "<RuleType>" << (buddy->mCanSeeMeOnline?"Allow":"Hide") << "</RuleType>" + << "<AutoAccept>"<< (buddy->mInSLFriends?"1":"0")<< "</AutoAccept>" + << "<SubscriptionHandle>" << subscriptionHandle << "</SubscriptionHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::auxAudioPropertiesEvent(F32 energy) +{ + LL_DEBUGS("Voice") << "got energy " << energy << LL_ENDL; + mTuningEnergy = energy; +} + +void LLVivoxVoiceClient::buddyListChanged() +{ + // This is called after we receive a BuddyAndGroupListChangedEvent. + mBuddyListMapPopulated = true; + mFriendsListDirty = true; +} + +void LLVivoxVoiceClient::muteListChanged() +{ + // The user's mute list has been updated. Go through the current participant list and sync it with the mute list. + if(mAudioSession) + { + participantMap::iterator iter = mAudioSession->mParticipantsByURI.begin(); + + for(; iter != mAudioSession->mParticipantsByURI.end(); iter++) + { + participantState *p = iter->second; + + // Check to see if this participant is on the mute list already + if(p->updateMuteState()) + mAudioSession->mVolumeDirty = true; + } + } +} + +void LLVivoxVoiceClient::updateFriends(U32 mask) +{ + if(mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::POWERS)) + { + // Just resend the whole friend list to the daemon + mFriendsListDirty = true; + } +} + +///////////////////////////// +// Managing list of participants +LLVivoxVoiceClient::participantState::participantState(const std::string &uri) : + mURI(uri), + mPTT(false), + mIsSpeaking(false), + mIsModeratorMuted(false), + mLastSpokeTimestamp(0.f), + mPower(0.f), + mVolume(LLVoiceClient::VOLUME_DEFAULT), + mUserVolume(0), + mOnMuteList(false), + mVolumeSet(false), + mVolumeDirty(false), + mAvatarIDValid(false), + mIsSelf(false) +{ +} + +LLVivoxVoiceClient::participantState *LLVivoxVoiceClient::sessionState::addParticipant(const std::string &uri) +{ + participantState *result = NULL; + bool useAlternateURI = false; + + // Note: this is mostly the body of LLVivoxVoiceClient::sessionState::findParticipant(), but since we need to know if it + // matched the alternate SIP URI (so we can add it properly), we need to reproduce it here. + { + participantMap::iterator iter = mParticipantsByURI.find(uri); + + if(iter == mParticipantsByURI.end()) + { + if(!mAlternateSIPURI.empty() && (uri == mAlternateSIPURI)) + { + // This is a p2p session (probably with the SLIM client) with an alternate URI for the other participant. + // Use mSIPURI instead, since it will be properly encoded. + iter = mParticipantsByURI.find(mSIPURI); + useAlternateURI = true; + } + } + + if(iter != mParticipantsByURI.end()) + { + result = iter->second; + } + } + + if(!result) + { + // participant isn't already in one list or the other. + result = new participantState(useAlternateURI?mSIPURI:uri); + mParticipantsByURI.insert(participantMap::value_type(result->mURI, result)); + mParticipantsChanged = true; + + // Try to do a reverse transform on the URI to get the GUID back. + { + LLUUID id; + if(LLVivoxVoiceClient::getInstance()->IDFromName(result->mURI, id)) + { + result->mAvatarIDValid = true; + result->mAvatarID = id; + } + else + { + // Create a UUID by hashing the URI, but do NOT set mAvatarIDValid. + // This tells code in LLVivoxVoiceClient that the ID will not be in the name cache. + setUUIDFromStringHash(result->mAvatarID, uri); + } + } + + + if(result->updateMuteState()) + { + mMuteDirty = true; + } + + mParticipantsByUUID.insert(participantUUIDMap::value_type(result->mAvatarID, result)); + + if (LLSpeakerVolumeStorage::getInstance()->getSpeakerVolume(result->mAvatarID, result->mVolume)) + { + result->mVolumeDirty = true; + mVolumeDirty = true; + } + + LL_DEBUGS("Voice") << "participant \"" << result->mURI << "\" added." << LL_ENDL; + } + + return result; +} + +bool LLVivoxVoiceClient::participantState::updateMuteState() +{ + bool result = false; + + + + bool isMuted = LLMuteList::getInstance()->isMuted(mAvatarID, LLMute::flagVoiceChat); + if(mOnMuteList != isMuted) + { + mOnMuteList = isMuted; + mVolumeDirty = true; + result = true; + } + return result; +} + +bool LLVivoxVoiceClient::participantState::isAvatar() +{ + return mAvatarIDValid; +} + +void LLVivoxVoiceClient::sessionState::removeParticipant(LLVivoxVoiceClient::participantState *participant) +{ + if(participant) + { + participantMap::iterator iter = mParticipantsByURI.find(participant->mURI); + participantUUIDMap::iterator iter2 = mParticipantsByUUID.find(participant->mAvatarID); + + LL_DEBUGS("Voice") << "participant \"" << participant->mURI << "\" (" << participant->mAvatarID << ") removed." << LL_ENDL; + + if(iter == mParticipantsByURI.end()) + { + LL_ERRS("Voice") << "Internal error: participant " << participant->mURI << " not in URI map" << LL_ENDL; + } + else if(iter2 == mParticipantsByUUID.end()) + { + LL_ERRS("Voice") << "Internal error: participant ID " << participant->mAvatarID << " not in UUID map" << LL_ENDL; + } + else if(iter->second != iter2->second) + { + LL_ERRS("Voice") << "Internal error: participant mismatch!" << LL_ENDL; + } + else + { + mParticipantsByURI.erase(iter); + mParticipantsByUUID.erase(iter2); + + delete participant; + mParticipantsChanged = true; + } + } +} + +void LLVivoxVoiceClient::sessionState::removeAllParticipants() +{ + LL_DEBUGS("Voice") << "called" << LL_ENDL; + + while(!mParticipantsByURI.empty()) + { + removeParticipant(mParticipantsByURI.begin()->second); + } + + if(!mParticipantsByUUID.empty()) + { + LL_ERRS("Voice") << "Internal error: empty URI map, non-empty UUID map" << LL_ENDL; + } +} + +void LLVivoxVoiceClient::getParticipantList(std::set<LLUUID> &participants) +{ + if(mAudioSession) + { + for(participantUUIDMap::iterator iter = mAudioSession->mParticipantsByUUID.begin(); + iter != mAudioSession->mParticipantsByUUID.end(); + iter++) + { + participants.insert(iter->first); + } + } +} + +bool LLVivoxVoiceClient::isParticipant(const LLUUID &speaker_id) +{ + if(mAudioSession) + { + return (mAudioSession->mParticipantsByUUID.find(speaker_id) != mAudioSession->mParticipantsByUUID.end()); + } + return false; +} + + +LLVivoxVoiceClient::participantState *LLVivoxVoiceClient::sessionState::findParticipant(const std::string &uri) +{ + participantState *result = NULL; + + participantMap::iterator iter = mParticipantsByURI.find(uri); + + if(iter == mParticipantsByURI.end()) + { + if(!mAlternateSIPURI.empty() && (uri == mAlternateSIPURI)) + { + // This is a p2p session (probably with the SLIM client) with an alternate URI for the other participant. + // Look up the other URI + iter = mParticipantsByURI.find(mSIPURI); + } + } + + if(iter != mParticipantsByURI.end()) + { + result = iter->second; + } + + return result; +} + +LLVivoxVoiceClient::participantState* LLVivoxVoiceClient::sessionState::findParticipantByID(const LLUUID& id) +{ + participantState * result = NULL; + participantUUIDMap::iterator iter = mParticipantsByUUID.find(id); + + if(iter != mParticipantsByUUID.end()) + { + result = iter->second; + } + + return result; +} + +LLVivoxVoiceClient::participantState* LLVivoxVoiceClient::findParticipantByID(const LLUUID& id) +{ + participantState * result = NULL; + + if(mAudioSession) + { + result = mAudioSession->findParticipantByID(id); + } + + return result; +} + + +void LLVivoxVoiceClient::parcelChanged() +{ + if(getState() >= stateNoChannel) + { + // If the user is logged in, start a channel lookup. + LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL; + + std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest"); + LLSD data; + LLHTTPClient::post( + url, + data, + new LLVivoxVoiceClientCapResponder); + } + else + { + // The transition to stateNoChannel needs to kick this off again. + LL_INFOS("Voice") << "not logged in yet, deferring" << LL_ENDL; + } +} + +void LLVivoxVoiceClient::switchChannel( + std::string uri, + bool spatial, + bool no_reconnect, + bool is_p2p, + std::string hash) +{ + bool needsSwitch = false; + + LL_DEBUGS("Voice") + << "called in state " << state2string(getState()) + << " with uri \"" << uri << "\"" + << (spatial?", spatial is true":", spatial is false") + << LL_ENDL; + + switch(getState()) + { + case stateJoinSessionFailed: + case stateJoinSessionFailedWaiting: + case stateNoChannel: + // Always switch to the new URI from these states. + needsSwitch = true; + break; + + default: + if(mSessionTerminateRequested) + { + // If a terminate has been requested, we need to compare against where the URI we're already headed to. + if(mNextAudioSession) + { + if(mNextAudioSession->mSIPURI != uri) + needsSwitch = true; + } + else + { + // mNextAudioSession is null -- this probably means we're on our way back to spatial. + if(!uri.empty()) + { + // We do want to process a switch in this case. + needsSwitch = true; + } + } + } + else + { + // Otherwise, compare against the URI we're in now. + if(mAudioSession) + { + if(mAudioSession->mSIPURI != uri) + { + needsSwitch = true; + } + } + else + { + if(!uri.empty()) + { + // mAudioSession is null -- it's not clear what case would cause this. + // For now, log it as a warning and see if it ever crops up. + LL_WARNS("Voice") << "No current audio session." << LL_ENDL; + } + } + } + break; + } + + if(needsSwitch) + { + if(uri.empty()) + { + // Leave any channel we may be in + LL_DEBUGS("Voice") << "leaving channel" << LL_ENDL; + + sessionState *oldSession = mNextAudioSession; + mNextAudioSession = NULL; + + // The old session may now need to be deleted. + reapSession(oldSession); + + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); + } + else + { + LL_DEBUGS("Voice") << "switching to channel " << uri << LL_ENDL; + + mNextAudioSession = addSession(uri); + mNextAudioSession->mHash = hash; + mNextAudioSession->mIsSpatial = spatial; + mNextAudioSession->mReconnect = !no_reconnect; + mNextAudioSession->mIsP2P = is_p2p; + } + + if(getState() <= stateNoChannel) + { + // We're already set up to join a channel, just needed to fill in the session URI + } + else + { + // State machine will come around and rejoin if uri/handle is not empty. + sessionTerminate(); + } + } +} + +void LLVivoxVoiceClient::joinSession(sessionState *session) +{ + mNextAudioSession = session; + + if(getState() <= stateNoChannel) + { + // We're already set up to join a channel, just needed to fill in the session handle + } + else + { + // State machine will come around and rejoin if uri/handle is not empty. + sessionTerminate(); + } +} + +void LLVivoxVoiceClient::setNonSpatialChannel( + const std::string &uri, + const std::string &credentials) +{ + switchChannel(uri, false, false, false, credentials); +} + +void LLVivoxVoiceClient::setSpatialChannel( + const std::string &uri, + const std::string &credentials) +{ + mSpatialSessionURI = uri; + mSpatialSessionCredentials = credentials; + mAreaVoiceDisabled = mSpatialSessionURI.empty(); + + LL_DEBUGS("Voice") << "got spatial channel uri: \"" << uri << "\"" << LL_ENDL; + + if((mAudioSession && !(mAudioSession->mIsSpatial)) || (mNextAudioSession && !(mNextAudioSession->mIsSpatial))) + { + // User is in a non-spatial chat or joining a non-spatial chat. Don't switch channels. + LL_INFOS("Voice") << "in non-spatial chat, not switching channels" << LL_ENDL; + } + else + { + switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); + } +} + +void LLVivoxVoiceClient::callUser(const LLUUID &uuid) +{ + std::string userURI = sipURIFromID(uuid); + + switchChannel(userURI, false, true, true); +} + +LLVivoxVoiceClient::sessionState* LLVivoxVoiceClient::startUserIMSession(const LLUUID &uuid) +{ + // Figure out if a session with the user already exists + sessionState *session = findSession(uuid); + if(!session) + { + // No session with user, need to start one. + std::string uri = sipURIFromID(uuid); + session = addSession(uri); + + llassert(session); + if (!session) return NULL; + + session->mIsSpatial = false; + session->mReconnect = false; + session->mIsP2P = true; + session->mCallerID = uuid; + } + + if(session->mHandle.empty()) + { + // Session isn't active -- start it up. + sessionCreateSendMessage(session, false, true); + } + else + { + // Session is already active -- start up text. + sessionTextConnectSendMessage(session); + } + + return session; +} + +BOOL LLVivoxVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message) +{ + bool result = false; + + // Attempt to locate the indicated session + sessionState *session = startUserIMSession(participant_id); + if(session) + { + // found the session, attempt to send the message + session->mTextMsgQueue.push(message); + + // Try to send queued messages (will do nothing if the session is not open yet) + sendQueuedTextMessages(session); + + // The message is queued, so we succeed. + result = true; + } + else + { + LL_DEBUGS("Voice") << "Session not found for participant ID " << participant_id << LL_ENDL; + } + + return result; +} + +void LLVivoxVoiceClient::sendQueuedTextMessages(sessionState *session) +{ + if(session->mTextStreamState == 1) + { + if(!session->mTextMsgQueue.empty()) + { + std::ostringstream stream; + + while(!session->mTextMsgQueue.empty()) + { + std::string message = session->mTextMsgQueue.front(); + session->mTextMsgQueue.pop(); + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SendMessage.1\">" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "<MessageHeader>text/HTML</MessageHeader>" + << "<MessageBody>" << message << "</MessageBody>" + << "</Request>" + << "\n\n\n"; + } + writeString(stream.str()); + } + } + else + { + // Session isn't connected yet, defer until later. + } +} + +void LLVivoxVoiceClient::endUserIMSession(const LLUUID &uuid) +{ + // Figure out if a session with the user exists + sessionState *session = findSession(uuid); + if(session) + { + // found the session + if(!session->mHandle.empty()) + { + sessionTextDisconnectSendMessage(session); + } + } + else + { + LL_DEBUGS("Voice") << "Session not found for participant ID " << uuid << LL_ENDL; + } +} +bool LLVivoxVoiceClient::isValidChannel(std::string &sessionHandle) +{ + return(findSession(sessionHandle) != NULL); + +} +bool LLVivoxVoiceClient::answerInvite(std::string &sessionHandle) +{ + // this is only ever used to answer incoming p2p call invites. + + sessionState *session = findSession(sessionHandle); + if(session) + { + session->mIsSpatial = false; + session->mReconnect = false; + session->mIsP2P = true; + + joinSession(session); + return true; + } + + return false; +} + +BOOL LLVivoxVoiceClient::isOnlineSIP(const LLUUID &id) +{ + bool result = false; + buddyListEntry *buddy = findBuddy(id); + if(buddy) + { + result = buddy->mOnlineSLim; + LL_DEBUGS("Voice") << "Buddy " << buddy->mDisplayName << " is SIP " << (result?"online":"offline") << LL_ENDL; + } + + if(!result) + { + // This user isn't on the buddy list or doesn't show online status through the buddy list, but could be a participant in an existing session if they initiated a text IM. + sessionState *session = findSession(id); + if(session && !session->mHandle.empty()) + { + if((session->mTextStreamState != streamStateUnknown) || (session->mMediaStreamState > streamStateIdle)) + { + LL_DEBUGS("Voice") << "Open session with " << id << " found, returning SIP online state" << LL_ENDL; + // we have a p2p text session open with this user, so by definition they're online. + result = true; + } + } + } + + return result; +} + +bool LLVivoxVoiceClient::isVoiceWorking() +{ + //Added stateSessionTerminated state to avoid problems with call in parcels with disabled voice (EXT-4758) + // Condition with joining spatial num was added to take into account possible problems with connection to voice + // server(EXT-4313). See bug descriptions and comments for MAX_NORMAL_JOINING_SPATIAL_NUM for more info. + return (mSpatialJoiningNum < MAX_NORMAL_JOINING_SPATIAL_NUM) && (stateLoggedIn <= mState) && (mState <= stateSessionTerminated); +} + +// Returns true if the indicated participant in the current audio session is really an SL avatar. +// Currently this will be false only for PSTN callers into group chats, and PSTN p2p calls. +BOOL LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id) +{ + BOOL result = TRUE; + sessionState *session = findSession(id); + + if(session != NULL) + { + // this is a p2p session with the indicated caller, or the session with the specified UUID. + if(session->mSynthesizedCallerID) + result = FALSE; + } + else + { + // Didn't find a matching session -- check the current audio session for a matching participant + if(mAudioSession != NULL) + { + participantState *participant = findParticipantByID(id); + if(participant != NULL) + { + result = participant->isAvatar(); + } + } + } + + return result; +} + +// Returns true if calling back the session URI after the session has closed is possible. +// Currently this will be false only for PSTN P2P calls. +BOOL LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id) +{ + BOOL result = TRUE; + sessionState *session = findSession(session_id); + + if(session != NULL) + { + result = session->isCallBackPossible(); + } + + return result; +} + +// Returns true if the session can accepte text IM's. +// Currently this will be false only for PSTN P2P calls. +BOOL LLVivoxVoiceClient::isSessionTextIMPossible(const LLUUID &session_id) +{ + bool result = TRUE; + sessionState *session = findSession(session_id); + + if(session != NULL) + { + result = session->isTextIMPossible(); + } + + return result; +} + + +void LLVivoxVoiceClient::declineInvite(std::string &sessionHandle) +{ + sessionState *session = findSession(sessionHandle); + if(session) + { + sessionMediaDisconnectSendMessage(session); + } +} + +void LLVivoxVoiceClient::leaveNonSpatialChannel() +{ + LL_DEBUGS("Voice") + << "called in state " << state2string(getState()) + << LL_ENDL; + + // Make sure we don't rejoin the current session. + sessionState *oldNextSession = mNextAudioSession; + mNextAudioSession = NULL; + + // Most likely this will still be the current session at this point, but check it anyway. + reapSession(oldNextSession); + + verifySessionState(); + + sessionTerminate(); +} + +std::string LLVivoxVoiceClient::getCurrentChannel() +{ + std::string result; + + if((getState() == stateRunning) && !mSessionTerminateRequested) + { + result = getAudioSessionURI(); + } + + return result; +} + +bool LLVivoxVoiceClient::inProximalChannel() +{ + bool result = false; + + if((getState() == stateRunning) && !mSessionTerminateRequested) + { + result = inSpatialChannel(); + } + + return result; +} + +std::string LLVivoxVoiceClient::sipURIFromID(const LLUUID &id) +{ + std::string result; + result = "sip:"; + result += nameFromID(id); + result += "@"; + result += mVoiceSIPURIHostName; + + return result; +} + +std::string LLVivoxVoiceClient::sipURIFromAvatar(LLVOAvatar *avatar) +{ + std::string result; + if(avatar) + { + result = "sip:"; + result += nameFromID(avatar->getID()); + result += "@"; + result += mVoiceSIPURIHostName; + } + + return result; +} + +std::string LLVivoxVoiceClient::nameFromAvatar(LLVOAvatar *avatar) +{ + std::string result; + if(avatar) + { + result = nameFromID(avatar->getID()); + } + return result; +} + +std::string LLVivoxVoiceClient::nameFromID(const LLUUID &uuid) +{ + std::string result; + + if (uuid.isNull()) { + //VIVOX, the uuid emtpy look for the mURIString and return that instead. + //result.assign(uuid.mURIStringName); + LLStringUtil::replaceChar(result, '_', ' '); + return result; + } + // Prepending this apparently prevents conflicts with reserved names inside the vivox code. + result = "x"; + + // Base64 encode and replace the pieces of base64 that are less compatible + // with e-mail local-parts. + // See RFC-4648 "Base 64 Encoding with URL and Filename Safe Alphabet" + result += LLBase64::encode(uuid.mData, UUID_BYTES); + LLStringUtil::replaceChar(result, '+', '-'); + LLStringUtil::replaceChar(result, '/', '_'); + + // If you need to transform a GUID to this form on the Mac OS X command line, this will do so: + // echo -n x && (echo e669132a-6c43-4ee1-a78d-6c82fff59f32 |xxd -r -p |openssl base64|tr '/+' '_-') + + // The reverse transform can be done with: + // echo 'x5mkTKmxDTuGnjWyC__WfMg==' |cut -b 2- -|tr '_-' '/+' |openssl base64 -d|xxd -p + + return result; +} + +bool LLVivoxVoiceClient::IDFromName(const std::string inName, LLUUID &uuid) +{ + bool result = false; + + // SLIM SDK: The "name" may actually be a SIP URI such as: "sip:xFnPP04IpREWNkuw1cOXlhw==@bhr.vivox.com" + // If it is, convert to a bare name before doing the transform. + std::string name = nameFromsipURI(inName); + + // Doesn't look like a SIP URI, assume it's an actual name. + if(name.empty()) + name = inName; + + // This will only work if the name is of the proper form. + // As an example, the account name for Monroe Linden (UUID 1673cfd3-8229-4445-8d92-ec3570e5e587) is: + // "xFnPP04IpREWNkuw1cOXlhw==" + + if((name.size() == 25) && (name[0] == 'x') && (name[23] == '=') && (name[24] == '=')) + { + // The name appears to have the right form. + + // Reverse the transforms done by nameFromID + std::string temp = name; + LLStringUtil::replaceChar(temp, '-', '+'); + LLStringUtil::replaceChar(temp, '_', '/'); + + U8 rawuuid[UUID_BYTES + 1]; + int len = apr_base64_decode_binary(rawuuid, temp.c_str() + 1); + if(len == UUID_BYTES) + { + // The decode succeeded. Stuff the bits into the result's UUID + memcpy(uuid.mData, rawuuid, UUID_BYTES); + result = true; + } + } + + if(!result) + { + // VIVOX: not a standard account name, just copy the URI name mURIString field + // and hope for the best. bpj + uuid.setNull(); // VIVOX, set the uuid field to nulls + } + + return result; +} + +std::string LLVivoxVoiceClient::displayNameFromAvatar(LLVOAvatar *avatar) +{ + return avatar->getFullname(); +} + +std::string LLVivoxVoiceClient::sipURIFromName(std::string &name) +{ + std::string result; + result = "sip:"; + result += name; + result += "@"; + result += mVoiceSIPURIHostName; + +// LLStringUtil::toLower(result); + + return result; +} + +std::string LLVivoxVoiceClient::nameFromsipURI(const std::string &uri) +{ + std::string result; + + std::string::size_type sipOffset, atOffset; + sipOffset = uri.find("sip:"); + atOffset = uri.find("@"); + if((sipOffset != std::string::npos) && (atOffset != std::string::npos)) + { + result = uri.substr(sipOffset + 4, atOffset - (sipOffset + 4)); + } + + return result; +} + +bool LLVivoxVoiceClient::inSpatialChannel(void) +{ + bool result = false; + + if(mAudioSession) + result = mAudioSession->mIsSpatial; + + return result; +} + +std::string LLVivoxVoiceClient::getAudioSessionURI() +{ + std::string result; + + if(mAudioSession) + result = mAudioSession->mSIPURI; + + return result; +} + +std::string LLVivoxVoiceClient::getAudioSessionHandle() +{ + std::string result; + + if(mAudioSession) + result = mAudioSession->mHandle; + + return result; +} + + +///////////////////////////// +// Sending updates of current state + +void LLVivoxVoiceClient::enforceTether(void) +{ + LLVector3d tethered = mCameraRequestedPosition; + + // constrain 'tethered' to within 50m of mAvatarPosition. + { + F32 max_dist = 50.0f; + LLVector3d camera_offset = mCameraRequestedPosition - mAvatarPosition; + F32 camera_distance = (F32)camera_offset.magVec(); + if(camera_distance > max_dist) + { + tethered = mAvatarPosition + + (max_dist / camera_distance) * camera_offset; + } + } + + if(dist_vec(mCameraPosition, tethered) > 0.1) + { + mCameraPosition = tethered; + mSpatialCoordsDirty = true; + } +} + +void LLVivoxVoiceClient::updatePosition(void) +{ + + LLViewerRegion *region = gAgent.getRegion(); + if(region && isAgentAvatarValid()) + { + LLMatrix3 rot; + LLVector3d pos; + + // TODO: If camera and avatar velocity are actually used by the voice system, we could compute them here... + // They're currently always set to zero. + + // Send the current camera position to the voice code + rot.setRows(LLViewerCamera::getInstance()->getAtAxis(), LLViewerCamera::getInstance()->getLeftAxis (), LLViewerCamera::getInstance()->getUpAxis()); + pos = gAgent.getRegion()->getPosGlobalFromRegion(LLViewerCamera::getInstance()->getOrigin()); + + LLVivoxVoiceClient::getInstance()->setCameraPosition( + pos, // position + LLVector3::zero, // velocity + rot); // rotation matrix + + // Send the current avatar position to the voice code + rot = gAgentAvatarp->getRootJoint()->getWorldRotation().getMatrix3(); + pos = gAgentAvatarp->getPositionGlobal(); + + // TODO: Can we get the head offset from outside the LLVOAvatar? + // pos += LLVector3d(mHeadOffset); + pos += LLVector3d(0.f, 0.f, 1.f); + + LLVivoxVoiceClient::getInstance()->setAvatarPosition( + pos, // position + LLVector3::zero, // velocity + rot); // rotation matrix + } +} + +void LLVivoxVoiceClient::setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) +{ + mCameraRequestedPosition = position; + + if(mCameraVelocity != velocity) + { + mCameraVelocity = velocity; + mSpatialCoordsDirty = true; + } + + if(mCameraRot != rot) + { + mCameraRot = rot; + mSpatialCoordsDirty = true; + } +} + +void LLVivoxVoiceClient::setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) +{ + if(dist_vec(mAvatarPosition, position) > 0.1) + { + mAvatarPosition = position; + mSpatialCoordsDirty = true; + } + + if(mAvatarVelocity != velocity) + { + mAvatarVelocity = velocity; + mSpatialCoordsDirty = true; + } + + if(mAvatarRot != rot) + { + mAvatarRot = rot; + mSpatialCoordsDirty = true; + } +} + +bool LLVivoxVoiceClient::channelFromRegion(LLViewerRegion *region, std::string &name) +{ + bool result = false; + + if(region) + { + name = region->getName(); + } + + if(!name.empty()) + result = true; + + return result; +} + +void LLVivoxVoiceClient::leaveChannel(void) +{ + if(getState() == stateRunning) + { + LL_DEBUGS("Voice") << "leaving channel for teleport/logout" << LL_ENDL; + mChannelName.clear(); + sessionTerminate(); + } +} + +void LLVivoxVoiceClient::setMuteMic(bool muted) +{ + mMuteMic = muted; +} + +void LLVivoxVoiceClient::setUserPTTState(bool ptt) +{ + mUserPTTState = ptt; +} + +bool LLVivoxVoiceClient::getUserPTTState() +{ + return mUserPTTState; +} + +void LLVivoxVoiceClient::inputUserControlState(bool down) +{ + if(mPTTIsToggle) + { + if(down) // toggle open-mic state on 'down' + { + toggleUserPTTState(); + } + } + else // set open-mic state as an absolute + { + setUserPTTState(down); + } +} + + +void LLVivoxVoiceClient::toggleUserPTTState(void) +{ + mUserPTTState = !mUserPTTState; +} + +void LLVivoxVoiceClient::setVoiceEnabled(bool enabled) +{ + if (enabled != mVoiceEnabled) + { + // TODO: Refactor this so we don't call into LLVoiceChannel, but simply + // use the status observer + mVoiceEnabled = enabled; + LLVoiceClientStatusObserver::EStatusType status; + + + if (enabled) + { + LLVoiceChannel::getCurrentVoiceChannel()->activate(); + status = LLVoiceClientStatusObserver::STATUS_VOICE_ENABLED; + } + else + { + // Turning voice off looses your current channel -- this makes sure the UI isn't out of sync when you re-enable it. + LLVoiceChannel::getCurrentVoiceChannel()->deactivate(); + status = LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED; + } + } +} + +bool LLVivoxVoiceClient::voiceEnabled() +{ + return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice"); +} + +void LLVivoxVoiceClient::setLipSyncEnabled(BOOL enabled) +{ + mLipSyncEnabled = enabled; +} + +BOOL LLVivoxVoiceClient::lipSyncEnabled() +{ + + if ( mVoiceEnabled && stateDisabled != getState() ) + { + return mLipSyncEnabled; + } + else + { + return FALSE; + } +} + +void LLVivoxVoiceClient::setUsePTT(bool usePTT) +{ + if(usePTT && !mUsePTT) + { + // When the user turns on PTT, reset the current state. + mUserPTTState = false; + } + mUsePTT = usePTT; +} + +void LLVivoxVoiceClient::setPTTIsToggle(bool PTTIsToggle) +{ + if(!PTTIsToggle && mPTTIsToggle) + { + // When the user turns off toggle, reset the current state. + mUserPTTState = false; + } + + mPTTIsToggle = PTTIsToggle; +} + +bool LLVivoxVoiceClient::getPTTIsToggle() +{ + return mPTTIsToggle; +} + +void LLVivoxVoiceClient::setPTTKey(std::string &key) +{ + if(key == "MiddleMouse") + { + mPTTIsMiddleMouse = true; + } + else + { + mPTTIsMiddleMouse = false; + if(!LLKeyboard::keyFromString(key, &mPTTKey)) + { + // If the call failed, don't match any key. + key = KEY_NONE; + } + } +} + +void LLVivoxVoiceClient::setEarLocation(S32 loc) +{ + if(mEarLocation != loc) + { + LL_DEBUGS("Voice") << "Setting mEarLocation to " << loc << LL_ENDL; + + mEarLocation = loc; + mSpatialCoordsDirty = true; + } +} + +void LLVivoxVoiceClient::setVoiceVolume(F32 volume) +{ + int scaled_volume = scale_speaker_volume(volume); + + if(scaled_volume != mSpeakerVolume) + { + int min_volume = scale_speaker_volume(0); + if((scaled_volume == min_volume) || (mSpeakerVolume == min_volume)) + { + mSpeakerMuteDirty = true; + } + + mSpeakerVolume = scaled_volume; + mSpeakerVolumeDirty = true; + } +} + +void LLVivoxVoiceClient::setMicGain(F32 volume) +{ + int scaled_volume = scale_mic_volume(volume); + + if(scaled_volume != mMicVolume) + { + mMicVolume = scaled_volume; + mMicVolumeDirty = true; + } +} + +void LLVivoxVoiceClient::keyDown(KEY key, MASK mask) +{ + if (gKeyboard->getKeyRepeated(key)) + { + // ignore auto-repeat keys + return; + } + + if(!mPTTIsMiddleMouse) + { + bool down = (mPTTKey != KEY_NONE) + && gKeyboard->getKeyDown(mPTTKey); + inputUserControlState(down); + } + + +} +void LLVivoxVoiceClient::keyUp(KEY key, MASK mask) +{ + if(!mPTTIsMiddleMouse) + { + bool down = (mPTTKey != KEY_NONE) + && gKeyboard->getKeyDown(mPTTKey); + inputUserControlState(down); + } + +} +void LLVivoxVoiceClient::middleMouseState(bool down) +{ + if(mPTTIsMiddleMouse) + { + if(mPTTIsMiddleMouse) + { + inputUserControlState(down); + } + } +} + +///////////////////////////// +// Accessors for data related to nearby speakers +BOOL LLVivoxVoiceClient::getVoiceEnabled(const LLUUID& id) +{ + BOOL result = FALSE; + participantState *participant = findParticipantByID(id); + if(participant) + { + // I'm not sure what the semantics of this should be. + // For now, if we have any data about the user that came through the chat channel, assume they're voice-enabled. + result = TRUE; + } + + return result; +} + +std::string LLVivoxVoiceClient::getDisplayName(const LLUUID& id) +{ + std::string result; + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mDisplayName; + } + + return result; +} + + + +BOOL LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id) +{ + BOOL result = FALSE; + + participantState *participant = findParticipantByID(id); + if(participant) + { + if (participant->mSpeakingTimeout.getElapsedTimeF32() > SPEAKING_TIMEOUT) + { + participant->mIsSpeaking = FALSE; + } + result = participant->mIsSpeaking; + } + + return result; +} + +BOOL LLVivoxVoiceClient::getIsModeratorMuted(const LLUUID& id) +{ + BOOL result = FALSE; + + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mIsModeratorMuted; + } + + return result; +} + +F32 LLVivoxVoiceClient::getCurrentPower(const LLUUID& id) +{ + F32 result = 0; + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mPower; + } + + return result; +} + + + +BOOL LLVivoxVoiceClient::getUsingPTT(const LLUUID& id) +{ + BOOL result = FALSE; + + participantState *participant = findParticipantByID(id); + if(participant) + { + // I'm not sure what the semantics of this should be. + // Does "using PTT" mean they're configured with a push-to-talk button? + // For now, we know there's no PTT mechanism in place, so nobody is using it. + } + + return result; +} + +BOOL LLVivoxVoiceClient::getOnMuteList(const LLUUID& id) +{ + BOOL result = FALSE; + + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mOnMuteList; + } + + return result; +} + +// External accessors. +F32 LLVivoxVoiceClient::getUserVolume(const LLUUID& id) +{ + // Minimum volume will be returned for users with voice disabled + F32 result = LLVoiceClient::VOLUME_MIN; + + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mVolume; + + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "mVolume = " << result << " for " << id << LL_ENDL; + } + + return result; +} + +void LLVivoxVoiceClient::setUserVolume(const LLUUID& id, F32 volume) +{ + if(mAudioSession) + { + participantState *participant = findParticipantByID(id); + if (participant && !participant->mIsSelf) + { + if (!is_approx_equal(volume, LLVoiceClient::VOLUME_DEFAULT)) + { + // Store this volume setting for future sessions if it has been + // changed from the default + LLSpeakerVolumeStorage::getInstance()->storeSpeakerVolume(id, volume); + } + else + { + // Remove stored volume setting if it is returned to the default + LLSpeakerVolumeStorage::getInstance()->removeSpeakerVolume(id); + } + + participant->mVolume = llclamp(volume, LLVoiceClient::VOLUME_MIN, LLVoiceClient::VOLUME_MAX); + participant->mVolumeDirty = true; + mAudioSession->mVolumeDirty = true; + } + } +} + +std::string LLVivoxVoiceClient::getGroupID(const LLUUID& id) +{ + std::string result; + + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mGroupID; + } + + return result; +} + +BOOL LLVivoxVoiceClient::getAreaVoiceDisabled() +{ + return mAreaVoiceDisabled; +} + +void LLVivoxVoiceClient::recordingLoopStart(int seconds, int deltaFramesPerControlFrame) +{ +// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Start)" << LL_ENDL; + + if(!mMainSessionGroupHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" + << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" + << "<RecordingControlType>Start</RecordingControlType>" + << "<DeltaFramesPerControlFrame>" << deltaFramesPerControlFrame << "</DeltaFramesPerControlFrame>" + << "<Filename>" << "" << "</Filename>" + << "<EnableAudioRecordingEvents>false</EnableAudioRecordingEvents>" + << "<LoopModeDurationSeconds>" << seconds << "</LoopModeDurationSeconds>" + << "</Request>\n\n\n"; + + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::recordingLoopSave(const std::string& filename) +{ +// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Flush)" << LL_ENDL; + + if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" + << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" + << "<RecordingControlType>Flush</RecordingControlType>" + << "<Filename>" << filename << "</Filename>" + << "</Request>\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::recordingStop() +{ +// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Stop)" << LL_ENDL; + + if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" + << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" + << "<RecordingControlType>Stop</RecordingControlType>" + << "</Request>\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::filePlaybackStart(const std::string& filename) +{ +// LL_DEBUGS("Voice") << "sending SessionGroup.ControlPlayback (Start)" << LL_ENDL; + + if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlPlayback.1\">" + << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" + << "<RecordingControlType>Start</RecordingControlType>" + << "<Filename>" << filename << "</Filename>" + << "</Request>\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::filePlaybackStop() +{ +// LL_DEBUGS("Voice") << "sending SessionGroup.ControlPlayback (Stop)" << LL_ENDL; + + if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlPlayback.1\">" + << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" + << "<RecordingControlType>Stop</RecordingControlType>" + << "</Request>\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::filePlaybackSetPaused(bool paused) +{ + // TODO: Implement once Vivox gives me a sample +} + +void LLVivoxVoiceClient::filePlaybackSetMode(bool vox, float speed) +{ + // TODO: Implement once Vivox gives me a sample +} + +LLVivoxVoiceClient::sessionState::sessionState() : + mErrorStatusCode(0), + mMediaStreamState(streamStateUnknown), + mTextStreamState(streamStateUnknown), + mCreateInProgress(false), + mMediaConnectInProgress(false), + mVoiceInvitePending(false), + mTextInvitePending(false), + mSynthesizedCallerID(false), + mIsChannel(false), + mIsSpatial(false), + mIsP2P(false), + mIncoming(false), + mVoiceEnabled(false), + mReconnect(false), + mVolumeDirty(false), + mMuteDirty(false), + mParticipantsChanged(false) +{ +} + +LLVivoxVoiceClient::sessionState::~sessionState() +{ + removeAllParticipants(); +} + +bool LLVivoxVoiceClient::sessionState::isCallBackPossible() +{ + // This may change to be explicitly specified by vivox in the future... + // Currently, only PSTN P2P calls cannot be returned. + // Conveniently, this is also the only case where we synthesize a caller UUID. + return !mSynthesizedCallerID; +} + +bool LLVivoxVoiceClient::sessionState::isTextIMPossible() +{ + // This may change to be explicitly specified by vivox in the future... + return !mSynthesizedCallerID; +} + + +LLVivoxVoiceClient::sessionIterator LLVivoxVoiceClient::sessionsBegin(void) +{ + return mSessions.begin(); +} + +LLVivoxVoiceClient::sessionIterator LLVivoxVoiceClient::sessionsEnd(void) +{ + return mSessions.end(); +} + + +LLVivoxVoiceClient::sessionState *LLVivoxVoiceClient::findSession(const std::string &handle) +{ + sessionState *result = NULL; + sessionMap::iterator iter = mSessionsByHandle.find(handle); + if(iter != mSessionsByHandle.end()) + { + result = iter->second; + } + + return result; +} + +LLVivoxVoiceClient::sessionState *LLVivoxVoiceClient::findSessionBeingCreatedByURI(const std::string &uri) +{ + sessionState *result = NULL; + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *session = *iter; + if(session->mCreateInProgress && (session->mSIPURI == uri)) + { + result = session; + break; + } + } + + return result; +} + +LLVivoxVoiceClient::sessionState *LLVivoxVoiceClient::findSession(const LLUUID &participant_id) +{ + sessionState *result = NULL; + + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *session = *iter; + if((session->mCallerID == participant_id) || (session->mIMSessionID == participant_id)) + { + result = session; + break; + } + } + + return result; +} + +LLVivoxVoiceClient::sessionState *LLVivoxVoiceClient::addSession(const std::string &uri, const std::string &handle) +{ + sessionState *result = NULL; + + if(handle.empty()) + { + // No handle supplied. + // Check whether there's already a session with this URI + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *s = *iter; + if((s->mSIPURI == uri) || (s->mAlternateSIPURI == uri)) + { + // TODO: I need to think about this logic... it's possible that this case should raise an internal error. + result = s; + break; + } + } + } + else // (!handle.empty()) + { + // Check for an existing session with this handle + sessionMap::iterator iter = mSessionsByHandle.find(handle); + + if(iter != mSessionsByHandle.end()) + { + result = iter->second; + } + } + + if(!result) + { + // No existing session found. + + LL_DEBUGS("Voice") << "adding new session: handle " << handle << " URI " << uri << LL_ENDL; + result = new sessionState(); + result->mSIPURI = uri; + result->mHandle = handle; + + mSessions.insert(result); + + if(!result->mHandle.empty()) + { + mSessionsByHandle.insert(sessionMap::value_type(result->mHandle, result)); + } + } + else + { + // Found an existing session + + if(uri != result->mSIPURI) + { + // TODO: Should this be an internal error? + LL_DEBUGS("Voice") << "changing uri from " << result->mSIPURI << " to " << uri << LL_ENDL; + setSessionURI(result, uri); + } + + if(handle != result->mHandle) + { + if(handle.empty()) + { + // There's at least one race condition where where addSession was clearing an existing session handle, which caused things to break. + LL_DEBUGS("Voice") << "NOT clearing handle " << result->mHandle << LL_ENDL; + } + else + { + // TODO: Should this be an internal error? + LL_DEBUGS("Voice") << "changing handle from " << result->mHandle << " to " << handle << LL_ENDL; + setSessionHandle(result, handle); + } + } + + LL_DEBUGS("Voice") << "returning existing session: handle " << handle << " URI " << uri << LL_ENDL; + } + + verifySessionState(); + + return result; +} + +void LLVivoxVoiceClient::setSessionHandle(sessionState *session, const std::string &handle) +{ + // Have to remove the session from the handle-indexed map before changing the handle, or things will break badly. + + if(!session->mHandle.empty()) + { + // Remove session from the map if it should have been there. + sessionMap::iterator iter = mSessionsByHandle.find(session->mHandle); + if(iter != mSessionsByHandle.end()) + { + if(iter->second != session) + { + LL_ERRS("Voice") << "Internal error: session mismatch!" << LL_ENDL; + } + + mSessionsByHandle.erase(iter); + } + else + { + LL_ERRS("Voice") << "Internal error: session handle not found in map!" << LL_ENDL; + } + } + + session->mHandle = handle; + + if(!handle.empty()) + { + mSessionsByHandle.insert(sessionMap::value_type(session->mHandle, session)); + } + + verifySessionState(); +} + +void LLVivoxVoiceClient::setSessionURI(sessionState *session, const std::string &uri) +{ + // There used to be a map of session URIs to sessions, which made this complex.... + session->mSIPURI = uri; + + verifySessionState(); +} + +void LLVivoxVoiceClient::deleteSession(sessionState *session) +{ + // Remove the session from the handle map + if(!session->mHandle.empty()) + { + sessionMap::iterator iter = mSessionsByHandle.find(session->mHandle); + if(iter != mSessionsByHandle.end()) + { + if(iter->second != session) + { + LL_ERRS("Voice") << "Internal error: session mismatch" << LL_ENDL; + } + mSessionsByHandle.erase(iter); + } + } + + // Remove the session from the URI map + mSessions.erase(session); + + // At this point, the session should be unhooked from all lists and all state should be consistent. + verifySessionState(); + + // If this is the current audio session, clean up the pointer which will soon be dangling. + if(mAudioSession == session) + { + mAudioSession = NULL; + mAudioSessionChanged = true; + } + + // ditto for the next audio session + if(mNextAudioSession == session) + { + mNextAudioSession = NULL; + } + + // delete the session + delete session; +} + +void LLVivoxVoiceClient::deleteAllSessions() +{ + LL_DEBUGS("Voice") << "called" << LL_ENDL; + + while(!mSessions.empty()) + { + deleteSession(*(sessionsBegin())); + } + + if(!mSessionsByHandle.empty()) + { + LL_ERRS("Voice") << "Internal error: empty session map, non-empty handle map" << LL_ENDL; + } +} + +void LLVivoxVoiceClient::verifySessionState(void) +{ + // This is mostly intended for debugging problems with session state management. + LL_DEBUGS("Voice") << "Total session count: " << mSessions.size() << " , session handle map size: " << mSessionsByHandle.size() << LL_ENDL; + + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *session = *iter; + + LL_DEBUGS("Voice") << "session " << session << ": handle " << session->mHandle << ", URI " << session->mSIPURI << LL_ENDL; + + if(!session->mHandle.empty()) + { + // every session with a non-empty handle needs to be in the handle map + sessionMap::iterator i2 = mSessionsByHandle.find(session->mHandle); + if(i2 == mSessionsByHandle.end()) + { + LL_ERRS("Voice") << "internal error (handle " << session->mHandle << " not found in session map)" << LL_ENDL; + } + else + { + if(i2->second != session) + { + LL_ERRS("Voice") << "internal error (handle " << session->mHandle << " in session map points to another session)" << LL_ENDL; + } + } + } + } + + // check that every entry in the handle map points to a valid session in the session set + for(sessionMap::iterator iter = mSessionsByHandle.begin(); iter != mSessionsByHandle.end(); iter++) + { + sessionState *session = iter->second; + sessionIterator i2 = mSessions.find(session); + if(i2 == mSessions.end()) + { + LL_ERRS("Voice") << "internal error (session for handle " << session->mHandle << " not found in session map)" << LL_ENDL; + } + else + { + if(session->mHandle != (*i2)->mHandle) + { + LL_ERRS("Voice") << "internal error (session for handle " << session->mHandle << " points to session with different handle " << (*i2)->mHandle << ")" << LL_ENDL; + } + } + } +} + +LLVivoxVoiceClient::buddyListEntry::buddyListEntry(const std::string &uri) : + mURI(uri) +{ + mOnlineSL = false; + mOnlineSLim = false; + mCanSeeMeOnline = true; + mHasBlockListEntry = false; + mHasAutoAcceptListEntry = false; + mNameResolved = false; + mInVivoxBuddies = false; + mInSLFriends = false; + mNeedsNameUpdate = false; +} + +void LLVivoxVoiceClient::processBuddyListEntry(const std::string &uri, const std::string &displayName) +{ + buddyListEntry *buddy = addBuddy(uri, displayName); + buddy->mInVivoxBuddies = true; +} + +LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::addBuddy(const std::string &uri) +{ + std::string empty; + buddyListEntry *buddy = addBuddy(uri, empty); + if(buddy->mDisplayName.empty()) + { + buddy->mNameResolved = false; + } + return buddy; +} + +LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::addBuddy(const std::string &uri, const std::string &displayName) +{ + buddyListEntry *result = NULL; + buddyListMap::iterator iter = mBuddyListMap.find(uri); + + if(iter != mBuddyListMap.end()) + { + // Found a matching buddy already in the map. + LL_DEBUGS("Voice") << "adding existing buddy " << uri << LL_ENDL; + result = iter->second; + } + + if(!result) + { + // participant isn't already in one list or the other. + LL_DEBUGS("Voice") << "adding new buddy " << uri << LL_ENDL; + result = new buddyListEntry(uri); + result->mDisplayName = displayName; + + if(IDFromName(uri, result->mUUID)) + { + // Extracted UUID from name successfully. + } + else + { + LL_DEBUGS("Voice") << "Couldn't find ID for buddy " << uri << " (\"" << displayName << "\")" << LL_ENDL; + } + + mBuddyListMap.insert(buddyListMap::value_type(result->mURI, result)); + } + + return result; +} + +LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::findBuddy(const std::string &uri) +{ + buddyListEntry *result = NULL; + buddyListMap::iterator iter = mBuddyListMap.find(uri); + if(iter != mBuddyListMap.end()) + { + result = iter->second; + } + + return result; +} + +LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::findBuddy(const LLUUID &id) +{ + buddyListEntry *result = NULL; + buddyListMap::iterator iter; + + for(iter = mBuddyListMap.begin(); iter != mBuddyListMap.end(); iter++) + { + if(iter->second->mUUID == id) + { + result = iter->second; + break; + } + } + + return result; +} + +LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::findBuddyByDisplayName(const std::string &name) +{ + buddyListEntry *result = NULL; + buddyListMap::iterator iter; + + for(iter = mBuddyListMap.begin(); iter != mBuddyListMap.end(); iter++) + { + if(iter->second->mDisplayName == name) + { + result = iter->second; + break; + } + } + + return result; +} + +void LLVivoxVoiceClient::deleteBuddy(const std::string &uri) +{ + buddyListMap::iterator iter = mBuddyListMap.find(uri); + if(iter != mBuddyListMap.end()) + { + LL_DEBUGS("Voice") << "deleting buddy " << uri << LL_ENDL; + buddyListEntry *buddy = iter->second; + mBuddyListMap.erase(iter); + delete buddy; + } + else + { + LL_DEBUGS("Voice") << "attempt to delete nonexistent buddy " << uri << LL_ENDL; + } + +} + +void LLVivoxVoiceClient::deleteAllBuddies(void) +{ + while(!mBuddyListMap.empty()) + { + deleteBuddy(mBuddyListMap.begin()->first); + } + + // Don't want to correlate with friends list when we've emptied the buddy list. + mBuddyListMapPopulated = false; + + // Don't want to correlate with friends list when we've reset the block rules. + mBlockRulesListReceived = false; + mAutoAcceptRulesListReceived = false; +} + +void LLVivoxVoiceClient::deleteAllBlockRules(void) +{ + // Clear the block list entry flags from all local buddy list entries + buddyListMap::iterator buddy_it; + for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) + { + buddy_it->second->mHasBlockListEntry = false; + } +} + +void LLVivoxVoiceClient::deleteAllAutoAcceptRules(void) +{ + // Clear the auto-accept list entry flags from all local buddy list entries + buddyListMap::iterator buddy_it; + for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) + { + buddy_it->second->mHasAutoAcceptListEntry = false; + } +} + +void LLVivoxVoiceClient::addBlockRule(const std::string &blockMask, const std::string &presenceOnly) +{ + buddyListEntry *buddy = NULL; + + // blockMask is the SIP URI of a friends list entry + buddyListMap::iterator iter = mBuddyListMap.find(blockMask); + if(iter != mBuddyListMap.end()) + { + LL_DEBUGS("Voice") << "block list entry for " << blockMask << LL_ENDL; + buddy = iter->second; + } + + if(buddy == NULL) + { + LL_DEBUGS("Voice") << "block list entry for unknown buddy " << blockMask << LL_ENDL; + buddy = addBuddy(blockMask); + } + + if(buddy != NULL) + { + buddy->mHasBlockListEntry = true; + } +} + +void LLVivoxVoiceClient::addAutoAcceptRule(const std::string &autoAcceptMask, const std::string &autoAddAsBuddy) +{ + buddyListEntry *buddy = NULL; + + // blockMask is the SIP URI of a friends list entry + buddyListMap::iterator iter = mBuddyListMap.find(autoAcceptMask); + if(iter != mBuddyListMap.end()) + { + LL_DEBUGS("Voice") << "auto-accept list entry for " << autoAcceptMask << LL_ENDL; + buddy = iter->second; + } + + if(buddy == NULL) + { + LL_DEBUGS("Voice") << "auto-accept list entry for unknown buddy " << autoAcceptMask << LL_ENDL; + buddy = addBuddy(autoAcceptMask); + } + + if(buddy != NULL) + { + buddy->mHasAutoAcceptListEntry = true; + } +} + +void LLVivoxVoiceClient::accountListBlockRulesResponse(int statusCode, const std::string &statusString) +{ + // Block list entries were updated via addBlockRule() during parsing. Just flag that we're done. + mBlockRulesListReceived = true; +} + +void LLVivoxVoiceClient::accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString) +{ + // Block list entries were updated via addBlockRule() during parsing. Just flag that we're done. + mAutoAcceptRulesListReceived = true; +} + +void LLVivoxVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) +{ + mParticipantObservers.insert(observer); +} + +void LLVivoxVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) +{ + mParticipantObservers.erase(observer); +} + +void LLVivoxVoiceClient::notifyParticipantObservers() +{ + for (observer_set_t::iterator it = mParticipantObservers.begin(); + it != mParticipantObservers.end(); + ) + { + LLVoiceClientParticipantObserver* observer = *it; + observer->onChange(); + // In case onChange() deleted an entry. + it = mParticipantObservers.upper_bound(observer); + } +} + +void LLVivoxVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) +{ + mStatusObservers.insert(observer); +} + +void LLVivoxVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) +{ + mStatusObservers.erase(observer); +} + +void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status) +{ + if(mAudioSession) + { + if(status == LLVoiceClientStatusObserver::ERROR_UNKNOWN) + { + switch(mAudioSession->mErrorStatusCode) + { + case 20713: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_FULL; break; + case 20714: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_LOCKED; break; + case 20715: + //invalid channel, we may be using a set of poorly cached + //info + status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; + break; + case 1009: + //invalid username and password + status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; + break; + } + + // Reset the error code to make sure it won't be reused later by accident. + mAudioSession->mErrorStatusCode = 0; + } + else if(status == LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL) + { + switch(mAudioSession->mErrorStatusCode) + { + case 404: // NOT_FOUND + case 480: // TEMPORARILY_UNAVAILABLE + case 408: // REQUEST_TIMEOUT + // call failed because other user was not available + // treat this as an error case + status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; + + // Reset the error code to make sure it won't be reused later by accident. + mAudioSession->mErrorStatusCode = 0; + break; + } + } + } + + LL_DEBUGS("Voice") + << " " << LLVoiceClientStatusObserver::status2string(status) + << ", session URI " << getAudioSessionURI() + << (inSpatialChannel()?", proximal is true":", proximal is false") + << LL_ENDL; + + for (status_observer_set_t::iterator it = mStatusObservers.begin(); + it != mStatusObservers.end(); + ) + { + LLVoiceClientStatusObserver* observer = *it; + observer->onChange(status, getAudioSessionURI(), inSpatialChannel()); + // In case onError() deleted an entry. + it = mStatusObservers.upper_bound(observer); + } + +} + +void LLVivoxVoiceClient::addObserver(LLFriendObserver* observer) +{ + mFriendObservers.insert(observer); +} + +void LLVivoxVoiceClient::removeObserver(LLFriendObserver* observer) +{ + mFriendObservers.erase(observer); +} + +void LLVivoxVoiceClient::notifyFriendObservers() +{ + for (friend_observer_set_t::iterator it = mFriendObservers.begin(); + it != mFriendObservers.end(); + ) + { + LLFriendObserver* observer = *it; + it++; + // The only friend-related thing we notify on is online/offline transitions. + observer->changed(LLFriendObserver::ONLINE); + } +} + +void LLVivoxVoiceClient::lookupName(const LLUUID &id) +{ + BOOL is_group = FALSE; + gCacheName->get(id, is_group, &LLVivoxVoiceClient::onAvatarNameLookup); +} + +//static +void LLVivoxVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group) +{ + std::string name = llformat("%s %s", first.c_str(), last.c_str()); + LLVivoxVoiceClient::getInstance()->avatarNameResolved(id, name); + +} + +void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name) +{ + // If the avatar whose name just resolved is on our friends list, resync the friends list. + if(LLAvatarTracker::instance().getBuddyInfo(id) != NULL) + { + mFriendsListDirty = true; + } + // Iterate over all sessions. + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *session = *iter; + // Check for this user as a participant in this session + participantState *participant = session->findParticipantByID(id); + if(participant) + { + // Found -- fill in the name + participant->mAccountName = name; + // and post a "participants updated" message to listeners later. + session->mParticipantsChanged = true; + } + + // Check whether this is a p2p session whose caller name just resolved + if(session->mCallerID == id) + { + // this session's "caller ID" just resolved. Fill in the name. + session->mName = name; + if(session->mTextInvitePending) + { + session->mTextInvitePending = false; + + // We don't need to call gIMMgr->addP2PSession() here. The first incoming message will create the panel. + } + if(session->mVoiceInvitePending) + { + session->mVoiceInvitePending = false; + + gIMMgr->inviteToSession( + session->mIMSessionID, + session->mName, + session->mCallerID, + session->mName, + IM_SESSION_P2P_INVITE, + LLIMMgr::INVITATION_TYPE_VOICE, + session->mHandle, + session->mSIPURI); + } + + } + } +} + + +LLVivoxProtocolParser::LLVivoxProtocolParser() +{ + parser = NULL; + parser = XML_ParserCreate(NULL); + + reset(); +} + +void LLVivoxProtocolParser::reset() +{ + responseDepth = 0; + ignoringTags = false; + accumulateText = false; + energy = 0.f; + hasText = false; + hasAudio = false; + hasVideo = false; + terminated = false; + ignoreDepth = 0; + isChannel = false; + incoming = false; + enabled = false; + isEvent = false; + isLocallyMuted = false; + isModeratorMuted = false; + isSpeaking = false; + participantType = 0; + squelchDebugOutput = false; + returnCode = -1; + state = 0; + statusCode = 0; + volume = 0; + textBuffer.clear(); + alias.clear(); + numberOfAliases = 0; + applicationString.clear(); +} + +//virtual +LLVivoxProtocolParser::~LLVivoxProtocolParser() +{ + if (parser) + XML_ParserFree(parser); +} + +// virtual +LLIOPipe::EStatus LLVivoxProtocolParser::process_impl( + const LLChannelDescriptors& channels, + buffer_ptr_t& buffer, + bool& eos, + LLSD& context, + LLPumpIO* pump) +{ + LLBufferStream istr(channels, buffer.get()); + std::ostringstream ostr; + while (istr.good()) + { + char buf[1024]; + istr.read(buf, sizeof(buf)); + mInput.append(buf, istr.gcount()); + } + + // Look for input delimiter(s) in the input buffer. If one is found, send the message to the xml parser. + int start = 0; + int delim; + while((delim = mInput.find("\n\n\n", start)) != std::string::npos) + { + + // Reset internal state of the LLVivoxProtocolParser (no effect on the expat parser) + reset(); + + XML_ParserReset(parser, NULL); + XML_SetElementHandler(parser, ExpatStartTag, ExpatEndTag); + XML_SetCharacterDataHandler(parser, ExpatCharHandler); + XML_SetUserData(parser, this); + XML_Parse(parser, mInput.data() + start, delim - start, false); + + // If this message isn't set to be squelched, output the raw XML received. + if(!squelchDebugOutput) + { + LL_DEBUGS("Voice") << "parsing: " << mInput.substr(start, delim - start) << LL_ENDL; + } + + start = delim + 3; + } + + if(start != 0) + mInput = mInput.substr(start); + + LL_DEBUGS("VivoxProtocolParser") << "at end, mInput is: " << mInput << LL_ENDL; + + if(!LLVivoxVoiceClient::getInstance()->mConnected) + { + // If voice has been disabled, we just want to close the socket. This does so. + LL_INFOS("Voice") << "returning STATUS_STOP" << LL_ENDL; + return STATUS_STOP; + } + + return STATUS_OK; +} + +void XMLCALL LLVivoxProtocolParser::ExpatStartTag(void *data, const char *el, const char **attr) +{ + if (data) + { + LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; + object->StartTag(el, attr); + } +} + +// -------------------------------------------------------------------------------- + +void XMLCALL LLVivoxProtocolParser::ExpatEndTag(void *data, const char *el) +{ + if (data) + { + LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; + object->EndTag(el); + } +} + +// -------------------------------------------------------------------------------- + +void XMLCALL LLVivoxProtocolParser::ExpatCharHandler(void *data, const XML_Char *s, int len) +{ + if (data) + { + LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; + object->CharData(s, len); + } +} + +// -------------------------------------------------------------------------------- + + +void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr) +{ + // Reset the text accumulator. We shouldn't have strings that are inturrupted by new tags + textBuffer.clear(); + // only accumulate text if we're not ignoring tags. + accumulateText = !ignoringTags; + + if (responseDepth == 0) + { + isEvent = !stricmp("Event", tag); + + if (!stricmp("Response", tag) || isEvent) + { + // Grab the attributes + while (*attr) + { + const char *key = *attr++; + const char *value = *attr++; + + if (!stricmp("requestId", key)) + { + requestId = value; + } + else if (!stricmp("action", key)) + { + actionString = value; + } + else if (!stricmp("type", key)) + { + eventTypeString = value; + } + } + } + LL_DEBUGS("VivoxProtocolParser") << tag << " (" << responseDepth << ")" << LL_ENDL; + } + else + { + if (ignoringTags) + { + LL_DEBUGS("VivoxProtocolParser") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; + } + else + { + LL_DEBUGS("VivoxProtocolParser") << tag << " (" << responseDepth << ")" << LL_ENDL; + + // Ignore the InputXml stuff so we don't get confused + if (!stricmp("InputXml", tag)) + { + ignoringTags = true; + ignoreDepth = responseDepth; + accumulateText = false; + + LL_DEBUGS("VivoxProtocolParser") << "starting ignore, ignoreDepth is " << ignoreDepth << LL_ENDL; + } + else if (!stricmp("CaptureDevices", tag)) + { + LLVivoxVoiceClient::getInstance()->clearCaptureDevices(); + } + else if (!stricmp("RenderDevices", tag)) + { + LLVivoxVoiceClient::getInstance()->clearRenderDevices(); + } + else if (!stricmp("CaptureDevice", tag)) + { + deviceString.clear(); + } + else if (!stricmp("RenderDevice", tag)) + { + deviceString.clear(); + } + else if (!stricmp("Buddies", tag)) + { + LLVivoxVoiceClient::getInstance()->deleteAllBuddies(); + } + else if (!stricmp("BlockRules", tag)) + { + LLVivoxVoiceClient::getInstance()->deleteAllBlockRules(); + } + else if (!stricmp("AutoAcceptRules", tag)) + { + LLVivoxVoiceClient::getInstance()->deleteAllAutoAcceptRules(); + } + + } + } + responseDepth++; +} + +// -------------------------------------------------------------------------------- + +void LLVivoxProtocolParser::EndTag(const char *tag) +{ + const std::string& string = textBuffer; + + responseDepth--; + + if (ignoringTags) + { + if (ignoreDepth == responseDepth) + { + LL_DEBUGS("VivoxProtocolParser") << "end of ignore" << LL_ENDL; + ignoringTags = false; + } + else + { + LL_DEBUGS("VivoxProtocolParser") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; + } + } + + if (!ignoringTags) + { + LL_DEBUGS("VivoxProtocolParser") << "processing tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; + + // Closing a tag. Finalize the text we've accumulated and reset + if (!stricmp("ReturnCode", tag)) + returnCode = strtol(string.c_str(), NULL, 10); + else if (!stricmp("SessionHandle", tag)) + sessionHandle = string; + else if (!stricmp("SessionGroupHandle", tag)) + sessionGroupHandle = string; + else if (!stricmp("StatusCode", tag)) + statusCode = strtol(string.c_str(), NULL, 10); + else if (!stricmp("StatusString", tag)) + statusString = string; + else if (!stricmp("ParticipantURI", tag)) + uriString = string; + else if (!stricmp("Volume", tag)) + volume = strtol(string.c_str(), NULL, 10); + else if (!stricmp("Energy", tag)) + energy = (F32)strtod(string.c_str(), NULL); + else if (!stricmp("IsModeratorMuted", tag)) + isModeratorMuted = !stricmp(string.c_str(), "true"); + else if (!stricmp("IsSpeaking", tag)) + isSpeaking = !stricmp(string.c_str(), "true"); + else if (!stricmp("Alias", tag)) + alias = string; + else if (!stricmp("NumberOfAliases", tag)) + numberOfAliases = strtol(string.c_str(), NULL, 10); + else if (!stricmp("Application", tag)) + applicationString = string; + else if (!stricmp("ConnectorHandle", tag)) + connectorHandle = string; + else if (!stricmp("VersionID", tag)) + versionID = string; + else if (!stricmp("AccountHandle", tag)) + accountHandle = string; + else if (!stricmp("State", tag)) + state = strtol(string.c_str(), NULL, 10); + else if (!stricmp("URI", tag)) + uriString = string; + else if (!stricmp("IsChannel", tag)) + isChannel = !stricmp(string.c_str(), "true"); + else if (!stricmp("Incoming", tag)) + incoming = !stricmp(string.c_str(), "true"); + else if (!stricmp("Enabled", tag)) + enabled = !stricmp(string.c_str(), "true"); + else if (!stricmp("Name", tag)) + nameString = string; + else if (!stricmp("AudioMedia", tag)) + audioMediaString = string; + else if (!stricmp("ChannelName", tag)) + nameString = string; + else if (!stricmp("DisplayName", tag)) + displayNameString = string; + else if (!stricmp("Device", tag)) + deviceString = string; + else if (!stricmp("AccountName", tag)) + nameString = string; + else if (!stricmp("ParticipantType", tag)) + participantType = strtol(string.c_str(), NULL, 10); + else if (!stricmp("IsLocallyMuted", tag)) + isLocallyMuted = !stricmp(string.c_str(), "true"); + else if (!stricmp("MicEnergy", tag)) + energy = (F32)strtod(string.c_str(), NULL); + else if (!stricmp("ChannelName", tag)) + nameString = string; + else if (!stricmp("ChannelURI", tag)) + uriString = string; + else if (!stricmp("BuddyURI", tag)) + uriString = string; + else if (!stricmp("Presence", tag)) + statusString = string; + else if (!stricmp("CaptureDevice", tag)) + { + LLVivoxVoiceClient::getInstance()->addCaptureDevice(deviceString); + } + else if (!stricmp("RenderDevice", tag)) + { + LLVivoxVoiceClient::getInstance()->addRenderDevice(deviceString); + } + else if (!stricmp("Buddy", tag)) + { + LLVivoxVoiceClient::getInstance()->processBuddyListEntry(uriString, displayNameString); + } + else if (!stricmp("BlockRule", tag)) + { + LLVivoxVoiceClient::getInstance()->addBlockRule(blockMask, presenceOnly); + } + else if (!stricmp("BlockMask", tag)) + blockMask = string; + else if (!stricmp("PresenceOnly", tag)) + presenceOnly = string; + else if (!stricmp("AutoAcceptRule", tag)) + { + LLVivoxVoiceClient::getInstance()->addAutoAcceptRule(autoAcceptMask, autoAddAsBuddy); + } + else if (!stricmp("AutoAcceptMask", tag)) + autoAcceptMask = string; + else if (!stricmp("AutoAddAsBuddy", tag)) + autoAddAsBuddy = string; + else if (!stricmp("MessageHeader", tag)) + messageHeader = string; + else if (!stricmp("MessageBody", tag)) + messageBody = string; + else if (!stricmp("NotificationType", tag)) + notificationType = string; + else if (!stricmp("HasText", tag)) + hasText = !stricmp(string.c_str(), "true"); + else if (!stricmp("HasAudio", tag)) + hasAudio = !stricmp(string.c_str(), "true"); + else if (!stricmp("HasVideo", tag)) + hasVideo = !stricmp(string.c_str(), "true"); + else if (!stricmp("Terminated", tag)) + terminated = !stricmp(string.c_str(), "true"); + else if (!stricmp("SubscriptionHandle", tag)) + subscriptionHandle = string; + else if (!stricmp("SubscriptionType", tag)) + subscriptionType = string; + + + textBuffer.clear(); + accumulateText= false; + + if (responseDepth == 0) + { + // We finished all of the XML, process the data + processResponse(tag); + } + } +} + +// -------------------------------------------------------------------------------- + +void LLVivoxProtocolParser::CharData(const char *buffer, int length) +{ + /* + This method is called for anything that isn't a tag, which can be text you + want that lies between tags, and a lot of stuff you don't want like file formatting + (tabs, spaces, CR/LF, etc). + + Only copy text if we are in accumulate mode... + */ + if (accumulateText) + textBuffer.append(buffer, length); +} + +// -------------------------------------------------------------------------------- + +void LLVivoxProtocolParser::processResponse(std::string tag) +{ + LL_DEBUGS("VivoxProtocolParser") << tag << LL_ENDL; + + // SLIM SDK: the SDK now returns a statusCode of "200" (OK) for success. This is a change vs. previous SDKs. + // According to Mike S., "The actual API convention is that responses with return codes of 0 are successful, regardless of the status code returned", + // so I believe this will give correct behavior. + + if(returnCode == 0) + statusCode = 0; + + if (isEvent) + { + const char *eventTypeCstr = eventTypeString.c_str(); + if (!stricmp(eventTypeCstr, "AccountLoginStateChangeEvent")) + { + LLVivoxVoiceClient::getInstance()->accountLoginStateChangeEvent(accountHandle, statusCode, statusString, state); + } + else if (!stricmp(eventTypeCstr, "SessionAddedEvent")) + { + /* + <Event type="SessionAddedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> + <Uri>sip:confctl-1408789@bhr.vivox.com</Uri> + <IsChannel>true</IsChannel> + <Incoming>false</Incoming> + <ChannelName /> + </Event> + */ + LLVivoxVoiceClient::getInstance()->sessionAddedEvent(uriString, alias, sessionHandle, sessionGroupHandle, isChannel, incoming, nameString, applicationString); + } + else if (!stricmp(eventTypeCstr, "SessionRemovedEvent")) + { + LLVivoxVoiceClient::getInstance()->sessionRemovedEvent(sessionHandle, sessionGroupHandle); + } + else if (!stricmp(eventTypeCstr, "SessionGroupAddedEvent")) + { + LLVivoxVoiceClient::getInstance()->sessionGroupAddedEvent(sessionGroupHandle); + } + else if (!stricmp(eventTypeCstr, "MediaStreamUpdatedEvent")) + { + /* + <Event type="MediaStreamUpdatedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> + <StatusCode>200</StatusCode> + <StatusString>OK</StatusString> + <State>2</State> + <Incoming>false</Incoming> + </Event> + */ + LLVivoxVoiceClient::getInstance()->mediaStreamUpdatedEvent(sessionHandle, sessionGroupHandle, statusCode, statusString, state, incoming); + } + else if (!stricmp(eventTypeCstr, "TextStreamUpdatedEvent")) + { + /* + <Event type="TextStreamUpdatedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg1</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==1</SessionHandle> + <Enabled>true</Enabled> + <State>1</State> + <Incoming>true</Incoming> + </Event> + */ + LLVivoxVoiceClient::getInstance()->textStreamUpdatedEvent(sessionHandle, sessionGroupHandle, enabled, state, incoming); + } + else if (!stricmp(eventTypeCstr, "ParticipantAddedEvent")) + { + /* + <Event type="ParticipantAddedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg4</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==4</SessionHandle> + <ParticipantUri>sip:xI5auBZ60SJWIk606-1JGRQ==@bhr.vivox.com</ParticipantUri> + <AccountName>xI5auBZ60SJWIk606-1JGRQ==</AccountName> + <DisplayName /> + <ParticipantType>0</ParticipantType> + </Event> + */ + LLVivoxVoiceClient::getInstance()->participantAddedEvent(sessionHandle, sessionGroupHandle, uriString, alias, nameString, displayNameString, participantType); + } + else if (!stricmp(eventTypeCstr, "ParticipantRemovedEvent")) + { + /* + <Event type="ParticipantRemovedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg4</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==4</SessionHandle> + <ParticipantUri>sip:xtx7YNV-3SGiG7rA1fo5Ndw==@bhr.vivox.com</ParticipantUri> + <AccountName>xtx7YNV-3SGiG7rA1fo5Ndw==</AccountName> + </Event> + */ + LLVivoxVoiceClient::getInstance()->participantRemovedEvent(sessionHandle, sessionGroupHandle, uriString, alias, nameString); + } + else if (!stricmp(eventTypeCstr, "ParticipantUpdatedEvent")) + { + /* + <Event type="ParticipantUpdatedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> + <ParticipantUri>sip:xFnPP04IpREWNkuw1cOXlhw==@bhr.vivox.com</ParticipantUri> + <IsModeratorMuted>false</IsModeratorMuted> + <IsSpeaking>true</IsSpeaking> + <Volume>44</Volume> + <Energy>0.0879437</Energy> + </Event> + */ + + // These happen so often that logging them is pretty useless. + squelchDebugOutput = true; + + LLVivoxVoiceClient::getInstance()->participantUpdatedEvent(sessionHandle, sessionGroupHandle, uriString, alias, isModeratorMuted, isSpeaking, volume, energy); + } + else if (!stricmp(eventTypeCstr, "AuxAudioPropertiesEvent")) + { + LLVivoxVoiceClient::getInstance()->auxAudioPropertiesEvent(energy); + } + else if (!stricmp(eventTypeCstr, "BuddyPresenceEvent")) + { + LLVivoxVoiceClient::getInstance()->buddyPresenceEvent(uriString, alias, statusString, applicationString); + } + else if (!stricmp(eventTypeCstr, "BuddyAndGroupListChangedEvent")) + { + // The buddy list was updated during parsing. + // Need to recheck against the friends list. + LLVivoxVoiceClient::getInstance()->buddyListChanged(); + } + else if (!stricmp(eventTypeCstr, "BuddyChangedEvent")) + { + /* + <Event type="BuddyChangedEvent"> + <AccountHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==</AccountHandle> + <BuddyURI>sip:x9fFHFZjOTN6OESF1DUPrZQ==@bhr.vivox.com</BuddyURI> + <DisplayName>Monroe Tester</DisplayName> + <BuddyData /> + <GroupID>0</GroupID> + <ChangeType>Set</ChangeType> + </Event> + */ + // TODO: Question: Do we need to process this at all? + } + else if (!stricmp(eventTypeCstr, "MessageEvent")) + { + LLVivoxVoiceClient::getInstance()->messageEvent(sessionHandle, uriString, alias, messageHeader, messageBody, applicationString); + } + else if (!stricmp(eventTypeCstr, "SessionNotificationEvent")) + { + LLVivoxVoiceClient::getInstance()->sessionNotificationEvent(sessionHandle, uriString, notificationType); + } + else if (!stricmp(eventTypeCstr, "SubscriptionEvent")) + { + LLVivoxVoiceClient::getInstance()->subscriptionEvent(uriString, subscriptionHandle, alias, displayNameString, applicationString, subscriptionType); + } + else if (!stricmp(eventTypeCstr, "SessionUpdatedEvent")) + { + /* + <Event type="SessionUpdatedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> + <Uri>sip:confctl-9@bhd.vivox.com</Uri> + <IsMuted>0</IsMuted> + <Volume>50</Volume> + <TransmitEnabled>1</TransmitEnabled> + <IsFocused>0</IsFocused> + <SpeakerPosition><Position><X>0</X><Y>0</Y><Z>0</Z></Position></SpeakerPosition> + <SessionFontID>0</SessionFontID> + </Event> + */ + // We don't need to process this, but we also shouldn't warn on it, since that confuses people. + } + + else if (!stricmp(eventTypeCstr, "SessionGroupRemovedEvent")) + { + /* + <Event type="SessionGroupRemovedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> + </Event> + */ + // We don't need to process this, but we also shouldn't warn on it, since that confuses people. + } + else + { + LL_WARNS("VivoxProtocolParser") << "Unknown event type " << eventTypeString << LL_ENDL; + } + } + else + { + const char *actionCstr = actionString.c_str(); + if (!stricmp(actionCstr, "Connector.Create.1")) + { + LLVivoxVoiceClient::getInstance()->connectorCreateResponse(statusCode, statusString, connectorHandle, versionID); + } + else if (!stricmp(actionCstr, "Account.Login.1")) + { + LLVivoxVoiceClient::getInstance()->loginResponse(statusCode, statusString, accountHandle, numberOfAliases); + } + else if (!stricmp(actionCstr, "Session.Create.1")) + { + LLVivoxVoiceClient::getInstance()->sessionCreateResponse(requestId, statusCode, statusString, sessionHandle); + } + else if (!stricmp(actionCstr, "SessionGroup.AddSession.1")) + { + LLVivoxVoiceClient::getInstance()->sessionGroupAddSessionResponse(requestId, statusCode, statusString, sessionHandle); + } + else if (!stricmp(actionCstr, "Session.Connect.1")) + { + LLVivoxVoiceClient::getInstance()->sessionConnectResponse(requestId, statusCode, statusString); + } + else if (!stricmp(actionCstr, "Account.Logout.1")) + { + LLVivoxVoiceClient::getInstance()->logoutResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Connector.InitiateShutdown.1")) + { + LLVivoxVoiceClient::getInstance()->connectorShutdownResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Account.ListBlockRules.1")) + { + LLVivoxVoiceClient::getInstance()->accountListBlockRulesResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Account.ListAutoAcceptRules.1")) + { + LLVivoxVoiceClient::getInstance()->accountListAutoAcceptRulesResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Session.Set3DPosition.1")) + { + // We don't need to process these, but they're so spammy we don't want to log them. + squelchDebugOutput = true; + } + /* + else if (!stricmp(actionCstr, "Account.ChannelGetList.1")) + { + LLVoiceClient::getInstance()->channelGetListResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Connector.AccountCreate.1")) + { + + } + else if (!stricmp(actionCstr, "Connector.MuteLocalMic.1")) + { + + } + else if (!stricmp(actionCstr, "Connector.MuteLocalSpeaker.1")) + { + + } + else if (!stricmp(actionCstr, "Connector.SetLocalMicVolume.1")) + { + + } + else if (!stricmp(actionCstr, "Connector.SetLocalSpeakerVolume.1")) + { + + } + else if (!stricmp(actionCstr, "Session.ListenerSetPosition.1")) + { + + } + else if (!stricmp(actionCstr, "Session.SpeakerSetPosition.1")) + { + + } + else if (!stricmp(actionCstr, "Session.AudioSourceSetPosition.1")) + { + + } + else if (!stricmp(actionCstr, "Session.GetChannelParticipants.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelCreate.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelUpdate.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelDelete.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelCreateAndInvite.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelFolderCreate.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelFolderUpdate.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelFolderDelete.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelAddModerator.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelDeleteModerator.1")) + { + + } + */ + } +} + diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h new file mode 100644 index 0000000000..59fec8b954 --- /dev/null +++ b/indra/newview/llvoicevivox.h @@ -0,0 +1,917 @@ +/** + * @file llvoicevivox.h + * @brief Declaration of LLDiamondwareVoiceClient class which is the interface to the voice client process. + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ +#ifndef LL_VOICE_VIVOX_H +#define LL_VOICE_VIVOX_H + +class LLVOAvatar; +class LLVivoxProtocolParser; + +#include "lliopipe.h" +#include "llpumpio.h" +#include "llchainio.h" +#include "lliosocket.h" +#include "v3math.h" +#include "llframetimer.h" +#include "llviewerregion.h" +#include "llcallingcard.h" // for LLFriendObserver + +#ifdef LL_STANDALONE +# include "expat.h" +#else +# include "expat/expat.h" +#endif +#include "llvoiceclient.h" + + +class LLVivoxVoiceAccountProvisionResponder; +class LLVivoxVoiceClientMuteListObserver; +class LLVivoxVoiceClientFriendsObserver; + + +class LLVivoxVoiceClientParticipantObserver +{ +public: + virtual ~LLVivoxVoiceClientParticipantObserver() { } + virtual void onChange() = 0; +}; + + +class LLVivoxVoiceClient: public LLSingleton<LLVivoxVoiceClient>, virtual public LLVoiceModuleInterface +{ + LOG_CLASS(LLVivoxVoiceClient); +public: + LLVivoxVoiceClient(); + virtual ~LLVivoxVoiceClient(); + + + /// @name LLVoiceModuleInterface virtual implementations + /// @see LLVoiceModuleInterface + //@{ + virtual void init(LLPumpIO *pump); // Call this once at application startup (creates connector) + virtual void terminate(); // Call this to clean up during shutdown + + virtual const LLVoiceVersionInfo& getVersion(); + + virtual void updateSettings(); // call after loading settings and whenever they change + + // Returns true if vivox has successfully logged in and is not in error state + virtual bool isVoiceWorking(); + + ///////////////////// + /// @name Tuning + //@{ + virtual void tuningStart(); + virtual void tuningStop(); + virtual bool inTuningMode(); + + virtual void tuningSetMicVolume(float volume); + virtual void tuningSetSpeakerVolume(float volume); + virtual float tuningGetEnergy(void); + //@} + + ///////////////////// + /// @name Devices + //@{ + // This returns true when it's safe to bring up the "device settings" dialog in the prefs. + // i.e. when the daemon is running and connected, and the device lists are populated. + virtual bool deviceSettingsAvailable(); + + // Requery the vivox daemon for the current list of input/output devices. + // If you pass true for clearCurrentList, deviceSettingsAvailable() will be false until the query has completed + // (use this if you want to know when it's done). + // If you pass false, you'll have no way to know when the query finishes, but the device lists will not appear empty in the interim. + virtual void refreshDeviceLists(bool clearCurrentList = true); + + virtual void setCaptureDevice(const std::string& name); + virtual void setRenderDevice(const std::string& name); + + virtual LLVoiceDeviceList& getCaptureDevices(); + virtual LLVoiceDeviceList& getRenderDevices(); + //@} + + virtual void getParticipantList(std::set<LLUUID> &participants); + virtual bool isParticipant(const LLUUID& speaker_id); + + // Send a text message to the specified user, initiating the session if necessary. + virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message); + + // close any existing text IM session with the specified user + virtual void endUserIMSession(const LLUUID &uuid); + + // Returns true if calling back the session URI after the session has closed is possible. + // Currently this will be false only for PSTN P2P calls. + // NOTE: this will return true if the session can't be found. + virtual BOOL isSessionCallBackPossible(const LLUUID &session_id); + + // Returns true if the session can accepte text IM's. + // Currently this will be false only for PSTN P2P calls. + // NOTE: this will return true if the session can't be found. + virtual BOOL isSessionTextIMPossible(const LLUUID &session_id); + + + //////////////////////////// + /// @name Channel stuff + //@{ + // returns true iff the user is currently in a proximal (local spatial) channel. + // Note that gestures should only fire if this returns true. + virtual bool inProximalChannel(); + + virtual void setNonSpatialChannel(const std::string &uri, + const std::string &credentials); + + virtual void setSpatialChannel(const std::string &uri, + const std::string &credentials); + + virtual void leaveNonSpatialChannel(); + + virtual void leaveChannel(void); + + // Returns the URI of the current channel, or an empty string if not currently in a channel. + // NOTE that it will return an empty string if it's in the process of joining a channel. + virtual std::string getCurrentChannel(); + //@} + + + ////////////////////////// + /// @name invitations + //@{ + // start a voice channel with the specified user + virtual void callUser(const LLUUID &uuid); + virtual bool isValidChannel(std::string &channelHandle); + virtual bool answerInvite(std::string &channelHandle); + virtual void declineInvite(std::string &channelHandle); + //@} + + ///////////////////////// + /// @name Volume/gain + //@{ + virtual void setVoiceVolume(F32 volume); + virtual void setMicGain(F32 volume); + //@} + + ///////////////////////// + /// @name enable disable voice and features + //@{ + virtual bool voiceEnabled(); + virtual void setVoiceEnabled(bool enabled); + virtual BOOL lipSyncEnabled(); + virtual void setLipSyncEnabled(BOOL enabled); + virtual void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. + //@} + + //////////////////////// + /// @name PTT + //@{ + virtual void setUserPTTState(bool ptt); + virtual bool getUserPTTState(); + virtual void setUsePTT(bool usePTT); + virtual void setPTTIsToggle(bool PTTIsToggle); + virtual bool getPTTIsToggle(); + virtual void inputUserControlState(bool down); // interpret any sort of up-down mic-open control input according to ptt-toggle prefs + virtual void toggleUserPTTState(void); + + virtual void keyDown(KEY key, MASK mask); + virtual void keyUp(KEY key, MASK mask); + virtual void middleMouseState(bool down); + //@} + + ////////////////////////// + /// @name nearby speaker accessors + //@{ + virtual BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar + virtual std::string getDisplayName(const LLUUID& id); + virtual BOOL isOnlineSIP(const LLUUID &id); + virtual BOOL isParticipantAvatar(const LLUUID &id); + virtual BOOL getIsSpeaking(const LLUUID& id); + virtual BOOL getIsModeratorMuted(const LLUUID& id); + virtual F32 getCurrentPower(const LLUUID& id); // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... + virtual BOOL getOnMuteList(const LLUUID& id); + virtual F32 getUserVolume(const LLUUID& id); + virtual void setUserVolume(const LLUUID& id, F32 volume); // set's volume for specified agent, from 0-1 (where .5 is nominal) + //@} + + // authorize the user + virtual void userAuthorized(const std::string& user_id, + const LLUUID &agentID); + + ////////////////////////////// + /// @name Status notification + //@{ + virtual void addObserver(LLVoiceClientStatusObserver* observer); + virtual void removeObserver(LLVoiceClientStatusObserver* observer); + virtual void addObserver(LLFriendObserver* observer); + virtual void removeObserver(LLFriendObserver* observer); + virtual void addObserver(LLVoiceClientParticipantObserver* observer); + virtual void removeObserver(LLVoiceClientParticipantObserver* observer); + + + + //@} + + virtual std::string sipURIFromID(const LLUUID &id); + //@} + + +protected: + ////////////////////// + // Vivox Specific definitions + + friend class LLVivoxVoiceAccountProvisionResponder; + friend class LLVivoxVoiceClientMuteListObserver; + friend class LLVivoxVoiceClientFriendsObserver; + + enum streamState + { + streamStateUnknown = 0, + streamStateIdle = 1, + streamStateConnected = 2, + streamStateRinging = 3, + }; + struct participantState + { + public: + participantState(const std::string &uri); + + bool updateMuteState(); // true if mute state has changed + bool isAvatar(); + + std::string mURI; + LLUUID mAvatarID; + std::string mAccountName; + std::string mDisplayName; + LLFrameTimer mSpeakingTimeout; + F32 mLastSpokeTimestamp; + F32 mPower; + F32 mVolume; + std::string mGroupID; + int mUserVolume; + bool mPTT; + bool mIsSpeaking; + bool mIsModeratorMuted; + bool mOnMuteList; // true if this avatar is on the user's mute list (and should be muted) + bool mVolumeSet; // true if incoming volume messages should not change the volume + bool mVolumeDirty; // true if this participant needs a volume command sent (either mOnMuteList or mUserVolume has changed) + bool mAvatarIDValid; + bool mIsSelf; + }; + + typedef std::map<const std::string, participantState*> participantMap; + + typedef std::map<const LLUUID, participantState*> participantUUIDMap; + + struct sessionState + { + public: + sessionState(); + ~sessionState(); + + participantState *addParticipant(const std::string &uri); + // Note: after removeParticipant returns, the participant* that was passed to it will have been deleted. + // Take care not to use the pointer again after that. + void removeParticipant(participantState *participant); + void removeAllParticipants(); + + participantState *findParticipant(const std::string &uri); + participantState *findParticipantByID(const LLUUID& id); + + bool isCallBackPossible(); + bool isTextIMPossible(); + + std::string mHandle; + std::string mGroupHandle; + std::string mSIPURI; + std::string mAlias; + std::string mName; + std::string mAlternateSIPURI; + std::string mHash; // Channel password + std::string mErrorStatusString; + std::queue<std::string> mTextMsgQueue; + + LLUUID mIMSessionID; + LLUUID mCallerID; + int mErrorStatusCode; + int mMediaStreamState; + int mTextStreamState; + bool mCreateInProgress; // True if a Session.Create has been sent for this session and no response has been received yet. + bool mMediaConnectInProgress; // True if a Session.MediaConnect has been sent for this session and no response has been received yet. + bool mVoiceInvitePending; // True if a voice invite is pending for this session (usually waiting on a name lookup) + bool mTextInvitePending; // True if a text invite is pending for this session (usually waiting on a name lookup) + bool mSynthesizedCallerID; // True if the caller ID is a hash of the SIP URI -- this means we shouldn't do a name lookup. + bool mIsChannel; // True for both group and spatial channels (false for p2p, PSTN) + bool mIsSpatial; // True for spatial channels + bool mIsP2P; + bool mIncoming; + bool mVoiceEnabled; + bool mReconnect; // Whether we should try to reconnect to this session if it's dropped + // Set to true when the mute state of someone in the participant list changes. + // The code will have to walk the list to find the changed participant(s). + bool mVolumeDirty; + bool mMuteDirty; + + bool mParticipantsChanged; + participantMap mParticipantsByURI; + participantUUIDMap mParticipantsByUUID; + }; + + // internal state for a simple state machine. This is used to deal with the asynchronous nature of some of the messages. + // Note: if you change this list, please make corresponding changes to LLVivoxVoiceClient::state2string(). + enum state + { + stateDisableCleanup, + stateDisabled, // Voice is turned off. + stateStart, // Class is initialized, socket is created + stateDaemonLaunched, // Daemon has been launched + stateConnecting, // connect() call has been issued + stateConnected, // connection to the daemon has been made, send some initial setup commands. + stateIdle, // socket is connected, ready for messaging + stateMicTuningStart, + stateMicTuningRunning, + stateMicTuningStop, + stateConnectorStart, // connector needs to be started + stateConnectorStarting, // waiting for connector handle + stateConnectorStarted, // connector handle received + stateLoginRetry, // need to retry login (failed due to changing password) + stateLoginRetryWait, // waiting for retry timer + stateNeedsLogin, // send login request + stateLoggingIn, // waiting for account handle + stateLoggedIn, // account handle received + stateCreatingSessionGroup, // Creating the main session group + stateNoChannel, // + stateJoiningSession, // waiting for session handle + stateSessionJoined, // session handle received + stateRunning, // in session, steady state + stateLeavingSession, // waiting for terminate session response + stateSessionTerminated, // waiting for terminate session response + + stateLoggingOut, // waiting for logout response + stateLoggedOut, // logout response received + stateConnectorStopping, // waiting for connector stop + stateConnectorStopped, // connector stop received + + // We go to this state if the login fails because the account needs to be provisioned. + + // error states. No way to recover from these yet. + stateConnectorFailed, + stateConnectorFailedWaiting, + stateLoginFailed, + stateLoginFailedWaiting, + stateJoinSessionFailed, + stateJoinSessionFailedWaiting, + + stateJail // Go here when all else has failed. Nothing will be retried, we're done. + }; + + typedef std::map<std::string, sessionState*> sessionMap; + + + + /////////////////////////////////////////////////////// + // Private Member Functions + ////////////////////////////////////////////////////// + + ////////////////////////////// + /// @name TVC/Server management and communication + //@{ + // Call this if the connection to the daemon terminates unexpectedly. It will attempt to reset everything and relaunch. + void daemonDied(); + + // Call this if we're just giving up on voice (can't provision an account, etc.). It will clean up and go away. + void giveUp(); + + // write to the tvc + bool writeString(const std::string &str); + + void connectorCreate(); + void connectorShutdown(); + void closeSocket(void); + + void requestVoiceAccountProvision(S32 retries = 3); + void login( + const std::string& account_name, + const std::string& password, + const std::string& voice_sip_uri_hostname, + const std::string& voice_account_server_uri); + void loginSendMessage(); + void logout(); + void logoutSendMessage(); + + + //@} + + //------------------------------------ + // tuning + + void tuningRenderStartSendMessage(const std::string& name, bool loop); + void tuningRenderStopSendMessage(); + + void tuningCaptureStartSendMessage(int duration); + void tuningCaptureStopSendMessage(); + + bool inTuningStates(); + + //---------------------------------- + // devices + void clearCaptureDevices(); + void addCaptureDevice(const std::string& name); + void clearRenderDevices(); + void addRenderDevice(const std::string& name); + void buildSetAudioDevices(std::ostringstream &stream); + + void getCaptureDevicesSendMessage(); + void getRenderDevicesSendMessage(); + + // local audio updates + void buildLocalAudioUpdates(std::ostringstream &stream); + + + ///////////////////////////// + // Response/Event handlers + void connectorCreateResponse(int statusCode, std::string &statusString, std::string &connectorHandle, std::string &versionID); + void loginResponse(int statusCode, std::string &statusString, std::string &accountHandle, int numberOfAliases); + void sessionCreateResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle); + void sessionGroupAddSessionResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle); + void sessionConnectResponse(std::string &requestId, int statusCode, std::string &statusString); + void logoutResponse(int statusCode, std::string &statusString); + void connectorShutdownResponse(int statusCode, std::string &statusString); + + void accountLoginStateChangeEvent(std::string &accountHandle, int statusCode, std::string &statusString, int state); + void mediaStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, int statusCode, std::string &statusString, int state, bool incoming); + void textStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, bool enabled, int state, bool incoming); + void sessionAddedEvent(std::string &uriString, std::string &alias, std::string &sessionHandle, std::string &sessionGroupHandle, bool isChannel, bool incoming, std::string &nameString, std::string &applicationString); + void sessionGroupAddedEvent(std::string &sessionGroupHandle); + void sessionRemovedEvent(std::string &sessionHandle, std::string &sessionGroupHandle); + void participantAddedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, std::string &nameString, std::string &displayNameString, int participantType); + void participantRemovedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, std::string &nameString); + void participantUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, bool isModeratorMuted, bool isSpeaking, int volume, F32 energy); + void auxAudioPropertiesEvent(F32 energy); + void buddyPresenceEvent(std::string &uriString, std::string &alias, std::string &statusString, std::string &applicationString); + void messageEvent(std::string &sessionHandle, std::string &uriString, std::string &alias, std::string &messageHeader, std::string &messageBody, std::string &applicationString); + void sessionNotificationEvent(std::string &sessionHandle, std::string &uriString, std::string ¬ificationType); + void subscriptionEvent(std::string &buddyURI, std::string &subscriptionHandle, std::string &alias, std::string &displayName, std::string &applicationString, std::string &subscriptionType); + + void buddyListChanged(); + void muteListChanged(); + void updateFriends(U32 mask); + + ///////////////////////////// + // Sending updates of current state + void updatePosition(void); + void setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); + void setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); + bool channelFromRegion(LLViewerRegion *region, std::string &name); + + void setEarLocation(S32 loc); + + + ///////////////////////////// + // Accessors for data related to nearby speakers + + // MBW -- XXX -- Not sure how to get this data out of the TVC + BOOL getUsingPTT(const LLUUID& id); + std::string getGroupID(const LLUUID& id); // group ID if the user is in group chat (empty string if not applicable) + + ///////////////////////////// + BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. + // Use this to determine whether to show a "no speech" icon in the menu bar. + + + // PTT + void setPTTKey(std::string &key); + + ///////////////////////////// + // Recording controls + void recordingLoopStart(int seconds = 3600, int deltaFramesPerControlFrame = 200); + void recordingLoopSave(const std::string& filename); + void recordingStop(); + + // Playback controls + void filePlaybackStart(const std::string& filename); + void filePlaybackStop(); + void filePlaybackSetPaused(bool paused); + void filePlaybackSetMode(bool vox = false, float speed = 1.0f); + + participantState *findParticipantByID(const LLUUID& id); + + + //////////////////////////////////////// + // voice sessions. + typedef std::set<sessionState*> sessionSet; + + typedef sessionSet::iterator sessionIterator; + sessionIterator sessionsBegin(void); + sessionIterator sessionsEnd(void); + + sessionState *findSession(const std::string &handle); + sessionState *findSessionBeingCreatedByURI(const std::string &uri); + sessionState *findSession(const LLUUID &participant_id); + sessionState *findSessionByCreateID(const std::string &create_id); + + sessionState *addSession(const std::string &uri, const std::string &handle = LLStringUtil::null); + void setSessionHandle(sessionState *session, const std::string &handle = LLStringUtil::null); + void setSessionURI(sessionState *session, const std::string &uri); + void deleteSession(sessionState *session); + void deleteAllSessions(void); + + void verifySessionState(void); + + void joinedAudioSession(sessionState *session); + void leftAudioSession(sessionState *session); + + // This is called in several places where the session _may_ need to be deleted. + // It contains logic for whether to delete the session or keep it around. + void reapSession(sessionState *session); + + // Returns true if the session seems to indicate we've moved to a region on a different voice server + bool sessionNeedsRelog(sessionState *session); + + + ////////////////////////////////////// + // buddy list stuff, needed for SLIM later + struct buddyListEntry + { + buddyListEntry(const std::string &uri); + std::string mURI; + std::string mDisplayName; + LLUUID mUUID; + bool mOnlineSL; + bool mOnlineSLim; + bool mCanSeeMeOnline; + bool mHasBlockListEntry; + bool mHasAutoAcceptListEntry; + bool mNameResolved; + bool mInSLFriends; + bool mInVivoxBuddies; + bool mNeedsNameUpdate; + }; + + typedef std::map<std::string, buddyListEntry*> buddyListMap; + + // This should be called when parsing a buddy list entry sent by SLVoice. + void processBuddyListEntry(const std::string &uri, const std::string &displayName); + + buddyListEntry *addBuddy(const std::string &uri); + buddyListEntry *addBuddy(const std::string &uri, const std::string &displayName); + buddyListEntry *findBuddy(const std::string &uri); + buddyListEntry *findBuddy(const LLUUID &id); + buddyListEntry *findBuddyByDisplayName(const std::string &name); + void deleteBuddy(const std::string &uri); + void deleteAllBuddies(void); + + void deleteAllBlockRules(void); + void addBlockRule(const std::string &blockMask, const std::string &presenceOnly); + void deleteAllAutoAcceptRules(void); + void addAutoAcceptRule(const std::string &autoAcceptMask, const std::string &autoAddAsBuddy); + void accountListBlockRulesResponse(int statusCode, const std::string &statusString); + void accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString); + + ///////////////////////////// + // session control messages + + void accountListBlockRulesSendMessage(); + void accountListAutoAcceptRulesSendMessage(); + + void sessionGroupCreateSendMessage(); + void sessionCreateSendMessage(sessionState *session, bool startAudio = true, bool startText = false); + void sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio = true, bool startText = false); + void sessionMediaConnectSendMessage(sessionState *session); // just joins the audio session + void sessionTextConnectSendMessage(sessionState *session); // just joins the text session + void sessionTerminateSendMessage(sessionState *session); + void sessionGroupTerminateSendMessage(sessionState *session); + void sessionMediaDisconnectSendMessage(sessionState *session); + void sessionTextDisconnectSendMessage(sessionState *session); + + // Pokes the state machine to leave the audio session next time around. + void sessionTerminate(); + + // Pokes the state machine to shut down the connector and restart it. + void requestRelog(); + + // Does the actual work to get out of the audio session + void leaveAudioSession(); + + void lookupName(const LLUUID &id); + static void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); + void avatarNameResolved(const LLUUID &id, const std::string &name); + +private: + LLVoiceVersionInfo mVoiceVersion; + + state mState; + bool mSessionTerminateRequested; + bool mRelogRequested; + // Number of times (in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine(). + // The larger it is the greater is possibility there is a problem with connection to voice server. + // Introduced while fixing EXT-4313. + int mSpatialJoiningNum; + + void setState(state inState); + state getState(void) { return mState; }; + std::string state2string(state inState); + + void stateMachine(); + static void idle(void *user_data); + + LLHost mDaemonHost; + LLSocket::ptr_t mSocket; + bool mConnected; + + + LLPumpIO *mPump; + friend class LLVivoxProtocolParser; + + std::string mAccountName; + std::string mAccountPassword; + std::string mAccountDisplayName; + + bool mTuningMode; + float mTuningEnergy; + std::string mTuningAudioFile; + int mTuningMicVolume; + bool mTuningMicVolumeDirty; + int mTuningSpeakerVolume; + bool mTuningSpeakerVolumeDirty; + state mTuningExitState; // state to return to when we leave tuning mode. + + std::string mSpatialSessionURI; + std::string mSpatialSessionCredentials; + + std::string mMainSessionGroupHandle; // handle of the "main" session group. + + std::string mChannelName; // Name of the channel to be looked up + bool mAreaVoiceDisabled; + sessionState *mAudioSession; // Session state for the current audio session + bool mAudioSessionChanged; // set to true when the above pointer gets changed, so observers can be notified. + + sessionState *mNextAudioSession; // Session state for the audio session we're trying to join + +// std::string mSessionURI; // URI of the session we're in. +// std::string mSessionHandle; // returned by ? + + S32 mCurrentParcelLocalID; // Used to detect parcel boundary crossings + std::string mCurrentRegionName; // Used to detect parcel boundary crossings + + std::string mConnectorHandle; // returned by "Create Connector" message + std::string mAccountHandle; // returned by login message + int mNumberOfAliases; + U32 mCommandCookie; + + std::string mVoiceAccountServerURI; + std::string mVoiceSIPURIHostName; + + int mLoginRetryCount; + + sessionMap mSessionsByHandle; // Active sessions, indexed by session handle. Sessions which are being initiated may not be in this map. + sessionSet mSessions; // All sessions, not indexed. This is the canonical session list. + + bool mBuddyListMapPopulated; + bool mBlockRulesListReceived; + bool mAutoAcceptRulesListReceived; + buddyListMap mBuddyListMap; + + LLVoiceDeviceList mCaptureDevices; + LLVoiceDeviceList mRenderDevices; + + std::string mCaptureDevice; + std::string mRenderDevice; + bool mCaptureDeviceDirty; + bool mRenderDeviceDirty; + + // This should be called when the code detects we have changed parcels. + // It initiates the call to the server that gets the parcel channel. + void parcelChanged(); + + void switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = ""); + void joinSession(sessionState *session); + + std::string nameFromAvatar(LLVOAvatar *avatar); + std::string nameFromID(const LLUUID &id); + bool IDFromName(const std::string name, LLUUID &uuid); + std::string displayNameFromAvatar(LLVOAvatar *avatar); + std::string sipURIFromAvatar(LLVOAvatar *avatar); + std::string sipURIFromName(std::string &name); + + // Returns the name portion of the SIP URI if the string looks vaguely like a SIP URI, or an empty string if not. + std::string nameFromsipURI(const std::string &uri); + + bool inSpatialChannel(void); + std::string getAudioSessionURI(); + std::string getAudioSessionHandle(); + + void sendPositionalUpdate(void); + + void buildSetCaptureDevice(std::ostringstream &stream); + void buildSetRenderDevice(std::ostringstream &stream); + + void clearAllLists(); + void checkFriend(const LLUUID& id); + void sendFriendsListUpdates(); + + // start a text IM session with the specified user + // This will be asynchronous, the session may be established at a future time. + sessionState* startUserIMSession(const LLUUID& uuid); + void sendQueuedTextMessages(sessionState *session); + + void enforceTether(void); + + bool mSpatialCoordsDirty; + + LLVector3d mCameraPosition; + LLVector3d mCameraRequestedPosition; + LLVector3 mCameraVelocity; + LLMatrix3 mCameraRot; + + LLVector3d mAvatarPosition; + LLVector3 mAvatarVelocity; + LLMatrix3 mAvatarRot; + + bool mPTTDirty; + bool mPTT; + + bool mUsePTT; + bool mPTTIsMiddleMouse; + KEY mPTTKey; + bool mPTTIsToggle; + bool mUserPTTState; + bool mMuteMic; + + // Set to true when the friends list is known to have changed. + bool mFriendsListDirty; + + enum + { + earLocCamera = 0, // ear at camera + earLocAvatar, // ear at avatar + earLocMixed // ear at avatar location/camera direction + }; + + S32 mEarLocation; + + bool mSpeakerVolumeDirty; + bool mSpeakerMuteDirty; + int mSpeakerVolume; + + int mMicVolume; + bool mMicVolumeDirty; + + bool mVoiceEnabled; + bool mWriteInProgress; + std::string mWriteString; + size_t mWriteOffset; + + LLTimer mUpdateTimer; + + BOOL mLipSyncEnabled; + + typedef std::set<LLVoiceClientParticipantObserver*> observer_set_t; + observer_set_t mParticipantObservers; + + void notifyParticipantObservers(); + + typedef std::set<LLVoiceClientStatusObserver*> status_observer_set_t; + status_observer_set_t mStatusObservers; + + void notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status); + + typedef std::set<LLFriendObserver*> friend_observer_set_t; + friend_observer_set_t mFriendObservers; + void notifyFriendObservers(); +}; + +/** + * @class LLVivoxProtocolParser + * @brief This class helps construct new LLIOPipe specializations + * @see LLIOPipe + * + * THOROUGH_DESCRIPTION + */ +class LLVivoxProtocolParser : public LLIOPipe +{ + LOG_CLASS(LLVivoxProtocolParser); +public: + LLVivoxProtocolParser(); + virtual ~LLVivoxProtocolParser(); + +protected: + /* @name LLIOPipe virtual implementations + */ + //@{ + /** + * @brief Process the data in buffer + */ + virtual EStatus process_impl( + const LLChannelDescriptors& channels, + buffer_ptr_t& buffer, + bool& eos, + LLSD& context, + LLPumpIO* pump); + //@} + + std::string mInput; + + // Expat control members + XML_Parser parser; + int responseDepth; + bool ignoringTags; + bool isEvent; + int ignoreDepth; + + // Members for processing responses. The values are transient and only valid within a call to processResponse(). + bool squelchDebugOutput; + int returnCode; + int statusCode; + std::string statusString; + std::string requestId; + std::string actionString; + std::string connectorHandle; + std::string versionID; + std::string accountHandle; + std::string sessionHandle; + std::string sessionGroupHandle; + std::string alias; + std::string applicationString; + + // Members for processing events. The values are transient and only valid within a call to processResponse(). + std::string eventTypeString; + int state; + std::string uriString; + bool isChannel; + bool incoming; + bool enabled; + std::string nameString; + std::string audioMediaString; + std::string deviceString; + std::string displayNameString; + int participantType; + bool isLocallyMuted; + bool isModeratorMuted; + bool isSpeaking; + int volume; + F32 energy; + std::string messageHeader; + std::string messageBody; + std::string notificationType; + bool hasText; + bool hasAudio; + bool hasVideo; + bool terminated; + std::string blockMask; + std::string presenceOnly; + std::string autoAcceptMask; + std::string autoAddAsBuddy; + int numberOfAliases; + std::string subscriptionHandle; + std::string subscriptionType; + + + // Members for processing text between tags + std::string textBuffer; + bool accumulateText; + + void reset(); + + void processResponse(std::string tag); + + static void XMLCALL ExpatStartTag(void *data, const char *el, const char **attr); + static void XMLCALL ExpatEndTag(void *data, const char *el); + static void XMLCALL ExpatCharHandler(void *data, const XML_Char *s, int len); + + void StartTag(const char *tag, const char **attr); + void EndTag(const char *tag); + void CharData(const char *buffer, int length); + +}; + + +#endif //LL_VIVOX_VOICE_CLIENT_H + + + diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index b89c0cd638..eb5b6c6618 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -66,12 +66,14 @@ const F32 LEAF_TOP = 1.0f; const F32 LEAF_BOTTOM = 0.52f; const F32 LEAF_WIDTH = 1.f; -S32 LLVOTree::sLODVertexOffset[4]; -S32 LLVOTree::sLODVertexCount[4]; -S32 LLVOTree::sLODIndexOffset[4]; -S32 LLVOTree::sLODIndexCount[4]; -S32 LLVOTree::sLODSlices[4] = {10, 5, 4, 3}; -F32 LLVOTree::sLODAngles[4] = {30.f, 20.f, 15.f, 0.f}; +const S32 LLVOTree::sMAX_NUM_TREE_LOD_LEVELS = 4 ; + +S32 LLVOTree::sLODVertexOffset[sMAX_NUM_TREE_LOD_LEVELS]; +S32 LLVOTree::sLODVertexCount[sMAX_NUM_TREE_LOD_LEVELS]; +S32 LLVOTree::sLODIndexOffset[sMAX_NUM_TREE_LOD_LEVELS]; +S32 LLVOTree::sLODIndexCount[sMAX_NUM_TREE_LOD_LEVELS]; +S32 LLVOTree::sLODSlices[sMAX_NUM_TREE_LOD_LEVELS] = {10, 5, 4, 3}; +F32 LLVOTree::sLODAngles[sMAX_NUM_TREE_LOD_LEVELS] = {30.f, 20.f, 15.f, 0.00001f}; F32 LLVOTree::sTreeFactor = 1.f; @@ -373,12 +375,11 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } } - S32 trunk_LOD = 0; + S32 trunk_LOD = sMAX_NUM_TREE_LOD_LEVELS ; F32 app_angle = getAppAngle()*LLVOTree::sTreeFactor; - for (S32 j = 0; j < 4; j++) + for (S32 j = 0; j < sMAX_NUM_TREE_LOD_LEVELS; j++) { - if (app_angle > LLVOTree::sLODAngles[j]) { trunk_LOD = j; @@ -445,16 +446,15 @@ void LLVOTree::setPixelAreaAndAngle(LLAgent &agent) // This should be the camera's center, as soon as we move to all region-local. LLVector3 relative_position = getPositionAgent() - gAgentCamera.getCameraPositionAgent(); - F32 range = relative_position.length(); // ugh, square root + F32 range_squared = relative_position.lengthSquared() ; F32 max_scale = mBillboardScale * getMaxScale(); F32 area = max_scale * (max_scale*mBillboardRatio); // Compute pixels per meter at the given range - F32 pixels_per_meter = LLViewerCamera::getInstance()->getViewHeightInPixels() / - (tan(LLViewerCamera::getInstance()->getView()) * range); + F32 pixels_per_meter = LLViewerCamera::getInstance()->getViewHeightInPixels() / tan(LLViewerCamera::getInstance()->getView()); - mPixelArea = (pixels_per_meter) * (pixels_per_meter) * area; + mPixelArea = (pixels_per_meter) * (pixels_per_meter) * area / range_squared; #if 0 // mAppAngle is a bit of voodoo; // use the one calculated LLViewerObject::setPixelAreaAndAngle above @@ -506,6 +506,13 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) { LLFastTimer ftm(FTM_UPDATE_TREE); + if(mTrunkLOD >= sMAX_NUM_TREE_LOD_LEVELS) //do not display the tree. + { + mReferenceBuffer = NULL ; + mDrawable->getFace(0)->mVertexBuffer = NULL ; + return TRUE ; + } + if (mReferenceBuffer.isNull() || mDrawable->getFace(0)->mVertexBuffer.isNull()) { const F32 SRR3 = 0.577350269f; // sqrt(1/3) @@ -523,7 +530,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) face->mCenterAgent = getPositionAgent(); face->mCenterLocal = face->mCenterAgent; - for (lod = 0; lod < 4; lod++) + for (lod = 0; lod < sMAX_NUM_TREE_LOD_LEVELS; lod++) { slices = sLODSlices[lod]; sLODVertexOffset[lod] = max_vertices; @@ -700,7 +707,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) // Generate the vertices // Generate the indices - for (lod = 0; lod < 4; lod++) + for (lod = 0; lod < sMAX_NUM_TREE_LOD_LEVELS; lod++) { slices = sLODSlices[lod]; F32 base_radius = 0.65f; @@ -892,7 +899,6 @@ void LLVOTree::updateMesh() S32 stop_depth = 0; F32 alpha = 1.0; - U32 vert_count = 0; U32 index_count = 0; diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h index feac9e0675..036ad692b1 100644 --- a/indra/newview/llvotree.h +++ b/indra/newview/llvotree.h @@ -152,6 +152,7 @@ public: }; static F32 sTreeFactor; // Tree level of detail factor + static const S32 sMAX_NUM_TREE_LOD_LEVELS ; friend class LLDrawPoolTree; protected: diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 594435475f..d6453111d7 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1856,6 +1856,11 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m } LLTextureEntry *te = getTE(texture_index); + if(!te) + { + return ; + } + LL_DEBUGS("MediaOnAPrim") << "BEFORE: texture_index = " << texture_index << " hasMedia = " << te->hasMedia() << " : " << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl; diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 63f99273fe..9e9b46473e 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -33,23 +33,25 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" -#include "llfloatercustomize.h" +#include "lldictionary.h" #include "lllocaltextureobject.h" #include "llnotificationsutil.h" #include "llviewertexturelist.h" #include "llinventorymodel.h" #include "llinventoryobserver.h" +#include "llsidepanelappearance.h" +#include "llsidetray.h" +#include "lltexlayer.h" +#include "lltexglobalcolor.h" +#include "lltrans.h" #include "llviewerregion.h" +#include "llvisualparam.h" #include "llvoavatar.h" #include "llvoavatarself.h" #include "llvoavatardefines.h" #include "llwearable.h" -#include "lldictionary.h" -#include "lltrans.h" -#include "lltexlayer.h" -#include "llvisualparam.h" -#include "lltexglobalcolor.h" using namespace LLVOAvatarDefines; @@ -88,7 +90,7 @@ static std::string asset_id_to_filename(const LLUUID &asset_id); LLWearable::LLWearable(const LLTransactionID& transaction_id) : mDefinitionVersion(LLWearable::sCurrentDefinitionVersion), - mType(WT_INVALID) + mType(LLWearableType::WT_INVALID) { mTransactionID = transaction_id; mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID()); @@ -96,7 +98,7 @@ LLWearable::LLWearable(const LLTransactionID& transaction_id) : LLWearable::LLWearable(const LLAssetID& asset_id) : mDefinitionVersion( LLWearable::sCurrentDefinitionVersion ), - mType(WT_INVALID) + mType(LLWearableType::WT_INVALID) { mAssetID = asset_id; mTransactionID.setNull(); @@ -108,17 +110,17 @@ LLWearable::~LLWearable() const std::string& LLWearable::getTypeLabel() const { - return LLWearableDictionary::getTypeLabel(mType); + return LLWearableType::getTypeLabel(mType); } const std::string& LLWearable::getTypeName() const { - return LLWearableDictionary::getTypeName(mType); + return LLWearableType::getTypeName(mType); } LLAssetType::EType LLWearable::getAssetType() const { - return LLWearableDictionary::getAssetType(mType); + return LLWearableType::getAssetType(mType); } BOOL LLWearable::exportFile(LLFILE* file) const @@ -363,13 +365,13 @@ BOOL LLWearable::importFile( LLFILE* file ) llwarns << "Bad Wearable asset: bad type" << llendl; return FALSE; } - if( 0 <= type && type < WT_COUNT ) + if( 0 <= type && type < LLWearableType::WT_COUNT ) { - setType((EWearableType)type); + setType((LLWearableType::EType)type); } else { - mType = WT_COUNT; + mType = LLWearableType::WT_COUNT; llwarns << "Bad Wearable asset: bad type #" << type << llendl; return FALSE; } @@ -442,6 +444,9 @@ BOOL LLWearable::importFile( LLFILE* file ) delete mSavedTEMap[te]; } + image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(id, (LLVOAvatarDefines::ETextureIndex)te)); + + LLUUID textureid(text_buffer); mTEMap[te] = new LLLocalTextureObject(image, textureid); mSavedTEMap[te] = new LLLocalTextureObject(image, textureid); @@ -573,14 +578,6 @@ BOOL LLWearable::isDirty() const } } - //if( gFloaterCustomize ) - //{ - // if( mDescription != gFloaterCustomize->getWearableDescription( mType ) ) - // { - // return TRUE; - // } - //} - return FALSE; } @@ -679,15 +676,15 @@ void LLWearable::writeToAvatar() // Updates the user's avatar's appearance, replacing this wearables' parameters and textures with default values. // static -void LLWearable::removeFromAvatar( EWearableType type, BOOL upload_bake ) +void LLWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake ) { if (!isAgentAvatarValid()) return; // You can't just remove body parts. - if( (type == WT_SHAPE) || - (type == WT_SKIN) || - (type == WT_HAIR) || - (type == WT_EYES) ) + if( (type == LLWearableType::WT_SHAPE) || + (type == LLWearableType::WT_SKIN) || + (type == LLWearableType::WT_HAIR) || + (type == LLWearableType::WT_EYES) ) { return; } @@ -702,9 +699,9 @@ void LLWearable::removeFromAvatar( EWearableType type, BOOL upload_bake ) } } - if( gFloaterCustomize ) + if( gAgentCamera.cameraCustomizeAvatar() ) { - gFloaterCustomize->setWearable(type, NULL, PERM_ALL, TRUE); + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } gAgentAvatarp->updateVisualParams(); @@ -756,12 +753,12 @@ void LLWearable::copyDataFrom(const LLWearable* src) LLViewerFetchedTexture *image = NULL; if(iter != src->mTEMap.end()) { - image = src->getConstLocalTextureObject(te)->getImage(); - image_id = src->getConstLocalTextureObject(te)->getID(); + image = src->getLocalTextureObject(te)->getImage(); + image_id = src->getLocalTextureObject(te)->getID(); mTEMap[te] = new LLLocalTextureObject(image, image_id); mSavedTEMap[te] = new LLLocalTextureObject(image, image_id); - mTEMap[te]->setBakedReady(src->getConstLocalTextureObject(te)->getBakedReady()); - mTEMap[te]->setDiscard(src->getConstLocalTextureObject(te)->getDiscard()); + mTEMap[te]->setBakedReady(src->getLocalTextureObject(te)->getBakedReady()); + mTEMap[te]->setDiscard(src->getLocalTextureObject(te)->getDiscard()); } else { @@ -789,7 +786,7 @@ const LLUUID& LLWearable::getItemID() const return mItemID; } -void LLWearable::setType(EWearableType type) +void LLWearable::setType(LLWearableType::EType type) { mType = type; createVisualParams(); @@ -806,7 +803,7 @@ LLLocalTextureObject* LLWearable::getLocalTextureObject(S32 index) return NULL; } -const LLLocalTextureObject* LLWearable::getConstLocalTextureObject(S32 index) const +const LLLocalTextureObject* LLWearable::getLocalTextureObject(S32 index) const { te_map_t::const_iterator iter = mTEMap.find(index); if( iter != mTEMap.end() ) @@ -973,9 +970,11 @@ void LLWearable::revertValues() syncImages(mSavedTEMap, mTEMap); - if( gFloaterCustomize ) + + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if( panel ) { - gFloaterCustomize->updateScrollingPanelList(TRUE); + panel->updateScrollingPanelList(); } } @@ -1012,9 +1011,11 @@ void LLWearable::saveValues() // Deep copy of mTEMap (copies only those tes that are current, filling in defaults where needed) syncImages(mTEMap, mSavedTEMap); - if( gFloaterCustomize ) + + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if( panel ) { - gFloaterCustomize->updateScrollingPanelList(TRUE); + panel->updateScrollingPanelList(); } } @@ -1118,7 +1119,7 @@ void LLWearable::refreshName() struct LLWearableSaveData { - EWearableType mType; + LLWearableType::EType mType; }; void LLWearable::saveNewAsset() const @@ -1181,7 +1182,7 @@ void LLWearable::saveNewAsset() const void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { LLWearableSaveData* data = (LLWearableSaveData*)userdata; - const std::string& type_name = LLWearableDictionary::getTypeName(data->mType); + const std::string& type_name = LLWearableType::getTypeName(data->mType); if(0 == status) { // Success @@ -1207,7 +1208,7 @@ void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userda std::ostream& operator<<(std::ostream &s, const LLWearable &w) { - s << "wearable " << LLWearableDictionary::getTypeName(w.mType) << "\n"; + s << "wearable " << LLWearableType::getTypeName(w.mType) << "\n"; s << " Name: " << w.mName << "\n"; s << " Desc: " << w.mDescription << "\n"; //w.mPermissions diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index 7bd5305079..6b6067fd27 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -38,7 +38,7 @@ #include "llpermissions.h" #include "llsaleinfo.h" #include "llassetstorage.h" -#include "llwearabledictionary.h" +#include "llwearabletype.h" #include "llfile.h" #include "lllocaltextureobject.h" @@ -68,8 +68,8 @@ public: const LLUUID& getItemID() const; const LLAssetID& getAssetID() const { return mAssetID; } const LLTransactionID& getTransactionID() const { return mTransactionID; } - EWearableType getType() const { return mType; } - void setType(EWearableType type); + LLWearableType::EType getType() const { return mType; } + void setType(LLWearableType::EType type); const std::string& getName() const { return mName; } void setName(const std::string& name) { mName = name; } const std::string& getDescription() const { return mDescription; } @@ -81,7 +81,6 @@ public: const std::string& getTypeLabel() const; const std::string& getTypeName() const; LLAssetType::EType getAssetType() const; - LLLocalTextureObject* getLocalTextureObject(S32 index) const; S32 getDefinitionVersion() const { return mDefinitionVersion; } void setDefinitionVersion( S32 new_version ) { mDefinitionVersion = new_version; } @@ -93,7 +92,7 @@ public: void writeToAvatar(); void removeFromAvatar( BOOL upload_bake ) { LLWearable::removeFromAvatar( mType, upload_bake ); } - static void removeFromAvatar( EWearableType type, BOOL upload_bake ); + static void removeFromAvatar( LLWearableType::EType type, BOOL upload_bake ); BOOL exportFile(LLFILE* file) const; BOOL importFile(LLFILE* file); @@ -112,7 +111,7 @@ public: void setItemID(const LLUUID& item_id); LLLocalTextureObject* getLocalTextureObject(S32 index); - const LLLocalTextureObject* getConstLocalTextureObject(S32 index) const; + const LLLocalTextureObject* getLocalTextureObject(S32 index) const; void setLocalTextureObject(S32 index, LLLocalTextureObject <o); void addVisualParam(LLVisualParam *param); @@ -156,7 +155,7 @@ private: LLSaleInfo mSaleInfo; LLAssetID mAssetID; LLTransactionID mTransactionID; - EWearableType mType; + LLWearableType::EType mType; typedef std::map<S32, F32> param_map_t; param_map_t mSavedVisualParamMap; // last saved version of visual params diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index bd5d8d9357..161cd40cfc 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -35,8 +35,11 @@ #include "lliconctrl.h" +#include "llagentwearables.h" +#include "llappearancemgr.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" +#include "llmenugl.h" // for LLContextMenu #include "lltransutil.h" class LLFindOutfitItems : public LLInventoryCollectFunctor @@ -103,7 +106,7 @@ LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem* } LLPanelClothingListItem::LLPanelClothingListItem(LLViewerInventoryItem* item) - : LLPanelWearableListItem(item) + : LLPanelDeletableWearableListItem(item) { } @@ -118,18 +121,13 @@ void LLPanelClothingListItem::init() BOOL LLPanelClothingListItem::postBuild() { - LLPanelInventoryListItemBase::postBuild(); + LLPanelDeletableWearableListItem::postBuild(); - addWidgetToLeftSide("btn_delete"); addWidgetToRightSide("btn_move_up"); addWidgetToRightSide("btn_move_down"); addWidgetToRightSide("btn_lock"); addWidgetToRightSide("btn_edit"); - LLButton* delete_btn = getChild<LLButton>("btn_delete"); - // Reserve space for 'delete' button event if it is invisible. - setLeftWidgetsWidth(delete_btn->getRect().mRight); - setWidgetsVisible(false); reshapeWidgets(); @@ -176,11 +174,51 @@ BOOL LLPanelBodyPartsListItem::postBuild() return TRUE; } + +// static +LLPanelDeletableWearableListItem* LLPanelDeletableWearableListItem::create(LLViewerInventoryItem* item) +{ + LLPanelDeletableWearableListItem* list_item = NULL; + if(item) + { + list_item = new LLPanelDeletableWearableListItem(item); + list_item->init(); + } + return list_item; +} + +LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInventoryItem* item) +: LLPanelWearableListItem(item) +{ +} + +void LLPanelDeletableWearableListItem::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_deletable_wearable_list_item.xml"); +} + +BOOL LLPanelDeletableWearableListItem::postBuild() +{ + LLPanelWearableListItem::postBuild(); + + addWidgetToLeftSide("btn_delete"); + + LLButton* delete_btn = getChild<LLButton>("btn_delete"); + // Reserve space for 'delete' button event if it is invisible. + setLeftWidgetsWidth(delete_btn->getRect().mRight); + + setWidgetsVisible(false); + reshapeWidgets(); + + return TRUE; +} + + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(EWearableType w_type) +LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableType::EType w_type) { LLPanelDummyClothingListItem* list_item = new LLPanelDummyClothingListItem(w_type); list_item->init(); @@ -201,7 +239,7 @@ BOOL LLPanelDummyClothingListItem::postBuild() addWidgetToRightSide("btn_add"); - setIconImage(get_item_icon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE)); + setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, FALSE, mWearableType, FALSE)); updateItem(); // Make it look loke clothing item - reserve space for 'delete' button @@ -213,7 +251,12 @@ BOOL LLPanelDummyClothingListItem::postBuild() return TRUE; } -LLPanelDummyClothingListItem::LLPanelDummyClothingListItem(EWearableType w_type) +LLWearableType::EType LLPanelDummyClothingListItem::getWearableType() const +{ + return mWearableType; +} + +LLPanelDummyClothingListItem::LLPanelDummyClothingListItem(LLWearableType::EType w_type) : LLPanelWearableListItem(NULL) , mWearableType(w_type) { @@ -224,26 +267,26 @@ void LLPanelDummyClothingListItem::init() LLUICtrlFactory::getInstance()->buildPanel(this, "panel_dummy_clothing_list_item.xml"); } -typedef std::map<EWearableType, std::string> clothing_to_string_map_t; +typedef std::map<LLWearableType::EType, std::string> clothing_to_string_map_t; clothing_to_string_map_t init_clothing_string_map() { clothing_to_string_map_t w_map; - w_map.insert(std::make_pair(WT_SHIRT, "shirt_not_worn")); - w_map.insert(std::make_pair(WT_PANTS, "pants_not_worn")); - w_map.insert(std::make_pair(WT_SHOES, "shoes_not_worn")); - w_map.insert(std::make_pair(WT_SOCKS, "socks_not_worn")); - w_map.insert(std::make_pair(WT_JACKET, "jacket_not_worn")); - w_map.insert(std::make_pair(WT_GLOVES, "gloves_not_worn")); - w_map.insert(std::make_pair(WT_UNDERSHIRT, "undershirt_not_worn")); - w_map.insert(std::make_pair(WT_UNDERPANTS, "underpants_not_worn")); - w_map.insert(std::make_pair(WT_SKIRT, "skirt_not_worn")); - w_map.insert(std::make_pair(WT_ALPHA, "alpha_not_worn")); - w_map.insert(std::make_pair(WT_TATTOO, "tattoo_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_SHIRT, "shirt_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_PANTS, "pants_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_SHOES, "shoes_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_SOCKS, "socks_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_JACKET, "jacket_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_GLOVES, "gloves_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_UNDERSHIRT, "undershirt_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_UNDERPANTS, "underpants_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_SKIRT, "skirt_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_ALPHA, "alpha_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_TATTOO, "tattoo_not_worn")); return w_map; } -std::string LLPanelDummyClothingListItem::wearableTypeToString(EWearableType w_type) +std::string LLPanelDummyClothingListItem::wearableTypeToString(LLWearableType::EType w_type) { static const clothing_to_string_map_t w_map = init_clothing_string_map(); static const std::string invalid_str = LLTrans::getString("invalid_not_worn"); @@ -261,14 +304,99 @@ std::string LLPanelDummyClothingListItem::wearableTypeToString(EWearableType w_t ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// +/*virtual*/ +bool LLWearableItemNameComparator::doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const +{ + std::string name1 = wearable_item1->getItemName(); + std::string name2 = wearable_item2->getItemName(); + + LLStringUtil::toUpper(name1); + LLStringUtil::toUpper(name2); + + return name1 < name2; +} + +/*virtual*/ +bool LLWearableItemTypeNameComparator::doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const +{ + const LLAssetType::EType item_type1 = wearable_item1->getType(); + const LLAssetType::EType item_type2 = wearable_item2->getType(); + + LLWearableItemTypeNameComparator::ETypeListOrder item_type_order1 = getTypeListOrder(item_type1); + LLWearableItemTypeNameComparator::ETypeListOrder item_type_order2 = getTypeListOrder(item_type2); + + if (item_type_order1 != item_type_order2) + { + // If items are of different asset types we can compare them + // by types order in the list. + return item_type_order1 < item_type_order2; + } + + if (item_type_order1 & TLO_NOT_CLOTHING) + { + // If both items are of the same asset type except AT_CLOTHING + // we can compare them by name. + return LLWearableItemNameComparator::doCompare(wearable_item1, wearable_item2); + } + + const LLWearableType::EType item_wearable_type1 = wearable_item1->getWearableType(); + const LLWearableType::EType item_wearable_type2 = wearable_item2->getWearableType(); + + if (item_wearable_type1 != item_wearable_type2) + { + // If items are of different clothing types they are compared + // by clothing types order determined in LLWearableType::EType. + return item_wearable_type1 < item_wearable_type2; + } + else + { + // If both items are of the same clothing type they are compared + // by description and place in reverse order i.e. outer layer item + // on top. + return wearable_item1->getDescription() > wearable_item2->getDescription(); + } +} + +// static +LLWearableItemTypeNameComparator::ETypeListOrder LLWearableItemTypeNameComparator::getTypeListOrder(LLAssetType::EType item_type) +{ + switch (item_type) + { + case LLAssetType::AT_OBJECT: + return TLO_ATTACHMENT; + + case LLAssetType::AT_CLOTHING: + return TLO_CLOTHING; + + case LLAssetType::AT_BODYPART: + return TLO_BODYPART; + + default: + return TLO_UNKNOWN; + } +} + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +static const LLWearableItemTypeNameComparator WEARABLE_TYPE_NAME_COMPARATOR; + static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list"); LLWearableItemsList::Params::Params() +: use_internal_context_menu("use_internal_context_menu", true) {} LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) : LLInventoryItemsList(p) -{} +{ + setComparator(&WEARABLE_TYPE_NAME_COMPARATOR); + if (p.use_internal_context_menu) + { + setRightMouseDownCallback(boost::bind(&LLWearableItemsList::onRightClick, this, _2, _3)); + } +} // virtual LLWearableItemsList::~LLWearableItemsList() @@ -291,4 +419,140 @@ void LLWearableItemsList::updateList(const LLUUID& category_id) refreshList(item_array); } +void LLWearableItemsList::onRightClick(S32 x, S32 y) +{ + uuid_vec_t selected_uuids; + + getSelectedUUIDs(selected_uuids); + if (selected_uuids.empty()) + { + return; + } + + ContextMenu::instance().show(this, selected_uuids, x, y); +} + +////////////////////////////////////////////////////////////////////////// +/// ContextMenu +////////////////////////////////////////////////////////////////////////// + +// virtual +LLContextMenu* LLWearableItemsList::ContextMenu::createMenu() +{ + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + const uuid_vec_t& ids = mUUIDs; // selected items IDs + LLUUID selected_id = ids.front(); // ID of the first selected item + + functor_t wear = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, false); + functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); + + // Register handlers common for all wearable types. + registrar.add("Wearable.Wear", boost::bind(handleMultiple, wear, ids)); + registrar.add("Wearable.Edit", boost::bind(handleMultiple, LLAgentWearables::editWearable, ids)); + registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id)); + + // Register handlers for clothing. + registrar.add("Clothing.TakeOff", boost::bind(handleMultiple, take_off, ids)); + + // Register handlers for body parts. + + // Register handlers for attachments. + registrar.add("Attachment.Detach", boost::bind(handleMultiple, take_off, ids)); + registrar.add("Attachment.Profile", boost::bind(show_item_profile, selected_id)); + + // Create the menu. + LLContextMenu* menu = createFromFile("menu_wearable_list_item.xml"); + + // Determine which items should be visible/enabled. + updateItemsVisibility(menu); + return menu; +} + +void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu) +{ + if (!menu) + { + llwarns << "Invalid menu" << llendl; + return; + } + + const uuid_vec_t& ids = mUUIDs; // selected items IDs + U32 mask = 0; // mask of selected items' types + U32 nitems = ids.size(); // number of selected items + U32 nworn = 0; // number of worn items among the selected ones + U32 nwornlinks = 0; // number of worn links among the selected items + U32 neditable = 0; // number of editable items among the selected ones + + for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) + { + LLUUID id = *it; + LLViewerInventoryItem* item = gInventory.getItem(id); + + if (!item) + { + llwarns << "Invalid item" << llendl; + // *NOTE: the logic below may not work in this case + continue; + } + + updateMask(mask, item->getType()); + + bool is_link = item->getIsLinkType(); + bool is_worn = get_is_item_worn(id); + bool is_editable = gAgentWearables.isWearableModifiable(id); + + if (is_worn) + { + ++nworn; + + if (is_link) + { + ++nwornlinks; + } + } + if (is_editable) + { + ++neditable; + } + } // for + + // *TODO: eliminate multiple traversals over the menu items + // *TODO: try disabling items rather than hiding them + // *FIX: we may hide *all* items and thus get an ugly empty menu + setMenuItemVisible(menu, "wear", nworn == 0); + setMenuItemVisible(menu, "edit", mask & (MASK_CLOTHING|MASK_BODYPART) && nitems == 1 && neditable == 1); + setMenuItemVisible(menu, "show_original", nitems == 1 && nwornlinks == nitems); + setMenuItemVisible(menu, "take_off", mask == MASK_CLOTHING && nworn == nitems); // selected only worn clothes + setMenuItemVisible(menu, "detach", mask == MASK_ATTACHMENT && nworn == nitems); + setMenuItemVisible(menu, "object_profile", mask == MASK_ATTACHMENT && nitems == 1); +} + +// We need this method to convert non-zero BOOL values to exactly 1 (TRUE). +// Otherwise code relying on a BOOL value being TRUE may fail +// (I experienced a weird assert in LLView::drawChildren() because of that. +void LLWearableItemsList::ContextMenu::setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val) +{ + menu->setItemVisible(name, val); +} + +void LLWearableItemsList::ContextMenu::updateMask(U32& mask, LLAssetType::EType at) +{ + if (at == LLAssetType::AT_CLOTHING) + { + mask |= MASK_CLOTHING; + } + else if (at == LLAssetType::AT_BODYPART) + { + mask |= MASK_BODYPART; + } + else if (at == LLAssetType::AT_OBJECT) + { + mask |= MASK_ATTACHMENT; + } + else + { + llwarns << "Unsupported asset type: " << at << llendl; + } +} + // EOF diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 29532a15c1..de024ed220 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -32,12 +32,15 @@ #ifndef LL_LLWEARABLEITEMSLIST_H #define LL_LLWEARABLEITEMSLIST_H +// libs #include "llpanel.h" +#include "llsingleton.h" // newview #include "llinventoryitemslist.h" #include "llinventorymodel.h" -#include "llwearabledictionary.h" +#include "lllistcontextmenu.h" +#include "llwearabletype.h" /** * @class LLPanelWearableListItem @@ -67,12 +70,35 @@ protected: LLPanelWearableListItem(LLViewerInventoryItem* item); }; + +class LLPanelDeletableWearableListItem : public LLPanelWearableListItem +{ + LOG_CLASS(LLPanelDeletableWearableListItem); +public: + + static LLPanelDeletableWearableListItem* create(LLViewerInventoryItem* item); + + virtual ~LLPanelDeletableWearableListItem() {}; + + /*virtual*/ BOOL postBuild(); + + /** + * Make button visible during mouse over event. + */ + inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } + +protected: + LLPanelDeletableWearableListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); +}; + /** * @class LLPanelClothingListItem * * Provides buttons for editing, moving, deleting a wearable. */ -class LLPanelClothingListItem : public LLPanelWearableListItem +class LLPanelClothingListItem : public LLPanelDeletableWearableListItem { LOG_CLASS(LLPanelClothingListItem); public: @@ -86,7 +112,6 @@ public: /** * Make button visible during mouse over event. */ - inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } inline void setShowMoveUpButton(bool show) { setShowWidget("btn_move_up", show); } inline void setShowMoveDownButton(bool show) { setShowWidget("btn_move_down", show); } @@ -124,6 +149,7 @@ protected: /*virtual*/ void init(); }; + /** * @class LLPanelDummyClothingListItem * @@ -132,20 +158,113 @@ protected: class LLPanelDummyClothingListItem : public LLPanelWearableListItem { public: - static LLPanelDummyClothingListItem* create(EWearableType w_type); + static LLPanelDummyClothingListItem* create(LLWearableType::EType w_type); /*virtual*/ void updateItem(); /*virtual*/ BOOL postBuild(); + LLWearableType::EType getWearableType() const; protected: - LLPanelDummyClothingListItem(EWearableType w_type); + LLPanelDummyClothingListItem(LLWearableType::EType w_type); /*virtual*/ void init(); - static std::string wearableTypeToString(EWearableType w_type); + static std::string wearableTypeToString(LLWearableType::EType w_type); + +private: + LLWearableType::EType mWearableType; +}; + +/** + * @class LLWearableListItemComparator + * + * Abstract comparator of wearable list items. + */ +class LLWearableListItemComparator : public LLFlatListView::ItemComparator +{ + LOG_CLASS(LLWearableListItemComparator); + +public: + LLWearableListItemComparator() {}; + virtual ~LLWearableListItemComparator() {}; + + virtual bool compare(const LLPanel* item1, const LLPanel* item2) const + { + const LLPanelInventoryListItemBase* wearable_item1 = dynamic_cast<const LLPanelInventoryListItemBase*>(item1); + const LLPanelInventoryListItemBase* wearable_item2 = dynamic_cast<const LLPanelInventoryListItemBase*>(item2); + + if (!wearable_item1 || !wearable_item2) + { + llwarning("item1 and item2 cannot be null", 0); + return true; + } + + return doCompare(wearable_item1, wearable_item2); + } + +protected: + + /** + * Returns true if wearable_item1 < wearable_item2, false otherwise + * Implement this method in your particular comparator. + */ + virtual bool doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const = 0; +}; + +/** + * @class LLWearableItemNameComparator + * + * Comparator for sorting wearable list items by name. + */ +class LLWearableItemNameComparator : public LLWearableListItemComparator +{ + LOG_CLASS(LLWearableItemNameComparator); + +public: + LLWearableItemNameComparator() {}; + virtual ~LLWearableItemNameComparator() {}; + +protected: + /*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const; +}; + +/** + * @class LLWearableItemTypeNameComparator + * + * Comparator for sorting wearable list items by type and name. + */ +class LLWearableItemTypeNameComparator : public LLWearableItemNameComparator +{ + LOG_CLASS(LLWearableItemTypeNameComparator); + +public: + LLWearableItemTypeNameComparator() {}; + virtual ~LLWearableItemTypeNameComparator() {}; + +protected: + /** + * Returns "true" if wearable_item1 is placed before wearable_item2 sorted by the following: + * - Attachments (abc order) + * - Clothing + * - by type (types order determined in LLWearableType::EType) + * - outer layer on top + * - Body Parts (abc order), + * "false" otherwise. + */ + /*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const; private: - EWearableType mWearableType; + enum ETypeListOrder + { + TLO_ATTACHMENT = 0x01, + TLO_CLOTHING = 0x02, + TLO_BODYPART = 0x04, + TLO_UNKNOWN = 0x08, + + TLO_NOT_CLOTHING = TLO_ATTACHMENT | TLO_BODYPART | TLO_UNKNOWN + }; + + static LLWearableItemTypeNameComparator::ETypeListOrder getTypeListOrder(LLAssetType::EType item_type); }; /** @@ -159,8 +278,32 @@ private: class LLWearableItemsList : public LLInventoryItemsList { public: + /** + * Context menu. + * + * This menu is likely to be used from outside + * (e.g. for items selected across multiple wearable lists), + * so making it a singleton. + */ + class ContextMenu : public LLListContextMenu, public LLSingleton<ContextMenu> + { + protected: + enum { + MASK_CLOTHING = 0x01, + MASK_BODYPART = 0x02, + MASK_ATTACHMENT = 0x04, + }; + + /* virtual */ LLContextMenu* createMenu(); + void updateItemsVisibility(LLContextMenu* menu); + void setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val); + void updateMask(U32& mask, LLAssetType::EType at); + }; + struct Params : public LLInitParam::Block<Params, LLInventoryItemsList::Params> { + Optional<bool> use_internal_context_menu; + Params(); }; @@ -171,6 +314,8 @@ public: protected: friend class LLUICtrlFactory; LLWearableItemsList(const LLWearableItemsList::Params& p); + + void onRightClick(S32 x, S32 y); }; #endif //LL_LLWEARABLEITEMSLIST_H diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 20266706da..aedaeba42a 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -121,7 +121,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID bool res = wearable->importFile( fp ); if (!res) { - if (wearable->getType() == WT_COUNT) + if (wearable->getType() == LLWearableType::WT_COUNT) { isNewWearable = TRUE; } @@ -228,14 +228,14 @@ LLWearable* LLWearableList::createCopy(const LLWearable* old_wearable, const std return wearable; } -LLWearable* LLWearableList::createNewWearable( EWearableType type ) +LLWearable* LLWearableList::createNewWearable( LLWearableType::EType type ) { lldebugs << "LLWearableList::createNewWearable()" << llendl; LLWearable *wearable = generateNewWearable(); wearable->setType( type ); - std::string name = LLTrans::getString( LLWearableDictionary::getTypeDefaultNewName(wearable->getType()) ); + std::string name = LLTrans::getString( LLWearableType::getTypeDefaultNewName(wearable->getType()) ); wearable->setName( name ); LLPermissions perm; diff --git a/indra/newview/llwearablelist.h b/indra/newview/llwearablelist.h index 5e564ba953..16ef11b8bd 100644 --- a/indra/newview/llwearablelist.h +++ b/indra/newview/llwearablelist.h @@ -61,7 +61,7 @@ public: void* userdata); LLWearable* createCopy(const LLWearable* old_wearable, const std::string& new_name = std::string()); - LLWearable* createNewWearable(EWearableType type); + LLWearable* createNewWearable(LLWearableType::EType type); // Callback static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status, LLExtStat ext_status); diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp new file mode 100644 index 0000000000..2a14ace38c --- /dev/null +++ b/indra/newview/llwearabletype.cpp @@ -0,0 +1,138 @@ +/** + * @file llwearabletype.cpp + * @brief LLWearableType class implementation + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llwearabletype.h" +#include "llinventoryfunctions.h" +#include "lltrans.h" + +struct WearableEntry : public LLDictionaryEntry +{ + WearableEntry(const std::string &name, + const std::string& default_new_name, + LLAssetType::EType assetType, + LLInventoryIcon::EIconName iconName); + const LLAssetType::EType mAssetType; + const std::string mLabel; + const std::string mDefaultNewName; //keep mLabel for backward compatibility + LLInventoryIcon::EIconName mIconName; +}; + +WearableEntry::WearableEntry(const std::string &name, + const std::string& default_new_name, + LLAssetType::EType assetType, + LLInventoryIcon::EIconName iconName) : + LLDictionaryEntry(name), + mAssetType(assetType), + mDefaultNewName(default_new_name), + mLabel(LLTrans::getString(name)), + mIconName(iconName) +{ +} + +class LLWearableDictionary : public LLSingleton<LLWearableDictionary>, + public LLDictionary<LLWearableType::EType, WearableEntry> +{ +public: + LLWearableDictionary(); +}; + +LLWearableDictionary::LLWearableDictionary() +{ + addEntry(LLWearableType::WT_SHAPE, new WearableEntry("shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_SHAPE)); + addEntry(LLWearableType::WT_SKIN, new WearableEntry("skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_SKIN)); + addEntry(LLWearableType::WT_HAIR, new WearableEntry("hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_HAIR)); + addEntry(LLWearableType::WT_EYES, new WearableEntry("eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_EYES)); + addEntry(LLWearableType::WT_SHIRT, new WearableEntry("shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SHIRT)); + addEntry(LLWearableType::WT_PANTS, new WearableEntry("pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PANTS)); + addEntry(LLWearableType::WT_SHOES, new WearableEntry("shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SHOES)); + addEntry(LLWearableType::WT_SOCKS, new WearableEntry("socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SOCKS)); + addEntry(LLWearableType::WT_JACKET, new WearableEntry("jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_JACKET)); + addEntry(LLWearableType::WT_GLOVES, new WearableEntry("gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_GLOVES)); + addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry("undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT)); + addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry("underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS)); + addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SKIRT)); + addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_ALPHA)); + addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO)); + addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); + addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); + addEntry(LLWearableType::WT_COUNT, new WearableEntry("count", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); +} + +// static +LLWearableType::EType LLWearableType::typeNameToType(const std::string& type_name) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const LLWearableType::EType wearable = dict->lookup(type_name); + return wearable; +} + +// static +const std::string& LLWearableType::getTypeName(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + return entry->mName; +} + +//static +const std::string& LLWearableType::getTypeDefaultNewName(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + return entry->mDefaultNewName; +} + +// static +const std::string& LLWearableType::getTypeLabel(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + return entry->mLabel; +} + +// static +LLAssetType::EType LLWearableType::getAssetType(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + return entry->mAssetType; +} + +// static +LLInventoryIcon::EIconName LLWearableType::getIconName(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + return entry->mIconName; +} + diff --git a/indra/newview/llwearabletype.h b/indra/newview/llwearabletype.h new file mode 100644 index 0000000000..8090fd8df7 --- /dev/null +++ b/indra/newview/llwearabletype.h @@ -0,0 +1,78 @@ +/** + * @file llwearabletype.h + * @brief LLWearableType class header file + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLWEARABLETYPE_H +#define LL_LLWEARABLETYPE_H + +#include "llassettype.h" +#include "lldictionary.h" +#include "llinventoryicon.h" +#include "llsingleton.h" + +class LLWearableType +{ +public: + enum EType + { + WT_SHAPE = 0, + WT_SKIN = 1, + WT_HAIR = 2, + WT_EYES = 3, + WT_SHIRT = 4, + WT_PANTS = 5, + WT_SHOES = 6, + WT_SOCKS = 7, + WT_JACKET = 8, + WT_GLOVES = 9, + WT_UNDERSHIRT = 10, + WT_UNDERPANTS = 11, + WT_SKIRT = 12, + WT_ALPHA = 13, + WT_TATTOO = 14, + WT_COUNT = 15, + + WT_INVALID = 255, + WT_NONE = -1, + }; + + static const std::string& getTypeName(EType type); + static const std::string& getTypeDefaultNewName(EType type); + static const std::string& getTypeLabel(EType type); + static LLAssetType::EType getAssetType(EType type); + static EType typeNameToType(const std::string& type_name); + static LLInventoryIcon::EIconName getIconName(EType type); + +protected: + LLWearableType() {} + ~LLWearableType() {} +}; + +#endif // LL_LLWEARABLETYPE_H diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 1a64f9d881..5c9633c036 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -54,6 +54,10 @@ #include "llviewerparcelmgr.h" #include "llviewerregion.h" #include "llviewerwindow.h" +#include "llnotificationsutil.h" + +bool on_load_url_external_response(const LLSD& notification, const LLSD& response, bool async ); + class URLLoader : public LLToastAlertPanel::URLLoader { @@ -110,11 +114,26 @@ void LLWeb::loadURLExternal(const std::string& url) // static void LLWeb::loadURLExternal(const std::string& url, bool async) { - std::string escaped_url = escapeURL(url); - if (gViewerWindow) + LLSD payload; + payload["url"] = url; + LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, boost::bind(on_load_url_external_response, _1, _2, async)); +} + +// static +bool on_load_url_external_response(const LLSD& notification, const LLSD& response, bool async ) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if ( 0 == option ) { - gViewerWindow->getWindow()->spawnWebBrowser(escaped_url, async); + LLSD payload = notification["payload"]; + std::string url = payload["url"].asString(); + std::string escaped_url = LLWeb::escapeURL(url); + if (gViewerWindow) + { + gViewerWindow->getWindow()->spawnWebBrowser(escaped_url, async); + } } + return false; } @@ -155,7 +174,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, substitution["VERSION_PATCH"] = LLVersionInfo::getPatch(); substitution["VERSION_BUILD"] = LLVersionInfo::getBuild(); substitution["CHANNEL"] = LLVersionInfo::getChannel(); - substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); + substitution["GRID"] = LLGridManager::getInstance()->getGridLabel(); substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); substitution["SESSION_ID"] = gAgent.getSessionID(); substitution["FIRST_LOGIN"] = gAgent.isFirstLogin(); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 0b63f5efbd..f30567f481 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -91,7 +91,8 @@ LLWorld::LLWorld() : mLastPacketsIn(0), mLastPacketsOut(0), mLastPacketsLost(0), - mSpaceTimeUSec(0) + mSpaceTimeUSec(0), + mClassicCloudsEnabled(TRUE) { for (S32 i = 0; i < 8; i++) { @@ -133,10 +134,11 @@ void LLWorld::destroyClass() LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) { LLMemType mt(LLMemType::MTYPE_REGIONS); - + llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl; LLViewerRegion *regionp = getRegionFromHandle(region_handle); if (regionp) { + llinfos << "Region exists, removing it " << llendl; LLHost old_host = regionp->getHost(); // region already exists! if (host == old_host && regionp->isAlive()) @@ -661,16 +663,41 @@ void LLWorld::updateClouds(const F32 dt) static LLFastTimer::DeclareTimer ftm("World Clouds"); LLFastTimer t(ftm); - if (gSavedSettings.getBOOL("FreezeTime") || - !gSavedSettings.getBOOL("SkyUseClassicClouds")) + if ( gSavedSettings.getBOOL("FreezeTime") ) { // don't move clouds in snapshot mode return; } + + if ( + mClassicCloudsEnabled != + gSavedSettings.getBOOL("SkyUseClassicClouds") ) + { + // The classic cloud toggle has been flipped + // gotta update all of the cloud layers + mClassicCloudsEnabled = + gSavedSettings.getBOOL("SkyUseClassicClouds"); + + if ( !mClassicCloudsEnabled && mActiveRegionList.size() ) + { + // We've transitioned to having classic clouds disabled + // reset all cloud layers. + for ( + region_list_t::iterator iter = mActiveRegionList.begin(); + iter != mActiveRegionList.end(); + ++iter) + { + LLViewerRegion* regionp = *iter; + regionp->mCloudLayer.reset(); + } + + return; + } + } + else if ( !mClassicCloudsEnabled ) return; + if (mActiveRegionList.size()) { - // Update all the cloud puff positions, and timer based stuff - // such as death decay for (region_list_t::iterator iter = mActiveRegionList.begin(); iter != mActiveRegionList.end(); ++iter) { diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index 502f7b0320..5310009d7c 100644 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -184,6 +184,8 @@ private: U64 mSpaceTimeUSec; + BOOL mClassicCloudsEnabled; + //////////////////////////// // // Data for "Fake" objects diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp index 1cdccd2baa..debd6b611f 100644 --- a/indra/newview/llworldmipmap.cpp +++ b/indra/newview/llworldmipmap.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llworldmipmap.h" +#include "llviewercontrol.h" // LLControlGroup #include "llviewertexturelist.h" #include "math.h" // log() @@ -186,8 +187,8 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32 LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 grid_y, S32 level) { // Get the grid coordinates - std::string imageurl = llformat("http://map.secondlife.com.s3.amazonaws.com/map-%d-%d-%d-objects.jpg", - level, grid_x, grid_y); + std::string imageurl = gSavedSettings.getString("MapServerURL") + llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y); + // DO NOT COMMIT!! DEBUG ONLY!!! // Use a local jpeg for every tile to test map speed without S3 access diff --git a/indra/newview/llworldview.cpp b/indra/newview/llworldview.cpp new file mode 100644 index 0000000000..b44a365677 --- /dev/null +++ b/indra/newview/llworldview.cpp @@ -0,0 +1,67 @@ +/** + * @file llworldview.cpp + * @brief LLWorldView class implementation + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llworldview.h" + +#include "llviewercontrol.h" +#include "llsidetray.h" +///////////////////////////////////////////////////// +// LLFloaterView + +static LLDefaultChildRegistry::Register<LLWorldView> r("world_view"); + +LLWorldView::LLWorldView(const Params& p) +: LLUICtrl (p) +{ + gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLWorldView::toggleSidebarCameraMovement, this, _2)); +} + +void LLWorldView::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + //if (FALSE == gSavedSettings.getBOOL("SidebarCameraMovement") ) + //{ + // LLView* main_view = LLUI::getRootView()->findChild<LLView>("main_view"); + // if(main_view) + // { + // width = main_view->getRect().getWidth(); + // } + //} + + LLUICtrl::reshape(width, height, called_from_parent); +} +void LLWorldView::toggleSidebarCameraMovement(const LLSD::Boolean& new_visibility) +{ + reshape(getParent()->getRect().getWidth(),getRect().getHeight()); +} + diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp index 15417614af..8237132ac5 100644 --- a/indra/newview/llxmlrpclistener.cpp +++ b/indra/newview/llxmlrpclistener.cpp @@ -28,6 +28,7 @@ #include "llerror.h" #include "stringize.h" #include "llxmlrpctransaction.h" +#include "llsecapi.h" #if LL_WINDOWS #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally @@ -356,7 +357,22 @@ public: << data["errorcode"].asString() << " (" << data["error"].asString() << ")" << LL_ENDL; - // In addition to CURLE_OK, LLUserAuth distinguishes different error + + switch (curlcode) + { + case CURLE_SSL_PEER_CERTIFICATE: + case CURLE_SSL_CACERT: + { + LLPointer<LLCertificate> error_cert(mTransaction->getErrorCert()); + if(error_cert) + { + data["certificate"] = error_cert->getPem(); + } + break; + } + default: + break; + } // values of 'curlcode': // CURLE_COULDNT_RESOLVE_HOST, // CURLE_SSL_PEER_CERTIFICATE, diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 5884cdd1c3..a8ac0c0c90 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -31,6 +31,9 @@ */ #include "llviewerprecompiledheaders.h" +#include <openssl/x509_vfy.h> +#include <openssl/ssl.h> +#include "llsecapi.h" #include "llxmlrpctransaction.h" #include "llxmlrpclistener.h" @@ -42,6 +45,7 @@ #include <xmlrpc-epi/xmlrpc.h> #include "llappviewer.h" +#include "lltrans.h" // Static instance of LLXMLRPCListener declared here so that every time we // bring in this code, we instantiate a listener. If we put the static @@ -176,6 +180,8 @@ public: std::string mResponseText; XMLRPC_REQUEST mResponse; + std::string mCertStore; + LLPointer<LLCertificate> mErrorCert; Impl(const std::string& uri, XMLRPC_REQUEST request, bool useGzip); Impl(const std::string& uri, @@ -190,7 +196,8 @@ public: private: void init(XMLRPC_REQUEST request, bool useGzip); - + static int _sslCertVerifyCallback(X509_STORE_CTX *ctx, void *param); + static CURLcode _sslCtxFunction(CURL * curl, void *sslctx, void *param); static size_t curlDownloadCallback( char* data, size_t size, size_t nmemb, void* user_data); }; @@ -228,8 +235,75 @@ LLXMLRPCTransaction::Impl::Impl(const std::string& uri, XMLRPC_RequestFree(request, 1); } +// _sslCertVerifyCallback +// callback called when a cert verification is requested. +// calls SECAPI to validate the context +int LLXMLRPCTransaction::Impl::_sslCertVerifyCallback(X509_STORE_CTX *ctx, void *param) +{ + LLXMLRPCTransaction::Impl *transaction = (LLXMLRPCTransaction::Impl *)param; + LLPointer<LLCertificateStore> store = gSecAPIHandler->getCertificateStore(transaction->mCertStore); + LLPointer<LLCertificateChain> chain = gSecAPIHandler->getCertificateChain(ctx); + LLSD validation_params = LLSD::emptyMap(); + LLURI uri(transaction->mURI); + validation_params[CERT_HOSTNAME] = uri.hostName(); + try + { + // don't validate hostname. Let libcurl do it instead. That way, it'll handle redirects + store->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), chain, validation_params); + } + catch (LLCertValidationTrustException& cert_exception) + { + // this exception is is handled differently than the general cert + // exceptions, as we allow the user to actually add the certificate + // for trust. + // therefore we pass back a different error code + // NOTE: We're currently 'wired' to pass around CURL error codes. This is + // somewhat clumsy, as we may run into errors that do not map directly to curl + // error codes. Should be refactored with login refactoring, perhaps. + transaction->mCurlCode = CURLE_SSL_CACERT; + // set the status directly. set curl status generates error messages and we want + // to use the fixed ones from the exceptions + transaction->setStatus(StatusCURLError, cert_exception.getMessage(), std::string()); + // We should probably have a more generic way of passing information + // back to the error handlers. + transaction->mErrorCert = cert_exception.getCert(); + return 0; + } + catch (LLCertException& cert_exception) + { + transaction->mCurlCode = CURLE_SSL_PEER_CERTIFICATE; + // set the status directly. set curl status generates error messages and we want + // to use the fixed ones from the exceptions + transaction->setStatus(StatusCURLError, cert_exception.getMessage(), std::string()); + transaction->mErrorCert = cert_exception.getCert(); + return 0; + } + catch (...) + { + // any other odd error, we just handle as a connect error. + transaction->mCurlCode = CURLE_SSL_CONNECT_ERROR; + transaction->setCurlStatus(CURLE_SSL_CONNECT_ERROR); + return 0; + } + return 1; +} +// _sslCtxFunction +// Callback function called when an SSL Context is created via CURL +// used to configure the context for custom cert validate(<, <#const & xs#>, <#T * #>, <#long #>)tion +// based on SECAPI +CURLcode LLXMLRPCTransaction::Impl::_sslCtxFunction(CURL * curl, void *sslctx, void *param) +{ + SSL_CTX * ctx = (SSL_CTX *) sslctx; + // disable any default verification for server certs + SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL); + // set the verification callback. + SSL_CTX_set_cert_verify_callback(ctx, _sslCertVerifyCallback, param); + // the calls are void + return CURLE_OK; + +} void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) { @@ -237,6 +311,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) { mCurlRequest = new LLCurlEasyRequest(); } + mErrorCert = NULL; if (gSavedSettings.getBOOL("BrowserProxyEnabled")) { @@ -252,12 +327,13 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) // mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // usefull for debugging mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); mCurlRequest->setWriteCallback(&curlDownloadCallback, (void*)this); - BOOL verifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert"); - mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, LLCurl::getSSLVerify() ? 2 : 0); - mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, verifySSLCert); - mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, verifySSLCert ? 2 : 0); + BOOL vefifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert"); + mCertStore = gSavedSettings.getString("CertStore"); + mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, vefifySSLCert); + mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, vefifySSLCert ? 2 : 0); // Be a little impatient about establishing connections. mCurlRequest->setopt(CURLOPT_CONNECTTIMEOUT, 40L); + mCurlRequest->setSSLCtxCallback(_sslCtxFunction, (void *)this); /* Setting the DNS cache timeout to -1 disables it completely. This might help with bug #503 */ @@ -343,11 +419,19 @@ bool LLXMLRPCTransaction::Impl::process() { if (result != CURLE_OK) { - setCurlStatus(result); - llwarns << "LLXMLRPCTransaction CURL error " - << mCurlCode << ": " << mCurlRequest->getErrorString() << llendl; - llwarns << "LLXMLRPCTransaction request URI: " - << mURI << llendl; + if ((result != CURLE_SSL_PEER_CERTIFICATE) && + (result != CURLE_SSL_CACERT)) + { + // if we have a curl error that's not already been handled + // (a non cert error), then generate the error message as + // appropriate + setCurlStatus(result); + + llwarns << "LLXMLRPCTransaction CURL error " + << mCurlCode << ": " << mCurlRequest->getErrorString() << llendl; + llwarns << "LLXMLRPCTransaction request URI: " + << mURI << llendl; + } return true; } @@ -425,16 +509,10 @@ void LLXMLRPCTransaction::Impl::setStatus(EStatus status, case StatusComplete: mStatusMessage = "(done)"; break; - default: // Usually this means that there's a problem with the login server, // not with the client. Direct user to status page. - mStatusMessage = - "Despite our best efforts, something unexpected has gone wrong. \n" - " \n" - "Please check secondlife.com/status \n" - "to see if there is a known problem with the service."; - + mStatusMessage = LLTrans::getString("server_is_down"); mStatusURI = "http://secondlife.com/status/"; } } @@ -469,7 +547,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code) "Often this means that your computer\'s clock is set incorrectly.\n" "Please go to Control Panels and make sure the time and date\n" "are set correctly.\n" - "\n" + "Also check that your network and firewall are set up correctly.\n" "If you continue to receive this error, please go\n" "to the Support section of the SecondLife.com web site\n" "and report the problem."; @@ -541,6 +619,11 @@ std::string LLXMLRPCTransaction::statusMessage() return impl.mStatusMessage; } +LLPointer<LLCertificate> LLXMLRPCTransaction::getErrorCert() +{ + return impl.mErrorCert; +} + std::string LLXMLRPCTransaction::statusURI() { return impl.mStatusURI; diff --git a/indra/newview/llxmlrpctransaction.h b/indra/newview/llxmlrpctransaction.h index c835423d67..8beb2e2623 100644 --- a/indra/newview/llxmlrpctransaction.h +++ b/indra/newview/llxmlrpctransaction.h @@ -38,6 +38,7 @@ typedef struct _xmlrpc_request* XMLRPC_REQUEST; typedef struct _xmlrpc_value* XMLRPC_VALUE; // foward decl of types from xmlrpc.h (this usage is type safe) +class LLCertificate; class LLXMLRPCValue // a c++ wrapper around XMLRPC_VALUE @@ -115,6 +116,8 @@ public: EStatus status(int* curlCode); // return status, and extended CURL code, if code isn't null + + LLPointer<LLCertificate> getErrorCert(); std::string statusMessage(); // return a message string, suitable for showing the user std::string statusURI(); diff --git a/indra/newview/macview_Prefix.h b/indra/newview/macview_Prefix.h index a71362a139..07f8093426 100644 --- a/indra/newview/macview_Prefix.h +++ b/indra/newview/macview_Prefix.h @@ -65,7 +65,6 @@ #include "llfloater.h" #include "llfloaterbuildoptions.h" #include "llfloaterchat.h" -#include "llfloatercustomize.h" #include "llfloatergroups.h" #include "llfloaterworldmap.h" #include "llfloatermute.h" diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 2d2fc38573..cc65b34a61 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -284,6 +284,7 @@ BOOL LLPipeline::sRenderFrameTest = FALSE; BOOL LLPipeline::sRenderAttachedLights = TRUE; BOOL LLPipeline::sRenderAttachedParticles = TRUE; BOOL LLPipeline::sRenderDeferred = FALSE; +BOOL LLPipeline::sAllowRebuildPriorityGroup = FALSE ; S32 LLPipeline::sVisibleLightCount = 0; F32 LLPipeline::sMinRenderSize = 0.f; @@ -1780,6 +1781,12 @@ void LLPipeline::updateGL() void LLPipeline::rebuildPriorityGroups() { + if(!sAllowRebuildPriorityGroup) + { + return ; + } + sAllowRebuildPriorityGroup = FALSE ; + LLTimer update_timer; LLMemType mt(LLMemType::MTYPE_PIPELINE); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 60e0b0ae8c..89649a0682 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -462,6 +462,7 @@ public: static BOOL sRenderAttachedLights; static BOOL sRenderAttachedParticles; static BOOL sRenderDeferred; + static BOOL sAllowRebuildPriorityGroup; static S32 sVisibleLightCount; static F32 sMinRenderSize; diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 99603530d8..e8a893e31b 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -359,7 +359,7 @@ reference="White"/> <color name="GroupNotifyDimmedTextColor" - reference="DkGray" /> + reference="LtGray" /> <color name="GroupOverTierColor" value="0.43 0.06 0.06 1" /> @@ -424,6 +424,9 @@ name="InventoryItemLibraryColor" reference="EmphasisColor" /> <color + name="InventoryItemLinkColor" + reference="LtGray_50" /> + <color name="InventorySearchStatusColor" reference="EmphasisColor" /> <color @@ -527,7 +530,7 @@ reference="Unused?" /> <color name="NetMapBackgroundColor" - value="0 0 0 0" /> + value="0 0 0 1" /> <color name="NetMapGroupOwnAboveWater" reference="Purple" /> diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_Off.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_Off.png Binary files differindex 3cfe2e850e..00158a7bc2 100644 --- a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_Off.png +++ b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_On.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_On.png Binary files differindex bb5d85e410..3748f5e190 100644 --- a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_Off.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_Off.png Binary files differindex 9876aa456c..c49b8f9a27 100644 --- a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_Off.png +++ b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_On.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_On.png Binary files differindex f481fed88c..bc8c4db04d 100644 --- a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_Off.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_Off.png Binary files differindex d58b4ff990..b919a0a152 100644 --- a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_Off.png +++ b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_On.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_On.png Binary files differindex 6e73898992..de9da359a0 100644 --- a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Mouselook_View_Off.png b/indra/newview/skins/default/textures/bottomtray/Mouselook_View_Off.png Binary files differnew file mode 100644 index 0000000000..8d32cad95f --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Mouselook_View_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Mouselook_View_On.png b/indra/newview/skins/default/textures/bottomtray/Mouselook_View_On.png Binary files differnew file mode 100644 index 0000000000..4c98e35868 --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Mouselook_View_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Down_Off.png b/indra/newview/skins/default/textures/bottomtray/Movement_Down_Off.png Binary files differindex 1b0192e685..2893c9a9f1 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Down_Off.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Down_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Down_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Down_On.png Binary files differindex 9f42b7d5b2..f7ed4c25fb 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Down_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Down_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png b/indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png Binary files differnew file mode 100644 index 0000000000..3602efa9d9 --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png Binary files differnew file mode 100644 index 0000000000..2f81fb1588 --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png b/indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png Binary files differnew file mode 100644 index 0000000000..9c3fc37dfe --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png Binary files differnew file mode 100644 index 0000000000..4f86e81a15 --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Up_Off.png b/indra/newview/skins/default/textures/bottomtray/Movement_Up_Off.png Binary files differindex 9b9837cec1..a49c43c2cf 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Up_Off.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Up_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png Binary files differindex c71d4a7854..ed4902f3ee 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Object_View_Off.png b/indra/newview/skins/default/textures/bottomtray/Object_View_Off.png Binary files differnew file mode 100644 index 0000000000..e9dea7e17e --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Object_View_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Object_View_On.png b/indra/newview/skins/default/textures/bottomtray/Object_View_On.png Binary files differnew file mode 100644 index 0000000000..7a348ba22e --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Object_View_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.png Binary files differnew file mode 100644 index 0000000000..20fa40e127 --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.png diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Off.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Off.png Binary files differnew file mode 100644 index 0000000000..53efa3a9a9 --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.png Binary files differnew file mode 100644 index 0000000000..f1420e0002 --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.png diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.png Binary files differnew file mode 100644 index 0000000000..89a6269edc --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.png Binary files differnew file mode 100644 index 0000000000..9f1e2a469d --- /dev/null +++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.png Binary files differnew file mode 100644 index 0000000000..dd73d655e9 --- /dev/null +++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.png Binary files differnew file mode 100644 index 0000000000..f6b775c2a0 --- /dev/null +++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.png diff --git a/indra/newview/skins/default/textures/icons/DownArrow_Off.png b/indra/newview/skins/default/textures/icons/DownArrow_Off.png Binary files differnew file mode 100644 index 0000000000..60f62eed4a --- /dev/null +++ b/indra/newview/skins/default/textures/icons/DownArrow_Off.png diff --git a/indra/newview/skins/default/textures/icons/Edit_Wrench.png b/indra/newview/skins/default/textures/icons/Edit_Wrench.png Binary files differnew file mode 100644 index 0000000000..1c43960d02 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Edit_Wrench.png diff --git a/indra/newview/skins/default/textures/icons/Female.png b/indra/newview/skins/default/textures/icons/Female.png Binary files differnew file mode 100644 index 0000000000..67b5653a94 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Female.png diff --git a/indra/newview/skins/default/textures/icons/Generic_Group_Large.png b/indra/newview/skins/default/textures/icons/Generic_Group_Large.png Binary files differnew file mode 100644 index 0000000000..de8a39fc8a --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Generic_Group_Large.png diff --git a/indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png b/indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png Binary files differnew file mode 100644 index 0000000000..fb370f98d5 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png diff --git a/indra/newview/skins/default/textures/icons/Hierarchy_View_On.png b/indra/newview/skins/default/textures/icons/Hierarchy_View_On.png Binary files differnew file mode 100644 index 0000000000..c590a5a5d3 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Hierarchy_View_On.png diff --git a/indra/newview/skins/default/textures/icons/List_View_Disabled.png b/indra/newview/skins/default/textures/icons/List_View_Disabled.png Binary files differnew file mode 100644 index 0000000000..155dee5047 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/List_View_Disabled.png diff --git a/indra/newview/skins/default/textures/icons/List_View_On.png b/indra/newview/skins/default/textures/icons/List_View_On.png Binary files differnew file mode 100644 index 0000000000..9127c92c3b --- /dev/null +++ b/indra/newview/skins/default/textures/icons/List_View_On.png diff --git a/indra/newview/skins/default/textures/icons/Locked_Icon.png b/indra/newview/skins/default/textures/icons/Locked_Icon.png Binary files differnew file mode 100644 index 0000000000..8ead280794 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Locked_Icon.png diff --git a/indra/newview/skins/default/textures/icons/Male.png b/indra/newview/skins/default/textures/icons/Male.png Binary files differnew file mode 100644 index 0000000000..f3fad77fd0 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Male.png diff --git a/indra/newview/skins/default/textures/icons/Search_Icon.png b/indra/newview/skins/default/textures/icons/Search_Icon.png Binary files differnew file mode 100644 index 0000000000..541aa8f52a --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Search_Icon.png diff --git a/indra/newview/skins/default/textures/icons/Shirt_Large.png b/indra/newview/skins/default/textures/icons/Shirt_Large.png Binary files differnew file mode 100644 index 0000000000..0f3846bccc --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Shirt_Large.png diff --git a/indra/newview/skins/default/textures/icons/Shop.png b/indra/newview/skins/default/textures/icons/Shop.png Binary files differnew file mode 100644 index 0000000000..d7e0001dc6 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Shop.png diff --git a/indra/newview/skins/default/textures/icons/UpArrow_Off.png b/indra/newview/skins/default/textures/icons/UpArrow_Off.png Binary files differnew file mode 100644 index 0000000000..00015bce20 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/UpArrow_Off.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index bbb82d86b1..072ea40ee4 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -110,6 +110,8 @@ with the same filename but different name <texture name="DisclosureArrow_Opened_Off" file_name="widgets/DisclosureArrow_Opened_Off.png" preload="true" /> <texture name="DownArrow" file_name="bottomtray/DownArrow.png" preload="false" /> + <texture name="DownArrow_Off" file_name="icons/DownArrow_off.png" preload="false" /> + <texture name="Dragbar" file_name="windows/Dragbar.png" preload="false" scale.left="35" scale.top="5" scale.right="29" scale.bottom="5" /> <texture name="DropDown_Disabled" file_name="widgets/DropDown_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> <texture name="DropDown_Press" file_name="widgets/DropDown_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> @@ -119,6 +121,7 @@ with the same filename but different name <texture name="DropTarget" file_name="widgets/DropTarget.png" preload="false" /> <texture name="ExternalBrowser_Off" file_name="icons/ExternalBrowser_Off.png" preload="false" /> + <texture name="Edit_Wrench" file_name="icons/Edit_Wrench.png" preload="false" /> <texture name="Favorite_Star_Active" file_name="navbar/Favorite_Star_Active.png" preload="false" /> <texture name="Favorite_Star_Off" file_name="navbar/Favorite_Star_Off.png" preload="false" /> @@ -135,6 +138,7 @@ with the same filename but different name <texture name="ForwardArrow_Press" file_name="icons/ForwardArrow_Press.png" preload="false" /> <texture name="Generic_Group" file_name="icons/Generic_Group.png" preload="false" /> + <texture name="Generic_Group_Large" file_name="icons/Generic_Group_Large.png" preload="false" /> <texture name="icon_group.tga" file_name="icons/Generic_Group.png" preload="false" /> <texture name="Generic_Object_Small" file_name="icons/Generic_Object_Small.png" preload="false" /> <texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" /> @@ -144,6 +148,9 @@ with the same filename but different name <texture name="Help_Press" file_name="navbar/Help_Press.png" preload="false" /> + <texture name="Hierarchy_View_Disabled" file_name="icons/Hierarchy_View_Disabled.png" preload="false" /> + <texture name="Hierarchy_View_On" file_name="icons/Hierarchy_View_On.png" preload="false" /> + <texture name="Home_Off" file_name="navbar/Home_Off.png" preload="false" /> @@ -214,15 +221,54 @@ with the same filename but different name <texture name="Inv_Underpants" file_name="icons/Inv_Underpants.png" preload="false" /> <texture name="Inv_Undershirt" file_name="icons/Inv_Undershirt.png" preload="false" /> + <texture name="Inv_Alpha_Link" file_name="icons/Inv_Alpha_Link.png" preload="false" /> + <texture name="Inv_Animation_Link" file_name="icons/Inv_Animation_Link.png" preload="false" /> + <texture name="Inv_BodyShape_Link" file_name="icons/Inv_BodyShape_Link.png" preload="false" /> + <texture name="Inv_CallingCard_Link" file_name="icons/Inv_CallingCard_Link.png" preload="false" /> + <texture name="Inv_Clothing_Link" file_name="icons/Inv_Clothing_Link.png" preload="false" /> + <texture name="Inv_Eye_Link" file_name="icons/Inv_Eye_Link.png" preload="false" /> + <texture name="Inv_FolderClosed_Link" file_name="icons/Inv_FolderClosed_Link.png" preload="false" /> + <texture name="Inv_FolderOpen_Link" file_name="icons/Inv_FolderOpen_Link.png" preload="false" /> + <texture name="Inv_Gesture_Link" file_name="icons/Inv_Gesture_Link.png" preload="false" /> + <texture name="Inv_Gloves_Link" file_name="icons/Inv_Gloves_Link.png" preload="false" /> + <texture name="Inv_Hair_Link" file_name="icons/Inv_Hair_Link.png" preload="false" /> + <texture name="Inv_LinkItem_Link" file_name="icons/Inv_LinkItem_Link.png" preload="false" /> + <texture name="Inv_LinkFolder_Link" file_name="icons/Inv_LinkFolder_Link.png" preload="false" /> + <texture name="Inv_Jacket_Link" file_name="icons/Inv_Jacket_Link.png" preload="false" /> + <texture name="Inv_LookFolderOpen_Link" file_name="icons/Inv_LookFolderOpen_Link.png" preload="false" /> + <texture name="Inv_LookFolderClosed_Link" file_name="icons/Inv_LookFolderClosed_Link.png" preload="false" /> + <texture name="Inv_Landmark_Link" file_name="icons/Inv_Landmark_Link.png" preload="false" /> + <texture name="Inv_Notecard_Link" file_name="icons/Inv_Notecard_Link.png" preload="false" /> + <texture name="Inv_Object_Link" file_name="icons/Inv_Object_Link.png" preload="false" /> + <texture name="Inv_Object_Multi_Link" file_name="icons/Inv_Object_Multi_Link.png" preload="false" /> + <texture name="Inv_Pants_Link" file_name="icons/Inv_Pants_Link.png" preload="false" /> + <texture name="Inv_Script_Link" file_name="icons/Inv_Script_Link.png" preload="false" /> + <texture name="Inv_Shirt_Link" file_name="icons/Inv_Shirt_Link.png" preload="false" /> + <texture name="Inv_Shoe_Link" file_name="icons/Inv_Shoe_Link.png" preload="false" /> + <texture name="Inv_Skin_Link" file_name="icons/Inv_Skin_Link.png" preload="false" /> + <texture name="Inv_Skirt_Link" file_name="icons/Inv_Skirt_Link.png" preload="false" /> + <texture name="Inv_Snapshot_Link" file_name="icons/Inv_Snapshot_Link.png" preload="false" /> + <texture name="Inv_Socks_Link" file_name="icons/Inv_Socks_Link.png" preload="false" /> + <texture name="Inv_Sound_Link" file_name="icons/Inv_Sound_Link.png" preload="false" /> + <texture name="Inv_Tattoo_Link" file_name="icons/Inv_Tattoo_Link.png" preload="false" /> + <texture name="Inv_Texture_Link" file_name="icons/Inv_Texture_Link.png" preload="false" /> + <texture name="Inv_Underpants_Link" file_name="icons/Inv_Underpants_Link.png" preload="false" /> + <texture name="Inv_Undershirt_Link" file_name="icons/Inv_Undershirt_Link.png" preload="false" /> + <texture name="Linden_Dollar_Alert" file_name="widgets/Linden_Dollar_Alert.png"/> <texture name="Linden_Dollar_Background" file_name="widgets/Linden_Dollar_Background.png"/> <texture name="ListItem_Select" file_name="widgets/ListItem_Select.png" preload="true" scale.left="2" scale.bottom="2" scale.top="22" scale.right="278" /> <texture name="ListItem_Over" file_name="widgets/ListItem_Over.png" preload="true" scale.left="2" scale.bottom="2" scale.top="22" scale.right="278" /> + <texture name="List_View_Disabled" file_name="icons/List_View_Disabled.png" preload="false" /> + <texture name="List_View_On" file_name="icons/List_View_On.png" preload="false" /> + <texture name="Lock" file_name="icons/Lock.png" preload="false" /> <texture name="Lock2" file_name="navbar/Lock.png" preload="false" /> + <texture name="Locked_Icon" file_name="icons/Locked_Icon.png" preload="false" /> + <texture name="Microphone_On" file_name="icons/Microphone_On.png" preload="false" /> @@ -232,6 +278,9 @@ with the same filename but different name <texture name="menu_separator" file_name="navbar/FileMenu_Divider.png" scale.left="4" scale.top="166" scale.right="0" scale.bottom="0" /> + <texture name="MouseLook_View_Off" file_name="bottomtray/MouseLook_view_off.png" preload="false" /> + <texture name="MouseLook_View_On" file_name="bottomtray/MouseLook_view_on.png" preload="false" /> + <texture name="Move_Fly_Off" file_name="bottomtray/Move_Fly_Off.png" preload="false" /> <texture name="Move_Run_Off" file_name="bottomtray/Move_Run_Off.png" preload="false" /> <texture name="Move_Walk_Off" file_name="bottomtray/Move_Walk_Off.png" preload="false" /> @@ -241,6 +290,10 @@ with the same filename but different name <texture name="Movement_Down_On" file_name="bottomtray/Movement_Down_On.png" preload="false" /> <texture name="Movement_Forward_Off" file_name="bottomtray/Movement_Forward_Off.png" preload="false" /> <texture name="Movement_Forward_On" file_name="bottomtray/Movement_Forward_On.png" preload="false" /> + <texture name="Movement_Left_Off" file_name="bottomtray/Movement_Left_Off.png" preload="false" /> + <texture name="Movement_Left_On" file_name="bottomtray/Movement_Left_On.png" preload="false" /> + <texture name="Movement_Right_Off" file_name="bottomtray/Movement_Right_Off.png" preload="false" /> + <texture name="Movement_Right_On" file_name="bottomtray/Movement_Right_On.png" preload="false" /> <texture name="Movement_TurnLeft_Off" file_name="bottomtray/Movement_TurnLeft_Off.png" preload="false" /> <texture name="Movement_TurnLeft_On" file_name="bottomtray/Movement_TurnLeft_On.png" preload="false" /> <texture name="Movement_TurnRight_Off" file_name="bottomtray/Movement_TurnRight_Off.png" preload="false" /> @@ -288,10 +341,14 @@ with the same filename but different name <texture name="Object_Tube" file_name="build/Object_Tube.png" preload="false" /> <texture name="Object_Tube_Selected" file_name="build/Object_Tube_Selected.png" preload="false" /> + <texture name="Object_View_Off" file_name="bottomtray/Object_View_Off.png" preload="false" /> + <texture name="Object_View_On" file_name="bottomtray/Object_View_On.png" preload="false" /> + <texture name="OptionsMenu_Disabled" file_name="icons/OptionsMenu_Disabled.png" preload="false" /> <texture name="OptionsMenu_Off" file_name="icons/OptionsMenu_Off.png" preload="false" /> <texture name="OptionsMenu_Press" file_name="icons/OptionsMenu_Press.png" preload="false" /> + <texture name="PanOrbit_Off" file_name="bottomtray/PanOrbit_Off.png" preload="false" /> <texture name="Parcel_Exp_Color" file_name="icons/Parcel_Exp_Color.png" preload="false" /> @@ -371,6 +428,8 @@ with the same filename but different name <texture name="Search" file_name="navbar/Search.png" preload="false" /> + <texture name="Search_Icon" file_name="icons/Search_Icon.png" preload="false" /> + <texture name="SegmentedBtn_Left_Off" file_name="widgets/SegmentedBtn_Left_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Left_Over" file_name="widgets/SegmentedBtn_Left_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Left_Press" file_name="widgets/SegmentedBtn_Left_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> @@ -393,6 +452,9 @@ with the same filename but different name <texture name="SegmentedBtn_Right_Selected_Press" file_name="widgets/SegmentedBtn_Right_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Right_Selected_Disabled" file_name="widgets/SegmentedBtn_Right_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="Shirt_Large" file_name="icons/Shirt_Large.png" preload="false" /> + <texture name="Shop" file_name="icons/Shop.png" preload="false" /> + <texture name="SkipBackward_Off" file_name="icons/SkipBackward_Off.png" preload="false" /> <texture name="SkipForward_Off" file_name="icons/SkipForward_Off.png" preload="false" /> @@ -465,15 +527,18 @@ with the same filename but different name <texture name="Tool_Grab" file_name="build/Tool_Grab.png" preload="false" /> <texture name="Tool_Zoom" file_name="build/Tool_Zoom.png" preload="false" /> + <texture name="Toolbar_Left_Flash" file_name="containers/Toolbar_Left_Flash.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> <texture name="Toolbar_Left_Off" file_name="containers/Toolbar_Left_Off.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> <texture name="Toolbar_Left_Over" file_name="containers/Toolbar_Left_Over.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> <texture name="Toolbar_Left_Selected" file_name="containers/Toolbar_Left_Selected.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> <texture name="Toolbar_Middle_Off" file_name="containers/Toolbar_Middle_Off.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" /> <texture name="Toolbar_Middle_Over" file_name="containers/Toolbar_Middle_Over.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" /> <texture name="Toolbar_Middle_Selected" file_name="containers/Toolbar_Middle_Selected.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" /> + <texture name="Toolbar_Middle_Flash" file_name="containers/Toolbar_Middle_Flash.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> <texture name="Toolbar_Right_Off" file_name="containers/Toolbar_Right_Off.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> <texture name="Toolbar_Right_Over" file_name="containers/Toolbar_Right_Over.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> <texture name="Toolbar_Right_Selected" file_name="containers/Toolbar_Right_Selected.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> + <texture name="Toolbar_Right_Flash" file_name="containers/Toolbar_Right_Flash.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> <texture name="Tooltip" file_name="widgets/Tooltip.png" preload="true" scale.left="2" scale.top="16" scale.right="100" scale.bottom="3" /> @@ -484,6 +549,8 @@ with the same filename but different name <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" /> + <texture name="Volume_Background" file_name="windows/Volume_Background.png" preload="false" scale.left="6" scale.top="33" scale.right="63" scale.bottom="10" /> @@ -593,4 +660,9 @@ with the same filename but different name <texture name="Progress_11" file_name="icons/Progress_11.png" preload="true" /> <texture name="Progress_12" file_name="icons/Progress_12.png" preload="true" /> + <texture name="bevel_background" file_name="widgets/bevel_background.png" preload="true" scale.left="12" scale.top="15" scale.right="120" scale.bottom="2"/> + <texture name="buy_off" file_name="widgets/buy_off.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> + <texture name="buy_over" file_name="widgets/buy_over.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> + <texture name="buy_press" file_name="widgets/buy_press.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> + </textures> diff --git a/indra/newview/skins/default/textures/widgets/bevel_background.png b/indra/newview/skins/default/textures/widgets/bevel_background.png Binary files differnew file mode 100644 index 0000000000..fb5067503d --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/bevel_background.png diff --git a/indra/newview/skins/default/textures/widgets/buy_off.png b/indra/newview/skins/default/textures/widgets/buy_off.png Binary files differnew file mode 100644 index 0000000000..961ad071d4 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/buy_off.png diff --git a/indra/newview/skins/default/textures/widgets/buy_over.png b/indra/newview/skins/default/textures/widgets/buy_over.png Binary files differnew file mode 100644 index 0000000000..0be19f8a31 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/buy_over.png diff --git a/indra/newview/skins/default/textures/widgets/buy_press.png b/indra/newview/skins/default/textures/widgets/buy_press.png Binary files differnew file mode 100644 index 0000000000..d6f587464d --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/buy_press.png diff --git a/indra/newview/skins/default/textures/windows/Dragbar.png b/indra/newview/skins/default/textures/windows/Dragbar.png Binary files differnew file mode 100644 index 0000000000..d94dda1aae --- /dev/null +++ b/indra/newview/skins/default/textures/windows/Dragbar.png diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml index 91db3c6b1c..435c7f4907 100644 --- a/indra/newview/skins/default/xui/da/floater_about.xml +++ b/indra/newview/skins/default/xui/da/floater_about.xml @@ -43,9 +43,14 @@ Vivox Version: [VIVOX_VERSION] </panel> <panel label="Tak til" name="credits_panel"> <text_editor name="credits_editor"> - Second Life er gjort muligt for dig af Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les og mange flere. + Second Life er lavet til dig af Philip, Tessa, Andrew, Cory, Ian, James, Phoenix, Ryan, Haney, Dan, Char, Ben, John, Tanya, Eddie, Richard, Mitch, Doug, Eric, Frank, Bruce, Aaron, Peter, Alice, Charlie, Debra, Eileen, Helen, Janet, Steffan, Steve, Tom, Mark, Hunter, Xenon, Burgess, Bill, Jim, Lee, Hamlet, Daniel, Jeff, Todd, Sarah, Tim, Stephanie, Colin, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Jack, Vektor, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Jesse, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Yuko, Makiko, Thomas, Harry, Seth, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Brad, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, Beez, Milo, Hermia, Red, Thrax, Gulliver, Joe, Sally, Paul, Jose, Rejean, Dore, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, Dustin, George, Del, Matthew, Cat, Jacqui, Adrian, Viola, Alfred, Noel, Irfan, Yool, Rika, Jane, Frontier, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Jeremy, JP, Jake, Anthony, Maurice, Madhavi, Leopard, Kyle, Joon, Bert, Belinda, Jon, Kristi, Bridie, Pramod, Socrates, Maria, Aric, Adreanne, Jay, Kari, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Colossus, Zen, BigPapi, Pastrami, Kurz, Mani, Neuro, Mel, Sardonyx, MJ, Rowan, Sgt, Elvis, Samuel, Leo, Bryan, Niko, Austin, Soft, Poppy, Rachel, Aki, Banzai, Alexa, Sue, Bender, CG, Angelo, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Rothman, Niall, Marin, Allison, Katie, Dawn, Dusty, Katt, Judy, Andrea, Ambroff, Infinity, Rico, Gail, Kalpana, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Maestro, Simone, Yang, T, Shannon, Nelson, Khanh, Scott, Courtney, Charlene, Quixote, Susan, Zed, Amanda, Katelin, Enkidu, Roxie, Esbee, JoRoan, Scarlet, Tay, Kevin, Wolfgang, Johnny, Ray, Andren, Merov, Bob, Rand, Howard, Callen, Heff, Galen, Newell, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl, Ashley, JessieAnn, Huseby, Karina, Paris, Kurt, Rick, Lis, Kotler, Theeba, Lynx, Murphy, Doten, Taka, Norm, Jillian, Marcus, Mae, Novack, Esther, Perry, Dana, Ducot, Javier, Porter, Madison, Gecko, Dough, JR, Gisele, Crimp, Norie, Arch, Kimi, Fisher, Barbara, Jason, Peggy, Bernard, Jules, Leroy, Eva, Khederian, Campbell, Vogt, Masido, Karel, Torres, Lo, Breezer, Delby, Rountree, Anna, Servus, Rue, Itiaes, Chuck, Luna, Novella, Zaza, Wen, Gino, Lex, Cassandra, Limey, Nancy, Anukul, Silver, Brodesky, Jinsai, Squid, Gez, Rakesh, Ladan, Edelman, Marcet, Squire, Tatem, Tony, Jerm, Tia, Falcon, BK, Tiggs, Driscoll, Bacon, Timothee, Cru, Carmilla, Coyot, Webb, Kazu, Rudas, LJ, Sea, Ali Wallace, Bewest, Pup, Drub, Dragon, Inoshiro, Byron, Rhett, Xandix, Aimee, Fredrik, Thor, Teddy, Baron, Nelly, Ghengis, Epic, Eli, Stone, Grapes, Irie, Prep, Scobu, Valerie, Alain, and many others. -Tak til følgende beboere for at sikre at denne klient er den bedste version indtil nu: (under udarbejdelse) +Tak til følgende beboere: Drew Dwi, Zai Lynch, Latif Khalifa, Ellla McMahon, Harleen Gretzky, Squirrel Wood, Malarthi Behemoth, Dante Tucker, Buckaroo Mu, Eddi Decosta, Dirk, Talamasca, Torben Trautman, Irene Muni, Lilly Zenovka, Vick Forcella, Sasy Scarborough, Gentle Welinder, Elric Anatine, Techwolf Lupindo, Dusan Writer, WolfPup Lowenhar, Marianne McCann, Fiachra Lach, Sitearm Madonna, Sudane Erato, Sahkolihaa Contepomi, Sachi Vixen, Questar Utu, Dimitrio Lewis, Matto Destiny, Scrim Pinion, Radio Signals, Psi Merlin, Pixel Gausman, Mel Vanbeeck, Laurent Bechir, Lamorna Proctor, Lares Carter, Gwyneth Llewelyn, Hydra Shaftoe, Holger Gilruth, Gentle Heron, Carla Broek, Boroondas Gupte, Fury Rosewood, Flower Ducatillon, Colpo Wexler, gwampa Lomu, Borg Capalini, Beansy Twine, Ardy Lay, , 45ms Zhong, Adeon Writer, Aeonix Aeon, Ai Austin, Aiko Ying, Alexandrea Fride, Alliez Mysterio, Annie Milestone, Annika Genezzia, Ansariel Hiller, ArminasX Saiman, Arya Braveheart, Asaeda Meltingdots, Asturkon Jua, Avallyn Oakleaf, Avatar Quinzet, BabyA Littlething, Bacchus Ireto, Bazaar, Riva, Benjamin Bigdipper, Beth Walcher, Bezilon Kasei, Biancaluce Robbiani, Bill Walach, blakopal Galicia, Blitzckreed Levenque, Bryn Oh, Callipygian Christensen, Cap Carver, Carr Arbenlow, Chantal Harvey, Charles Courtois, Charlie Sazaland, Cherry Cheevers, ChickyBabes Zuzu, Christopher Organiser, Ciaran Laval, Clara Young, Celierra Darling, Corinne Helendale, Corro Moseley, Coughdrop Littlething, Darien Caldwell, Dartagan Shepherd, Debs Regent, Decro Schmooz, Denim Kamachi, DiJodi Dubratt, Dil Spitz, Edgware Marker, Egehan Dryke, Emma Portilo, Emmie Fairymeadow, Evangelista Emerald, Faelon Swordthain, Frenchimmo Sabra, Gaberoonie Zanzibar, Ganymedes Costagravas, Gene Frostbite, GeneJ Composer, Giggles Littlebird, Grady Echegaray, Guni Greenstein, Gypsy Tripsa, Hackshaven Harford, Ham Rambler, Han Shuffle, Hanglow Short, Hatzfeld Runo, herina Bode, Horatio Freund, Hypatia Callisto, Hypatia Pickens, Identity Euler, Imnotgoing Sideways, Innula Zenovka, Iyoba Tarantal, Jack Abraham, Jagga Meredith, Jennifer Boyle, Jeremy Marquez, Jessica Qin, Jinx Nordberg, Jo Bernandes, Jocial Sonnenkern, Joel Savard, Jondan Lundquist, Josef Munster, Josette Windlow, Juilan Tripsa, Juro Kothari, Justin RiversRunRed, Kagehi Kohn, Kaimen Takahe, Keklily Longfall, Ken Lavender, Kestral Karas, Khisme Nitely, Kimar Coba, Kithrak Kirkorian, Kitty Barnett, Kolor Fall, Komiko Okamoto, Korvel Noh, Larry Pixel, Leal Choche, len Starship, Lenae Munz, Lexi Frua, Lillie Cordeaux, Lizzy Macarthur, LSL Scientist, Luban Yiyuan, Luc Starsider, Maccus McCullough, Madison Blanc, Maggie Darwin, Mallory Destiny, Manx Wharton, Marc Claridge, Marc2 Sands, Matthew Anthony, Maxim RiversRunRed, Medhue Simoni, Melinda Latynina, Mencius Watts, Michi Lumin, Midian Farspire, Miles Glaz, Mindy Mathy, Mitch Wagner, Mo Hax, Mourna Biziou, Nao Noe, naofan Teardrop, Naomah Beaumont, Nathiel Siamendes, Nber Medici, Neko Link, Netpat Igaly, Neutron Chesnokov, Newfie Pendragon, Nicholai Laviscu, Nick Rhodes, Nicoladie Gymnast, Ollie Kubrick, Orenj Marat, Orion Delphis, Oryx Tempel, Parvati Silverweb, PeterPunk Mooney, Pixel Scientist, Pounce Teazle, Professor Noarlunga, Quantum Destiny, Quicksilver Hermes, Ralf Setsuko, RAT Quan, RedMokum Bravin, Revolution Perenti, Rezit Sideways, Rich Grainger, Rosco Teardrop, Rose Evans, Rudee Voom, RufusTT Horsefly, Saii Hallard, SaintLEOlions Zimer, Samm Larkham, Satanello Miami, SexySteven Morrisey, Sheet Spotter, Shnurui Troughton, sicarius Thorne, Sicarius Toxx, Sini Nubalo, SLB Wirefly, snowy Sidran, Soupa Segura, ST Mensing, Starshine Halasy, Stickman Ingmann, Synystyr Texan, Takeda Terrawyng, Tali Rosca, Templar Merlin, Tezcatlipoca Bisiani, Tiel Stonecutter, Tony Kembia, TouchaHoney Perhaps, Trey Reanimator, TriloByte Zanzibar, Trinity Dechou, Trinity Dejavu, Unlikely Quintessa, UsikuFarasi Kanarik, Veritas Raymaker, Vex Streeter, Viaticus Speculaas, Villain Baroque, Vixie Durant, Void Singer, Watty Berkson, Westley Schridde, Westley Streeter, Whimsy Winx, Winter Ventura, Wundur Primbee, xstorm Radek, YongYong Francois, Zak Westminster, Zana Kohime, Zaren Alexander, Zeja Pyle, ZenMondo Wormser, Zoex Flanagan, and many others. + + + + +"The work goes on, the cause endures, the hope still lives, and the dreams shall never die" - Edward Kennedy </text_editor> </panel> <panel label="Licenser" name="licenses_panel"> diff --git a/indra/newview/skins/default/xui/da/floater_animation_preview.xml b/indra/newview/skins/default/xui/da/floater_animation_preview.xml index fdbfd737ba..adf96841c0 100644 --- a/indra/newview/skins/default/xui/da/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/da/floater_animation_preview.xml @@ -141,35 +141,35 @@ Maksimal animations længde er [MAX_LENGTH] sekunder. Ansigtsudtryk </text> <combo_box label="" name="emote_combo" tool_tip="Angiver hvad ansigtet gør under animationen" width="140"> - <combo_box.item label="(Intet)" name="[None]"/> - <combo_box.item label="Aaaaah" name="Aaaaah"/> - <combo_box.item label="Bange" name="Afraid"/> - <combo_box.item label="Vred" name="Angry"/> - <combo_box.item label="Stort smil" name="BigSmile"/> - <combo_box.item label="Keder sig" name="Bored"/> - <combo_box.item label="Græder" name="Cry"/> - <combo_box.item label="Forarget" name="Disdain"/> - <combo_box.item label="Flov" name="Embarrassed"/> - <combo_box.item label="Skuler" name="Frown"/> - <combo_box.item label="Kysser" name="Kiss"/> - <combo_box.item label="Griner" name="Laugh"/> - <combo_box.item label="Plllppt" name="Plllppt"/> - <combo_box.item label="Frastødt" name="Repulsed"/> - <combo_box.item label="Ked af det" name="Sad"/> - <combo_box.item label="Skuldertræk" name="Shrug"/> - <combo_box.item label="Smil" name="Smile"/> - <combo_box.item label="Overrasket" name="Surprise"/> - <combo_box.item label="Blinker" name="Wink"/> - <combo_box.item label="Bekymret" name="Worry"/> + <item label="(Intet)" name="[None]" value=""/> + <item label="Aaaaah" name="Aaaaah" value="Aaaaah"/> + <item label="Bange" name="Afraid" value="Bange"/> + <item label="Vred" name="Angry" value="Vred"/> + <item label="Stort smil" name="BigSmile" value="Stort smil"/> + <item label="Keder sig" name="Bored" value="Keder sig"/> + <item label="Græder" name="Cry" value="Grædende"/> + <item label="Forarget" name="Disdain" value="Foragt"/> + <item label="Flov" name="Embarrassed" value="Embarrassed"/> + <item label="Skuler" name="Frown" value="Alvorlig"/> + <item label="Kysser" name="Kiss" value="Kys"/> + <item label="Griner" name="Laugh" value="Leende"/> + <item label="Plllppt" name="Plllppt" value="Plllppt"/> + <item label="Frastødt" name="Repulsed" value="Frastødt"/> + <item label="Ked af det" name="Sad" value="Ked af det"/> + <item label="Skuldertræk" name="Shrug" value="Skuldertræk"/> + <item label="Smil" name="Smile" value="Smilende"/> + <item label="Overrasket" name="Surprise" value="Overrasket"/> + <item label="Blinker" name="Wink" value="Blink"/> + <item label="Bekymret" name="Worry" value="Bekymret"/> </combo_box> <text name="preview_label"> Vis mens </text> <combo_box label="" name="preview_base_anim" tool_tip="Se hvordan animation ser ud i forskellige typiske avatar-situationer." width="140"> - <combo_box.item label="StÃ¥ende" name="Standing"/> - <combo_box.item label="GÃ¥ende" name="Walking"/> - <combo_box.item label="Sidder" name="Sitting"/> - <combo_box.item label="Flyver" name="Flying"/> + <item label="StÃ¥ende" name="Standing" value="StÃ¥ende"/> + <item label="GÃ¥ende" name="Walking" value="GÃ¥ende"/> + <item label="Sidder" name="Sitting" value="Siddende"/> + <item label="Flyver" name="Flying" value="Flyvende"/> </combo_box> <spinner label="start (sec)" name="ease_in_time" tool_tip="Tid (i sekunder) animationen bruger pÃ¥ at komme i gang."/> <spinner label="Afslut (sec)" name="ease_out_time" tool_tip="Tid (i sekunder) animationen bruger pÃ¥ at afslutte"/> diff --git a/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml index 94cf4546e3..ffae3d788f 100644 --- a/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Day Cycle Floater" title="DAG CYKLUS OPSÆTNING"> <tab_container name="Day Cycle Tabs"> <panel label="Dag cyklus" name="Day Cycle"> - <button label="?" name="WLDayCycleHelp" /> - <multi_slider label="" name="WLTimeSlider" /> - <multi_slider label="" name="WLDayCycleKeys" /> + <button label="?" name="WLDayCycleHelp"/> + <multi_slider label="" name="WLTimeSlider"/> + <multi_slider label="" name="WLDayCycleKeys"/> <text name="WL12am"> 00:00 </text> @@ -59,39 +59,38 @@ <text name="WL12amHash2"> | </text> - <button label="Tilføj key" label_selected="Tilføj key" name="WLAddKey" /> - <button label="Slet key" label_selected="Slet key" name="WLDeleteKey" /> + <button label="Tilføj key" label_selected="Tilføj key" name="WLAddKey"/> + <button label="Slet key" label_selected="Slet key" name="WLDeleteKey"/> <text name="WLCurKeyFrameText"> Key-frame indstillinger: </text> <text name="WLCurKeyTimeText"> Key tid: </text> - <spinner label="Timer" name="WLCurKeyHour" /> - <spinner label="Min." name="WLCurKeyMin" /> + <spinner label="Timer" name="WLCurKeyHour"/> + <spinner label="Min." name="WLCurKeyMin"/> <text name="WLCurKeyTimeText2"> Key fast indstilling: </text> - <combo_box label="Faste" name="WLKeyPresets" /> + <combo_box label="Faste" name="WLKeyPresets"/> <text name="DayCycleText"> Snap: </text> - <combo_box label="5 min" name="WLSnapOptions" /> + <combo_box label="5 min" name="WLSnapOptions"/> <text name="DayCycleText2"> Cycluslængde: </text> - <spinner label="Timer" name="WLLengthOfDayHour" /> - <spinner label="Min." name="WLLengthOfDayMin" /> - <spinner label="Sek." name="WLLengthOfDaySec" /> + <spinner label="Timer" name="WLLengthOfDayHour"/> + <spinner label="Min." name="WLLengthOfDayMin"/> + <spinner label="Sek." name="WLLengthOfDaySec"/> <text name="DayCycleText3"> - Vis: - </text> - <button label="Afspil" label_selected="Afspil" name="WLAnimSky" /> - <button label="Stop!" label_selected="Stop" name="WLStopAnimSky" /> - <button label="Benyt estate tid" label_selected="GÃ¥ til estate tid" - name="WLUseLindenTime" /> - <button label="Gem test-dag" label_selected="Gem test-dag" name="WLSaveDayCycle" /> - <button label="Hent test-dag" label_selected="Hent test-dag" name="WLLoadDayCycle" /> + Vis : + </text> + <button label="Afspil" label_selected="Afspil" name="WLAnimSky"/> + <button label="Stop!" label_selected="Stop" name="WLStopAnimSky"/> + <button label="Benyt estate tid" label_selected="GÃ¥ til estate tid" name="WLUseLindenTime"/> + <button label="Gem test-dag" label_selected="Gem test-dag" name="WLSaveDayCycle"/> + <button label="Hent test-dag" label_selected="Hent test-dag" name="WLLoadDayCycle"/> </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_god_tools.xml b/indra/newview/skins/default/xui/da/floater_god_tools.xml index 6b7f9ef209..5d3453e327 100644 --- a/indra/newview/skins/default/xui/da/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/da/floater_god_tools.xml @@ -1,11 +1,17 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="godtools floater" title="GOD TOOLS"> <tab_container name="GodTools Tabs"> - <panel label="Grid" name="grid"> - <button label="Spark alle beboere" label_selected="Spark alle beboere" name="Kick all users"/> - </panel> + <panel label="Grid" name="grid"/> <panel label="Region" name="region"> + <text name="Region Name:"> + Region Name: + </text> <check_box label="Reset Home On Teleport" name="check reset home" tool_tip="NÃ¥r beboere teleporterer væk, sÃ¥ sæt deres hjemmeadresse til deres destinations position."/> </panel> + <panel label="Objects" name="objects"> + <text name="Region Name:"> + Region navn: + </text> + </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_image_preview.xml b/indra/newview/skins/default/xui/da/floater_image_preview.xml index 52fd9f80c0..5355127ef5 100644 --- a/indra/newview/skins/default/xui/da/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/da/floater_image_preview.xml @@ -10,16 +10,16 @@ Se billede som: </text> <combo_box label="Tøj type" name="clothing_type_combo"> - <combo_box.item label="Billede" name="Image"/> - <combo_box.item label="HÃ¥r" name="Hair"/> - <combo_box.item label="Kvinde - hoved" name="FemaleHead"/> - <combo_box.item label="Kvinde - overkrop" name="FemaleUpperBody"/> - <combo_box.item label="Kvinde - underkrop" name="FemaleLowerBody"/> - <combo_box.item label="Mand - hoved" name="MaleHead"/> - <combo_box.item label="Mand - overkrop" name="MaleUpperBody"/> - <combo_box.item label="Mand - underkrop" name="MaleLowerBody"/> - <combo_box.item label="Nederdel" name="Skirt"/> - <combo_box.item label="Sculpted Prim" name="SculptedPrim"/> + <item label="Billede" name="Image" value="Billede"/> + <item label="HÃ¥r" name="Hair" value="HÃ¥r"/> + <item label="Kvinde - hoved" name="FemaleHead" value="Hoved - kvinde"/> + <item label="Kvinde - overkrop" name="FemaleUpperBody" value="Overkrop - kvinde"/> + <item label="Kvinde - underkrop" name="FemaleLowerBody" value="Underkrop - kvinde"/> + <item label="Mand - hoved" name="MaleHead" value="Hoved - mand"/> + <item label="Mand - overkrop" name="MaleUpperBody" value="Overkrop - mand"/> + <item label="Mand - underkrop" name="MaleLowerBody" value="Underkrop - mand"/> + <item label="Nederdel" name="Skirt" value="Nederdel"/> + <item label="Sculpted Prim" name="SculptedPrim" value="Sculpted prim"/> </combo_box> <text name="bad_image_text"> Kunne ikke læse billede. diff --git a/indra/newview/skins/default/xui/da/floater_outgoing_call.xml b/indra/newview/skins/default/xui/da/floater_outgoing_call.xml index ef4e22dd8f..a5545668a2 100644 --- a/indra/newview/skins/default/xui/da/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/da/floater_outgoing_call.xml @@ -28,7 +28,7 @@ Du er blevet koblet af fra [VOICE_CHANNEL_NAME]. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_other"> - [VOICE_CHANNEL_NAME] har afsluttet opkaldet. [RECONNECT_NEARBY] + Dit kald er afsluttet. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_agent"> Du har afsluttet opkaldet. [RECONNECT_NEARBY] diff --git a/indra/newview/skins/default/xui/da/floater_snapshot.xml b/indra/newview/skins/default/xui/da/floater_snapshot.xml index 6140055d74..7f7fb8ddf0 100644 --- a/indra/newview/skins/default/xui/da/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/da/floater_snapshot.xml @@ -1,79 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="FOTO FORHÃ…NDSVINSNING"> - <text name="type_label"> - Hvor skal foto hen? - </text> - <radio_group label="Snapshot type" name="snapshot_type_radio"> - <radio_item label="Email" name="postcard"/> - <radio_item label="Min beholdning (L$[AMOUNT])" name="texture"/> - <radio_item label="Gem pÃ¥ min computer" name="local"/> - </radio_group> - <text name="file_size_label"> - [SIZE] KB - </text> - <button label="Tag nyt foto" name="new_snapshot_btn"/> - <button label="Send" name="send_btn"/> - <button label="Gem (L$[AMOUNT])" name="upload_btn"/> - <flyout_button label="Gem" name="save_btn" tool_tip="Gem billede i pÃ¥ din computer"> - <flyout_button_item label="Gem" name="save_item"/> - <flyout_button_item label="Gem som..." name="saveas_item"/> - </flyout_button> - <button label="Annullér" name="discard_btn"/> - <button label="Mere" name="more_btn" tool_tip="Avancerede muligheder"/> - <button label="Mindre" name="less_btn" tool_tip="Avancerede muligheder"/> - <text name="type_label2"> - Størrelse - </text> - <text name="format_label"> - Format - </text> - <combo_box label="Opløsning" name="postcard_size_combo"> - <combo_box.item label="Aktuelle vindue" name="CurrentWindow"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="Manuel" name="Custom"/> - </combo_box> - <combo_box label="Opløsning" name="texture_size_combo"> - <combo_box.item label="Aktuelle vindue" name="CurrentWindow"/> - <combo_box.item label="Lille (128x128)" name="Small(128x128)"/> - <combo_box.item label="Medium (256x256)" name="Medium(256x256)"/> - <combo_box.item label="Stor (512x512)" name="Large(512x512)"/> - <combo_box.item label="Manuel" name="Custom"/> - </combo_box> - <combo_box label="Opløsning" name="local_size_combo"> - <combo_box.item label="Aktuelle vindue" name="CurrentWindow"/> - <combo_box.item label="320x240" name="320x240"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="1280x1024" name="1280x1024"/> - <combo_box.item label="1600x1200" name="1600x1200"/> - <combo_box.item label="Manuelt" name="Custom"/> - </combo_box> - <combo_box label="Fil-format" name="local_format_combo" width="76"> - <combo_box.item label="PNG" name="PNG"/> - <combo_box.item label="JPEG" name="JPEG"/> - <combo_box.item label="BMP" name="BMP"/> - </combo_box> - <spinner label="Bredde" label_width="41" name="snapshot_width" width="101"/> - <spinner label="Højde" label_width="32" left="117" name="snapshot_height" width="92"/> - <check_box label="Fasthold proportioner" name="keep_aspect_check"/> - <slider label="Billedkvalitet" name="image_quality_slider"/> - <text name="layer_type_label"> - Benyt: - </text> - <combo_box label="Billedlag" name="layer_types"> - <combo_box.item label="Farver" name="Colors"/> - <combo_box.item label="Dybde" name="Depth"/> - <combo_box.item label="Materinger" name="ObjectMattes"/> - </combo_box> - <check_box label="Snitflade" name="ui_check"/> - <check_box label="HUDs" name="hud_check"/> - <check_box label="Luk ikke vindue ved gemning" name="keep_open_check"/> - <check_box label="Fastfrys (fuldt billede)" name="freeze_frame_check"/> - <check_box label="Auto-opdater" name="auto_snapshot_check"/> - <string name="unknown"> +<floater name="Snapshot" title="Foto"> + <floater.string name="unknown"> ukendt - </string> + </floater.string> + <button label="Tag nyt foto" name="new_snapshot_btn"/> + <line_editor label="Beskrivelse" name="description"/> + <button label="Del foto" name="share"/> + <button label="Del pÃ¥ internettet" name="share_to_web"/> + <button label="Gem til beholdning" name="save_to_inventory"/> + <button label="Gem foto" name="save"/> + <button label="Email foto" name="share_to_email"/> + <button label="Gem pÃ¥ computer" name="save_to_computer"/> + <button label="Sæt som profil billede" name="set_profile_pic"/> + <button label="Tilbage" name="cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_tools.xml b/indra/newview/skins/default/xui/da/floater_tools.xml index a39a7e8698..b501722e92 100644 --- a/indra/newview/skins/default/xui/da/floater_tools.xml +++ b/indra/newview/skins/default/xui/da/floater_tools.xml @@ -67,7 +67,10 @@ <text name="RenderingCost" tool_tip="Hvis beregnede rendering omkostninger for dette objekt"> þ: [COUNT] </text> - <check_box label="Stræk begge sider" name="checkbox uniform"/> + <check_box name="checkbox uniform"/> + <text name="checkbox uniform label"> + Stræk begge sider + </text> <check_box initial_value="true" label="Stræk teksturer" name="checkbox stretch textures"/> <check_box initial_value="true" label="Benyt gitter" name="checkbox snap to grid"/> <combo_box name="combobox grid mode" tool_tip="Vælg hvilken type lineal der skal bruges til positionering af objekt"> diff --git a/indra/newview/skins/default/xui/da/floater_tos.xml b/indra/newview/skins/default/xui/da/floater_tos.xml index c87fe8162f..760f60c996 100644 --- a/indra/newview/skins/default/xui/da/floater_tos.xml +++ b/indra/newview/skins/default/xui/da/floater_tos.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="modal container" title=""> + <floater.string name="real_url"> + http://secondlife.com/app/tos/ + </floater.string> + <floater.string name="loading_url"> + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + </floater.string> <button label="Fortsæt" label_selected="Fortsæt" name="Continue"/> <button label="Annullér" label_selected="Annullér" name="Cancel"/> <check_box label="Jeg er enig med "Terms of Service and Privacy Policy"" name="agree_chk"/> <text name="tos_heading"> Læs venligst følgende "Terms of Service and Privacy Policy" grundigt. For at fortsætte med at logge pÃ¥ [SECOND_LIFE], skal du acceptere aftale. </text> - <text_editor name="tos_text"> - TOS_TEXT - </text_editor> - <string name="real_url"> - http://secondlife.com/app/tos/ - </string> </floater> diff --git a/indra/newview/skins/default/xui/da/menu_attachment_other.xml b/indra/newview/skins/default/xui/da/menu_attachment_other.xml index 2cc23e27c7..ca7b184942 100644 --- a/indra/newview/skins/default/xui/da/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/da/menu_attachment_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Rapportér" name="abuse"/> <menu_item_call label="Frys" name="Freeze..."/> <menu_item_call label="Smid ud" name="Eject..."/> - <menu_item_call label="Debug" name="Debug..."/> + <menu_item_call label="Debug teksturer" name="Debug..."/> <menu_item_call label="Zoom ind" name="Zoom In"/> <menu_item_call label="Betal" name="Pay..."/> <menu_item_call label="Objekt profil" name="Object Inspect"/> diff --git a/indra/newview/skins/default/xui/da/menu_attachment_self.xml b/indra/newview/skins/default/xui/da/menu_attachment_self.xml index 306ae96d49..d8bd78fa23 100644 --- a/indra/newview/skins/default/xui/da/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/da/menu_attachment_self.xml @@ -9,4 +9,5 @@ <menu_item_call label="Venner" name="Friends..."/> <menu_item_call label="Grupper" name="Groups..."/> <menu_item_call label="Profil" name="Profile..."/> + <menu_item_call label="Debug teksturer" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/da/menu_avatar_other.xml b/indra/newview/skins/default/xui/da/menu_avatar_other.xml index 66d357e7e2..a778dedf0b 100644 --- a/indra/newview/skins/default/xui/da/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/da/menu_avatar_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Rapportér" name="abuse"/> <menu_item_call label="Frys" name="Freeze..."/> <menu_item_call label="Smid ud" name="Eject..."/> - <menu_item_call label="Debug" name="Debug..."/> + <menu_item_call label="Debug Teksturer" name="Debug..."/> <menu_item_call label="Zoom ind" name="Zoom In"/> <menu_item_call label="Betal" name="Pay..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/da/menu_avatar_self.xml b/indra/newview/skins/default/xui/da/menu_avatar_self.xml index 6a6831c2e3..39f3e49702 100644 --- a/indra/newview/skins/default/xui/da/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/da/menu_avatar_self.xml @@ -24,4 +24,5 @@ <menu_item_call label="Venner" name="Friends..."/> <menu_item_call label="Grupper" name="Groups..."/> <menu_item_call label="Profil" name="Profile..."/> + <menu_item_call label="Debug teksturer" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/da/menu_edit.xml b/indra/newview/skins/default/xui/da/menu_edit.xml new file mode 100644 index 0000000000..3752f42b1c --- /dev/null +++ b/indra/newview/skins/default/xui/da/menu_edit.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu label="Redigér" name="Edit"> + <menu_item_call label="Fortryd" name="Undo"/> + <menu_item_call label="Gendan" name="Redo"/> + <menu_item_call label="Klip" name="Cut"/> + <menu_item_call label="Kopiér" name="Copy"/> + <menu_item_call label="Sæt ind" name="Paste"/> + <menu_item_call label="Slet" name="Delete"/> + <menu_item_call label="Duplikér" name="Duplicate"/> + <menu_item_call label="Marker alt" name="Select All"/> + <menu_item_call label="Fjern markering" name="Deselect"/> +</menu> diff --git a/indra/newview/skins/default/xui/da/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/da/menu_inspect_avatar_gear.xml index 7434f2c3a2..89111d49f1 100644 --- a/indra/newview/skins/default/xui/da/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/da/menu_inspect_avatar_gear.xml @@ -11,7 +11,7 @@ <menu_item_call label="Rapportér" name="report"/> <menu_item_call label="Frys" name="freeze"/> <menu_item_call label="Smid ud" name="eject"/> - <menu_item_call label="Debug" name="debug"/> + <menu_item_call label="Debug teksturer" name="debug"/> <menu_item_call label="Find pÃ¥ kort" name="find_on_map"/> <menu_item_call label="Zoom ind" name="zoom_in"/> <menu_item_call label="Betal" name="pay"/> diff --git a/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml index cfe455e21d..aeef2ccb23 100644 --- a/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml @@ -5,4 +5,5 @@ <menu_item_call label="Profil" name="my_profile"/> <menu_item_call label="Venner" name="my_friends"/> <menu_item_call label="Grupper" name="my_groups"/> + <menu_item_call label="Debug teksturer" name="Debug..."/> </menu> diff --git a/indra/newview/skins/default/xui/da/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/da/menu_inv_offer_chiclet.xml new file mode 100644 index 0000000000..c3b03232bf --- /dev/null +++ b/indra/newview/skins/default/xui/da/menu_inv_offer_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="InvOfferChiclet Menu"> + <menu_item_call label="Luk" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/da/menu_inventory.xml b/indra/newview/skins/default/xui/da/menu_inventory.xml index cdfcad9b1c..0ea21dc409 100644 --- a/indra/newview/skins/default/xui/da/menu_inventory.xml +++ b/indra/newview/skins/default/xui/da/menu_inventory.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> + <menu_item_call label="Del" name="Share"/> <menu_item_call label="Køb" name="Task Buy"/> <menu_item_call label="Ã¥ben" name="Task Open"/> <menu_item_call label="Afspil" name="Task Play"/> diff --git a/indra/newview/skins/default/xui/da/menu_login.xml b/indra/newview/skins/default/xui/da/menu_login.xml index 7fc7d43c20..36e82e8bc4 100644 --- a/indra/newview/skins/default/xui/da/menu_login.xml +++ b/indra/newview/skins/default/xui/da/menu_login.xml @@ -6,19 +6,10 @@ </menu> <menu label="Hjælp" name="Help"> <menu_item_call label="[SECOND_LIFE] hjælp" name="Second Life Help"/> + <menu_item_call label="Om [APP_NAME]" name="About Second Life"/> </menu> + <menu_item_check label="Vis debug menu" name="Show Debug Menu"/> <menu label="Debug" name="Debug"> - <menu label="Redigér" name="Edit"> - <menu_item_call label="Fortryd" name="Undo"/> - <menu_item_call label="Gendan" name="Redo"/> - <menu_item_call label="Klip" name="Cut"/> - <menu_item_call label="Kopiér" name="Copy"/> - <menu_item_call label="Sæt ind" name="Paste"/> - <menu_item_call label="Slet" name="Delete"/> - <menu_item_call label="Duplikér" name="Duplicate"/> - <menu_item_call label="Vælg alle" name="Select All"/> - <menu_item_call label="Vælg intet" name="Deselect"/> - </menu> <menu_item_call label="Vis debug opsætning" name="Debug Settings"/> <menu_item_call label="UI/farve opsætning" name="UI/Color Settings"/> <menu label="UI tests" name="UI Tests"/> @@ -26,5 +17,7 @@ <menu_item_call label="Vis betingelser" name="TOS"/> <menu_item_call label="Vis vigtig besked" name="Critical"/> <menu_item_call label="Test i web browser" name="Web Browser Test"/> + <menu_item_check label="Vis gitter vælger" name="Show Grid Picker"/> + <menu_item_call label="Vis notifikationskonsol" name="Show Notifications Console"/> </menu> </menu_bar> diff --git a/indra/newview/skins/default/xui/da/menu_participant_list.xml b/indra/newview/skins/default/xui/da/menu_participant_list.xml index c2595dcb3d..02b7e8466b 100644 --- a/indra/newview/skins/default/xui/da/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/da/menu_participant_list.xml @@ -8,6 +8,7 @@ <menu_item_call label="Opkald" name="Call"/> <menu_item_call label="Del" name="Share"/> <menu_item_call label="Betal" name="Pay"/> + <menu_item_check label="Se person ikoner" name="View Icons"/> <menu_item_check label="Blokér stemme" name="Block/Unblock"/> <menu_item_check label="Blokér tekst" name="MuteText"/> <context_menu label="Moderator muligheder >" name="Moderator Options"> diff --git a/indra/newview/skins/default/xui/da/menu_save_outfit.xml b/indra/newview/skins/default/xui/da/menu_save_outfit.xml new file mode 100644 index 0000000000..3d89715ea8 --- /dev/null +++ b/indra/newview/skins/default/xui/da/menu_save_outfit.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<toggleable_menu name="save_outfit_menu"> + <menu_item_call label="Gem" name="save_outfit"/> + <menu_item_call label="Gem som ny" name="save_as_new_outfit"/> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/da/menu_script_chiclet.xml b/indra/newview/skins/default/xui/da/menu_script_chiclet.xml new file mode 100644 index 0000000000..cdd3212373 --- /dev/null +++ b/indra/newview/skins/default/xui/da/menu_script_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="ScriptChiclet Menu"> + <menu_item_call label="Luk" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index be57f88e8a..e195ebfeed 100644 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -29,6 +29,7 @@ <menu_item_call label="Foto" name="Take Snapshot"/> <menu_item_call label="Opret landemærke for dette sted" name="Create Landmark Here"/> <menu label="Profil for sted" name="Land"> + <menu_item_call label="Profil for sted" name="Place Profile"/> <menu_item_call label="Om land" name="About Land"/> <menu_item_call label="Region/Estate" name="Region/Estate"/> </menu> @@ -64,17 +65,6 @@ <menu_item_call label="Byg værktøj" name="Create"/> <menu_item_call label="Land værktøj" name="Land"/> </menu> - <menu label="Redigér" name="Edit"> - <menu_item_call label="Fortryd" name="Undo"/> - <menu_item_call label="Gendan" name="Redo"/> - <menu_item_call label="Klip" name="Cut"/> - <menu_item_call label="Kopiér" name="Copy"/> - <menu_item_call label="Sæt ind" name="Paste"/> - <menu_item_call label="Slet" name="Delete"/> - <menu_item_call label="Duplikér" name="Duplicate"/> - <menu_item_call label="Vælg alt" name="Select All"/> - <menu_item_call label="Fravælg" name="Deselect"/> - </menu> <menu_item_call label="Sammenkæd" name="Link"/> <menu_item_call label="Adskil" name="Unlink"/> <menu_item_check label="Redigér sammekædede objekter" name="Edit Linked Parts"/> @@ -122,6 +112,7 @@ <menu_item_call label="Om [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avanceret" name="Advanced"> + <menu_item_check label="Vis avanceret menu" name="Show Advanced Menu"/> <menu_item_call label="Stop animering af min avatar" name="Stop Animating My Avatar"/> <menu_item_call label="Gendan teksturer" name="Rebake Texture"/> <menu_item_call label="Sæt UI størrelse til standard" name="Set UI Size to Default"/> @@ -143,7 +134,6 @@ <menu_item_check label="Fremhæv gennemsigtigt" name="Highlight Transparent"/> <menu_item_check label="Vis HUD vedhæftninger" name="Show HUD Attachments"/> <menu_item_check label="Vis muse-sigte" name="ShowCrosshairs"/> - <menu_item_check label="Vis tips om land" name="Land Tips"/> </menu> <menu label="Gengivelsestyper" name="Rendering Types"> <menu_item_check label="Simpel" name="Simple"/> @@ -169,7 +159,7 @@ <menu_item_check label="TÃ¥ge" name="Fog"/> <menu_item_check label="Fleksible objekter" name="Flexible Objects"/> </menu> - <menu_item_check label="Kør flere 'threats'" name="Run Multiple Threads"/> + <menu_item_check label="Kør flere 'threats'" name="Run Multiple Threads"/> <menu_item_call label="Tøm gruppe cache" name="ClearGroupCache"/> <menu_item_check label="Muse udjævning" name="Mouse Smoothing"/> <menu label="Shortcuts" name="Shortcuts"> diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index 30e19ee901..afccc1e904 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -224,6 +224,9 @@ Er du sikker pÃ¥ at du vil fortsætte? Ikke nok penge til at oprette annonce. <usetemplate name="okbutton" yestext="OK"/> </notification> + <notification name="DeleteAvatarPick"> + Slet favorit <nolink>[PICK]</nolink>? + </notification> <notification name="CacheWillClear"> Cache vil blive tømt ved næste genstart af [APP_NAME]. </notification> @@ -391,6 +394,16 @@ Tilbyd venskab til [NAME]? <button name="Cancel" text="Annullér"/> </form> </notification> + <notification label="Gem sæt" name="SaveOutfitAs"> + Gem det som jeg har pÃ¥ som nyt sæt: + <form name="form"> + <input name="message"> + [DESC] (ny) + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Annullér"/> + </form> + </notification> <notification name="ErrorMessage"> <usetemplate name="okbutton" yestext="OK"/> </notification> @@ -584,6 +597,10 @@ Chat og personlige beskeder vil blive skjult. Personlige beskeder vil fÃ¥ din &a Teleport til [CLASSIFIED]? <usetemplate ignoretext="Bekræft at du ønsker at teleportere til lokation in annoncer" name="okcancelignore" notext="Annullér" yestext="Teleport"/> </notification> + <notification name="TeleportToHistoryEntry"> + Teleport til [HISTORY_ENTRY]? + <usetemplate ignoretext="Bekræft at du ønsker at teleportere til en lokation i din historik" name="okcancelignore" notext="Annullér" yestext="Teleport"/> + </notification> <notification label="Change Linden Estate" name="ChangeLindenEstate"> Du er i færd med at ændre et Linden ejet estate (mainland, teeen grid, orientation etc.). @@ -619,6 +636,9 @@ Du kan klikke pÃ¥ 'Ændre præference' for at ændre din indholdsratin <ignore name="ignore" text="Din valgte indholdsrating forhindrer dig i at kommer til en region"/> </form> </notification> + <notification name="PreferredMaturityChanged"> + Din indholdsrating er nu [RATING]. + </notification> <notification name="LandClaimAccessBlocked"> Du kan ikke kræve dette land pÃ¥ grund af din nuværende indholdsrating indstillinge . Dette kan skyldes manglende validering af din alder. @@ -813,6 +833,9 @@ Henvis til dette fra en hjemmeside for at give andre nem adgang til denne lokati <notification name="SystemMessageTip"> [MESSAGE] </notification> + <notification name="IMSystemMessageTip"> + [MESSAGE] + </notification> <notification name="Cancelled"> Annulléret </notification> @@ -838,6 +861,11 @@ Henvis til dette fra en hjemmeside for at give andre nem adgang til denne lokati Uploader billeder fra verdenen og www... (Tager omkring 5 minutter.) </notification> + <notification name="UploadConfirmation"> + Omkostninger ved at sende: L$[AMOUNT]. +Ønsker du at fortsætte? + <usetemplate name="okcancelbuttons" notext="Annullér" yestext="Send"/> + </notification> <notification name="UploadPayment"> Du betalte L$[AMOUNT] for at uploade. </notification> @@ -1180,9 +1208,9 @@ Prøv igen om lidt. </form> </notification> <notification name="TeleportOffered"> - [NAME] har tilbudt dig en teleport til lokationen: + [NAME_SLURL] har tilbudt en teleport til deres lokation: -[MESSAGE] +[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> <form name="form"> <button name="Teleport" text="Teleportér"/> <button name="Cancel" text="Annullér"/> @@ -1200,9 +1228,11 @@ Prøv igen om lidt. </form> </notification> <notification name="OfferFriendship"> - [NAME] tilbyder venskab. + [NAME_SLURL] tilbyder venskab. -Som standard vil du kunne se andres onlinestatus. +[MESSAGE] + +(Som udgangspunkt vil I være i stand til at se hinandens online status.) <form name="form"> <button name="Accept" text="Acceptér"/> <button name="Decline" text="Afvis"/> @@ -1256,6 +1286,9 @@ Fra genstand: [OBJECTNAME], ejer: [NAME]? <notification name="FailedToFindWearable"> Det lykkedes ikke at finde [TYPE] med navnet [DESC] i databasen. </notification> + <notification name="ShareToWebFailed"> + Fejl ved afsendelse af billede til web. + </notification> <notification name="InvalidWearable"> Den genstand du prøver at tage pÃ¥ benytter en funktion din klient ikke kan forstÃ¥. Upgradér venligst din version af [APP_NAME] for at kunne tage denne genstand pÃ¥. </notification> @@ -1451,6 +1484,12 @@ De vil blive blokeret nogle fÃ¥ sekunder af sikkerhedsmæssige Ã¥rsager. Den valgte knap kan ikke vises lige nu. Knappen vil blive vist nÃ¥r der er nok plads til den. </notification> + <notification name="ShareNotification"> + Træk genstande fra beholdning til en person i beboer vælgeren + </notification> + <notification name="AvatarRezNotification"> + Avatar '[NAME]' rezzed pÃ¥ [TIME] sekunder. + </notification> <global name="UnsupportedGLRequirements"> Det ser ikke ud til at din hardware opfylder minimumskravene til [APP_NAME]. [APP_NAME] kræver et OpenGL grafikkort som understøter 'multitexture'. Check eventuelt om du har de nyeste drivere for grafikkortet, og de nyeste service-packs og patches til dit operativsystem. diff --git a/indra/newview/skins/default/xui/da/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/da/outfit_accordion_tab.xml new file mode 100644 index 0000000000..e2d1f26d42 --- /dev/null +++ b/indra/newview/skins/default/xui/da/outfit_accordion_tab.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> +<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume--> +<accordion_tab name="Mockup Tab" title="Model fane"/> diff --git a/indra/newview/skins/default/xui/da/panel_edit_eyes.xml b/indra/newview/skins/default/xui/da/panel_edit_eyes.xml index 9c0d77c370..d801118cea 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_eyes.xml @@ -3,7 +3,9 @@ <panel name="avatar_eye_color_panel"> <texture_picker label="Iris" name="Iris" tool_tip="Klik for at vælge billede"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="eyes_main_tab" title="Øjne"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="eyes_main_tab" title="Øjne"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_gloves.xml b/indra/newview/skins/default/xui/da/panel_edit_gloves.xml index 1d3ba061bc..837abdac80 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_gloves.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge bilede"/> <color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="gloves_main_tab" title="Handsker"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="gloves_main_tab" title="Handsker"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_hair.xml b/indra/newview/skins/default/xui/da/panel_edit_hair.xml index 14511d51d5..e91e6324e8 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_hair.xml @@ -3,10 +3,12 @@ <panel name="avatar_hair_color_panel"> <texture_picker label="Tekstur" name="Texture" tool_tip="Klik for at vælge et billede"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="hair_color_tab" title="Farve"/> - <accordion_tab name="hair_style_tab" title="Stil"/> - <accordion_tab name="hair_eyebrows_tab" title="Øjenbryn"/> - <accordion_tab name="hair_facial_tab" title="Skæg"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="hair_color_tab" title="Farve"/> + <accordion_tab name="hair_style_tab" title="Stil"/> + <accordion_tab name="hair_eyebrows_tab" title="Øjenbryn"/> + <accordion_tab name="hair_facial_tab" title="Ansigt"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_jacket.xml b/indra/newview/skins/default/xui/da/panel_edit_jacket.xml index 4c9973c0bd..62934e96c8 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_jacket.xml @@ -5,7 +5,9 @@ <texture_picker label="Stof forneden" name="Lower Fabric" tool_tip="Klik for at vælge et billede"/> <color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="jacket_main_tab" title="Jakke"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="jacket_main_tab" title="Jakke"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_pants.xml b/indra/newview/skins/default/xui/da/panel_edit_pants.xml index bcb1450258..36a9bc60a9 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_pants.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et bilede"/> <color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="pants_main_tab" title="Bukser"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="pants_main_tab" title="Bukser"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_shape.xml b/indra/newview/skins/default/xui/da/panel_edit_shape.xml index 19c27748ca..1c8567d27c 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_shape.xml @@ -9,15 +9,17 @@ <radio_item label="Mand" name="radio2"/> </radio_group> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shape_body_tab" title="Krop"/> - <accordion_tab name="shape_head_tab" title="Hoved"/> - <accordion_tab name="shape_eyes_tab" title="Øjne"/> - <accordion_tab name="shape_ears_tab" title="Ører"/> - <accordion_tab name="shape_nose_tab" title="Næse"/> - <accordion_tab name="shape_mouth_tab" title="Mund"/> - <accordion_tab name="shape_chin_tab" title="Hage"/> - <accordion_tab name="shape_torso_tab" title="Overkrop"/> - <accordion_tab name="shape_legs_tab" title="Ben"/> - </accordion> + <panel label="Trøje" name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shape_body_tab" title="Krop"/> + <accordion_tab name="shape_head_tab" title="Hoved"/> + <accordion_tab name="shape_eyes_tab" title="Øjne"/> + <accordion_tab name="shape_ears_tab" title="Ører"/> + <accordion_tab name="shape_nose_tab" title="Næse"/> + <accordion_tab name="shape_mouth_tab" title="Mund"/> + <accordion_tab name="shape_chin_tab" title="Hage"/> + <accordion_tab name="shape_torso_tab" title="Overkrop"/> + <accordion_tab name="shape_legs_tab" title="Ben"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_shirt.xml b/indra/newview/skins/default/xui/da/panel_edit_shirt.xml index cd2e8d8cb3..e49667dc8f 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_shirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/> <color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shirt_main_tab" title="Trøje"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shirt_main_tab" title="Trøje"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_shoes.xml b/indra/newview/skins/default/xui/da/panel_edit_shoes.xml index 54a0cc01a4..00d31da95a 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_shoes.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/> <color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shoes_main_tab" title="Sko"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shoes_main_tab" title="Shoes"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_skin.xml b/indra/newview/skins/default/xui/da/panel_edit_skin.xml index 46dce354a9..608e1d6e0b 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_skin.xml @@ -5,10 +5,12 @@ <texture_picker label="Øvre tatoveringer" name="Upper Tattoos" tool_tip="Klik for at vælge et bilede"/> <texture_picker label="Nedre tatoveringer" name="Lower Tattoos" tool_tip="Klik for at vælge et bilede"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skin_color_tab" title="Hudfarve"/> - <accordion_tab name="skin_face_tab" title="Ansigtsdetaljer"/> - <accordion_tab name="skin_makeup_tab" title="Makeup"/> - <accordion_tab name="skin_body_tab" title="Kropsdetaljer"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skin_color_tab" title="Hudfarve"/> + <accordion_tab name="skin_face_tab" title="Ansigtsdetaljer"/> + <accordion_tab name="skin_makeup_tab" title="Makeup"/> + <accordion_tab name="skin_body_tab" title="Kropsdetaljer"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_skirt.xml b/indra/newview/skins/default/xui/da/panel_edit_skirt.xml index 4407c87d36..44a5beca45 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_skirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/> <color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skirt_main_tab" title="Nederdel"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skirt_main_tab" title="Nederdel"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_socks.xml b/indra/newview/skins/default/xui/da/panel_edit_socks.xml index 6ef6dad86c..b7abd9d1a0 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_socks.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/> <color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="socks_main_tab" title="Strømper"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="socks_main_tab" title="Strømper"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_underpants.xml b/indra/newview/skins/default/xui/da/panel_edit_underpants.xml index de52146e29..32596be57b 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_underpants.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge bilede"/> <color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="underpants_main_tab" title="Underbukser"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="underpants_main_tab" title="Underbukser"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml index 6c2e1f5833..14cf79b97f 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge bilede"/> <color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="undershirt_main_tab" title="Undertrøje"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="undershirt_main_tab" title="Undertrøje"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_wearable.xml b/indra/newview/skins/default/xui/da/panel_edit_wearable.xml index 12bc120c45..4afb7ba45c 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_wearable.xml @@ -94,6 +94,11 @@ <panel label="Trøje" name="wearable_type_panel"> <text name="description_text" value="Kropsbygning:"/> </panel> + <panel label="gear_buttom_panel" name="gear_buttom_panel"> + <button name="friends_viewsort_btn" tool_tip="Valg"/> + <button name="add_btn" tool_tip="TODO"/> + <button name="del_btn" tool_tip="TODO"/> + </panel> <panel name="button_panel"> <button label="Gem som" name="save_as_button"/> <button label="Vend tilbage" name="revert_button"/> diff --git a/indra/newview/skins/default/xui/da/panel_group_general.xml b/indra/newview/skins/default/xui/da/panel_group_general.xml index becb5ab70a..3079a23d20 100644 --- a/indra/newview/skins/default/xui/da/panel_group_general.xml +++ b/indra/newview/skins/default/xui/da/panel_group_general.xml @@ -45,8 +45,11 @@ <check_box label="Tilmeldingsgebyr" name="check_enrollment_fee" tool_tip="Angiver om der kræves et gebyr, for at tilmelde sig gruppen"/> <spinner label="L$" left_delta="130" name="spin_enrollment_fee" tool_tip="Nye medlemmer skal betale dette gebyr for at tilmelde sig gruppen, nÃ¥r "Tilmeldingsgebyr" er valgt." width="60"/> <combo_box name="group_mature_check" tool_tip="Angiver om din gruppes information anses som 'mature'." width="150"> - <combo_box.item label="PG indhold" name="pg"/> + <combo_item name="select_mature"> + - Vælg Mature - + </combo_item> <combo_box.item label="Mature indhold" name="mature"/> + <combo_box.item label="PG indhold" name="pg"/> </combo_box> <check_box initial_value="true" label="Vis i søgning" name="show_in_group_list" tool_tip="Lad folk se denne gruppe i søgeresultater."/> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_im_control_panel.xml b/indra/newview/skins/default/xui/da/panel_im_control_panel.xml index be9bfab1f6..5cecb93d40 100644 --- a/indra/newview/skins/default/xui/da/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/da/panel_im_control_panel.xml @@ -20,7 +20,7 @@ <button label="Opkald" name="call_btn"/> </layout_panel> <layout_panel name="end_call_btn_panel"> - <button label="Forlad opkald" name="end_call_btn"/> + <button label="Afslut kald" name="end_call_btn"/> </layout_panel> <layout_panel name="voice_ctrls_btn_panel"> <button label="Stemme kontroller" name="voice_ctrls_btn"/> diff --git a/indra/newview/skins/default/xui/da/panel_inventory_item.xml b/indra/newview/skins/default/xui/da/panel_inventory_item.xml new file mode 100644 index 0000000000..d18047fbcf --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_inventory_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="inventory_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/da/panel_media_settings_permissions.xml index 70570920cd..84468eb2a7 100644 --- a/indra/newview/skins/default/xui/da/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/da/panel_media_settings_permissions.xml @@ -11,10 +11,19 @@ Mini </combo_item> </combo_box> + <text name="owner_label"> + Ejer + </text> <check_box initial_value="false" label="Tillad navigation og interaktion" name="perms_owner_interact"/> <check_box initial_value="false" label="Vis kontrol bjælke" name="perms_owner_control"/> + <text name="group_label"> + Gruppe: + </text> <check_box initial_value="false" label="Tillad navigation og interaktion" name="perms_group_interact"/> <check_box initial_value="false" label="Vis kontrol bjælke" name="perms_group_control"/> + <text name="anyone_label"> + Enhver + </text> <check_box initial_value="false" label="Tillad navigation og interaktion" name="perms_anyone_interact"/> <check_box initial_value="false" label="Vis kontrol bjælke" name="perms_anyone_control"/> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_nearby_media.xml b/indra/newview/skins/default/xui/da/panel_nearby_media.xml index 7a8b5a6389..95bfc89f20 100644 --- a/indra/newview/skins/default/xui/da/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/da/panel_nearby_media.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> + <string name="media_item_count_format"> + (%ld media items) + </string> <string name="empty_item_text"> <tom> </string> @@ -16,15 +19,10 @@ <button label="Stop alt" name="all_nearby_media_disable_btn" tool_tip="Stop al media tæt pÃ¥"/> <button label="Start alt" name="all_nearby_media_enable_btn" tool_tip="Tænd al media tæt pÃ¥"/> <button name="open_prefs_btn" tool_tip="Vis media preferencer"/> - <button label="Mere >>" label_selected="Mindre <<" name="more_less_btn" tool_tip="Avanceret opsætning"/> + <button label="Mere >>" label_selected="Mindre <<" name="more_btn" tool_tip="Advancerede kontroller"/> + <button label="Mere >>" label_selected="Mindre <<" name="less_btn" tool_tip="Advancerede kontroller"/> </panel> <panel name="nearby_media_panel"> - <text name="nearby_media"> - Media i nærheden - </text> - <text name="show"> - Vis: - </text> <combo_box name="show_combo"> <combo_box.item label="Overalt" name="All"/> <combo_box.item label="PÃ¥ dette sted" name="WithinParcel"/> @@ -38,7 +36,7 @@ <scroll_list.columns label="Navn" name="media_name"/> <scroll_list.columns label="Debug" name="media_debug"/> </scroll_list> - <panel name="media_controls_panel"> + <panel> <layout_stack name="media_controls"> <layout_panel name="stop"> <button name="stop_btn" tool_tip="Stop valgte medie"/> @@ -47,16 +45,16 @@ <button name="play_btn" tool_tip="Afspil valgte medie"/> </layout_panel> <layout_panel name="pause"> - <button name="pause_btn" tool_tip="Pause valgte medie"/> + <button name="pause_btn" tool_tip="Pause valgt medie"/> </layout_panel> <layout_panel name="volume_slider_ctrl"> - <slider_bar initial_value="0.5" name="volume_slider" tool_tip="Volumen for valgte medie"/> + <slider_bar initial_value="0.5" name="volume_slider" tool_tip="Lydstyrke for valgte medie"/> </layout_panel> <layout_panel name="mute"> - <button name="mute_btn" tool_tip="Sluk for lyd for valgte medie"/> + <button name="mute_btn" tool_tip="Sluk lyd fra valgte medie"/> </layout_panel> <layout_panel name="zoom"> - <button name="zoom_btn" tool_tip="Zoom ind til valgte medie"/> + <button name="zoom_btn" tool_tip="Zoom til valgte medie"/> </layout_panel> <layout_panel name="unzoom"> <button name="unzoom_btn" tool_tip="Zoom tilbage fra valgte medie"/> diff --git a/indra/newview/skins/default/xui/da/panel_outfit_edit.xml b/indra/newview/skins/default/xui/da/panel_outfit_edit.xml new file mode 100644 index 0000000000..de68366610 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_outfit_edit.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- Side tray Outfit Edit panel --> +<panel label="Redigér sæt" name="outfit_edit"> + <string name="No Outfit" value="Intet sæt"/> + <panel.string name="not_available"> + (Ikke relevant) + </panel.string> + <panel.string name="unknown"> + (ukendt) + </panel.string> + <string name="Filter.All" value="Alle"/> + <string name="Filter.Clothes/Body" value="Tøj/Krop"/> + <string name="Filter.Objects" value="Objekter"/> + <button label="redigér" name="edit_wearable_btn"/> + <text name="title" value="Redigér sæt"/> + <panel label="bottom_panel" name="header_panel"> + <panel label="bottom_panel" name="outfit_name_and_status"> + <text name="status" value="Retter..."/> + <text name="curr_outfit_name" value="[Current Outfit]"/> + </panel> + </panel> + <layout_stack name="im_panels"> + <layout_panel label="IM kontrolpanel" name="outfit_wearables_panel"> + <scroll_list name="look_items_list"> + <scroll_list.columns label="Se genstand" name="look_item"/> + <scroll_list.columns label="Sorter genstande i sæt" name="look_item_sort"/> + </scroll_list> + <panel label="bottom_panel" name="edit_panel"/> + </layout_panel> + <layout_panel name="add_wearables_panel"> + <filter_editor label="Filter" name="look_item_filter"/> + <layout_stack name="filter_panels"> + <layout_panel label="IM kontrolpanel" name="filter_button_panel"> + <text name="add_to_outfit_label" value="Tilføj til sæt:"/> + <button label="O" name="filter_button"/> + </layout_panel> + </layout_stack> + <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> + <button label="F" name="folder_view_btn"/> + <button label="L" name="list_view_btn"/> + </panel> + </layout_panel> + </layout_stack> + <panel name="save_revert_button_bar"> + <button label="Gem" name="save_btn"/> + <button label="Gendan" name="revert_btn"/> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/da/panel_outfits_inventory.xml index df00cfb2eb..681701aba2 100644 --- a/indra/newview/skins/default/xui/da/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/da/panel_outfits_inventory.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Ting" name="Outfits"> <tab_container name="appearance_tabs"> - <inventory_panel label="MINE SÆT" name="outfitslist_tab"/> + <panel label="MINE SÆT" name="outfitslist_tab"/> <inventory_panel label="HAR PÃ…" name="cof_tab"/> </tab_container> <panel name="bottom_panel"> @@ -9,6 +9,6 @@ <dnd_button name="trash_btn" tool_tip="Fjern valgte genstand"/> <button label="Gem sæt" name="make_outfit_btn" tool_tip="Gem udseende som nyt sæt"/> <button label="Tag pÃ¥" name="wear_btn" tool_tip="Tag valgte sæt pÃ¥"/> - <button label="M" name="look_edit_btn"/> + <button label="Redigér sæt" name="edit_current_outfit_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_people.xml b/indra/newview/skins/default/xui/da/panel_people.xml index 93aac7d08b..db72125b84 100644 --- a/indra/newview/skins/default/xui/da/panel_people.xml +++ b/indra/newview/skins/default/xui/da/panel_people.xml @@ -1,14 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray panel --> <panel label="Personer" name="people_panel"> - <string name="no_people" value="Ingen personer"/> - <string name="no_one_near" value="Ingen tæt pÃ¥"/> + <string name="no_recent_people" value="Ingen tidligere personer. Leder du efter nogen at være sammen med? Prøv [secondlife:///app/search/people Search] eller [secondlife:///app/worldmap World Map]."/> + <string name="no_filtered_recent_people" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]."/> + <string name="no_one_near" value="Ingen i nærheden. Leder du efter nogen at være sammen med? Prøv [secondlife:///app/search/people Search] eller [secondlife:///app/worldmap World Map]."/> + <string name="no_one_filtered_near" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]."/> <string name="no_friends_online" value="Ingen venner online"/> <string name="no_friends" value="Ingen venner"/> + <string name="no_friends_msg"> + Find venner via [secondlife:///app/search/people Search] eller højre-klik pÃ¥ en beboer og tilføj dem som venner. +Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap World Map]. + </string> + <string name="no_filtered_friends_msg"> + Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]. + </string> <string name="people_filter_label" value="Filtrér personer"/> <string name="groups_filter_label" value="Filtrér grupper"/> - <string name="no_filtered_groups_msg" value="[secondlife:///app/search/groups Try finding the group in search?]"/> - <string name="no_groups_msg" value="[secondlife:///app/search/groups Try searching for some groups to join.]"/> + <string name="no_filtered_groups_msg" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/groups Search]."/> + <string name="no_groups_msg" value="Leder du efter grupper at være med i? Prøv [secondlife:///app/search/groups Search]."/> <filter_editor label="Filtrér" name="filter_input"/> <tab_container name="tabs"> <panel label="TÆT PÃ…" name="nearby_panel"> @@ -27,10 +36,6 @@ <button name="add_btn" tool_tip="Tilbyd venskab til en beboer"/> <button name="del_btn" tool_tip="Fjern valgte person fra din venneliste"/> </panel> - <text name="no_friends_msg"> - For at tilføje venner prøv [secondlife:///app/search/people global search] eller klik pÃ¥ en bruger for at tilføje dem som ven. -Hvis du leder efter beboere at være sammen med, [secondlife:///app/worldmap prøv kortet]. - </text> </panel> <panel label="MINE GRUPPER" name="groups_panel"> <panel label="bottom_panel" name="bottom_panel"> diff --git a/indra/newview/skins/default/xui/da/panel_places.xml b/indra/newview/skins/default/xui/da/panel_places.xml index 3ac4ebaae9..c06176f994 100644 --- a/indra/newview/skins/default/xui/da/panel_places.xml +++ b/indra/newview/skins/default/xui/da/panel_places.xml @@ -11,5 +11,6 @@ <button label="Gem" name="save_btn"/> <button label="Annullér" name="cancel_btn"/> <button label="Luk" name="close_btn"/> + <button label="Profil" name="profile_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml index 1570960745..4d505db30e 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml @@ -20,6 +20,9 @@ <check_box label="Talebobler" name="bubble_text_chat"/> <slider label="Synlighed" name="bubble_chat_opacity"/> <color_swatch name="background" tool_tip="Vælg farve for talebobler"/> + <text name="UI Size:"> + Brugerflade størrelse + </text> <check_box label="Vis script fejl i:" name="show_script_errors"/> <radio_group name="show_location"> <radio_item label="Chat" name="0"/> @@ -29,4 +32,5 @@ <line_editor label="Brug walkie-talkie modus" name="modifier_combo"/> <button label="Angiv taste" name="set_voice_hotkey_button"/> <button label="Midterste museknap" name="set_voice_middlemouse_button" tool_tip="Nulstil til midterste musetaste"/> + <button label="Andre enheder" name="joystick_setup_button"/> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_world_map.xml b/indra/newview/skins/default/xui/da/panel_world_map.xml index bea5ea6b36..138b922df1 100644 --- a/indra/newview/skins/default/xui/da/panel_world_map.xml +++ b/indra/newview/skins/default/xui/da/panel_world_map.xml @@ -30,6 +30,12 @@ <panel.string name="world_map_northwest"> NV </panel.string> + <panel.string name="world_map_person"> + 1 person + </panel.string> + <panel.string name="world_map_people"> + [NUMBER] people + </panel.string> <text label="N" name="floater_map_north" text="N"> N </text> diff --git a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml index ae029f5939..9a2a348f58 100644 --- a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml @@ -3,6 +3,7 @@ <panel label="" name="sidepanel__inventory_panel"> <panel name="button_panel"> <button label="Profil" name="info_btn"/> + <button label="Del" name="share_btn"/> <button label="Bær" name="wear_btn"/> <button label="Afspil" name="play_btn"/> <button label="Teleportér" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml index 37501a3534..bd5ab62be9 100644 --- a/indra/newview/skins/default/xui/da/strings.xml +++ b/indra/newview/skins/default/xui/da/strings.xml @@ -246,6 +246,9 @@ <string name="BUTTON_CLOSE_WIN"> Luk (Ctrl+W) </string> + <string name="BUTTON_CLOSE_CHROME"> + Luk + </string> <string name="BUTTON_RESTORE"> Gendan </string> @@ -285,6 +288,9 @@ <string name="GroupNameNone"> (ingen) </string> + <string name="AvalineCaller"> + Avaline opkalder [ORDER] + </string> <string name="AssetErrorNone"> Ingen fejl </string> @@ -880,7 +886,7 @@ Tryk ESC for at skift til normalt udsyn </string> <string name="InventoryNoMatchingItems"> - Ingen matchende genstande fundet i beholdning. Prøv evt. [secondlife:///app/search/groups "Search"]. + Fandt du ikke hvad du ledte efter. Prøv [secondlife:///app/search/all Search]. </string> <string name="FavoritesNoMatchingItems"> Træk et landemærke hertil for at tilføje den som favorit. @@ -1539,9 +1545,7 @@ <string name="RegionNoCovenantOtherOwner"> Der er ingen regler for dette estate. Land pÃ¥ dette estate sælges af estate ejeren, ikke af Linden Lab. Kontakt venligst estate ejeren for detaljer om salg. </string> - <string name="covenant_last_modified"> - Sidst ændret: - </string> + <string name="covenant_last_modified" value="Sidst rettet:"/> <string name="none_text" value=" (ingen) "/> <string name="never_text" value=" (aldrig) "/> <string name="GroupOwned"> @@ -3218,6 +3222,15 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. <string name="LocationCtrlComboBtnTooltip"> Min lokationshistorik </string> + <string name="LocationCtrlAdultIconTooltip"> + Adult region + </string> + <string name="LocationCtrlModerateIconTooltip"> + Moderate region + </string> + <string name="LocationCtrlGeneralIconTooltip"> + Generel region + </string> <string name="UpdaterWindowTitle"> [APP_NAME] Opdatér </string> @@ -3248,6 +3261,12 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. <string name="UpdaterFailStartTitle"> Opstart af klient fejlede </string> + <string name="ItemsComingInTooFastFrom"> + [APP_NAME]: Genstande modtages for hurtigt fra [FROM_NAME], automatisk visning er slÃ¥et fra i [TIME] sekunder + </string> + <string name="ItemsComingInTooFast"> + [APP_NAME]: Genstande modtages for hurtigt, automatisk visning er slÃ¥et fra i [TIME] sekunder + </string> <string name="IM_logging_string"> -- Logning af IM aktiveret -- </string> @@ -3275,6 +3294,9 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. <string name="IM_moderator_label"> (Moderator) </string> + <string name="answered_call"> + Dit opkald er blevet besvaret + </string> <string name="started_call"> startede et stemme opkald </string> @@ -3356,12 +3378,18 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. <string name="unread_chat_multiple"> [SOURCES] har sagt noget nyt </string> + <string name="session_initialization_timed_out_error"> + Initialisering af session er "timed out" + </string> <string name="paid_you_ldollars"> [NAME] betalte dig L$[AMOUNT] </string> <string name="you_paid_ldollars"> Du betalte [NAME] L$[AMOUNT] [REASON]. </string> + <string name="you_paid_ldollars_no_info"> + Du betalte L$[AMOUNT]. + </string> <string name="you_paid_ldollars_no_reason"> Du betalte [NAME] L$[AMOUNT]. </string> @@ -3472,4 +3500,13 @@ Krænkelsesanmeldelse <string name="Contents"> Indhold </string> + <string name="AvatarBirthDateFormat"> + [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] + </string> + <string name="DefaultMimeType"> + ingen/ingen + </string> + <string name="texture_load_dimensions_error"> + Kan ikke hente billeder større end [WIDTH]*[HEIGHT] + </string> </strings> diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml index 38e72dbadf..3026ff64b2 100644 --- a/indra/newview/skins/default/xui/de/floater_about_land.xml +++ b/indra/newview/skins/default/xui/de/floater_about_land.xml @@ -353,7 +353,7 @@ Nur große Parzellen können in der Suche aufgeführt werden. <combo_box.item label="Shopping" name="item11"/> <combo_box.item label="Sonstige" name="item12"/> </combo_box> - <combo_box left="266" name="land category" width="130"> + <combo_box name="land category"> <combo_box.item label="Alle Kategorien" name="item0"/> <combo_box.item label="Lindenort" name="item1"/> <combo_box.item label="Kunst und Kultur" name="item3"/> diff --git a/indra/newview/skins/default/xui/de/floater_buy_currency.xml b/indra/newview/skins/default/xui/de/floater_buy_currency.xml index 21e3bd280f..f978b24d0d 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_currency.xml @@ -59,9 +59,8 @@ </text> <button label="Jetzt kaufen" name="buy_btn"/> <button label="Abbrechen" name="cancel_btn"/> - <text height="40" left="160" name="info_cannot_buy" width="200"> - Kauf nicht -möglich + <text name="info_cannot_buy"> + Kauf nicht möglich </text> - <button label="Weiter zum Internet" name="error_web"/> + <button label="Weiter zur Kontoseite" name="error_web"/> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_color_picker.xml b/indra/newview/skins/default/xui/de/floater_color_picker.xml index aed4bacb30..0fe154b531 100644 --- a/indra/newview/skins/default/xui/de/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/de/floater_color_picker.xml @@ -18,7 +18,7 @@ <text name="l_val_text"> Hell.: </text> - <check_box label="Jetzt übernehmen" name="apply_immediate"/> + <check_box label="Sofort übernehmen" name="apply_immediate"/> <button label="" label_selected="" name="color_pipette"/> <button label="Abbrechen" label_selected="Abbrechen" name="cancel_btn"/> <button label="OK" label_selected="OK" name="select_btn"/> diff --git a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml index d01ea145f1..d931596efe 100644 --- a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml @@ -22,7 +22,7 @@ VBO aktivieren: </text> <check_box initial_value="true" label="OpenGL Vertex-Buffer-Objekte aktivieren" name="vbo" tool_tip="Wenn Sie über moderne Grafikhardware verfügen, können Sie durch Aktivieren dieser Option die Geschwindigkeit verbessern. Bei alter Hardware sind die VBO oft schlecht implementiert, was zu Abstürzen führen kann, wenn diese Option aktiviert ist."/> - <slider label="Texturspeicher (MB):" name="GraphicsCardTextureMemory" tool_tip="Speicherplatz, der für Texturen zur Verfügung steht. In der Regel handelt es sich um Grafikkartenspeicher. Ein kleinerer Wert kann die Geschwindigkeit erhöhen, aber auch zu Texturunschärfen führen."/> + <slider label="Texturen-Cache (MB):" name="GraphicsCardTextureMemory" tool_tip="Speicherplatz, der für Texturen zur Verfügung steht. In der Regel handelt es sich um Grafikkartenspeicher. Ein kleinerer Wert kann die Geschwindigkeit erhöhen, aber auch zu Texturunschärfen führen."/> <spinner label="Nebeldistanzverhältnis:" name="fog"/> <button label="OK" label_selected="OK" name="OK"/> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index bb28f1b33f..c5c11faf93 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -67,7 +67,10 @@ <text name="RenderingCost" tool_tip="Zeigt die errechneten Wiedergabekosten für dieses Objekt"> þ: [COUNT] </text> - <check_box label="Beide Seiten dehnen" name="checkbox uniform"/> + <check_box name="checkbox uniform"/> + <text name="checkbox uniform label"> + Beide Seiten dehnen + </text> <check_box initial_value="true" label="Texturen dehnen" name="checkbox stretch textures"/> <check_box initial_value="true" label="An Raster ausrichten" name="checkbox snap to grid" top_pad="10"/> <combo_box name="combobox grid mode" tool_tip="Wählen Sie ein Rasterlineal zum Positionieren des Objekts aus."> diff --git a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml index aa1a93efac..bf150daf87 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml @@ -52,7 +52,7 @@ <text name="requires_restart_label"> (Neustart erforderlich) </text> - <radio_group name="chat_window" tool_tip="Zeigen Sie Ihre Sofortnachrichten (Instant Messages) in einem anderen Fenster oder in einem einzigen Fenster mit viele Registerkarten an (Neustart erforderlich)."> + <radio_group name="chat_window" tool_tip="Zeigen Sie Ihre Sofortnachrichten (Instant Messages) in einem anderen Fenster oder in einem einzigen Fenster mit vielen Registerkarten an (Neustart erforderlich)."> <radio_item label="Getrennte Fenster" name="radio" value="0"/> <radio_item label="Registerkarten" name="radio2" value="1"/> </radio_group> diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index 90cdd13173..03c858c880 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -1561,7 +1561,7 @@ Objektinhalt </string> <string name="BusyModeResponseDefault"> - Der Einwohner/Die Einwohnerin ist „beschäftigt", d.h. er/sie möchte im Moment nicht gestört werden. Ihre Nachricht wird dem Einwohner/der Einwohnerin als IM angezeigt, und kann später beantwortet werden. + Der Einwohner/Die Einwohnerin ist „beschäftigtâ€, d.h. er/sie möchte im Moment nicht gestört werden. Ihre Nachricht wird dem Einwohner/der Einwohnerin als IM angezeigt, und kann später beantwortet werden. </string> <string name="MuteByName"> (nach Namen) diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index a6a4c79da4..b5be03346e 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -49,7 +49,7 @@ libcurl Version: [LIBCURL_VERSION] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] Qt Webkit Version: [QT_WEBKIT_VERSION] -Vivox Version: [VIVOX_VERSION] +Voice Server Version: [VOICE_VERSION] </floater.string> <floater.string name="none"> diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 40c6b14a4a..5f28fa6495 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -108,6 +108,9 @@ 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] + </panel.string> <text type="string" length="1" @@ -1930,7 +1933,7 @@ Only large parcels can be listed in search. left_delta="20" name="Only Allow" top="49" - width="278"> + width="325"> Restrict Access to Residents verified by: </text> <check_box diff --git a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml index e30e958543..bac3ea86f1 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml @@ -1,306 +1,321 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - height="660" + height="700" layout="topleft" name="avatar_texture_debug" help_topic="avatar_texture_debug" title="AVATAR TEXTURES" - width="1253"> + width="940" + can_resize="true"> <floater.string name="InvalidAvatar"> INVALID AVATAR </floater.string> + + <scroll_container + color="DkGray2" + opaque="true" + follows="all" + height="680" + layout="topleft" + left="5" + top_pad="15" + name="profile_scroll" + reserve_scroll_corner="false" + width="930"> + <panel + name="scroll_content_panel" + follows="left|top" + min_height="300" + layout="topleft" + top="0" + background_visible="false" + left="0" + height="680"> <text type="string" length="1" height="16" layout="topleft" - left="30" + left="15" name="label" - top="40" - width="80"> - Baked Textures + top="20" + width="90"> + Baked +Textures </text> <text type="string" length="1" height="16" layout="topleft" - left_pad="50" + left_pad="22" name="composite_label" top_delta="0" width="120"> - Composite Textures + Composite +Textures </text> <button - height="20" + height="40" label="Dump IDs to Console" label_selected="Dump" layout="topleft" - left_pad="530" name="Dump" top_delta="0" + right="-10" width="150" /> - <scroll_container - color="DkGray2" - opaque="true" - follows="all" - height="590" - layout="topleft" - left="5" - top_pad="5" - name="profile_scroll" - reserve_scroll_corner="false" - width="1240"> <panel name="scroll_content_panel" follows="left|top" min_height="300" layout="topleft" - top="0" + top="43" background_visible="false" - height="950" + height="930" left="0" - width="1250"> + width="1230"> + <texture_picker - height="143" + height="103" label="Hair" layout="topleft" left="10" name="hair-baked" top="17" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Hair" layout="topleft" - left_pad="7" + left_pad="21" name="hair_grain" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Hair Alpha" layout="topleft" left_pad="7" name="hair_alpha" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Head" layout="topleft" left="10" name="head-baked" - top="167" - width="128" /> + top_delta="100" + width="92" /> <texture_picker - height="143" + height="103" label="Makeup" layout="topleft" - left_pad="7" + left_pad="21" name="head_bodypaint" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Head Alpha" layout="topleft" left_pad="7" name="head_alpha" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Head Tattoo" layout="topleft" left_pad="7" name="head_tattoo" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Eyes" layout="topleft" left="10" name="eyes-baked" - top="317" - width="128" /> + top_delta="100" + width="92" /> <texture_picker - height="143" + height="103" label="Eye" layout="topleft" - left_pad="7" + left_pad="21" name="eyes_iris" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Eyes Alpha" layout="topleft" left_pad="7" name="eyes_alpha" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Upper Body" layout="topleft" left="10" name="upper-baked" - top="467" - width="128" /> + top_delta="100" + width="92" /> <texture_picker - height="143" - label="Upper Body Bodypaint" + height="103" + label="Upper BodyPaint" layout="topleft" - left_pad="7" + left_pad="21" name="upper_bodypaint" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Undershirt" layout="topleft" left_pad="7" name="upper_undershirt" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Gloves" layout="topleft" left_pad="7" name="upper_gloves" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Shirt" layout="topleft" left_pad="7" name="upper_shirt" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Upper Jacket" layout="topleft" left_pad="7" name="upper_jacket" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Upper Alpha" layout="topleft" left_pad="7" name="upper_alpha" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Upper Tattoo" layout="topleft" left_pad="7" name="upper_tattoo" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Lower Body" layout="topleft" left="10" name="lower-baked" - top="617" - width="128" /> + top_delta="100" + width="92" /> <texture_picker - height="143" - label="Lower Body Bodypaint" + height="103" + label="Lower BodyPaint" layout="topleft" - left_pad="7" + left_pad="21" name="lower_bodypaint" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Underpants" layout="topleft" left_pad="7" name="lower_underpants" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Socks" layout="topleft" left_pad="7" name="lower_socks" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Shoes" layout="topleft" left_pad="7" name="lower_shoes" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Pants" layout="topleft" left_pad="7" name="lower_pants" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Jacket" layout="topleft" left_pad="7" name="lower_jacket" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Lower Alpha" layout="topleft" left_pad="7" name="lower_alpha" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Lower Tattoo" layout="topleft" left_pad="7" name="lower_tattoo" top_delta="0" - width="128" /> + width="92" /> <texture_picker - height="143" + height="103" label="Skirt" layout="topleft" left="10" name="skirt-baked" - top="767" - width="128" /> + top_delta="100" + width="92" /> <texture_picker - height="143" + height="103" label="Skirt" layout="topleft" - left_pad="7" + left_pad="21" name="skirt" top_delta="0" - width="128" /> + width="92" /> +</panel> </panel> </scroll_container> -</floater> +</floater>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml new file mode 100644 index 0000000000..4643f66bd8 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + legacy_header_height="18" + can_resize="false" + height="280" + layout="topleft" + min_height="280" + min_width="450" + name="floater_buy_currency_html" + help_topic="floater_buy_currency_html" + save_rect="true" + single_instance="true" + title="BUY CURRENCY" + width="452"> + <floater.string + name="buy_currency_url" translate="false"> + https://quick-buy-www.jeff.ooze.lindenlab.com/en/display + </floater.string> + <web_browser + bottom="278" + follows="left|right|top|bottom" + layout="topleft" + left="2" + name="browser" + top="18" + width="450" /> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index b45e39a111..8c3aa2c9a4 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -4,9 +4,8 @@ can_dock="true" can_minimize="true" can_close="false" - center_horiz="true" follows="bottom" - height="152" + height="164" layout="topleft" name="camera_floater" help_topic="camera_floater" @@ -14,7 +13,7 @@ save_visibility="true" save_dock_state="true" single_instance="true" - width="150"> + width="228"> <floater.string name="rotate_tooltip"> Rotate Camera Around Focus @@ -28,16 +27,16 @@ Move Camera Up and Down, Left and Right </floater.string> <floater.string - name="orbit_mode_title"> - Orbit + name="camera_modes_title"> + Camera modes </floater.string> <floater.string name="pan_mode_title"> - Pan + Orbit Zoom Pan </floater.string> <floater.string - name="avatar_view_mode_title"> - Presets + name="presets_mode_title"> + Preset Views </floater.string> <floater.string name="free_mode_title"> @@ -45,39 +44,134 @@ </floater.string> <panel border="false" - height="110" + height="123" layout="topleft" left="2" top="0" mouse_opaque="false" name="controls" - width="148"> - <joystick_track - follows="top|left" - height="78" - image_selected="Cam_Tracking_In" - image_unselected="Cam_Tracking_Out" + width="226"> + <panel + color="Transparent" + follows="all" + height="102" layout="topleft" - left="45" - name="cam_track_stick" - quadrant="left" - scale_image="false" - sound_flags="3" - tool_tip="Move camera up and down, left and right" - top="22" - visible="false" - width="78" /> + left="8" + name="preset_views_list" + opaque="true" + top="24" + width="212" + visible="false"> + <panel_camera_item + name="front_view"> + <panel_camera_item.mousedown_callback + function="CameraPresets.ChangeView" + parameter="front_view" /> + <panel_camera_item.picture + image_name="Cam_Preset_Front_Off" /> + <panel_camera_item.selected_picture + image_name="Cam_Preset_Front_On" /> + <panel_camera_item.text> + Front View + </panel_camera_item.text> + </panel_camera_item> + <panel_camera_item + name="group_view" + top_pad="4"> + <panel_camera_item.mousedown_callback + function="CameraPresets.ChangeView" + parameter="group_view" /> + <panel_camera_item.picture + image_name="Cam_Preset_Side_Off" /> + <panel_camera_item.selected_picture + image_name="Cam_Preset_Side_On" /> + <panel_camera_item.text> + Side View + </panel_camera_item.text> + </panel_camera_item> + <panel_camera_item + name="rear_view" + layout="topleft" + top_pad="4"> + <panel_camera_item.mousedown_callback + function="CameraPresets.ChangeView" + parameter="rear_view" /> + <panel_camera_item.picture + image_name="Cam_Preset_Back_Off" /> + <panel_camera_item.selected_picture + image_name="Cam_Preset_Back_On" /> + <panel_camera_item.text> + Rear View + </panel_camera_item.text> + </panel_camera_item> + </panel> + <panel + color="Transparent" + follows="all" + height="68" + item_pad="4" + layout="topleft" + left="8" + name="camera_modes_list" + opaque="true" + top="24" + width="212" + visible="false"> + <panel_camera_item + name="object_view"> + <panel_camera_item.mousedown_callback + function="CameraPresets.ChangeView" + parameter="object_view" /> + <panel_camera_item.text> + Object View + </panel_camera_item.text> + <panel_camera_item.picture + image_name="Object_View_Off" /> + <panel_camera_item.selected_picture + image_name="Object_View_On" /> + </panel_camera_item> + <panel_camera_item + name="mouselook_view" + layout="topleft"> + <panel_camera_item.mousedown_callback + function="CameraPresets.ChangeView" + parameter="mouselook_view" /> + <panel_camera_item.text> + Mouselook View + </panel_camera_item.text> + <panel_camera_item.picture + image_name="MouseLook_View_Off" /> + <panel_camera_item.selected_picture + image_name="MouseLook_View_On" /> + </panel_camera_item> + </panel> <!--TODO: replace + - images --> <panel border="false" class="camera_zoom_panel" - height="94" + height="114" layout="topleft" - left="7" + left="0" mouse_opaque="false" name="zoom" - top="22" - width="18"> + top="20" + width="226"> + <joystick_rotate + follows="top|left" + height="78" + image_selected="Cam_Rotate_In" + image_unselected="Cam_Rotate_Out" + layout="topleft" + left="7" + mouse_opaque="false" + name="cam_rotate_stick" + quadrant="left" + scale_image="false" + sound_flags="3" + visible="true" + tool_tip="Orbit camera around focus" + top="20" + width="78" /> <button follows="top|left" height="18" @@ -85,15 +179,17 @@ image_selected="AddItem_Press" image_unselected="AddItem_Off" layout="topleft" + left_pad="14" name="zoom_plus_btn" - width="18"> + width="18" + top="18"> <commit_callback function="Zoom.plus" /> <mouse_held_callback function="Zoom.plus" /> </button> <slider_bar - height="48" + height="50" layout="topleft" name="zoom_slider" orientation="vertical" @@ -119,90 +215,20 @@ <mouse_held_callback function="Zoom.minus" /> </button> - </panel> - <joystick_rotate + <joystick_track follows="top|left" height="78" - image_selected="Cam_Rotate_In" - image_unselected="Cam_Rotate_Out" + image_selected="Cam_Tracking_In" + image_unselected="Cam_Tracking_Out" layout="topleft" - left="45" - mouse_opaque="false" - name="cam_rotate_stick" + left="133" + name="cam_track_stick" quadrant="left" scale_image="false" sound_flags="3" - visible="true" - tool_tip="Orbit camera around focus" - top="22" - width="78" /> - <panel - height="78" - layout="topleft" - left="36" - name="camera_presets" + tool_tip="Move camera up and down, left and right" top="20" - visible="false" - width="78"> - <button - height="40" - image_selected="Cam_Preset_Back_On" - image_unselected="Cam_Preset_Back_Off" - is_toggle="true" - layout="topleft" - left="0" - name="rear_view" - tool_tip="Rear View" - top="2" - width="40"> - <click_callback - function="CameraPresets.ChangeView" - parameter="rear_view" /> - </button> - <button - height="40" - image_selected="Cam_Preset_Side_On" - image_unselected="Cam_Preset_Side_Off" - is_toggle="true" - layout="topleft" - left_pad="5" - name="group_view" - tool_tip="Group View" - top="2" - width="40"> - <click_callback - function="CameraPresets.ChangeView" - parameter="group_view" /> - </button> - <button - height="40" - image_selected="Cam_Preset_Front_On" - image_unselected="Cam_Preset_Front_Off" - is_toggle="true" - layout="topleft" - left="0" - name="front_view" - tool_tip="Front View" - top_pad="5" - width="40"> - <click_callback - function="CameraPresets.ChangeView" - parameter="front_view" /> - </button> - <button - height="40" - image_selected="Cam_Preset_Eye_Off" - image_unselected="Cam_Preset_Eye_Off" - is_toggle="true" - layout="topleft" - left_pad="5" - name="mouselook_view" - tool_tip="Mouselook View" - width="40"> - <click_callback - function="CameraPresets.ChangeView" - parameter="mouselook_view" /> - </button> + width="78"/> </panel> </panel> <panel @@ -212,56 +238,44 @@ left="2" top_pad="0" name="buttons" - width="148"> + width="226"> <button height="23" label="" layout="topleft" - left="23" + left="70" is_toggle="true" - image_overlay="Cam_Orbit_Off" + image_overlay="Cam_Avatar_Off" image_selected="PushButton_Selected_Press" - name="orbit_btn" + name="presets_btn" tab_stop="false" - tool_tip="Orbit camera" + tool_tip="Preset Views" + top="13" width="25"> </button> <button height="23" label="" layout="topleft" - left_pad="0" + left_pad="1" is_toggle="true" - image_overlay="Cam_Pan_Off" + image_overlay="PanOrbit_Off" image_selected="PushButton_Selected_Press" name="pan_btn" tab_stop="false" - tool_tip="Pan camera" - width="25"> - </button> - <button - height="23" - label="" - layout="topleft" - left_pad="0" - image_overlay="Cam_Avatar_Off" - image_selected="PushButton_Selected_Press" - name="avatarview_btn" - tab_stop="false" - tool_tip="Presets" + tool_tip="Orbit Zoom Pan" width="25"> </button> <button height="23" label="" layout="topleft" - left_pad="0" - is_toggle="true" + left_pad="1" image_overlay="Cam_FreeCam_Off" image_selected="PushButton_Selected_Press" - name="freecamera_btn" + name="avatarview_btn" tab_stop="false" - tool_tip="View object" + tool_tip="Camera modes" width="25"> </button> </panel> 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 ced8c29199..e123de46c2 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -27,7 +27,14 @@ halign="left" use_ellipses="true" top="0" - width="394" /> + 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" 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 1d67123726..24fff6d4ae 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -32,7 +32,15 @@ </floater.string> <floater.string name="VoiceInviteGroup"> - has joined a Voice Chat call with the group [GROUP]. + just joined '[GROUP]' voice channel. + </floater.string> + <floater.string + name="VoiceInviteQuestionGroup"> + Would you like to leave [CURRENT_CHAT] and join the call with '[GROUP]'? + </floater.string> + <floater.string + name="VoiceInviteQuestionDefault"> + Do you want to leave [CURRENT_CHAT] and join this voice chat? </floater.string> <avatar_icon enabled="false" diff --git a/indra/newview/skins/default/xui/en/floater_land_holdings.xml b/indra/newview/skins/default/xui/en/floater_land_holdings.xml index 06c766f744..0b9ae3c9f3 100644 --- a/indra/newview/skins/default/xui/en/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/en/floater_land_holdings.xml @@ -99,7 +99,7 @@ name="allowed_label" top="366" left="10" - width="290"> + width="365"> Allowed land holdings at current payment plan: </text> <text @@ -110,7 +110,7 @@ layout="topleft" name="allowed_text" top="366" - left="305" + left="380" width="290"> [AREA] m² </text> @@ -123,7 +123,7 @@ top="386" left="10" name="current_label" - width="290"> + width="365"> Current land holdings: </text> <text @@ -133,7 +133,7 @@ height="16" layout="topleft" top="386" - left="305" + left="380" name="current_text" width="290"> [AREA] m² @@ -148,7 +148,7 @@ top="406" left="10" name="available_label" - width="290"> + width="365"> Available for land purchases: </text> <text @@ -160,7 +160,7 @@ layout="topleft" name="available_text" top="406" - left="305" + left="380" width="290"> [AREA] m² </text> diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index e21e44204d..249b091800 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater bg_alpha_image_overlay="DkGray_66" - legacy_header_height="18" + legacy_header_height="0" can_minimize="true" can_resize="true" follows="top|right" @@ -10,7 +10,7 @@ min_height="174" min_width="174" name="Map" - title="Mini Map" + title="" help_topic="map" save_rect="true" save_visibility="true" @@ -62,8 +62,8 @@ mouse_opaque="false" name="Net Map" width="200" - height="200" - top="18"/> + height="218" + top="0"/> <text type="string" length="1" diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index 8e2c57764b..6f29255a6b 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -4,7 +4,6 @@ can_dock="true" can_minimize="true" can_close="false" - center_horiz="true" follows="bottom" height="110" layout="topleft" @@ -13,7 +12,7 @@ save_rect="true" save_visibility="true" save_dock_state="true" - width="115"> + width="133"> <string name="walk_forward_tooltip"> Walk Forward (press Up Arrow or W) @@ -23,6 +22,14 @@ Walk Backwards (press Down Arrow or S) </string> <string + name="walk_left_tooltip"> + Walk left (press Shift + Left Arrow or A) + </string> + <string + name="walk_right_tooltip"> + Walk right (press Shift + Right Arrow or D) + </string> + <string name="run_forward_tooltip"> Run Forward (press Up Arrow or W) </string> @@ -31,6 +38,14 @@ Run Backwards (press Down Arrow or S) </string> <string + name="run_left_tooltip"> + Run left (press Shift + Left Arrow or A) + </string> + <string + name="run_right_tooltip"> + Run right (press Shift + Right Arrow or D) + </string> + <string name="fly_forward_tooltip"> Fly Forward (press Up Arrow or W) </string> @@ -39,6 +54,30 @@ Fly Backwards (press Down Arrow or S) </string> <string + name="fly_left_tooltip"> + Fly left (press Shift + Left Arrow or A) + </string> + <string + name="fly_right_tooltip"> + Fly right (press Shift + Right Arrow or D) + </string> + <string + name="fly_up_tooltip"> + Fly up (press E) + </string> + <string + name="fly_down_tooltip"> + Fly down (press C) + </string> + <string + name="jump_tooltip"> + Jump (press E) + </string> + <string + name="crouch_tooltip"> + Crouch (press C) + </string> + <string name="walk_title"> Walk </string> @@ -59,76 +98,82 @@ mouse_opaque="false" name="panel_actions" top="0" - width="115"> + width="133"> + <!-- Buttons in panel are organized in 3 columns to enable their easy vertical adjustment via top_pad--> + <!-- Left column --> <button follows="left|bottom" - height="25" + height="24" image_selected="Movement_TurnLeft_On" image_pressed_selected="Movement_TurnLeft_On" image_unselected="Movement_TurnLeft_Off" layout="topleft" - left="17" + left="30" name="turn left btn" scale_image="false" tool_tip="Turn left (press Left Arrow or A)" - top="45" - width="25" /> + top="34" + width="24" /> + <joystick_slide + follows="left|bottom" + height="10" + image_selected="Movement_Left_On" + image_pressed_selected="Movement_Left_On" + image_unselected="Movement_Left_Off" + layout="topleft" + left_delta="4" + name="move left btn" + quadrant="left" + scale_image="false" + tool_tip="Walk left (press Shift + Left Arrow or A)" + top_pad="10" + width="19" /> + <!-- Right column --> <button follows="left|bottom" - height="25" + height="24" image_selected="Movement_TurnRight_On" image_pressed_selected="Movement_TurnRight_On" image_unselected="Movement_TurnRight_Off" layout="topleft" - left_pad="34" + right="-30" name="turn right btn" scale_image="false" tool_tip="Turn right (press Right Arrow or D)" - top_delta="0" - width="25" /> - <button - follows="left|bottom" - height="25" - image_selected="Movement_Up_On" - image_pressed_selected="Movement_Up_On" - image_unselected="Movement_Up_Off" - layout="topleft" - left="10" - name="move up btn" - scale_image="false" - tool_tip="Fly up, press E" - top="14" - width="25" /> - <button + top="34" + width="24" /> + <joystick_slide follows="left|bottom" - height="25" - image_selected="Movement_Down_On" - image_pressed_selected="Movement_Down_On" - image_unselected="Movement_Down_Off" + height="10" + image_selected="Movement_Right_On" + image_pressed_selected="Movement_Right_On" + image_unselected="Movement_Right_Off" layout="topleft" - left_pad="45" - name="move down btn" + name="move right btn" + quadrant="right" + right_delta="4" scale_image="false" - tool_tip="Fly down, press C" - top_delta="0" - width="20" /> + tool_tip="Walk right (press Shift + Right Arrow or D)" + top_pad="10" + width="19" /> + <!-- Middle column --> <joystick_turn follows="left|bottom" - height="25" + height="24" image_selected="Movement_Forward_On" image_pressed_selected="Movement_Forward_On" image_unselected="Movement_Forward_Off" layout="topleft" - left="46" + left="54" name="forward btn" quadrant="up" scale_image="false" tool_tip="Walk forward (press up arrow or W)" - top_delta="10" - width="21" /> + top="20" + width="24" /> <joystick_turn follows="left|bottom" - height="25" + height="24" image_selected="Movement_Backward_On" image_pressed_selected="Movement_Backward_On" image_unselected="Movement_Backward_Off" @@ -138,8 +183,35 @@ quadrant="down" scale_image="false" tool_tip="Walk backward (press down arrow or S)" - top_delta="30" - width="21" /> + top_pad="5" + width="24" /> + <!-- Fly up/down (jump/crouch) buttons --> + <button + follows="left|bottom" + height="19" + image_selected="Movement_Up_On" + image_pressed_selected="Movement_Up_On" + image_unselected="Movement_Up_Off" + layout="topleft" + right="-11" + name="move up btn" + scale_image="false" + tool_tip="Fly up (press E)" + top="22" + width="10" /> + <button + follows="left|bottom" + height="19" + image_selected="Movement_Down_On" + image_pressed_selected="Movement_Down_On" + image_unselected="Movement_Down_Off" + layout="topleft" + right_delta="0" + name="move down btn" + scale_image="false" + tool_tip="Fly down (press C)" + top_pad="10" + width="10" /> </panel> <!-- Width and height of this panel should be synchronized with panel_stand_stop_flying.xml --> <panel @@ -149,7 +221,7 @@ left="0" name="panel_modes" top_pad="0" - width="115"> + width="133"> <button follows="left|bottom" height="23" @@ -158,7 +230,7 @@ label="" layout="topleft" name="mode_walk_btn" - left="10" + left="20" pad_right="0" tool_tip="Walking mode" top="2" diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 6e82bb09ee..50d0011338 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - center_horiz="true" - center_vert="true" + open_centered="true" default_tab_group="1" height="460" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index 3dc546aee3..f766fe5a5d 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -298,7 +298,7 @@ layout="topleft" left="3" name="start" - top="-11" + top="-51" width="80" /> <radio_item height="16" diff --git a/indra/newview/skins/default/xui/en/floater_region_info.xml b/indra/newview/skins/default/xui/en/floater_region_info.xml index 262bcd07a0..32fb6f97e7 100644 --- a/indra/newview/skins/default/xui/en/floater_region_info.xml +++ b/indra/newview/skins/default/xui/en/floater_region_info.xml @@ -7,7 +7,7 @@ name="regioninfo" save_rect="true" title="REGION/ESTATE" - width="480"> + width="530"> <tab_container bottom="555" follows="left|right|top|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index 9ca18d455b..49b3b58113 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -9,6 +9,7 @@ name="floater_search" help_topic="floater_search" save_rect="true" + save_visibility="true" single_instance="true" title="FIND" width="650"> diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 7dcf2aab99..f3d297c303 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -62,6 +62,7 @@ name="share_to_web" top_delta="0" left="10" + visible="false" width="130"/> <button label="Save to My Inventory" diff --git a/indra/newview/skins/default/xui/en/floater_test_widgets.xml b/indra/newview/skins/default/xui/en/floater_test_widgets.xml index 80cb2723a0..fb583114c0 100644 --- a/indra/newview/skins/default/xui/en/floater_test_widgets.xml +++ b/indra/newview/skins/default/xui/en/floater_test_widgets.xml @@ -49,13 +49,10 @@ name="test_menu_bar" top="16"> <menu - height="16" label="Menu" layout="topleft" tear_off="true" - left="0" name="Menu" - top="-32" width="128"> <!-- menu_item_call will trigger a function call in the C++ code --> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index cc9e72cfb5..efc1a66d95 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -11,6 +11,7 @@ save_rect="true" short_title="BUILD TOOLS" single_instance="true" + save_visibility="true" sound_flags="0" width="295"> <floater.string @@ -219,8 +220,8 @@ </radio_group> <radio_group follows="left|top" - left="10" - top="54" + left="5" + top="59" height="70" layout="topleft" name="edit_radio_group"> @@ -253,7 +254,8 @@ control_name="EditLinkedParts" label="Edit linked" layout="topleft" - name="checkbox edit linked parts" > + name="checkbox edit linked parts" + top_pad="0"> <check_box.commit_callback function="BuildTool.selectComponent"/> </check_box> @@ -273,20 +275,31 @@ <check_box control_name="ScaleUniform" height="19" - label="Stretch Both Sides" + label="" layout="topleft" left="143" name="checkbox uniform" top="50" - width="134" /> + width="20" /> + <text + height="19" + label="Stretch Both Sides" + left="163" + name="checkbox uniform label" + top="55" + width="120" + wrap="true"> + Stretch Both Sides + </text> <check_box control_name="ScaleStretchTextures" height="19" initial_value="true" label="Stretch Textures" layout="topleft" + left="143" name="checkbox stretch textures" - top_pad="0" + top_pad="7" width="134" /> <check_box control_name="SnapEnabled" @@ -294,7 +307,7 @@ initial_value="true" label="Snap to grid" layout="topleft" - top_pad="7" + top_pad="0" name="checkbox snap to grid" width="134" /> <combo_box @@ -303,6 +316,7 @@ follows="left|top" name="combobox grid mode" tool_tip="Choose the type of grid ruler for positioning the object" + top_pad="0" width="108"> <combo_box.item label="World grid" @@ -580,7 +594,7 @@ layout="topleft" left="0" name="radio select land" - top="-1" + top="-106" width="134" /> <radio_item height="19" @@ -2329,7 +2343,7 @@ even though the user gets a free copy. height="19" label="Full Bright" layout="topleft" - left_delta="0" + left_delta="-5" name="checkbox fullbright" top_pad="4" width="81" /> diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 233ab2c1b2..ad40cafe61 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -2,8 +2,7 @@ <floater legacy_header_height="18" can_resize="true" - center_horiz="true" - center_vert="true" + open_centered="true" height="600" layout="topleft" min_height="520" @@ -538,6 +537,7 @@ <button follows="right|bottom" height="23" + image_unselected="PushButton_On" label="Teleport" layout="topleft" left="25" diff --git a/indra/newview/skins/default/xui/en/inspect_group.xml b/indra/newview/skins/default/xui/en/inspect_group.xml index 37ae5a64d7..bcdb63228d 100644 --- a/indra/newview/skins/default/xui/en/inspect_group.xml +++ b/indra/newview/skins/default/xui/en/inspect_group.xml @@ -79,7 +79,7 @@ L$123 to join height="23" label="Join" left="8" - top="286" + top="125" name="join_btn" width="103" commit_callback.function="InspectGroup.Join"/> @@ -88,7 +88,7 @@ L$123 to join height="23" label="Leave" left="8" - top="286" + top="125" name="leave_btn" width="103" commit_callback.function="InspectGroup.Leave"/> @@ -97,7 +97,7 @@ L$123 to join height="23" label="View Profile" name="view_profile_btn" - top="286" + top="125" left="117" width="103" commit_callback.function="InspectGroup.ViewProfile" /> diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml index b8a7222e8e..f629eef475 100644 --- a/indra/newview/skins/default/xui/en/inspect_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_object.xml @@ -18,8 +18,8 @@ width="228"> <string name="Creator">By [CREATOR]</string> <string name="CreatorAndOwner"> -by [CREATOR] -owner [OWNER] +By [CREATOR] +Owner [OWNER] </string> <string name="Price">L$[AMOUNT]</string> <string name="PriceFree">Free!</string> @@ -29,61 +29,52 @@ owner [OWNER] allow_html="false" follows="all" font="SansSerifLarge" - height="16" + height="30" left="8" name="object_name" text_color="White" - top="10" + top="6" use_ellipses="true" - value="Test Object Name That Is Really Long" + word_wrap="true" + value="Test Object Name That Is actually two lines and Really Long" width="220" /> <text follows="all" - height="33" + height="50" left="8" name="object_creator" - top_pad="0" + top_pad="6" use_ellipses="true" width="220"> by secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about owner secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about </text> - <!-- *TODO: Replace this icon --> - <icon - name="price_icon" - image_name="Icon_For_Sale" - right="-5" - width="16" - height="16" - top="56" - follows="left|top" - /> <text follows="all" font="SansSerifSmall" font.style="BOLD" - height="16" + height="14" halign="right" - left="5" + right="-5" name="price_text" text_color="white" - top="58" + top="60" font_shadow="none" - width="196"> -L$300,000 + width="60"> +L$30,000 </text> <text - clip_partial="true" + clip_partial="true" follows="all" font="SansSerifSmall" - height="37" + height="25" left="8" name="object_description" - top_pad="0" - use_ellipses="true" + top="76" + use_ellipses="true" width="220" word_wrap="true"> -This is a really long description for an object being as how it is at least 80 characters in length and maybe more like 120 at this point. Who knows, really? +This is a really long description for an object being as how it is at least 80 characters in length and so but maybe more like 120 at this point. Who knows, really? </text> <!-- Overlapping buttons for all default actions. Show "Buy" if for sale, "Sit" if can sit, etc. --> @@ -91,10 +82,9 @@ This is a really long description for an object being as how it is at least 80 c follows="all" font="SansSerifSmall" height="13" - left_delta="0" name="object_media_url" - bottom_pad="2" - width="200" + width="220" + top_pad="0" max_length = "50" use_ellipses="true"> http://www.superdupertest.com diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index 5c30b9ee94..dc51ae8b92 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -68,8 +68,8 @@ function="Self.EnableStandUp" /> </menu_item_call> <menu_item_call - label="My Appearance" - name="Appearance..."> + label="Change Outfit" + name="Change Outfit"> <menu_item_call.on_click function="CustomizeAvatar" /> <menu_item_call.on_enable diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml index a21c1ac44b..d5b993152a 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -183,14 +183,30 @@ </menu_item_call> </context_menu> <menu_item_call - label="My Appearance" + label="Change Outfit" layout="topleft" - name="Appearance..."> + 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" diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml index 7ef91a1d85..ccd5388621 100644 --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml @@ -52,6 +52,61 @@ function="CheckControl" parameter="ShowSnapshotButton" /> </menu_item_check> + <menu_item_check + label="Sidebar button" + layout="topleft" + name="ShowSidebarButton"> + <menu_item_check.on_click + function="ToggleControl" + parameter="ShowSidebarButton" /> + <menu_item_check.on_check + function="CheckControl" + parameter="ShowSidebarButton" /> + </menu_item_check> + <menu_item_check + label="Build button" + layout="topleft" + name="ShowBuildButton"> + <menu_item_check.on_click + function="ToggleControl" + parameter="ShowBuildButton" /> + <menu_item_check.on_check + function="CheckControl" + parameter="ShowBuildButton" /> + </menu_item_check> + <menu_item_check + label="Search button" + layout="topleft" + name="ShowSearchButton"> + <menu_item_check.on_click + function="ToggleControl" + parameter="ShowSearchButton" /> + <menu_item_check.on_check + function="CheckControl" + parameter="ShowSearchButton" /> + </menu_item_check> + <menu_item_check + label="Map button" + layout="topleft" + name="ShowWorldMapButton"> + <menu_item_check.on_click + function="ToggleControl" + parameter="ShowWorldMapButton" /> + <menu_item_check.on_check + function="CheckControl" + parameter="ShowWorldMapButton" /> + </menu_item_check> + <menu_item_check + label="Mini-Map button" + layout="topleft" + name="ShowMiniMapButton"> + <menu_item_check.on_click + function="ToggleControl" + parameter="ShowMiniMapButton" /> + <menu_item_check.on_check + function="CheckControl" + parameter="ShowMiniMapButton" /> + </menu_item_check> <menu_item_separator name="Separator" /> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/menu_cof_attachment.xml b/indra/newview/skins/default/xui/en/menu_cof_attachment.xml new file mode 100644 index 0000000000..b422d87938 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_cof_attachment.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="COF Attachment"> + <menu_item_call + label="Detach" + layout="topleft" + name="detach"> + <on_click + function="Attachment.Detach" + parameter="detach"/> + </menu_item_call> + <context_menu + label="Attach to" + layout="topleft" + name="attach_to" /> + <context_menu + label="Attach to HUD" + layout="topleft" + name="attach_to_hud" /> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_cof_body_part.xml b/indra/newview/skins/default/xui/en/menu_cof_body_part.xml new file mode 100644 index 0000000000..01008ef203 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_cof_body_part.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="COF Body"> + <menu_item_call + label="Replace" + layout="topleft" + name="replace"> + <on_click + function="BodyPart.Replace"/> + </menu_item_call> + <menu_item_call + label="Edit" + layout="topleft" + name="edit"> + <on_click + function="BodyPart.Edit"/> + <on_enable + function="BodyPart.OnEnable" + parameter="edit" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_cof_clothing.xml b/indra/newview/skins/default/xui/en/menu_cof_clothing.xml new file mode 100644 index 0000000000..f9cb29f0d7 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_cof_clothing.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="COF Clothing"> + <menu_item_call + label="Take Off" + layout="topleft" + name="take_off"> + <on_click + function="Clothing.TakeOff" /> + </menu_item_call> + <menu_item_call + label="Move Up a Layer" + layout="topleft" + name="move_up"> + <on_click + function="Clothing.MoveUp" /> + <on_enable + function="Clothing.OnEnable" + parameter="move_up" /> + </menu_item_call> + <menu_item_call + label="Move Down a Layer" + layout="topleft" + name="move_down"> + <on_click + function="Clothing.MoveDown" /> + <on_enable + function="Clothing.OnEnable" + parameter="move_down" /> + </menu_item_call> + <menu_item_call + label="Edit" + layout="topleft" + name="edit"> + <on_click + function="Clothing.Edit" /> + <on_enable + function="Clothing.OnEnable" + parameter="edit" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_cof_gear.xml b/indra/newview/skins/default/xui/en/menu_cof_gear.xml new file mode 100644 index 0000000000..982d4f2015 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_cof_gear.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<menu + layout="topleft" + name="Gear COF"> + <menu_item_call + label="Add To Outfit" + layout="topleft" + name="add"> + <on_click + function="Gear.OnClick" + parameter="add"/> + <on_enable + function="Gear.OnEnable" + parameter="add" /> + </menu_item_call> +</menu> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml index 03bd93e271..ea18e02ca1 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml @@ -16,8 +16,8 @@ function="Self.EnableStandUp" /> </menu_item_call> <menu_item_call - label="My Appearance" - name="my_appearance"> + label="Change Outfit" + name="change_outfit"> <menu_item_call.on_click function="CustomizeAvatar" /> <menu_item_call.on_enable diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index e95300a4b3..9fac296e26 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -22,7 +22,7 @@ </menu_item_call> <menu_item_separator /> <menu_item_call - label="Quit [APP_NAME]" + label="Exit [APP_NAME]" name="Quit" shortcut="control|Q"> <menu_item_call.on_click diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml new file mode 100644 index 0000000000..dfc72b557c --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<menu + layout="topleft" + name="Gear Outfit"> + <menu_item_call + label="Wear - Replace Current Outfit" + layout="topleft" + name="wear"> + <on_click + function="Gear.OnClick" + parameter="wear"/> + <on_enable + function="Gear.OnEnable" + parameter="wear" /> + </menu_item_call> + <menu_item_call + label="Take Off - Remove Current Outfit" + layout="topleft" + name="take_off"> + <on_click + function="Gear.OnClick" + parameter="take_off"/> + <on_enable + function="Gear.OnEnable" + parameter="take_off" /> + </menu_item_call> + <menu_item_separator /> + <menu_item_call + label="Rename" + layout="topleft" + name="rename"> + <on_click + function="Gear.OnClick" + parameter="rename"/> + <on_enable + function="Gear.OnEnable" + parameter="rename" /> + </menu_item_call> + <menu_item_call + label="Delete Outfit" + layout="topleft" + name="delete_outfit"> + <on_click + function="Gear.OnClick" + parameter="delete_outfit"/> + <on_enable + function="Gear.OnEnable" + parameter="delete_outfit" /> + </menu_item_call> +</menu> diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml new file mode 100644 index 0000000000..8f3e62157a --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="Outfit"> + <menu_item_call + label="Wear - Replace Current Outfit" + layout="topleft" + name="wear_replace"> + <on_click + function="Outfit.WearReplace" /> + </menu_item_call> + <menu_item_call + label="Wear - Add to Current Outfit" + layout="topleft" + name="wear_add"> + <on_click + function="Outfit.WearAdd" /> + </menu_item_call> + <menu_item_call + label="Take Off - Remove Current Outfit" + layout="topleft" + name="take_off"> + <on_click + function="Outfit.TakeOff" /> + </menu_item_call> + <menu_item_separator /> + <menu_item_call + label="Rename" + layout="topleft" + name="rename"> + <on_click + function="Outfit.Rename" /> + </menu_item_call> + <menu_item_call + label="Delete Outfit" + layout="topleft" + name="delete"> + <on_click + function="Outfit.Delete" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml index 2515b60868..4ed5807808 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -6,31 +6,31 @@ label="Sort by Name" layout="topleft" name="SortByName"> - <menu_item_check.on_click - function="ParticipantList.Sort" - parameter="sort_by_name" /> - <menu_item_check.on_check + <on_check function="ParticipantList.CheckItem" parameter="is_sorted_by_name" /> + <on_click + function="ParticipantList.Sort" + parameter="sort_by_name" /> </menu_item_check> <menu_item_check label="Sort by Recent Speakers" layout="topleft" name="SortByRecentSpeakers"> - <menu_item_check.on_click - function="ParticipantList.Sort" - parameter="sort_by_recent_speakers" /> - <menu_item_check.on_check + <on_check function="ParticipantList.CheckItem" parameter="is_sorted_by_recent_speakers" /> + <on_click + function="ParticipantList.Sort" + parameter="sort_by_recent_speakers" /> </menu_item_check> <menu_item_call label="View Profile" layout="topleft" name="View Profile"> - <menu_item_call.on_click + <on_click function="Avatar.Profile" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_view_profile" /> </menu_item_call> @@ -38,9 +38,9 @@ label="Add Friend" layout="topleft" name="Add Friend"> - <menu_item_call.on_click + <on_click function="Avatar.AddFriend" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_add" /> </menu_item_call> @@ -48,9 +48,9 @@ label="IM" layout="topleft" name="IM"> - <menu_item_call.on_click + <on_click function="Avatar.IM" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_im" /> </menu_item_call> @@ -58,20 +58,19 @@ label="Call" layout="topleft" name="Call"> - <menu_item_call.on_click + <on_click function="Avatar.Call" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_call" /> </menu_item_call> <menu_item_call - enabled="true" label="Share" layout="topleft" name="Share"> - <menu_item_call.on_click + <on_click function="Avatar.Share" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_share" /> </menu_item_call> @@ -79,37 +78,38 @@ label="Pay" layout="topleft" name="Pay"> - <menu_item_call.on_click + <on_click function="Avatar.Pay" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_pay" /> </menu_item_call> <menu_item_separator - layout="topleft" - name="View Icons Separator" /> + layout="topleft" + name="View Icons Separator" /> <menu_item_check - label="View People Icons" - name="View Icons"> - <on_click - function="ToggleControl" - parameter="ParticipantListShowIcons"/> - <on_check - function="CheckControl" - parameter="ParticipantListShowIcons" /> + label="View People Icons" + layout="topleft" + name="View Icons"> + <on_check + function="CheckControl" + parameter="ParticipantListShowIcons" /> + <on_click + function="ToggleControl" + parameter="ParticipantListShowIcons" /> </menu_item_check> <menu_item_separator - layout="topleft" /> + layout="topleft" /> <menu_item_check label="Block Voice" layout="topleft" name="Block/Unblock"> - <menu_item_check.on_click - function="Avatar.BlockUnblock" /> - <menu_item_check.on_check + <on_check function="ParticipantList.CheckItem" parameter="is_blocked" /> - <menu_item_check.on_enable + <on_click + function="Avatar.BlockUnblock" /> + <on_enable function="ParticipantList.EnableItem" parameter="can_block" /> </menu_item_check> @@ -126,71 +126,72 @@ function="ParticipantList.EnableItem" parameter="can_mute_text" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <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="ParticipantList.CheckItem" - parameter="is_allowed_text_chat" /> - <on_click - function="ParticipantList.ToggleAllowTextChat" /> - <on_enable - function="ParticipantList.EnableItem" - parameter="can_allow_text_chat" /> - </menu_item_check> - <menu_item_separator - layout="topleft" - name="moderate_voice_separator" /> - <menu_item_call - label="Mute this participant" - layout="topleft" - name="ModerateVoiceMuteSelected"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="selected" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> - <menu_item_call - label="Mute everyone else" - layout="topleft" - name="ModerateVoiceMuteOthers"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="others" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> - <menu_item_call - label="Unmute this participant" - layout="topleft" - name="ModerateVoiceUnMuteSelected"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="selected" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> - <menu_item_call - label="Unmute everyone else" - layout="topleft" - name="ModerateVoiceUnMuteOthers"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="others" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> + name="Moderator Options"> + <menu_item_check + label="Allow text chat" + layout="topleft" + name="AllowTextChat"> + <on_check + function="ParticipantList.CheckItem" + parameter="is_allowed_text_chat" /> + <on_click + function="ParticipantList.ToggleAllowTextChat" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_allow_text_chat" /> + </menu_item_check> + <menu_item_separator + layout="topleft" + name="moderate_voice_separator" /> + <menu_item_call + label="Mute this participant" + layout="topleft" + name="ModerateVoiceMuteSelected"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="selected" /> + <on_enable + function="ParticipantList.EnableItem.Moderate" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Unmute this participant" + layout="topleft" + name="ModerateVoiceUnMuteSelected"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="selected" /> + <on_enable + function="ParticipantList.EnableItem.Moderate" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Mute everyone" + layout="topleft" + name="ModerateVoiceMute"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="mute_all" /> + <on_enable + function="ParticipantList.EnableItem.Moderate" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Unmute everyone" + layout="topleft" + name="ModerateVoiceUnmute"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="unmute_all" /> + <on_enable + function="ParticipantList.EnableItem.Moderate" + parameter="can_moderate_voice" /> + </menu_item_call> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_save_outfit.xml b/indra/newview/skins/default/xui/en/menu_save_outfit.xml index a8778df7f6..6285bf7417 100644 --- a/indra/newview/skins/default/xui/en/menu_save_outfit.xml +++ b/indra/newview/skins/default/xui/en/menu_save_outfit.xml @@ -14,9 +14,9 @@ </menu_item_call> <menu_item_call name="save_as_new_outfit" - label="Save As New"> + label="Save As"> <menu_item_call.on_click - function="Outfit.SaveAsNew.Action" + function="Outfit.SaveAs.Action" userdata="" /> </menu_item_call> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index eefcabdd39..aff8f7ddf4 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -38,8 +38,8 @@ parameter="agent" /> </menu_item_call> <menu_item_call - label="My Appearance" - name="Appearance"> + label="Change Outfit" + name="ChangeOutfit"> <menu_item_call.on_click function="CustomizeAvatar" /> <menu_item_call.on_enable @@ -90,7 +90,6 @@ <menu_item_call.on_click function="World.SetAway" /> </menu_item_call> - <menu_item_separator/> <menu_item_call label="Busy" name="Set Busy"> @@ -116,7 +115,7 @@ </menu_item_call> <menu_item_separator/> <menu_item_call - label="Quit [APP_NAME]" + label="Exit [APP_NAME]" name="Quit" shortcut="control|Q"> <menu_item_call.on_click @@ -522,6 +521,52 @@ <menu_item_check.on_enable function="Tools.EnableToolNotPie" /> </menu_item_check> + <menu + create_jump_keys="true" + label="Select Linked Parts" + name="Select Linked Parts" + tear_off="true"> + <menu_item_call + label="Select Next Part" + name="Select Next Part" + shortcut="control|."> + <menu_item_call.on_click + function="Tools.SelectNextPart" + parameter="next" /> + <menu_item_call.on_enable + function="Tools.EnableSelectNextPart" /> + </menu_item_call> + <menu_item_call + label="Select Previous Part" + name="Select Previous Part" + shortcut="control|,"> + <menu_item_call.on_click + function="Tools.SelectNextPart" + parameter="previous" /> + <menu_item_call.on_enable + function="Tools.EnableSelectNextPart" /> + </menu_item_call> + <menu_item_call + label="Include Next Part" + name="Include Next Part" + shortcut="control|shift|."> + <menu_item_call.on_click + function="Tools.SelectNextPart" + parameter="includenext" /> + <menu_item_call.on_enable + function="Tools.EnableSelectNextPart" /> + </menu_item_call> + <menu_item_call + label="Include Previous Part" + name="Include Previous Part" + shortcut="control|shift|,"> + <menu_item_call.on_click + function="Tools.SelectNextPart" + parameter="includeprevious" /> + <menu_item_call.on_enable + function="Tools.EnableSelectNextPart" /> + </menu_item_call> + </menu> <menu_item_separator/> <menu_item_call label="Focus on Selection" @@ -765,49 +810,60 @@ </menu> <menu create_jump_keys="true" - label="Select Linked Parts" - name="Select Linked Parts" + label="Upload" + layout="topleft" + name="Upload" tear_off="true"> <menu_item_call - label="Select Next Part" - name="Select Next Part" - shortcut="control|."> + label="Image (L$[COST])..." + layout="topleft" + name="Upload Image" + shortcut="control|U"> <menu_item_call.on_click - function="Tools.SelectNextPart" - parameter="next" /> + function="File.UploadImage" + parameter="" /> <menu_item_call.on_enable - function="Tools.EnableSelectNextPart" /> + function="File.EnableUpload" /> + <menu_item_call.on_visible + function="Upload.CalculateCosts" + parameter="Upload Image" /> </menu_item_call> <menu_item_call - label="Select Previous Part" - name="Select Previous Part" - shortcut="control|,"> + label="Sound (L$[COST])..." + layout="topleft" + name="Upload Sound"> <menu_item_call.on_click - function="Tools.SelectNextPart" - parameter="previous" /> + function="File.UploadSound" + parameter="" /> <menu_item_call.on_enable - function="Tools.EnableSelectNextPart" /> + function="File.EnableUpload" /> + <menu_item_call.on_visible + function="Upload.CalculateCosts" + parameter="Upload Sound" /> </menu_item_call> <menu_item_call - label="Include Next Part" - name="Include Next Part" - shortcut="control|shift|."> + label="Animation (L$[COST])..." + layout="topleft" + name="Upload Animation"> <menu_item_call.on_click - function="Tools.SelectNextPart" - parameter="includenext" /> + function="File.UploadAnim" + parameter="" /> <menu_item_call.on_enable - function="Tools.EnableSelectNextPart" /> + function="File.EnableUpload" /> + <menu_item_call.on_visible + function="Upload.CalculateCosts" + parameter="Upload Animation" /> </menu_item_call> <menu_item_call - label="Include Previous Part" - name="Include Previous Part" - shortcut="control|shift|,"> + label="Bulk (L$[COST] per file)..." + layout="topleft" + name="Bulk Upload"> <menu_item_call.on_click - function="Tools.SelectNextPart" - parameter="includeprevious" /> - <menu_item_call.on_enable - function="Tools.EnableSelectNextPart" /> + function="File.UploadBulk" + parameter="" /> </menu_item_call> + <menu_item_separator + layout="topleft" /> </menu> </menu> <menu @@ -3211,4 +3267,4 @@ </menu> </menu> </menu> -</menu_bar> +</menu_bar>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml new file mode 100644 index 0000000000..7ea7eaade5 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + name="Outfit Wearable Context Menu"> + <menu_item_call + label="Wear" + layout="topleft" + name="wear"> + <on_click + function="Wearable.Wear" /> + </menu_item_call> + <menu_item_call + label="Detach" + layout="topleft" + name="detach"> + <on_click + function="Attachment.Detach" /> + </menu_item_call> +<!-- *TODO: implement the submenus + <menu + label="Attach to" + layout="topleft" + name="attach_to" /> + <menu + label="Attach to HUD" + layout="topleft" + name="attach_to_hud" /> +--> + <menu_item_call + label="Object Profile" + layout="topleft" + name="object_profile"> + <on_click + function="Attachment.Profile" /> + </menu_item_call> + <menu_item_call + label="Take Off" + layout="topleft" + name="take_off"> + <on_click + function="Clothing.TakeOff" + parameter="take_off"/> + </menu_item_call> + <menu_item_call + label="Edit" + layout="topleft" + name="edit"> + <on_click + function="Wearable.Edit" + parameter="edit"/> + </menu_item_call> + <menu_item_call + label="Show Original" + layout="topleft" + name="show_original"> + <on_click + function="Wearable.ShowOriginal" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 4479a3dd4d..079d029eab 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -735,6 +735,14 @@ You need an account to enter [SECOND_LIFE]. Would you like to create one now? <notification icon="alertmodal.tga" + name="InvalidCredentialFormat" + type="alertmodal"> +You need to enter both the First and Last name of your avatar into the Username field, then login again. + </notification> + + + <notification + icon="alertmodal.tga" name="AddClassified" type="alertmodal"> Classified ads appear in the 'Classified' section of the Search directory and on [http://secondlife.com/community/classifieds secondlife.com] for one week. @@ -1199,6 +1207,7 @@ Eject [AVATAR_NAME] from your land? <notification icon="alertmodal.tga" name="EjectAvatarFromGroup" + persist="true" type="notify"> You ejected [AVATAR_NAME] from group [GROUP_NAME] </notification> @@ -1384,6 +1393,18 @@ Unable to encode file: [FILE] <notification icon="alertmodal.tga" + name="CorruptedProtectedDataStore" + type="alertmodal"> + We are unable to read your protected data so it is being reset. + This may happen when you change network setup. + + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" name="CorruptResourceFile" type="alertmodal"> Corrupt resource file: [FILE] @@ -2124,6 +2145,19 @@ Please enter a higher price. <notification icon="alertmodal.tga" + name="ConfirmItemDeleteHasLinks" + type="alertmodal"> +At least one of the items you has link items that point to it. If you delete this item, its links will permanently stop working. It is strongly advised to delete the links first. + +Are you sure you want to delete these items? + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" name="ConfirmObjectDeleteLock" type="alertmodal"> At least one of the items you have selected is locked. @@ -2417,6 +2451,57 @@ Please choose the male or female avatar. You can change your mind later. notext="Female" yestext="Male"/> </notification> + <notification icon="alertmodal.tga" + name="CantTeleportToGrid" + type="alertmodal"> +Could not teleport to [SLURL] as it's on a different grid ([GRID]) than the current grid ([CURRENT_GRID]). Please close your viewer and try again. + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + + <notification icon="alertmodal.tga" + name="GeneralCertificateError" + type="alertmodal"> +Could not connect to the server. +[REASON] + +SubjectName: [SUBJECT_NAME_STRING] +IssuerName: [ISSUER_NAME_STRING] +Valid From: [VALID_FROM] +Valid To: [VALID_TO] +MD5 Fingerprint: [SHA1_DIGEST] +SHA1 Fingerprint: [MD5_DIGEST] +Key Usage: [KEYUSAGE] +Extended Key Usage: [EXTENDEDKEYUSAGE] +Subject Key Identifier: [SUBJECTKEYIDENTIFIER] + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + + <notification icon="alertmodal.tga" + name="TrustCertificateError" + type="alertmodal"> +The certification authority for this server is not known. + +Certificate Information: +SubjectName: [SUBJECT_NAME_STRING] +IssuerName: [ISSUER_NAME_STRING] +Valid From: [VALID_FROM] +Valid To: [VALID_TO] +MD5 Fingerprint: [SHA1_DIGEST] +SHA1 Fingerprint: [MD5_DIGEST] +Key Usage: [KEYUSAGE] +Extended Key Usage: [EXTENDEDKEYUSAGE] +Subject Key Identifier: [SUBJECTKEYIDENTIFIER] + +Would you like to trust this authority? + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="Trust"/> + </notification> <notification icon="alertmodal.tga" @@ -2428,6 +2513,7 @@ Please choose the male or female avatar. You can change your mind later. <notification icon="alertmodal.tga" name="GrantedModifyRights" + persist="true" type="notify"> [NAME] has given you permission to edit their objects. </notification> @@ -2435,6 +2521,7 @@ Please choose the male or female avatar. You can change your mind later. <notification icon="alertmodal.tga" name="RevokedModifyRights" + persist="true" type="notify"> Your privilege to modify [NAME]'s objects has been revoked </notification> @@ -3364,7 +3451,7 @@ You are not allowed in that region due to your maturity Rating. type="alertmodal"> You are not allowed in that Region due to your maturity Rating preference. -You can click 'Change Preference' to raise your maturity Rating preference now and allow you to enter. You will be able to search and access [REGIONMATURITY] content from now on. If you later want to change this setting back, go to Me > Preferences > General. +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. <form name="form"> <button index="0" @@ -3383,7 +3470,7 @@ You can click 'Change Preference' to raise your maturity Rating prefer icon="notifytip.tga" name="PreferredMaturityChanged" type="notifytip"> -Your maturity rating preference is now [RATING]. +Your maturity Rating preference is now [RATING]. </notification> <notification @@ -4349,6 +4436,7 @@ Replaced missing clothing/body part with default. <notification icon="groupnotify" name="GroupNotice" + persist="true" type="groupnotify"> Topic: [SUBJECT], Message: [MESSAGE] </notification> @@ -4397,6 +4485,7 @@ Do you wish to proceed? <notification icon="notify.tga" name="UploadPayment" + persist="true" type="notify"> You paid L$[AMOUNT] to upload. </notification> @@ -4684,6 +4773,7 @@ Please select at least one type of content to search (General, Moderate, or Adul <notification icon="notify.tga" name="SystemMessage" + persist="true" type="notify"> [MESSAGE] </notification> @@ -4691,10 +4781,13 @@ Please select at least one type of content to search (General, Moderate, or Adul <notification icon="notify.tga" name="PaymentRecived" + persist="true" type="notify"> [MESSAGE] </notification> + <!-- EventNotification couldn't be persist since server decide is it necessary to notify + user about subscribed event via LLEventNotifier--> <notification icon="notify.tga" name="EventNotification" @@ -4722,6 +4815,7 @@ Event Notification: <notification icon="notify.tga" name="TransferObjectsHighlighted" + persist="true" type="notify"> All objects on this parcel that will transfer to the purchaser of this parcel are now highlighted. @@ -4737,6 +4831,7 @@ All objects on this parcel that will transfer to the purchaser of this parcel ar <notification icon="notify.tga" name="DeactivatedGesturesTrigger" + persist="true" type="notify"> Deactivated gestures with same trigger: [NAMES] @@ -4745,6 +4840,7 @@ Deactivated gestures with same trigger: <notification icon="notify.tga" name="NoQuickTime" + persist="true" type="notify"> Apple's QuickTime software does not appear to be installed on your system. If you want to view streaming media on parcels that support it you should go to the [http://www.apple.com/quicktime QuickTime site] and install the QuickTime Player. @@ -4752,6 +4848,7 @@ If you want to view streaming media on parcels that support it you should go to <notification icon="notify.tga" name="NoPlugin" + persist="true" type="notify"> No Media Plugin was found to handle the "[MIME_TYPE]" mime type. Media of this type will be unavailable. </notification> @@ -4771,6 +4868,7 @@ Please re-install the plugin or contact the vendor if you continue to experience <notification icon="notify.tga" name="OwnedObjectsReturned" + persist="true" type="notify"> The objects you own on the selected parcel of land have been returned back to your inventory. </notification> @@ -4778,6 +4876,7 @@ The objects you own on the selected parcel of land have been returned back to yo <notification icon="notify.tga" name="OtherObjectsReturned" + persist="true" type="notify"> The objects on the selected parcel of land that is owned by [FIRST] [LAST] have been returned to his or her inventory. </notification> @@ -4785,6 +4884,7 @@ The objects on the selected parcel of land that is owned by [FIRST] [LAST] have <notification icon="notify.tga" name="OtherObjectsReturned2" + persist="true" type="notify"> The objects on the selected parcel of land owned by the Resident '[NAME]' have been returned to their owner. </notification> @@ -4792,6 +4892,7 @@ The objects on the selected parcel of land owned by the Resident '[NAME]&ap <notification icon="notify.tga" name="GroupObjectsReturned" + persist="true" type="notify"> The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner's inventory. Transferable deeded objects have been returned to their previous owners. @@ -4801,6 +4902,7 @@ Non-transferable objects that are deeded to the group have been deleted. <notification icon="notify.tga" name="UnOwnedObjectsReturned" + persist="true" type="notify"> The objects on the selected parcel that are NOT owned by you have been returned to their owners. </notification> @@ -4808,6 +4910,7 @@ The objects on the selected parcel that are NOT owned by you have been returned <notification icon="notify.tga" name="ServerObjectMessage" + persist="true" type="notify"> Message from [NAME]: <nolink>[MSG]</nolink> @@ -4816,6 +4919,7 @@ Message from [NAME]: <notification icon="notify.tga" name="NotSafe" + persist="true" type="notify"> This land has damage enabled. You can be hurt here. If you die, you will be teleported to your home location. @@ -4825,6 +4929,7 @@ You can be hurt here. If you die, you will be teleported to your home location. <notification icon="notify.tga" name="NoFly" + persist="true" type="notify"> This area has flying disabled. You can't fly here. @@ -4834,6 +4939,7 @@ You can't fly here. <notification icon="notify.tga" name="PushRestricted" + persist="true" type="notify"> This area does not allow pushing. You can't push others here unless you own the land. <unique/> @@ -4842,6 +4948,7 @@ This area does not allow pushing. You can't push others here unless you own <notification icon="notify.tga" name="NoVoice" + persist="true" type="notify"> This area has voice chat disabled. You won't be able to hear anyone talking. <unique/> @@ -4850,6 +4957,7 @@ This area has voice chat disabled. You won't be able to hear anyone talking <notification icon="notify.tga" name="NoBuild" + persist="true" type="notify"> This area has building disabled. You can't build or rez objects here. <unique/> @@ -4858,6 +4966,7 @@ This area has building disabled. You can't build or rez objects here. <notification icon="notify.tga" name="ScriptsStopped" + persist="true" type="notify"> An administrator has temporarily stopped scripts in this region. </notification> @@ -4865,6 +4974,7 @@ An administrator has temporarily stopped scripts in this region. <notification icon="notify.tga" name="ScriptsNotRunning" + persist="true" type="notify"> This region is not running any scripts. </notification> @@ -4872,6 +4982,7 @@ This region is not running any scripts. <notification icon="notify.tga" name="NoOutsideScripts" + persist="true" type="notify"> This land has outside scripts disabled. @@ -4881,6 +4992,7 @@ No scripts will work here except those belonging to the land owner. <notification icon="notify.tga" name="ClaimPublicLand" + persist="true" type="notify"> You can only claim public land in the Region you're in. </notification> @@ -4888,6 +5000,7 @@ You can only claim public land in the Region you're in. <notification icon="notify.tga" name="RegionTPAccessBlocked" + persist="true" type="notify"> You aren't allowed in that Region due to your maturity Rating. You may need to validate your age and/or install the latest Viewer. @@ -4897,6 +5010,7 @@ Please go to the Knowledge Base for details on accessing areas with this maturit <notification icon="notify.tga" name="URBannedFromRegion" + persist="true" type="notify"> You are banned from the region. </notification> @@ -4904,6 +5018,7 @@ You are banned from the region. <notification icon="notify.tga" name="NoTeenGridAccess" + persist="true" type="notify"> Your account cannot connect to this teen grid region. </notification> @@ -4911,6 +5026,7 @@ Your account cannot connect to this teen grid region. <notification icon="notify.tga" name="ImproperPaymentStatus" + persist="true" type="notify"> You do not have proper payment status to enter this region. </notification> @@ -4918,6 +5034,7 @@ You do not have proper payment status to enter this region. <notification icon="notify.tga" name="MustGetAgeRgion" + persist="true" type="notify"> You must be age-verified to enter this region. </notification> @@ -4925,6 +5042,7 @@ You must be age-verified to enter this region. <notification icon="notify.tga" name="MustGetAgeParcel" + persist="true" type="notify"> You must be age-verified to enter this parcel. </notification> @@ -4932,6 +5050,7 @@ You must be age-verified to enter this parcel. <notification icon="notify.tga" name="NoDestRegion" + persist="true" type="notify"> No destination region found. </notification> @@ -4939,6 +5058,7 @@ No destination region found. <notification icon="notify.tga" name="NotAllowedInDest" + persist="true" type="notify"> You are not allowed into the destination. </notification> @@ -4946,6 +5066,7 @@ You are not allowed into the destination. <notification icon="notify.tga" name="RegionParcelBan" + persist="true" type="notify"> Cannot region cross into banned parcel. Try another way. </notification> @@ -4953,6 +5074,7 @@ Cannot region cross into banned parcel. Try another way. <notification icon="notify.tga" name="TelehubRedirect" + persist="true" type="notify"> You have been redirected to a telehub. </notification> @@ -4960,6 +5082,7 @@ You have been redirected to a telehub. <notification icon="notify.tga" name="CouldntTPCloser" + persist="true" type="notify"> Could not teleport closer to destination. </notification> @@ -4967,6 +5090,7 @@ Could not teleport closer to destination. <notification icon="notify.tga" name="TPCancelled" + persist="true" type="notify"> Teleport cancelled. </notification> @@ -4974,6 +5098,7 @@ Teleport cancelled. <notification icon="notify.tga" name="FullRegionTryAgain" + persist="true" type="notify"> The region you are attempting to enter is currently full. Please try again in a few moments. @@ -4982,6 +5107,7 @@ Please try again in a few moments. <notification icon="notify.tga" name="GeneralFailure" + persist="true" type="notify"> General failure. </notification> @@ -4989,6 +5115,7 @@ General failure. <notification icon="notify.tga" name="RoutedWrongRegion" + persist="true" type="notify"> Routed to wrong region. Please try again. </notification> @@ -4996,6 +5123,7 @@ Routed to wrong region. Please try again. <notification icon="notify.tga" name="NoValidAgentID" + persist="true" type="notify"> No valid agent id. </notification> @@ -5003,6 +5131,7 @@ No valid agent id. <notification icon="notify.tga" name="NoValidSession" + persist="true" type="notify"> No valid session id. </notification> @@ -5010,6 +5139,7 @@ No valid session id. <notification icon="notify.tga" name="NoValidCircuit" + persist="true" type="notify"> No valid circuit code. </notification> @@ -5017,6 +5147,7 @@ No valid circuit code. <notification icon="notify.tga" name="NoValidTimestamp" + persist="true" type="notify"> No valid timestamp. </notification> @@ -5024,6 +5155,7 @@ No valid timestamp. <notification icon="notify.tga" name="NoPendingConnection" + persist="true" type="notify"> Unable to create pending connection. </notification> @@ -5031,6 +5163,7 @@ Unable to create pending connection. <notification icon="notify.tga" name="InternalUsherError" + persist="true" type="notify"> Internal error attempting to connect agent usher. </notification> @@ -5038,6 +5171,7 @@ Internal error attempting to connect agent usher. <notification icon="notify.tga" name="NoGoodTPDestination" + persist="true" type="notify"> Unable to find a good teleport destination in this region. </notification> @@ -5045,6 +5179,7 @@ Unable to find a good teleport destination in this region. <notification icon="notify.tga" name="InternalErrorRegionResolver" + persist="true" type="notify"> Internal error attempting to activate region resolver. </notification> @@ -5052,6 +5187,7 @@ Internal error attempting to activate region resolver. <notification icon="notify.tga" name="NoValidLanding" + persist="true" type="notify"> A valid landing point could not be found. </notification> @@ -5059,6 +5195,7 @@ A valid landing point could not be found. <notification icon="notify.tga" name="NoValidParcel" + persist="true" type="notify"> No valid parcel could be found. </notification> @@ -5066,7 +5203,6 @@ No valid parcel could be found. <notification icon="notify.tga" name="ObjectGiveItem" - persist="true" type="offer"> An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJECTTYPE]: [ITEM_SLURL] @@ -5088,30 +5224,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC <notification icon="notify.tga" - name="ObjectGiveItemUnknownUser" - type="offer"> -An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you this [OBJECTTYPE]: -[ITEM_SLURL] - <form name="form"> - <button - index="0" - name="Keep" - text="Keep"/> - <button - index="1" - name="Discard" - text="Discard"/> - <button - index="2" - name="Mute" - text="Block"/> - </form> - </notification> - - <notification - icon="notify.tga" name="UserGiveItem" - persist="true" type="offer"> [NAME_SLURL] has given you this [OBJECTTYPE]: [ITEM_SLURL] @@ -5134,6 +5247,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="GodMessage" + persist="true" type="notify"> [NAME] @@ -5143,6 +5257,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="JoinGroup" + persist="true" type="notify"> [MESSAGE] <form name="form"> @@ -5164,7 +5279,6 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="TeleportOffered" - persist="true" type="offer"> [NAME_SLURL] has offered to teleport you to their location: @@ -5192,6 +5306,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="GotoURL" + persist="true" type="notify"> [MESSAGE] [URL] @@ -5210,7 +5325,6 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="OfferFriendship" - persist="true" type="offer"> [NAME_SLURL] is offering friendship. @@ -5239,6 +5353,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="OfferFriendshipNoMessage" + persist="true" type="notify"> [NAME] is offering friendship. @@ -5265,6 +5380,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="FriendshipDeclined" + persist="true" type="notify"> [NAME] declined your friendship offer. </notification> @@ -5286,6 +5402,7 @@ Friendship offer declined. <notification icon="notify.tga" name="OfferCallingCard" + persist="true" type="notify"> [FIRST] [LAST] is offering their calling card. This will add a bookmark in your inventory so you can quickly IM this Resident. @@ -5306,6 +5423,7 @@ This will add a bookmark in your inventory so you can quickly IM this Resident. name="RegionRestartMinutes" priority="high" sound="UISndAlert" + persist="true" type="notify"> This region will restart in [MINUTES] minutes. If you stay in this region you will be logged out. @@ -5316,6 +5434,7 @@ If you stay in this region you will be logged out. name="RegionRestartSeconds" priority="high" sound="UISndAlert" + persist="true" type="notify"> This region will restart in [SECONDS] seconds. If you stay in this region you will be logged out. @@ -5324,6 +5443,7 @@ If you stay in this region you will be logged out. <notification icon="notify.tga" name="LoadWebPage" + persist="true" type="notify"> Load web page [URL]? @@ -5345,6 +5465,7 @@ From object: [OBJECTNAME], owner: [NAME]? <notification icon="notify.tga" name="FailedToFindWearableUnnamed" + persist="true" type="notify"> Failed to find [TYPE] in database. </notification> @@ -5352,6 +5473,7 @@ Failed to find [TYPE] in database. <notification icon="notify.tga" name="FailedToFindWearable" + persist="true" type="notify"> Failed to find [TYPE] named [DESC] in database. </notification> @@ -5359,6 +5481,7 @@ Failed to find [TYPE] named [DESC] in database. <notification icon="notify.tga" name="ShareToWebFailed" + persist="true" type="notify"> Failed to upload image to web. </notification> @@ -5366,6 +5489,7 @@ Failed to find [TYPE] named [DESC] in database. <notification icon="notify.tga" name="InvalidWearable" + persist="true" type="notify"> The item you are trying to wear uses a feature that your Viewer can't read. Please upgrade your version of [APP_NAME] to wear this item. </notification> @@ -5373,6 +5497,7 @@ The item you are trying to wear uses a feature that your Viewer can't read. <notification icon="notify.tga" name="ScriptQuestion" + persist="true" type="notify"> '[OBJECTNAME]', an object owned by '[NAME]', would like to: @@ -5398,6 +5523,7 @@ Is this OK? icon="notify.tga" name="ScriptQuestionCaution" priority="high" + persist="true" type="notify"> An object named '[OBJECTNAME]', owned by '[NAME]' would like to: @@ -5425,6 +5551,7 @@ Grant this request? <notification icon="notify.tga" name="ScriptDialog" + persist="true" type="notify"> [FIRST] [LAST]'s '[TITLE]' [MESSAGE] @@ -5439,6 +5566,7 @@ Grant this request? <notification icon="notify.tga" name="ScriptDialogGroup" + persist="true" type="notify"> [GROUPNAME]'s '[TITLE]' [MESSAGE] @@ -5454,6 +5582,7 @@ Grant this request? <notification icon="notify.tga" name="FirstBalanceIncrease" + persist="true" type="notify"> You just received L$[AMOUNT]. Your L$ balance is shown in the upper-right. @@ -5462,6 +5591,7 @@ Your L$ balance is shown in the upper-right. <notification icon="notify.tga" name="FirstBalanceDecrease" + persist="true" type="notify"> You just paid L$[AMOUNT]. Your L$ balance is shown in the upper-right. @@ -5471,6 +5601,7 @@ Your L$ balance is shown in the upper-right. <notification icon="notify.tga" name="BuyLindenDollarSuccess" + persist="true" type="notify"> Thank you for your payment! @@ -5483,6 +5614,7 @@ The status of your payment can be checked on your Transaction History page on yo <notification icon="notify.tga" name="FirstSit" + persist="true" type="notify"> You are sitting. Use your arrow keys (or AWSD) to look around. @@ -5492,6 +5624,7 @@ Click the 'Stand Up' button to stand. <notification icon="notify.tga" name="FirstMap" + persist="true" type="notify"> Click and drag the map to look around. Double-click to teleport. @@ -5501,6 +5634,7 @@ Use the controls on the right to find things and display different backgrounds. <notification icon="notify.tga" name="FirstBuild" + persist="true" type="notify"> You have opened the Build Tools. Every object you see around you was created using these tools. </notification> @@ -5510,6 +5644,7 @@ You have opened the Build Tools. Every object you see around you was created usi <notification icon="notify.tga" name="FirstLeftClickNoHit" + persist="true" type="notify"> Left-clicking interacts with special objects. If the mouse pointer changes to a hand, you can interact with the object. @@ -5519,6 +5654,7 @@ You have opened the Build Tools. Every object you see around you was created usi <notification icon="notify.tga" name="FirstTeleport" + persist="true" type="notify"> You can only teleport to certain areas in this region. The arrow points to your specific destination. Click the arrow to dismiss it. </notification> @@ -5528,6 +5664,7 @@ You can only teleport to certain areas in this region. The arrow points to your <notification icon="notify.tga" name="FirstOverrideKeys" + persist="true" type="notify"> Your movement keys are now being handled by an object. Try the arrow keys or AWSD to see what they do. @@ -5539,6 +5676,7 @@ Press 'M' to do this. <notification icon="notify.tga" name="FirstAppearance" + persist="true" type="notify"> You are editing your Appearance. Use the arrow keys to look around. @@ -5548,6 +5686,7 @@ When you are done, press 'Save All'. <notification icon="notify.tga" name="FirstInventory" + persist="true" type="notify"> This is your Inventory, which contains items you own. @@ -5560,6 +5699,7 @@ This is your Inventory, which contains items you own. <notification icon="notify.tga" name="FirstSandbox" + persist="true" type="notify"> This is a sandbox area, and is meant to help Residents learn how to build. @@ -5570,6 +5710,7 @@ Things you build here will be deleted after you leave, so don't forget to r <notification icon="notify.tga" name="FirstFlexible" + persist="true" type="notify"> This object is flexible. Flexis must be phantom and not physical. </notification> @@ -5577,6 +5718,7 @@ This object is flexible. Flexis must be phantom and not physical. <notification icon="notify.tga" name="FirstDebugMenus" + persist="true" type="notify"> You opened the Advanced menu. @@ -5589,6 +5731,7 @@ To toggle this menu, <notification icon="notify.tga" name="FirstSculptedPrim" + persist="true" type="notify"> You are editing a Sculpted prim. Sculpties require a special texture to define their shape. </notification> @@ -5598,6 +5741,7 @@ You are editing a Sculpted prim. Sculpties require a special texture to define t <notification icon="notify.tga" name="FirstMedia" + persist="true" type="notify"> You have begun playing media. Media can set to play automatically in the preferences window under Audio / Video. Note that this can be a security risk for media sites you do not trust. </notification> @@ -5638,6 +5782,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block <notification icon="notify.tga" name="AutoUnmuteByIM" + persist="true" type="notify"> [FIRST] [LAST] was sent an instant message and has been automatically unblocked. </notification> @@ -5645,6 +5790,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block <notification icon="notify.tga" name="AutoUnmuteByMoney" + persist="true" type="notify"> [FIRST] [LAST] was given money and has been automatically unblocked. </notification> @@ -5652,6 +5798,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block <notification icon="notify.tga" name="AutoUnmuteByInventory" + persist="true" type="notify"> [FIRST] [LAST] was offered inventory and has been automatically unblocked. </notification> @@ -5971,12 +6118,154 @@ The button will be shown when there is enough space for it. type="notifytip"> Drag items from inventory onto a person in the resident picker </notification> + <notification + icon="notifytip.tga" + name="DeedToGroupFail" + type="notifytip"> +Deed to group failed. + </notification> <notification icon="notifytip.tga" name="AvatarRezNotification" type="notifytip"> -Avatar '[NAME]' rezzed in [TIME] seconds. +( [EXISTENCE] seconds alive ) +Avatar '[NAME]' declouded after [TIME] seconds. + </notification> + + <notification + icon="notifytip.tga" + name="AvatarRezSelfBakedDoneNotification" + type="notifytip"> +( [EXISTENCE] seconds alive ) +You finished baking your outfit after [TIME] seconds. + </notification> + + <notification + icon="notifytip.tga" + name="AvatarRezSelfBakedUpdateNotification" + type="notifytip"> +( [EXISTENCE] seconds alive ) +You sent out an update of your appearance after [TIME] seconds. +[STATUS] + </notification> + + + <notification + icon="notifytip.tga" + name="AvatarRezCloudNotification" + type="notifytip"> +( [EXISTENCE] seconds alive ) +Avatar '[NAME]' became cloud. + </notification> + + <notification + icon="notifytip.tga" + name="AvatarRezArrivedNotification" + type="notifytip"> +( [EXISTENCE] seconds alive ) +Avatar '[NAME]' appeared. + </notification> + + <notification + icon="notifytip.tga" + name="AvatarRezLeftCloudNotification" + type="notifytip"> +( [EXISTENCE] seconds alive ) +Avatar '[NAME]' left after [TIME] seconds as cloud. + </notification> + + <notification + icon="notifytip.tga" + name="AvatarRezEnteredAppearanceNotification" + type="notifytip"> +( [EXISTENCE] seconds alive ) +Avatar '[NAME]' entered appearance mode. + </notification> + + <notification + icon="notifytip.tga" + name="AvatarRezLeftAppearanceNotification" + type="notifytip"> +( [EXISTENCE] seconds alive ) +Avatar '[NAME]' left appearance mode. + </notification> + + <notification + icon="alertmodal.tga" + name="NoConnect" + type="alertmodal"> + We're having trouble connecting using [PROTOCOL] [HOSTID]. + Please check your network and firewall setup. + <form name="form"> + <button + default="true" + index="0" + name="OK" + text="OK"/> + </form> + </notification> + + <notification + icon="alertmodal.tga" + name="NoVoiceConnect" + type="alertmodal"> + We're having trouble connecting your voiceserver using [HOSTID]. + Voice communications will not be available. + Please check your network and firewall setup. + <form name="form"> + <button + default="true" + index="0" + name="OK" + text="OK"/> + </form> + </notification> + + <notification + icon="notifytip.tga" + name="AvatarRezLeftNotification" + type="notifytip"> +( [EXISTENCE] seconds alive ) +Avatar '[NAME]' left as fully loaded. + </notification> + + <notification + icon="notifytip.tga" + name="AvatarRezSelfBakeNotification" + type="notifytip"> +( [EXISTENCE] seconds alive ) +You uploaded a [RESOLUTION] baked texture for '[BODYREGION]' after [TIME] seconds. + </notification> + + <notification + icon="alertmodal.tga" + name="ConfirmLeaveCall" + type="alert"> +Are you sure you want to leave this call? + <usetemplate + ignoretext="Confirm before I leave call" + name="okcancelignore" + notext="No" + yestext="Yes"/> + <unique/> + </notification> + + <notification + icon="alertmodal.tga" + name="ConfirmMuteAll" + type="alert"> +You have selected to mute all participants in a group call. +This will also cause all residents that later join the call to be +muted, even after you have left the call. + +Mute everyone? + <usetemplate + ignoretext="Confirm before I mute all participants in a group call" + name="okcancelignore" + notext="Ok" + yestext="Cancel"/> + <unique/> </notification> <global name="UnsupportedCPU"> diff --git a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml index 5fcc9b012b..44437d01eb 100644 --- a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml +++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml @@ -8,6 +8,7 @@ height="45" layout="topleft" name="Mockup Tab" + selection_enabled="true" title="Mockup Tab" translate="false" width="0"> @@ -15,7 +16,9 @@ allow_select="true" follows="all" keep_one_selected="true" + multi_select="true" name="wearable_items_list" translate="false" + use_internal_context_menu="false" /> </accordion_tab> diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml index 115964e5f2..2edd643cc5 100644 --- a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel follows="top|right|left" - height="22" + height="23" layout="topleft" left="0" name="wearable_item" @@ -9,7 +9,7 @@ width="380"> <icon follows="top|right|left" - height="20" + height="23" image_name="ListItem_Over" layout="topleft" left="0" @@ -18,7 +18,7 @@ visible="false" width="380" /> <icon - height="20" + height="23" follows="top|right|left" image_name="ListItem_Select" layout="topleft" @@ -48,26 +48,37 @@ top="4" value="..." width="359" /> - <icon + <panel + background_visible="false" name="btn_lock" layout="topleft" follows="top|right" - image_name="Lock2" + image_name="Locked_Icon" top="0" left="0" - height="20" - width="20" - tab_stop="false" /> + height="23" + width="23" + tab_stop="false"> + <icon + name="btn_lock1" + layout="topleft" + follows="top|right" + image_name="Locked_Icon" + top="2" + left="5" + height="13" + width="9" + tab_stop="false" /> + </panel> <button name="btn_edit" layout="topleft" follows="top|right" - image_unselected="Icon_Gear_Background" - image_selected="Icon_Gear_Background" + image_overlay="Edit_Wrench" top="0" left_pad="3" - height="20" - width="20" + height="23" + width="23" tab_stop="false" /> <panel background_visible="true" diff --git a/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml index 9d19b89a61..dc123f13f4 100644 --- a/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml @@ -25,12 +25,12 @@ follows="top|right" height="25" image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Shop" image_selected="Toolbar_Middle_Selected" image_unselected="Toolbar_Middle_Off" - label="Shop >" layout="topleft" right="-5" name="bodyparts_shop_btn" top="5" - width="61" /> + width="45" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index e412c491fd..ac61c7da5d 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -1,322 +1,433 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - mouse_opaque="true" background_visible="true" bg_alpha_color="DkGray" bg_opaque_color="DkGray" + chrome="true" follows="left|bottom|right" height="33" layout="topleft" left="0" name="bottom_tray" top="28" - chrome="true" - border_visible="false" - width="1000"> - <string name="SpeakBtnToolTip">Turns microphone on/off</string> - <string name="VoiceControlBtnToolTip">Shows/hides voice control panel</string> + width="1310"> + <string + name="SpeakBtnToolTip" + value="Turns microphone on/off" /> + <string + name="VoiceControlBtnToolTip" + value="Shows/hides voice control panel" /> <layout_stack - mouse_opaque="false" border_size="0" clip="false" follows="all" height="28" layout="topleft" left="0" + mouse_opaque="false" name="toolbar_stack" orientation="horizontal" top="0" - width="1000"> + width="1310"> <icon auto_resize="false" follows="left|right" height="10" image_name="spacer24.tga" layout="topleft" - min_width="2" left="0" + min_width="2" top="0" width="2" /> <layout_panel - mouse_opaque="false" auto_resize="false" + filename="panel_nearby_chat_bar.xml" follows="left|right" height="28" layout="topleft" left="0" - min_height="23" - width="310" - top="4" max_width="320" - min_width="216" + min_height="23" + min_width="214" + mouse_opaque="false" name="chat_bar" - user_resize="false" - filename="panel_nearby_chat_bar.xml" /> + top="4" + user_resize="true" + width="308" /> + <!-- + There is resize bar between chatbar and Speak button. It has 2px width (is is set as 2*UIResizeBarOverlap) + --> <layout_panel - mouse_opaque="false" auto_resize="false" follows="right" height="28" layout="topleft" min_height="28" - width="105" - top_delta="0" - min_width="54" + min_width="59" + mouse_opaque="false" name="speak_panel" - user_resize="false"> - <talk_button - follows="left|right" - height="23" - speak_button.tab_stop="true" - show_button.tab_stop="true" - layout="topleft" - left="0" - name="talk" - top="5" - width="105"> - <!-- do not remove halign attribute with default value. otherwise it can't be overridden in other locales. - & pad_right is default value for long label which can be right aligned. See EXT-6318 --> - <speak_button - halign="center" - name="speak_btn" - label="Speak" - label_selected="Speak" - pad_right="22" - use_ellipses="true" - /> - <show_button> - <show_button.init_callback - function="Button.SetDockableFloaterToggle" - parameter="voice_controls" /> - </show_button> - </talk_button> + top_delta="0" + user_resize="true" + width="110"> + <talk_button + follows="left|right" + height="23" + layout="topleft" + left="2" + name="talk" + top="5" + width="105"> + <show_button + tab_stop="true"> + <init_callback + function="Button.SetDockableFloaterToggle" + parameter="voice_controls" /> + </show_button> + <!-- do not remove halign attribute with default value. otherwise it can't be overridden in other locales. + & pad_right is default value for long label which can be right aligned. See EXT-6318 --> + <speak_button + halign="center" + label="Speak" + label_selected="Speak" + name="speak_btn" + pad_right="22" + tab_stop="true" + use_ellipses="true" /> + </talk_button> </layout_panel> - <icon - auto_resize="false" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - name="after_speak_panel" - min_width="3" - top="0" - width="3"/> <layout_panel - mouse_opaque="false" auto_resize="false" follows="right" height="28" layout="topleft" min_height="28" - width="82" - top_delta="0" - min_width="62" + min_width="65" + mouse_opaque="false" name="gesture_panel" - user_resize="false"> - <gesture_combo_list - follows="left|right" - height="23" - label="Gesture" - layout="topleft" - name="Gesture" - left="0" - top="5" - width="82" - tool_tip="Shows/hides gestures"> - <gesture_combo_list.combo_button - pad_right="10" - use_ellipses="true" /> - <gesture_combo_list.combo_list - page_lines="17" /> - </gesture_combo_list> + top_delta="0" + user_resize="false" + width="85"> + <gesture_combo_list + follows="left|right" + height="23" + label="Gesture" + layout="topleft" + left="0" + name="Gesture" + tool_tip="Shows/hides gestures" + top="5" + width="82"> + <combo_button + pad_right="10" + use_ellipses="true" /> + <combo_list + page_lines="17" /> + </gesture_combo_list> </layout_panel> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - min_width="3" - name="after_gesture_panel" - top="0" - width="3"/> <layout_panel - mouse_opaque="false" auto_resize="false" follows="right" height="28" layout="topleft" min_height="28" + min_width="52" + mouse_opaque="false" name="movement_panel" user_resize="false" - width="80" - min_width="49"> + width="83"> <button - image_selected="PushButton_Selected_Press" - image_pressed="PushButton_Press" - image_pressed_selected="PushButton_Selected_Press" follows="left|right" height="23" - use_ellipses="true" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" is_toggle="true" label="Move" layout="topleft" name="movement_btn" tool_tip="Shows/hides movement controls" top="5" + use_ellipses="true" width="80"> - <button.init_callback + <init_callback function="Button.SetDockableFloaterToggle" parameter="moveview" /> </button> </layout_panel> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - min_width="3" - name="after_movement_panel" - top="0" - width="3"/> <layout_panel - mouse_opaque="false" auto_resize="false" follows="left|right" height="28" layout="topleft" min_height="28" - min_width="49" + min_width="52" + mouse_opaque="false" name="cam_panel" user_resize="false" - width="80"> + width="83"> <button - image_selected="PushButton_Selected_Press" - image_pressed="PushButton_Press" - image_pressed_selected="PushButton_Selected_Press" follows="left|right" height="23" - use_ellipses="true" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" is_toggle="true" label="View" layout="topleft" left="0" + name="camera_btn" tool_tip="Shows/hides camera controls" top="5" - name="camera_btn" + use_ellipses="true" width="80"> - <button.init_callback + <init_callback function="Button.SetDockableFloaterToggle" parameter="camera" /> </button> </layout_panel> - <icon + <layout_panel auto_resize="false" - color="0 0 0 0" follows="left|right" - height="10" - image_name="spacer24.tga" + height="28" layout="topleft" - left="0" - min_width="3" - name="after_cam_panel" - top="0" - width="3"/> - <layout_panel + min_width="40" mouse_opaque="false" + name="snapshot_panel" + user_resize="false" + width="39"> + <button + follows="left|right" + height="23" + image_overlay="Snapshot_Off" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + layout="topleft" + left="0" + name="snapshots" + tool_tip="Take snapshot" + top="5" + width="36"> + <init_callback + function="Button.SetFloaterToggle" + parameter="snapshot" /> + </button> + </layout_panel> + <layout_panel auto_resize="false" follows="left|right" height="28" layout="topleft" - min_width="40" - name="snapshot_panel" - width="40"> + min_height="28" + min_width="52" + mouse_opaque="false" + name="sidebar_btn_panel" + user_resize="false" + width="83"> +<!--*TODO: Implement toggle of sidebar with buttons +Disabled for now. +--> <button - follows="left|right" + control_name="SidebarWithButtonsVisibility" + follows="left|right" height="23" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" + is_toggle="true" + label="Sidebar" + layout="topleft" + left="0" + name="sidebar_btn" + tool_tip="Shows/hides Sidebar" + top="5" + use_ellipses="true" + width="80"> + </button> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="52" + mouse_opaque="false" + name="build_btn_panel" + user_resize="false" + width="83"> +<!--*FIX: Build Floater is not opened with default registration. Will be fixed soon. +Disabled for now. +--> + <button + follows="left|right" + height="23" image_pressed="PushButton_Press" image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + label="Build" + layout="topleft" left="0" - label="" + name="build_btn" + tool_tip="Shows/hides Build Tools" + top="5" + use_ellipses="true" + width="80"> + <commit_callback + function="Build.Toggle" + parameter="build" /> + </button> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="52" + mouse_opaque="false" + name="search_btn_panel" + user_resize="false" + width="83"> + <button + follows="left|right" + height="23" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + label="Search" layout="topleft" - name="snapshots" - width="36" + left="0" + name="search_btn" + tool_tip="Shows/hides Search" top="5" + use_ellipses="true" + width="80"> + <init_callback + function="Button.SetFloaterToggle" + parameter="search" /> + </button> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="52" + mouse_opaque="false" + name="world_map_btn_panel" + user_resize="false" + width="83"> + <button + follows="left|right" + height="23" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" is_toggle="true" - image_overlay="Snapshot_Off" - tool_tip="Take snapshot"> - <button.init_callback - function="Button.SetFloaterToggle" - parameter="snapshot" /> - </button> - </layout_panel> + label="Map" + layout="topleft" + left="0" + name="world_map_btn" + tool_tip="Shows/hides World Map" + top="5" + use_ellipses="true" + width="80"> + <init_callback + function="Button.SetFloaterToggle" + parameter="world_map" /> + </button> + </layout_panel> <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="52" mouse_opaque="false" + name="mini_map_btn_panel" + user_resize="false" + width="83"> + <button + follows="left|right" + height="23" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + label="Mini-Map" + layout="topleft" + left="0" + name="mini_map_btn" + tool_tip="Shows/hides Mini-Map" + top="5" + use_ellipses="true" + width="80"> + <init_callback + function="Button.SetFloaterToggle" + parameter="mini_map" /> + </button> + </layout_panel> + <layout_panel follows="left|right" height="30" layout="topleft" - top="0" - name="chiclet_list_panel" - width="189" min_width="95" + mouse_opaque="false" + name="chiclet_list_panel" + top="0" user_resize="false" - auto_resize="true"> + width="189"> <!--*NOTE: min_width of the chiclet_panel (chiclet_list) must be the same as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. EXT-991--> <chiclet_panel - mouse_opaque="false" + chiclet_padding="4" follows="left|right" height="24" layout="topleft" left="1" min_width="95" + mouse_opaque="false" name="chiclet_list" top="7" - chiclet_padding="4" - scrolling_offset="40" width="189"> <button auto_resize="true" follows="right" height="29" + image_hover_selected="SegmentedBtn_Left_Over" + image_hover_unselected="SegmentedBtn_Left_Over" + image_overlay="Arrow_Small_Left" + image_pressed="SegmentedBtn_Left_Press" + image_pressed_selected="SegmentedBtn_Left_Press" image_selected="SegmentedBtn_Left_Off" image_unselected="SegmentedBtn_Left_Off" - image_hover_selected="SegmentedBtn_Left_Over" - image_hover_unselected="SegmentedBtn_Left_Over" - image_pressed="SegmentedBtn_Left_Press" - image_pressed_selected="SegmentedBtn_Left_Press" - image_overlay="Arrow_Small_Left" layout="topleft" name="chicklet_left_scroll_button" - scale_image="true" tab_stop="false" - top="-4" - right_pad="2" + top="-28" visible="false" width="7" /> <button auto_resize="true" follows="right" height="29" + image_hover_selected="SegmentedBtn_Right_Over" + image_hover_unselected="SegmentedBtn_Right_Over" + image_overlay="Arrow_Small_Right" + image_pressed="SegmentedBtn_Right_Press" + image_pressed_selected="SegmentedBtn_Right_Press" image_selected="SegmentedBtn_Right_Off" image_unselected="SegmentedBtn_Right_Off" - image_hover_selected="SegmentedBtn_Right_Over" - image_hover_unselected="SegmentedBtn_Right_Over" - image_pressed="SegmentedBtn_Right_Press" - image_pressed_selected="SegmentedBtn_Right_Press" - image_overlay="Arrow_Small_Right" layout="topleft" name="chicklet_right_scroll_button" - scale_image="true" tab_stop="false" - top="-4" + top="-28" visible="false" width="7" /> </chiclet_panel> @@ -332,24 +443,24 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. min_width="4" name="DUMMY" top="0" - width="4"/> + width="4" /> <layout_panel auto_resize="false" follows="right" height="28" layout="topleft" min_height="28" - top="0" - name="im_well_panel" - width="37" min_width="37" - user_resize="false"> + name="im_well_panel" + top="0" + user_resize="false" + width="37"> <chiclet_im_well - max_displayed_count="99" follows="right" height="28" layout="topleft" left="0" + max_displayed_count="99" name="im_well" top="0" width="35"> @@ -375,8 +486,8 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well left="0" name="Unread IM messages" tool_tip="Conversations" - width="34" > - <button.init_callback + width="34"> + <init_callback function="Button.SetDockableFloaterToggle" parameter="im_well_window" /> </button> @@ -388,11 +499,11 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well height="28" layout="topleft" min_height="28" - top="0" - name="notification_well_panel" - width="37" min_width="37" - user_resize="false"> + name="notification_well_panel" + top="0" + user_resize="false" + width="37"> <chiclet_notification follows="right" height="23" @@ -402,27 +513,27 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well name="notification_well" top="5" width="35"> - <button + <button + auto_resize="true" bottom_pad="3" + follows="right" + halign="center" + height="23" + image_overlay="Notices_Unread" + image_overlay_alignment="center" image_pressed="WellButton_Lit" image_pressed_selected="WellButton_Lit_Selected" image_selected="PushButton_Press" - auto_resize="true" - halign="center" - height="23" - follows="right" - label_color="Black" - left="0" - name="Unread" - image_overlay="Notices_Unread" - image_overlay_alignment="center" - tool_tip="Notifications" - width="34" > - <button.init_callback - function="Button.SetDockableFloaterToggle" - parameter="notification_well_window" /> - </button> - </chiclet_notification> + label_color="Black" + left="0" + name="Unread" + tool_tip="Notifications" + width="34"> + <init_callback + function="Button.SetDockableFloaterToggle" + parameter="notification_well_window" /> + </button> + </chiclet_notification> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml index 2359719c2a..5b3f0b17a9 100644 --- a/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml @@ -26,12 +26,12 @@ follows="top|right" height="25" image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Shop" image_selected="Toolbar_Middle_Selected" image_unselected="Toolbar_Middle_Off" - label="Shop >" layout="topleft" right="-5" name="clothing_shop_btn" top="5" - width="61" /> + width="45" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml index 7cc9c46c08..035e8607ec 100644 --- a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml @@ -9,7 +9,7 @@ width="380"> <icon follows="top|right|left" - height="20" + height="23" image_name="ListItem_Over" layout="topleft" left="0" @@ -18,7 +18,7 @@ visible="false" width="380" /> <icon - height="20" + height="23" follows="top|right|left" image_name="ListItem_Select" layout="topleft" @@ -63,43 +63,53 @@ name="btn_move_up" layout="topleft" follows="top|right" - image_unselected="Movement_Up_Off" - image_selected="Movement_Up_Off" + image_overlay="UpArrow_Off" top="0" left="0" - height="20" - width="20" + height="23" + width="23" tab_stop="false" /> <button name="btn_move_down" layout="topleft" follows="top|right" - image_unselected="Movement_Down_Off" - image_selected="Movement_Down_Off" + image_overlay="DownArrow_Off" top="0" left_pad="3" - height="20" - width="20" + height="23" + width="23" tab_stop="false" /> - <icon + <panel + background_visible="false" name="btn_lock" layout="topleft" follows="top|right" - image_name="Lock2" + image_name="Locked_Icon" top="0" - left_pad="3" - height="20" - width="20" /> + left="0" + height="23" + width="23" + tab_stop="false"> + <icon + name="btn_lock1" + layout="topleft" + follows="top|right" + image_name="Locked_Icon" + top="2" + left="5" + height="13" + width="9" + tab_stop="false" /> + </panel> <button name="btn_edit" layout="topleft" follows="top|right" - image_unselected="Icon_Gear_Background" - image_selected="Icon_Gear_Background" + image_overlay="Edit_Wrench" top="0" left_pad="3" - height="20" - width="20" + height="23" + width="23" tab_stop="false" /> <panel background_visible="true" diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml index 86b9ea6e14..cf84c31078 100644 --- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -29,6 +29,7 @@ height="10" layout="topleft" left="0" + multi_select="true" name="list_attachments" top="0" width="311" /> @@ -63,6 +64,7 @@ height="10" layout="topleft" left="0" + multi_select="true" name="list_clothing" top_pad="0" width="311" /> @@ -98,6 +100,7 @@ height="10" layout="topleft" left="0" + multi_select="true" name="list_body_parts" top_pad="0" width="311" /> diff --git a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml new file mode 100644 index 0000000000..2f37b9d3c9 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="top|right|left" + height="23" + layout="topleft" + left="0" + name="deletable_wearable_item" + top="0" + width="380"> + <icon + follows="top|right|left" + height="20" + image_name="ListItem_Over" + layout="topleft" + left="0" + name="hovered_icon" + top="0" + visible="false" + width="380" /> + <icon + height="20" + follows="top|right|left" + image_name="ListItem_Select" + layout="topleft" + left="0" + name="selected_icon" + top="0" + visible="false" + width="380" /> + <button + name="btn_delete" + layout="topleft" + follows="top|left" + image_unselected="Toast_CloseBtn" + image_selected="Toast_CloseBtn" + top="0" + left="0" + height="20" + width="20" + tab_stop="false" /> + <icon + height="16" + follows="top|left" + image_name="Inv_Object" + layout="topleft" + left_pad="3" + name="item_icon" + top="2" + width="16" /> + <text + follows="left|right" + height="16" + layout="topleft" + left_pad="5" + allow_html="false" + use_ellipses="true" + name="item_name" + text_color="white" + top="4" + value="..." + width="359" /> + <panel + background_visible="true" + bg_alpha_color="0.4 0.4 0.4 1.0" + bottom="0" + follows="left|right|top" + height="1" + layout="bottomleft" + left="0" + name="wearable_type_separator_panel" + visible="true" + width="380"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml index c5a60ced88..06371b7489 100644 --- a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel follows="top|right|left" - height="22" + height="23" layout="topleft" left="0" name="dummy_clothing_item" @@ -9,7 +9,7 @@ width="380"> <icon follows="top|right|left" - height="20" + height="23" image_name="ListItem_Over" layout="topleft" left="0" @@ -18,7 +18,7 @@ visible="false" width="380" /> <icon - height="20" + height="23" follows="top|right|left" image_name="ListItem_Select" layout="topleft" @@ -53,11 +53,11 @@ name="btn_add" layout="topleft" follows="top|right" - label="+" + image_overlay="AddItem_Off" top="0" left="0" - height="20" - width="20" + height="23" + width="23" tab_stop="false" /> <panel background_visible="true" diff --git a/indra/newview/skins/default/xui/en/panel_edit_shape.xml b/indra/newview/skins/default/xui/en/panel_edit_shape.xml index e1c574001a..cf15fb0455 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shape.xml @@ -8,54 +8,19 @@ name="edit_shape_panel" top_pad="10" width="333" > - <panel - border="false" - bg_alpha_color="DkGray2" - bg_opaque_color="DkGray2" - background_visible="true" - background_opaque="true" + <text follows="top|left|right" - height="50" - left="10" + font="SansSerifSmallBold" + halign="right" + height="12" layout="topleft" - name="avatar_sex_panel" + left="0" + name="avatar_height" + text_color="EmphasisColor" top="0" - width="313" > - <text - follows="top|left" - height="16" - layout="topleft" - left="10" - name="gender_text" - width="313"> - Gender: - </text> - <radio_group - follows="left|top|right" - left="10" - height="28" - layout="topleft" - name="sex_radio" - top_pad="3" - width="303" > - <radio_item - follows="all" - height="16" - label="Female" - layout="topleft" - left="10" - name="radio" - width="82" /> - <radio_item - follows="all" - height="16" - label="Male" - layout="topleft" - left_pad="10" - name="radio2" - width="82" /> - </radio_group> - </panel> + width="310"> + [HEIGHT] Meters tall + </text> <panel border="false" bg_alpha_color="DkGray2" @@ -63,22 +28,22 @@ background_visible="true" background_opaque="true" follows="all" - height="345" + height="388" label="Shirt" layout="topleft" left="10" name="accordion_panel" - top_pad="10" + top_pad="0" width="313"> <accordion layout="topleft" follows="all" - height ="345" + height ="388" left="0" name="wearable_accordion" top="0" single_expansion="true" - fit_parent="false" + fit_parent="true" width="313"> <accordion_tab layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml index ed990eb095..23a08344ea 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml @@ -25,38 +25,61 @@ can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Head Tattoo" layout="topleft" - left="30" + left="20" name="Head Tattoo" tool_tip="Click to choose a picture" top="10" - width="94" /> + width="115" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Upper Tattoo" layout="topleft" left_pad="30" name="Upper Tattoo" tool_tip="Click to choose a picture" top="10" - width="94" /> + width="115" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Lower Tattoo" layout="topleft" - left="30" + left="20" name="Lower Tattoo" tool_tip="Click to choose a picture" top_pad="10" - width="94" /> + width="115" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="115" + label="Color/Tint" + layout="topleft" + left_pad="30" + name="Color/Tint" + tool_tip="Click to open color picker" + top_delta="0" + width="115" > + <color_swatch.commit_callback + function="ColorSwatch.Commit" /> + </color_swatch> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index dc2f085356..0455086ef3 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -107,7 +107,7 @@ left="0" Jacket: </string> <string - name="skirt_skirt_desc_text"> + name="skirt_desc_text"> Skirt: </string> <string @@ -165,12 +165,62 @@ left="0" width="313"> <text follows="top|left|right" + font="SansSerifSmallBold" height="16" layout="topleft" left="10" name="description_text" + text_color="white" + top="10" value="Shape:" - width="303" /> + width="150" /> + <radio_group + control_name="AvatarSex" + follows="left|top|right" + left="210" + height="20" + layout="topleft" + name="sex_radio" + top="5" + width="110"> + <radio_item + follows="all" + height="16" + label="" + layout="topleft" + left="0" + name="sex_male" + tool_tip="Male" + value="1" + width="40" /> + <radio_item + follows="all" + height="16" + label="" + layout="topleft" + left_pad="10" + name="sex_female" + tool_tip="Female" + value="0" + width="40" /> + </radio_group> + <!-- graphical labels for the radio buttons above --> + <icon + height="16" + image_name="icons/Male.png" + left="230" + name="male_icon" + tool_tip="Male" + top="7" + width="16" /> + <icon + height="16" + image_name="icons/Female.png" + name="female_icon" + left="280" + tool_tip="Female" + top="7" + width="16" /> <text_editor follows="all" height="23" @@ -178,20 +228,23 @@ left="0" layout="topleft" max_length="300" name="description" + top_pad="3" width="290" /> </panel> <panel follows="all" - height="400" + height="408" layout="topleft" left="0" name="edit_subpanel_container" - top_pad="10" + top_pad="2" width="333"> + <!-- the shape editing panel is taller than the others + because it also displays avatar height --> <panel filename="panel_edit_shape.xml" follows="all" - height="400" + height="408" layout="topleft" left="0" name="edit_shape_panel" @@ -205,7 +258,7 @@ left="0" layout="topleft" left="0" name="edit_skin_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -215,7 +268,7 @@ left="0" layout="topleft" left="0" name="edit_hair_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -225,7 +278,7 @@ left="0" layout="topleft" left="0" name="edit_eyes_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -235,7 +288,7 @@ left="0" layout="topleft" left="0" name="edit_shirt_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -245,7 +298,7 @@ left="0" layout="topleft" left="0" name="edit_pants_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -255,7 +308,7 @@ left="0" layout="topleft" left="0" name="edit_shoes_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -265,7 +318,7 @@ left="0" layout="topleft" left="0" name="edit_socks_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -275,7 +328,7 @@ left="0" layout="topleft" left="0" name="edit_jacket_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -285,7 +338,7 @@ left="0" layout="topleft" left="0" name="edit_skirt_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -295,7 +348,7 @@ left="0" layout="topleft" left="0" name="edit_gloves_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -305,7 +358,7 @@ left="0" layout="topleft" left="0" name="edit_undershirt_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -315,7 +368,7 @@ left="0" layout="topleft" left="0" name="edit_underpants_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -325,7 +378,7 @@ left="0" layout="topleft" left="0" name="edit_alpha_panel" - top="0" + top="8" visible="false" width="333" /> <panel @@ -335,63 +388,76 @@ left="0" layout="topleft" left="0" name="edit_tattoo_panel" - top="0" + top="8" visible="false" width="333" /> </panel> <panel - follows="left|right|bottom" - height="38" + follows="bottom|left|right" + height="25" label="gear_buttom_panel" - layout="bottom|left|right" + layout="topleft" left="0" - bottom="25" name="gear_buttom_panel" + top_pad="0" width="333"> <button follows="bottom|left" tool_tip="Options" - height="18" + height="25" + image_hover_unselected="Toolbar_Left_Over" image_disabled="OptionsMenu_Disabled" - image_selected="OptionsMenu_Press" - image_unselected="OptionsMenu_Off" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Left_Selected" + image_unselected="Toolbar_Left_Off" layout="topleft" left="10" name="friends_viewsort_btn" - top="10" - width="18" /> + top="0" + width="31" /> <button follows="bottom|left" - height="18" - image_selected="AddItem_Press" - image_unselected="AddItem_Off" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="AddItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" image_disabled="AddItem_Disabled" layout="topleft" - left_pad="10" + left_pad="1" name="add_btn" tool_tip="TODO" - width="18" /> + width="31" /> + <icon + follows="bottom|left|right" + height="25" + image_name="Toolbar_Middle_Off" + layout="topleft" + left_pad="1" + name="dummy_right_icon" + width="218" > + </icon> <button - follows="bottom|left" - height="18" - image_selected="TrashItem_Press" - image_unselected="TrashItem_Off" + follows="bottom|right" + height="25" + image_hover_unselected="Toolbar_Right_Over" + image_overlay="TrashItem_Off" + image_selected="Toolbar_Right_Selected" + image_unselected="Toolbar_Right_Off" image_disabled="TrashItem_Disabled" layout="topleft" - left_pad="10" - right="-10" + left_pad="1" name="del_btn" tool_tip="TODO" - top_delta="0" - width="18" /> + width="31" /> </panel> <panel follows="bottom|left|right" - height="25" - layout="bottom|left|right" - left="0" + height="23" + layout="topleft" + left="2" name="button_panel" - bottom="5" + top_pad="6" width="333" > <button follows="bottomleft" @@ -409,6 +475,6 @@ left="0" label="Revert" left_pad="7" name="revert_button" - width="153" /> + width="152" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index 9341d433e8..e79ae34627 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -28,6 +28,7 @@ Hover your mouse over the options for more help. width="304" layout="topleft"> <texture_picker + default_image_name="Generic_Group_Large" follows="left|top" height="110" label="" diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml index 479629f6ea..19fe2ea874 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -210,9 +210,23 @@ Maximum 200 per group daily <button follows="left|top" layout="topleft" + left="20" + top_delta="50" + height="23" + width="100" + name="open_inventory" + label="Inventory" + tool_tip="Open Inventory"> + <button.init_callback + function="Button.SetFloaterToggle" + parameter="inventory"/> + </button> + <button + follows="left|top" + layout="topleft" left="140" name="remove_attachment" - top_delta="50" + top_delta="0" height="18" image_selected="TrashItem_Press" image_unselected="TrashItem_Off" @@ -230,7 +244,7 @@ Maximum 200 per group daily name="send_notice" width="100" /> <group_drop_target - height="95" + height="75" top="160" left="10" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index a725548e61..a86762f53d 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -56,42 +56,23 @@ height="80"> follows="left|bottom" font="SansSerifSmall" height="16" -name="first_name_text" +name="username_text" top="20" left="20" width="150"> -First name: +Username: </text> <line_editor follows="left|bottom" height="22" -label="First" +label="Username" left_delta="0" max_length="31" -name="first_name_edit" +name="username_edit" select_on_focus="true" -tool_tip="[SECOND_LIFE] First Name" +tool_tip="[SECOND_LIFE] Username" top_pad="0" - width="135" /> - <text - follows="left|bottom" - font="SansSerifSmall" - height="16" - left_pad="8" - name="last_name_text" - top="20" - width="150"> - Last name: </text> -<line_editor -follows="left|bottom" -height="22" -label="Last" -max_length="31" -name="last_name_edit" -select_on_focus="true" -tool_tip="[SECOND_LIFE] Last Name" - top_pad="0" - width="135" /> +width="150" /> <text follows="left|bottom" font="SansSerifSmall" @@ -104,6 +85,7 @@ top="20" </text> <line_editor follows="left|bottom" +handle_edit_keys_directly="true" height="22" max_length="16" name="password_edit" @@ -167,6 +149,7 @@ allow_text_entry="true" font="SansSerifSmall" follows="left|right|bottom" height="23" + max_chars="256" layout="topleft" top_pad="2" name="server_combo" @@ -201,7 +184,7 @@ height="16" name="forgot_password_text" top_pad="12" right="-10" - width="215"> + width="180"> Forgot your name or password? </text> <text @@ -213,7 +196,7 @@ height="16" name="login_help" top_pad="2" right="-10" - width="220"> + width="180"> Need help logging in? </text> <!-- <text follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 46625144e1..d65b86f007 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -84,7 +84,7 @@ sort_order_setting="InventorySortOrder" top="16" width="288" /> - <inventory_panel + <recent_inventory_panel bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" background_visible="true" @@ -100,62 +100,94 @@ name="Recent Items" width="290" /> </tab_container> - - <panel - background_visible="true" + <layout_stack + animate="false" + background_visible="true" bevel_style="none" + border_size="0" follows="left|right|bottom" - height="27" + height="25" layout="topleft" - top_pad="-1" + orientation="horizontal" + top_pad="0" left="10" name="bottom_panel" - width="310"> - <button - follows="bottom|left" - tool_tip="Show additional options" - height="25" - image_hover_unselected="Toolbar_Left_Over" - image_overlay="OptionsMenu_Off" - image_selected="Toolbar_Left_Selected" - image_unselected="Toolbar_Left_Off" - layout="topleft" - left="0" - name="options_gear_btn" - top="1" - width="31" /> - <button - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="AddItem_Off" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - layout="topleft" - left_pad="1" - name="add_btn" - tool_tip="Add new item" - width="31" /> - <icon - follows="bottom|left" - height="25" - image_name="Toolbar_Middle_Off" - layout="topleft" - left_pad="1" - name="dummy_icon" - width="209" - /> - <dnd_button - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Right_Over" - image_overlay="TrashItem_Off" - image_selected="Toolbar_Right_Selected" - image_unselected="Toolbar_Right_Off" - left_pad="1" - layout="topleft" - name="trash_btn" - tool_tip="Remove selected item" - width="31"/> - </panel> + width="307"> + <layout_panel + auto_resize="false" + height="25" + layout="topleft" + name="options_gear_btn_panel" + width="32"> + <button + follows="bottom|left" + tool_tip="Show additional options" + height="25" + image_hover_unselected="Toolbar_Left_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Left_Selected" + image_unselected="Toolbar_Left_Off" + layout="topleft" + left="0" + name="options_gear_btn" + top="0" + width="31" /> + </layout_panel> + <layout_panel + auto_resize="false" + height="25" + layout="topleft" + name="add_btn_panel" + width="32"> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="AddItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left="0" + name="add_btn" + tool_tip="Add new item" + top="0" + width="31" /> + </layout_panel> + <layout_panel + auto_resize="true" + height="25" + layout="topleft" + name="dummy_panel" + width="212"> + <icon + follows="bottom|left|right" + height="25" + image_name="Toolbar_Middle_Off" + layout="topleft" + left="0" + top="0" + name="dummy_icon" + width="211" /> + </layout_panel> + <layout_panel + auto_resize="false" + height="25" + layout="topleft" + name="trash_btn_panel" + width="31"> + <dnd_button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Right_Over" + image_overlay="TrashItem_Off" + image_selected="Toolbar_Right_Selected" + image_unselected="Toolbar_Right_Off" + left="0" + layout="topleft" + name="trash_btn" + tool_tip="Remove selected item" + top="0" + width="31"/> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index 5dbd8bfe6a..55df70eb71 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 @@ -7,7 +7,7 @@ left="0" name="chat_bar" top="21" - width="310"> + width="308"> <line_editor border_style="line" border_thickness="1" diff --git a/indra/newview/skins/default/xui/en/panel_notifications_channel.xml b/indra/newview/skins/default/xui/en/panel_notifications_channel.xml index 16593751f7..3143b0a40c 100644 --- a/indra/newview/skins/default/xui/en/panel_notifications_channel.xml +++ b/indra/newview/skins/default/xui/en/panel_notifications_channel.xml @@ -23,7 +23,7 @@ name="notifications_list" sort_ascending="false" sort_column="2" - top="-78" + top="0" user_resize="true" width="100"> <scroll_list.columns @@ -48,7 +48,7 @@ name="notification_rejects_list" sort_ascending="false" sort_column="2" - top="-78" + top="0" user_resize="true" width="100"> <scroll_list.columns diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index 6a212306d6..abd96c89e7 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -15,6 +15,28 @@ <string name="No Outfit" value="No Outfit"/> + <string + name="unsaved_changes" + value="Unsaved Changes"/> + <string + name="now_editing" + value="Now Editing"/> + <string + name="folder_view_off" + value="Hierarchy_View_Disabled" + translate="false"/> + <string + name="folder_view_on" + value="Hierarchy_View_On" + translate="false"/> + <string + name="list_view_off" + value="List_View_Disabled" + translate="false"/> + <string + name="list_view_on" + value="List_View_On" + translate="false"/> <panel.string name="not_available"> @@ -82,15 +104,15 @@ width="311"> <icon follows="left|top" - height="40" - image_name="TabIcon_Appearance_Off" + height="31" + image_name="Shirt_Large" left="2" mouse_opaque="false" name="outfit_icon" - top="1" + top="2" scale_image="true" visible="true" - width="35" /> + width="31" /> <panel bevel_style="none" follows="top|right" @@ -128,11 +150,17 @@ <!-- LIST OF WEARABLES (CURRENT OUTFIT/ WEARABLES TO ADD) --> +<!-- *NOTE: border_size is used to calculate space between layout panel and for resize bar height +required height for dragbar is 10, so resizebar height should be 10 px. +It is calculated as border_size + 2*UIResizeBarOverlap +--> <layout_stack animate="false" + border_size="8" + clip="false" default_tab_group="2" follows="all" - height="495" + height="468" width="313" layout="topleft" orientation="vertical" @@ -142,7 +170,7 @@ left="5"> <layout_panel layout="topleft" - height="220" + height="193" label="IM Control Panel" min_height="100" name="outfit_wearables_panel" @@ -162,237 +190,234 @@ name="cof_wearables_list" top="0" width="311" /> - - <!-- Button bar --> - <panel - background_visible="true" - bevel_style="none" - follows="bottom|left|right" - height="27" - label="bottom_panel" - layout="topleft" - left="0" - name="edit_panel" - top="193" - width="313"> - <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="gear_menu_btn" - top="1" - width="31" /> - <icon - follows="bottom|left|right" - height="25" - image_name="Toolbar_Right_Off" - layout="topleft" - left_pad="1" - name="dummy_right_icon" - width="281" /> - </panel> </layout_panel> <layout_panel + background_visible="true" + bg_alpha_color="DkGray2" auto_resize="true" default_tab_group="3" - height="210" + height="184" min_height="210" name="add_wearables_panel" width="313" tab_group="2" user_resize="true" visible="false"> - - <!-- *NOTE is not used, invisible and disabled --> - <filter_editor - background_image="TextField_Search_Off" - enabled="false" - follows="left|top|right" - font="SansSerif" - label="Filter" + <icon + follows="left|top|right" + height="10" + image_name="Dragbar" + left="0" + top_pad="-9" + width="313" /> + <text + follows="top|left|right" + font="SansSerifBold" + height="13" layout="topleft" left="5" - width="290" + name="add_to_outfit_label" + text_color="LtGray" + top="4" + value="Add to Outfit:" + use_ellipses="true" + width="150" /> + <button + follows="top|right" + height="20" + image_overlay="Search_Icon" + is_toggle="true" + layout="topleft" + left_pad="5" + name="filter_button" + top_delta="0" + width="20" /> + <combo_box + follows="top|left|right" height="20" - name="look_item_filter" - text_color="black" - text_pad_left="25" - visible="false"/> + layout="topleft" + right="-5" + name="filter_wearables_combobox" + top_delta="0" + width="110"/> <layout_stack animate="true" follows="all" - height="25" - width="300" + height="155" + width="313" layout="topleft" - orientation="horizontal" name="filter_panels" - top="0" + top_pad="5" left="0"> <layout_panel + auto_resize="false" layout="topleft" follows="left|top|right" - height="25" + height="30" label="IM Control Panel" - name="filter_button_panel" - width="150" - auto_resize="true" - user_resize="false"> - <text - follows="top|left|right" - font="SansSerifBold" - height="13" - layout="topleft" - left="5" - name="add_to_outfit_label" - text_color="LtGray" - top="3" - value="Add to Outfit:" - use_ellipses="true" - width="270" /> - <button - follows="top|right" - height="20" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - is_toggle="true" - label="O" - layout="topleft" - right="-1" - name="filter_button" - top="3" - width="20" /> + name="filter_panel" + width="311" + user_resize="false" + visible="false"> + <filter_editor + background_image="TextField_Search_Off" + enabled="true" + follows="left|top|right" + font="SansSerif" + label="Filter" + layout="topleft" + left="5" + width="290" + height="25" + name="look_item_filter" + text_color="black" + text_pad_left="25" + visible="true"/> </layout_panel> <layout_panel auto_resize="true" - height="25" + background_visible="true" + bg_alpha_color="0.107 0.107 0.107 1" + height="145" min_width="130" - name="filter_combobox_panel" - width="150" - user_resize="false" - visible="false"> - <combo_box - follows="top|left|right" - height="20" - layout="topleft" - right="-5" - name="filter_wearables_combobox" - top="0" - width="130"/> + name="inventory_panel" + width="311" + user_resize="true"> + <inventory_panel + allow_multi_select="true" + background_visible="false" + border="false" + follows="left|top|right|bottom" + height="140" + layout="topleft" + left="0" + mouse_opaque="false" + name="inventory_items" + top_pad="5" + width="310" + visible="false"/> + <panel + name="filtered_wearables_panel" + background_opaque="true" + background_visible="false" + layout="topleft" + follows="left|top|right|bottom" + border="false" + height="140" + left="0" + mouse_opaque="false" + width="311" + top_delta="0" + visible="true"> + <wearable_items_list + color="0.107 0.107 0.107 1" + name="filtered_wearables_list" + allow_select="true" + layout="topleft" + follows="all" + multi_select="true" + width="310" + height="140" + left="0" + top="0"/> + </panel> </layout_panel> </layout_stack> - - <inventory_panel - allow_multi_select="false" - border="false" - follows="left|top|right|bottom" - height="155" - layout="topleft" - left="0" - mouse_opaque="false" - name="inventory_items" - top_pad="5" - width="300"/> - - <panel - name="filtered_wearables_panel" - background_opaque="true" - background_visible="true" - layout="topleft" - follows="left|top|right|bottom" - border="false" - height="155" - left="0" - mouse_opaque="false" - width="300" - top_delta="0" - visible="false"> - <wearable_items_list - name="filtered_wearables_list" - allow_select="true" - layout="topleft" - follows="all" - width="300" - height="155" - left="0" - top="0" /> - </panel> - - <panel - background_visible="true" - bevel_style="none" - follows="left|right|bottom" - height="27" - label="add_wearables_button_bar" - layout="topleft" - left="0" - name="add_wearables_button_bar" - top_pad="0" - width="300"> - <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="wearables_gear_menu_btn" - top="1" - width="31" /> - <button - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - label="F" - layout="topleft" - left_pad="1" - name="folder_view_btn" - top="1" - width="31" /> - <button - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - label="L" - layout="topleft" - left_pad="1" - name="list_view_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" - label="" - layout="topleft" - left_pad="1" - name="add_to_outfit_btn" - top="1" - width="31" /> - </panel> - </layout_panel> + </layout_panel> </layout_stack> + <!-- Button bar --> + <panel + background_visible="true" + bevel_style="none" + follows="left|right|bottom" + height="27" + label="add_wearables_button_bar" + layout="topleft" + left="4" + name="add_wearables_button_bar" + top_pad="0" + width="313"> + <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="wearables_gear_menu_btn" + top="1" + width="31" /> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Hierarchy_View_Disabled" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + is_toggle="true" + layout="topleft" + left_pad="1" + name="folder_view_btn" + top="1" + visible="false" + width="31" /> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="List_View_On" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + is_toggle="true" + layout="topleft" + left_pad="1" + name="list_view_btn" + top="1" + visible="false" + 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" + label="" + layout="topleft" + left_pad="1" + name="add_to_outfit_btn" + top="1" + visible="false" + width="31" /> + <icon + follows="bottom|left|right" + height="25" + image_name="Toolbar_Right_Off" + layout="topleft" + left_pad="1" + name="add_wearables_dummy_icon" + top="1" + visible="false" + width="184" > + </icon> + <icon + follows="bottom|left|right" + height="25" + image_name="Toolbar_Right_Off" + layout="topleft" + left="32" + name="dummy_right_icon" + top="1" + width="281" > + </icon> + </panel> + <panel follows="left|right|bottom" height="30" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 9e59651bd1..13e1f5ba5c 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -93,17 +93,30 @@ left_pad="1" name="trash_btn" tool_tip="Remove selected item" - width="31"/> - <button - follows="bottom|left" - height="23" - label="Save Outfit" - layout="topleft" - name="make_outfit_btn" - tool_tip="Save appearance as an outfit" + width="31"/> + <button + follows="bottom|left" + height="23" + label="Save As" + left="0" + layout="topleft" + name="save_btn" top_pad="6" - left="0" - width="153" /> + width="155" /> + <button + follows="bottom|left" + height="23" + name="save_flyout_btn" + label="" + layout="topleft" + left_pad="-20" + tab_stop="false" + image_selected="SegmentedBtn_Right_Selected_Press" + image_unselected="SegmentedBtn_Right_Off" + image_pressed="SegmentedBtn_Right_Press" + image_pressed_selected="SegmentedBtn_Right_Selected_Press" + image_overlay="Arrow_Small_Up" + width="20"/> <button follows="bottom|left|right" height="23" diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 7e212c9383..b79ef1e287 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -464,7 +464,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="view_profile_btn" tool_tip="Show picture, groups, and other Residents information" top="0" - width="70" /> + width="67" /> <button follows="bottom|left" left_pad="3" @@ -473,7 +473,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="topleft" name="im_btn" tool_tip="Open instant message session" - width="43" /> + width="40" /> <button follows="bottom|left" left_pad="3" @@ -491,7 +491,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="topleft" name="share_btn" tool_tip="Share an inventory item" - width="62" /> + width="65" /> <button follows="bottom|left" left_pad="3" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 69e8e6fdcc..40a644657a 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -94,6 +94,16 @@ Automatic position for: name="appearance_camera_movement" tool_tip="Use automatic camera positioning while in edit mode" width="242" /> + <check_box + control_name="SidebarCameraMovement" + follows="left|top" + height="16" + initial_value="1" + label="Sidebar" + layout="topleft" + name="appearance_sidebar_positioning" + tool_tip="Use automatic camera positioning for sidebar" + width="242" /> <icon follows="left|top" height="18" @@ -164,9 +174,10 @@ Automatic position for: label="Opacity" layout="topleft" left="80" - label_width="60" + label_width="156" name="bubble_chat_opacity" - width="200" /> + top_pad = "10" + width="347" /> <color_swatch can_apply_immediately="true" color="0 0 0 1" @@ -174,7 +185,7 @@ Automatic position for: follows="left|top" height="50" layout="topleft" - left_pad="10" + left_pad="30" top="190" name="background" tool_tip="Choose color for bubble chat" @@ -192,10 +203,10 @@ Automatic position for: follows="left|top" height="12" layout="topleft" - left="30" + left="80" name="UI Size:" - top_pad="5" - width="300"> + top_pad="25" + width="160"> UI size </text> <slider @@ -206,7 +217,7 @@ Automatic position for: increment="0.025" initial_value="1" layout="topleft" - left_delta="52" + left_pad="0" max_val="1.4" min_val="0.75" name="ui_scale_slider" @@ -304,7 +315,7 @@ Automatic position for: label="Other Devices" left="30" name="joystick_setup_button" - top_pad="12" + top="27" width="155"> <button.commit_callback function="Floater.Show" 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 0a56f711dd..266fd6cb5e 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -160,7 +160,7 @@ layout="topleft" left="5" name="CustomGraphics Panel" - top="124" + top="76" width="485"> <text type="string" @@ -351,7 +351,7 @@ top_delta="0" width="128"> m - </text> + </text> <slider control_name="RenderMaxPartCount" decimal_digits="0" @@ -367,6 +367,34 @@ name="MaxParticleCount" top_pad="7" width="303" /> + <slider + control_name="RenderAvatarMaxVisible" + decimal_digits="0" + follows="left|top" + height="16" + increment="2" + initial_value="35" + label="Max. avatar draw distance:" + label_width="185" + layout="topleft" + left_delta="0" + max_val="65" + min_val="1" + name="MaxAvatarDrawDistance" + top_pad="4" + width="290" /> + <text + type="string" + length="1" + follows="left|top" + height="12" + layout="topleft" + left_delta="291" + name="DrawDistanceMeterText3" + top_delta="0" + width="128"> + m + </text> <slider control_name="RenderGlowResolutionPow" decimal_digits="0" @@ -377,7 +405,7 @@ label="Post process quality:" label_width="185" layout="topleft" - left_delta="0" + left="200" max_val="9" min_val="8" name="RenderPostProcess" @@ -522,7 +550,7 @@ layout="topleft" left="469" name="PostProcessText" - top="305" + top="60" width="128"> Low </text> @@ -607,7 +635,7 @@ layout="topleft" left="200" name="LightingDetailText" - top_pad="8" + top_pad="18" width="140"> Lighting detail: </text> @@ -644,7 +672,7 @@ layout="topleft" left_pad="-30" name="TerrainDetailText" - top="465" + top="226" width="155"> Terrain detail: </text> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index e03ecd8f04..65c78ad333 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -14,7 +14,7 @@ follows="left|top" font.style="BOLD" height="15" - increment="0.05" + increment="0.025" initial_value="0.5" label="Master volume" label_width="120" @@ -57,7 +57,7 @@ disabled_control="MuteAudio" follows="left|top" height="15" - increment="0.05" + increment="0.025" initial_value="0.5" label="Buttons" label_width="120" @@ -91,7 +91,7 @@ disabled_control="MuteAudio" follows="left|top" height="15" - increment="0.05" + increment="0.025" initial_value="0.5" label="Ambient" label_width="120" @@ -125,7 +125,7 @@ disabled_control="MuteAudio" follows="left|top" height="15" - increment="0.05" + increment="0.025" initial_value="0.5" label="Sound Effects" label_width="120" @@ -159,7 +159,7 @@ disabled_control="MuteAudio" follows="left|top" height="15" - increment="0.05" + increment="0.025" initial_value="0.5" label="Streaming music" label_width="120" @@ -202,7 +202,7 @@ disabled_control="MuteAudio" follows="left|top" height="16" - increment="0.05" + increment="0.025" initial_value="0.5" label="Media" label_width="120" @@ -247,7 +247,7 @@ disabled_control="MuteAudio" follows="left|top" height="16" - increment="0.05" + increment="0.025" initial_value="0.5" label="Voice Chat" label_width="120" @@ -454,7 +454,7 @@ control_name="AudioLevelMic" follows="left|top" height="17" - increment="0.05" + increment="0.025" initial_value="1.0" layout="topleft" left="160" diff --git a/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml b/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml index b48943c699..07642946f8 100644 --- a/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml +++ b/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml @@ -6,25 +6,27 @@ name="panel_stand_stop_flying" mouse_opaque="false" visible="true" - width="115"> + width="133"> <button follows="left|bottom" height="19" label="Stand" layout="topleft" + left="10" name="stand_btn" tool_tip="Click here to stand up." top="2" visible="false" - width="115" /> + width="113" /> <button follows="left|bottom" height="19" label="Stop Flying" layout="topleft" + left="10" name="stop_fly_btn" tool_tip="Stop flying" top="2" visible="false" - width="115" /> + width="113" /> </panel> 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 690d2971ee..008aa1acc0 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -43,38 +43,43 @@ </panel.string> <button auto_resize="true" - halign="right" + halign="center" + enabled="false" font="SansSerifSmall" follows="right|top" image_overlay="" - image_selected="spacer35.tga" - image_unselected="spacer35.tga" - image_pressed="spacer35.tga" - height="16" - right="-230" + image_selected="bevel_background" + image_unselected="bevel_background" + image_pressed="bevel_background" + height="18" + right="-275" label_shadow="false" name="buycurrency" + label_color_disabled="ButtonLabelColor" + image_color_disabled="White" tool_tip="My Balance" - top="3" - width="120" /> + pad_left="12" + pad_right="12" + top="0" + width="40" /> <button auto_resize="true" - halign="right" + halign="center" font="SansSerifSmall" follows="right|top" - image_selected="spacer35.tga" - image_unselected="spacer35.tga" - image_pressed="spacer35.tga" - height="16" - label="Buy L$" - label_color="EmphasisColor" + image_hover_unselected="buy_over" + image_unselected="buy_off" + image_pressed="buy_press" + height="18" + label="BUY L$" + label_color="White" left_pad="0" - label_shadow="false" + label_shadow="true" name="buyL" - pad_right="20" + pad_right="0" pad_bottom="2" tool_tip="Click to buy more L$" - top="2" + top="0" width="55" /> <text type="string" @@ -88,7 +93,7 @@ left_pad="0" name="TimeText" tool_tip="Current time (Pacific)" - width="100"> + width="145"> 24:00 AM PST </text> <button diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index e74c70789f..3d7b0b7edc 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -86,14 +86,22 @@ width="333"> </text> <button follows="left|top" - height="20" - image_overlay="windows/Icon_Gear_Over.png" + height="23" + image_overlay="Edit_Wrench" label="" layout="topleft" left="265" name="edit_outfit_btn" top="7" width="30" /> + <loading_indicator + follows="left|top" + height="24" + layout="topleft" + left="268" + name="wearables_loading_indicator" + top="6" + width="24" /> </panel> <filter_editor height="23" @@ -112,6 +120,7 @@ width="333"> height="493" min_height="410" width="320" + visible="false" left="0" tab_group="1" top_pad="6" diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 812d94c55f..4c42d1f750 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -58,6 +58,16 @@ top="0" width="102" /> <button + enabled="true" + follows="bottom|left" + height="23" + label="Shop" + layout="topleft" + left="210" + name="shop_btn" + top="0" + width="102" /> + <button enabled="false" follows="bottom|left" height="23" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index f544449d02..078426d3d9 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -46,6 +46,13 @@ <string name="LoginWaitingForRegionHandshake">Waiting for region handshake...</string> <string name="LoginConnectingToRegion">Connecting to region...</string> <string name="LoginDownloadingClothing">Downloading clothing...</string> + <string name="InvalidCertificate">The server returned an invalid or corrupt certificate. Please contact the Grid administrator.</string> + <string name="CertInvalidHostname">An invalid hostname was used to access the server, please check your SLURL or Grid hostname.</string> + <string name="CertExpired">The certificate returned by the Grid appears to be expired. Please check your system clock, or contact your Grid administrator.</string> + <string name="CertKeyUsage">The certificate returned by the server could not be used for SSL. Please contact your Grid administrator.</string> + <string name="CertBasicConstraints">Too many certificates were in the servers Certificate chain. Please contact your Grid administrator.</string> + <string name="CertInvalidSignature">The certificate signature returned by the Grid server could not be verified. Please contact your Grid administrator.</string> + <string name="LoginFailedNoNetwork">Network Error: Could not establish connection, please check your network connection.</string> <string name="LoginFailed">Login failed.</string> <string name="Quit">Quit</string> @@ -1885,6 +1892,7 @@ Clears (deletes) the media and all params from the given face. <string name="Wave" value=" Wave " /> <string name="HelloAvatar" value=" Hello, avatar! " /> <string name="ViewAllGestures" value=" View All >>" /> + <string name="GetMoreGestures" value=" Get More >>" /> <!-- inventory filter --> <!-- use value="" because they have preceding spaces --> @@ -3127,6 +3135,36 @@ Abuse Report</string> <string name="New Script">New Script</string> <string name="New Folder">New Folder</string> <string name="Contents">Contents</string> + <string name="Gesture">Gesture</string> + <string name="Male Gestures">Male Gestures</string> + <string name="Female Gestures">Female Gestures</string> + <string name="Other Gestures">Other Gestures</string> + <string name="Speech Gestures">Speech Gestures</string> + <string name="Common Gestures">Common Gestures</string> + <!-- gestures --> + <string name="Male - Excuse me">Male - Excuse me</string> + <string name="Male - Get lost">Male - Get lost</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 - Excuse me">FeMale - 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 - Laugh">Female - Laugh</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> <!-- birth date format shared by avatar inspector and profile panels --> <string name="AvatarBirthDateFormat">[mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt]</string> @@ -3136,5 +3174,27 @@ Abuse Report</string> <!-- language specific white-space characters, delimiters, spacers, item separation symbols --> <string name="sentences_separator" value=" "></string> + + <string name="server_is_down"> + Despite our best efforts, something unexpected has gone wrong. + + Please check secondlife.com/status to see if there is a known problem with the service. + If you continue to experience problems, please check your network and firewall setup. + </string> + <!-- overriding datetime formating. + leave emtpy in for current localization this is not needed + list of values should be separated with ':' + example: + <string name="dateTimeWeekdaysShortNames"> + Son:Mon:Tue:Wed:Thu:Fri:Sat + </string> + --> + <string name="dateTimeWeekdaysNames"></string> + <string name="dateTimeWeekdaysShortNames"></string> + <string name="dateTimeMonthNames"></string> + <string name="dateTimeMonthShortNames"></string> + <string name="dateTimeDayFormat"></string> + <string name="dateTimeAM"></string> + <string name="dateTimePM"></string> </strings> diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml index c4f0fe5208..6dcc27b469 100644 --- a/indra/newview/skins/default/xui/en/widgets/button.xml +++ b/indra/newview/skins/default/xui/en/widgets/button.xml @@ -7,6 +7,7 @@ image_selected="PushButton_Selected" image_disabled_selected="PushButton_Selected_Disabled" image_disabled="PushButton_Disabled" + image_flash="FlashIconAbsent" image_top_pad="0" image_bottom_pad="0" imgoverlay_label_space="1" diff --git a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml index 6190ea7872..216c4dea95 100644 --- a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml +++ b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml @@ -11,6 +11,7 @@ read_only="true" use_ellipses="true" word_wrap="true" + show_context_menu="true" tab_stop="true" v_pad="3" h_pad="4" > diff --git a/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml b/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml new file mode 100644 index 0000000000..98707b8495 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel_camera_item + background_visible="false" + height="30" + layout="topleft" + width="212"> + <panel_camera_item.icon_over + follows="top|left" + height="30" + image_name="ListItem_Over" + left="0" + mouse_opaque="false" + layout="topleft" + name="hovered_icon" + top="30" + scale_image="true" + visible="false" + width="212" /> + <panel_camera_item.icon_selected + follows="top|left" + height="30" + image_name="ListItem_Select" + layout="topleft" + left="0" + mouse_opaque="false" + name="selected_icon" + top="30" + scale_image="true" + visible="false" + width="212" /> + <panel_camera_item.picture + follows="top|left" + height="30" + image_name="Icon_For_Sale" + layout="topleft" + left="0" + mouse_opaque="false" + name="picture" + tab_stop="false" + top="30" + top_pad="10" + width="30" /> + <panel_camera_item.selected_picture + follows="top|left" + height="30" + image_name="Cam_Rotate_In" + layout="topleft" + left="0" + mouse_opaque="false" + name="selected_picture" + tab_stop="false" + top="30" + top_pad="8" + visible="false" + width="30" /> + <panel_camera_item.text + follows="top|left|right" + font="SansSerifMedium" + height="15" + layout="topleft" + left ="38" + name="picture_name" + text_color="white" + top="21" + use_ellipses="true" + width="170" + word_wrap="false" > + Text + </panel_camera_item.text> +</panel_camera_item> diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml index 8d6b0c1cfe..30b0a8462a 100644 --- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml +++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml @@ -13,20 +13,29 @@ label_pad_left - padding to the left of tab button labels label_pad_left="4"> <first_tab tab_top_image_unselected="TabTop_Left_Off" tab_top_image_selected="TabTop_Left_Selected" + tab_top_image_flash="FlashIconAbsent" tab_bottom_image_unselected="Toolbar_Left_Off" tab_bottom_image_selected="Toolbar_Left_Selected" + tab_bottom_image_flash="FlashIconAbsent" tab_left_image_unselected="SegmentedBtn_Left_Disabled" - tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/> + tab_left_image_selected="SegmentedBtn_Left_Selected_Over" + tab_left_image_flash="FlashIconAbsent"/> <middle_tab tab_top_image_unselected="TabTop_Middle_Off" tab_top_image_selected="TabTop_Middle_Selected" + tab_top_image_flash="FlashIconAbsent" tab_bottom_image_unselected="Toolbar_Middle_Off" tab_bottom_image_selected="Toolbar_Middle_Selected" + tab_bottom_image_flash="FlashIconAbsent" tab_left_image_unselected="SegmentedBtn_Left_Disabled" - tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/> + tab_left_image_selected="SegmentedBtn_Left_Selected_Over" + tab_left_image_flash="FlashIconAbsent"/> <last_tab tab_top_image_unselected="TabTop_Right_Off" tab_top_image_selected="TabTop_Right_Selected" + tab_top_image_flash="FlashIconAbsent" tab_bottom_image_unselected="Toolbar_Right_Off" tab_bottom_image_selected="Toolbar_Right_Selected" + tab_bottom_image_flash="FlashIconAbsent" tab_left_image_unselected="SegmentedBtn_Left_Disabled" - tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/> + tab_left_image_selected="SegmentedBtn_Left_Selected_Over" + tab_left_image_flash="FlashIconAbsent"/> </tab_container> diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml index ebd0bdb3d7..1af089cfaf 100644 --- a/indra/newview/skins/default/xui/es/floater_about.xml +++ b/indra/newview/skins/default/xui/es/floater_about.xml @@ -29,7 +29,7 @@ Versión de libcurl: [LIBCURL_VERSION] Versión de J2C Decoder: [J2C_VERSION] Versión de Audio Driver: [AUDIO_DRIVER_VERSION] Versión de Qt Webkit: [QT_WEBKIT_VERSION] -Versión de Vivox: [VIVOX_VERSION] +Versión del servidor de voz: [VOICE_VERSION] </floater.string> <floater.string name="none"> (no hay) 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 f3a278945c..c672f68c5c 100644 --- a/indra/newview/skins/default/xui/es/floater_about_land.xml +++ b/indra/newview/skins/default/xui/es/floater_about_land.xml @@ -63,6 +63,9 @@ No se ha seleccionado una parcela. Vaya al menú Mundo > Acerca del terreno o seleccione otra parcela para ver sus caracterÃsticas. </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] + </panel.string> <text name="Name:"> Nombre: </text> diff --git a/indra/newview/skins/default/xui/es/floater_avatar_textures.xml b/indra/newview/skins/default/xui/es/floater_avatar_textures.xml index 089ff3cd68..54ef34264c 100644 --- a/indra/newview/skins/default/xui/es/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/es/floater_avatar_textures.xml @@ -3,41 +3,46 @@ <floater.string name="InvalidAvatar"> AVATAR NO VÃLIDO </floater.string> - <text name="composite_label"> - Texturas compuestas - </text> - <button label="Soltar" label_selected="Soltar" name="Dump"/> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> - <texture_picker label="Pelo" name="hair-baked"/> - <texture_picker label="Pelo" name="hair_grain"/> - <texture_picker label="Alfa del pelo" name="hair_alpha"/> - <texture_picker label="Cabeza" name="head-baked"/> - <texture_picker label="Maquillaje" name="head_bodypaint"/> - <texture_picker label="Alfa de la cabeza" name="head_alpha"/> - <texture_picker label="Tatuaje de la cabeza" name="head_tattoo"/> - <texture_picker label="Ojos" name="eyes-baked"/> - <texture_picker label="Ojo" name="eyes_iris"/> - <texture_picker label="Alfa de los ojos" name="eyes_alpha"/> - <texture_picker label="Parte superior del cuerpo" name="upper-baked"/> - <texture_picker label="Pintura corporal: parte superior del cuerpo" name="upper_bodypaint"/> - <texture_picker label="Camiseta" name="upper_undershirt"/> - <texture_picker label="Guantes" name="upper_gloves"/> - <texture_picker label="Camisa" name="upper_shirt"/> - <texture_picker label="Parte superior de la chaqueta" name="upper_jacket"/> - <texture_picker label="Alfa superior" name="upper_alpha"/> - <texture_picker label="Tatuaje superior" name="upper_tattoo"/> - <texture_picker label="Parte inferior del cuerpo" name="lower-baked"/> - <texture_picker label="Pintura corporal: parte inferior del cuerpo" name="lower_bodypaint"/> - <texture_picker label="Ropa interior" name="lower_underpants"/> - <texture_picker label="Calcetines" name="lower_socks"/> - <texture_picker label="Zapatos" name="lower_shoes"/> - <texture_picker label="Pantalones" name="lower_pants"/> - <texture_picker label="Chaqueta" name="lower_jacket"/> - <texture_picker label="Alfa inferior" name="lower_alpha"/> - <texture_picker label="Tatuaje inferior" name="lower_tattoo"/> - <texture_picker label="Falda" name="skirt-baked"/> - <texture_picker label="Falda" name="skirt"/> + <text name="label"> + Texturas obtenidas mediante bake + </text> + <text name="composite_label"> + Texturas compuestas + </text> + <button label="Volcar IDs a la consola" label_selected="Volcado" name="Dump"/> + <panel name="scroll_content_panel"> + <texture_picker label="Pelo" name="hair-baked"/> + <texture_picker label="Pelo" name="hair_grain"/> + <texture_picker label="Alfa del pelo" name="hair_alpha"/> + <texture_picker label="Cabeza" name="head-baked"/> + <texture_picker label="Maquillaje" name="head_bodypaint"/> + <texture_picker label="Alfa de la cabeza" name="head_alpha"/> + <texture_picker label="Tatuaje de la cabeza" name="head_tattoo"/> + <texture_picker label="Ojos" name="eyes-baked"/> + <texture_picker label="Ojo" name="eyes_iris"/> + <texture_picker label="Alfa de los ojos" name="eyes_alpha"/> + <texture_picker label="Parte superior del cuerpo" name="upper-baked"/> + <texture_picker label="Pintura corporal superior" name="upper_bodypaint"/> + <texture_picker label="Camiseta" name="upper_undershirt"/> + <texture_picker label="Guantes" name="upper_gloves"/> + <texture_picker label="Camisa" name="upper_shirt"/> + <texture_picker label="Parte superior de la chaqueta" name="upper_jacket"/> + <texture_picker label="Alfa superior" name="upper_alpha"/> + <texture_picker label="Tatuaje superior" name="upper_tattoo"/> + <texture_picker label="Parte inferior del cuerpo" name="lower-baked"/> + <texture_picker label="Pintura corporal inferior" name="lower_bodypaint"/> + <texture_picker label="Ropa interior" name="lower_underpants"/> + <texture_picker label="Calcetines" name="lower_socks"/> + <texture_picker label="Zapatos" name="lower_shoes"/> + <texture_picker label="Pantalones" name="lower_pants"/> + <texture_picker label="Chaqueta" name="lower_jacket"/> + <texture_picker label="Alfa inferior" name="lower_alpha"/> + <texture_picker label="Tatuaje inferior" name="lower_tattoo"/> + <texture_picker label="Falda" name="skirt-baked"/> + <texture_picker label="Falda" name="skirt"/> + </panel> </panel> </scroll_container> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/es/floater_buy_currency_html.xml new file mode 100644 index 0000000000..08ea67d4cb --- /dev/null +++ b/indra/newview/skins/default/xui/es/floater_buy_currency_html.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_buy_currency_html" title="COMPRAR DINERO"/> diff --git a/indra/newview/skins/default/xui/es/floater_map.xml b/indra/newview/skins/default/xui/es/floater_map.xml index fde4d37caf..7588380148 100644 --- a/indra/newview/skins/default/xui/es/floater_map.xml +++ b/indra/newview/skins/default/xui/es/floater_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Map" title="Minimapa"> +<floater name="Map" title=""> <floater.string name="mini_map_north"> N </floater.string> diff --git a/indra/newview/skins/default/xui/es/floater_moveview.xml b/indra/newview/skins/default/xui/es/floater_moveview.xml index 7cb41d3f5b..258f84c361 100644 --- a/indra/newview/skins/default/xui/es/floater_moveview.xml +++ b/indra/newview/skins/default/xui/es/floater_moveview.xml @@ -6,18 +6,48 @@ <string name="walk_back_tooltip"> Caminar de espaldas (cursor abajo o S) </string> + <string name="walk_left_tooltip"> + Caminar a la izq. (pulsa Mayúsculas + cursor izq. o A) + </string> + <string name="walk_right_tooltip"> + Caminar a la der. (pulsa Mayúsculas + cursor der. o D) + </string> <string name="run_forward_tooltip"> Correr hacia adelante (cursor arriba o W) </string> <string name="run_back_tooltip"> Correr de espaldas (cursor abajo o S) </string> + <string name="run_left_tooltip"> + Correr a la izq. (pulsa Mayúsculas + cursor izq. o A) + </string> + <string name="run_right_tooltip"> + Correr a la der. (pulsa Mayúsculas + cursor der. o D) + </string> <string name="fly_forward_tooltip"> Volar hacia adelante (cursor arriba o W) </string> <string name="fly_back_tooltip"> Volar hacia atrás (cursor abajo o S) </string> + <string name="fly_left_tooltip"> + Volar a la izq. (pulsa Mayúsculas + cursor izq. o A) + </string> + <string name="fly_right_tooltip"> + Volar a la der. (pulsa Mayúsculas + cursor der. o D) + </string> + <string name="fly_up_tooltip"> + Volar (pulsa E para subir) + </string> + <string name="fly_down_tooltip"> + Volar (pulsa C para descender) + </string> + <string name="jump_tooltip"> + Saltar (pulsa E) + </string> + <string name="crouch_tooltip"> + Agacharse (pulsa C) + </string> <string name="walk_title"> Caminar </string> @@ -28,10 +58,12 @@ Volar </string> <panel name="panel_actions"> + <button label="" label_selected="" name="move up btn" tool_tip="Volar (pulsa E para subir)"/> <button label="" label_selected="" name="turn left btn" tool_tip="Girar a la izq. (cursor izq. o A)"/> + <joystick_slide name="move left btn" tool_tip="Caminar a la izq. (pulsa Mayúsculas + cursor izq. o A)"/> + <button label="" label_selected="" name="move down btn" tool_tip="Volar (pulsa C para descender)"/> <button label="" label_selected="" name="turn right btn" tool_tip="Girar a la der. (cursor der. o D)"/> - <button label="" label_selected="" name="move up btn" tool_tip="Volar: pulsa E para subir"/> - <button label="" label_selected="" name="move down btn" tool_tip="Volar: pulsa C para descender"/> + <joystick_slide name="move right btn" tool_tip="Caminar a la der. (pulsa Mayúsculas + cursor der. o D)"/> <joystick_turn name="forward btn" tool_tip="Caminar hacia adelante (cursor arriba o W)"/> <joystick_turn name="backward btn" tool_tip="Caminar de espaldas (cursor abajo o S)"/> </panel> diff --git a/indra/newview/skins/default/xui/es/floater_preview_notecard.xml b/indra/newview/skins/default/xui/es/floater_preview_notecard.xml index 57ec5eb7b4..d05a023279 100644 --- a/indra/newview/skins/default/xui/es/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/es/floater_preview_notecard.xml @@ -9,9 +9,6 @@ <floater.string name="Title"> Nota: [NAME] </floater.string> - <floater.string label="Guardar" label_selected="Guardar" name="Save"> - Guardar - </floater.string> <text name="desc txt"> Descripción: </text> @@ -19,4 +16,5 @@ Cargando... </text_editor> <button label="Guardar" label_selected="Guardar" name="Save"/> + <button label="Borrar" label_selected="Borrar" name="Delete"/> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml index 59f953c239..9637544f4e 100644 --- a/indra/newview/skins/default/xui/es/floater_tools.xml +++ b/indra/newview/skins/default/xui/es/floater_tools.xml @@ -67,7 +67,10 @@ <text name="RenderingCost" tool_tip="Muestra cuánto se calcula que cuesta renderizar este objeto"> þ: [COUNT] </text> - <check_box label="Estirar ambos lados" name="checkbox uniform"/> + <check_box label="" name="checkbox uniform"/> + <text label="Estirar ambos lados" name="checkbox uniform label"> + Estirar ambos lados + </text> <check_box initial_value="true" label="Estirar las texturas" name="checkbox stretch textures"/> <check_box initial_value="true" label="Usar la cuadrÃcula" name="checkbox snap to grid"/> <combo_box name="combobox grid mode" tool_tip="Elige qué cuadricula usar para posicionar el objeto" width="82"> @@ -394,8 +397,7 @@ <text name="glow label"> Resplandor </text> - <check_box bottom_delta="-21" label="Brillo al -máximo" name="checkbox fullbright"/> + <check_box bottom_delta="-21" label="Brillo al máximo" name="checkbox fullbright"/> <text name="tex gen"> Detallado </text> @@ -476,14 +478,7 @@ máximo" name="checkbox fullbright"/> Ãrea: [AREA] m² </text> <button label="Acerca del terreno" label_selected="Acerca del terreno" name="button about land"/> - <check_box label="Mostrar los propietarios" name="checkbox show owners" tool_tip="El color de las parcelas es según su propietario: - -Verde = Su terreno -Agua = Terreno de sus grupos -Rojo = Propiedad de otros -Amarillo = En venta -Morado = Para subasta -Gris = Público"/> + <check_box label="Mostrar los propietarios" name="checkbox show owners" tool_tip="El color de las parcelas es según su propietario: Verde = Su terreno Agua = Terreno de sus grupos Rojo = Propiedad de otros Amarillo = En venta Morado = Para subasta Gris = Público"/> <text name="label_parcel_modify"> Modificar la parcela </text> diff --git a/indra/newview/skins/default/xui/es/floater_world_map.xml b/indra/newview/skins/default/xui/es/floater_world_map.xml index 38a12002f5..c3a13980de 100644 --- a/indra/newview/skins/default/xui/es/floater_world_map.xml +++ b/indra/newview/skins/default/xui/es/floater_world_map.xml @@ -20,10 +20,10 @@ Venta de terreno </text> <text name="by_owner_label"> - por el propietario + por el dueño </text> <text name="auction_label"> - subasta de terreno + subasta </text> <button name="Go Home" tool_tip="Teleportar a mi Base"/> <text name="Home_label"> diff --git a/indra/newview/skins/default/xui/es/menu_attachment_self.xml b/indra/newview/skins/default/xui/es/menu_attachment_self.xml index 650ac78855..afac8d7fe9 100644 --- a/indra/newview/skins/default/xui/es/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/es/menu_attachment_self.xml @@ -5,7 +5,7 @@ <menu_item_call label="Quitar" name="Detach"/> <menu_item_call label="Soltar" name="Drop"/> <menu_item_call label="Levantarme" name="Stand Up"/> - <menu_item_call label="Mi apariencia" name="Appearance..."/> + <menu_item_call label="Cambiar vestuario" name="Change Outfit"/> <menu_item_call label="Mis amigos" name="Friends..."/> <menu_item_call label="Mis grupos" name="Groups..."/> <menu_item_call label="Mi perfil" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/es/menu_avatar_self.xml b/indra/newview/skins/default/xui/es/menu_avatar_self.xml index 5b72498439..d347a7d0c4 100644 --- a/indra/newview/skins/default/xui/es/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/es/menu_avatar_self.xml @@ -20,7 +20,9 @@ <context_menu label="Desanexar â–¶" name="Object Detach"/> <menu_item_call label="Quitarse todo" name="Detach All"/> </context_menu> - <menu_item_call label="Mi apariencia" name="Appearance..."/> + <menu_item_call label="Cambiar vestuario" name="Chenge Outfit"/> + <menu_item_call label="Editar mi vestuario" name="Edit Outfit"/> + <menu_item_call label="Editar mi anatomÃa" name="Edit My Shape"/> <menu_item_call label="Mis amigos" name="Friends..."/> <menu_item_call label="Mis grupos" name="Groups..."/> <menu_item_call label="Mi perfil" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/es/menu_bottomtray.xml b/indra/newview/skins/default/xui/es/menu_bottomtray.xml index 8169563882..62683f3076 100644 --- a/indra/newview/skins/default/xui/es/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/es/menu_bottomtray.xml @@ -4,6 +4,11 @@ <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 Barra lateral" name="ShowSidebarButton"/> + <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"/> diff --git a/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml index af5c17d7cb..4b56984541 100644 --- a/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <menu name="Gear Menu"> <menu_item_call label="Levantarme" name="stand_up"/> - <menu_item_call label="Mi apariencia" name="my_appearance"/> + <menu_item_call label="Cambiar vestuario" name="change_outfit"/> <menu_item_call label="Mi perfil" name="my_profile"/> <menu_item_call label="Mis amigos" name="my_friends"/> <menu_item_call label="Mis grupos" name="my_groups"/> diff --git a/indra/newview/skins/default/xui/es/menu_inventory.xml b/indra/newview/skins/default/xui/es/menu_inventory.xml index ea68bc5bee..bbee88f600 100644 --- a/indra/newview/skins/default/xui/es/menu_inventory.xml +++ b/indra/newview/skins/default/xui/es/menu_inventory.xml @@ -49,15 +49,19 @@ <menu_item_call label="Abrir" name="Sound Open"/> <menu_item_call label="Reemplazar el vestuario" name="Replace Outfit"/> <menu_item_call label="Añadir al vestuario" name="Add To Outfit"/> + <menu_item_call label="Quitar del vestuario actual" name="Remove From Outfit"/> + <menu_item_call label="Encontrar el original" name="Find Original"/> <menu_item_call label="Eliminar el Ãtem" name="Purge Item"/> <menu_item_call label="Restaurar el Ãtem" name="Restore Item"/> <menu_item_call label="Abrir" name="Open"/> + <menu_item_call label="Abrir original" name="Open Original"/> <menu_item_call label="Propiedades" name="Properties"/> <menu_item_call label="Renombrar" name="Rename"/> <menu_item_call label="Copiar la UUID" name="Copy Asset UUID"/> <menu_item_call label="Copiar" name="Copy"/> <menu_item_call label="Pegar" name="Paste"/> <menu_item_call label="Pegar como enlace" name="Paste As Link"/> + <menu_item_call label="Quitar el enlace" name="Remove Link"/> <menu_item_call label="Borrar" name="Delete"/> <menu_item_call label="Borrar carpeta del sistema" name="Delete System Folder"/> <menu_item_call label="Empezar multiconferencia" name="Conference Chat Folder"/> diff --git a/indra/newview/skins/default/xui/es/menu_login.xml b/indra/newview/skins/default/xui/es/menu_login.xml index df21ced9ab..5386f82ee5 100644 --- a/indra/newview/skins/default/xui/es/menu_login.xml +++ b/indra/newview/skins/default/xui/es/menu_login.xml @@ -2,10 +2,11 @@ <menu_bar name="Login Menu"> <menu label="Yo" name="File"> <menu_item_call label="Preferencias" name="Preferences..."/> - <menu_item_call label="Salir" name="Quit"/> + <menu_item_call label="Salir de [APP_NAME]" name="Quit"/> </menu> <menu label="Ayuda" name="Help"> <menu_item_call label="Ayuda de [SECOND_LIFE]" name="Second Life Help"/> + <menu_item_call label="Acerca de [APP_NAME]" name="About Second Life"/> </menu> <menu_item_check label="Mostrar el menú 'Debug'" name="Show Debug Menu"/> <menu label="Depurar" name="Debug"> diff --git a/indra/newview/skins/default/xui/es/menu_participant_list.xml b/indra/newview/skins/default/xui/es/menu_participant_list.xml index 0985f308ae..fd8bd05230 100644 --- a/indra/newview/skins/default/xui/es/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/es/menu_participant_list.xml @@ -14,8 +14,8 @@ <context_menu label="Opciones del moderador >" name="Moderator Options"> <menu_item_check label="Permitir el chat de texto" name="AllowTextChat"/> <menu_item_call label="Ignorar a este participante" name="ModerateVoiceMuteSelected"/> - <menu_item_call label="Silenciar a todos los demás" name="ModerateVoiceMuteOthers"/> <menu_item_call label="Quitar el silencio a este participante" name="ModerateVoiceUnMuteSelected"/> - <menu_item_call label="Quitar el silencio a todos los demás" name="ModerateVoiceUnMuteOthers"/> + <menu_item_call label="Silenciar a todos" name="ModerateVoiceMute"/> + <menu_item_call label="Quitar el silencio a todos" name="ModerateVoiceUnmute"/> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index c9ae4def46..1bc3e981ce 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -7,7 +7,7 @@ </menu_item_call> <menu_item_call label="Comprar L$" name="Buy and Sell L$"/> <menu_item_call label="Mi perfil" name="Profile"/> - <menu_item_call label="Mi apariencia" name="Appearance"/> + <menu_item_call label="Cambiar vestuario" name="ChangeOutfit"/> <menu_item_check label="Mi Inventario" name="Inventory"/> <menu_item_check label="Mi Inventario" name="ShowSidetrayInventory"/> <menu_item_check label="Mis gestos" name="Gestures"/> @@ -162,6 +162,7 @@ <menu_item_check label="Objetos flexibles" name="Flexible Objects"/> </menu> <menu_item_check label="Ejecutar múltiples temas" name="Run Multiple Threads"/> + <menu_item_check label="Usar Plugin Read Thread" name="Use Plugin Read Thread"/> <menu_item_call label="Vaciar la caché de grupo" name="ClearGroupCache"/> <menu_item_check label="Vista subjetiva suavizada" name="Mouse Smoothing"/> <menu label="Atajos de teclado" name="Shortcuts"> @@ -188,7 +189,6 @@ <menu_item_call label="Acercar el zoom" name="Zoom In"/> <menu_item_call label="Zoom por defecto" name="Zoom Default"/> <menu_item_call label="Alejar el zoom" name="Zoom Out"/> - <menu_item_call label="Pantalla completa" name="Toggle Fullscreen"/> </menu> <menu_item_call label="Mostrar las configuraciones del depurador" name="Debug Settings"/> <menu_item_check label="Mostrar el menú 'Develop'" name="Debug Mode"/> diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml index 49f30ae807..47dc31f5f4 100644 --- a/indra/newview/skins/default/xui/es/notifications.xml +++ b/indra/newview/skins/default/xui/es/notifications.xml @@ -323,6 +323,9 @@ Necesitas una cuenta para entrar en [SECOND_LIFE]. ¿Quieres crear una ahora? </url> <usetemplate name="okcancelbuttons" notext="Volver a intentarlo" yestext="Crear una cuenta nueva"/> </notification> + <notification name="InvalidCredentialFormat"> + Escribe el nombre y apellido de tu avatar en el campo Nombre de usuario e inicia sesión otra vez. + </notification> <notification name="AddClassified"> Los anuncios clasificados aparecen durante una semana en la sección 'Clasificados' de la búsqueda y en [http://secondlife.com/community/classifieds secondlife.com]. Rellena tu anuncio y pulsa 'Publicar...' para añadirlo al directorio. @@ -611,6 +614,11 @@ PodrÃa ser [VALIDS] <notification name="CannotEncodeFile"> No se puede codificar el archivo: [FILE] </notification> + <notification name="CorruptedProtectedDataStore"> + No se pueden leer los datos protegidos, por lo que se están restaurando. + Esto puede deberse a un cambio de configuración de la red. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="CorruptResourceFile"> Archivo con los recursos corruptos: [FILE] </notification> @@ -973,6 +981,12 @@ en TODO EL TERRENO de este sim? Por favor, elige un pago mayor. </notification> + <notification name="ConfirmItemDeleteHasLinks"> + Por lo menos uno de los elementos seleccionados contiene vÃnculos que le señalan. Si eliminas este elemento, los vÃnculos dejarán de funcionar permanentemente. Lo más recomendable es eliminar primero los vÃnculos. + +¿Estás seguro de que quieres eliminar los elementos? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> + </notification> <notification name="ConfirmObjectDeleteLock"> Al menos uno de los Ãtems que has seleccionado está bloqueado. @@ -1124,6 +1138,42 @@ Por favor, elige el avatar masculino o femenino. Puedes cambiar más adelante tu elección. <usetemplate name="okcancelbuttons" notext="Mujer" yestext="Varón"/> </notification> + <notification name="CantTeleportToGrid"> + No se puede hacer el teleporte a [SLURL] porque se encuentra en una cuadrÃcula ([GRID]) diferente de la actual ([CURRENT_GRID]). Cierra el visor y vuelve a intentarlo. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="GeneralCertificateError"> + No se puede establecer la conexión con el servidor. +[REASON] + +Nombre del asunto: [SUBJECT_NAME_STRING] +Nombre del emisor: [ISSUER_NAME_STRING] +Válido desde: [VALID_FROM] +Válido hasta: [VALID_TO] +Huella digital MD5: [SHA1_DIGEST] +Huella digital SHA1: [MD5_DIGEST] +Uso de la clave: [KEYUSAGE] +Uso de clave extendida: [EXTENDEDKEYUSAGE] +Identificador de clave de asunto: [SUBJECTKEYIDENTIFIER] + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TrustCertificateError"> + La autoridad de certificación de este servidor se desconoce. + +Información del certificado: +Nombre del asunto: [SUBJECT_NAME_STRING] +Nombre del emisor: [ISSUER_NAME_STRING] +Válido desde: [VALID_FROM] +Válido hasta: [VALID_TO] +Huella digital MD5: [SHA1_DIGEST] +Huella digital SHA1: [MD5_DIGEST] +Uso de la clave: [KEYUSAGE] +Uso de clave extendida: [EXTENDEDKEYUSAGE] +Identificador de clave de asunto: [SUBJECTKEYIDENTIFIER] + +¿Deseas confiar en esta autoridad? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Confiar"/> + </notification> <notification name="NotEnoughCurrency"> [NAME] cuesta [PRICE] L$. No tienes suficientes L$ para hacer eso. </notification> @@ -1519,7 +1569,7 @@ Por favor, comprueba que tienes instalado el último visor, y dirÃgete a la Bas <notification name="RegionEntryAccessBlocked_Change"> No estás autorizado en esta región 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. +Pulsa 'Cambiar las preferencias' para incrementar las preferencias del nivel de calificación y obtener acceso inmediato. Esto te permitirá buscar contenidos [REGIONMATURITY] y tener acceso a ellos. Si prefieres cambiar esta opción más adelante, puedes hacerlo desde Yo > Preferencias > General. <form name="form"> <button name="OK" text="Cambiar las preferencias"/> <button default="true" name="Cancel" text="Cerrar"/> @@ -1527,7 +1577,7 @@ Puedes pulsar 'Cambiar las Preferencias' para incrementar las preferen </form> </notification> <notification name="PreferredMaturityChanged"> - Tu preferencia actual de calificación es [RATING]. + Tu preferencia de nivel de calificación actual es [RATING]. </notification> <notification name="LandClaimAccessBlocked"> No puedes reclamar este terreno por su nivel de calificación. Puede deberse a que no hay información validada de tu edad. @@ -2288,15 +2338,6 @@ Por favor, vuelve a intentarlo en unos momentos. <button name="Mute" text="Ignorar"/> </form> </notification> - <notification name="ObjectGiveItemUnknownUser"> - Un objeto de nombre [OBJECTFROMNAME] propiedad de (un Residente desconocido) te ha dado este [OBJECTTYPE]: -[ITEM_SLURL] - <form name="form"> - <button name="Keep" text="Guardar"/> - <button name="Discard" text="Descartar"/> - <button name="Mute" text="Ignorar"/> - </form> - </notification> <notification name="UserGiveItem"> [NAME_SLURL] te ha dado este [OBJECTTYPE]: [ITEM_SLURL] @@ -2608,8 +2649,51 @@ Se mostrará cuando haya suficiente espacio. <notification name="ShareNotification"> Arrastrar Ãtems desde el inventario hasta una persona en el perfil del residente. </notification> + <notification name="DeedToGroupFail"> + Error de transferencia a grupo. + </notification> <notification name="AvatarRezNotification"> - Avatar de '[NAME]' obtenido en [TIME] segs. + ( [EXISTENCE] segundos vivo) +El avatar '[NAME]' tardó [TIME] segundos en dejar de aparecer como nube. + </notification> + <notification name="AvatarRezSelfNotification"> + ( [EXISTENCE] segundos vivo) +Has terminado de texturizar tu vestuario en [TIME] segundos. + </notification> + <notification name="AvatarRezCloudNotification"> + ( [EXISTENCE] segundos vivo) +El avatar '[NAME]' se convirtió en nube. + </notification> + <notification name="AvatarRezArrivedNotification"> + ( [EXISTENCE] segundos vivo) +Apareció el avatar '[NAME]'. + </notification> + <notification name="AvatarRezLeftCloudNotification"> + ( [EXISTENCE] segundos vivo) +El avatar '[NAME]' salió al cabo de [TIME] segundos como nube. + </notification> + <notification name="AvatarRezEnteredAppearanceNotification"> + ( [EXISTENCE] segundos vivo) +El avatar '[NAME]' ya está en modo de edición de apariencia. + </notification> + <notification name="AvatarRezLeftAppearanceNotification"> + ( [EXISTENCE] segundos vivo) +El avatar '[NAME]' desactivó el modo de apariencia. + </notification> + <notification name="AvatarRezLeftNotification"> + ( [EXISTENCE] segundos vivo) +El avatar '[NAME]' ya estaba totalmente cargado al salir. + </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Ã"/> + </notification> + <notification name="ConfirmMuteAll"> + Has seleccionado silenciar a todos los participantes en una multiconferencia. +Si lo haces, todos los residentes que se unan posteriormente a la llamada también serán silenciados, incluso cuando abandones la conferencia. + +¿Deseas silenciar a todos? + <usetemplate ignoretext="Confirma que deseas silenciar a todos los participantes en una multiconferencia." name="okcancelignore" notext="OK" yestext="Cancelar"/> </notification> <global name="UnsupportedCPU"> - La velocidad de tu CPU no cumple los requerimientos mÃnimos. diff --git a/indra/newview/skins/default/xui/es/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/es/panel_body_parts_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_body_parts_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/es/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/es/panel_bodyparts_list_button_bar.xml new file mode 100644 index 0000000000..66ae7d868b --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_bodyparts_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Cambiar" name="switch_btn"/> + <button label="Comprar >" name="bodyparts_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/es/panel_bottomtray.xml b/indra/newview/skins/default/xui/es/panel_bottomtray.xml index 74dc17f3de..5ea09ed795 100644 --- a/indra/newview/skins/default/xui/es/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/es/panel_bottomtray.xml @@ -1,11 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="bottom_tray"> - <string name="SpeakBtnToolTip"> - Activa/Desactiva el micrófono - </string> - <string name="VoiceControlBtnToolTip"> - Muestra/Oculta el panel del control de voz - </string> + <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"> @@ -24,6 +20,21 @@ <layout_panel name="snapshot_panel"> <button label="" name="snapshots" tool_tip="Hacer una foto"/> </layout_panel> + <layout_panel name="sidebar_btn_panel"> + <button label="Barra lateral" name="sidebar_btn" tool_tip="Muestra/Oculta la barra lateral"/> + </layout_panel> + <layout_panel name="build_btn_panel"> + <button label="Construir" name="build_btn" tool_tip="Muestra/Oculta las herramientas de construcción"/> + </layout_panel> + <layout_panel name="search_btn_panel"> + <button label="Buscar" name="search_btn" tool_tip="Muestra/Oculta la búsqueda"/> + </layout_panel> + <layout_panel name="world_map_btn_panel"> + <button label="Mapa" name="world_map_btn" tool_tip="Muestra/Oculta el mapa del mundo"/> + </layout_panel> + <layout_panel name="mini_map_btn_panel"> + <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"/> diff --git a/indra/newview/skins/default/xui/es/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/es/panel_clothing_list_button_bar.xml new file mode 100644 index 0000000000..d3b3d31bd9 --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_clothing_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Añadir +" name="add_btn"/> + <button label="Comprar >" name="clothing_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/es/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/es/panel_clothing_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/es/panel_cof_wearables.xml b/indra/newview/skins/default/xui/es/panel_cof_wearables.xml new file mode 100644 index 0000000000..a2994894c1 --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_cof_wearables.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="cof_wearables"> + <accordion name="cof_wearables_accordion"> + <accordion_tab name="tab_attachments" title="Adjuntos"/> + <accordion_tab name="tab_clothing" title="Ropa"/> + <accordion_tab name="tab_body_parts" title="Partes del cuerpo"/> + </accordion> +</panel> diff --git a/indra/newview/skins/default/xui/es/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/es/panel_deletable_wearable_list_item.xml new file mode 100644 index 0000000000..91d90a5660 --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_deletable_wearable_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="deletable_wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/es/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/es/panel_dummy_clothing_list_item.xml new file mode 100644 index 0000000000..6af84de0c7 --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_dummy_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="dummy_clothing_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_shape.xml b/indra/newview/skins/default/xui/es/panel_edit_shape.xml index 1a13f928a2..e64ec9ab7c 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_shape.xml @@ -1,14 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_shape_panel"> - <panel name="avatar_sex_panel"> - <text name="gender_text"> - Sexo: - </text> - <radio_group name="sex_radio"> - <radio_item label="Mujer" name="radio"/> - <radio_item label="Varón" name="radio2"/> - </radio_group> - </panel> + <text name="avatar_height"> + [HEIGHT] metros de alto + </text> <panel label="Camisa" name="accordion_panel"> <accordion name="wearable_accordion"> <accordion_tab name="shape_body_tab" title="Cuerpo"/> diff --git a/indra/newview/skins/default/xui/es/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/es/panel_edit_tattoo.xml index e5e72a11e4..8776dd6c10 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_tattoo.xml @@ -4,5 +4,6 @@ <texture_picker label="Tatuaje de la cabeza" name="Head Tattoo" tool_tip="Pulsa para elegir una imagen"/> <texture_picker label="Tatuaje superior" name="Upper Tattoo" tool_tip="Pulsa para elegir una imagen"/> <texture_picker label="Tatuaje inferior" name="Lower Tattoo" tool_tip="Pulsa para elegir una imagen"/> + <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_wearable.xml b/indra/newview/skins/default/xui/es/panel_edit_wearable.xml index 97ab566f4d..8bafe0f29a 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_wearable.xml @@ -93,6 +93,12 @@ <text name="edit_wearable_title" value="Modificando la anatomÃa"/> <panel label="Camisa" name="wearable_type_panel"> <text name="description_text" value="AnatomÃa:"/> + <radio_group name="sex_radio"> + <radio_item label="" name="sex_male" tool_tip="Varón" value="1"/> + <radio_item label="" name="sex_female" tool_tip="Mujer" value="0"/> + </radio_group> + <icon name="male_icon" tool_tip="Varón"/> + <icon name="female_icon" tool_tip="Mujer"/> </panel> <panel label="gear_buttom_panel" name="gear_buttom_panel"> <button name="friends_viewsort_btn" tool_tip="Opciones"/> diff --git a/indra/newview/skins/default/xui/es/panel_group_land_money.xml b/indra/newview/skins/default/xui/es/panel_group_land_money.xml index b763e2e74d..f307126b03 100644 --- a/indra/newview/skins/default/xui/es/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/es/panel_group_land_money.xml @@ -6,6 +6,9 @@ <panel.string name="cant_view_group_land_text"> No tienes permiso para ver el terreno propiedad del grupo </panel.string> + <panel.string name="epmty_view_group_land_text"> + No hay entradas + </panel.string> <panel.string name="cant_view_group_accounting_text"> No tienes permiso para ver la información de la cuenta del grupo. </panel.string> diff --git a/indra/newview/skins/default/xui/es/panel_group_notices.xml b/indra/newview/skins/default/xui/es/panel_group_notices.xml index 58e1919782..7a3dbad59e 100644 --- a/indra/newview/skins/default/xui/es/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/es/panel_group_notices.xml @@ -36,6 +36,7 @@ El máximo es de 200 por dÃa y grupo. <text name="string"> Arrastra y suelta aquà un Ãtem para adjuntarlo: </text> + <button label="Inventario" name="open_inventory" tool_tip="Abrir inventario"/> <button label="Quitar" label_selected="Remover lo anexado" name="remove_attachment" tool_tip="Quita el adjunto de tu aviso"/> <button label="Enviar" label_selected="Enviar" name="send_notice"/> <group_drop_target name="drop_target" tool_tip="Para enviar un Ãtem con el aviso, arrástralo desde tu inventario hasta este cajetÃn. Para poder adjuntarlo, debes tener permiso para copiarlo y transferirlo."/> diff --git a/indra/newview/skins/default/xui/es/panel_login.xml b/indra/newview/skins/default/xui/es/panel_login.xml index 0e4f118605..4b45a6f7b8 100644 --- a/indra/newview/skins/default/xui/es/panel_login.xml +++ b/indra/newview/skins/default/xui/es/panel_login.xml @@ -8,18 +8,15 @@ </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> - <text name="first_name_text"> - Nombre: + <text name="username_text"> + Nombre de usuario: </text> - <line_editor label="Nombre" name="first_name_edit" tool_tip="[SECOND_LIFE] First Name"/> - <text name="last_name_text"> - Apellido: - </text> - <line_editor label="Apellido" name="last_name_edit" tool_tip="[SECOND_LIFE] Last Name"/> + <line_editor label="Nombre de usuario" name="username_edit" tool_tip="Nombre de usuario de [SECOND_LIFE]"/> <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="start_location_text"> Empezar en: </text> @@ -27,7 +24,6 @@ <combo_box.item label="Mi última posición" name="MyLastLocation"/> <combo_box.item label="Mi Base" name="MyHome"/> </combo_box> - <button label="Iniciar sesión" name="connect_btn"/> </layout_panel> <layout_panel name="links"> <text name="create_new_account_text"> diff --git a/indra/newview/skins/default/xui/es/panel_main_inventory.xml b/indra/newview/skins/default/xui/es/panel_main_inventory.xml index 3a1e96a821..7e318a150b 100644 --- a/indra/newview/skins/default/xui/es/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/es/panel_main_inventory.xml @@ -9,62 +9,20 @@ <text name="ItemcountText"> Ãtems: </text> - <menu_bar name="Inventory Menu"> - <menu label="Archivo" name="File"> - <menu_item_call label="Abrir" name="Open"/> - <menu label="Subir" name="upload"> - <menu_item_call label="Imagen ([COST] L$)..." name="Upload Image"/> - <menu_item_call label="Sonido ([COST] L$)..." name="Upload Sound"/> - <menu_item_call label="Animación ([COST] L$)..." name="Upload Animation"/> - <menu_item_call label="Masivo ([COST] L$ por archivo)..." name="Bulk Upload"/> - </menu> - <menu_item_call label="Ventana nueva" name="New Window"/> - <menu_item_call label="Ver los filtros" name="Show Filters"/> - <menu_item_call label="Restablecer los filtros" name="Reset Current"/> - <menu_item_call label="Cerrar todas las carpetas" name="Close All Folders"/> - <menu_item_call label="Vaciar la Papelera" name="Empty Trash"/> - <menu_item_call label="Vaciar Objetos Perdidos" name="Empty Lost And Found"/> - </menu> - <menu label="Crear" name="Create"> - <menu_item_call label="Carpeta nueva" name="New Folder"/> - <menu_item_call label="Script nuevo" name="New Script"/> - <menu_item_call label="Nota nueva" name="New Note"/> - <menu_item_call label="Gesto nuevo" name="New Gesture"/> - <menu label="Ropas nuevas" name="New Clothes"> - <menu_item_call label="Camisa nueva" name="New Shirt"/> - <menu_item_call label="Pantalón nuevo" name="New Pants"/> - <menu_item_call label="Zapatos nuevos" name="New Shoes"/> - <menu_item_call label="Calcetines nuevos" name="New Socks"/> - <menu_item_call label="Chaqueta nueva" name="New Jacket"/> - <menu_item_call label="Falda nueva" name="New Skirt"/> - <menu_item_call label="Guantes nuevos" name="New Gloves"/> - <menu_item_call label="Camiseta nueva" name="New Undershirt"/> - <menu_item_call label="Ropa interior nueva" name="New Underpants"/> - <menu_item_call label="Nueva Alfa" name="New Alpha"/> - <menu_item_call label="Tatuaje nuevo" name="New Tattoo"/> - </menu> - <menu label="Nuevas partes del cuerpo" name="New Body Parts"> - <menu_item_call label="Forma nueva" name="New Shape"/> - <menu_item_call label="Piel nueva" name="New Skin"/> - <menu_item_call label="Pelo nuevo" name="New Hair"/> - <menu_item_call label="Ojos nuevos" name="New Eyes"/> - </menu> - </menu> - <menu label="Ordenar" name="Sort"> - <menu_item_check label="Alfabéticamente" name="By Name"/> - <menu_item_check label="Cronológicamente" name="By Date"/> - <menu_item_check label="Las carpetas siempre alfabéticamente" name="Folders Always By Name"/> - <menu_item_check label="Las carpetas del sistema, arriba" name="System Folders To Top"/> - </menu> - </menu_bar> <filter_editor label="Filtrar" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Todos los Ãtems" name="All Items"/> - <inventory_panel label="Ãtems recientes" name="Recent Items"/> + <recent_inventory_panel label="Ãtems recientes" name="Recent Items"/> </tab_container> - <panel name="bottom_panel"> - <button name="options_gear_btn" tool_tip="Mostrar más opciones"/> - <button name="add_btn" tool_tip="Añadir un Ãtem nuevo"/> - <dnd_button name="trash_btn" tool_tip="Quitar el Ãtem seleccionado"/> - </panel> + <layout_stack name="bottom_panel"> + <layout_panel name="options_gear_btn_panel"> + <button name="options_gear_btn" tool_tip="Ver más opciones"/> + </layout_panel> + <layout_panel name="add_btn_panel"> + <button name="add_btn" tool_tip="Añadir un Ãtem nuevo"/> + </layout_panel> + <layout_panel name="trash_btn_panel"> + <dnd_button name="trash_btn" tool_tip="Quitar el Ãtem seleccionado"/> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_outfit_edit.xml b/indra/newview/skins/default/xui/es/panel_outfit_edit.xml index 484f51569b..b7c0e840b2 100644 --- a/indra/newview/skins/default/xui/es/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/es/panel_outfit_edit.xml @@ -2,6 +2,8 @@ <!-- Side tray Outfit Edit panel --> <panel label="Editar el vestuario" name="outfit_edit"> <string name="No Outfit" value="No hay vestuario"/> + <string name="unsaved_changes" value="Cambios sin guardar"/> + <string name="now_editing" value="Editando"/> <panel.string name="not_available"> (No disp.) </panel.string> @@ -21,18 +23,13 @@ </panel> <layout_stack name="im_panels"> <layout_panel label="Panel de control de los MI" name="outfit_wearables_panel"> - <scroll_list name="look_items_list"> - <scroll_list.columns label="Vestuario" name="look_item"/> - <scroll_list.columns label="Orden de los Ãtems del vestuario" name="look_item_sort"/> - </scroll_list> <panel label="bottom_panel" name="edit_panel"/> </layout_panel> <layout_panel name="add_wearables_panel"> - <filter_editor label="Filtrar" name="look_item_filter"/> + <text name="add_to_outfit_label" value="Añadir a vestuario:"/> <layout_stack name="filter_panels"> - <layout_panel label="Panel de control de los MI" name="filter_button_panel"> - <text name="add_to_outfit_label" value="Añadir al vestuario:"/> - <button label="o" name="filter_button"/> + <layout_panel label="Panel de control de MI" name="filter_panel"> + <filter_editor label="Filtrar" name="look_item_filter"/> </layout_panel> </layout_stack> <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> diff --git a/indra/newview/skins/default/xui/es/panel_people.xml b/indra/newview/skins/default/xui/es/panel_people.xml index ad14d8ac9d..13f584ff28 100644 --- a/indra/newview/skins/default/xui/es/panel_people.xml +++ b/indra/newview/skins/default/xui/es/panel_people.xml @@ -2,9 +2,9 @@ <!-- Side tray panel --> <panel label="Gente" name="people_panel"> <string name="no_recent_people" value="No hay nadie reciente. ¿Buscas gente con la que pasar el rato? Prueba la [secondlife:///app/search/people Búsqueda] o el [secondlife:///app/worldmap Mapa del mundo]."/> - <string name="no_filtered_recent_people" value="¿No encontraste lo que buscabas? Prueba la [secondlife:///app/search/people Búsqueda]."/> + <string name="no_filtered_recent_people" value="¿No encuentras lo que buscas? Prueba con [secondlife:///app/search/people/[SEARCH_TERM] Buscar]."/> <string name="no_one_near" value="No hay nadie cerca. ¿Buscas gente con la que pasar el rato? Prueba la [secondlife:///app/search/people Búsqueda] o el [secondlife:///app/worldmap Mapa del mundo]."/> - <string name="no_one_filtered_near" value="¿No encontraste lo que buscabas? Prueba la [secondlife:///app/search/people Búsqueda]."/> + <string name="no_one_filtered_near" value="¿No encuentras lo que buscas? Prueba con [secondlife:///app/search/people/[SEARCH_TERM] Buscar]."/> <string name="no_friends_online" value="No hay amigos conectados"/> <string name="no_friends" value="No hay amigos"/> <string name="no_friends_msg"> @@ -12,11 +12,11 @@ ¿Buscas gente con la que pasar el rato? Prueba el [secondlife:///app/worldmap Mapa del mundo]. </string> <string name="no_filtered_friends_msg"> - ¿No encontraste lo que buscabas? Prueba la [secondlife:///app/search/people Búsqueda]. + ¿No encuentras lo que buscas? Prueba con [secondlife:///app/search/people/[SEARCH_TERM] Buscar]. </string> <string name="people_filter_label" value="Filtrar a la gente"/> <string name="groups_filter_label" value="Filtrar a los grupos"/> - <string name="no_filtered_groups_msg" value="¿No encontraste lo que buscabas? Prueba la [secondlife:///app/search/groups Búsqueda]."/> + <string name="no_filtered_groups_msg" value="¿No encuentras lo que buscas? Prueba con [secondlife:///app/search/groups/[SEARCH_TERM] Buscar]."/> <string name="no_groups_msg" value="¿Buscas grupos en que participar? Prueba la [secondlife:///app/search/groups Búsqueda]."/> <filter_editor label="Filtrar" name="filter_input"/> <tab_container name="tabs"> @@ -55,7 +55,7 @@ <button label="Perfil" name="view_profile_btn" tool_tip="Mostrar imágenes, grupos y otra información del Residente"/> <button label="MI" name="im_btn" tool_tip="Abrir un mensaje instantáneo"/> <button label="Llamar" name="call_btn" tool_tip="Llamar a este Residente"/> - <button label="Compartir" name="share_btn"/> + <button label="Compartir" name="share_btn" tool_tip="Compartir un objeto del inventario"/> <button label="Teleportar" name="teleport_btn" tool_tip="Ofrecer teleporte"/> <button label="Perfil del grupo" name="group_info_btn" tool_tip="Ver la información del grupo"/> <button label="Chat de grupo" name="chat_btn" tool_tip="Abrir el chat"/> diff --git a/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml index e0ce03d09a..c3a23c74c4 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml @@ -13,6 +13,7 @@ </text> <check_box label="Construir/Editar" name="edit_camera_movement" tool_tip="Usar el posicionamiento automático de la cámara al entrar en o salir del modo de edición"/> <check_box label="Apariencia" name="appearance_camera_movement" tool_tip="Usar el posicionamiento automático de la cámara mientras se está editando"/> + <check_box initial_value="1" label="Barra lateral" name="appearance_sidebar_positioning" tool_tip="Usar el posicionamiento automático de la cámara para la barra lateral"/> <check_box label="Verme en vista subjetiva" name="first_person_avatar_visible"/> <check_box label="Las teclas del cursor siempre para moverme" name="arrow_keys_move_avatar_check"/> <check_box label="Correr siempre: atajo de teclado" name="tap_tap_hold_to_run"/> 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 7a65eb32bc..fc8c908788 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml @@ -45,11 +45,12 @@ </text> <check_box initial_value="true" label="Ejecutar la animación de escribir al hacerlo en el chat" name="play_typing_animation"/> <check_box label="Cuando estoy desconectado, enviarme los MI al correo-e" name="send_im_to_email"/> + <check_box label="Permitir el historial de MI y chat en texto sin formato" name="plain_text_chat_history"/> <text name="show_ims_in_label"> - Mostrar los MI en: + Mostrar los MI en: </text> <text name="requires_restart_label"> - (requiere reiniciar) + (requiere reiniciar) </text> <radio_group name="chat_window" tool_tip="Muestra tus mensajes instantáneos en varias ventanas flotantes o en una sola con varias pestañas (requiere que reinicies)"> <radio_item label="Varias ventanas" name="radio" value="0"/> diff --git a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml index 56d473e872..183c007a0c 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml @@ -1,8 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Gráficos" name="Display panel"> - <text name="UI Size:"> - Tamaño de la UI: - </text> <text name="QualitySpeed"> Calidad y velocidad: </text> @@ -52,6 +49,10 @@ m </text> <slider label="Núm. máx. de partÃculas:" name="MaxParticleCount"/> + <slider label="Distancia de dibujo máxima del avatar:" name="MaxAvatarDrawDistance"/> + <text name="DrawDistanceMeterText3"> + m + </text> <slider label="Calidad de procesamiento:" name="RenderPostProcess"/> <text name="MeshDetailText"> Detalle de la malla: @@ -87,8 +88,8 @@ Detalles de iluminación: </text> <radio_group name="LightingDetailRadio"> - <radio_item label="Sólo el Sol y la Luna" name="SunMoon"/> - <radio_item label="Puntos de luz cercanos" name="LocalLights"/> + <radio_item label="Sólo el Sol y la Luna" name="SunMoon" value="0"/> + <radio_item label="Puntos de luz cercanos" name="LocalLights" value="1"/> </radio_group> <text name="TerrainDetailText"> Detalle del terreno: diff --git a/indra/newview/skins/default/xui/es/sidepanel_appearance.xml b/indra/newview/skins/default/xui/es/sidepanel_appearance.xml index 0c7f63d662..db5d47c11e 100644 --- a/indra/newview/skins/default/xui/es/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/es/sidepanel_appearance.xml @@ -1,9 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Vestuarios" name="appearance panel"> <string name="No Outfit" value="No hay vestuario"/> + <string name="Unsaved Changes" value="Cambios sin guardar"/> + <string name="Now Wearing" value="Llevas puesto..."/> <panel name="panel_currentlook"> - <text name="currentlook_title"> - (sin guardar) + <button label="F" name="editappearance_btn"/> + <button label="O" name="openoutfit_btn"/> + <text name="currentlook_status"> + (Estado) </text> </panel> <filter_editor label="Filtrar los vestuarios" name="Filter"/> diff --git a/indra/newview/skins/default/xui/es/sidepanel_inventory.xml b/indra/newview/skins/default/xui/es/sidepanel_inventory.xml index ff4d201d01..dcaddd8e42 100644 --- a/indra/newview/skins/default/xui/es/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/es/sidepanel_inventory.xml @@ -4,6 +4,7 @@ <panel name="button_panel"> <button label="Perfil" name="info_btn"/> <button label="Compartir" name="share_btn"/> + <button label="Comprar" name="shop_btn"/> <button label="Ponerme" name="wear_btn"/> <button label="Play" name="play_btn"/> <button label="Teleporte" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index 27700b2efe..885e974b3b 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -88,6 +88,24 @@ <string name="LoginDownloadingClothing"> Descargando la ropa... </string> + <string name="InvalidCertificate"> + El servidor devolvió un certificado no válido o dañado. Ponte en contacto con el administrador de la cuadrÃcula. + </string> + <string name="CertInvalidHostname"> + El nombre de host utilizado para acceder al servidor no es válido. Comprueba tu SLURL o el nombre de host de la cuadrÃcula. + </string> + <string name="CertExpired"> + Parece que el certificado que devolvió la cuadrÃcula está caducado. Comprueba el reloj del sistema o consulta al administrador de la cuadrÃcula. + </string> + <string name="CertKeyUsage"> + El certificado que devolvió el servidor no puede utilizarse para SSL. Ponte en contacto con el administrador de la cuadrÃcula. + </string> + <string name="CertBasicConstraints"> + La cadena de certificado del servidor contenÃa demasiados certificados. Ponte en contacto con el administrador de la cuadrÃcula. + </string> + <string name="CertInvalidSignature"> + No se pudo verificar la firma del certificado devuelta por el servidor de la cuadrÃcula. Ponte en contacto con el administrador de la cuadrÃcula. + </string> <string name="LoginFailedNoNetwork"> Error de red: no se ha podido conectar; por favor, revisa tu conexión a Internet. </string> @@ -819,6 +837,42 @@ <string name="invalid"> inválido/a </string> + <string name="shirt_not_worn"> + Camisa no puesta + </string> + <string name="pants_not_worn"> + Pantalones no puestos + </string> + <string name="shoes_not_worn"> + Zapatos no puestos + </string> + <string name="socks_not_worn"> + Calcetines no puestos + </string> + <string name="jacket_not_worn"> + Chaqueta no puesta + </string> + <string name="gloves_not_worn"> + Guantes no puestos + </string> + <string name="undershirt_not_worn"> + Camiseta no puesta + </string> + <string name="underpants_not_worn"> + Ropa interior no puesta + </string> + <string name="skirt_not_worn"> + Falda no puesta + </string> + <string name="alpha_not_worn"> + Alfa no puesta + </string> + <string name="tattoo_not_worn"> + Tatuaje no puesto + </string> + <string name="invalid_not_worn"> + no válido/a + </string> <string name="NewWearable"> Nuevo [WEARABLE_ITEM] </string> @@ -889,7 +943,10 @@ Pulsa ESC para salir de la vista subjetiva </string> <string name="InventoryNoMatchingItems"> - ¿No encontraste lo que buscabas? Prueba en la [secondlife:///app/search/all Búsqueda]. + ¿No encuentras lo que buscas? Prueba con [secondlife:///app/search/all/[SEARCH_TERM] Buscar]. + </string> + <string name="PlacesNoMatchingItems"> + ¿No encuentras lo que buscas? Prueba con [secondlife:///app/search/places/[SEARCH_TERM] Buscar]. </string> <string name="FavoritesNoMatchingItems"> Arrastra aquà un hito para tenerlo en tus favoritos. @@ -919,6 +976,7 @@ <string name="Wave" value="Onda"/> <string name="HelloAvatar" value="¡Hola, avatar!"/> <string name="ViewAllGestures" value="Ver todos >>"/> + <string name="GetMoreGestures" value="Obtener más >>"/> <string name="Animations" value="Animaciones,"/> <string name="Calling Cards" value="Tarjetas de visita,"/> <string name="Clothing" value="Ropa,"/> @@ -1531,16 +1589,19 @@ El Residente al que has enviado un mensaje ha solicitado que no se le moleste porque está en modo ocupado. Podrá ver tu mensaje más adelante, ya que éste aparecerá en su panel de MI. </string> <string name="MuteByName"> - (por el nombre) + (Por el nombre) </string> <string name="MuteAgent"> (Residente) </string> <string name="MuteObject"> - (objeto) + (Objeto) </string> <string name="MuteGroup"> - (grupo) + (Grupo) + </string> + <string name="MuteExternal"> + (Externo) </string> <string name="RegionNoCovenant"> No se ha aportado un contrato para este estado. @@ -3300,11 +3361,14 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. <string name="answered_call"> Han respondido a tu llamada </string> - <string name="started_call"> - Llamada de voz iniciada + <string name="you_started_call"> + Has iniciado una llamada de voz + </string> + <string name="you_joined_call"> + Has entrado en la llamada de voz </string> - <string name="joined_call"> - Entrando a la llamada de voz + <string name="name_started_call"> + [NAME] inició una llamada de voz </string> <string name="ringing-im"> Haciendo la llamada de voz... @@ -3503,6 +3567,90 @@ Denuncia de infracción <string name="Contents"> Contenidos </string> + <string name="Gesture"> + Gestos + </string> + <string name="Male Gestures"> + Gestos de hombre + </string> + <string name="Female Gestures"> + Gestos de mujer + </string> + <string name="Other Gestures"> + Otros gestos + </string> + <string name="Speech Gestures"> + Gestos al hablar + </string> + <string name="Common Gestures"> + Gestos corrientes + </string> + <string name="Male - Excuse me"> + Varón - Disculpa + </string> + <string name="Male - Get lost"> + Varón – Déjame en paz + </string> + <string name="Male - Blow kiss"> + Varón - Lanzar un beso + </string> + <string name="Male - Boo"> + Varón - Abucheo + </string> + <string name="Male - Bored"> + Varón - Aburrido + </string> + <string name="Male - Hey"> + Varón – ¡Eh! + </string> + <string name="Male - Laugh"> + Varón - Risa + </string> + <string name="Male - Repulsed"> + Varón - Rechazo + </string> + <string name="Male - Shrug"> + Varón - Encogimiento de hombros + </string> + <string name="Male - Stick tougue out"> + Varón - Sacando la lengua + </string> + <string name="Male - Wow"> + Varón - Admiración + </string> + <string name="FeMale - Excuse me"> + Mujer - Disculpa + </string> + <string name="FeMale - Get lost"> + Mujer – Déjame en paz + </string> + <string name="FeMale - Blow kiss"> + Mujer - Lanzar un beso + </string> + <string name="FeMale - Boo"> + Mujer - Abucheo + </string> + <string name="Female - Bored"> + Mujer - Aburrida + </string> + <string name="Female - Hey"> + Mujer - ¡Eh! + </string> + <string name="Female - Laugh"> + Mujer - Risa + </string> + <string name="Female - Repulsed"> + Mujer - Rechazo + </string> + <string name="Female - Shrug"> + Mujer - Encogimiento de hombros + </string> + <string name="Female - Stick tougue out"> + Mujer - Sacando la lengua + </string> + <string name="Female - Wow"> + Mujer - Admiración + </string> <string name="AvatarBirthDateFormat"> [day,datetime,slt]/[mthnum,datetime,slt]/[year,datetime,slt] </string> diff --git a/indra/newview/skins/default/xui/fr/floater_about.xml b/indra/newview/skins/default/xui/fr/floater_about.xml index 681fd203f0..a1cbeecfb9 100644 --- a/indra/newview/skins/default/xui/fr/floater_about.xml +++ b/indra/newview/skins/default/xui/fr/floater_about.xml @@ -23,13 +23,13 @@ Cartes graphiques : [GRAPHICS_CARD] Version Windows Graphics Driver : [GRAPHICS_DRIVER_VERSION] </floater.string> <floater.string name="AboutLibs"> - Version OpenGL : [OPENGL_VERSION] + Version OpenGL : [OPENGL_VERSION] Version libcurl : [LIBCURL_VERSION] -Version J2C Decoder : [J2C_VERSION] -Version Audio Driver : [AUDIO_DRIVER_VERSION] -Version Qt Webkit : [QT_WEBKIT_VERSION] -Version Vivox : [VIVOX_VERSION] +Version J2C Decoder : [J2C_VERSION] +Version Audio Driver : [AUDIO_DRIVER_VERSION] +Version Qt Webkit : [QT_WEBKIT_VERSION] +Version serveur vocal : [VOICE_VERSION] </floater.string> <floater.string name="none"> (aucun) 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 2e52a90373..ff49fd4536 100644 --- a/indra/newview/skins/default/xui/fr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml @@ -62,6 +62,9 @@ <panel.string name="no_selection_text"> Aucune parcelle sélectionnée. </panel.string> + <panel.string name="time_stamp_template"> + [wkday,datetime,local] [day,datetime,local] [mth,datetime,local] [year,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] + </panel.string> <text name="Name:"> Nom : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml b/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml index ae8f926d8f..e1786eafc7 100644 --- a/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml @@ -3,44 +3,46 @@ <floater.string name="InvalidAvatar"> AVATAR NON VALIDE </floater.string> - <text name="label"> - Textures fixées - </text> - <text name="composite_label"> - Textures composées - </text> - <button label="Vider ces ID dans la console" label_selected="Vider" left="-185" name="Dump" width="175"/> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> - <texture_picker label="Cheveux" name="hair-baked"/> - <texture_picker label="Cheveux" name="hair_grain"/> - <texture_picker label="Alpha cheveux" name="hair_alpha"/> - <texture_picker label="Tête" name="head-baked"/> - <texture_picker label="Maquillage" name="head_bodypaint"/> - <texture_picker label="Alpha tête" name="head_alpha"/> - <texture_picker label="Tatouage tête" name="head_tattoo"/> - <texture_picker label="Yeux" name="eyes-baked"/> - <texture_picker label="Å’il" name="eyes_iris"/> - <texture_picker label="Alpha yeux" name="eyes_alpha"/> - <texture_picker label="Haut du corps" name="upper-baked"/> - <texture_picker label="Peinture corporelle haut" name="upper_bodypaint"/> - <texture_picker label="Débardeur" name="upper_undershirt"/> - <texture_picker label="Gants" name="upper_gloves"/> - <texture_picker label="Chemise" name="upper_shirt"/> - <texture_picker label="Veste (haut)" name="upper_jacket"/> - <texture_picker label="Alpha haut" name="upper_alpha"/> - <texture_picker label="Tatouage haut" name="upper_tattoo"/> - <texture_picker label="Bas du corps" name="lower-baked"/> - <texture_picker label="Peinture corporelle bas" name="lower_bodypaint"/> - <texture_picker label="Caleçon" name="lower_underpants"/> - <texture_picker label="Chaussettes" name="lower_socks"/> - <texture_picker label="Chaussures" name="lower_shoes"/> - <texture_picker label="Pantalon" name="lower_pants"/> - <texture_picker label="Veste" name="lower_jacket"/> - <texture_picker label="Alpha bas" name="lower_alpha"/> - <texture_picker label="Tatouage bas" name="lower_tattoo"/> - <texture_picker label="Jupe" name="skirt-baked"/> - <texture_picker label="Jupe" name="skirt"/> + <text name="label"> + Textures figées + </text> + <text name="composite_label"> + Textures composites + </text> + <button label="Vider les ID dans la console" label_selected="Vider" name="Dump"/> + <panel name="scroll_content_panel"> + <texture_picker label="Cheveux" name="hair-baked"/> + <texture_picker label="Cheveux" name="hair_grain"/> + <texture_picker label="Alpha cheveux" name="hair_alpha"/> + <texture_picker label="Tête" name="head-baked"/> + <texture_picker label="Maquillage" name="head_bodypaint"/> + <texture_picker label="Alpha tête" name="head_alpha"/> + <texture_picker label="Tatouage tête" name="head_tattoo"/> + <texture_picker label="Yeux" name="eyes-baked"/> + <texture_picker label="Å’il" name="eyes_iris"/> + <texture_picker label="Alpha yeux" name="eyes_alpha"/> + <texture_picker label="Haut du corps" name="upper-baked"/> + <texture_picker label="Peinture sur corps (haut)" name="upper_bodypaint"/> + <texture_picker label="Débardeur" name="upper_undershirt"/> + <texture_picker label="Gants" name="upper_gloves"/> + <texture_picker label="Chemise" name="upper_shirt"/> + <texture_picker label="Veste (haut)" name="upper_jacket"/> + <texture_picker label="Alpha haut" name="upper_alpha"/> + <texture_picker label="Tatouage haut" name="upper_tattoo"/> + <texture_picker label="Bas du corps" name="lower-baked"/> + <texture_picker label="Peinture sur corps (bas)" name="lower_bodypaint"/> + <texture_picker label="Caleçon" name="lower_underpants"/> + <texture_picker label="Chaussettes" name="lower_socks"/> + <texture_picker label="Chaussures" name="lower_shoes"/> + <texture_picker label="Pantalon" name="lower_pants"/> + <texture_picker label="Veste" name="lower_jacket"/> + <texture_picker label="Alpha bas" name="lower_alpha"/> + <texture_picker label="Tatouage bas" name="lower_tattoo"/> + <texture_picker label="Jupe" name="skirt-baked"/> + <texture_picker label="Jupe" name="skirt"/> + </panel> </panel> </scroll_container> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/fr/floater_buy_currency_html.xml new file mode 100644 index 0000000000..953fca3544 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/floater_buy_currency_html.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_buy_currency_html" title="ACHETER DEVISE"/> diff --git a/indra/newview/skins/default/xui/fr/floater_gesture.xml b/indra/newview/skins/default/xui/fr/floater_gesture.xml index 1e0f5672a4..5ead1cae3a 100644 --- a/indra/newview/skins/default/xui/fr/floater_gesture.xml +++ b/indra/newview/skins/default/xui/fr/floater_gesture.xml @@ -22,6 +22,6 @@ <button name="del_btn" tool_tip="Supprimer ce geste"/> </panel> <button label="Modifier" name="edit_btn"/> - <button label="Jouer" name="play_btn"/> + <button label="Lire" name="play_btn"/> <button label="Stop" name="stop_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_map.xml b/indra/newview/skins/default/xui/fr/floater_map.xml index e01b687fce..ae319949e3 100644 --- a/indra/newview/skins/default/xui/fr/floater_map.xml +++ b/indra/newview/skins/default/xui/fr/floater_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Map" title="Mini-carte"> +<floater name="Map" title=""> <floater.string name="mini_map_north"> N </floater.string> diff --git a/indra/newview/skins/default/xui/fr/floater_moveview.xml b/indra/newview/skins/default/xui/fr/floater_moveview.xml index fac569557e..c0f3864b81 100644 --- a/indra/newview/skins/default/xui/fr/floater_moveview.xml +++ b/indra/newview/skins/default/xui/fr/floater_moveview.xml @@ -6,18 +6,48 @@ <string name="walk_back_tooltip"> Marcher en arrière (appuyer sur la flèche vers le bas ou S) </string> + <string name="walk_left_tooltip"> + Marcher vers la gauche (Maj+Flèche gauche ou touche A) + </string> + <string name="walk_right_tooltip"> + Marcher vers la droite (Maj+Flèche droite ou touche D) + </string> <string name="run_forward_tooltip"> Courir vers l'avant (appuyer sur la flèche vers le haut ou W) </string> <string name="run_back_tooltip"> Courir en arrière (appuyer sur la flèche vers le bas ou S) </string> + <string name="run_left_tooltip"> + Courir vers la gauche (Maj+Flèche gauche ou touche A) + </string> + <string name="run_right_tooltip"> + Courir vers la droite (Maj+Flèche droite ou touche D) + </string> <string name="fly_forward_tooltip"> Voler vers l'avant (appuyer sur la flèche vers le haut ou W) </string> <string name="fly_back_tooltip"> Voler vers l'arrière (appuyer sur la flèche vers le bas ou S) </string> + <string name="fly_left_tooltip"> + Voler vers la gauche (Maj+Flèche gauche ou touche A) + </string> + <string name="fly_right_tooltip"> + Voler vers la droite (Maj+Flèche droite ou touche D) + </string> + <string name="fly_up_tooltip"> + Voler vers le haut (touche E) + </string> + <string name="fly_down_tooltip"> + Voler vers le bas (touche C) + </string> + <string name="jump_tooltip"> + Sauter (touche E) + </string> + <string name="crouch_tooltip"> + S'accroupir (touche C) + </string> <string name="walk_title"> Marcher </string> @@ -28,10 +58,12 @@ Voler </string> <panel name="panel_actions"> + <button label="" label_selected="" name="move up btn" tool_tip="Voler vers le haut (touche E)"/> <button label="" label_selected="" name="turn left btn" tool_tip="Tourner à gauche (appuyer sur la flèche de gauche ou sur A)"/> + <joystick_slide name="move left btn" tool_tip="Marcher vers la gauche (Maj+Flèche gauche ou touche A)"/> + <button label="" label_selected="" name="move down btn" tool_tip="Voler vers le bas (touche C)"/> <button label="" label_selected="" name="turn right btn" tool_tip="Tourner à droite (appuyer sur la flèche de droite ou sur D)"/> - <button label="" label_selected="" name="move up btn" tool_tip="Voler vers le haut, appuyer sur E"/> - <button label="" label_selected="" name="move down btn" tool_tip="Voler vers le bas, appuyer sur C"/> + <joystick_slide name="move right btn" tool_tip="Marcher vers la droite (Maj+Flèche droite ou touche D)"/> <joystick_turn name="forward btn" tool_tip="Marcher en avant (appuyer sur la flèche vers le haut ou W)"/> <joystick_turn name="backward btn" tool_tip="Marcher en arrière (appuyer sur la flèche vers le bas ou S)"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/floater_postcard.xml b/indra/newview/skins/default/xui/fr/floater_postcard.xml index 489b90eeba..0f3a4541e2 100644 --- a/indra/newview/skins/default/xui/fr/floater_postcard.xml +++ b/indra/newview/skins/default/xui/fr/floater_postcard.xml @@ -13,10 +13,10 @@ </text> <line_editor left="143" name="name_form" width="130" left_delta="146"/> <text name="subject_label"> - Sujet : + Objet : </text> <line_editor left="143" name="subject_form" width="130" left_delta="146"/> - <line_editor label="Saisissez votre sujet ici." name="subject_form"/> + <line_editor label="Saisissez votre objet ici." name="subject_form"/> <text name="msg_label"> Message : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml b/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml index 7133f8754c..1d164ac661 100644 --- a/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml @@ -31,10 +31,10 @@ Description : </text> <text name="trigger_label"> - Déclencheur : + Déclench. : </text> <text name="replace_text" tool_tip="Remplacer les raccourcis avec ces mots. Par exemple, remplacer le mot-clé « salut » par « bonjour » fera dire « je venais dire bonjour » au lieu de « je venais dire salut » dans le chat, et déclenchera le geste."> - Remplacer par : + Rempl. par : </text> <line_editor left="310" name="replace_editor" tool_tip="Remplacer les raccourcis avec ces mots. Par exemple, remplacer le mot-clé « salut » par « bonjour » fera dire « je venais dire bonjour » au lieu de « je venais dire salut » dans le chat, et déclenchera le geste" width="120"/> <text name="key_label"> @@ -50,20 +50,20 @@ <text name="steps_label"> Étapes : </text> - <button label="Vers le haut" name="up_btn"/> - <button label="Vers le bas" name="down_btn"/> + <button label="Haut" name="up_btn"/> + <button label="Bas" name="down_btn"/> <button label="Supprimer" name="delete_btn"/> <radio_group name="animation_trigger_type"> <radio_item label="Lancer" name="start"/> <radio_item label="Arrêter" name="stop"/> </radio_group> <check_box label="jusqu'à la fin des animations" name="wait_anim_check"/> - <check_box label="temps en secondes" name="wait_time_check"/> + <check_box label="temps (sec)" name="wait_time_check"/> <line_editor left_delta="130" name="wait_time_editor"/> <text name="help_label"> Toutes les étapes ont lieu en même temps si vous n'ajoutez pas d'étapes d'attente. </text> - <check_box label="Actifs" name="active_check" tool_tip="Les gestes actifs peuvent être déclenchés en saisissant leur raccourci dans le chat ou en appuyant sur les raccourcis. Les gestes deviennent généralement inactifs lorsqu'il y a un conflit entre les raccourcis."/> + <check_box label="Actif" name="active_check" tool_tip="Les gestes actifs peuvent être déclenchés en saisissant leur raccourci dans le chat ou en appuyant sur les raccourcis. Les gestes deviennent généralement inactifs lorsqu'il y a un conflit entre les raccourcis."/> <button label="Prévisualiser" name="preview_btn" width="86"/> <button label="Enregistrer" left_delta="96" name="save_btn" width="86"/> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_preview_notecard.xml b/indra/newview/skins/default/xui/fr/floater_preview_notecard.xml index d6ec915fd1..5646ad45eb 100644 --- a/indra/newview/skins/default/xui/fr/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/fr/floater_preview_notecard.xml @@ -9,9 +9,6 @@ <floater.string name="Title"> Note : [NAME] </floater.string> - <floater.string label="Enregistrer" label_selected="Enregistrer" name="Save"> - Enregistrer - </floater.string> <text name="desc txt"> Description : </text> @@ -19,4 +16,5 @@ Chargement... </text_editor> <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Supprimer" label_selected="Supprimer" name="Delete"/> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml index 16d276f8c2..26d097d549 100644 --- a/indra/newview/skins/default/xui/fr/floater_tools.xml +++ b/indra/newview/skins/default/xui/fr/floater_tools.xml @@ -37,7 +37,7 @@ Référence </floater.string> <floater.string name="grid_attachment_text"> - Pièce-jointe + Pièce jointe </floater.string> <button label="" label_selected="" name="button focus" tool_tip="Mise au point"/> <button label="" label_selected="" name="button move" tool_tip="Déplacer"/> @@ -67,7 +67,10 @@ <text name="RenderingCost" tool_tip="Affiche le coût du rendu calculé pour cet objet"> þ : [COUNT] </text> - <check_box label="Étirer les deux côtés" name="checkbox uniform"/> + <check_box label="" name="checkbox uniform"/> + <text label="Étirer les deux côtés" name="checkbox uniform label"> + Étirer les deux côtés + </text> <check_box initial_value="true" label="Étirer les textures" name="checkbox stretch textures"/> <check_box initial_value="true" label="Fixer sur la grille" name="checkbox snap to grid"/> <combo_box name="combobox grid mode" tool_tip="Choisissez le type d'axe de grille pour le positionnement de l'objet"> @@ -441,7 +444,7 @@ <check_box label="Inverser" name="checkbox flip s"/> <spinner label="Vertical (V)" name="TexScaleV"/> <check_box label="Inverser" name="checkbox flip t"/> - <spinner label="RotationËš" name="TexRot" /> + <spinner label="RotationËš" name="TexRot"/> <spinner label="Répétitions / Mètre" name="rptctrl"/> <button label="Appliquer" label_selected="Appliquer" name="button apply"/> <text name="tex offset"> diff --git a/indra/newview/skins/default/xui/fr/menu_attachment_self.xml b/indra/newview/skins/default/xui/fr/menu_attachment_self.xml index 8bc3182198..ff87d90d4d 100644 --- a/indra/newview/skins/default/xui/fr/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/fr/menu_attachment_self.xml @@ -5,7 +5,7 @@ <menu_item_call label="Détacher" name="Detach"/> <menu_item_call label="Lâcher" name="Drop"/> <menu_item_call label="Me lever" name="Stand Up"/> - <menu_item_call label="Mon apparence" name="Appearance..."/> + <menu_item_call label="Changer de tenue" name="Change Outfit"/> <menu_item_call label="Mes amis" name="Friends..."/> <menu_item_call label="Mes groupes" name="Groups..."/> <menu_item_call label="Mon profil" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/fr/menu_avatar_self.xml b/indra/newview/skins/default/xui/fr/menu_avatar_self.xml index 17899b491b..3620dc72b0 100644 --- a/indra/newview/skins/default/xui/fr/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/fr/menu_avatar_self.xml @@ -20,7 +20,9 @@ <context_menu label="Détacher â–¶" name="Object Detach"/> <menu_item_call label="Tout détacher" name="Detach All"/> </context_menu> - <menu_item_call label="Mon apparence" name="Appearance..."/> + <menu_item_call label="Changer de tenue" name="Chenge Outfit"/> + <menu_item_call label="Modifier ma tenue" name="Edit Outfit"/> + <menu_item_call label="Modifier ma silhouette" name="Edit My Shape"/> <menu_item_call label="Mes amis" name="Friends..."/> <menu_item_call label="Mes groupes" name="Groups..."/> <menu_item_call label="Mon profil" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/fr/menu_bottomtray.xml b/indra/newview/skins/default/xui/fr/menu_bottomtray.xml index 3229940980..e058c66a17 100644 --- a/indra/newview/skins/default/xui/fr/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/fr/menu_bottomtray.xml @@ -4,6 +4,11 @@ <menu_item_check label="Bouton Bouger" name="ShowMoveButton"/> <menu_item_check label="Bouton Afficher" name="ShowCameraButton"/> <menu_item_check label="Bouton Photo" name="ShowSnapshotButton"/> + <menu_item_check label="Bouton Panneau latéral" name="ShowSidebarButton"/> + <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"/> diff --git a/indra/newview/skins/default/xui/fr/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/fr/menu_inspect_self_gear.xml index b7dafca5ce..5f570b5608 100644 --- a/indra/newview/skins/default/xui/fr/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/fr/menu_inspect_self_gear.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <menu name="Gear Menu"> <menu_item_call label="Me lever" name="stand_up"/> - <menu_item_call label="Mon apparence" name="my_appearance"/> + <menu_item_call label="Changer de tenue" name="change_outfit"/> <menu_item_call label="Mon profil" name="my_profile"/> <menu_item_call label="Mes amis" name="my_friends"/> <menu_item_call label="Mes groupes" name="my_groups"/> diff --git a/indra/newview/skins/default/xui/fr/menu_inventory.xml b/indra/newview/skins/default/xui/fr/menu_inventory.xml index a7334db46d..4b9a05edd6 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory.xml @@ -54,6 +54,7 @@ <menu_item_call label="Purger l'objet" name="Purge Item"/> <menu_item_call label="Restaurer l'objet" name="Restore Item"/> <menu_item_call label="Ouvrir" name="Open"/> + <menu_item_call label="Ouvrir l'original" name="Open Original"/> <menu_item_call label="Propriétés" name="Properties"/> <menu_item_call label="Renommer" name="Rename"/> <menu_item_call label="Copier l'UUID (identifiant universel unique)" name="Copy Asset UUID"/> diff --git a/indra/newview/skins/default/xui/fr/menu_participant_list.xml b/indra/newview/skins/default/xui/fr/menu_participant_list.xml index 4434a8e53d..63d3d39f9c 100644 --- a/indra/newview/skins/default/xui/fr/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/fr/menu_participant_list.xml @@ -14,8 +14,8 @@ <context_menu label="Options du modérateur >" name="Moderator Options"> <menu_item_check label="Autoriser les chats écrits" name="AllowTextChat"/> <menu_item_call label="Ignorer ce participant" name="ModerateVoiceMuteSelected"/> - <menu_item_call label="Ignorer tous les autres" name="ModerateVoiceMuteOthers"/> <menu_item_call label="Ne plus ignorer ce participant" name="ModerateVoiceUnMuteSelected"/> - <menu_item_call label="Ne plus ignorer tous les autres" name="ModerateVoiceUnMuteOthers"/> + <menu_item_call label="Ignorer les autres" name="ModerateVoiceMute"/> + <menu_item_call label="Ne plus ignorer les autres" name="ModerateVoiceUnmute"/> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index 64270cbe73..4c7cdefbe8 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -7,7 +7,7 @@ </menu_item_call> <menu_item_call label="Acheter des L$" name="Buy and Sell L$"/> <menu_item_call label="Mon profil" name="Profile"/> - <menu_item_call label="Mon apparence" name="Appearance"/> + <menu_item_call label="Changer de tenue" name="ChangeOutfit"/> <menu_item_check label="Mon inventaire" name="Inventory"/> <menu_item_check label="Mon inventaire" name="ShowSidetrayInventory"/> <menu_item_check label="Mes gestes" name="Gestures"/> @@ -162,6 +162,7 @@ <menu_item_check label="Objets flexibles" name="Flexible Objects"/> </menu> <menu_item_check label="Exécuter plusieurs threads" name="Run Multiple Threads"/> + <menu_item_check label="Utiliser le thread de lecture de plug-in" name="Use Plugin Read Thread"/> <menu_item_call label="Effacer le cache du groupe" name="ClearGroupCache"/> <menu_item_check label="Effet de lissage de la souris" name="Mouse Smoothing"/> <menu label="Raccourcis" name="Shortcuts"> @@ -188,7 +189,6 @@ <menu_item_call label="Zoomer en avant" name="Zoom In"/> <menu_item_call label="Zoom par défaut" name="Zoom Default"/> <menu_item_call label="Zoomer en arrière" name="Zoom Out"/> - <menu_item_call label="Activer/Quitter le plein écran" name="Toggle Fullscreen"/> </menu> <menu_item_call label="Afficher les paramètres de débogage" name="Debug Settings"/> <menu_item_check label="Afficher le menu Développeurs" name="Debug Mode"/> diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index d38afe13d2..bb1c4242ee 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -283,7 +283,7 @@ Pour ne placer le média que sur une seule face, choisissez Sélectionner une fa Veuillez saisir votre adresse e-mail. </notification> <notification name="PromptMissingSubjMsg"> - Envoyer la photo avec le sujet ou le message par défaut ? + Envoyer la photo avec l'objet ou le message par défaut ? <usetemplate name="okcancelbuttons" notext="Annuler" yestext="OK"/> </notification> <notification name="ErrorProcessingSnapshot"> @@ -325,6 +325,9 @@ Pour entrer dans [SECOND_LIFE], vous devez avoir un compte. Voulez-vous en crée </url> <usetemplate name="okcancelbuttons" notext="Réessayer" yestext="Créer un compte"/> </notification> + <notification name="InvalidCredentialFormat"> + Saisissez à la fois le prénom et le nom de votre avatar dans le champ Nom d'utilisateur, puis connectez-vous. + </notification> <notification name="AddClassified"> Les petites annonces sont publiées à l'onglet Petites annonces de la section Recherche et sur [http://secondlife.com/community/classifieds secondlife.com] pendant une semaine. Rédigez votre annonce, puis cliquez sur Publier pour l'ajouter à la liste des annonces. @@ -608,6 +611,11 @@ Assurez-vous que le fichier a l'extension correcte. <notification name="CannotEncodeFile"> Impossible d'encoder le fichier : [FILE] </notification> + <notification name="CorruptedProtectedDataStore"> + Impossible de lire vos données protégées ; elles sont en cours de réinitialisation. + Cette situation peut se produire lorsque vous changez la configuration du réseau. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="CorruptResourceFile"> Fichier ressource corrompu : [FILE] </notification> @@ -963,6 +971,12 @@ Proposer à [NAME] de devenir votre ami(e) ? Veuillez saisir un montant plus élevé. </notification> + <notification name="ConfirmItemDeleteHasLinks"> + Des articles liés pointent vers au moins un article sélectionné. Les liens arrêteront définitivement de fonctionner si vous supprimez cet article. Il est vivement conseillé de supprimer d'abord ces liens. + +Voulez-vous vraiment supprimer ces articles ? + <usetemplate name="okcancelbuttons" notext="Annuler" yestext="OK"/> + </notification> <notification name="ConfirmObjectDeleteLock"> Au moins un des objets que vous avez sélectionnés est verrouillé. @@ -1111,6 +1125,42 @@ Choisissez un avatar homme ou femme. Vous pourrez revenir sur votre décision plus tard. <usetemplate name="okcancelbuttons" notext="Femme" yestext="Homme"/> </notification> + <notification name="CantTeleportToGrid"> + Téléportation vers [SLURL] impossible car cet endroit existe sur une grille ([GRID]) différente de la grille actuelle ([CURRENT_GRID]). Veuillez fermer votre client et réessayer. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="GeneralCertificateError"> + Connexion au serveur impossible. +[REASON] + +Nom du sujet : [SUBJECT_NAME_STRING] +Émetteur : [ISSUER_NAME_STRING] +Début de validité : [VALID_FROM] +Fin de validité : [VALID_TO] +Empreinte MD5 : [SHA1_DIGEST] +Empreinte SHA1 : [MD5_DIGEST] +Utilisation de la clé : [KEYUSAGE] +Utilisation étendue de la clé : [EXTENDEDKEYUSAGE] +Identifiant de la clé du sujet : [SUBJECTKEYIDENTIFIER] + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TrustCertificateError"> + Autorité de certification de ce serveur inconnue. + +Informations sur le certificat : +Nom du sujet : [SUBJECT_NAME_STRING] +Émetteur : [ISSUER_NAME_STRING] +Début de validité : [VALID_FROM] +Fin de validité : [VALID_TO] +Empreinte MD5 : [SHA1_DIGEST] +Empreinte SHA1 : [MD5_DIGEST] +Utilisation de la clé : [KEYUSAGE] +Utilisation étendue de la clé : [EXTENDEDKEYUSAGE] +Identifiant de la clé du sujet : [SUBJECTKEYIDENTIFIER] + +Approuver cette autorité ? + <usetemplate name="okcancelbuttons" notext="Annuler" yestext="Approuver"/> + </notification> <notification name="NotEnoughCurrency"> [NAME] [PRICE] L$ Vous n'avez pas suffisamment de L$ pour faire cela. </notification> @@ -1503,9 +1553,9 @@ Souhaitez-vous en savoir plus sur les différentes catégories d'accès ? Votre catégorie d'accès ne vous permet pas de pénétrer dans cette région. </notification> <notification name="RegionEntryAccessBlocked_Change"> - Votre catégorie d'accès ne vous permet pas de pénétrer dans cette région. + La catégorie de contenu définie dans vos préférences ne vous permet pas de pénétrer dans 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. +Pour cela, cliquez sur Modifier les préférences afin de spécifier une catégorie plus élevée. Vous pourrez alors rechercher du contenu [REGIONMATURITY] et y accéder. Pour modifier ce paramètre ultérieurement, accédez à Moi > Préférences > Général, le moment voulu. <form name="form"> <button name="OK" text="Modifier les préférences"/> <button default="true" name="Cancel" text="Fermer"/> @@ -1781,7 +1831,7 @@ Linden Lab Les composantes requises suivantes ne se trouvent pas dans [FLOATER]: [COMPONENTS] </notification> - <notification label="Remplacer la pièce-jointe existante" name="ReplaceAttachment"> + <notification label="Remplacer la pièce jointe existante" name="ReplaceAttachment"> Vous avez déjà un objet sur cette partie du corps. Voulez-vous le remplacer par l'objet sélectionné ? <form name="form"> @@ -2279,15 +2329,6 @@ Veuillez réessayer dans quelques minutes. <button name="Mute" text="Ignorer"/> </form> </notification> - <notification name="ObjectGiveItemUnknownUser"> - Un objet appelé [OBJECTFROMNAME] appartenant à (un résident inconnu) vous a donné un [OBJECTTYPE] : -[ITEM_SLURL] - <form name="form"> - <button name="Keep" text="Garder"/> - <button name="Discard" text="Jeter"/> - <button name="Mute" text="Ignorer"/> - </form> - </notification> <notification name="UserGiveItem"> [NAME_SLURL] vous a donné un [OBJECTTYPE] : [ITEM_SLURL] @@ -2600,8 +2641,52 @@ Le bouton sera affiché quand il y aura suffisamment de place. <notification name="ShareNotification"> Faire glisser des articles de l'inventaire sur une personne dans le sélecteur de résident </notification> + <notification name="DeedToGroupFail"> + Échec de cession au groupe. + </notification> <notification name="AvatarRezNotification"> - Avatar [NAME] rezzé en [TIME] secondes. + ([EXISTENCE] secondes d'existence) +Nuage de l'avatar [NAME] disparu en [TIME] secondes. + </notification> + <notification name="AvatarRezSelfNotification"> + ([EXISTENCE] secondes d'existence) +Vous avez terminé de figer votre tenue en [TIME] secondes. + </notification> + <notification name="AvatarRezCloudNotification"> + ([EXISTENCE] secondes d'existence) +Transformation de l'avatar [NAME] en nuage. + </notification> + <notification name="AvatarRezArrivedNotification"> + ([EXISTENCE] secondes d'existence) +L'avatar [NAME] est apparu. + </notification> + <notification name="AvatarRezLeftCloudNotification"> + ([EXISTENCE] secondes d'existence) +Départ de l'avatar [NAME] après [TIME] secondes sous forme de nuage. + </notification> + <notification name="AvatarRezEnteredAppearanceNotification"> + ([EXISTENCE] secondes d'existence) +L'avatar [NAME] est entré en mode Apparence. + </notification> + <notification name="AvatarRezLeftAppearanceNotification"> + ([EXISTENCE] secondes d'existence) +L'avatar [NAME] a quitté le mode Apparence. + </notification> + <notification name="AvatarRezLeftNotification"> + ([EXISTENCE] secondes d'existence) +Départ de l'avatar [NAME] entièrement chargé. + </notification> + <notification name="ConfirmLeaveCall"> + Voulez-vous vraiment quitter cet appel ? + <usetemplate ignoretext="Confirmer avant de quitter l'appel" name="okcancelignore" notext="Non" yestext="Oui"/> + </notification> + <notification name="ConfirmMuteAll"> + Vous avez choisi d'ignorer l'ensemble des participants de l'appel du groupe. +Les résidents rejoignant l'appel ultérieurement seront également +ignorés, même si vous quittez l'appel. + +Ignorer les autres ? + <usetemplate ignoretext="Confirmer avant d'ignorer les autres lors d'un appel de groupe" name="okcancelignore" notext="Ok" yestext="Annuler"/> </notification> <global name="UnsupportedCPU"> - Votre processeur ne remplit pas les conditions minimum requises. diff --git a/indra/newview/skins/default/xui/fr/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/fr/panel_body_parts_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_body_parts_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/fr/panel_bodyparts_list_button_bar.xml new file mode 100644 index 0000000000..afd9001df0 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_bodyparts_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Permuter" name="switch_btn"/> + <button label="Acheter >" name="bodyparts_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_bottomtray.xml b/indra/newview/skins/default/xui/fr/panel_bottomtray.xml index d3e4afd6ee..328b97ee72 100644 --- a/indra/newview/skins/default/xui/fr/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/fr/panel_bottomtray.xml @@ -1,11 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="bottom_tray"> - <string name="SpeakBtnToolTip"> - Active/Désactive le micro - </string> - <string name="VoiceControlBtnToolTip"> - Affiche/Masque le panneau de contrôle vocal - </string> + <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"> @@ -24,6 +20,21 @@ <layout_panel name="snapshot_panel"> <button label="" name="snapshots" tool_tip="Prendre une photo"/> </layout_panel> + <layout_panel name="sidebar_btn_panel"> + <button label="Panneau latéral" name="sidebar_btn" tool_tip="Affiche/Masque le panneau latéral"/> + </layout_panel> + <layout_panel name="build_btn_panel"> + <button label="Construire" name="build_btn" tool_tip="Affiche/Masque les outils pour la construction"/> + </layout_panel> + <layout_panel name="search_btn_panel"> + <button label="Rechercher" name="search_btn" tool_tip="Affiche/Masque la recherche"/> + </layout_panel> + <layout_panel name="world_map_btn_panel"> + <button label="Carte" name="world_map_btn" tool_tip="Affiche/Masque la carte du monde"/> + </layout_panel> + <layout_panel name="mini_map_btn_panel"> + <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"/> diff --git a/indra/newview/skins/default/xui/fr/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/fr/panel_clothing_list_button_bar.xml new file mode 100644 index 0000000000..24cb92dde7 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_clothing_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Ajouter +" name="add_btn"/> + <button label="Acheter >" name="clothing_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/fr/panel_clothing_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_cof_wearables.xml b/indra/newview/skins/default/xui/fr/panel_cof_wearables.xml new file mode 100644 index 0000000000..c1085aa461 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_cof_wearables.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="cof_wearables"> + <accordion name="cof_wearables_accordion"> + <accordion_tab name="tab_attachments" title="Éléments attachés"/> + <accordion_tab name="tab_clothing" title="Habits"/> + <accordion_tab name="tab_body_parts" title="Parties du corps"/> + </accordion> +</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/fr/panel_deletable_wearable_list_item.xml new file mode 100644 index 0000000000..91d90a5660 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_deletable_wearable_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="deletable_wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/fr/panel_dummy_clothing_list_item.xml new file mode 100644 index 0000000000..6af84de0c7 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_dummy_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="dummy_clothing_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_pick.xml b/indra/newview/skins/default/xui/fr/panel_edit_pick.xml index 0bbcbe833f..5872b01fb0 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_pick.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Modifier la préférence" name="panel_edit_pick"> +<panel label="Modifier le favori" name="panel_edit_pick"> <panel.string name="location_notice"> (mise à jour après enregistrement) </panel.string> <text name="title"> - Modifier la préférence + Modifier le favori </text> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_shape.xml b/indra/newview/skins/default/xui/fr/panel_edit_shape.xml index 98f48887a9..88f0635d97 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_shape.xml @@ -1,14 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_shape_panel"> - <panel name="avatar_sex_panel"> - <text name="gender_text"> - Sexe : - </text> - <radio_group name="sex_radio"> - <radio_item label="Femme" name="radio"/> - <radio_item label="Homme" name="radio2"/> - </radio_group> - </panel> + <text name="avatar_height"> + Taille : [HEIGHT] mètres + </text> <panel label="Chemise" name="accordion_panel"> <accordion name="wearable_accordion"> <accordion_tab name="shape_body_tab" title="Corps"/> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/fr/panel_edit_tattoo.xml index 7ab2aa6bc9..9a6939e6b7 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_tattoo.xml @@ -1,8 +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="Tatouage tête" name="Head Tattoo" width="76" tool_tip="Cliquez pour sélectionner une image"/> - <texture_picker label="Tatouage haut" name="Upper Tattoo" width="80" tool_tip="Cliquez pour sélectionner une image"/> - <texture_picker label="Tatouage bas" name="Lower Tattoo" width="76" tool_tip="Cliquez pour sélectionner une image"/> + <texture_picker label="Tatouage tête" name="Head Tattoo" tool_tip="Cliquez pour sélectionner une image" width="76"/> + <texture_picker label="Tatouage haut" name="Upper Tattoo" tool_tip="Cliquez pour sélectionner une image" width="80"/> + <texture_picker label="Tatouage bas" name="Lower Tattoo" tool_tip="Cliquez pour sélectionner une image" width="76"/> + <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml b/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml index 3e581f387c..e0762bd791 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml @@ -93,6 +93,12 @@ <text name="edit_wearable_title" value="Modification de la silhouette"/> <panel label="Chemise" name="wearable_type_panel"> <text name="description_text" value="Silhouette :"/> + <radio_group name="sex_radio"> + <radio_item label="" name="sex_male" tool_tip="Homme" value="1"/> + <radio_item label="" name="sex_female" tool_tip="Femme" value="0"/> + </radio_group> + <icon name="male_icon" tool_tip="Homme"/> + <icon name="female_icon" tool_tip="Femme"/> </panel> <panel label="gear_buttom_panel" name="gear_buttom_panel"> <button name="friends_viewsort_btn" tool_tip="Options"/> diff --git a/indra/newview/skins/default/xui/fr/panel_group_control_panel.xml b/indra/newview/skins/default/xui/fr/panel_group_control_panel.xml index 69403939aa..3e66b3c72a 100644 --- a/indra/newview/skins/default/xui/fr/panel_group_control_panel.xml +++ b/indra/newview/skins/default/xui/fr/panel_group_control_panel.xml @@ -11,7 +11,7 @@ <button label="Quitter l'appel" name="end_call_btn"/> </layout_panel> <layout_panel name="voice_ctrls_btn_panel"> - <button label="Ouvrir les contrôles vocaux" name="voice_ctrls_btn"/> + <button label="Ouvrir contrôles vocaux" name="voice_ctrls_btn"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_group_land_money.xml b/indra/newview/skins/default/xui/fr/panel_group_land_money.xml index a10eaf9d18..192dd799ba 100644 --- a/indra/newview/skins/default/xui/fr/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/fr/panel_group_land_money.xml @@ -6,6 +6,9 @@ <panel.string name="cant_view_group_land_text"> Vous n'avez pas la permission de voir quel terrain possède ce groupe </panel.string> + <panel.string name="epmty_view_group_land_text"> + Aucune entrée + </panel.string> <panel.string name="cant_view_group_accounting_text"> Vous n'avez pas la permission d'accéder aux informations financières de ce groupe. </panel.string> diff --git a/indra/newview/skins/default/xui/fr/panel_group_notices.xml b/indra/newview/skins/default/xui/fr/panel_group_notices.xml index 35a5caaa92..5ea7ba192b 100644 --- a/indra/newview/skins/default/xui/fr/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/fr/panel_group_notices.xml @@ -36,13 +36,14 @@ Vous pouvez désactiver la réception des notices dans l'onglet Général. </text> <text_editor name="create_message"/> <text name="lbl5"> - Pièce-jointe : + Pièce jointe : </text> <line_editor name="create_inventory_name"/> <text name="string"> Faire glisser l'objet et le déposer ici pour le joindre : </text> - <button label="Supprimer" label_selected="Supprimer pièce-jointe" name="remove_attachment" tool_tip="Supprimer la pièce jointe de votre notification"/> + <button label="Inventaire" name="open_inventory" tool_tip="Ouvrir l'inventaire"/> + <button label="Supprimer" label_selected="Supprimer pièce jointe" name="remove_attachment" tool_tip="Supprimer la pièce jointe de votre notification"/> <button label="Envoyer" label_selected="Envoyer" left="200" name="send_notice" width="100"/> <group_drop_target name="drop_target" tool_tip="Faites glisser un objet de l'inventaire jusqu'à cette case pour l'envoyer avec la notice. Vous devez avoir l'autorisation de copier et transférer l'objet pour pouvoir le joindre."/> </panel> @@ -60,6 +61,6 @@ Vous pouvez désactiver la réception des notices dans l'onglet Général. Message : </text> <line_editor left="128" name="view_inventory_name" width="256"/> - <button label="Ouvrir la pièce jointe" label_selected="Ouvrir pièce-jointe" name="open_attachment" width="118"/> + <button label="Ouvrir pièce jointe" label_selected="Ouvrir pièce jointe" name="open_attachment" width="118"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_login.xml b/indra/newview/skins/default/xui/fr/panel_login.xml index 8569a544fa..f5847e0ee0 100644 --- a/indra/newview/skins/default/xui/fr/panel_login.xml +++ b/indra/newview/skins/default/xui/fr/panel_login.xml @@ -8,18 +8,15 @@ </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> - <text name="first_name_text"> - Prénom : + <text name="username_text"> + Nom d'utilisateur : </text> - <line_editor label="Prénom" name="first_name_edit" tool_tip="Prénom [SECOND_LIFE]"/> - <text name="last_name_text"> - Nom : - </text> - <line_editor label="Nom :" name="last_name_edit" tool_tip="Nom [SECOND_LIFE]"/> + <line_editor label="Nom d'utilisateur" name="username_edit" tool_tip="Nom d'utilisateur [SECOND_LIFE]"/> <text name="password_text"> Mot de passe : </text> <check_box label="Enregistrer" name="remember_check"/> + <button label="Connexion" name="connect_btn"/> <text name="start_location_text"> Lieu de départ : </text> @@ -28,7 +25,6 @@ <combo_box.item label="Domicile" name="MyHome"/> <combo_box.item label="<Saisissez le nom de la région>" name="Typeregionname"/> </combo_box> - <button label="Connexion" name="connect_btn"/> </layout_panel> <layout_panel name="links"> <text name="create_new_account_text"> diff --git a/indra/newview/skins/default/xui/fr/panel_main_inventory.xml b/indra/newview/skins/default/xui/fr/panel_main_inventory.xml index 6cd9db2a5e..f631cf8b85 100644 --- a/indra/newview/skins/default/xui/fr/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/fr/panel_main_inventory.xml @@ -9,62 +9,20 @@ <text name="ItemcountText"> Objets : </text> - <menu_bar name="Inventory Menu"> - <menu label="Fichier" name="File"> - <menu_item_call label="Ouvrir" name="Open"/> - <menu label="Charger" name="upload"> - <menu_item_call label="Image ([COST] L$)..." name="Upload Image"/> - <menu_item_call label="Son ([COST] L$)..." name="Upload Sound"/> - <menu_item_call label="Animation ([COST] L$)..." name="Upload Animation"/> - <menu_item_call label="Lot ([COST] L$ par fichier)..." name="Bulk Upload"/> - </menu> - <menu_item_call label="Nouvelle fenêtre" name="New Window"/> - <menu_item_call label="Afficher les filtres" name="Show Filters"/> - <menu_item_call label="Réinitialiser les filtres" name="Reset Current"/> - <menu_item_call label="Fermer tous les dossiers" name="Close All Folders"/> - <menu_item_call label="Vider la corbeille" name="Empty Trash"/> - <menu_item_call label="Vider les objets trouvés" name="Empty Lost And Found"/> - </menu> - <menu label="Créer" name="Create"> - <menu_item_call label="Nouveau dossier" name="New Folder"/> - <menu_item_call label="Nouveau script" name="New Script"/> - <menu_item_call label="Nouvelle note" name="New Note"/> - <menu_item_call label="Nouveau geste" name="New Gesture"/> - <menu label="Nouveaux habits" name="New Clothes"> - <menu_item_call label="Nouvelle chemise" name="New Shirt"/> - <menu_item_call label="Nouveau pantalon" name="New Pants"/> - <menu_item_call label="Nouvelles chaussures" name="New Shoes"/> - <menu_item_call label="Nouvelles chaussettes" name="New Socks"/> - <menu_item_call label="Nouvelle veste" name="New Jacket"/> - <menu_item_call label="Nouvelle jupe" name="New Skirt"/> - <menu_item_call label="Nouveaux gants" name="New Gloves"/> - <menu_item_call label="Nouveau débardeur" name="New Undershirt"/> - <menu_item_call label="Nouveau caleçon" name="New Underpants"/> - <menu_item_call label="Nouvel alpha" name="New Alpha"/> - <menu_item_call label="Nouveau tatouage" name="New Tattoo"/> - </menu> - <menu label="Nouvelles parties du corps" name="New Body Parts"> - <menu_item_call label="Nouvelle silhouette" name="New Shape"/> - <menu_item_call label="Nouvelle peau" name="New Skin"/> - <menu_item_call label="Nouveaux cheveux" name="New Hair"/> - <menu_item_call label="Nouveaux yeux" name="New Eyes"/> - </menu> - </menu> - <menu label="Trier" name="Sort"> - <menu_item_check label="Par nom" name="By Name"/> - <menu_item_check label="Par date" name="By Date"/> - <menu_item_check label="Dossiers toujours par nom" name="Folders Always By Name"/> - <menu_item_check label="Dossiers système en premier" name="System Folders To Top"/> - </menu> - </menu_bar> <filter_editor label="Filtrer l'inventaire" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="MON INVENTAIRE" name="All Items"/> - <inventory_panel label="RÉCENT" name="Recent Items"/> + <recent_inventory_panel label="RÉCENT" name="Recent Items"/> </tab_container> - <panel name="bottom_panel"> - <button name="options_gear_btn" tool_tip="Afficher d'autres options"/> - <button name="add_btn" tool_tip="Ajouter un nouvel article"/> - <dnd_button name="trash_btn" tool_tip="Supprimer l'article sélectionné"/> - </panel> + <layout_stack name="bottom_panel"> + <layout_panel name="options_gear_btn_panel"> + <button name="options_gear_btn" tool_tip="Afficher d'autres options"/> + </layout_panel> + <layout_panel name="add_btn_panel"> + <button name="add_btn" tool_tip="Ajouter un nouvel article"/> + </layout_panel> + <layout_panel name="trash_btn_panel"> + <dnd_button name="trash_btn" tool_tip="Supprimer l'article sélectionné"/> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_notes.xml b/indra/newview/skins/default/xui/fr/panel_notes.xml index f4e4f8a4ab..1609b6c9d3 100644 --- a/indra/newview/skins/default/xui/fr/panel_notes.xml +++ b/indra/newview/skins/default/xui/fr/panel_notes.xml @@ -17,7 +17,7 @@ <button label="IM" name="im" width="30" tool_tip="Ouvrir une session IM"/> <button label="Appeler" name="call" width="60" tool_tip="Appeler ce résident"/> <button label="Carte" name="show_on_map_btn" tool_tip="Afficher le résident sur la carte"/> - <button label="Téléporter" name="teleport" tool_tip="Proposez une téléportation"/> + <button label="Téléporter" name="teleport" tool_tip="Proposer une téléportation"/> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml b/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml index 31e1906f01..4c869d05c8 100644 --- a/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml @@ -2,6 +2,8 @@ <!-- Side tray Outfit Edit panel --> <panel label="Modification de la tenue" name="outfit_edit"> <string name="No Outfit" value="Pas de tenue"/> + <string name="unsaved_changes" value="Modifications non enregistrées"/> + <string name="now_editing" value="Modification"/> <panel.string name="not_available"> (s/o) </panel.string> @@ -21,18 +23,13 @@ </panel> <layout_stack name="im_panels"> <layout_panel label="Panneau de contrôle IM" name="outfit_wearables_panel"> - <scroll_list name="look_items_list"> - <scroll_list.columns label="Article de la tenue" name="look_item"/> - <scroll_list.columns label="Tri des articles de la tenue" name="look_item_sort"/> - </scroll_list> <panel label="bottom_panel" name="edit_panel"/> </layout_panel> <layout_panel name="add_wearables_panel"> - <filter_editor label="Filtre" name="look_item_filter"/> + <text name="add_to_outfit_label" value="Ajouter à la tenue :"/> <layout_stack name="filter_panels"> - <layout_panel label="Panneau de contrôle IM" name="filter_button_panel"> - <text name="add_to_outfit_label" value="Ajouter à la tenue :"/> - <button label="F" name="filter_button"/> + <layout_panel label="Panneau de contrôle IM" name="filter_panel"> + <filter_editor label="Filtre" name="look_item_filter"/> </layout_panel> </layout_stack> <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> diff --git a/indra/newview/skins/default/xui/fr/panel_people.xml b/indra/newview/skins/default/xui/fr/panel_people.xml index e1ba2990cc..f7eb803d4a 100644 --- a/indra/newview/skins/default/xui/fr/panel_people.xml +++ b/indra/newview/skins/default/xui/fr/panel_people.xml @@ -2,9 +2,9 @@ <!-- Side tray panel --> <panel label="Résidents" name="people_panel"> <string name="no_recent_people" value="Personne de récent. Pour rechercher des résidents avec qui passer du temps, voir [secondlife:///app/search/people Rechercher] ou [secondlife:///app/worldmap Carte du monde]."/> - <string name="no_filtered_recent_people" value="Vous n'avez pas trouvé ce que vous cherchiez ? Utilisez [secondlife:///app/search/people Rechercher]."/> + <string name="no_filtered_recent_people" value="Vous n'avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/people/Rechercher [SEARCH_TERM]]."/> <string name="no_one_near" value="Personne près de vous. Pour rechercher des résidents avec qui passer du temps, voir [secondlife:///app/search/people Rechercher] ou [secondlife:///app/worldmap Carte du monde]."/> - <string name="no_one_filtered_near" value="Vous n'avez pas trouvé ce que vous cherchiez ? Utilisez [secondlife:///app/search/people Rechercher]."/> + <string name="no_one_filtered_near" value="Vous n'avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/people/Rechercher [SEARCH_TERM]]."/> <string name="no_friends_online" value="Pas d'amis connectés"/> <string name="no_friends" value="Pas d'amis"/> <string name="no_friends_msg"> @@ -12,11 +12,11 @@ Pour rechercher des résidents avec qui passer du temps, utilisez [secondlife:///app/worldmap Carte du monde]. </string> <string name="no_filtered_friends_msg"> - Vous n'avez pas trouvé ce que vous cherchiez ? Utilisez [secondlife:///app/search/people Rechercher]. + Vous n'avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/people/Rechercher [SEARCH_TERM]]. </string> <string name="people_filter_label" value="Filtrer les personnes"/> <string name="groups_filter_label" value="Filtrer les groupes"/> - <string name="no_filtered_groups_msg" value="Vous n'avez pas trouvé ce que vous cherchiez ? Utilisez [secondlife:///app/search/groups Rechercher]."/> + <string name="no_filtered_groups_msg" value="Vous n'avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/groups/Rechercher [SEARCH_TERM]]."/> <string name="no_groups_msg" value="Vous souhaitez trouver des groupes à rejoindre ? Utilisez [secondlife:///app/search/groups Rechercher]."/> <filter_editor label="Filtre" name="filter_input"/> <tab_container name="tabs"> @@ -55,8 +55,8 @@ Pour rechercher des résidents avec qui passer du temps, utilisez [secondlife:// <button label="Profil" name="view_profile_btn" tool_tip="Afficher la photo, les groupes et autres infos des résidents"/> <button label="IM" name="im_btn" tool_tip="Ouvrir une session IM"/> <button label="Appeler" name="call_btn" tool_tip="Appeler ce résident"/> - <button label="Partager" name="share_btn"/> - <button label="Téléporter" name="teleport_btn" tool_tip="Proposez une téléportation"/> + <button label="Partager" name="share_btn" tool_tip="Partager un article d'inventaire"/> + <button label="Téléporter" name="teleport_btn" tool_tip="Proposer une téléportation"/> <button label="Profil" name="group_info_btn" tool_tip="Voir le profil du groupe"/> <button label="Chat" name="chat_btn" tool_tip="Ouvrir une session de chat"/> <button label="Appel" name="group_call_btn" tool_tip="Appeler ce groupe"/> diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml index 97f5d1ad91..9bae9878e2 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml @@ -11,8 +11,9 @@ <text name="heading2"> Positionnement automatique pour : </text> - <check_box label="Construire/Éditer" name="edit_camera_movement" tool_tip="Utilisez le positionnement automatique de la caméra quand vous accédez au mode de modification et quand vous le quittez"/> + <check_box label="Construire/Modifier" name="edit_camera_movement" tool_tip="Utilisez le positionnement automatique de la caméra quand vous accédez au mode de modification et quand vous le quittez"/> <check_box label="Apparence" name="appearance_camera_movement" tool_tip="Utiliser le positionnement automatique de la caméra quand je suis en mode Édition"/> + <check_box initial_value="1" label="Panneau latéral" name="appearance_sidebar_positioning" tool_tip="Positionnement auto de la caméra pour le panneau latéral"/> <check_box label="Afficher en vue subjective" name="first_person_avatar_visible"/> <check_box label="Les touches de direction me font toujours me déplacer" name="arrow_keys_move_avatar_check"/> <check_box label="Appuyer deux fois et maintenir enfoncé pour courir" name="tap_tap_hold_to_run"/> 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 64635fbac0..76f3319525 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml @@ -45,7 +45,7 @@ </text> <check_box initial_value="true" label="Jouer l'animation clavier quand vous écrivez" name="play_typing_animation"/> <check_box label="M'envoyer les IM par e-mail une fois déconnecté" name="send_im_to_email"/> - <check_box label="Activer l'historique des chats en texte brut" name="plain_text_chat_history"/> + <check_box label="Activer l'historique des chats et des IM en texte brut" name="plain_text_chat_history"/> <text name="show_ims_in_label"> Afficher les IM dans : </text> diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml index 450ad64ae4..c7caf5c2ff 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml @@ -1,19 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Graphiques" name="Display panel"> - <text name="WindowSizeLabel"> - Taille de la fenêtre : - </text> - <check_box label="Utiliser le plein écran" name="windowed mode"/> - <combo_box name="windowsize combo"> - <combo_box.item label="640 x 480" name="640x480"/> - <combo_box.item label="800 x 600" name="800x600"/> - <combo_box.item label="720 x 480 (NTSC)" name="720x480"/> - <combo_box.item label="768 x 576 (PAL)" name="768x576"/> - <combo_box.item label="1024 x 768" name="1024x768"/> - </combo_box> - <text name="UI Size:"> - Taille de l'interface : - </text> <text name="QualitySpeed"> Qualité et vitesse : </text> @@ -63,6 +49,10 @@ m </text> <slider label="Nombre de particules max. :" label_width="147" name="MaxParticleCount"/> + <slider label="Limite d'affichage max des avatars :" name="MaxAvatarDrawDistance"/> + <text name="DrawDistanceMeterText3"> + m + </text> <slider label="Qualité post-traitement :" name="RenderPostProcess"/> <text name="MeshDetailText"> Détails des rendus : @@ -98,8 +88,8 @@ Sources lumineuses : </text> <radio_group name="LightingDetailRadio"> - <radio_item label="Soleil et lune uniquement" name="SunMoon"/> - <radio_item label="Lumières à proximité" name="LocalLights"/> + <radio_item label="Soleil et lune uniquement" name="SunMoon" value="0"/> + <radio_item label="Lumières à proximité" name="LocalLights" value="1"/> </radio_group> <text left="380" name="TerrainDetailText"> Rendu du terrain : diff --git a/indra/newview/skins/default/xui/fr/panel_profile.xml b/indra/newview/skins/default/xui/fr/panel_profile.xml index f801aee312..f1c12c9fee 100644 --- a/indra/newview/skins/default/xui/fr/panel_profile.xml +++ b/indra/newview/skins/default/xui/fr/panel_profile.xml @@ -45,7 +45,7 @@ <button label="IM" name="im" tool_tip="Ouvrir une session IM"/> <button label="Appeler" name="call" tool_tip="Appeler ce résident"/> <button label="Carte" name="show_on_map_btn" tool_tip="Afficher le résident sur la carte"/> - <button label="Téléporter" name="teleport" tool_tip="Proposez une téléportation"/> + <button label="Téléporter" name="teleport" tool_tip="Proposer une téléportation"/> <button label="â–¼" name="overflow_btn" tool_tip="Payer ou partager l'inventaire avec le résident"/> </layout_panel> <layout_panel name="profile_me_buttons_panel"> diff --git a/indra/newview/skins/default/xui/fr/sidepanel_appearance.xml b/indra/newview/skins/default/xui/fr/sidepanel_appearance.xml index 60fd63bffc..69cb6cd53d 100644 --- a/indra/newview/skins/default/xui/fr/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/fr/sidepanel_appearance.xml @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Tenues" name="appearance panel"> <string name="No Outfit" value="Aucune tenue"/> + <string name="Unsaved Changes" value="Modifications non enregistrées"/> + <string name="Now Wearing" value="Vous portez désormais..."/> <panel name="panel_currentlook"> - <button label="Éditer" name="editappearance_btn"/> - <text name="currentlook_title"> - (non enregistré) + <button label="M" name="editappearance_btn"/> + <button label="O" name="openoutfit_btn"/> + <text name="currentlook_status"> + (État) </text> <text name="currentlook_name"> Ma tenue avec un nom très long comme ORIGNAL </text> </panel> <filter_editor label="Filtrer les tenues" name="Filter"/> - <button label="Porter" name="wear_btn"/> - <button label="Nouvelle tenue" name="newlook_btn"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml b/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml index f92f142c64..893b64d4b2 100644 --- a/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml @@ -4,6 +4,7 @@ <panel name="button_panel"> <button label="Profil" name="info_btn"/> <button label="Partager" name="share_btn"/> + <button label="Acheter" name="shop_btn"/> <button label="Porter" name="wear_btn"/> <button label="Jouer" name="play_btn"/> <button label="Téléporter" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index f89ab9ba80..15d5847c58 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -32,7 +32,7 @@ Initialisation du cache des textures... </string> <string name="StartupInitializingVFS"> - Initialisation VFS… + Initialisation VFS... </string> <string name="ProgressRestoring"> Restauration... @@ -100,6 +100,24 @@ <string name="LoginDownloadingClothing"> Habits en cours de téléchargement... </string> + <string name="InvalidCertificate"> + Certificat non valide ou corrompu renvoyé par le serveur. Contactez l'administrateur de la grille. + </string> + <string name="CertInvalidHostname"> + Nom d'hôte non valide utilisé pour accéder au serveur. Vérifiez votre nom d'hôte de grille ou SLURL. + </string> + <string name="CertExpired"> + Il semble que le certificat renvoyé par la grille ait expiré. Vérifiez votre horloge système ou contactez l'administrateur de la grille. + </string> + <string name="CertKeyUsage"> + Impossible d'utiliser le certificat renvoyé par le serveur pour SSL. Contactez l'administrateur de la grille. + </string> + <string name="CertBasicConstraints"> + Certificats trop nombreux dans la chaîne des certificats du serveur. Contactez l'administrateur de la grille. + </string> + <string name="CertInvalidSignature"> + Impossible de vérifier la signature de certificat renvoyée par le serveur de la grille. Contactez l'administrateur de la grille. + </string> <string name="LoginFailedNoNetwork"> Erreur réseau : impossible d'établir la connexion. Veuillez vérifier votre connexion réseau. </string> @@ -840,6 +858,42 @@ <string name="invalid"> non valide </string> + <string name="shirt_not_worn"> + Chemise non portée + </string> + <string name="pants_not_worn"> + Pantalon non porté + </string> + <string name="shoes_not_worn"> + Chaussures non portées + </string> + <string name="socks_not_worn"> + Chaussettes non portées + </string> + <string name="jacket_not_worn"> + Veste non portée + </string> + <string name="gloves_not_worn"> + Gants non portés + </string> + <string name="undershirt_not_worn"> + Débardeur non porté + </string> + <string name="underpants_not_worn"> + Caleçon non porté + </string> + <string name="skirt_not_worn"> + Jupe non portée + </string> + <string name="alpha_not_worn"> + Alpha non porté + </string> + <string name="tattoo_not_worn"> + Tatouage non porté + </string> + <string name="invalid_not_worn"> + non valide + </string> <string name="NewWearable"> Nouv. [WEARABLE_ITEM] </string> @@ -865,7 +919,7 @@ Consultez les notices précédentes ou choisissez de ne plus recevoir ces messages ici. </string> <string name="GroupNotifyOpenAttachment"> - Ouvrir la pièce jointe + Ouvrir pièce jointe </string> <string name="GroupNotifySaveAttachment"> Enregistrer la pièce jointe @@ -910,7 +964,10 @@ Appuyez sur ESC pour quitter la vue subjective </string> <string name="InventoryNoMatchingItems"> - Vous n'avez pas trouvé ce que vous cherchiez ? Utilisez [secondlife:///app/search/all Rechercher]. + Vous n'avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/all/Rechercher [SEARCH_TERM]]. + </string> + <string name="PlacesNoMatchingItems"> + Vous n'avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/places/Rechercher [SEARCH_TERM]]. </string> <string name="FavoritesNoMatchingItems"> Faites glisser un repère ici pour l'ajouter à vos Favoris. @@ -946,6 +1003,7 @@ <string name="Wave" value=" Faire signe"/> <string name="HelloAvatar" value=" Bonjour, avatar !"/> <string name="ViewAllGestures" value=" Tout afficher >>"/> + <string name="GetMoreGestures" value="Plus >>"/> <string name="Animations" value=" Animations,"/> <string name="Calling Cards" value=" Cartes de visite,"/> <string name="Clothing" value=" Habits,"/> @@ -1575,6 +1633,9 @@ <string name="MuteGroup"> (groupe) </string> + <string name="MuteExternal"> + (externe) + </string> <string name="RegionNoCovenant"> Il n'y a aucun règlement pour ce domaine. </string> @@ -3390,11 +3451,14 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. <string name="answered_call"> Votre appel a fait l'objet d'une réponse </string> - <string name="started_call"> - A appelé quelqu'un + <string name="you_started_call"> + Vous appelez. + </string> + <string name="you_joined_call"> + Vous avez rejoint l'appel </string> - <string name="joined_call"> - A rejoint l'appel + <string name="name_started_call"> + [NAME] appelle. </string> <string name="ringing-im"> En train de rejoindre l'appel... @@ -3605,6 +3669,90 @@ de l'infraction signalée <string name="Contents"> Contenus </string> + <string name="Gesture"> + Geste + </string> + <string name="Male Gestures"> + Gestes masculins + </string> + <string name="Female Gestures"> + Gestes féminins + </string> + <string name="Other Gestures"> + Autres gestes + </string> + <string name="Speech Gestures"> + Gestes liés à la parole + </string> + <string name="Common Gestures"> + Gestes communs + </string> + <string name="Male - Excuse me"> + Homme - Demander pardon + </string> + <string name="Male - Get lost"> + Homme - Dire d'aller au diable + </string> + <string name="Male - Blow kiss"> + Homme - Envoyer un baiser + </string> + <string name="Male - Boo"> + Homme - Hou ! + </string> + <string name="Male - Bored"> + Homme - Ennui + </string> + <string name="Male - Hey"> + Homme - Hé ! + </string> + <string name="Male - Laugh"> + Homme - Rire + </string> + <string name="Male - Repulsed"> + Homme - Dégoût + </string> + <string name="Male - Shrug"> + Homme - Hausser les épaules + </string> + <string name="Male - Stick tougue out"> + Homme - Tirer la langue + </string> + <string name="Male - Wow"> + Homme - Ouah ! + </string> + <string name="FeMale - Excuse me"> + Femme - Demander pardon + </string> + <string name="FeMale - Get lost"> + Femme - Dire d'aller au diable + </string> + <string name="FeMale - Blow kiss"> + Femme - Envoyer un baiser + </string> + <string name="FeMale - Boo"> + Femme - Hou ! + </string> + <string name="Female - Bored"> + Femme - Ennui + </string> + <string name="Female - Hey"> + Femme - Hé ! + </string> + <string name="Female - Laugh"> + Femme - Rire + </string> + <string name="Female - Repulsed"> + Femme - Dégoût + </string> + <string name="Female - Shrug"> + Femme - Hausser les épaules + </string> + <string name="Female - Stick tougue out"> + Femme - Tirer la langue + </string> + <string name="Female - Wow"> + Femme - Ouah ! + </string> <string name="AvatarBirthDateFormat"> [day,datetime,slt]/[mthnum,datetime,slt]/[year,datetime,slt] </string> 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 742cdf44a5..c55f79738e 100644 --- a/indra/newview/skins/default/xui/it/floater_about_land.xml +++ b/indra/newview/skins/default/xui/it/floater_about_land.xml @@ -79,7 +79,7 @@ Vai al menu Mondo > Informazioni sul terreno oppure seleziona un altro appezz Categoria di accesso: </text> <text left="119" name="ContentRatingText"> - Adult + Adulti </text> <text name="Owner:"> Proprietario: @@ -139,10 +139,10 @@ Vai al menu Mondo > Informazioni sul terreno oppure seleziona un altro appezz <button label="Acquista il terreno..." label_selected="Acquista il terreno..." left="130" name="Buy Land..." width="125"/> <button label="Informazioni script" name="Scripts..."/> <button label="Acquista per il gruppo" name="Buy For Group..."/> - <button label="Compra pass..." label_selected="Compra pass..." left="130" name="Buy Pass..." tool_tip="Un pass ti da un accesso temporaneo in questo territorio." width="125"/> + <button label="Compra Pass..." label_selected="Compra Pass..." left="130" name="Buy Pass..." tool_tip="Un pass ti da un accesso temporaneo in questo territorio." width="125"/> <button label="Abbandona la terra" name="Abandon Land..."/> <button label="Reclama la terra" name="Reclaim Land..."/> - <button label="Vendita Linden" name="Linden Sale..." tool_tip="La terra deve essere posseduta, con contenuto impostato, e non già messa in asta."/> + <button label="Vendita Linden" name="Linden Sale..." tool_tip="La terra deve essere di proprietà , con contenuto impostato, e non già messa all'asta."/> </panel> <panel label="REGOLAMENTO" name="land_covenant_panel"> <panel.string name="can_resell"> @@ -193,18 +193,18 @@ o suddivisa. Categoria di accesso: </text> <text left="125" name="region_maturity_text"> - Adult + Adulti </text> <text name="resellable_lbl"> Rivendita: </text> - <text left="125" name="resellable_clause"> + <text name="resellable_clause"> La terra in questa regione non può essere rivenduta. </text> <text name="changeable_lbl"> Suddividi: </text> - <text left="125" name="changeable_clause"> + <text name="changeable_clause"> La terra in questa regione non può essere unita/suddivisa. </text> </panel> @@ -294,16 +294,16 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. Questa opzione è disabilitata perchè tu non puoi modificare le opzioni di questo terreno. </panel.string> <panel.string name="mature_check_mature"> - Contenuto Mature + Contenuto Moderato </panel.string> <panel.string name="mature_check_adult"> - Contenuto Adult + Contenuto Adulti </panel.string> <panel.string name="mature_check_mature_tooltip"> - Il contenuto o le informazioni del tuo terreno sono considerate Mature. + Il contenuto o le informazioni del tuo terreno sono considerate di tipo Moderato. </panel.string> <panel.string name="mature_check_adult_tooltip"> - Il contenuto o le informazioni del tuo terreno sono considerate Adult. + Il contenuto o le informazioni del tuo terreno sono considerate di tipo per Adulti. </panel.string> <panel.string name="landing_point_none"> (nessuno) @@ -340,13 +340,13 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. <check_box label="Sicuro (senza danno)" name="check safe" tool_tip="Se spuntato, imposta il terreno su 'sicuro', disabilitando i danni da combattimento. Se non spuntato, viene abilitato il combattimento a morte."/> <check_box label="Nessuna spinta" name="PushRestrictCheck" tool_tip="Previeni i colpi. Selezionare questa opzione può essere utile per prevenire comportamenti dannosi sul tuo terreno."/> <check_box label="Mostra luogo nella ricerca (30 L$/settimana)" name="ShowDirectoryCheck" tool_tip="Lascia che questa terra sia vista dagli altri nei risultati di ricerca"/> - <combo_box left="282" name="land category with adult" width="140"> + <combo_box name="land category with adult"> <combo_box.item label="Tutte le categorie" name="item0"/> <combo_box.item label="Luogo dei Linden" name="item1"/> - <combo_box.item label="Adult" name="item2"/> - <combo_box.item label="Arte & Cultura" name="item3"/> + <combo_box.item label="Adulti" name="item2"/> + <combo_box.item label="Arte e cultura" name="item3"/> <combo_box.item label="Affari" name="item4"/> - <combo_box.item label="Educazione" name="item5"/> + <combo_box.item label="Istruzione" name="item5"/> <combo_box.item label="Gioco" name="item6"/> <combo_box.item label="Divertimento" name="item7"/> <combo_box.item label="Accoglienza nuovi residenti" name="item8"/> @@ -355,7 +355,7 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. <combo_box.item label="Shopping" name="item11"/> <combo_box.item label="Altro" name="item12"/> </combo_box> - <combo_box left="282" name="land category" width="140"> + <combo_box name="land category"> <combo_box.item label="Tutte le categorie" name="item0"/> <combo_box.item label="Luogo dei Linden" name="item1"/> <combo_box.item label="Arte & Cultura" name="item3"/> @@ -369,7 +369,7 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. <combo_box.item label="Shopping" name="item11"/> <combo_box.item label="Altro" name="item12"/> </combo_box> - <check_box label="Contenuto Mature" name="MatureCheck" tool_tip=" "/> + <check_box label="Contenuti di tipo Moderato" name="MatureCheck" tool_tip=" "/> <text name="Snapshot:"> Fotografia: </text> @@ -427,7 +427,17 @@ Media: <check_box label="Fai ripetere il video" left="265" name="media_loop" tool_tip="Fai ripetere il video continuamente. Quando il video è finito, reinizierà dal principio."/> </panel> <panel label="SUONO" name="land_audio_panel"> + <text name="MusicURL:"> + URL musica: + </text> <check_box label="Nascondi URL" name="hide_music_url" tool_tip="Questa opzione consente di nascondere l'url della musica a chi non è autorizzato a visionare le informazioni di questo parcel."/> + <text name="Sound:"> + Audio: + </text> + <check_box label="Limita l'audio per oggetti e gesture a questo lotto" name="check sound local"/> + <text name="Voice settings:"> + Voce: + </text> <check_box label="Attiva voce" name="parcel_enable_voice_channel"/> <check_box label="Attiva voce (stabilito dalla proprietà )" name="parcel_enable_voice_channel_is_estate_disabled"/> <check_box label="Limita il chat vocale a questo lotto" name="parcel_enable_voice_channel_local"/> @@ -460,7 +470,20 @@ Media: <spinner label="Prezzo in L$:" name="PriceSpin"/> <spinner label="Ore di accesso:" name="HoursSpin"/> <panel name="Allowed_layout_panel"> + <text label="Consenti sempre" name="AllowedText"> + Residenti consentiti + </text> <name_list name="AccessList" tool_tip="([LISTED] in lista, [MAX] max)"/> + <button label="Aggiungi" name="add_allowed"/> + <button label="Rimuovi" label_selected="Rimuovi" name="remove_allowed"/> + </panel> + <panel name="Banned_layout_panel"> + <text label="Espelli" name="BanCheck"> + Residenti con divieto + </text> + <name_list name="BannedList" tool_tip="([LISTED] in lista, [MAX] max)"/> + <button label="Aggiungi" name="add_banned"/> + <button label="Rimuovi" label_selected="Rimuovi" name="remove_banned"/> </panel> </panel> </tab_container> diff --git a/indra/newview/skins/default/xui/it/floater_animation_preview.xml b/indra/newview/skins/default/xui/it/floater_animation_preview.xml index 5472e32544..77341cad63 100644 --- a/indra/newview/skins/default/xui/it/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/it/floater_animation_preview.xml @@ -153,7 +153,7 @@ La lunghezza massima è [MAX_LENGTH] secondi. <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="Plllppt"/> + <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"/> diff --git a/indra/newview/skins/default/xui/it/floater_report_abuse.xml b/indra/newview/skins/default/xui/it/floater_report_abuse.xml index 4827cc739d..eeba54b0ca 100644 --- a/indra/newview/skins/default/xui/it/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/it/floater_report_abuse.xml @@ -67,8 +67,8 @@ <combo_box.item label="Molestie > Abusi verbali" name="Harassment__Verbal_abuse"/> <combo_box.item label="Indecenza > Condotta o contenuti largamente offensivi" name="Indecency__Broadly_offensive_content_or_conduct"/> <combo_box.item label="Indecenza > Nome di un avatar inappropriato" name="Indecency__Inappropriate_avatar_name"/> - <combo_box.item label="Indecenza > Contenuto o condotta inappropriata in una regione PG" name="Indecency__Mature_content_in_PG_region"/> - <combo_box.item label="Indecenza > Contenuto o condotta inappropriata in una regione Mature" name="Indecency__Inappropriate_content_in_Mature_region"/> + <combo_box.item label="Indecenza > Contenuto o condotta inappropriata in una regione con accesso Generale" name="Indecency__Mature_content_in_PG_region"/> + <combo_box.item label="Indecenza > Contenuto o condotta inappropriata in una regione con accesso Moderato" name="Indecency__Inappropriate_content_in_Mature_region"/> <combo_box.item label="Violazione della proprietà intellettuale > Rimozione contenuti" name="Intellectual_property_infringement_Content_Removal"/> <combo_box.item label="Violazione della proprietà intellettuale > CopyBot o sblocco di permessi" name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit"/> <combo_box.item label="Intolleranza" name="Intolerance"/> diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml index 6ad8d68df2..04d61b97ff 100644 --- a/indra/newview/skins/default/xui/it/floater_tools.xml +++ b/indra/newview/skins/default/xui/it/floater_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="toolbox floater" short_title="STRUMENTI PER COSTRUZIONE" title="" width="288"> +<floater name="toolbox floater" short_title="STRUMENTI PER COSTRUZIONE"> <floater.string name="status_rotate"> Sposta le fasce colorate per ruotare l'oggetto </floater.string> @@ -39,12 +39,12 @@ <floater.string name="grid_attachment_text"> Accessorio </floater.string> - <button label="" label_selected="" name="button focus" tool_tip="Focus"/> - <button label="" label_selected="" name="button move" tool_tip="Muoviti"/> + <button label="" label_selected="" name="button focus" tool_tip="Ingrandisci"/> + <button label="" label_selected="" name="button move" tool_tip="Sposta"/> <button label="" label_selected="" name="button edit" tool_tip="Modifica"/> <button label="" label_selected="" name="button create" tool_tip="Crea"/> - <button label="" label_selected="" name="button land" tool_tip="Terra"/> - <text name="text status" width="280"> + <button label="" label_selected="" name="button land" tool_tip="Terreno"/> + <text name="text status"> Trascina per muovere, trascina+maiuscolo per copiare </text> <radio_group name="focus_radio_group"> @@ -67,10 +67,13 @@ <text name="RenderingCost" tool_tip="Mostra il costo di rendering calcolato per questo oggetto"> þ: [COUNT] </text> - <check_box label="Ridimens. simmetricamente" name="checkbox uniform"/> + <check_box name="checkbox uniform"/> + <text name="checkbox uniform label"> + Ridimens. simmetricamente + </text> <check_box initial_value="true" label="Ridimensiona le texture" name="checkbox stretch textures"/> <check_box initial_value="true" label="Posiziona nella griglia" name="checkbox snap to grid"/> - <combo_box left_delta="48" name="combobox grid mode" tool_tip="Scegli il tipo di righello per posizionare l'oggetto"> + <combo_box name="combobox grid mode" tool_tip="Scegli il tipo di righello per posizionare l'oggetto"> <combo_box.item label="Rete del mondo" name="World"/> <combo_box.item label="Rete locale" name="Local"/> <combo_box.item label="Griglia di riferimento" name="Reference"/> @@ -110,18 +113,18 @@ <text name="Dozer Size:"> Grandezza </text> - <slider_bar initial_value="2.0" left="184" name="slider brush size" width="74"/> + <slider_bar initial_value="2.0" name="slider brush size"/> <text name="Strength:"> Potenza </text> - <button label="Applica" label_selected="Applica" left="146" name="button apply to selection" tool_tip="Modifica il terreno selezionato"/> - <text left="134" name="obj_count"> + <button label="Applica" label_selected="Applica" name="button apply to selection" tool_tip="Modifica il terreno selezionato"/> + <text name="obj_count"> Oggetti: [COUNT] </text> - <text left="134" name="prim_count"> + <text name="prim_count"> Prim: [COUNT] </text> - <tab_container name="Object Info Tabs" tab_max_width="150" tab_min_width="30" width="288"> + <tab_container name="Object Info Tabs"> <panel label="Generale" name="General"> <panel.string name="text deed continued"> Cessione @@ -182,12 +185,12 @@ </text> <button label="Imposta..." label_selected="Imposta..." name="button set group" tool_tip="Scegli un gruppo con cui condividere i diritti relativi all'oggetto"/> <name_box initial_value="Caricamento in corso..." name="Group Name Proxy"/> - <button label="Cessione" label_selected="Cessione" left_delta="152" name="button deed" tool_tip="Con una cessione si trasferisce il bene con i diritti al proprietario successivo Gli oggetti in proprietà condivisa di gruppo possono essere ceduti soltanto da un funzionario del gruppo." width="98"/> + <button label="Cessione" label_selected="Cessione" name="button deed" tool_tip="Con una cessione si trasferisce il bene con i diritti al proprietario successivo Gli oggetti in proprietà condivisa di gruppo possono essere ceduti soltanto da un funzionario del gruppo."/> <check_box label="Condividi" name="checkbox share with group" tool_tip="Consenti a tutti i membri del gruppo selezionato di condividere i tuoi diritti di modifica di questo oggetto. Per attivare le restrizioni per ruolo devi prima effettuare la cessione."/> - <text name="label click action" width="220"> + <text name="label click action"> Fai clic per: </text> - <combo_box name="clickaction" width="192"> + <combo_box name="clickaction"> <combo_box.item label="Tocca (predefinito)" name="Touch/grab(default)"/> <combo_box.item label="Siediti sull'oggetto" name="Sitonobject"/> <combo_box.item label="Compra l'oggetto" name="Buyobject"/> @@ -216,8 +219,8 @@ Proprietario successivo: </text> <check_box label="Modificare" name="checkbox next owner can modify"/> - <check_box label="Copiare" left_delta="80" name="checkbox next owner can copy"/> - <check_box label="Trasferisci" left_delta="67" name="checkbox next owner can transfer" tool_tip="Il prossimo proprietario può regalare o rivendere questo oggetto"/> + <check_box label="Copiare" name="checkbox next owner can copy"/> + <check_box label="Trasferisci" name="checkbox next owner can transfer" tool_tip="Il prossimo proprietario può regalare o rivendere questo oggetto"/> <text name="B:"> B: </text> @@ -318,7 +321,7 @@ </text> <spinner label="X" name="Shear X"/> <spinner label="Y" name="Shear Y"/> - <text name="advanced_cut" width="149"> + <text name="advanced_cut"> Riduci un bordo (inizio/fine) </text> <text name="advanced_dimple"> @@ -355,29 +358,29 @@ </combo_box> </panel> <panel label="Caratteristiche" name="Features"> - <text name="select_single" width="280"> + <text name="select_single"> Seleziona solo un prim per modificarne le caratteristiche. </text> <text name="edit_object"> Modifica le caratteristiche dell'oggetto: </text> <check_box label="Flessibilità " name="Flexible1D Checkbox Ctrl" tool_tip="Consenti all'oggetto di flettersi lungo l'asse Z (solo lato client)"/> - <spinner label="Morbidezza" label_width="72" name="FlexNumSections" width="135"/> - <spinner label="Gravità " label_width="72" name="FlexGravity" width="135"/> - <spinner label="Elasticità " label_width="72" name="FlexFriction" width="135"/> - <spinner label="Sventolio" label_width="72" name="FlexWind" width="135"/> - <spinner label="Tensione" label_width="72" name="FlexTension" width="135"/> - <spinner label="Forza X" label_width="72" name="FlexForceX" width="135"/> - <spinner label="Forza Y" label_width="72" name="FlexForceY" width="135"/> - <spinner label="Forza Z" label_width="72" name="FlexForceZ" width="135"/> + <spinner label="Morbidezza" name="FlexNumSections"/> + <spinner label="Gravità " name="FlexGravity"/> + <spinner label="Elasticità " name="FlexFriction"/> + <spinner label="Sventolio" name="FlexWind"/> + <spinner label="Tensione" name="FlexTension"/> + <spinner label="Forza X" name="FlexForceX"/> + <spinner label="Forza Y" name="FlexForceY"/> + <spinner label="Forza Z" name="FlexForceZ"/> <check_box label="Luce" name="Light Checkbox Ctrl" tool_tip="Imposta l'oggetto come sorgente di luce"/> <color_swatch label="" name="colorswatch" tool_tip="Clicca per aprire il selettore dei colori"/> <texture_picker label="" name="light texture control" tool_tip="Clicca per scegliere un'immagine da proiettare (funziona solo con il rendering differito attivato)"/> - <spinner label="Intensità " label_width="72" name="Light Intensity" width="135"/> + <spinner label="Intensità " name="Light Intensity"/> <spinner label="Angolo di vista" name="Light FOV"/> - <spinner label="Raggio" label_width="72" name="Light Radius" width="135"/> + <spinner label="Raggio" name="Light Radius"/> <spinner label="Centro focale" name="Light Focus"/> - <spinner label="Attenuazione" label_width="72" name="Light Falloff" width="135"/> + <spinner label="Attenuazione" name="Light Falloff"/> <spinner label="Atmosfera" name="Light Ambiance"/> </panel> <panel label="Texture" name="Texture"> @@ -395,28 +398,27 @@ <text name="glow label"> Bagliore </text> - <check_box bottom_delta="-21" label="Massima luminosità " name="checkbox fullbright"/> + <check_box label="Massima luminosità " name="checkbox fullbright"/> <text name="tex gen"> - Applicazione -della texture + Applicazione </text> - <combo_box bottom_delta="-38" name="combobox texgen"> + <combo_box name="combobox texgen"> <combo_box.item label="Default" name="Default"/> <combo_box.item label="Planare" name="Planar"/> </combo_box> - <text bottom="-120" name="label shininess"> + <text name="label shininess"> Brillantezza </text> - <combo_box bottom_delta="-22" name="combobox shininess"> + <combo_box name="combobox shininess"> <combo_box.item label="Nessuna" name="None"/> <combo_box.item label="Bassa" name="Low"/> <combo_box.item label="Media" name="Medium"/> <combo_box.item label="Alta" name="High"/> </combo_box> - <text bottom="-120" name="label bumpiness"> + <text name="label bumpiness"> Rilievo </text> - <combo_box bottom_delta="-22" name="combobox bumpiness" width="100"> + <combo_box name="combobox bumpiness"> <combo_box.item label="Nessuna" name="None"/> <combo_box.item label="Luminoso" name="Brightness"/> <combo_box.item label="Scuro" name="Darkness"/> @@ -476,17 +478,17 @@ della texture <text name="label_area"> Zona: [AREA] m² </text> - <button label="Informazioni sui terreni" label_selected="Informazioni sui terreni" name="button about land" width="156"/> + <button label="Informazioni sui terreni" label_selected="Informazioni sui terreni" name="button about land"/> <check_box label="Mostra i proprietari" name="checkbox show owners" tool_tip="Colora i terreni in base ai loro proprietari: Verde = il tuo terreno Acqua = la terra del tuo gruppo Rosso = posseduta da altri Giallo = in vendita Viola = in asta Grigia = pubblica"/> <text name="label_parcel_modify"> Modifica il terreno </text> - <button label="Suddividi" label_selected="Suddividi" name="button subdivide land" width="156"/> - <button label="Iscriviti" label_selected="Iscriviti" name="button join land" width="156"/> + <button label="Suddividi" label_selected="Suddividi" name="button subdivide land"/> + <button label="Iscriviti" label_selected="Iscriviti" name="button join land"/> <text name="label_parcel_trans"> Transazioni terreno </text> - <button label="Acquista terreno" label_selected="Acquista terreno" name="button buy land" width="156"/> - <button label="Abbandona il terreno" label_selected="Abbandona il terreno" name="button abandon land" width="156"/> + <button label="Acquista terreno" label_selected="Acquista terreno" name="button buy land"/> + <button label="Abbandona il terreno" label_selected="Abbandona il terreno" name="button abandon land"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/it/menu_inventory.xml b/indra/newview/skins/default/xui/it/menu_inventory.xml index dacb257758..3b36198774 100644 --- a/indra/newview/skins/default/xui/it/menu_inventory.xml +++ b/indra/newview/skins/default/xui/it/menu_inventory.xml @@ -9,28 +9,28 @@ <menu_item_call label="Elimina" name="Task Remove"/> <menu_item_call label="Svuota il Cestino" name="Empty Trash"/> <menu_item_call label="Svuota gli oggetti persi e ritrovati" name="Empty Lost And Found"/> - <menu_item_call label="Nuova Cartella" name="New Folder"/> - <menu_item_call label="Nuovo Script" name="New Script"/> + <menu_item_call label="Nuova cartella" name="New Folder"/> + <menu_item_call label="Nuovo script" name="New Script"/> <menu_item_call label="Nuovo biglietto" name="New Note"/> - <menu_item_call label="Nuova Gesture" name="New Gesture"/> + <menu_item_call label="Nuova gesture" name="New Gesture"/> <menu label="Maglietta intima" name="New Clothes"> - <menu_item_call label="Nuova Maglietta" name="New Shirt"/> - <menu_item_call label="Nuovi Pantaloni" name="New Pants"/> - <menu_item_call label="Nuove Scarpe" name="New Shoes"/> - <menu_item_call label="Nuove Calze" name="New Socks"/> - <menu_item_call label="Nuova Giacca" name="New Jacket"/> - <menu_item_call label="Nuova Gonna" name="New Skirt"/> - <menu_item_call label="Nuovi Guanti" name="New Gloves"/> - <menu_item_call label="Nuova Canottiera" name="New Undershirt"/> - <menu_item_call label="Nuove Mutande" name="New Underpants"/> + <menu_item_call label="Nuova maglietta" name="New Shirt"/> + <menu_item_call label="Nuovi pantaloni" name="New Pants"/> + <menu_item_call label="Nuove scarpe" name="New Shoes"/> + <menu_item_call label="Nuove calze" name="New Socks"/> + <menu_item_call label="Nuova giacca" name="New Jacket"/> + <menu_item_call label="Nuova gonna" name="New Skirt"/> + <menu_item_call label="Nuovi guanti" name="New Gloves"/> + <menu_item_call label="Nuova canottiera" name="New Undershirt"/> + <menu_item_call label="Nuove mutande" name="New Underpants"/> <menu_item_call label="Nuovo Alfa Mask" name="New Alpha Mask"/> <menu_item_call label="Nuovo tatuaggio" name="New Tattoo"/> </menu> <menu label="Nuove parti del corpo" name="New Body Parts"> - <menu_item_call label="Nuova Forma del corpo" name="New Shape"/> - <menu_item_call label="Nuova Pelle" name="New Skin"/> - <menu_item_call label="Nuovi Capelli" name="New Hair"/> - <menu_item_call label="Nuovi Occhi" name="New Eyes"/> + <menu_item_call label="Nuova forma del corpo" name="New Shape"/> + <menu_item_call label="Nuova pelle" name="New Skin"/> + <menu_item_call label="Nuovi capelli" name="New Hair"/> + <menu_item_call label="Nuovi occhi" name="New Eyes"/> </menu> <menu label="Cambia tipo" name="Change Type"> <menu_item_call label="Predefinito" name="Default"/> @@ -49,6 +49,8 @@ <menu_item_call label="Apri" name="Sound Open"/> <menu_item_call label="Sostituisci vestiti" name="Replace Outfit"/> <menu_item_call label="Aggiungi al vestiario" name="Add To Outfit"/> + <menu_item_call label="Rimuovi dal vestiario attuale" name="Remove From Outfit"/> + <menu_item_call label="Trova originale" name="Find Original"/> <menu_item_call label="Elimina oggetto" name="Purge Item"/> <menu_item_call label="Ripristina oggetto" name="Restore Item"/> <menu_item_call label="Apri" name="Open"/> @@ -58,6 +60,7 @@ <menu_item_call label="Copia" name="Copy"/> <menu_item_call label="Incolla" name="Paste"/> <menu_item_call label="Incolla come link" name="Paste As Link"/> + <menu_item_call label="Rimuovi link" name="Remove Link"/> <menu_item_call label="Cancella" name="Delete"/> <menu_item_call label="Elimina la cartella di sistema" name="Delete System Folder"/> <menu_item_call label="Inizia la conferenza chat" name="Conference Chat Folder"/> diff --git a/indra/newview/skins/default/xui/it/menu_login.xml b/indra/newview/skins/default/xui/it/menu_login.xml index b0edeb3618..904b819198 100644 --- a/indra/newview/skins/default/xui/it/menu_login.xml +++ b/indra/newview/skins/default/xui/it/menu_login.xml @@ -6,6 +6,7 @@ </menu> <menu label="Aiuto" name="Help"> <menu_item_call label="Aiuto di [SECOND_LIFE]" name="Second Life Help"/> + <menu_item_call label="Informazioni su [APP_NAME]" name="About Second Life"/> </menu> <menu_item_check label="Mostra menu Debug" name="Show Debug Menu"/> <menu label="Debug" name="Debug"> diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index 8556ac7da0..a5923ac42b 100644 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -30,7 +30,7 @@ <menu_item_check label="Mappa del mondo" name="World Map"/> <menu_item_call label="Istantanea" name="Take Snapshot"/> <menu_item_call label="Crea punto di riferimento per questo luogo" name="Create Landmark Here"/> - <menu label="Profilo del posto" name="Land"> + <menu label="Profilo del luogo" name="Land"> <menu_item_call label="Profilo del luogo" name="Place Profile"/> <menu_item_call label="Informazioni sui terreni" name="About Land"/> <menu_item_call label="Regione/proprietà immobiliare" name="Region/Estate"/> @@ -64,7 +64,7 @@ <menu_item_call label="Strumento Ingrandisci" name="Focus"/> <menu_item_call label="Strumento Movimento" name="Move"/> <menu_item_call label="Strumento Modifica" name="Edit"/> - <menu_item_call label="Crea strumento" name="Create"/> + <menu_item_call label="Strumento Crea" name="Create"/> <menu_item_call label="Strumento Terreno" name="Land"/> </menu> <menu_item_call label="Collegamento" name="Link"/> @@ -182,7 +182,7 @@ <menu_item_call label="Strumento Ingrandisci" name="Focus"/> <menu_item_call label="Strumento Movimento" name="Move"/> <menu_item_call label="Strumento Modifica" name="Edit"/> - <menu_item_call label="Crea strumento" name="Create"/> + <menu_item_call label="Strumento Crea" name="Create"/> <menu_item_call label="Strumento Terreno" name="Land"/> </menu> <menu_item_call label="Zoom avanti" name="Zoom In"/> diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml index 0ca404d06b..4739e5cce9 100644 --- a/indra/newview/skins/default/xui/it/notifications.xml +++ b/indra/newview/skins/default/xui/it/notifications.xml @@ -341,7 +341,7 @@ Non ci sono rimborsi per la tariffa pagata. <notification name="DeleteMedia"> Hai selezionato la cancellazione del media associato a questa faccia. Vuoi continuare? - <usetemplate ignoretext="Conferma prima di eliminare elemnti multimediali dall'oggetto" name="okcancelignore" notext="No" yestext="Sì"/> + <usetemplate ignoretext="Conferma prima di eliminare elementi multimediali dall'oggetto" name="okcancelignore" notext="No" yestext="Sì"/> </notification> <notification name="ClassifiedSave"> Salva le modifiche all'annuncio [NAME]? @@ -625,7 +625,7 @@ Attese [VALIDS] Riprova più tardi. </notification> <notification name="LandmarkCreated"> - Hai aggiunto "[LANDMARK_NAME]" alla tua [FOLDER_NAME] cartella. + Hai aggiunto "[LANDMARK_NAME]" alla tua cartella [FOLDER_NAME]. </notification> <notification name="LandmarkAlreadyExists"> Hai già il punto di riferimento di questo luogo. @@ -1603,11 +1603,11 @@ Pubblica questo annuncio adesso per [AMOUNT]L$? <usetemplate name="okcancelbuttons" notext="Annulla" yestext="OK"/> </notification> <notification name="SetClassifiedMature"> - Queste inserzioni includono contenuto Mature? + Queste inserzioni includono contenuti di tipo Moderato? <usetemplate canceltext="Annulla" name="yesnocancelbuttons" notext="No" yestext="Si"/> </notification> <notification name="SetGroupMature"> - Questo gruppo include contenuto Mature? + Questo gruppo include contenuti di tipo Moderato? <usetemplate canceltext="Annulla" name="yesnocancelbuttons" notext="No" yestext="Si"/> </notification> <notification label="Conferma il riavvio" name="ConfirmRestart"> @@ -1622,7 +1622,7 @@ Pubblica questo annuncio adesso per [AMOUNT]L$? <button name="Cancel" text="Annulla"/> </form> </notification> - <notification label="Cambiato il contenuto Mature" name="RegionMaturityChange"> + <notification label="Cambiato il contenuto Moderato" name="RegionMaturityChange"> La classificazione di questa regione è stata aggiornata. Un periodo di tempo è necessario prima che la modifica venga integrata nella mappa. @@ -2092,7 +2092,7 @@ Prova a selezionare una parte di terreno più piccola. Alcuni termini della ricerca sono stati esclusi a causa delle restrizioni di contenuto come esposto negli Standard della comunità . </notification> <notification name="NoContentToSearch"> - Seleziona almeno un tipo di contenuto per la ricerca (PG, Mature, o Adult). + Seleziona almeno un tipo di contenuto per la ricerca (Generale, Moderato o Adulti). </notification> <notification name="GroupVote"> [NAME] ha proposto di votare su: diff --git a/indra/newview/skins/default/xui/it/panel_group_general.xml b/indra/newview/skins/default/xui/it/panel_group_general.xml index 08a5153c73..49baa73811 100644 --- a/indra/newview/skins/default/xui/it/panel_group_general.xml +++ b/indra/newview/skins/default/xui/it/panel_group_general.xml @@ -46,12 +46,12 @@ Muovi il tuo mouse sopra le opzioni per maggiore aiuto. <check_box label="Chiunque può aderire" name="open_enrollement" tool_tip="Imposta se questo gruppo permette ai nuovi membri di aderire senza essere invitati."/> <check_box label="Quota di adesione" name="check_enrollment_fee" tool_tip="Imposta se richiedere una tassa d'iscrizione per aderire al gruppo"/> <spinner label="L$" left_delta="136" name="spin_enrollment_fee" tool_tip="I nuovi soci devono pagare questa tassa d'iscrizione quando è selezionata." width="60"/> - <combo_box name="group_mature_check" tool_tip="Imposta se le informazioni sul tuo gruppo sono da considerarsi Mature."> + <combo_box name="group_mature_check" tool_tip="Imposta se le informazioni sul tuo gruppo sono da considerarsi di tipo Moderato."> <combo_item name="select_mature"> - Seleziona categoria di accesso - </combo_item> - <combo_box.item label="Contenuto Mature" name="mature"/> - <combo_box.item label="Contenuto PG" name="pg"/> + <combo_box.item label="Contenuti di tipo Moderato" name="mature"/> + <combo_box.item label="Contenuti di tipo Generale" name="pg"/> </combo_box> <check_box initial_value="true" label="Mostra nella ricerca" name="show_in_group_list" tool_tip="Permetti alle persone di vedere questo gruppo nei risultati della ricerca"/> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_landmark_info.xml b/indra/newview/skins/default/xui/it/panel_landmark_info.xml index 4af59605c1..b4c5ab01bc 100644 --- a/indra/newview/skins/default/xui/it/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/it/panel_landmark_info.xml @@ -19,7 +19,7 @@ [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> <button name="back_btn" tool_tip="Indietro"/> - <text name="title" value="Profilo del posto"/> + <text name="title" value="Profilo del luogo"/> <scroll_container name="place_scroll"> <panel name="scrolling_panel"> <text name="maturity_value" value="sconosciuto"/> diff --git a/indra/newview/skins/default/xui/it/panel_nearby_media.xml b/indra/newview/skins/default/xui/it/panel_nearby_media.xml index 649b772424..01e21d520a 100644 --- a/indra/newview/skins/default/xui/it/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/it/panel_nearby_media.xml @@ -16,7 +16,7 @@ (riproduzione) </string> <panel name="minimized_controls"> - <button label="Interrompi tutto" name="all_nearby_media_disable_btn" tool_tip="Spegni tutti i media nei dintorni"/> + <button label="Spegni" name="all_nearby_media_disable_btn" tool_tip="Spegni tutti i media nei dintorni"/> <button label="Accendi tutto" name="all_nearby_media_enable_btn" tool_tip="Accendi tutti i media nei dintorni"/> <button name="open_prefs_btn" tool_tip="Accedi alle preferenze del media"/> <button label="Più >>" label_selected="Meno <<" name="more_btn" tool_tip="Opzioni avanzate"/> diff --git a/indra/newview/skins/default/xui/it/panel_place_profile.xml b/indra/newview/skins/default/xui/it/panel_place_profile.xml index 9a38909d47..eace6c89ce 100644 --- a/indra/newview/skins/default/xui/it/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/it/panel_place_profile.xml @@ -5,7 +5,7 @@ <string name="anyone" value="Chiunque"/> <string name="available" value="disponibile"/> <string name="allocated" value="assegnato"/> - <string name="title_place" value="Profilo del posto"/> + <string name="title_place" value="Profilo del luogo"/> <string name="title_teleport_history" value="Cronologia Teleport"/> <string name="not_available" value="(non pert.)"/> <string name="unknown" value="(sconosciuto)"/> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_general.xml b/indra/newview/skins/default/xui/it/panel_preferences_general.xml index 6bf857366b..e8c826609c 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_general.xml @@ -20,20 +20,20 @@ (Richiede il riavvio) </text> <text name="maturity_desired_prompt"> - Voglio accedere al contenuto di tipo: + Voglio accedere ai contenuti di tipo: </text> <text name="maturity_desired_textbox"/> <combo_box name="maturity_desired_combobox"> - <combo_box.item label="PG, Mature e Adult" name="Desired_Adult"/> - <combo_box.item label="PG e Mature" name="Desired_Mature"/> - <combo_box.item label="PG" name="Desired_PG"/> + <combo_box.item label="Generale, Moderato e Adulti" name="Desired_Adult"/> + <combo_box.item label="Generale e Moderato" name="Desired_Mature"/> + <combo_box.item label="Generale" name="Desired_PG"/> </combo_box> <text name="start_location_textbox"> Luogo di partenza: </text> <combo_box name="start_location_combo"> - <combo_box.item label="Ultimo posto visitato" name="MyLastLocation" tool_tip="Vai nell'ultimo posto visitato di default quando fai login."/> - <combo_box.item label="Casa mia" name="MyHome" tool_tip="Vai a casa di default quando fai login"/> + <combo_box.item label="Ultimo luogo visitato" name="MyLastLocation" tool_tip="Vai automaticamente all'ultimo luogo visitato quando effettui l'accesso."/> + <combo_box.item label="Casa mia" name="MyHome" tool_tip="Vai automaticamente a casa quando effettui l'accesso"/> </combo_box> <check_box initial_value="true" label="Mostra con il login" name="show_location_checkbox"/> <text name="name_tags_textbox"> diff --git a/indra/newview/skins/default/xui/it/panel_region_general.xml b/indra/newview/skins/default/xui/it/panel_region_general.xml index 7d8b346c17..6ca5dd878e 100644 --- a/indra/newview/skins/default/xui/it/panel_region_general.xml +++ b/indra/newview/skins/default/xui/it/panel_region_general.xml @@ -30,10 +30,10 @@ <text label="Maturità " name="access_text" width="120"> Categoria di accesso: </text> - <icons_combo_box label="Mature" left="126" name="access_combo" width="74"> - <icons_combo_box.item label="Adult" name="Adult" value="42"/> - <icons_combo_box.item label="Mature" name="Mature" value="21"/> - <icons_combo_box.item label="PG" name="PG" value="13"/> + <icons_combo_box label="Moderato" left="126" name="access_combo" width="74"> + <icons_combo_box.item label="Adulti" name="Adult" value="42"/> + <icons_combo_box.item label="Moderato" name="Mature" value="21"/> + <icons_combo_box.item label="Generale" name="PG" value="13"/> </icons_combo_box> <button label="Applica" name="apply_btn"/> <button label="Teleport a casa un residente..." name="kick_btn"/> diff --git a/indra/newview/skins/default/xui/it/panel_region_general_layout.xml b/indra/newview/skins/default/xui/it/panel_region_general_layout.xml index 232cd0c387..4cf31f4b6e 100644 --- a/indra/newview/skins/default/xui/it/panel_region_general_layout.xml +++ b/indra/newview/skins/default/xui/it/panel_region_general_layout.xml @@ -31,7 +31,7 @@ Categoria: </text> <combo_box label="Moderato" name="access_combo"> - <combo_box.item label="Adulto" name="Adult"/> + <combo_box.item label="Adulti" name="Adult"/> <combo_box.item label="Moderato" name="Mature"/> <combo_box.item label="Generale" name="PG"/> </combo_box> diff --git a/indra/newview/skins/default/xui/it/panel_stand_stop_flying.xml b/indra/newview/skins/default/xui/it/panel_stand_stop_flying.xml index 198ebf4b2a..e4ff7019ec 100644 --- a/indra/newview/skins/default/xui/it/panel_stand_stop_flying.xml +++ b/indra/newview/skins/default/xui/it/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="Stai in piedi" name="stand_btn" tool_tip="Clicca qui per alzarti."/> + <button label="Alzati" name="stand_btn" tool_tip="Clicca qui per alzarti."/> <button label="Ferma il volo" name="stop_fly_btn" tool_tip="Ferma il volo"/> </panel> diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index a496d4c8d6..9a6c648c8e 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -703,13 +703,13 @@ Controllare la tua fotocamera </string> <string name="SIM_ACCESS_PG"> - PG + Generale </string> <string name="SIM_ACCESS_MATURE"> - Mature + Moderato </string> <string name="SIM_ACCESS_ADULT"> - Adult + Adulti </string> <string name="SIM_ACCESS_DOWN"> Offline diff --git a/indra/newview/skins/default/xui/ja/floater_about.xml b/indra/newview/skins/default/xui/ja/floater_about.xml index 31cfb5c339..d2765eb0c8 100644 --- a/indra/newview/skins/default/xui/ja/floater_about.xml +++ b/indra/newview/skins/default/xui/ja/floater_about.xml @@ -29,7 +29,7 @@ libcurl ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼š [LIBCURL_VERSION] J2C デコーダãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼š [J2C_VERSION] オーディオドライãƒãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼š [AUDIO_DRIVER_VERSION] Qt Webkit ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼š [QT_WEBKIT_VERSION] -Vivox ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼š [VIVOX_VERSION] +ボイスサーãƒãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼š [VOICE_VERSION] </floater.string> <floater.string name="none"> (ãªã—) 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 d23ab3565b..2f5065c05f 100644 --- a/indra/newview/skins/default/xui/ja/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml @@ -62,6 +62,9 @@ <panel.string name="no_selection_text"> 区画ãŒé¸æŠžã•ã‚Œã¦ã„ã¾ã›ã‚“。 </panel.string> + <panel.string name="time_stamp_template"> + [year,datetime,local] [mth,datetime,local] [day,datetime,local] [wkday,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] + </panel.string> <text name="Name:"> åå‰ï¼š </text> @@ -308,10 +311,10 @@ (ãªã—) </panel.string> <panel.string name="push_restrict_text"> - ãƒ—ãƒƒã‚·ãƒ³ã‚°ã‚’åˆ¶é™ + プッシュç¦æ¢ </panel.string> <panel.string name="push_restrict_region_text"> - ãƒ—ãƒƒã‚·ãƒ³ã‚°ã‚’åˆ¶é™ ï¼ˆåœ°åŸŸè¨å®šå„ªå…ˆï¼‰ + プッシュç¦æ¢ (地域è¨å®šå„ªå…ˆï¼‰ </panel.string> <text name="allow_label"> ä»–ã®ä½äººã¸ã®è¨±å¯ï¼š @@ -337,7 +340,7 @@ 土地オプション: </text> <check_box label="安全(ダメージãªã—)" name="check safe" tool_tip="ãƒã‚§ãƒƒã‚¯ã‚’入れるã¨ã“ã®åœŸåœ°ã§ã®ãƒ€ãƒ¡ãƒ¼ã‚¸ã‚³ãƒ³ãƒãƒƒãƒˆãŒç„¡åŠ¹ã«ãªã‚Šã€ã€Œå®‰å…¨ã€ã«è¨å®šã•ã‚Œã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ã‚’外ã™ã¨ãƒ€ãƒ¡ãƒ¼ã‚¸ã‚³ãƒ³ãƒãƒƒãƒˆãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚"/> - <check_box label="プッシングを制é™" name="PushRestrictCheck" 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"/> @@ -355,7 +358,7 @@ <combo_box.item label="ãã®ä»–" name="item12"/> </combo_box> <combo_box name="land category"> - <combo_box.item label="全カテゴリー" name="item0"/> + <combo_box.item label="全カテゴリ" name="item0"/> <combo_box.item label="Linden 所在地" name="item1"/> <combo_box.item label="アート&カルãƒãƒ£ãƒ¼" name="item3"/> <combo_box.item label="ビジãƒã‚¹" name="item4"/> @@ -379,7 +382,7 @@ <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="テレãƒãƒ¼ãƒˆçµŒè·¯ -- ã‚ãªãŸã®åœŸåœ°ã¸ã®ãƒ†ãƒ¬ãƒãƒ¼ãƒˆçµŒè·¯ã‚’é¸æŠž"> <combo_box.item label="ä¸å¯" name="Blocked"/> diff --git a/indra/newview/skins/default/xui/ja/floater_avatar_textures.xml b/indra/newview/skins/default/xui/ja/floater_avatar_textures.xml index 0ea913e66a..5c23b77498 100644 --- a/indra/newview/skins/default/xui/ja/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/ja/floater_avatar_textures.xml @@ -3,44 +3,48 @@ <floater.string name="InvalidAvatar"> 無効ãªã‚¢ãƒã‚¿ãƒ¼ </floater.string> - <text name="label" width="100"> - ベークドテクスãƒãƒ£ - </text> - <text name="composite_label" width="128"> - åˆæˆãƒ†ã‚¯ã‚¹ãƒãƒ£ - </text> - <button label="テクスãƒãƒ£ID一覧をコンソールã«æ›¸ã込む" label_selected="æ¨ã¦ã‚‹" name="Dump" width="200"/> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> - <texture_picker label="髪" name="hair-baked"/> - <texture_picker label="髪" name="hair_grain"/> - <texture_picker label="髪ã®ã‚¢ãƒ«ãƒ•ã‚¡" name="hair_alpha"/> - <texture_picker label="é " name="head-baked"/> - <texture_picker label="メイクアップ" name="head_bodypaint"/> - <texture_picker label="é 部ã®ã‚¢ãƒ«ãƒ•ã‚¡" name="head_alpha"/> - <texture_picker label="é 部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="head_tattoo"/> - <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_bodypaint"/> - <texture_picker label="下ç€ã‚·ãƒ£ãƒ„" name="upper_undershirt"/> - <texture_picker label="手袋" name="upper_gloves"/> - <texture_picker label="シャツ" name="upper_shirt"/> - <texture_picker label="上ç€" name="upper_jacket"/> - <texture_picker label="アルファ(上)" name="upper_alpha"/> - <texture_picker label="上部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="upper_tattoo"/> - <texture_picker label="下åŠèº«" name="lower-baked"/> - <texture_picker label="下åŠèº«ã®ãƒœãƒ‡ã‚£ãƒšã‚¤ãƒ³ãƒˆ" name="lower_bodypaint"/> - <texture_picker label="下ç€ãƒ‘ンツ" name="lower_underpants"/> - <texture_picker label="é´ä¸‹" name="lower_socks"/> - <texture_picker label="é´" name="lower_shoes"/> - <texture_picker label="パンツ" name="lower_pants"/> - <texture_picker label="ジャケット" name="lower_jacket"/> - <texture_picker label="アルファ(下)" name="lower_alpha"/> - <texture_picker label="下部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="lower_tattoo"/> - <texture_picker label="スカート" name="skirt-baked"/> - <texture_picker label="スカート" name="skirt"/> + <text name="label"> + ベークド +テクスãƒãƒ£ + </text> + <text name="composite_label"> + åˆæˆ +テクスãƒãƒ£ + </text> + <button label="ID をコンソールã«ãƒ€ãƒ³ãƒ—" label_selected="ダンプ" name="Dump"/> + <panel name="scroll_content_panel"> + <texture_picker label="髪" name="hair-baked"/> + <texture_picker label="髪" name="hair_grain"/> + <texture_picker label="髪ã®ã‚¢ãƒ«ãƒ•ã‚¡" name="hair_alpha"/> + <texture_picker label="é " name="head-baked"/> + <texture_picker label="メイクアップ" name="head_bodypaint"/> + <texture_picker label="é 部ã®ã‚¢ãƒ«ãƒ•ã‚¡" name="head_alpha"/> + <texture_picker label="é 部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="head_tattoo"/> + <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_bodypaint"/> + <texture_picker label="下ç€ã‚·ãƒ£ãƒ„" name="upper_undershirt"/> + <texture_picker label="手袋" name="upper_gloves"/> + <texture_picker label="シャツ" name="upper_shirt"/> + <texture_picker label="上ç€" name="upper_jacket"/> + <texture_picker label="アルファ(上)" name="upper_alpha"/> + <texture_picker label="上部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="upper_tattoo"/> + <texture_picker label="下åŠèº«" name="lower-baked"/> + <texture_picker label="ボディペイント(下)" name="lower_bodypaint"/> + <texture_picker label="下ç€ãƒ‘ンツ" name="lower_underpants"/> + <texture_picker label="é´ä¸‹" name="lower_socks"/> + <texture_picker label="é´" name="lower_shoes"/> + <texture_picker label="パンツ" name="lower_pants"/> + <texture_picker label="ジャケット" name="lower_jacket"/> + <texture_picker label="アルファ(下)" name="lower_alpha"/> + <texture_picker label="下部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="lower_tattoo"/> + <texture_picker label="スカート" name="skirt-baked"/> + <texture_picker label="スカート" name="skirt"/> + </panel> </panel> </scroll_container> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/ja/floater_buy_currency_html.xml new file mode 100644 index 0000000000..37fd6826e5 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/floater_buy_currency_html.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_buy_currency_html" title="通貨ã®è³¼å…¥"/> diff --git a/indra/newview/skins/default/xui/ja/floater_god_tools.xml b/indra/newview/skins/default/xui/ja/floater_god_tools.xml index ffea9474b0..9e5d473db7 100644 --- a/indra/newview/skins/default/xui/ja/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/ja/floater_god_tools.xml @@ -14,7 +14,7 @@ <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="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="ç¾åœ¨ã®åœ°å½¢ã‚’デフォルトã«ç½®æ›ã—ã¾ã™ã€‚"/> diff --git a/indra/newview/skins/default/xui/ja/floater_joystick.xml b/indra/newview/skins/default/xui/ja/floater_joystick.xml index 65eeebe4ed..daa480ef5a 100644 --- a/indra/newview/skins/default/xui/ja/floater_joystick.xml +++ b/indra/newview/skins/default/xui/ja/floater_joystick.xml @@ -89,7 +89,7 @@ <spinner left="205" name="BuildAxisDeadZone3" width="50"/> <spinner left="275" name="FlycamAxisDeadZone3" width="50"/> <text name="Feathering"> - 羽毛 + 感度調整 </text> <slider label="" left="126" name="AvatarFeathering" width="67"/> <slider label="" left="196" name="BuildFeathering" width="67"/> diff --git a/indra/newview/skins/default/xui/ja/floater_map.xml b/indra/newview/skins/default/xui/ja/floater_map.xml index 8d920a3c3f..79e211c31e 100644 --- a/indra/newview/skins/default/xui/ja/floater_map.xml +++ b/indra/newview/skins/default/xui/ja/floater_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Map" title="ミニマップ"> +<floater name="Map" title=""> <floater.string name="mini_map_north"> 北 </floater.string> diff --git a/indra/newview/skins/default/xui/ja/floater_moveview.xml b/indra/newview/skins/default/xui/ja/floater_moveview.xml index 20aec48541..57ab32f486 100644 --- a/indra/newview/skins/default/xui/ja/floater_moveview.xml +++ b/indra/newview/skins/default/xui/ja/floater_moveview.xml @@ -6,18 +6,48 @@ <string name="walk_back_tooltip"> 後ã‚ã«æ©ã(下矢å°ã‹ S を押ã™ï¼‰ </string> + <string name="walk_left_tooltip"> + å·¦ã«æ°´å¹³ç§»å‹•ï¼ˆShift + 左矢å°ã‹ A を押ã™ï¼‰ + </string> + <string name="walk_right_tooltip"> + å³ã«æ°´å¹³ç§»å‹•ï¼ˆShift + å³çŸ¢å°ã‹ D を押ã™ï¼‰ + </string> <string name="run_forward_tooltip"> å‰ã«èµ°ã‚‹ï¼ˆä¸ŠçŸ¢å°ã‹ W を押ã™ï¼‰ </string> <string name="run_back_tooltip"> 後ã‚ã«èµ°ã‚‹ï¼ˆä¸‹çŸ¢å°ã‹ S を押ã™ï¼‰ </string> + <string name="run_left_tooltip"> + å·¦ã«æ°´å¹³ç§»å‹•ï¼ˆShift + 左矢å°ã‹ A を押ã™ï¼‰ + </string> + <string name="run_right_tooltip"> + å³ã«æ°´å¹³ç§»å‹•ï¼ˆShift + å³çŸ¢å°ã‹ D を押ã™ï¼‰ + </string> <string name="fly_forward_tooltip"> å‰ã«é£›ã¶ï¼ˆä¸ŠçŸ¢å°ã‹ W を押ã™ï¼‰ </string> <string name="fly_back_tooltip"> 後ã‚ã«é£›ã¶ï¼ˆä¸‹çŸ¢å°ã‹ S を押ã™ï¼‰ </string> + <string name="fly_left_tooltip"> + å·¦ã«æ°´å¹³ç§»å‹•ï¼ˆShift + 左矢å°ã‹ A を押ã™ï¼‰ + </string> + <string name="fly_right_tooltip"> + å³ã«æ°´å¹³ç§»å‹•ï¼ˆShift + å³çŸ¢å°ã‹ D を押ã™ï¼‰ + </string> + <string name="fly_up_tooltip"> + 上ã«ç§»å‹•ï¼ˆE を押ã™ï¼‰ + </string> + <string name="fly_down_tooltip"> + 下ã«ç§»å‹•ï¼ˆC を押ã™ï¼‰ + </string> + <string name="jump_tooltip"> + ジャンプ(E を押ã™ï¼‰ + </string> + <string name="crouch_tooltip"> + ã‹ãŒã‚€ï¼ˆC を押ã™ï¼‰ + </string> <string name="walk_title"> æ©ã </string> @@ -28,10 +58,12 @@ 飛㶠</string> <panel name="panel_actions"> + <button label="" label_selected="" name="move up btn" tool_tip="上ã«ç§»å‹•ï¼ˆE を押ã™ï¼‰"/> <button label="" label_selected="" name="turn left btn" tool_tip="左をå‘ã(左矢å°ã‹ A を押ã™ï¼‰"/> + <joystick_slide name="move left btn" tool_tip="å·¦ã«æ©ã(Shift + 左矢å°ã‹ A を押ã™ï¼‰"/> + <button label="" label_selected="" name="move down btn" tool_tip="下ã«ç§»å‹•ï¼ˆC を押ã™ï¼‰"/> <button label="" label_selected="" name="turn right btn" tool_tip="å³ã‚’å‘ã(å³çŸ¢å°ã‹ D を押ã™ï¼‰"/> - <button label="" label_selected="" name="move up btn" tool_tip="飛ã¶ãƒ»E を押ã™"/> - <button label="" label_selected="" name="move down btn" tool_tip="ç€åœ°ãƒ»C を押ã™"/> + <joystick_slide name="move right btn" tool_tip="å³ã«æ©ã(Shift + å³çŸ¢å°ã‹ D を押ã™ï¼‰"/> <joystick_turn name="forward btn" tool_tip="å‰ã«é€²ã‚€ï¼ˆä¸ŠçŸ¢å°ã‹ W を押ã™ï¼‰"/> <joystick_turn name="backward btn" tool_tip="後ã‚ã«æ©ã(下矢å°ã‹ S を押ã™ï¼‰"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/floater_postcard.xml b/indra/newview/skins/default/xui/ja/floater_postcard.xml index 5a2b047fe0..9d9b59fa51 100644 --- a/indra/newview/skins/default/xui/ja/floater_postcard.xml +++ b/indra/newview/skins/default/xui/ja/floater_postcard.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="スナップショットをメール"> +<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"> diff --git a/indra/newview/skins/default/xui/ja/floater_preview_notecard.xml b/indra/newview/skins/default/xui/ja/floater_preview_notecard.xml index 6e6e04c7d8..ae8ae9f7b5 100644 --- a/indra/newview/skins/default/xui/ja/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/ja/floater_preview_notecard.xml @@ -9,9 +9,6 @@ <floater.string name="Title"> ノートカード: [NAME] </floater.string> - <floater.string label="ä¿å˜" label_selected="ä¿å˜" name="Save"> - ä¿å˜ - </floater.string> <text name="desc txt"> 説明: </text> @@ -19,4 +16,5 @@ ãƒãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ï¼Žï¼Žï¼Ž </text_editor> <button label="ä¿å˜" label_selected="ä¿å˜" name="Save"/> + <button label="削除" label_selected="削除" name="Delete"/> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml index a8261a7493..d095dee974 100644 --- a/indra/newview/skins/default/xui/ja/floater_tools.xml +++ b/indra/newview/skins/default/xui/ja/floater_tools.xml @@ -49,7 +49,7 @@ </text> <radio_group name="focus_radio_group"> <radio_item label="ズーム" name="radio zoom"/> - <radio_item label="軌跡(Ctrl)" name="radio orbit"/> + <radio_item label="旋回(Ctrl)" name="radio orbit"/> <radio_item label="水平・垂直移動 (Ctrl + Shift)" name="radio pan"/> </radio_group> <radio_group name="move_radio_group"> @@ -67,8 +67,11 @@ <text name="RenderingCost" tool_tip="ã“ã®ã‚ªãƒ–ジェクトã«ã‹ã‹ã‚‹ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã‚³ã‚¹ãƒˆã‚’表示"> þ: [COUNT] </text> - <check_box label="両å´ã‚’引伸ã°ã™" left="116" name="checkbox uniform"/> - <check_box initial_value="true" label="テクスãƒãƒ£ã‚’引伸ã°ã™" name="checkbox stretch textures"/> + <check_box label="" left="116" name="checkbox uniform"/> + <text label="両å´ã‚’延ã°ã™" name="checkbox uniform label"> + 両å´ã‚’延ã°ã™ + </text> + <check_box initial_value="true" label="テクスãƒãƒ£ã‚’引ã延ã°ã™" name="checkbox stretch textures"/> <check_box initial_value="true" label="グリッドã«ã‚¹ãƒŠãƒƒãƒ—" left_delta="27" name="checkbox snap to grid"/> <combo_box left_delta="60" name="combobox grid mode" tool_tip="オブジェクトã®é…ç½®ã«ä½¿ã†ã‚°ãƒªãƒƒãƒ‰ãƒ«ãƒ¼ãƒ©ã‚’é¸æŠžã—ã¾ã™" width="76"> <combo_box.item label="インワールドグリッド" name="World"/> @@ -84,7 +87,7 @@ <button label="" label_selected="" name="ToolHemiCylinder" tool_tip="åŠå††æŸ±"/> <button label="" label_selected="" name="ToolCone" tool_tip="円éŒ"/> <button label="" label_selected="" name="ToolHemiCone" tool_tip="åŠå††éŒ"/> - <button label="" label_selected="" name="ToolSphere" tool_tip="çƒå½¢"/> + <button label="" label_selected="" name="ToolSphere" tool_tip="çƒä½“"/> <button label="" label_selected="" name="ToolHemiSphere" tool_tip="åŠçƒ"/> <button label="" label_selected="" name="ToolTorus" tool_tip="トーラス"/> <button label="" label_selected="" name="ToolTube" tool_tip="ãƒãƒ¥ãƒ¼ãƒ–"/> @@ -264,7 +267,7 @@ <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="Sphere"/> <combo_box.item label="トーラス" name="Torus"/> <combo_box.item label="ãƒãƒ¥ãƒ¼ãƒ–" name="Tube"/> <combo_box.item label="リング" name="Ring"/> @@ -347,7 +350,7 @@ </text> <combo_box name="sculpt type control"> <combo_box.item label="(ãªã—)" name="None"/> - <combo_box.item label="çƒå½¢" name="Sphere"/> + <combo_box.item label="çƒä½“" name="Sphere"/> <combo_box.item label="トーラス" name="Torus"/> <combo_box.item label="å¹³é¢" name="Plane"/> <combo_box.item label="シリンダー" name="Cylinder"/> diff --git a/indra/newview/skins/default/xui/ja/floater_world_map.xml b/indra/newview/skins/default/xui/ja/floater_world_map.xml index 0e489be9a8..ce9e7d0777 100644 --- a/indra/newview/skins/default/xui/ja/floater_world_map.xml +++ b/indra/newview/skins/default/xui/ja/floater_world_map.xml @@ -23,7 +23,7 @@ 土地販売 </text> <text name="by_owner_label"> - 所有者ã«ã¦ + 所有者ã®è²©å£² </text> <text name="auction_label"> 土地オークション @@ -68,7 +68,7 @@ <scroll_list.columns label="" name="sim_name"/> </scroll_list> <button label="テレãƒãƒ¼ãƒˆ" label_selected="テレãƒãƒ¼ãƒˆ" name="Teleport" tool_tip="é¸æŠžã—ãŸå ´æ‰€ã«ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã—ã¾ã™"/> - <button label="SLurl をコピー" name="copy_slurl" tool_tip="ç¾åœ¨åœ°ã® SLurl をコピーã—㦠Web ã§ä½¿ç”¨ã—ã¾ã™ã€‚"/> + <button label="SLurl をコピー" name="copy_slurl" tool_tip="ç¾åœ¨åœ°ã® SLurl をコピーã—㦠Web ã§ä½¿ç”¨ã—ã¾ã™"/> <button label="é¸æŠžã‚’表示ã™ã‚‹" label_selected="目的地を表示" name="Show Destination" tool_tip="é¸æŠžã—ãŸå ´æ‰€ã‚’地図ã®ä¸å¿ƒã«è¡¨ç¤ºã—ã¾ã™"/> </panel> <panel name="layout_panel_5"> diff --git a/indra/newview/skins/default/xui/ja/inspect_avatar.xml b/indra/newview/skins/default/xui/ja/inspect_avatar.xml index aeac0a8328..fb4937242b 100644 --- a/indra/newview/skins/default/xui/ja/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/ja/inspect_avatar.xml @@ -20,7 +20,7 @@ <button label="IM" name="im_btn"/> <button label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="view_profile_btn"/> <panel name="moderator_panel"> - <button label="ボイスを無効ã«ã™ã‚‹" name="disable_voice"/> - <button label="ボイスを有効ã«ã™ã‚‹" name="enable_voice"/> + <button label="ボイスを無効" name="disable_voice"/> + <button label="ボイスを有効" name="enable_voice"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/ja/menu_attachment_self.xml b/indra/newview/skins/default/xui/ja/menu_attachment_self.xml index 72c91da479..48200cb53f 100644 --- a/indra/newview/skins/default/xui/ja/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/ja/menu_attachment_self.xml @@ -5,7 +5,7 @@ <menu_item_call label="å–り外ã™" name="Detach"/> <menu_item_call label="下ã«è½ã¨ã™" name="Drop"/> <menu_item_call label="ç«‹ã¡ä¸ŠãŒã‚‹" name="Stand Up"/> - <menu_item_call label="容姿" name="Appearance..."/> + <menu_item_call label="アウトフィットを変更" name="Change Outfit"/> <menu_item_call label="フレンド" name="Friends..."/> <menu_item_call label="グループ" name="Groups..."/> <menu_item_call label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/ja/menu_avatar_self.xml b/indra/newview/skins/default/xui/ja/menu_avatar_self.xml index c856cdccb9..6899a819b8 100644 --- a/indra/newview/skins/default/xui/ja/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/ja/menu_avatar_self.xml @@ -20,7 +20,9 @@ <context_menu label="å–り外㙠▶" name="Object Detach"/> <menu_item_call label="ã™ã¹ã¦å–り外ã™" name="Detach All"/> </context_menu> - <menu_item_call label="容姿" name="Appearance..."/> + <menu_item_call label="アウトフィットを変更" name="Chenge 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..."/> diff --git a/indra/newview/skins/default/xui/ja/menu_bottomtray.xml b/indra/newview/skins/default/xui/ja/menu_bottomtray.xml index ea7ba1b741..0e69671f06 100644 --- a/indra/newview/skins/default/xui/ja/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/ja/menu_bottomtray.xml @@ -4,6 +4,11 @@ <menu_item_check label="移動ボタン" name="ShowMoveButton"/> <menu_item_check label="視界ボタン" name="ShowCameraButton"/> <menu_item_check label="スナップショットボタン" name="ShowSnapshotButton"/> + <menu_item_check label="サイドãƒãƒ¼ã®ãƒœã‚¿ãƒ³" name="ShowSidebarButton"/> + <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"/> diff --git a/indra/newview/skins/default/xui/ja/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/ja/menu_inspect_self_gear.xml index 8867e5ccd6..ee054673c5 100644 --- a/indra/newview/skins/default/xui/ja/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/ja/menu_inspect_self_gear.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <menu name="Gear Menu"> <menu_item_call label="ç«‹ã¡ä¸ŠãŒã‚‹" name="stand_up"/> - <menu_item_call label="容姿" name="my_appearance"/> + <menu_item_call label="アウトフィットを変更" name="change_outfit"/> <menu_item_call label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="my_profile"/> <menu_item_call label="フレンド" name="my_friends"/> <menu_item_call label="グループ" name="my_groups"/> diff --git a/indra/newview/skins/default/xui/ja/menu_inventory.xml b/indra/newview/skins/default/xui/ja/menu_inventory.xml index bfb5023cf7..452d0567da 100644 --- a/indra/newview/skins/default/xui/ja/menu_inventory.xml +++ b/indra/newview/skins/default/xui/ja/menu_inventory.xml @@ -54,6 +54,7 @@ <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="Open Original"/> <menu_item_call label="プãƒãƒ‘ティ" name="Properties"/> <menu_item_call label="åå‰ã‚’変更ã™ã‚‹" name="Rename"/> <menu_item_call label="UUID をコピーã™ã‚‹" name="Copy Asset UUID"/> diff --git a/indra/newview/skins/default/xui/ja/menu_participant_list.xml b/indra/newview/skins/default/xui/ja/menu_participant_list.xml index 3d0368245e..3ef83756cb 100644 --- a/indra/newview/skins/default/xui/ja/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/ja/menu_participant_list.xml @@ -10,12 +10,12 @@ <menu_item_call label="支払ã†" name="Pay"/> <menu_item_check label="人ã®ã‚¢ã‚¤ã‚³ãƒ³è¡¨ç¤º" name="View Icons"/> <menu_item_check label="ボイスをブãƒãƒƒã‚¯" name="Block/Unblock"/> - <menu_item_check label="æ–‡å—をブãƒãƒƒã‚¯ã™ã‚‹" name="MuteText"/> + <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="ModerateVoiceMuteOthers"/> <menu_item_call label="ã“ã®å‚åŠ è€…ã®ãƒŸãƒ¥ãƒ¼ãƒˆã‚’解除ã™ã‚‹" name="ModerateVoiceUnMuteSelected"/> - <menu_item_call label="ä»–ã®äººå…¨å“¡ã®ãƒŸãƒ¥ãƒ¼ãƒˆã‚’解除ã™ã‚‹" name="ModerateVoiceUnMuteOthers"/> + <menu_item_call label="全員をミュート" name="ModerateVoiceMute"/> + <menu_item_call label="全員ã®ãƒŸãƒ¥ãƒ¼ãƒˆè§£é™¤" name="ModerateVoiceUnmute"/> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index 760128408d..f6695d2d13 100644 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -7,7 +7,7 @@ </menu_item_call> <menu_item_call label="L$ ã®è³¼å…¥" name="Buy and Sell L$"/> <menu_item_call label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="Profile"/> - <menu_item_call label="容姿" name="Appearance"/> + <menu_item_call label="アウトフィットを変更" name="ChangeOutfit"/> <menu_item_check label="æŒã¡ç‰©" name="Inventory"/> <menu_item_check label="æŒã¡ç‰©" name="ShowSidetrayInventory"/> <menu_item_check label="ジェスãƒãƒ£ãƒ¼" name="Gestures"/> @@ -163,6 +163,7 @@ <menu_item_check label="フレã‚シブルオブジェクト" name="Flexible Objects"/> </menu> <menu_item_check label="マルãƒã‚¹ãƒ¬ãƒƒãƒ‰å‡¦ç†" name="Run Multiple Threads"/> + <menu_item_check label="Use Plugin Read Thread" name="Use Plugin Read Thread"/> <menu_item_call label="グループã‚ャッシュã®ã‚¯ãƒªã‚¢" name="ClearGroupCache"/> <menu_item_check label="マウスã®å¹³æ»‘化" name="Mouse Smoothing"/> <menu label="ショートカット" name="Shortcuts"> @@ -189,7 +190,6 @@ <menu_item_call label="ズームイン" name="Zoom In"/> <menu_item_call label="ズーム(デフォルト)" name="Zoom Default"/> <menu_item_call label="ズームアウト" name="Zoom Out"/> - <menu_item_call label="全画é¢è¡¨ç¤º" name="Toggle Fullscreen"/> </menu> <menu_item_call label="デãƒãƒƒã‚°è¨å®šã‚’表示ã™ã‚‹" name="Debug Settings"/> <menu_item_check label="開発メニューを表示ã™ã‚‹" name="Debug Mode"/> diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index ce3ac32568..5d162eb80f 100644 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -348,6 +348,9 @@ L$ ãŒä¸è¶³ã—ã¦ã„ã‚‹ã®ã§ã“ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å‚åŠ ã™ã‚‹ã“ã¨ãŒã§ãã </url> <usetemplate name="okcancelbuttons" notext="ã‚‚ã†ä¸€åº¦è©¦ã™" yestext="æ–°ã—ã„アカウントを作æˆ"/> </notification> + <notification name="InvalidCredentialFormat"> + 「ユーザーåã€æ¬„ã«ã‚¢ãƒã‚¿ãƒ¼ã®ãƒ•ã‚¡ãƒ¼ã‚¹ãƒˆãƒãƒ¼ãƒ ã¨ãƒ©ã‚¹ãƒˆãƒãƒ¼ãƒ 両方を入力ã—ã¦ã‹ã‚‰ãƒã‚°ã‚¤ãƒ³ã—ã¦ãã ã•ã„。 + </notification> <notification name="AddClassified"> クラシファイド広告ã¯ã€æ¤œç´¢ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¨ [http://secondlife.com/community/classifieds secondlife.com] ã®ã€Œã‚¯ãƒ©ã‚·ãƒ•ã‚¡ã‚¤ãƒ‰åºƒå‘Šã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«ä¸€é€±é–“掲載ã•ã‚Œã¾ã™ã€‚ 広告を記入ã—ãŸã‚‰ã€ã€ŒæŽ²è¼‰...ã€ã‚’クリックã—ã¦ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«è¿½åŠ ã—ã¦ãã ã•ã„。 @@ -635,6 +638,11 @@ L$ ãŒä¸è¶³ã—ã¦ã„ã‚‹ã®ã§ã“ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å‚åŠ ã™ã‚‹ã“ã¨ãŒã§ãã <notification name="CannotEncodeFile"> 次ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ãŒã§ãã¾ã›ã‚“: [FILE] </notification> + <notification name="CorruptedProtectedDataStore"> + ã‚ãªãŸã®ä¿è·ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’èªã¿ã¨ã‚‹ã“ã¨ãŒå‡ºæ¥ãªã„ãŸã‚リセットã•ã‚Œã¾ã™ã€‚ + ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¨å®šã‚’変更ã™ã‚‹ã¨èµ·ã“ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="CorruptResourceFile"> ç ´æã—ãŸãƒªã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ï¼š [FILE] </notification> @@ -1000,6 +1008,12 @@ L$ ã¯è¿”金ã•ã‚Œã¾ã›ã‚“。 金é¡ã‚’増やã—ã¦ãã ã•ã„。 </notification> + <notification name="ConfirmItemDeleteHasLinks"> + ã“ã“ã«ãƒªãƒ³ã‚¯ã•ã‚ŒãŸã‚¢ã‚¤ãƒ†ãƒ ãŒå°‘ãªãã¨ã‚‚1ã¤ã‚ã‚Šã¾ã™ã€‚ ã“ã®ã‚¢ã‚¤ãƒ†ãƒ を削除ã™ã‚‹ã¨ã“ã“ã«ãƒªãƒ³ã‚¯ã•ã‚ŒãŸã‚‚ã®ãŒæ©Ÿèƒ½ã—ãªããªã‚Šã¾ã™ã€‚ リンクを先ã«å‰Šé™¤ã™ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ + +ã“れらã®ã‚¢ã‚¤ãƒ†ãƒ を削除ã—ã¾ã™ã‹ï¼Ÿ + <usetemplate name="okcancelbuttons" notext="ã‚ャンセル" yestext="OK"/> + </notification> <notification name="ConfirmObjectDeleteLock"> é¸æŠžã—ãŸã‚¢ã‚¤ãƒ†ãƒ ã®ã†ã¡ã€å°‘ãªãã¨ã‚‚ 1 ã¤ãŒãƒãƒƒã‚¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ @@ -1157,6 +1171,42 @@ F1 ã‚ーを押ã—ã¦ãã ã•ã„。 ã‚ãªãŸã®æ±ºå®šã¯å¾Œã§å¤‰æ›´ã§ãã¾ã™ã€‚ <usetemplate name="okcancelbuttons" notext="女性" yestext="男性"/> </notification> + <notification name="CantTeleportToGrid"> + ç¾åœ¨ã®ã‚°ãƒªãƒƒãƒ‰ï¼ˆ[CURRENT_GRID])ã¨ã¯ã‚°ãƒªãƒƒãƒ‰ï¼ˆ[GRID])ãŒç•°ãªã‚‹ãŸã‚ã€[SLURL] ã«ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ ビューワを閉ã˜ã¦ã‹ã‚‰ã‚‚ã†ä¸€åº¦ãŠè©¦ã—ãã ã•ã„。 + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="GeneralCertificateError"> + サーãƒãƒ¼ã«æŽ¥ç¶šã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ +[REASON] + +サブジェクトå: [SUBJECT_NAME_STRING] +発行元: [ISSUER_NAME_STRING] +有効日: [VALID_FROM] +次ã®æ›´æ–°æ—¥ï¼š [VALID_TO] +MD5 フィンガープリント: [SHA1_DIGEST] +SHA1 フィンガープリント: [MD5_DIGEST] +ã‚ー使用法: [KEYUSAGE] +æ‹¡å¼µã‚ー使用法: [EXTENDEDKEYUSAGE] +サブジェクトã‚ーèªè˜åˆ¥å: [SUBJECTKEYIDENTIFIER] + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TrustCertificateError"> + ã“ã®ã‚µãƒ¼ãƒãƒ¼ã®èªè¨¼æ©Ÿé–¢ã¯ä¸æ˜Žã§ã™ã€‚ + +èªè¨¼æƒ…å ±ï¼š +サブジェクトå: [SUBJECT_NAME_STRING] +発行元: [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] 残高ä¸è¶³ã®ãŸã‚実行ä¸å¯ã§ã™ã€‚ </notification> @@ -1552,9 +1602,9 @@ F1 ã‚ーを押ã—ã¦ãã ã•ã„。 ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆåœ°åŸŸï¼‰ã¸ã¯å…¥ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 </notification> <notification name="RegionEntryAccessBlocked_Change"> - ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†è¨å®šã«ã‚ˆã‚Šã€ãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆåœ°åŸŸï¼‰ã¸ã¯å…¥ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 + ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†è¨å®šã«åŸºã¥ã„ã¦ã€ãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã¸ã¯å…¥ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 -「è¨å®šã‚’変更ã€ã‚’クリックã—ã¦ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã‚’上ã’ã‚‹ã¨ã€å…¥ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ ã‚ãªãŸã¯ä»Šå¾Œ [REGIONMATURITY] コンテンツã®æ¤œç´¢åŠã³ã‚¢ã‚¯ã‚»ã‚¹ãŒå¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚ ã‚ã¨ã§è¨å®šã‚’å…ƒã«æˆ»ã—ãŸã„å ´åˆã¯ã€ã€Œç·¨é›†ã€ï¼žã€Œç’°å¢ƒè¨å®šã€ã‚’ã”覧ãã ã•ã„。 +「è¨å®šã‚’変更ã€ã‚’クリックã—ã¦ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã®è¨å®šã‚’変更ã™ã‚Œã°ã™ãã«å…¥ã‚Œã¾ã™ã€‚ 変更ã«ä¼´ã£ã¦ [REGIONMATURITY] コンテンツã®æ¤œç´¢ã‚„アクセスãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ ã‚ã¨ã§è¨å®šã‚’変更ã—ãŸã„å ´åˆã¯ ミー > 環境è¨å®š > 一般 ã‹ã‚‰ã©ã†ãžã€‚ <form name="form"> <button name="OK" text="環境è¨å®šã®å¤‰æ›´"/> <button default="true" name="Cancel" text="é–‰ã˜ã‚‹"/> @@ -2230,7 +2280,7 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã ã“ã“ã§ã¯é£›ã¹ã¾ã›ã‚“。 </notification> <notification name="PushRestricted"> - ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ãƒ—ッシュãŒåˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚ 土地所有者以外ã¯ä»–人をプッシュã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ãƒ—ッシュãŒç¦æ¢ã•ã‚Œã¦ã„ã¾ã™ã€‚ 土地所有者以外ã¯ä»–人をプッシュã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 </notification> <notification name="NoVoice"> ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ãƒœã‚¤ã‚¹ãƒãƒ£ãƒƒãƒˆãŒç„¡åŠ¹ã§ã™ã€‚ 誰ã‹ãŒè©±ã—ã¦ã„ã‚‹ã®ã‚’èžãã“ã¨ã¯ã§ãã¾ã›ã‚“。 @@ -2339,15 +2389,6 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã <button name="Mute" text="ブãƒãƒƒã‚¯"/> </form> </notification> - <notification name="ObjectGiveItemUnknownUser"> - (ä¸æ˜Žã®ä½äººï¼‰ãŒæ‰€æœ‰ã™ã‚‹ [OBJECTFROMNAME] ã¨ã„ã†åå‰ã®ã‚ªãƒ–ジェクトãŒã€ã‚ãªãŸã« [OBJECTTYPE] を渡ã—ã¾ã—ãŸï¼š -[ITEM_SLURL] - <form name="form"> - <button name="Keep" text="å—ã‘å–ã‚‹"/> - <button name="Discard" text="ç ´æ£„"/> - <button name="Mute" text="ブãƒãƒƒã‚¯"/> - </form> - </notification> <notification name="UserGiveItem"> [NAME_SLURL] ãŒã‚ãªãŸã« [OBJECTTYPE] を渡ã—ã¾ã—ãŸï¼š [ITEM_SLURL] @@ -2659,10 +2700,54 @@ M ã‚ーを押ã—ã¦å¤‰æ›´ã—ã¾ã™ã€‚ ã˜ã‚…ã†ã¶ã‚“ãªã‚¹ãƒšãƒ¼ã‚¹ãŒã§ãã‚Œã°ãƒœã‚¿ãƒ³ã¯è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ </notification> <notification name="ShareNotification"> - ä½äººé¸æŠžç”»é¢ã«è¡¨ç¤ºã•ã‚ŒãŸäººã«ã€æŒã¡ç‰©ã‹ã‚‰ã‚¢ã‚¤ãƒ†ãƒ をドラッグ + ä½äººé¸æŠžç”»é¢ã«è¡¨ç¤ºã•ã‚ŒãŸäººã«ã€ŒæŒã¡ç‰©ã€ã‹ã‚‰ã‚¢ã‚¤ãƒ†ãƒ をドラッグã—ã¦ãã ã•ã„ + </notification> + <notification name="DeedToGroupFail"> + グループã¸ã®è²æ¸¡ã«å¤±æ•—ã—ã¾ã—ãŸã€‚ </notification> <notification name="AvatarRezNotification"> - ã‚¢ãƒã‚¿ãƒ¼å「 [NAME] ã€ãŒ [TIME] 秒ã§å‡ºç¾ã—ã¾ã™ã€‚ + ( [EXISTENCE] 秒) +ã‚¢ãƒã‚¿ãƒ¼ã€Œ [NAME] ã€ãŒ [TIME] 秒ã§å‡ºç¾ã—ã¾ã™ã€‚ + </notification> + <notification name="AvatarRezSelfNotification"> + ( [EXISTENCE] 秒) +[TIME] 秒ã§ã‚¢ã‚¦ãƒˆãƒ•ã‚£ãƒƒãƒˆã®ãƒ™ãƒ¼ã‚ングãŒå®Œäº†ã—ã¾ã—ãŸã€‚ + </notification> + <notification name="AvatarRezCloudNotification"> + ( [EXISTENCE] 秒) +ã‚¢ãƒã‚¿ãƒ¼ã€Œ NAME ã€ãŒã‚¯ãƒ©ã‚¦ãƒ‰ã«ãªã‚Šã¾ã—ãŸã€‚ + </notification> + <notification name="AvatarRezArrivedNotification"> + ( [EXISTENCE] 秒) +ã‚¢ãƒã‚¿ãƒ¼ã€Œ NAME ã€ãŒç¾ã‚Œã¾ã—ãŸã€‚ + </notification> + <notification name="AvatarRezLeftCloudNotification"> + ( [EXISTENCE] 秒) +ã‚¢ãƒã‚¿ãƒ¼ã€Œ [NAME] ã€ãŒ [TIME] 秒ã§ã‚¯ãƒ©ã‚¦ãƒ‰çŠ¶æ…‹ã‹ã‚‰å‡ºç¾ã—ã¾ã™ã€‚ + </notification> + <notification name="AvatarRezEnteredAppearanceNotification"> + ( [EXISTENCE] 秒) +ã‚¢ãƒã‚¿ãƒ¼ã€Œ NAME ã€ãŒå®¹å§¿ç·¨é›†ãƒ¢ãƒ¼ãƒ‰ã«å…¥ã‚Šã¾ã—ãŸã€‚ + </notification> + <notification name="AvatarRezLeftAppearanceNotification"> + ( [EXISTENCE] 秒) +ã‚¢ãƒã‚¿ãƒ¼ã€Œ NAME ã€ãŒå®¹å§¿ç·¨é›†ãƒ¢ãƒ¼ãƒ‰ã‚’解除ã—ã¾ã—ãŸã€‚ + </notification> + <notification name="AvatarRezLeftNotification"> + ( [EXISTENCE] 秒) +ã‚¢ãƒã‚¿ãƒ¼ã€Œ NAME ã€ãŒå®Œå…¨ã«èªã¿è¾¼ã¾ã‚Œã¾ã—ãŸã€‚ + </notification> + <notification name="ConfirmLeaveCall"> + ã“ã®ã‚³ãƒ¼ãƒ«ã‹ã‚‰æŠœã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="コールã‹ã‚‰æŠœã‘ã‚‹å‰ã®ç¢ºèª" name="okcancelignore" notext="ã„ã„ãˆ" yestext="ã¯ã„"/> + </notification> + <notification name="ConfirmMuteAll"> + グループコールã®å‚åŠ è€…å…¨å“¡ã‚’ãƒŸãƒ¥ãƒ¼ãƒˆã—ã¾ã—ãŸã€‚ +ã‚ã¨ã‹ã‚‰ã“ã®ã‚³ãƒ¼ãƒ«ã«å‚åŠ ã™ã‚‹ä½äººã‚‚ +ミュートã•ã‚Œã¾ã™ã€‚ã‚ãªãŸãŒã‚³ãƒ¼ãƒ«ã‚’終了ã—ã¦ã‚‚ä»–ã®å‚åŠ è€…ã®ãƒŸãƒ¥ãƒ¼ãƒˆçŠ¶æ…‹ãŒç¶šãã¾ã™ã€‚ + +全員をミュートã—ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="グループコールã®å‚åŠ è€…å…¨å“¡ã‚’ãƒŸãƒ¥ãƒ¼ãƒˆã™ã‚‹å‰ã®ç¢ºèª" name="okcancelignore" notext="Ok" yestext="ã‚ャンセル"/> </notification> <global name="UnsupportedCPU"> - ã‚ãªãŸã® CPU ã®é€Ÿåº¦ã¯å¿…é ˆå‹•ä½œç’°å¢ƒã®æ¡ä»¶ã‚’満ãŸã—ã¦ã„ã¾ã›ã‚“。 diff --git a/indra/newview/skins/default/xui/ja/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/ja/outfit_accordion_tab.xml index 0cee35b901..bac885e5d8 100644 --- a/indra/newview/skins/default/xui/ja/outfit_accordion_tab.xml +++ b/indra/newview/skins/default/xui/ja/outfit_accordion_tab.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> <!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume--> -<accordion_tab name="Mockup Tab" title="モックアップタブ"/> +<accordion_tab name="Mockup Tab" title="Mockup Tab"/> diff --git a/indra/newview/skins/default/xui/ja/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/ja/panel_body_parts_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_body_parts_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/ja/panel_bodyparts_list_button_bar.xml new file mode 100644 index 0000000000..42d8a21660 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_bodyparts_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="交æ›" name="switch_btn"/> + <button label="è²·ã„物 >" name="bodyparts_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_bottomtray.xml b/indra/newview/skins/default/xui/ja/panel_bottomtray.xml index f12f07f3e9..04b4893026 100644 --- a/indra/newview/skins/default/xui/ja/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/ja/panel_bottomtray.xml @@ -1,11 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="bottom_tray"> - <string name="SpeakBtnToolTip"> - マイクã®ã‚ªãƒ³ãƒ»ã‚ªãƒ• - </string> - <string name="VoiceControlBtnToolTip"> - ボイスコントãƒãƒ¼ãƒ«ãƒ‘ãƒãƒ«ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º - </string> + <string name="SpeakBtnToolTip" value="マイクã®ã‚ªãƒ³ãƒ»ã‚ªãƒ•"/> + <string name="VoiceControlBtnToolTip" value="ボイスコントãƒãƒ¼ãƒ«ãƒ‘ãƒãƒ«ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> <layout_stack name="toolbar_stack"> <layout_panel name="speak_panel"> <talk_button name="talk"> @@ -24,6 +20,21 @@ <layout_panel name="snapshot_panel"> <button label="" name="snapshots" tool_tip="スナップショットを撮りã¾ã™"/> </layout_panel> + <layout_panel name="sidebar_btn_panel"> + <button label="サイドãƒãƒ¼" name="sidebar_btn" tool_tip="サイドãƒãƒ¼ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> + </layout_panel> + <layout_panel name="build_btn_panel"> + <button label="制作" name="build_btn" tool_tip="制作ツールã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> + </layout_panel> + <layout_panel name="search_btn_panel"> + <button label="検索" name="search_btn" tool_tip="検索ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> + </layout_panel> + <layout_panel name="world_map_btn_panel"> + <button label="地図" name="world_map_btn" tool_tip="世界地図ã®è¡¨ç¤ºãƒ»éžè¡¨ç¤º"/> + </layout_panel> + <layout_panel name="mini_map_btn_panel"> + <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="会話"/> diff --git a/indra/newview/skins/default/xui/ja/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/ja/panel_clothing_list_button_bar.xml new file mode 100644 index 0000000000..2159f17fec --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_clothing_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="è¿½åŠ +" name="add_btn"/> + <button label="è²·ã„物 >" name="clothing_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/ja/panel_clothing_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_cof_wearables.xml b/indra/newview/skins/default/xui/ja/panel_cof_wearables.xml new file mode 100644 index 0000000000..b9bc10c220 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_cof_wearables.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="cof_wearables"> + <accordion name="cof_wearables_accordion"> + <accordion_tab name="tab_attachments" title="アタッãƒãƒ¡ãƒ³ãƒˆ"/> + <accordion_tab name="tab_clothing" title="衣類"/> + <accordion_tab name="tab_body_parts" title="身体部ä½"/> + </accordion> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/ja/panel_deletable_wearable_list_item.xml new file mode 100644 index 0000000000..91d90a5660 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_deletable_wearable_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="deletable_wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/ja/panel_dummy_clothing_list_item.xml new file mode 100644 index 0000000000..6af84de0c7 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_dummy_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="dummy_clothing_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_shape.xml b/indra/newview/skins/default/xui/ja/panel_edit_shape.xml index e60534a54e..5d3bc79e2f 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_shape.xml @@ -1,14 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_shape_panel"> - <panel name="avatar_sex_panel"> - <text name="gender_text"> - 性別: - </text> - <radio_group name="sex_radio"> - <radio_item label="女性" name="radio"/> - <radio_item label="男性" name="radio2"/> - </radio_group> - </panel> + <text name="avatar_height"> + 身長 [HEIGHT] メートル + </text> <panel label="シャツ" name="accordion_panel"> <accordion name="wearable_accordion"> <accordion_tab name="shape_body_tab" title="身体"/> @@ -18,7 +12,7 @@ <accordion_tab name="shape_nose_tab" title="é¼»"/> <accordion_tab name="shape_mouth_tab" title="å£"/> <accordion_tab name="shape_chin_tab" title="ã‚ã”"/> - <accordion_tab name="shape_torso_tab" title="é "/> + <accordion_tab name="shape_torso_tab" title="上åŠèº«"/> <accordion_tab name="shape_legs_tab" title="è„š"/> </accordion> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/ja/panel_edit_tattoo.xml index 78ddae47f9..c3f8c12620 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_tattoo.xml @@ -4,5 +4,6 @@ <texture_picker label="é 部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="Head Tattoo" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠž" width="70"/> <texture_picker label="上部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="Upper Tattoo" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠž" width="70"/> <texture_picker label="下部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="Lower Tattoo" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠž" width="70"/> + <color_swatch label="色・色彩é…åˆ" name="Color/Tint" tool_tip="クリックã—ã¦ã‚«ãƒ©ãƒ¼ãƒ”ッカーを開ãã¾ã™"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_wearable.xml b/indra/newview/skins/default/xui/ja/panel_edit_wearable.xml index 67828af6c2..5e3342699b 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_wearable.xml @@ -93,6 +93,12 @@ <text name="edit_wearable_title" value="シェイプを編集ä¸"/> <panel label="シャツ" name="wearable_type_panel"> <text name="description_text" value="シェイプ:"/> + <radio_group name="sex_radio"> + <radio_item label="" name="sex_male" tool_tip="男性" value="1"/> + <radio_item label="" name="sex_female" tool_tip="女性" value="0"/> + </radio_group> + <icon name="male_icon" tool_tip="男性"/> + <icon name="female_icon" tool_tip="女性"/> </panel> <panel label="gear_buttom_panel" name="gear_buttom_panel"> <button name="friends_viewsort_btn" tool_tip="オプション"/> diff --git a/indra/newview/skins/default/xui/ja/panel_group_general.xml b/indra/newview/skins/default/xui/ja/panel_group_general.xml index 94efd00770..bfe69cbdd9 100644 --- a/indra/newview/skins/default/xui/ja/panel_group_general.xml +++ b/indra/newview/skins/default/xui/ja/panel_group_general.xml @@ -48,7 +48,7 @@ <spinner label="L$" name="spin_enrollment_fee" tool_tip="「入会費ã€ã«ãƒã‚§ãƒƒã‚¯ãŒå…¥ã£ã¦ã„ã‚‹å ´åˆã€æ–°è¦ãƒ¡ãƒ³ãƒãƒ¼ã¯æŒ‡å®šã•ã‚ŒãŸå…¥ä¼šè²»ã‚’支払ã‚ãªã‘ã‚Œã°ã‚°ãƒ«ãƒ¼ãƒ—ã«å…¥ã‚Œã¾ã›ã‚“。"/> <combo_box name="group_mature_check" tool_tip="ã‚ãªãŸã®ã‚°ãƒ«ãƒ¼ãƒ—ã«ã€ŒModerateã€ã«ãƒ¬ãƒ¼ãƒˆè¨å®šã•ã‚ŒãŸæƒ…å ±ãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’è¨å®šã—ã¾ã™"> <combo_item name="select_mature"> - - Mature ã®é¸æŠž - + - レーティングã®é¸æŠž - </combo_item> <combo_box.item label="「Moderateã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„" name="mature"/> <combo_box.item label="「Generalã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„" name="pg"/> diff --git a/indra/newview/skins/default/xui/ja/panel_group_land_money.xml b/indra/newview/skins/default/xui/ja/panel_group_land_money.xml index ef6d8cce47..4b3a7f880b 100644 --- a/indra/newview/skins/default/xui/ja/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/ja/panel_group_land_money.xml @@ -6,6 +6,9 @@ <panel.string name="cant_view_group_land_text"> グループ所有地を確èªã™ã‚‹æ¨©é™ãŒã‚ã‚Šã¾ã›ã‚“。 </panel.string> + <panel.string name="epmty_view_group_land_text"> + ãªã— + </panel.string> <panel.string name="cant_view_group_accounting_text"> グループã®ä¼šè¨ˆæƒ…å ±ã‚’ç¢ºèªã™ã‚‹æ¨©é™ãŒã‚ã‚Šã¾ã›ã‚“。 </panel.string> diff --git a/indra/newview/skins/default/xui/ja/panel_group_notices.xml b/indra/newview/skins/default/xui/ja/panel_group_notices.xml index a0c50c6122..0b508bd79d 100644 --- a/indra/newview/skins/default/xui/ja/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/ja/panel_group_notices.xml @@ -15,7 +15,7 @@ <scroll_list name="notice_list"> <scroll_list.columns label="" name="icon"/> <scroll_list.columns label="件å" name="subject"/> - <scroll_list.columns label="é€ã‚Šä¸»" name="from"/> + <scroll_list.columns label="é€ä¿¡è€…" name="from"/> <scroll_list.columns label="日付" name="date"/> </scroll_list> <text name="notice_list_none_found"> @@ -25,7 +25,7 @@ <button label="æ›´æ–°" label_selected="リスト更新" name="refresh_notices" tool_tip="通知リストを更新ã—ã¾ã™"/> <panel label="æ–°ã—ã„通知を作æˆ" name="panel_create_new_notice"> <text name="lbl"> - é€šçŸ¥ã‚’ä½œæˆ + 通知ã®ä½œæˆ </text> <text name="lbl3"> 件å: @@ -39,6 +39,7 @@ <text name="string"> ã“ã“ã«ã‚¢ã‚¤ãƒ†ãƒ をドラッグ&ドãƒãƒƒãƒ—ã—ã¦æ·»ä»˜ã—ã¦ãã ã•ã„: </text> + <button label="æŒã¡ç‰©" name="open_inventory" tool_tip="æŒã¡ç‰©ã‚’é–‹ãã¾ã™"/> <button label="å–り外ã™" label_selected="添付物を削除" name="remove_attachment" tool_tip="ã‚ãªãŸã®é€šçŸ¥ã‹ã‚‰æ·»ä»˜ã•ã‚ŒãŸã‚¢ã‚¤ãƒ†ãƒ を削除ã—ã¾ã™"/> <button label="é€ä¿¡" label_selected="é€ä¿¡" name="send_notice"/> <group_drop_target name="drop_target" tool_tip="æŒã¡ç‰©ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’ã“ã®ãƒœãƒƒã‚¯ã‚¹ã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã¦ã€é€šçŸ¥ã¨ä¸€ç·’ã«é€ã‚Šã¾ã™ã€‚ 添付ã™ã‚‹ã«ã¯ã€ãã®ã‚¢ã‚¤ãƒ†ãƒ ã®ã‚³ãƒ”ーã¨å†è²©ãƒ»ãƒ—レゼントã®æ¨©é™ãŒã‚ãªãŸã«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"/> diff --git a/indra/newview/skins/default/xui/ja/panel_login.xml b/indra/newview/skins/default/xui/ja/panel_login.xml index c217af38ba..f0ebc67ef5 100644 --- a/indra/newview/skins/default/xui/ja/panel_login.xml +++ b/indra/newview/skins/default/xui/ja/panel_login.xml @@ -8,18 +8,15 @@ </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> - <text name="first_name_text"> - ファーストãƒãƒ¼ãƒ : + <text name="username_text"> + ユーザーå: </text> - <line_editor label="最åˆ" name="first_name_edit" tool_tip="[SECOND_LIFE] ファーストãƒãƒ¼ãƒ "/> - <text name="last_name_text"> - ラストãƒãƒ¼ãƒ : - </text> - <line_editor label="最後" name="last_name_edit" tool_tip="[SECOND_LIFE] ラストãƒãƒ¼ãƒ "/> + <line_editor label="ユーザーå" name="username_edit" tool_tip="[SECOND_LIFE] ユーザーå"/> <text name="password_text"> パスワード: </text> <check_box label="パスワードを記憶" name="remember_check"/> + <button label="ãƒã‚°ã‚¤ãƒ³" left_pad="30" name="connect_btn" width="60"/> <text name="start_location_text"> 開始地点: </text> @@ -28,7 +25,6 @@ <combo_box.item label="ホーム" name="MyHome"/> <combo_box.item label="<地域åを入力>" name="Typeregionname"/> </combo_box> - <button label="ãƒã‚°ã‚¤ãƒ³" left_pad="30" name="connect_btn" width="60"/> </layout_panel> <layout_panel name="links"> <text name="create_new_account_text"> diff --git a/indra/newview/skins/default/xui/ja/panel_main_inventory.xml b/indra/newview/skins/default/xui/ja/panel_main_inventory.xml index 9981d13bbb..ff968696b7 100644 --- a/indra/newview/skins/default/xui/ja/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/ja/panel_main_inventory.xml @@ -9,62 +9,20 @@ <text name="ItemcountText"> アイテム: </text> - <menu_bar name="Inventory Menu"> - <menu label="ファイル" name="File"> - <menu_item_call label="é–‹ã" name="Open"/> - <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> - <menu_item_call label="æ–°ã—ã„ウィンドウ" name="New Window"/> - <menu_item_call label="フィルターを表示" name="Show Filters"/> - <menu_item_call label="フィルターをリセット" name="Reset Current"/> - <menu_item_call label="ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ«ãƒ€ã‚’é–‰ã˜ã‚‹" name="Close All Folders"/> - <menu_item_call label="ã”ã¿ç®±ã‚’空ã«ã™ã‚‹" name="Empty Trash"/> - <menu_item_call label="紛失物を空ã«ã™ã‚‹" name="Empty Lost And Found"/> - </menu> - <menu label="æ–°è¦ä½œæˆ" name="Create"> - <menu_item_call label="フォルダ" name="New Folder"/> - <menu_item_call label="スクリプト" name="New Script"/> - <menu_item_call label="ノートカード" name="New Note"/> - <menu_item_call label="ジェスãƒãƒ£ãƒ¼" name="New Gesture"/> - <menu label="衣類" name="New Clothes"> - <menu_item_call label="シャツ" name="New Shirt"/> - <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 Skirt"/> - <menu_item_call label="手袋" name="New Gloves"/> - <menu_item_call label="下ç€ï¼ˆä¸Šï¼‰" name="New Undershirt"/> - <menu_item_call label="下ç€ï¼ˆä¸‹ï¼‰" name="New Underpants"/> - <menu_item_call label="アルファ" name="New Alpha"/> - <menu_item_call label="タトゥ" name="New Tattoo"/> - </menu> - <menu label="身体部ä½" name="New Body Parts"> - <menu_item_call label="シェイプ(体型)" name="New Shape"/> - <menu_item_call label="スã‚ン" name="New Skin"/> - <menu_item_call label="髪" name="New Hair"/> - <menu_item_call label="ç›®" name="New Eyes"/> - </menu> - </menu> - <menu label="並ã¹æ›¿ãˆ" name="Sort"> - <menu_item_check label="åå‰é †" name="By Name"/> - <menu_item_check label="æ—¥ä»˜é †" name="By Date"/> - <menu_item_check label="フォルダを常ã«åå‰é †ã«ä¸¦ã¹ã‚‹" name="Folders Always By Name"/> - <menu_item_check label="システムフォルダを上ã«ä¸¦ã¹ã‚‹" name="System Folders To Top"/> - </menu> - </menu_bar> <filter_editor label="æŒã¡ç‰©ã‚’フィルター" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="æŒã¡ç‰©" name="All Items"/> - <inventory_panel label="最新" name="Recent Items"/> + <recent_inventory_panel label="最新" name="Recent Items"/> </tab_container> - <panel name="bottom_panel"> - <button name="options_gear_btn" tool_tip="ãã®ä»–ã®ã‚ªãƒ—ションを表示ã—ã¾ã™"/> - <button name="add_btn" tool_tip="æ–°ã—ã„ã‚¢ã‚¤ãƒ†ãƒ ã‚’è¿½åŠ ã—ã¾ã™"/> - <dnd_button name="trash_btn" tool_tip="é¸æŠžã—ãŸã‚¢ã‚¤ãƒ†ãƒ を削除ã—ã¾ã™"/> - </panel> + <layout_stack name="bottom_panel"> + <layout_panel name="options_gear_btn_panel"> + <button name="options_gear_btn" tool_tip="オプションを表示ã—ã¾ã™"/> + </layout_panel> + <layout_panel name="add_btn_panel"> + <button name="add_btn" tool_tip="æ–°ã—ã„ã‚¢ã‚¤ãƒ†ãƒ ã‚’è¿½åŠ ã—ã¾ã™"/> + </layout_panel> + <layout_panel name="trash_btn_panel"> + <dnd_button name="trash_btn" tool_tip="é¸æŠžã—ãŸã‚¢ã‚¤ãƒ†ãƒ を削除ã—ã¾ã™"/> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_outfit_edit.xml b/indra/newview/skins/default/xui/ja/panel_outfit_edit.xml index d0089b46aa..cf6e6eaae3 100644 --- a/indra/newview/skins/default/xui/ja/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/ja/panel_outfit_edit.xml @@ -2,6 +2,8 @@ <!-- Side tray Outfit Edit panel --> <panel label="アウトフットã®ç·¨é›†" name="outfit_edit"> <string name="No Outfit" value="アウトフィットãªã—"/> + <string name="unsaved_changes" value="ä¿å˜ã•ã‚Œã¦ã„ãªã„変更"/> + <string name="now_editing" value="編集ã—ã¦ã„ã¾ã™..."/> <panel.string name="not_available"> (該当ãªã—) </panel.string> @@ -15,24 +17,19 @@ <text name="title" value="アウトフットã®ç·¨é›†"/> <panel label="bottom_panel" name="header_panel"> <panel label="bottom_panel" name="outfit_name_and_status"> - <text name="status" value="編集ä¸..."/> + <text name="status" value="編集ã—ã¦ã„ã¾ã™..."/> <text name="curr_outfit_name" value="[Current Outfit]"/> </panel> </panel> <layout_stack name="im_panels"> <layout_panel label="IM コントãƒãƒ¼ãƒ«ãƒ‘ãƒãƒ«" name="outfit_wearables_panel"> - <scroll_list name="look_items_list"> - <scroll_list.columns label="アイテムを確èª" name="look_item"/> - <scroll_list.columns label="アウトフィットアイテムã®ä¸¦ã¹æ›¿ãˆ" name="look_item_sort"/> - </scroll_list> <panel label="bottom_panel" name="edit_panel"/> </layout_panel> <layout_panel name="add_wearables_panel"> - <filter_editor label="フィルター" name="look_item_filter"/> + <text name="add_to_outfit_label" value="アウトフィットã«è¿½åŠ :"/> <layout_stack name="filter_panels"> - <layout_panel label="IM コントãƒãƒ¼ãƒ«ãƒ‘ãƒãƒ«" name="filter_button_panel"> - <text name="add_to_outfit_label" value="アウトフィットã«è¿½åŠ :"/> - <button label="O" name="filter_button"/> + <layout_panel label="IM コントãƒãƒ¼ãƒ«ãƒ‘ãƒãƒ«" name="filter_panel"> + <filter_editor label="フィルター" name="look_item_filter"/> </layout_panel> </layout_stack> <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> diff --git a/indra/newview/skins/default/xui/ja/panel_people.xml b/indra/newview/skins/default/xui/ja/panel_people.xml index 1d29080687..68af19910a 100644 --- a/indra/newview/skins/default/xui/ja/panel_people.xml +++ b/indra/newview/skins/default/xui/ja/panel_people.xml @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray panel --> <panel label="人" name="people_panel"> - <string name="no_recent_people" value="最近交æµã—ãŸäººã¯ã„ã¾ã›ã‚“。 一緒ã«ä½•ã‹ã™ã‚‹ä»²é–“ã‚‚ãŠæŽ¢ã—ã§ã™ã‹ï¼Ÿ [secondlife:///app/search/people 検索] ã‹ [secondlife:///app/worldmap 世界地図] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> - <string name="no_filtered_recent_people" value="ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/people 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> - <string name="no_one_near" value="è¿‘ãã«èª°ã‚‚ã„ã¾ã›ã‚“。 一緒ã«ä½•ã‹ã™ã‚‹ä»²é–“ã‚‚ãŠæŽ¢ã—ã§ã™ã‹ï¼Ÿ [secondlife:///app/search/people 検索] ã‹ [secondlife:///app/worldmap 世界地図] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> - <string name="no_one_filtered_near" value="ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/people 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> + <string name="no_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"> å‹é”を見ã¤ã‘ã‚‹ã«ã¯ã€[secondlife:///app/search/people 検索] ã‚’ã™ã‚‹ã‹ã€ä½äººã‚’å³ã‚¯ãƒªãƒƒã‚¯ã—ã¦ãƒ•ãƒ¬ãƒ³ãƒ‰ç™»éŒ²ã—ã¦ãã ã•ã„。 -一緒ã«ä½•ã‹ã™ã‚‹ä»²é–“ã‚‚ãŠæŽ¢ã—ã§ã™ã‹ï¼Ÿ [secondlife:///app/worldmap 世界地図] ã‚’ãŠè©¦ã—ãã ã•ã„。 +一緒ã«ä½•ã‹ã™ã‚‹ä»²é–“ã‚’ãŠæŽ¢ã—ã§ã™ã‹ï¼Ÿ [secondlife:///app/worldmap 世界地図] ã‚’ãŠè©¦ã—ãã ã•ã„。 </string> <string name="no_filtered_friends_msg"> - ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/people 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。 + ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [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 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> + <string name="no_filtered_groups_msg" value="ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/groups/[SEARCH_TERM] 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> <string name="no_groups_msg" value="グループをãŠæŽ¢ã—ã§ã™ã‹ï¼Ÿ [secondlife:///app/search/groups 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> <filter_editor label="フィルター" name="filter_input"/> <tab_container name="tabs"> @@ -55,7 +55,7 @@ <button label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="view_profile_btn" tool_tip="写真ã€ã‚°ãƒ«ãƒ¼ãƒ—ã€ãã®ä»–ä½äººæƒ…å ±ã‚’è¡¨ç¤ºã—ã¾ã™"/> <button label="IM" name="im_btn" tool_tip="インスタントメッセージを開ãã¾ã™"/> <button label="コール" name="call_btn" tool_tip="ã“ã®ä½äººã«ã‚³ãƒ¼ãƒ«ã—ã¾ã™"/> - <button label="共有" name="share_btn"/> + <button label="共有" name="share_btn" tool_tip="æŒã¡ç‰©ã‚¢ã‚¤ãƒ†ãƒ を共有"/> <button label="テレãƒãƒ¼ãƒˆ" name="teleport_btn" tool_tip="テレãƒãƒ¼ãƒˆã‚’é€ã‚Šã¾ã™"/> <button label="ã‚°ãƒ«ãƒ¼ãƒ—æƒ…å ±" name="group_info_btn" tool_tip="ã‚°ãƒ«ãƒ¼ãƒ—æƒ…å ±ã‚’è¡¨ç¤ºã—ã¾ã™"/> <button label="グループãƒãƒ£ãƒƒãƒˆ" name="chat_btn" tool_tip="ãƒãƒ£ãƒƒãƒˆã‚’開始ã—ã¾ã™"/> diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml index 753951e282..94ee5c6ff4 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml @@ -13,6 +13,7 @@ </text> <check_box label="制作・編集" name="edit_camera_movement" tool_tip="編集モードã®ã‚ªãƒ³ãƒ»ã‚ªãƒ•ã®åˆ‡ã‚Šæ›¿ãˆã«ã€è‡ªå‹•ã‚«ãƒ¡ãƒ©ãƒã‚¸ã‚·ãƒ§ãƒ³ã‚’使ã„ã¾ã™"/> <check_box label="容姿" name="appearance_camera_movement" tool_tip="編集モードã«å…¥ã£ãŸã¨ãã«ã€è‡ªå‹•ã‚«ãƒ¡ãƒ©ãƒã‚¸ã‚·ãƒ§ãƒ³ã‚’使ã„ã¾ã™"/> + <check_box initial_value="1" label="サイドãƒãƒ¼" name="appearance_sidebar_positioning" tool_tip="サイドãƒãƒ¼ã®åˆ‡ã‚Šæ›¿ãˆæ™‚ã«è‡ªå‹•ã‚«ãƒ¡ãƒ©ãƒã‚¸ã‚·ãƒ§ãƒ³ã‚’使ã„ã¾ã™"/> <check_box label="一人称視点ã§è¡¨ç¤ºã™ã‚‹" name="first_person_avatar_visible"/> <check_box label="常ã«ã‚ーæ“作ã§å‹•ãよã†ã«ã™ã‚‹" name="arrow_keys_move_avatar_check"/> <check_box label="上矢å°ã‚ー2度押ã—+長押ã—ã§èµ°ã‚‹" name="tap_tap_hold_to_run"/> 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 e5780697b1..86f880de09 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml @@ -45,7 +45,7 @@ </text> <check_box initial_value="true" label="ãƒãƒ£ãƒƒãƒˆä¸ã«ã‚¿ã‚¤ãƒ”ング動作ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’å†ç”Ÿ" name="play_typing_animation"/> <check_box label="オフライン時ã«å—ã‘å–ã£ãŸ IM をメールã§å—ä¿¡" name="send_im_to_email"/> - <check_box label="ãƒãƒ£ãƒƒãƒˆå±¥æ´ã«æ–‡å—ã ã‘表示ã™ã‚‹" name="plain_text_chat_history"/> + <check_box label="IM ã¨ãƒãƒ£ãƒƒãƒˆå±¥æ´ã«æ–‡å—ã ã‘表示ã™ã‚‹" name="plain_text_chat_history"/> <text name="show_ims_in_label"> IM ã®è¡¨ç¤ºæ–¹æ³•ï¼š </text> diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml index 8df829c296..75de773366 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml @@ -1,19 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="表示" name="Display panel"> - <text name="WindowSizeLabel"> - ウィンドウ・サイズ: - </text> - <check_box label="全画é¢" name="windowed mode"/> - <combo_box name="windowsize combo"> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="720x480 (NTSC)" name="720x480"/> - <combo_box.item label="768x576 (PAL)" name="768x576"/> - <combo_box.item label="1024x768" name="1024x768"/> - </combo_box> - <text name="UI Size:"> - UI サイズ: - </text> <text name="QualitySpeed"> クオリティã¨ã‚¹ãƒ”ード: </text> @@ -63,6 +49,10 @@ m </text> <slider label="最大パーティクル数:" name="MaxParticleCount"/> + <slider label="ã‚¢ãƒã‚¿ãƒ¼æœ€å¤§æç”»è·é›¢ï¼š" name="MaxAvatarDrawDistance"/> + <text name="DrawDistanceMeterText3"> + m + </text> <slider label="ãƒã‚¹ãƒˆãƒ—ãƒã‚»ã‚¹å“質:" name="RenderPostProcess"/> <text name="MeshDetailText"> メッシュ詳細: @@ -98,8 +88,8 @@ ライティング詳細: </text> <radio_group name="LightingDetailRadio"> - <radio_item label="太陽ã¨æœˆã®ã¿" name="SunMoon"/> - <radio_item label="è¿‘ãã®ãƒãƒ¼ã‚«ãƒ«ã‚µã‚¤ãƒˆ" name="LocalLights"/> + <radio_item label="太陽ã¨æœˆã®ã¿" name="SunMoon" value="0"/> + <radio_item label="è¿‘ãã®ãƒãƒ¼ã‚«ãƒ«ã‚µã‚¤ãƒˆ" name="LocalLights" value="1"/> </radio_group> <text name="TerrainDetailText"> 地形詳細: diff --git a/indra/newview/skins/default/xui/ja/panel_region_general.xml b/indra/newview/skins/default/xui/ja/panel_region_general.xml index b72fac1a7c..54ec24773f 100644 --- a/indra/newview/skins/default/xui/ja/panel_region_general.xml +++ b/indra/newview/skins/default/xui/ja/panel_region_general.xml @@ -18,7 +18,7 @@ <text left_delta="70" 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"/> diff --git a/indra/newview/skins/default/xui/ja/panel_region_texture.xml b/indra/newview/skins/default/xui/ja/panel_region_texture.xml index 14fc0b4c22..9e442ce091 100644 --- a/indra/newview/skins/default/xui/ja/panel_region_texture.xml +++ b/indra/newview/skins/default/xui/ja/panel_region_texture.xml @@ -22,7 +22,7 @@ 4(高) </text> <text name="height_text_lbl5"> - テクスãƒãƒ£æ¨™é«˜ç¯„囲 + 地形テクスãƒãƒ£ã®éš†èµ·ç¯„囲 </text> <text name="height_text_lbl6"> 北西 @@ -45,7 +45,7 @@ <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番ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ã®é«˜ã•ã® diff --git a/indra/newview/skins/default/xui/ja/sidepanel_appearance.xml b/indra/newview/skins/default/xui/ja/sidepanel_appearance.xml index 94be8ba73d..c453699c57 100644 --- a/indra/newview/skins/default/xui/ja/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/ja/sidepanel_appearance.xml @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="アウトフィット" name="appearance panel"> <string name="No Outfit" value="アウトフィットãªã—"/> + <string name="Unsaved Changes" value="ä¿å˜ã•ã‚Œã¦ã„ãªã„変更"/> + <string name="Now Wearing" value="ç€ç”¨ã—ã¦ã„ã¾ã™..."/> <panel name="panel_currentlook"> - <button label="編集" name="editappearance_btn"/> - <text name="currentlook_title"> - (ä¿å˜ã•ã‚Œã¦ã„ã¾ã›ã‚“) + <button label="E" name="editappearance_btn"/> + <button label="O" name="openoutfit_btn"/> + <text name="currentlook_status"> + (状態) </text> <text name="currentlook_name"> MyOutfit With a really Long Name like MOOSE </text> </panel> <filter_editor label="アウトフィットをフィルター" name="Filter"/> - <button label="装ç€" name="wear_btn"/> - <button label="æ–°ã—ã„アウトフィット" name="newlook_btn"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml b/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml index f82c6136a6..a0f44d9de9 100644 --- a/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml @@ -4,6 +4,7 @@ <panel name="button_panel"> <button label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="info_btn"/> <button label="共有" name="share_btn"/> + <button label="ショッピング" name="shop_btn"/> <button label="装ç€" name="wear_btn"/> <button label="プレイ" name="play_btn"/> <button label="テレãƒãƒ¼ãƒˆ" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index 2ba437b710..dfc12bc1cb 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- This file contains strings that used to be hardcoded in the source. It is only for those strings which do not belong in a floater. For example, the strings used in avatar chat bubbles, and strings @@ -100,6 +100,24 @@ <string name="LoginDownloadingClothing"> 衣類をダウンãƒãƒ¼ãƒ‰ã—ã¦ã„ã¾ã™... </string> + <string name="InvalidCertificate"> + 証明書ãŒç„¡åŠ¹ã¾ãŸã¯å£Šã‚Œã¦ã„ã¾ã™ã€‚ グリッド管ç†è€…ã«ã”連絡ãã ã•ã„。 + </string> + <string name="CertInvalidHostname"> + 無効ãªãƒ›ã‚¹ãƒˆãƒãƒ¼ãƒ ãŒã‚µãƒ¼ãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦ã„ã¾ã—ãŸã€‚SLURL ã‹ã‚°ãƒªãƒƒãƒ‰ã®ãƒ›ã‚¹ãƒˆãƒãƒ¼ãƒ ã‚’ã”確èªãã ã•ã„。 + </string> + <string name="CertExpired"> + 証明書ã®æœ‰åŠ¹æœŸé™ãŒåˆ‡ã‚Œã¦ã„ã¾ã™ã€‚ システムã®æ™‚計を確èªã™ã‚‹ã‹ã‚°ãƒªãƒƒãƒ‰ç®¡ç†è€…ã«ã”連絡ãã ã•ã„。 + </string> + <string name="CertKeyUsage"> + SSL 証明書ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ グリッド管ç†è€…ã«ã”連絡ãã ã•ã„。 + </string> + <string name="CertBasicConstraints"> + サーãƒãƒ¼ã®è¨¼æ˜Žæ›¸ãƒã‚§ãƒ¼ãƒ³ã«è¨¼æ˜Žæ›¸ãŒå¤šã™ãŽã¾ã™ã€‚ グリッド管ç†è€…ã«ã”連絡ãã ã•ã„。 + </string> + <string name="CertInvalidSignature"> + 証明書署åã‚’èªè¨¼ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ グリッド管ç†è€…ã«ã”連絡ãã ã•ã„。 + </string> <string name="LoginFailedNoNetwork"> ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¨ãƒ©ãƒ¼ï¼š 接続を確立ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ãŠä½¿ã„ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šã‚’ã”確èªãã ã•ã„。 </string> @@ -840,6 +858,42 @@ <string name="invalid"> 無効 </string> + <string name="shirt_not_worn"> + シャツ未ç€ç”¨ + </string> + <string name="pants_not_worn"> + パンツ未ç€ç”¨ + </string> + <string name="shoes_not_worn"> + é´æœªç€ç”¨ + </string> + <string name="socks_not_worn"> + é´ä¸‹æœªç€ç”¨ + </string> + <string name="jacket_not_worn"> + ジャケット未ç€ç”¨ + </string> + <string name="gloves_not_worn"> + 手袋未ç€ç”¨ + </string> + <string name="undershirt_not_worn"> + 下ç€ï¼ˆä¸Šï¼‰æœªç€ç”¨ + </string> + <string name="underpants_not_worn"> + 下ç€ï¼ˆä¸‹ï¼‰æœªç€ç”¨ + </string> + <string name="skirt_not_worn"> + スカート未ç€ç”¨ + </string> + <string name="alpha_not_worn"> + アルファ未ç€ç”¨ + </string> + <string name="tattoo_not_worn"> + タトゥー未ç€ç”¨ + </string> + <string name="invalid_not_worn"> + 無効 + </string> <string name="NewWearable"> æ–°ã—ã„ [WEARABLE_ITEM] </string> @@ -892,7 +946,7 @@ 左脚 </string> <string name="BodyPartsTorso"> - é + 上åŠèº« </string> <string name="BodyPartsRightLeg"> å³è„š @@ -910,10 +964,13 @@ ESC ã‚ーを押ã—ã¦ãƒ¯ãƒ¼ãƒ«ãƒ‰ãƒ“ューã«æˆ»ã‚Šã¾ã™ </string> <string name="InventoryNoMatchingItems"> - ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/all 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。 + ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/all/[SEARCH_TERM] 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。 + </string> + <string name="PlacesNoMatchingItems"> + ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/places/[SEARCH_TERM] 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。 </string> <string name="FavoritesNoMatchingItems"> - ã“ã“ã«ãƒ©ãƒ³ãƒ‰ãƒžãƒ¼ã‚¯ã‚’ドラッグã—ã¦ã€ãŠæ°—ã«å…¥ã‚Šã«è¿½åŠ ã—ã¾ã™ã€‚ + ã“ã“ã«ãƒ©ãƒ³ãƒ‰ãƒžãƒ¼ã‚¯ã‚’ドラッグã—ã¦ãŠæ°—ã«å…¥ã‚Šã«è¿½åŠ ã—ã¾ã™ã€‚ </string> <string name="InventoryNoTexture"> 「æŒã¡ç‰©ã€å†…ã«ã“ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ã®ã‚³ãƒ”ーãŒã‚ã‚Šã¾ã›ã‚“ @@ -946,6 +1003,7 @@ <string name="Wave" value=" 手を振る"/> <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="衣類ã€"/> @@ -1575,6 +1633,9 @@ <string name="MuteGroup"> (グループ) </string> + <string name="MuteExternal"> + (外部) + </string> <string name="RegionNoCovenant"> ã“ã®ä¸å‹•ç”£ã«ã¯ç´„款ãŒã‚ã‚Šã¾ã›ã‚“。 </string> @@ -1630,25 +1691,25 @@ ãŒæ¸¡ã—ã¾ã—㟠</string> <string name="InvOfferYouDecline"> - You decline + æ‹’å¦ï¼š </string> <string name="InvOfferFrom"> - from + é€ä¿¡å…ƒï¼š </string> <string name="GroupMoneyTotal"> åˆè¨ˆ </string> <string name="GroupMoneyBought"> - ã¯è³¼å…¥ã—ã¾ã—㟠+ 購入: </string> <string name="GroupMoneyPaidYou"> - ãŒã‚ãªãŸã«æ”¯æ‰•ã„ã¾ã—㟠+ ã‚ãªãŸã«æ”¯æ‰•ã„: </string> <string name="GroupMoneyPaidInto"> paid into </string> <string name="GroupMoneyBoughtPassTo"> - bought pass to + å…¥å ´è¨±å¯ã‚’購入: </string> <string name="GroupMoneyPaidFeeForEvent"> ãŒã‚¤ãƒ™ãƒ³ãƒˆç”¨ã®è²»ç”¨ã‚’支払ã„ã¾ã—㟠@@ -2416,7 +2477,7 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã é ã®å¤§ãã• </string> <string name="Head Stretch"> - é ã®ä¼¸ã³ + 縦横ã®é•·ã• </string> <string name="Heel Height"> ヒールã®é«˜ã• @@ -3244,7 +3305,7 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã ã»ãŠã®ä¸Šéƒ¨ </string> <string name="Upper Chin Cleft"> - ã‚ã”上部ã®å‰²ã‚Œå…·åˆ + ã‚ã”上部ã®å‰²ã‚Œ </string> <string name="Upper Eyelid Fold"> 二é‡ã®å¹… @@ -3355,10 +3416,10 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã ビューワã®èµ·å‹•ã«å¤±æ•—ã—ã¾ã—㟠</string> <string name="ItemsComingInTooFastFrom"> - [APP_NAME] : アイテム㌠[FROM_NAME] ã‹ã‚‰ä¸€æ°—ã«èªã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã€è‡ªå‹•ãƒ—レビュー㌠[TIME] 秒間無効ã¨ãªã‚Šã¾ã™ã€‚ + [APP_NAME] : アイテム㌠[FROM_NAME] ã‹ã‚‰åŒæ™‚ã«ãŸãã•ã‚“èªã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã€è‡ªå‹•ãƒ—レビュー㌠[TIME] 秒間無効ã¨ãªã‚Šã¾ã™ã€‚ </string> <string name="ItemsComingInTooFast"> - [APP_NAME] : アイテムãŒä¸€æ°—ã«èªã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã€è‡ªå‹•ãƒ—レビュー㌠[TIME] 秒間無効ã¨ãªã‚Šã¾ã™ã€‚ + [APP_NAME] : アイテムãŒåŒæ™‚ã«ãŸãã•ã‚“èªã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã€è‡ªå‹•ãƒ—レビュー㌠[TIME] 秒間無効ã¨ãªã‚Šã¾ã™ã€‚ </string> <string name="IM_logging_string"> -- インスタントメッセージã®ä¿å˜é–‹å§‹ -- @@ -3390,12 +3451,15 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="answered_call"> 相手ãŒã‚³ãƒ¼ãƒ«ã‚’å—ã‘ã¾ã—㟠</string> - <string name="started_call"> + <string name="you_started_call"> ボイスコールを開始ã—ã¾ã™ </string> - <string name="joined_call"> + <string name="you_joined_call"> ボイスコールã«å‚åŠ ã—ã¾ã—㟠</string> + <string name="name_started_call"> + [NAME] ã¯ãƒœã‚¤ã‚¹ã‚³ãƒ¼ãƒ«ã‚’開始ã—ã¾ã™ + </string> <string name="ringing-im"> ボイスコールã«å‚åŠ ... </string> @@ -3605,6 +3669,90 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="Contents"> コンテンツ </string> + <string name="Gesture"> + ジェスãƒãƒ£ãƒ¼ + </string> + <string name="Male Gestures"> + 男性用ジェスãƒãƒ£ãƒ¼ + </string> + <string name="Female Gestures"> + 女性用ジェスãƒãƒ£ãƒ¼ + </string> + <string name="Other Gestures"> + ãã®ä»–ã®ã‚¸ã‚§ã‚¹ãƒãƒ£ãƒ¼ + </string> + <string name="Speech Gestures"> + 会話ジェスãƒãƒ£ãƒ¼ + </string> + <string name="Common Gestures"> + 一般的ジェスãƒãƒ£ãƒ¼ + </string> + <string name="Male - Excuse me"> + 男性 - ã™ã¿ã¾ã›ã‚“ + </string> + <string name="Male - Get lost"> + 男性 - Get lost + </string> + <string name="Male - Blow kiss"> + 男性 - 投ã’ã‚ッス + </string> + <string name="Male - Boo"> + 男性 - Boo + </string> + <string name="Male - Bored"> + 男性 - 退屈 + </string> + <string name="Male - Hey"> + 男性 - Hey + </string> + <string name="Male - Laugh"> + 男性 - 笑ㆠ+ </string> + <string name="Male - Repulsed"> + 男性 - 拒絶 + </string> + <string name="Male - Shrug"> + 男性 - è‚©ã‚’ã™ãã‚ã‚‹ + </string> + <string name="Male - Stick tougue out"> + 男性 - 舌を出㙠+ </string> + <string name="Male - Wow"> + 男性 - Wow + </string> + <string name="FeMale - Excuse me"> + 女性 - ã™ã¿ã¾ã›ã‚“ + </string> + <string name="FeMale - Get lost"> + 女性 - Get lost + </string> + <string name="FeMale - Blow kiss"> + 女性 - 投ã’ã‚ッス + </string> + <string name="FeMale - Boo"> + 女性 - Boo + </string> + <string name="Female - Bored"> + 女性 - 退屈 + </string> + <string name="Female - Hey"> + 女性 - Hey + </string> + <string name="Female - Laugh"> + 女性 - 笑ㆠ+ </string> + <string name="Female - Repulsed"> + 女性 - 拒絶 + </string> + <string name="Female - Shrug"> + 女性 - è‚©ã‚’ã™ãã‚ã‚‹ + </string> + <string name="Female - Stick tougue out"> + 女性 - 舌を出㙠+ </string> + <string name="Female - Wow"> + 女性 - Wow + </string> <string name="AvatarBirthDateFormat"> [year,datetime,slt]/[mthnum,datetime,slt]/[day,datetime,slt] </string> @@ -3614,4 +3762,22 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="texture_load_dimensions_error"> [WIDTH]*[HEIGHT] 以上ã®ç”»åƒã¯èªã¿è¾¼ã‚ã¾ã›ã‚“ </string> + <!-- overriding datetime formating. leave emtpy in for current localization this is not needed --> + <string name="dateTimeWeekdaysNames"> + Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday + </string> + <string name="dateTimeWeekdaysShortNames"> + Son: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="dateTimeMonthNames"> + Jan:Feb:Mar:Apr:May:Jun:Jul:Aug:Sep:Oct:Nov:Dec + </string> + <string name="dateTimeDayFormat"> + [MDAY] D + </string> + <string name="dateTimeAM">AM</string> + <string name="dateTimePM">PM</string> </strings> diff --git a/indra/newview/skins/default/xui/nl/floater_tools.xml b/indra/newview/skins/default/xui/nl/floater_tools.xml index f79d3dbd6b..212cac0a5b 100644 --- a/indra/newview/skins/default/xui/nl/floater_tools.xml +++ b/indra/newview/skins/default/xui/nl/floater_tools.xml @@ -33,7 +33,10 @@ <combo_box.item name="Reference" label="Referentie" /> </combo_box> - <check_box left="136" label="Beide zijden uitrekken" name="checkbox uniform"/> + <check_box left="136" name="checkbox uniform"/> + <text name="checkbox uniform label"> + Beide zijden uitrekken + </text> <check_box left="136" label="Texturen uitrekken" name="checkbox stretch textures"/> <check_box left="136" label="Gebruik grid" name="checkbox snap to grid"/> <button label="Opties..." label_selected="Opties..." name="Options..." height="18" bottom_delta="-15"/> @@ -403,7 +406,7 @@ <text name="glow label"> Gloed </text> - <check_box label="Volledige helderheid" name="checkbox fullbright" bottom_delta="-21"/> + <check_box label="Volledige helderheid" name="checkbox fullbright"/> <text name="tex gen"> Mapping </text> diff --git a/indra/newview/skins/default/xui/pl/floater_tools.xml b/indra/newview/skins/default/xui/pl/floater_tools.xml index 5bc3811ef6..5b4f99e9d1 100644 --- a/indra/newview/skins/default/xui/pl/floater_tools.xml +++ b/indra/newview/skins/default/xui/pl/floater_tools.xml @@ -67,7 +67,10 @@ <text name="RenderingCost" tool_tip="Pokazuje koszt renderowania tego obiektu"> þ: [COUNT] </text> - <check_box label="RozciÄ…gnij 2 Strony" name="checkbox uniform"/> + <check_box name="checkbox uniform"/> + <text name="checkbox uniform label"> + RozciÄ…gnij 2 Strony + </text> <check_box initial_value="true" label="RozciÄ…gnij TeksturÄ™" name="checkbox stretch textures"/> <check_box initial_value="true" label="Użyj siatki" name="checkbox snap to grid"/> <combo_box name="combobox grid mode" tool_tip="Wybierz rodzaj linijki siatki dla pozycjonowania obiektu"> diff --git a/indra/newview/skins/default/xui/pl/menu_login.xml b/indra/newview/skins/default/xui/pl/menu_login.xml index 2673f5c271..ed4937182f 100644 --- a/indra/newview/skins/default/xui/pl/menu_login.xml +++ b/indra/newview/skins/default/xui/pl/menu_login.xml @@ -6,6 +6,7 @@ </menu> <menu label="Pomoc" name="Help"> <menu_item_call label="[SECOND_LIFE]: Pomoc" name="Second Life Help"/> + <menu_item_call label="O [APP_NAME]" name="About Second Life"/> </menu> <menu label="Debug" name="Debug"> <menu label="Edytuj" name="Edit"> diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml index cebf03755b..787836a8bd 100644 --- a/indra/newview/skins/default/xui/pt/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml @@ -39,10 +39,10 @@ ID do Leilão: [ID] </panel.string> <panel.string name="need_tier_to_modify"> - Você deve ter sua compra aprovada para modificar este terreno. + Sua compra deve ser aprovada para você modificar este terreno. </panel.string> <panel.string name="group_owned_text"> - (PossuÃdo pelo Grupo) + (Propriedade do grupo) </panel.string> <panel.string name="profile_text"> Perfil... @@ -57,11 +57,11 @@ (nenhum) </panel.string> <panel.string name="sale_pending_text"> - (Venda Pendente) + (Venda pendendo) </panel.string> <panel.string name="no_selection_text"> Nenhum lote selecionado. -Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar seus detalhes. +Vá para o menu Mundo > Sobre o terreno ou selecione outro lote para mostrar os detalhes. </panel.string> <text name="Name:"> Nome: @@ -79,7 +79,7 @@ Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar se Classificação: </text> <text name="ContentRatingText"> - Adult + Adulto </text> <text name="Owner:"> Proprietário: @@ -94,14 +94,14 @@ Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar se Leyla Linden </text> <button label="Ajustar" name="Set..."/> - <check_box label="Permitir posse para o grupo" name="check deed" tool_tip="O gerente do grupo pode acionar essa terra ao grupo, então esta será mantida pelo gestor da ilha"/> - <button label="Passar" name="Deed..." tool_tip="Você só pode delegar esta terra se você for um gerente selecionado pelo grupo."/> - <check_box label="Proprietário faz contribuição com delegação" name="check contrib" tool_tip="Quando a terra é delegada ao grupo, o proprietário anterior contribui alocando terra suficiente para mantê-la."/> + <check_box label="Permitir doação para o grupo" name="check deed" tool_tip="Oficiais do grupo podem doar esse terreno ao grupo, passando a administração para o gestor da ilha"/> + <button label="Passar" name="Deed..." tool_tip="Você só pode doar o terreno se você for um dos oficiais do grupo selecionado."/> + <check_box label="Proprietário faz contribuição com doação" name="check contrib" tool_tip="Quando o terreno é doado ao grupo, o proprietário anterior contribui alocando terra suficiente para mantê-la."/> <text name="For Sale:"> - À Venda: + À venda: </text> <text name="Not for sale."> - Não está à Venda. + Não está à venda. </text> <text name="For Sale: Price L$[PRICE]."> Preço: L$[PRICE] (L$[PRICE_PER_SQM]/m²). @@ -111,10 +111,10 @@ Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar se À venda para: [BUYER] </text> <text name="Sell with landowners objects in parcel."> - À venda (Objetos incluÃdos). + À venda (objetos incluÃdos). </text> <text name="Selling with no objects in parcel."> - À venda (Objetos não incluÃdos). + À venda (objetos não incluÃdos). </text> <button label="Cancelar venda do terreno" label_selected="Cancelar venda do terreno" left="275" name="Cancel Land Sale" width="165"/> <text name="Claimed:"> @@ -137,7 +137,7 @@ Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar se </text> <button label="Comprar terreno..." label_selected="Comprar terreno..." left="130" name="Buy Land..." width="125"/> <button label="Dados do script" name="Scripts..."/> - <button label="Comprar para o Grupo" name="Buy For Group..."/> + <button label="Comprar para o grupo" name="Buy For Group..."/> <button label="Comprar passe..." label_selected="Comprar passe..." left="130" name="Buy Pass..." tool_tip="Um passe concede a você acesso temporário a este terreno." width="125"/> <button label="Abandonar terreno..." label_selected="Abandonar terreno..." name="Abandon Land..."/> <button label="Pedir terreno" name="Reclaim Land..."/> @@ -145,24 +145,22 @@ Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar se </panel> <panel label="CONTRATO" name="land_covenant_panel"> <panel.string name="can_resell"> - Terrenos comprados nesta região podem ser revendidos. + Permitido para terrenos comprados nesta região. </panel.string> <panel.string name="can_not_resell"> - Terrenos comprados nesta região não podem ser revendidos. + Proibido para terrenos comprados nesta região. </panel.string> <panel.string name="can_change"> - Terrenos comprados nesta região podem ser compartilhados -ou sub-divididos. + Permitido subdividir terrenos comprados nesta região. </panel.string> <panel.string name="can_not_change"> - Terrenos comprados nesta região não podem ser compartilhados -ou sub-divididos. + Proibido compartilhar ou subdividir terrenos comprados nesta região. </panel.string> <text name="estate_section_lbl"> Propriedade: </text> <text name="estate_name_text"> - mainland + continente </text> <text name="estate_owner_lbl"> Dono: @@ -174,7 +172,7 @@ ou sub-divididos. Não há corretor para esta Propriedade. </text_editor> <text name="covenant_timestamp_text"> - Última Alteração: Qua, Dez 31 16:00:00 1969 + Última modificação: Qua, Dez 31 16:00:00 1969 </text> <text name="region_section_lbl"> Região: @@ -192,19 +190,19 @@ ou sub-divididos. Classificação: </text> <text name="region_maturity_text"> - Adult + Adulto </text> <text name="resellable_lbl"> Revender: </text> <text name="resellable_clause"> - Terra nesta região não pode ser revendida. + Proibido revender terrenos nesta região. </text> <text name="changeable_lbl"> Subdividir: </text> <text name="changeable_clause"> - Terra nesta região não pode ser unida/sub-dividida. + Proibido juntar/subdividir terrenos nesta região. </text> </panel> <panel label="OBJETOS" name="land_objects_panel"> @@ -224,13 +222,13 @@ ou sub-divididos. [COUNT] de [MAX] ([AVAILABLE] disponÃveis) </text> <text name="Primitives parcel supports:" width="200"> - Prims suportadas pelo lote: + Prims suportados pelo lote: </text> <text left="214" name="object_contrib_text" width="152"> [COUNT] </text> <text name="Primitives on parcel:"> - Prims no Lote: + Prims no lote: </text> <text left="214" name="total_objects_text" width="48"> [COUNT] @@ -242,15 +240,15 @@ ou sub-divididos. [COUNT] </text> <button label="Mostrar" label_selected="Mostrar" name="ShowOwner" right="-135" width="60"/> - <button label="Retornar" name="ReturnOwner..." right="-10" tool_tip="Retornar os objetos aos seus donos." width="119"/> + <button label="Devolver" name="ReturnOwner..." right="-10" tool_tip="Devolver objetos a seus donos." width="119"/> <text left="14" name="Set to group:" width="180"> - Configurados ao grupo: + Reservado para o grupo: </text> <text left="214" name="group_objects_text" width="48"> [COUNT] </text> <button label="Mostrar" label_selected="Mostrar" name="ShowGroup" right="-135" width="60"/> - <button label="Retornar" name="ReturnGroup..." right="-10" tool_tip="Retornar os objetos para seus donos." width="119"/> + <button label="Devolver" name="ReturnGroup..." right="-10" tool_tip="Devolver objetos a seus donos." width="119"/> <text left="14" name="Owned by others:" width="128"> Propriedade de outros: </text> @@ -258,7 +256,7 @@ ou sub-divididos. [COUNT] </text> <button label="Mostrar" label_selected="Mostrar" name="ShowOther" right="-135" width="60"/> - <button label="Retornar" name="ReturnOther..." right="-10" tool_tip="Retornar os objetos aos seus donos." width="119"/> + <button label="Devolver" name="ReturnOther..." right="-10" tool_tip="Devolver objetos a seus donos." width="119"/> <text left="14" name="Selected / sat upon:" width="193"> Selecionado/Sentado: </text> @@ -273,7 +271,7 @@ ou sub-divididos. Donos dos objetos: </text> <button label="Atualizar lista" label_selected="Atualizar lista" left="118" name="Refresh List" tool_tip="Refresh Object List"/> - <button label="Retornar objetos..." label_selected="Retornar objetos..." left="230" name="Return objects..."/> + <button label="Devolver objetos..." label_selected="Devolver objetos..." left="230" name="Return objects..."/> <name_list name="owner list"> <name_list.columns label="Tipo" name="type"/> <name_list.columns label="Nome" name="name"/> @@ -299,32 +297,32 @@ Apenas lotes maiores podem ser listados na busca. Conteúdo Adulto </panel.string> <panel.string name="mature_check_mature_tooltip"> - A informação do seu lote ou seu conteúdo são considerados adulto. + Os dados do seu lote ou seu conteúdo são considerados adulto. </panel.string> <panel.string name="mature_check_adult_tooltip"> - A informação do seu lote ou seu conteúdo são considerados adulto. + Os dados do seu lote ou seu conteúdo são considerados adulto. </panel.string> <panel.string name="landing_point_none"> (nenhum) </panel.string> <panel.string name="push_restrict_text"> - Sem empurrar + Proibido empurrar </panel.string> <panel.string name="push_restrict_region_text"> - Sem empurrar (imposição na região) + Proibido empurrar (regulamento da região) </panel.string> <text name="allow_label"> Autorizar outros residentes a: </text> - <check_box label="Editar Terreno" name="edit land check" tool_tip="Se ativado, qualquer um pode modificar a forma da sua terra. É melhor deixar esta opção desativada, uma vez que você sempre pode editar seu próprio terreno."/> - <check_box label="Voar" name="check fly" tool_tip="Se ativado, os Residentes podem voar na sua terra. Se desativado, eles podem voar apenas para dentro e por cima de sua terra."/> + <check_box label="Editar terreno" name="edit land check" tool_tip="Se ativado, qualquer um pode modificar o terreno. É melhor deixar esta opção desativada, uma vez que você sempre pode editar seu próprio terreno."/> + <check_box label="Voar" name="check fly" tool_tip="Se ativado, residentes podem voar sobre seu terreno. Se desativado, eles podem voar apenas até chegar ou sobrevoar o seu terreno."/> <text name="allow_label2"> Criar objetos: </text> <check_box label="Residentes" name="edit objects check"/> <check_box label="Grupo" name="edit group objects check"/> <text name="allow_label3"> - Entrada do objeto: + Entrada de objetos: </text> <check_box label="Residentes" name="all object entry check"/> <check_box label="Grupo" name="group object entry check"/> @@ -334,10 +332,10 @@ Apenas lotes maiores podem ser listados na busca. <check_box label="Residentes" name="check other scripts"/> <check_box label="Grupo" name="check group scripts"/> <text name="land_options_label"> - Opções de terra: + Opções do terreno: </text> - <check_box label="Salvo (sem dano)" name="check safe" tool_tip="Se ativado, ajusta o terreno para Seguro, desabilitando combate com danos. Se não ativado, o combate com danos é habilitado."/> - <check_box label="Sem Empurrar" name="PushRestrictCheck" tool_tip="Evita scripts que empurram. A ativação dessa opção pode ser útil para prevenir comportamentos desordeiros na sua terra."/> + <check_box label="Seguro (sem danos)" name="check safe" tool_tip="Se ativado, ajusta o terreno para Seguro, impedindo lutas com danos. Se não ativado, lutas com danos é habilitado."/> + <check_box label="Proibido empurrar" name="PushRestrictCheck" tool_tip="Evita scripts que empurram. Ativar essa opção ajuda a prevenir comportamentos desordeiros no seu terreno."/> <check_box label="Mostrar terreno nos resultados de busca (L$30/semana)" name="ShowDirectoryCheck" tool_tip="Permitir que as pessoas vejam este terreno nos resultados de busca"/> <combo_box left="265" name="land category with adult" width="155"> <combo_box.item label="Qualquer categoria" name="item0"/> @@ -348,7 +346,7 @@ Apenas lotes maiores podem ser listados na busca. <combo_box.item label="Educacional" name="item5"/> <combo_box.item label="Jogos" name="item6"/> <combo_box.item label="Moradia" name="item7"/> - <combo_box.item label="Amigável a Novos Usuários" name="item8"/> + <combo_box.item label="Amigável a novos usuários" name="item8"/> <combo_box.item label="Parques & Natureza" name="item9"/> <combo_box.item label="Residencial" name="item10"/> <combo_box.item label="Compras" name="item11"/> @@ -362,7 +360,7 @@ Apenas lotes maiores podem ser listados na busca. <combo_box.item label="Educacional" name="item5"/> <combo_box.item label="Jogos" name="item6"/> <combo_box.item label="Moradia" name="item7"/> - <combo_box.item label="Amigável a Novos Usuários" name="item8"/> + <combo_box.item label="Amigável a novos usuários" name="item8"/> <combo_box.item label="Parques e Natureza" name="item9"/> <combo_box.item label="Residencial" name="item10"/> <combo_box.item label="Compras" name="item11"/> @@ -376,10 +374,10 @@ Apenas lotes maiores podem ser listados na busca. <text name="landing_point"> Ponto de Aterrissagem: [LANDING] </text> - <button label="Definir" label_selected="Definir" name="Set" tool_tip="Define o ponto de aterrissagem aonde o visitante chega. Define para o ponto em que seu avatar se encontra neste lote."/> + <button label="Definir" label_selected="Definir" name="Set" tool_tip="Define o ponto de aterrissagem de visitantes. Define para o ponto em que seu avatar se encontra neste lote."/> <button label="Limpar" label_selected="Limpar" name="Clear" tool_tip="Limpar o ponto de aterrissagem."/> <text name="Teleport Routing: "> - Rota de Teletransporte: + Rota de teletransporte: </text> <combo_box left="140" name="landing type" tool_tip="Rota de Teletransporte -- Selecione como tratar os teletransportes no seu lote." width="160"> <combo_box.item label="Bloqueado" name="Blocked"/> @@ -408,7 +406,7 @@ Textura: </text> <texture_picker label="" left="97" name="media texture" tool_tip="Clique para escolher uma imagem"/> <text name="replace_texture_help"> - Objetos com esta textura vão aparecer no filme ou página da web depois de clicar em Tocar. Selecione outras texturas clicando nas miniaturas. + Objetos com esta textura vão aparecer no filme ou página da web depois de clicar em Tocar. Selecione outras texturas clicando nas miniaturas. </text> <check_box label="Escala automática" left="97" name="media_auto_scale" tool_tip="Marcando esta opção o conteúdo se ajustará ao lote automaticamente. A mÃdia pode se tornar lenta e com baixa qualidade visual mas nenhum outro ajuste de textura ou alinhamento será necessário."/> <text left="102" name="media_size" tool_tip="Tamanho para desenhar a mÃdia Web, deixar 0 como padrão." width="115"> @@ -423,7 +421,7 @@ Textura: Opções de MÃdia: </text> - <check_box label="MÃdia em Repetição" name="media_loop" tool_tip="Executar a mÃdia repetidamente. Quando a mÃdia terminar a execução, ela reiniciará do começo."/> + <check_box label="Repetir mÃdia" name="media_loop" tool_tip="Executar a mÃdia repetidamente. Quando a mÃdia chegar ao fim, ela recomeça."/> </panel> <panel label="SOM" name="land_audio_panel"> <check_box label="Ocultar URL" name="hide_music_url" tool_tip="Selecionar esta opção oculta o URL de música a visitantes não autorizados aos dados do terreno."/> diff --git a/indra/newview/skins/default/xui/pt/floater_god_tools.xml b/indra/newview/skins/default/xui/pt/floater_god_tools.xml index 82f21fac70..8003a35d16 100644 --- a/indra/newview/skins/default/xui/pt/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_god_tools.xml @@ -2,7 +2,7 @@ <floater name="godtools floater" title="FERRAMENTAS DE DEUS"> <tab_container name="GodTools Tabs"> <panel label="Grade" name="grid"> - <button label="Limpar os cachês de visibilidade do mapa da região." label_selected="Limpar os cachês de visibilidade do mapa da região." name="Flush This Region's Map Visibility Caches"/> + <button label="Limpar os caches de visibilidade do mapa da região." label_selected="Limpar os caches de visibilidade do mapa da região." name="Flush This Region's Map Visibility Caches"/> </panel> <panel label="Região" name="region"> <text name="Region Name:"> @@ -10,11 +10,11 @@ </text> <check_box label="Prelúdio" name="check prelude" tool_tip="Ajustar para tornar esta região um prelúdio."/> <check_box label="Fixar Sol" name="check fixed sun" tool_tip="Fixa a posição do sol (como em Região/Estados) > Terreno."/> - <check_box label="Redefinir Home no teletransporte" name="check reset home" tool_tip="Quando um residente sair, definir o destino com sua posição inicial."/> + <check_box label="Redefinir InÃcio no teletransporte" name="check reset home" tool_tip="Quando um residente sair, definir o destino com sua posição inicial."/> <check_box label="VisÃvel" name="check visible" tool_tip="Ajustar para fazer essa região visÃvel para os não-deuses"/> <check_box label="Dano" name="check damage" tool_tip="Ajustar para permitir dano nesta região"/> <check_box label="Bloquear ratreamento do Tráfego" name="block dwell" tool_tip="Configure isto para fazer a região não computar o tráfego."/> - <check_box label="Bloquear Terraform" name="block terraform" tool_tip="Ajustar para desabilitar as pessoas a terraplanarem seus terrenos"/> + <check_box label="Bloquear terraplenagens" name="block terraform" tool_tip="Ajustar para desabilitar as pessoas a terraplanarem seus terrenos"/> <check_box label="Sandbox" name="is sandbox" tool_tip="Alterar se esta região for uma sandbox."/> <button label="Nivelar o terreno" label_selected="Nivelar o Terreno" name="Bake Terrain" tool_tip="Salva o terreno atual como padrão."/> <button label="Reverter Terreno" label_selected="Reverter Terreno" name="Revert Terrain" tool_tip="Substituir o terreno atual pelo padrão."/> @@ -63,9 +63,9 @@ <button label="Apagar objetos programados do alvo em outras terras" label_selected="Apagar objetos programados do alvo em outras terras" name="Delete Target's Scripted Objects On Others Land" tool_tip="Apagar todos os objetos programados possuÃdos pelo alvo nas terras fora do domÃnio do alvo. Objetos (sem cópia) irão retornar."/> <button label="Apagar objetos programados do Alvo em qualquer terreno" label_selected="Apagar objetos programados do Alvo em qualquer terreno" name="Delete Target's Scripted Objects On *Any* Land" tool_tip="Apagar todos os objetos programados do alvo nesta região. Objetos (sem cópia) irão retornar."/> <button label="Apagar *TODOS* os objetos do alvo" label_selected="Apagar *TODOS* os objetos do alvo" name="Delete *ALL* Of Target's Objects" tool_tip="Apagar todos os objetos possuÃdos pelo alvo nesta região. Objetos (sem cópia) objetos irão retornar."/> - <button label="Pegar os maiores colidentes" label_selected="Pegar os maiores colidentes" name="Get Top Colliders" tool_tip="Pega a lista de objetos que estão experimentando as chamadas mais freqüentes."/> - <button label="Pegar os scripts principais" label_selected="Pegar os scripts principais" name="Get Top Scripts" tool_tip="Pegar a lista de objetos programados com a maior duração em tempo de execução."/> - <button label="Informações de Scripts" label_selected="Informações de Scripts" name="Scripts digest" tool_tip="Pega uma lista de todos os scripts e o número de ocorrências de cada um."/> + <button label="Principais colidentes" label_selected="Lista dos maiores colidentes" name="Get Top Colliders" tool_tip="Gera a lista de objetos que estão experimentando as chamadas mais frequentes."/> + <button label="Principais scripts" label_selected="Lista dos scripts principais" name="Get Top Scripts" tool_tip="Gera a lista de objetos programados com a maior duração em tempo de execução."/> + <button label="Dados dos scripts" label_selected="Dados dos scripts" name="Scripts digest" tool_tip="Gera uma lista de todos os scripts e o número de ocorrências de cada um."/> </panel> <panel label="Requisição" name="request"> <text name="Destination:"> diff --git a/indra/newview/skins/default/xui/pt/floater_postcard.xml b/indra/newview/skins/default/xui/pt/floater_postcard.xml index d3c5b6ec23..9740fbcb4d 100644 --- a/indra/newview/skins/default/xui/pt/floater_postcard.xml +++ b/indra/newview/skins/default/xui/pt/floater_postcard.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Postcard" title="ENVIAR FOTO VIA EMAIL"> <text name="to_label" width="135"> - Email do Destinatário: + Para (email): </text> <line_editor left="143" name="to_form" width="127"/> <text name="from_label"> - Seu Email: + De (email): </text> <line_editor left="143" name="from_form" width="127"/> <text name="name_label"> @@ -16,7 +16,7 @@ Assunto: </text> <line_editor left="143" name="subject_form" width="127"/> - <line_editor label="Digite seu assunto aqui." name="subject_form"/> + <line_editor label="Digite o assunto aqui" name="subject_form"/> <text name="msg_label"> Mensagem: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_tools.xml b/indra/newview/skins/default/xui/pt/floater_tools.xml index 958a166dfc..74b45f1d1e 100644 --- a/indra/newview/skins/default/xui/pt/floater_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_tools.xml @@ -67,8 +67,11 @@ <text name="RenderingCost" tool_tip="Mostra o cálculo do custo de renderização do objeto"> þ: [COUNT] </text> - <check_box label="Esticar ambos os lados" name="checkbox uniform"/> - <check_box initial_value="true" label="Esticar Texturas" name="checkbox stretch textures"/> + <check_box name="checkbox uniform"/> + <text name="checkbox uniform label"> + Esticar ambos os lados + </text> + <check_box initial_value="true" label="Esticar texturas" name="checkbox stretch textures"/> <check_box initial_value="true" label="Mostrar na grade" name="checkbox snap to grid"/> <combo_box name="combobox grid mode" tool_tip="Selecione o tipo de régua da grade onde o objeto será colocado"> <combo_box.item label="Grid SL" name="World"/> @@ -115,7 +118,7 @@ </text> <button label="Aplicar" label_selected="Aplicar" name="button apply to selection" tool_tip="Modificar a terra selecionada"/> <text left="134" name="obj_count"> - Objects: [COUNT] + Objetos: [COUNT] </text> <text left="134" name="prim_count"> Prims: [COUNT] @@ -183,10 +186,10 @@ <name_box initial_value="Carregando..." name="Group Name Proxy"/> <button label="Doar" label_selected="Doar" name="button deed" tool_tip="Ao doar este item, o próximo dono terá permissões de próximo dono. Objetos de grupos podem ser doados por um oficial do grupo."/> <check_box label="Compartilhar" name="checkbox share with group" tool_tip="Permitir que todos os membros do grupo tenhas suas permissões de modificação para este objeto. Faça uma doação para ativar restrições de função."/> - <text name="label click action" width="220"> + <text name="label click action"> Clique para: </text> - <combo_box name="clickaction" width="192"> + <combo_box name="clickaction"> <combo_box.item label="Tocar (padrão)" name="Touch/grab(default)"/> <combo_box.item label="Sentar no objeto" name="Sitonobject"/> <combo_box.item label="Comprar objeto" name="Buyobject"/> diff --git a/indra/newview/skins/default/xui/pt/floater_world_map.xml b/indra/newview/skins/default/xui/pt/floater_world_map.xml index 115192203f..efd90dfaa4 100644 --- a/indra/newview/skins/default/xui/pt/floater_world_map.xml +++ b/indra/newview/skins/default/xui/pt/floater_world_map.xml @@ -28,7 +28,7 @@ <text name="auction_label"> leilão de terrenos </text> - <button label="Ir para Casa" label_selected="Ir para casa" name="Go Home" tool_tip="Teletransportar para meu inÃcio"/> + <button label="Voltar ao meu inÃcio" label_selected="Voltar ao meu inÃcio" name="Go Home" tool_tip="Teletransportar para meu inÃcio"/> <text name="Home_label"> InÃcio </text> diff --git a/indra/newview/skins/default/xui/pt/menu_inventory.xml b/indra/newview/skins/default/xui/pt/menu_inventory.xml index e3c12e8b7d..345534261a 100644 --- a/indra/newview/skins/default/xui/pt/menu_inventory.xml +++ b/indra/newview/skins/default/xui/pt/menu_inventory.xml @@ -49,6 +49,8 @@ <menu_item_call label="Abrir" name="Sound Open"/> <menu_item_call label="Substituir equipamento" name="Replace Outfit"/> <menu_item_call label="Adicionar ao equipamento" name="Add To Outfit"/> + <menu_item_call label="Tirar do look atual" name="Remove From Outfit"/> + <menu_item_call label="Encontrar original" name="Find Original"/> <menu_item_call label="Remover item" name="Purge Item"/> <menu_item_call label="Restaurar item" name="Restore Item"/> <menu_item_call label="Abrir" name="Open"/> @@ -58,6 +60,7 @@ <menu_item_call label="Copiar" name="Copy"/> <menu_item_call label="Colar" name="Paste"/> <menu_item_call label="Colar como link" name="Paste As Link"/> + <menu_item_call label="Remover link" name="Remove Link"/> <menu_item_call label="Apagar" name="Delete"/> <menu_item_call label="Excluir pasta do sistema" name="Delete System Folder"/> <menu_item_call label="Pasta conversa em conferência" name="Conference Chat Folder"/> diff --git a/indra/newview/skins/default/xui/pt/menu_login.xml b/indra/newview/skins/default/xui/pt/menu_login.xml index a7df67a6b5..8ea87a06d1 100644 --- a/indra/newview/skins/default/xui/pt/menu_login.xml +++ b/indra/newview/skins/default/xui/pt/menu_login.xml @@ -6,6 +6,7 @@ </menu> <menu label="Ajuda" name="Help"> <menu_item_call label="Ajuda do [SECOND_LIFE]" name="Second Life Help"/> + <menu_item_call label="Sobre [APP_NAME]" name="About Second Life"/> </menu> <menu_item_check label="Exibir menu de depuração" name="Show Debug Menu"/> <menu label="Depurar" name="Debug"> diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index 2f3345741c..84ad056df6 100644 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -47,8 +47,8 @@ <menu_item_check label="Coordenadas" name="Coordinates"/> <menu_item_check label="Propriedades do lote" name="Parcel Properties"/> </menu> - <menu_item_call label="Teletransportar para inÃcio" name="Teleport Home"/> - <menu_item_call label="Definir como casa" name="Set Home to Here"/> + <menu_item_call label="Teletransportar para meu inÃcio" name="Teleport Home"/> + <menu_item_call label="Definir como InÃcio" name="Set Home to Here"/> <menu label="Sol" name="Environment Settings"> <menu_item_call label="Amanhecer" name="Sunrise"/> <menu_item_call label="Meio-dia" name="Noon"/> @@ -297,7 +297,7 @@ <menu_item_call label="Force Owner To Me" name="Force Owner To Me"/> <menu_item_call label="Force Owner Permissive" name="Force Owner Permissive"/> <menu_item_call label="Excluir" name="Delete"/> - <menu_item_call label="Lock" name="Lock"/> + <menu_item_call label="Bloquear" name="Lock"/> </menu> <menu label="Lote" name="Parcel"> <menu_item_call label="Force Owner To Me" name="Owner To Me"/> diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index b888510922..462dcf2b21 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -199,7 +199,7 @@ Convite outros membros dentro de 48 horas. Por favor, selecione um indivÃduo para realizar a venda se o valor for 0 L$. </notification> <notification name="ConfirmLandSaleChange"> - [LAND_SIZE] m² selecionados de terra estão sendo configurados para venda. + [LAND_SIZE] m² selecionados de terreno estão sendo configurados para venda. Seu preço de venda será L$[SALE_PRICE] e está autorizado para venda para [NAME]. Gostaria de continuar a fazer essa alteração? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Continuar"/> </notification> @@ -211,24 +211,24 @@ O preço será L$[SALE_PRICE] e [NAME] pode comprar o terreno. <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="ReturnObjectsDeededToGroup"> - Você tem certeza de que quer retornar todos os objetos compartilhados com o grupo '[NAME]' neste lote de terra, para o inventário do seu antigo Proprietário? + Tem certeza de que quer devolver todos os objetos compartilhados com o grupo '[NAME]' neste lote, para o inventário do seu antigo Proprietário? *AVISO* Isso irá deletar os objetos não transferÃveis doados ao grupo! Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="ReturnObjectsOwnedByUser"> - Você tem certeza de que deseja retornar todos os objetos do residente '[NAME]' neste lote para o inventário dele? + Você tem certeza de que deseja devolver todos os objetos do residente '[NAME]' neste lote para o inventário dele? Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="ReturnObjectsOwnedBySelf"> Você tem certeza de que deseja retornar todos os objetos de sua propriedade neste lote para seu inventário? Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="ReturnObjectsNotOwnedBySelf"> Você tem certeza de que deseja retornar todos os objetos que NÃO são seus para o inventário de seus proprietários? @@ -237,7 +237,7 @@ Objetos transferÃveis doados ao grupo retornarão para seu proprietários. *AVISO* Isso fará com que os objetos não-transferÃveis sejam deletados! Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="ReturnObjectsNotOwnedByUser"> Você tem certeza de que deseja retornar todos os objetos deste lote NÃO pertencentes a [NAME] para o inventário do proprietário? @@ -245,11 +245,11 @@ Objetos: [N] *AVISO* Esta ação irá apagar os objetos não transferÃveis doados ao grupo! Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="ReturnAllTopObjects"> Você tem certeza de que deseja enviar todos os objetos listados de volta aos inventários de seus proprietários? - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="DisableAllTopObjects"> Você tem certeza que deseja desativar todos os objetos desta região? @@ -259,10 +259,10 @@ Objetos: [N] Retornar os objetos deste lote que NÃO são compartilhados com o grupo [NAME] de volta para seus proprietários? Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="UnableToDisableOutsideScripts"> - Não é possÃvel desabilitar scripts externos. + Não é possÃvel desativar scripts externos. Toda esta região possui dano habilitado. Scripts devem ser permitidos para fazer as armas funcionarem. </notification> @@ -301,7 +301,7 @@ Para colocar a mÃdia em só uma face, selecione Selecionar face e clique na fac Você deve concordar com os Termos de Serviço para continuar a entrar no [SECOND_LIFE]. </notification> <notification name="CouldNotPutOnOutfit"> - Não foi possÃvel vestir o conjunto. A pasta do conjunto não contém roupas, partes do corpo ou acessórios. + Não foi possÃvel vestir o look. A pasta do look não contém roupas, partes do corpo ou acessórios. </notification> <notification name="CannotWearTrash"> Não é possÃvel usar roupas ou partes do corpo que estão no lixo. @@ -311,17 +311,17 @@ Para colocar a mÃdia em só uma face, selecione Selecionar face e clique na fac Ele ultrapassa o limite de anexos, de [MAX_ATTACHMENTS] objetos. Remova um objeto para poder anexar outro. </notification> <notification name="CannotWearInfoNotComplete"> - Você não pode vestir este item porque ele ainda não carregou. Por favor, tente novamente em um minuto. + Você não pode vestir este item porque ele ainda não carregou. Tente novamente em um minuto. </notification> <notification name="MustHaveAccountToLogIn"> Oops! Alguma coisa foi deixada em branco. Você precisa entrar com ambos os Nome e Sobrenome do seu avatar. -Você precisa de uma conta para entrar no [SECOND_LIFE]. Você gostaria de criar uma conta agora? +Você precisa de uma conta para entrar no [SECOND_LIFE]. Você gostaria de abrir uma conta agora? <url name="url"> https://join.secondlife.com/index.php?lang=pt-BR </url> - <usetemplate name="okcancelbuttons" notext="Tentar novamente" yestext="Criar uma nova conta"/> + <usetemplate name="okcancelbuttons" notext="Tentar novamente" yestext="Abrir conta"/> </notification> <notification name="AddClassified"> Os anúncios serão publicados na seção 'Classificados' das buscas e em [http://secondlife.com/community/classifieds secondlife.com] durante uma semana. @@ -350,7 +350,7 @@ Tem certeza de que quer prosseguir? </notification> <notification name="DeleteAvatarPick"> Excluir destaque <nolink>[PICK]</nolink>? - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Delete"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Apagar"/> </notification> <notification name="PromptGoToEventsPage"> Ir até a página web de enventos [SECOND_LIFE] ? @@ -360,10 +360,10 @@ Tem certeza de que quer prosseguir? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Ir à página"/> </notification> <notification name="SelectProposalToView"> - Por favor, selecione uma proposta para visualizar. + Selecione uma proposta para visualizar. </notification> <notification name="SelectHistoryItemToView"> - Por favor, selecione um item do histórico para exibÃ-lo. + Selecione um item do histórico para exibi-lo. </notification> <notification name="CacheWillClear"> O cache será limpo quando o [APP_NAME] for iniciado. @@ -406,7 +406,7 @@ O objeto pode estar fora de alcance ou foi deletado. O objeto pode estar fora de alcance ou foi deletado. </notification> <notification name="SaveNotecardFailReason"> - Houve um problema em salvar uma nota devido a seguinte razão: [REASON]. Por favor, tente salvar a nota novamente mais tarde. + Houve um problema em salvar uma nota devido a seguinte razão: [REASON]. Tente salvar a nota novamente mais tarde. </notification> <notification name="ScriptCannotUndo"> Não foi possÃvel desfazer todas as mudanças na sua versão de script. @@ -415,7 +415,7 @@ Gostaria de carregar a última versão salva? <usetemplate name="okcancelbuttons" notext="Não" yestext="Sim"/> </notification> <notification name="SaveScriptFailReason"> - Houve um problema em salvar um script devido à seguinte razão: [REASON]. Por favor, tente salvar novamente o script mais tarde. + Houve um problema em salvar um script devido à seguinte razão: [REASON]. Tente salvar novamente o script mais tarde. </notification> <notification name="SaveScriptFailObjectNotFound"> Não foi possÃvel salvar o script pois o objeto em que ele está não pôde ser encontrado. @@ -426,7 +426,7 @@ O objeto pode estar fora de alcance ou ter sido deletado. </notification> <notification name="StartRegionEmpty"> Oops, você ainda não definiu sua região de partida. -Digite o nome da região na caixa 'Ponto de partida' ou selecione 'Última localização' ou 'Minha casa' como ponto de partida. +Digite o nome da região na caixa 'Ponto de partida' ou selecione 'Última localização' ou 'Meu inÃcio' como ponto de partida. <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="CouldNotStartStopScript"> @@ -500,15 +500,15 @@ Ele ou ela vai ficar temporariamente incapaz de se mover, usar o bate-papo ou in <usetemplate canceltext="Cancelar" name="yesnocancelbuttons" notext="Descongelar" yestext="Congelar"/> </notification> <notification name="EjectAvatarFullname"> - Ejetar [AVATAR_NAME] da sua terra? + Ejetar [AVATAR_NAME] do seu terreno? <usetemplate canceltext="Cancelar" name="yesnocancelbuttons" notext="Ejetar e Banir" yestext="Ejetar"/> </notification> <notification name="EjectAvatarNoBan"> - Ejetar este avatar da sua terra? + Ejetar este avatar do seu terreno? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Ejetar"/> </notification> <notification name="EjectAvatarFullnameNoBan"> - Ejetar [AVATAR_NAME] da sua terra? + Ejetar [AVATAR_NAME] do seu terreno? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Ejetar"/> </notification> <notification name="EjectAvatarFromGroup"> @@ -519,7 +519,7 @@ Ele ou ela vai ficar temporariamente incapaz de se mover, usar o bate-papo ou in </notification> <notification name="AcquireErrorObjectSpan"> Erro de aquisição: Objetos criados em mais de uma região. -Por favor, mova todos os objetos a serem adquiridos para uma mesma região. +Mova todos os objetos a serem adquiridos para uma mesma região. </notification> <notification name="PromptGoToCurrencyPage"> [EXTRA] @@ -766,29 +766,29 @@ Nenhum grupo selecionado. A região do terreno não pôde ser localizada. </notification> <notification name="CannotDeedLandMultipleSelected"> - Impossibilitado de passar a propriedade da terra: -Selecionados vários lotes. + Não é possÃvel doar o terreno: +Vários lotes foram selecionados. Tente selecionar um único lote. </notification> <notification name="CannotDeedLandWaitingForServer"> - Impossibilitado de passar a propriedade da terra: -Esperando pelo servidor informar de quem é a propriedade. + Não é possÃvel doar o terreno: +Esperando o servidor informar de quem é a propriedade. Por favor, tente novamente. </notification> <notification name="CannotDeedLandNoTransfer"> - Não é possÃvel transferir posse do terreno: -A região [REGION] não permite transferência do terreno. + Não é possÃvel doar o terreno: +A região [REGION] não permite transferências de terreno. </notification> <notification name="CannotReleaseLandWatingForServer"> - Impossibilitado de abandonar a terra: + Não é possÃvel abandonar o terreno: Esperando o servidor atualizar as informações do lote. Tente novamente em alguns segundos. </notification> <notification name="CannotReleaseLandSelected"> - Impossibilitado de abandonar a terra: + Não é possÃvel abandonar o terreno: Você não é dono de todos os lotes selecionados. Por favor, selecione um único lote. @@ -807,25 +807,25 @@ A região do terreno não pôde ser localizada. A região [REGION] não permite transferência de terreno. </notification> <notification name="CannotReleaseLandPartialSelection"> - Impossibilitado de abandonar a terra: -Você deve selecionar um lote inteiro para liberá-lo. + Não é possÃvel abandonar o terreno: +Selecione um lote inteiro e abra mão dele. Selecione um lote inteiro ou primeiro divida seu lote. </notification> <notification name="ReleaseLandWarning"> - Você está para liberar [AREA] m² de terra. -Liberando este terreno, o liberará de suas posses, mas não lhe concederá quaisquer L$. + Você está prestes a abrir mão de [AREA] m². +Ao abrir mão deste terreno, ele deixa de ser uma propriedade. Note que você não receberá nenhum L$. -Liberar esta terra? +Abrir mão deste terreno? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Renunciar"/> </notification> <notification name="CannotDivideLandNothingSelected"> - Impossibilitado de dividir a terra: + Não é possÃvel dividir o terreno: -Nenhum lote selecionado. +Nenhum lote foi selecionado. </notification> <notification name="CannotDivideLandPartialSelection"> - Impossibilitado de dividir a terra: + Não é possÃvel dividir o terreno: Você selecionou um lote inteiro. Tente selecionar uma parte do lote. @@ -841,34 +841,34 @@ Quer dividir o terreno? A região do terreno não pôde ser localizada. </notification> <notification name="CannotJoinLandNoRegion"> - Houve um problema ao processar a junção dos terrenos: + Houve um problema ao processar a união dos terrenos: A região do terreno não pôde ser localizada. </notification> <notification name="CannotJoinLandNothingSelected"> - Não é possÃvel unir terreno: + Não é possÃvel unir os terrenos: Nenhum lote selecionado. </notification> <notification name="CannotJoinLandEntireParcelSelected"> - Impossibilitado de unir a terra: + Não é possÃvel unir os terrenos: Você selecionou apenas um lote. Selecione a terra através de ambos os lotes. </notification> <notification name="CannotJoinLandSelection"> - Impossibilitado de unir a terra: + Não é possÃvel unir os terrenos: Você deve selecionar mais de um lote. -Selecione a terra através de ambos os lotes. +Selecione terrenos localizados em dois lotes. </notification> <notification name="JoinLandWarning"> - Unir esta terra vai criar um grande lote que envolve todos os lotes que intersectam o retângulo selecionado. + Unir os terrenos vai criar um grande lote, formado por todos os lotes que intersectam o retângulo selecionado. Você vai ter que redefinir nome e as opções do novo lote. -Unir a terra? +Unir os terrenos? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Unir"/> </notification> <notification name="ConfirmNotecardSave"> - Esta nota precisa ser salva antes do item ser copiado ou visualizado. Salvar nota? + Esta anotação precisa ser salva antes de o item ser copiado ou visualizado. Salvar anotação? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Salvar"/> </notification> <notification name="ConfirmItemCopy"> @@ -1027,24 +1027,23 @@ Tem certeza de que deseja pegar estes itens? <usetemplate name="okcancelbuttons" notext="Não" yestext="Sim"/> </notification> <notification name="CantBuyLandAcrossMultipleRegions"> - Não foi possÃvel comprar terreno, pois a seleção abrange várias regiões. + Não foi possÃvel comprar o terreno, pois a seleção abrange várias regiões. Por favor, selecione uma área menor e tente novamente. </notification> <notification name="DeedLandToGroup"> - Na transferência de propriedade deste lote, o grupo deverá ter e manter créditos suficientes de uso da terra. -O preço de aquisição dos terrenos não é restituÃdo ao o proprietário. Se uma parcela transferida é vendida, o preço de venda é dividido igualmente entre os membros do grupo. + No ato da doação deste lote, o grupo deverá ter e manter créditos suficientes para ter o terreno. +O preço de aquisição dos terrenos não é restituÃdo ao proprietário. Se uma parcela doada for vendida, o preço de venda é dividido igualmente entre os membros do grupo. -Transferir propriedade de [AREA] m² de terra ao grupo '[GROUP_NAME]'? - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Acionar"/> +Doar [AREA] m² ao grupo '[GROUP_NAME]'? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="DeedLandToGroupWithContribution"> - Na transferência de propriedade deste lote, o grupo deverá ter e manter créditos suficientes de uso da terra. -A Transferência incluirá uma contribuição de terra simultanea para o grupo de '[FIRST_NAME] [LAST_NAME]'. -O preço da compra não será restituÃdo ao proprietário. Se um lote for vendido, o preço da venda será dividido igualmente entre os membros do grupo. + No ato da doação deste lote, o grupo deverá ter e manter créditos suficientes para ter o terreno. A doação inclui uma contribuição simultânea para o grupo de '[FIRST_NAME] [LAST_NAME]'. +O preço de aquisição dos terrenos não é restituÃdo ao proprietário. Se uma parcela doada for vendida, o preço de venda é dividido igualmente entre os membros do grupo. -Transferir propriedade destes [AREA] m² de terreno para o grupo '[GROUP_NAME]'? - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Acionar"/> +Doar [AREA] m² para o grupo '[GROUP_NAME]'? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="DisplaySetToSafe"> Configurações de display foram ajustadas para nÃveis de segurança porque você especificou -- opção de segurança. @@ -1067,7 +1066,7 @@ Você chegou a uma região próxima. <notification name="AvatarMovedHome"> Esse destino não está disponÃvel no momento. Você chegou a uma região próxima. -Pense em usar outra região como casa. +Pense em usar outra região como seu inÃcio. </notification> <notification name="ClothingLoading"> As suas roupas estão sendo transferidas. @@ -1127,7 +1126,7 @@ Isso é realmente útil apenas para depuração. <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="KickUsersFromRegion"> - Teletransportar para casa todos os residentes nesta região? + Teletransportar para o inÃcio todos os residentes nesta região? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="EstateObjectReturn"> @@ -2150,7 +2149,7 @@ Objetos não transferÃveis dados ao grupo foram deletados. </notification> <notification name="NotSafe"> A opção 'danos' desta região está ativada. -Você pode se dar mal aqui. Se você morre, você será teletransportado de volta para casa. +Você pode se dar mal aqui. Se você morrer, você será teletransportado de volta para seu inÃcio. </notification> <notification name="NoFly"> Esta área desativou a opção de voar. @@ -2608,7 +2607,7 @@ Se você continuar a receber esta mensagem, consulte o [SUPPORT_SITE]. - A memória do seu sistema não suporta os requisitos mÃnimos exigidos. </global> <global name="You can only set your 'Home Location' on your land or at a mainland Infohub."> - Se você tem um terreno, seu terreno pode ser sua casa. + Se você tem um terreno, seu terreno pode ser seu inÃcio. Outra opção é procurar por lugares com a tag 'Infohub' no mapa. </global> </notifications> diff --git a/indra/newview/skins/default/xui/pt/panel_login.xml b/indra/newview/skins/default/xui/pt/panel_login.xml index 61cdbaef13..588b8deaa3 100644 --- a/indra/newview/skins/default/xui/pt/panel_login.xml +++ b/indra/newview/skins/default/xui/pt/panel_login.xml @@ -25,7 +25,7 @@ </text> <combo_box name="start_location_combo"> <combo_box.item label="Última posição" name="MyLastLocation"/> - <combo_box.item label="Minha casa" name="MyHome"/> + <combo_box.item label="Meu inÃcio" name="MyHome"/> </combo_box> <button label="conectar" name="connect_btn"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/pt/panel_navigation_bar.xml b/indra/newview/skins/default/xui/pt/panel_navigation_bar.xml index 511c4426bb..01930bf3b3 100644 --- a/indra/newview/skins/default/xui/pt/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/pt/panel_navigation_bar.xml @@ -3,7 +3,7 @@ <panel name="navigation_panel"> <pull_button name="back_btn" tool_tip="Voltar para região anterior"/> <pull_button name="forward_btn" tool_tip="Avançar uma região"/> - <button name="home_btn" tool_tip="Teletransportar para minha casa"/> + <button name="home_btn" tool_tip="Teletransportar para meu inÃcio"/> <location_input label="Onde" name="location_combo"/> <search_combo_box label="Busca" name="search_combo_box" tool_tip="Busca"> <combo_editor label="Buscar no [SECOND_LIFE]" name="search_combo_editor"/> diff --git a/indra/newview/skins/default/xui/pt/panel_people.xml b/indra/newview/skins/default/xui/pt/panel_people.xml index 0b274d6faa..17f5b6cbac 100644 --- a/indra/newview/skins/default/xui/pt/panel_people.xml +++ b/indra/newview/skins/default/xui/pt/panel_people.xml @@ -52,11 +52,11 @@ Em busca de alguém para conversar? Procure no [secondlife:///app/worldmap Mapa- </panel> </tab_container> <panel name="button_bar"> - <button label="Perfil" name="view_profile_btn" tool_tip="Exibir fotografia, grupos e outras informações dos residentes"/> - <button label="MI" name="im_btn" tool_tip="Iniciar MI"/> - <button label="Chamada" name="call_btn" tool_tip="Ligar para este residente"/> - <button label="Compartilhar" name="share_btn"/> - <button label="Teletransporte" name="teleport_btn" tool_tip="Oferecer teletransporte"/> + <button label="Perfil" name="view_profile_btn" tool_tip="Exibir fotografia, grupos e outras informações dos residentes" width="50"/> + <button label="MI" name="im_btn" tool_tip="Iniciar MI" width="24"/> + <button label="Chamada" name="call_btn" tool_tip="Ligar para este residente" width="61"/> + <button label="Compartilhar" name="share_btn" width="82"/> + <button label="Teletransporte" name="teleport_btn" tool_tip="Oferecer teletransporte" width="86"/> <button label="Perfil do grupo" name="group_info_btn" tool_tip="Exibir informação de grupo"/> <button label="Bate-papo de grupo" name="chat_btn" tool_tip="Iniciar bate-papo"/> <button label="Ligar para o grupo" name="group_call_btn" tool_tip="Ligar para este grupo"/> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml index 9c366fb4fd..6f2cae0476 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml @@ -11,7 +11,7 @@ <text name="heading2"> Posicionamento automático da: </text> - <check_box label="Construir/Editar" name="edit_camera_movement" tool_tip="Use o posicionamento automático da câmera quando entrar e sair do modo de edição"/> + <check_box label="Construção/Edição" name="edit_camera_movement" tool_tip="Use o posicionamento automático da câmera quando entrar e sair do modo de edição"/> <check_box label="Aparência" name="appearance_camera_movement" tool_tip="Use o posicionamento automático da câmera quando em modo de edição"/> <check_box label="Mostre-me em visão de mouse" name="first_person_avatar_visible"/> <check_box label="Teclas de seta sempre me movem" name="arrow_keys_move_avatar_check"/> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml index 5c69fa8de1..8a34897c9b 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml @@ -17,7 +17,7 @@ <combo_box.item label="日本語 (Japonês) - Beta" name="(Japanese)"/> </combo_box> <text name="language_textbox2"> - (Reinicie para mostrar o novo idioma) + (Reinicie para trocar de idioma) </text> <text name="maturity_desired_prompt"> Quero acessar conteúdo: diff --git a/indra/newview/skins/default/xui/pt/panel_region_debug.xml b/indra/newview/skins/default/xui/pt/panel_region_debug.xml index 2119a06e55..f2cc9f644d 100644 --- a/indra/newview/skins/default/xui/pt/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/pt/panel_region_debug.xml @@ -6,15 +6,15 @@ <text name="region_text"> desconhecido </text> - <check_box label="Desabilitar Scripts" name="disable_scripts_check" tool_tip="Desabilitar todos os scripts nesta região"/> + <check_box label="Desativar scripts" name="disable_scripts_check" tool_tip="Desativar todos os scripts nesta região"/> <button label="?" name="disable_scripts_help"/> - <check_box label="Desabilitar colisões" name="disable_collisions_check" tool_tip="Desabilitar colisões de não-avatares nessa região"/> + <check_box label="Desativar colisões" name="disable_collisions_check" tool_tip="Desabilitar colisões de não-avatares nessa região"/> <button label="?" name="disable_collisions_help"/> - <check_box label="Desabilitar fÃsica" name="disable_physics_check" tool_tip="Desabilitar toda a fÃsÃca nesta região"/> + <check_box label="Desativar fÃsica" name="disable_physics_check" tool_tip="Desativar toda a fÃsÃca nesta região"/> <button label="?" name="disable_physics_help"/> <button label="Aplicar" name="apply_btn"/> <text name="objret_text_lbl" width="130"> - Retornar objeto + Devolver objeto </text> <text name="resident_text_lbl"> Residente: @@ -27,14 +27,14 @@ Opções: </text> <check_box label="Com scripts" name="return_scripts" tool_tip="Só devolver objetos com scripts"/> - <check_box label="No terreno de outra pessoa" name="return_other_land" tool_tip="Retornar apenas objetos que estejam na terra pertencente a alguém"/> - <check_box label="Em todas as regiões desta propriedade" name="return_estate_wide" tool_tip="Retornar objetos em todas as regiões que constituem esta propriedade"/> - <button label="Retornar" name="return_btn"/> - <button label="Pegar os principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos que experimentam as mais potenciais colisões" width="280"/> + <check_box label="No terreno de outra pessoa" name="return_other_land" tool_tip="Devolver apenas objetos que estejam em terrenos de outra pessoa"/> + <check_box label="Em todas as regiões desta propriedade" name="return_estate_wide" tool_tip="Devolver objetos em todas as regiões que constituem esta propriedade"/> + <button label="Devolver" name="return_btn"/> + <button label="Principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos com maior potencial de colisão" width="280"/> <button label="?" left="297" name="top_colliders_help"/> - <button label="Pegar Principais Scripts..." name="top_scripts_btn" tool_tip="Lista de objetos gastando mais tempo rodando scripts" width="280"/> + <button label="Principais scripts..." name="top_scripts_btn" tool_tip="Lista de objetos que mais passam tempo executando scripts" width="280"/> <button label="?" left="297" name="top_scripts_help"/> - <button label="Reiniciar a Região" name="restart_btn" tool_tip="Dar 2 minutos de contagem regressiva e reiniciar a região"/> + <button label="Reiniciar a região" name="restart_btn" tool_tip="Após 2 minutos de contagem regressiva, reiniciar a região"/> <button label="?" name="restart_help"/> - <button label="Atrasar o Reinicio" name="cancel_restart_btn" tool_tip="Atrasar o reinicio da região por uma hora"/> + <button label="Adiar reinÃcio" name="cancel_restart_btn" tool_tip="Adiar o reinÃcio da região por uma hora"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_region_general_layout.xml b/indra/newview/skins/default/xui/pt/panel_region_general_layout.xml index d2d5fb649c..534b2826af 100644 --- a/indra/newview/skins/default/xui/pt/panel_region_general_layout.xml +++ b/indra/newview/skins/default/xui/pt/panel_region_general_layout.xml @@ -18,12 +18,12 @@ <text name="region_type"> (Desconhecido) </text> - <check_box label="Bloquear terraplanagem" name="block_terraform_check"/> + <check_box label="Bloquear terraplanagens" name="block_terraform_check"/> <check_box label="Bloquear voos" name="block_fly_check"/> <check_box label="Permitir danos" name="allow_damage_check"/> <check_box label="Limitar empurrões" name="restrict_pushobject"/> <check_box label="Permitir revenda de terrenos" name="allow_land_resell_check"/> - <check_box label="Permitir junção e divisão de terrenos" name="allow_parcel_changes_check"/> + <check_box label="Permitir união e divisão de terrenos" name="allow_parcel_changes_check"/> <check_box label="Não mostrar nos resultados de pesquisa" name="block_parcel_search_check" tool_tip="Mostrar esta região e lotes nos resultados de pesquisa"/> <spinner label="Limite do agente" name="agent_limit_spin"/> <spinner label="Bônus do objeto" name="object_bonus_spin"/> diff --git a/indra/newview/skins/default/xui/pt/panel_side_tray.xml b/indra/newview/skins/default/xui/pt/panel_side_tray.xml index 09ac074b5a..1a424fb7f1 100644 --- a/indra/newview/skins/default/xui/pt/panel_side_tray.xml +++ b/indra/newview/skins/default/xui/pt/panel_side_tray.xml @@ -3,27 +3,27 @@ partially on screen to hold tab buttons. --> <side_tray name="sidebar"> <sidetray_tab description="Exibir ou não barra lateral" name="sidebar_openclose" tab_title="Exibir ou não barra lateral"/> - <sidetray_tab description="Casa." name="sidebar_home" tab_title="Home"> - <panel label="casa" name="panel_home"/> + <sidetray_tab description="InÃcio" name="sidebar_home" tab_title="InÃcio"> + <panel label="InÃcio" name="panel_home"/> </sidetray_tab> - <sidetray_tab description="Editar seu perfil público e destaques ." name="sidebar_me" tab_title="My Profile"> + <sidetray_tab description="Edite seu perfil público e destaques." name="sidebar_me" tab_title="Meu perfil"> <panel_container name="panel_container"> <panel label="Eu" name="panel_me"/> </panel_container> </sidetray_tab> - <sidetray_tab description="Encontre seus amigos, contatos e pessoas nas proximidades." name="sidebar_people" tab_title="People"> + <sidetray_tab description="Encontre seus amigos, contatos e pessoas nas proximidades." name="sidebar_people" tab_title="Pessoas"> <panel_container name="panel_container"> <panel label="Perfil do grupo" name="panel_group_info_sidetray"/> <panel label="Residentes& Objetos bloqueados" name="panel_block_list_sidetray"/> </panel_container> </sidetray_tab> - <sidetray_tab description="Encontre lugares para ir e lugares que você ja visitou." label="Lugares" name="sidebar_places" tab_title="Places"> + <sidetray_tab description="Encontre lugares para ir e lugares que você ja visitou." label="Lugares" name="sidebar_places" tab_title="Lugares"> <panel label="Lugares" name="panel_places"/> </sidetray_tab> - <sidetray_tab description="Busca no seu inventário." name="sidebar_inventory" tab_title="My Inventory"> + <sidetray_tab description="Abra seu inventário." name="sidebar_inventory" tab_title="Meu inventário"> <panel label="Editar inventário" name="sidepanel_inventory"/> </sidetray_tab> - <sidetray_tab description="Muda sua aparência e visual atual." name="sidebar_appearance" tab_title="My Appearance"> + <sidetray_tab description="Muda sua aparência e seu visual atual." name="sidebar_appearance" tab_title="Minha aparência"> <panel label="Editar aparência" name="sidepanel_appearance"/> </sidetray_tab> </side_tray> diff --git a/indra/newview/skins/default/xui/pt/teleport_strings.xml b/indra/newview/skins/default/xui/pt/teleport_strings.xml index 92ffee0233..11ea0f4195 100644 --- a/indra/newview/skins/default/xui/pt/teleport_strings.xml +++ b/indra/newview/skins/default/xui/pt/teleport_strings.xml @@ -51,7 +51,7 @@ Se você continuar a receber esta mensagem, por favor consulte o [SUPPORT_SITE]. Transferindo para o destino. </message> <message name="sending_home"> - Enviando solicitação de localização da casa. + Enviando solicitação de localização de inÃcio. </message> <message name="sending_landmark"> Enviando solicitação de localização de landmark. diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index ef93586c6e..1c29feec5f 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -10,7 +10,10 @@ // Precompiled header #include "../llviewerprecompiledheaders.h" // Own header +#include "../llsecapi.h" +#include "../llviewernetwork.h" #include "../lllogininstance.h" + // STL headers // std headers // external library headers @@ -33,7 +36,12 @@ const std::string APPVIEWER_SERIALNUMBER("appviewer_serialno"); //----------------------------------------------------------------------------- static LLEventStream gTestPump("test_pump"); +#include "../llslurl.h" +#include "../llstartup.h" +LLSLURL LLStartUp::sStartSLURL; + #include "lllogin.h" + static std::string gLoginURI; static LLSD gLoginCreds; static bool gDisconnectCalled = false; @@ -54,17 +62,75 @@ void LLLogin::disconnect() gDisconnectCalled = true; } +LLSD LLCredential::getLoginParams() +{ + LLSD result = LLSD::emptyMap(); + + // legacy credential + result["passwd"] = "$1$testpasssd"; + result["first"] = "myfirst"; + result["last"] ="mylast"; + return result; +} +void LLCredential::identifierType(std::string &idType) +{ +} + +void LLCredential::authenticatorType(std::string &idType) +{ +} + //----------------------------------------------------------------------------- #include "../llviewernetwork.h" -unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {'1','2','3','4','5','6'}; +LLGridManager::~LLGridManager() +{ +} + +void LLGridManager::addGrid(LLSD& grid_data) +{ +} +LLGridManager::LLGridManager() +{ +} -LLViewerLogin::LLViewerLogin() : mGridChoice(GRID_INFO_NONE) {} -LLViewerLogin::~LLViewerLogin() {} -void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const +void LLGridManager::getLoginURIs(std::vector<std::string>& uris) { uris.push_back(VIEWERLOGIN_URI); } -std::string LLViewerLogin::getGridLabel() const { return VIEWERLOGIN_GRIDLABEL; } + +void LLGridManager::addSystemGrid(const std::string& label, + const std::string& name, + const std::string& login, + const std::string& helper, + const std::string& login_page, + const std::string& login_id) +{ +} +std::map<std::string, std::string> LLGridManager::getKnownGrids(bool favorite_only) +{ + std::map<std::string, std::string> result; + return result; +} + +void LLGridManager::setGridChoice(const std::string& grid_name) +{ +} + +bool LLGridManager::isInProductionGrid() +{ + return false; +} + +void LLGridManager::saveFavorites() +{} +std::string LLGridManager::getSLURLBase(const std::string& grid_name) +{ + return "myslurl"; +} +std::string LLGridManager::getAppSLURLBase(const std::string& grid_name) +{ + return "myappslurl"; +} //----------------------------------------------------------------------------- #include "../llviewercontrol.h" @@ -86,10 +152,6 @@ BOOL LLControlGroup::declareString(const std::string& name, const std::string &i #include "lluicolortable.h" void LLUIColorTable::saveUserSettings(void)const {} -//----------------------------------------------------------------------------- -#include "../llurlsimstring.h" -LLURLSimString LLURLSimString::sInstance; -bool LLURLSimString::parse() { return true; } //----------------------------------------------------------------------------- #include "llnotifications.h" @@ -197,15 +259,29 @@ namespace tut gSavedSettings.declareString("NextLoginLocation", "", "", FALSE); gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", FALSE); - credentials["first"] = "testfirst"; - credentials["last"] = "testlast"; - credentials["passwd"] = "testpass"; + LLSD authenticator = LLSD::emptyMap(); + LLSD identifier = LLSD::emptyMap(); + identifier["type"] = "agent"; + identifier["first_name"] = "testfirst"; + identifier["last_name"] = "testlast"; + authenticator["passwd"] = "testpass"; + agentCredential = new LLCredential(); + agentCredential->setCredentialData(identifier, authenticator); + + authenticator = LLSD::emptyMap(); + identifier = LLSD::emptyMap(); + identifier["type"] = "account"; + identifier["username"] = "testuser"; + authenticator["secret"] = "testsecret"; + accountCredential = new LLCredential(); + accountCredential->setCredentialData(identifier, authenticator); logininstance->setNotificationsInterface(¬ifications); } LLLoginInstance* logininstance; - LLSD credentials; + LLPointer<LLCredential> agentCredential; + LLPointer<LLCredential> accountCredential; MockNotifications notifications; }; @@ -219,7 +295,7 @@ namespace tut set_test_name("Test Simple Success And Disconnect"); // Test default connect. - logininstance->connect(credentials); + logininstance->connect(agentCredential); ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); @@ -260,7 +336,7 @@ namespace tut const std::string test_uri = "testing-uri"; // Test default connect. - logininstance->connect(test_uri, credentials); + logininstance->connect(test_uri, agentCredential); // connect should call LLLogin::connect to init gLoginURI and gLoginCreds. ensure_equals("Default connect uri", gLoginURI, "testing-uri"); @@ -282,7 +358,7 @@ namespace tut ensure("No TOS, failed auth", logininstance->authFailure()); // Start again. - logininstance->connect(test_uri, credentials); + logininstance->connect(test_uri, agentCredential); gTestPump.post(response); // Fail for tos again. gTOSReplyPump->post(true); // Accept tos, should reconnect w/ agree_to_tos. ensure_equals("Accepted agree to tos", gLoginCreds["params"]["agree_to_tos"].asBoolean(), true); @@ -294,11 +370,11 @@ namespace tut gTestPump.post(response); ensure("TOS auth failure", logininstance->authFailure()); - logininstance->connect(test_uri, credentials); + logininstance->connect(test_uri, agentCredential); ensure_equals("Reset to default for agree to tos", gLoginCreds["params"]["agree_to_tos"].asBoolean(), false); // Critical Message failure response. - logininstance->connect(test_uri, credentials); + logininstance->connect(test_uri, agentCredential); response["data"]["reason"] = "critical"; // Change response to "critical message" gTestPump.post(response); @@ -312,7 +388,7 @@ namespace tut response["data"]["reason"] = "key"; // bad creds. gTestPump.post(response); ensure("TOS auth failure", logininstance->authFailure()); - logininstance->connect(test_uri, credentials); + logininstance->connect(test_uri, agentCredential); ensure_equals("Default for agree to tos", gLoginCreds["params"]["read_critical"].asBoolean(), false); } @@ -323,7 +399,7 @@ namespace tut // Part 1 - Mandatory Update, with User accepts response. // Test connect with update needed. - logininstance->connect(credentials); + logininstance->connect(agentCredential); ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); @@ -349,7 +425,7 @@ namespace tut set_test_name("Test Mandatory Update User Decline"); // Test connect with update needed. - logininstance->connect(credentials); + logininstance->connect(agentCredential); ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); @@ -375,7 +451,7 @@ namespace tut // Part 3 - Mandatory Update, with bogus response. // Test connect with update needed. - logininstance->connect(credentials); + logininstance->connect(agentCredential); ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); @@ -401,7 +477,7 @@ namespace tut // Part 3 - Mandatory Update, with bogus response. // Test connect with update needed. - logininstance->connect(credentials); + logininstance->connect(agentCredential); ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp new file mode 100644 index 0000000000..caa1461987 --- /dev/null +++ b/indra/newview/tests/llsecapi_test.cpp @@ -0,0 +1,188 @@ +/** + * @file llsecapi_test.cpp + * @author Roxie + * @date 2009-02-10 + * @brief Test the sec api functionality + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden LregisterSecAPIab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ +#include "../llviewerprecompiledheaders.h" +#include "../llviewernetwork.h" +#include "../test/lltut.h" +#include "../llsecapi.h" +#include "../../llxml/llcontrol.h" + + +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing + +LLControlGroup::LLControlGroup(const std::string& name) +: LLInstanceTracker<LLControlGroup, std::string>(name) {} +LLControlGroup::~LLControlGroup() {} +BOOL LLControlGroup::declareString(const std::string& name, + const std::string& initial_val, + const std::string& comment, + BOOL persist) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} +std::string LLControlGroup::getString(const std::string& name) +{ + return ""; +} + + +LLControlGroup gSavedSettings("test"); +class LLSecAPIBasicHandler : public LLSecAPIHandler +{ +protected: + LLPointer<LLCertificateChain> mCertChain; + LLPointer<LLCertificate> mCert; + LLPointer<LLCertificateStore> mCertStore; + LLSD mLLSD; + +public: + LLSecAPIBasicHandler() {} + + virtual ~LLSecAPIBasicHandler() {} + + // instantiate a certificate from a pem string + virtual LLPointer<LLCertificate> getCertificate(const std::string& pem_cert) + { + return mCert; + } + + + // instiate a certificate from an openssl X509 structure + virtual LLPointer<LLCertificate> getCertificate(X509* openssl_cert) + { + return mCert; + } + + + // instantiate a chain from an X509_STORE_CTX + virtual LLPointer<LLCertificateChain> getCertificateChain(const X509_STORE_CTX* chain) + { + return mCertChain; + } + + // instantiate a cert store given it's id. if a persisted version + // exists, it'll be loaded. If not, one will be created (but not + // persisted) + virtual LLPointer<LLCertificateStore> getCertificateStore(const std::string& store_id) + { + return mCertStore; + } + + // persist data in a protected store + virtual void setProtectedData(const std::string& data_type, + const std::string& data_id, + const LLSD& data) {} + + // retrieve protected data + virtual LLSD getProtectedData(const std::string& data_type, + const std::string& data_id) + { + return mLLSD; + } + + virtual void deleteProtectedData(const std::string& data_type, + const std::string& data_id) + { + } + + virtual LLPointer<LLCredential> createCredential(const std::string& grid, + const LLSD& identifier, + const LLSD& authenticator) + { + LLPointer<LLCredential> cred = NULL; + return cred; + } + + virtual LLPointer<LLCredential> loadCredential(const std::string& grid) + { + LLPointer<LLCredential> cred = NULL; + return cred; + } + + virtual void saveCredential(LLPointer<LLCredential> cred, bool save_authenticator) {} + + virtual void deleteCredential(LLPointer<LLCredential> cred) {} +}; + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- +namespace tut +{ + // Test wrapper declaration : wrapping nothing for the moment + struct secapiTest + { + + secapiTest() + { + } + ~secapiTest() + { + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<secapiTest> secapiTestFactory; + typedef secapiTestFactory::object secapiTestObject; + tut::secapiTestFactory tut_test("llsecapi"); + + // --------------------------------------------------------------------------------------- + // Test functions + // --------------------------------------------------------------------------------------- + // registration + template<> template<> + void secapiTestObject::test<1>() + { + // retrieve an unknown handler + + ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown")); + LLPointer<LLSecAPIHandler> test1_handler = new LLSecAPIBasicHandler(); + registerSecHandler("sectest1", test1_handler); + ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown")); + LLPointer<LLSecAPIHandler> retrieved_test1_handler = getSecHandler("sectest1"); + ensure("Retrieved sectest1 handler should be the same", + retrieved_test1_handler == test1_handler); + + // insert a second handler + LLPointer<LLSecAPIHandler> test2_handler = new LLSecAPIBasicHandler(); + registerSecHandler("sectest2", test2_handler); + ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown")); + retrieved_test1_handler = getSecHandler("sectest1"); + ensure("Retrieved sectest1 handler should be the same", + retrieved_test1_handler == test1_handler); + + LLPointer<LLSecAPIHandler> retrieved_test2_handler = getSecHandler("sectest2"); + ensure("Retrieved sectest1 handler should be the same", + retrieved_test2_handler == test2_handler); + + } +} diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp new file mode 100644 index 0000000000..fa9fff3ac9 --- /dev/null +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -0,0 +1,1071 @@ +/** + * @file llsechandler_basic_test.cpp + * @author Roxie + * @date 2009-02-10 + * @brief Test the 'basic' sec handler functions + * + * $LicenseInfo:firstyear=2005&license=viewergpl$ + * + * Copyright (c) 2005-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ +#include "../llviewerprecompiledheaders.h" +#include "../test/lltut.h" +#include "../llsecapi.h" +#include "../llsechandler_basic.h" +#include "../../llxml/llcontrol.h" +#include "../llviewernetwork.h" +#include "lluuid.h" +#include "llxorcipher.h" +#include "apr_base64.h" +#include <vector> +#include <ios> +#include <llsdserialize.h> +#include <openssl/pem.h> +#include <openssl/err.h> +#include <openssl/evp.h> +#include "llxorcipher.h" +#include <openssl/ossl_typ.h> +#include <openssl/x509.h> +#include <openssl/x509v3.h> +#include <openssl/pem.h> +#include <openssl/asn1.h> +#include <openssl/rand.h> +#include <openssl/err.h> +#include "../llmachineid.h" + +#define ensure_throws(str, exc_type, cert, func, ...) \ +try \ +{ \ +func(__VA_ARGS__); \ +fail("throws, " str); \ +} \ +catch(exc_type& except) \ +{ \ +ensure("Exception cert is incorrect for " str, except.getCert() == cert); \ +} + +extern bool _cert_hostname_wildcard_match(const std::string& hostname, const std::string& wildcard_string); + +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing + +std::string gFirstName; +std::string gLastName; +LLControlGroup::LLControlGroup(const std::string& name) +: LLInstanceTracker<LLControlGroup, std::string>(name) {} +LLControlGroup::~LLControlGroup() {} +BOOL LLControlGroup::declareString(const std::string& name, + const std::string& initial_val, + const std::string& comment, + BOOL persist) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} +std::string LLControlGroup::getString(const std::string& name) +{ + + if (name == "FirstName") + return gFirstName; + else if (name == "LastName") + return gLastName; + return ""; +} + +LLSD LLCredential::getLoginParams() +{ + LLSD result = LLSD::emptyMap(); + + // legacy credential + result["passwd"] = "$1$testpasssd"; + result["first"] = "myfirst"; + result["last"] ="mylast"; + return result; +} + +void LLCredential::identifierType(std::string &idType) +{ +} + +void LLCredential::authenticatorType(std::string &idType) +{ +} + + +LLControlGroup gSavedSettings("test"); +unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {77,21,46,31,89,2}; + + +S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len) +{ + memcpy(unique_id, gMACAddress, len); + return 1; +} +S32 LLMachineID::init() { return 1; } + + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- +namespace tut +{ + // Test wrapper declaration : wrapping nothing for the moment + struct sechandler_basic_test + { + std::string mPemTestCert, mPemRootCert, mPemIntermediateCert, mPemChildCert, mSha1RSATestCert, mSha1RSATestCA; + std::string mDerFormat; + X509 *mX509TestCert, *mX509RootCert, *mX509IntermediateCert, *mX509ChildCert; + + sechandler_basic_test() + { + LLMachineID::init(); + OpenSSL_add_all_algorithms(); + OpenSSL_add_all_ciphers(); + OpenSSL_add_all_digests(); + ERR_load_crypto_strings(); + gFirstName = ""; + gLastName = ""; + LLFile::remove("test_password.dat"); + LLFile::remove("sechandler_settings.tmp"); + mPemTestCert = "-----BEGIN CERTIFICATE-----\n" + "MIIEuDCCA6CgAwIBAgIBBDANBgkqhkiG9w0BAQUFADCBtDELMAkGA1UEBhMCQlIx\n" + "EzARBgNVBAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25h\n" + "bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxETAPBgNVBAcTCEJy\n" + "YXNpbGlhMQswCQYDVQQIEwJERjExMC8GA1UEAxMoQXV0b3JpZGFkZSBDZXJ0aWZp\n" + "Y2Fkb3JhIFJhaXogQnJhc2lsZWlyYTAeFw0wMTExMzAxMjU4MDBaFw0xMTExMzAy\n" + "MzU5MDBaMIG0MQswCQYDVQQGEwJCUjETMBEGA1UEChMKSUNQLUJyYXNpbDE9MDsG\n" + "A1UECxM0SW5zdGl0dXRvIE5hY2lvbmFsIGRlIFRlY25vbG9naWEgZGEgSW5mb3Jt\n" + "YWNhbyAtIElUSTERMA8GA1UEBxMIQnJhc2lsaWExCzAJBgNVBAgTAkRGMTEwLwYD\n" + "VQQDEyhBdXRvcmlkYWRlIENlcnRpZmljYWRvcmEgUmFpeiBCcmFzaWxlaXJhMIIB\n" + "IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwPMudwX/hvm+Uh2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ERTIFICATE-----\n"; + + mPemRootCert = "-----BEGIN CERTIFICATE-----\n" + "MIIB0TCCATqgAwIBAgIJANaTqrzEvHaRMA0GCSqGSIb3DQEBBAUAMBsxGTAXBgNV\n" + "BAMTEFJveGllcyB0ZXN0IHJvb3QwHhcNMDkwNDE1MjEwNzQ3WhcNMTAwNDE1MjEw\n" + "NzQ3WjAbMRkwFwYDVQQDExBSb3hpZXMgdGVzdCByb290MIGfMA0GCSqGSIb3DQEB\n" + "AQUAA4GNADCBiQKBgQCpo5nDW6RNz9IHUVZd7Tw2XAQiBniDF4xH0N1w7sUYTiFq\n" + "21mABsnOPJD3ra+MtOsXPHcaljm661JjTD8L40v5sfEbqDUPcOw76ClrPqnuAeyT\n" + "38qk8DHku/mT8YdprevGZdVcUXQg3vosVzOL93HOOHK+u61mEEoM9W5xoNVEdQID\n" + "AQABox0wGzAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQQF\n" + "AAOBgQAzn0aW/+zWPmcTbvxonyiYYUr9b4SOB/quhAkT8KT4ir1dcZAXRR59+kEn\n" + "HSTu1FAodV0gvESqyobftF5hZ1XMxdJqGu//xP+YCwlv244G/0pp7KLI8ihNO2+N\n" + "lPBUJgbo++ZkhiE1jotZi9Ay0Oedh3s/AfbMZPyfpJ23ll6+BA==\n" + "-----END CERTIFICATE-----\n"; + + + + mPemIntermediateCert = "-----BEGIN CERTIFICATE-----\n" + "MIIBzzCCATigAwIBAgIBATANBgkqhkiG9w0BAQQFADAbMRkwFwYDVQQDExBSb3hp\n" + "ZXMgdGVzdCByb290MB4XDTA5MDQxNTIxMzE1NloXDTEwMDQxNTIxMzE1NlowITEf\n" + "MB0GA1UEAxMWUm94aWVzIGludGVybWVkaWF0ZSBDQTCBnzANBgkqhkiG9w0BAQEF\n" + "AAOBjQAwgYkCgYEA15MM0W1R37rx/24Q2Qkb5bSiQZxTUcQAhJ2pA8mwUucXuCVt\n" + "6ayI2TuN32nkjmsCgUkiT/bdXWp0OJo7/MXRIFeUNMCRxrpeFnxuigYEqbIXAdN6\n" + "qu/vdG2X4PRv/v9Ijrju4cBEiKIldIgOurWEIfXEsVSFP2XmFQHesF04qDcCAwEA\n" + "AaMdMBswDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQAD\n" + "gYEAYljikYgak3W1jSo0vYthNHUy3lBVAKzDhpM96lY5OuXFslpCRX42zNL8X3kN\n" + "U/4IaJUVtZqx8WsUXl1eXHzBCaXCftapV4Ir6cENLIsXCdXs8paFYzN5nPJA5GYU\n" + "zWgkSEl1MEhNIc+bJW34vwi29EjrAShAhsIZ84Mt/lvD3Pc=\n" + "-----END CERTIFICATE-----\n"; + + mPemChildCert = "-----BEGIN CERTIFICATE-----\n" + "MIIB5DCCAU0CBEnm9eUwDQYJKoZIhvcNAQEEBQAwITEfMB0GA1UEAxMWUm94aWVz\n" + "IGludGVybWVkaWF0ZSBDQTAeFw0wOTA0MTYwMDAzNDlaFw0xMDA0MTYwMDAzNDla\n" + "MCAxHjAcBgNVBAMTFWVuaWFjNjMubGluZGVubGFiLmNvbTCBnzANBgkqhkiG9w0B\n" + "AQEFAAOBjQAwgYkCgYEAp9I5rofEzbjNht+9QejfnsIlEPqSxskoWKCG255TesWR\n" + "RTmw9wafHQQkJk/VIsaU4RMBYHkknGbHX2dGvMHmKZoWUPSQ/8FZz09o0Qx3TNUZ\n" + "l7KlGOD2d1c7ZxXDPqlLC6QW8DrE1/8zfwJ5cbYBXc8e7OKdSZeRrnwHyw4Q8r8C\n" + "AwEAAaMvMC0wEwYDVR0lBAwwCgYIKwYBBQUHAwEwCQYDVR0TBAIwADALBgNVHQ8E\n" + "BAMCBaAwDQYJKoZIhvcNAQEEBQADgYEAIG0M5tqYlXyMiGKPZfXy/R3M3ZZOapDk\n" + "W0dsXJYXAc35ftwtn0VYu9CNnZCcli17/d+AKhkK8a/oGPazqudjFF6WLJLTXaY9\n" + "NmhkJcOPADXkby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DgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1\n" + "MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx\n" + "dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B\n" + "AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f\n" + "BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A\n" + "cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC\n" + "AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ\n" + "MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm\n" + "aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw\n" + "ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj\n" + "IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF\n" + "MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA\n" + "A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y\n" + "7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh\n" + "1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4\n" + "-----END CERTIFICATE-----\n"; + + + + + mX509TestCert = NULL; + mX509RootCert = NULL; + mX509IntermediateCert = NULL; + mX509ChildCert = NULL; + + BIO * validation_bio = BIO_new_mem_buf((void*)mPemTestCert.c_str(), mPemTestCert.length()); + PEM_read_bio_X509(validation_bio, &mX509TestCert, 0, NULL); + BIO_free(validation_bio); + validation_bio = BIO_new_mem_buf((void*)mPemRootCert.c_str(), mPemRootCert.length()); + PEM_read_bio_X509(validation_bio, &mX509RootCert, 0, NULL); + BIO_free(validation_bio); + validation_bio = BIO_new_mem_buf((void*)mPemIntermediateCert.c_str(), mPemIntermediateCert.length()); + PEM_read_bio_X509(validation_bio, &mX509IntermediateCert, 0, NULL); + BIO_free(validation_bio); + validation_bio = BIO_new_mem_buf((void*)mPemChildCert.c_str(), mPemChildCert.length()); + PEM_read_bio_X509(validation_bio, &mX509ChildCert, 0, NULL); + BIO_free(validation_bio); + } + ~sechandler_basic_test() + { + LLFile::remove("test_password.dat"); + LLFile::remove("sechandler_settings.tmp"); + LLFile::remove("mycertstore.pem"); + X509_free(mX509TestCert); + X509_free(mX509RootCert); + X509_free(mX509IntermediateCert); + X509_free(mX509ChildCert); + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<sechandler_basic_test> sechandler_basic_test_factory; + typedef sechandler_basic_test_factory::object sechandler_basic_test_object; + tut::sechandler_basic_test_factory tut_test("llsechandler_basic"); + + // --------------------------------------------------------------------------------------- + // Test functions + // --------------------------------------------------------------------------------------- + // test cert data retrieval + template<> template<> + void sechandler_basic_test_object::test<1>() + + { + char buffer[4096]; + LLPointer<LLCertificate> test_cert = new LLBasicCertificate(mPemTestCert); + + ensure_equals("Resultant pem is correct", + mPemTestCert, test_cert->getPem()); + std::vector<U8> binary_cert = test_cert->getBinary(); + + apr_base64_encode(buffer, (const char *)&binary_cert[0], binary_cert.size()); + + ensure_equals("Der Format is correct", memcmp(buffer, mDerFormat.c_str(), mDerFormat.length()), 0); + + LLSD llsd_cert; + test_cert->getLLSD(llsd_cert); + std::ostringstream llsd_value; + llsd_value << LLSDOStreamer<LLSDNotationFormatter>(llsd_cert) << std::endl; + std::string llsd_cert_str = llsd_value.str(); + ensure_equals("Issuer Name/commonName", + (std::string)llsd_cert["issuer_name"]["commonName"], "Autoridade Certificadora Raiz Brasileira"); + ensure_equals("Issure Name/countryName", (std::string)llsd_cert["issuer_name"]["countryName"], "BR"); + ensure_equals("Issuer Name/localityName", (std::string)llsd_cert["issuer_name"]["localityName"], "Brasilia"); + ensure_equals("Issuer Name/org name", (std::string)llsd_cert["issuer_name"]["organizationName"], "ICP-Brasil"); + ensure_equals("IssuerName/org unit", + (std::string)llsd_cert["issuer_name"]["organizationalUnitName"], "Instituto Nacional de Tecnologia da Informacao - ITI"); + ensure_equals("IssuerName/state", (std::string)llsd_cert["issuer_name"]["stateOrProvinceName"], "DF"); + ensure_equals("Issuer name string", + (std::string)llsd_cert["issuer_name_string"], "CN=Autoridade Certificadora Raiz Brasileira,ST=DF," + "L=Brasilia,OU=Instituto Nacional de Tecnologia da Informacao - ITI,O=ICP-Brasil,C=BR"); + ensure_equals("subject Name/commonName", + (std::string)llsd_cert["subject_name"]["commonName"], "Autoridade Certificadora Raiz Brasileira"); + ensure_equals("subject Name/countryName", (std::string)llsd_cert["subject_name"]["countryName"], "BR"); + ensure_equals("subject Name/localityName", (std::string)llsd_cert["subject_name"]["localityName"], "Brasilia"); + ensure_equals("subject Name/org name", (std::string)llsd_cert["subject_name"]["organizationName"], "ICP-Brasil"); + ensure_equals("subjectName/org unit", + (std::string)llsd_cert["subject_name"]["organizationalUnitName"], "Instituto Nacional de Tecnologia da Informacao - ITI"); + ensure_equals("subjectName/state", (std::string)llsd_cert["subject_name"]["stateOrProvinceName"], "DF"); + ensure_equals("subject name string", + (std::string)llsd_cert["subject_name_string"], "CN=Autoridade Certificadora Raiz Brasileira,ST=DF," + "L=Brasilia,OU=Instituto Nacional de Tecnologia da Informacao - ITI,O=ICP-Brasil,C=BR"); + + ensure_equals("md5 digest", (std::string)llsd_cert["md5_digest"], "96:89:7d:61:d1:55:2b:27:e2:5a:39:b4:2a:6c:44:6f"); + ensure_equals("serial number", (std::string)llsd_cert["serial_number"], "04"); + // sha1 digest is giving a weird value, and I've no idea why...feh + //ensure_equals("sha1 digest", (std::string)llsd_cert["sha1_digest"], "8e:fd:ca:bc:93:e6:1e:92:5d:4d:1d:ed:18:1a:43:20:a4:67:a1:39"); + ensure_equals("valid from", (std::string)llsd_cert["valid_from"], "2001-11-30T12:58:00Z"); + ensure_equals("valid to", (std::string)llsd_cert["valid_to"], "2011-11-30T23:59:00Z"); + LLSD expectedKeyUsage = LLSD::emptyArray(); + expectedKeyUsage.append(LLSD((std::string)"certSigning")); + expectedKeyUsage.append(LLSD((std::string)"crlSigning")); + ensure("key usage", valueCompareLLSD(llsd_cert["keyUsage"], expectedKeyUsage)); + ensure("basic constraints", (bool)llsd_cert["basicConstraints"]["CA"]); + + ensure("x509 is equal", !X509_cmp(mX509TestCert, test_cert->getOpenSSLX509())); + } + + + // test protected data + template<> template<> + void sechandler_basic_test_object::test<2>() + + { + + std::string protected_data = "sUSh3wj77NG9oAMyt3XIhaej3KLZhLZWFZvI6rIGmwUUOmmelrRg0NI9rkOj8ZDpTPxpwToaBT5u" + "GQhakdaGLJznr9bHr4/6HIC1bouKj4n2rs4TL6j2WSjto114QdlNfLsE8cbbE+ghww58g8SeyLQO" + "nyzXoz+/PBz0HD5SMFDuObccoPW24gmqYySz8YoEWhSwO0pUtEEqOjVRsAJgF5wLAtJZDeuilGsq" + "4ZT9Y4wZ9Rh8nnF3fDUL6IGamHe1ClXM1jgBu10F6UMhZbnH4C3aJ2E9+LiOntU+l3iCb2MpkEpr" + "82r2ZAMwIrpnirL/xoYoyz7MJQYwUuMvBPToZJrxNSsjI+S2Z+I3iEJAELMAAA=="; + + std::vector<U8> binary_data(apr_base64_decode_len(protected_data.c_str())); + apr_base64_decode_binary(&binary_data[0], protected_data.c_str()); + + LLXORCipher cipher(gMACAddress, MAC_ADDRESS_BYTES); + cipher.decrypt(&binary_data[0], 16); + unsigned char unique_id[MAC_ADDRESS_BYTES]; + LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); + LLXORCipher cipher2(unique_id, sizeof(unique_id)); + cipher2.encrypt(&binary_data[0], 16); + std::ofstream temp_file("sechandler_settings.tmp", std::ofstream::binary); + temp_file.write((const char *)&binary_data[0], binary_data.size()); + temp_file.close(); + + LLPointer<LLSecAPIBasicHandler> handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", + "test_password.dat"); + handler->init(); + // data retrieval for existing data + LLSD data = handler->getProtectedData("test_data_type", "test_data_id"); + + + ensure_equals("retrieve existing data1", (std::string)data["data1"], "test_data_1"); + ensure_equals("retrieve existing data2", (std::string)data["data2"], "test_data_2"); + ensure_equals("retrieve existing data3", (std::string)data["data3"]["elem1"], "test element1"); + + // data storage + LLSD store_data = LLSD::emptyMap(); + store_data["store_data1"] = "test_store_data1"; + store_data["store_data2"] = 27; + store_data["store_data3"] = LLSD::emptyMap(); + store_data["store_data3"]["subelem1"] = "test_subelem1"; + + handler->setProtectedData("test_data_type", "test_data_id1", store_data); + data = handler->getProtectedData("test_data_type", "test_data_id"); + + data = handler->getProtectedData("test_data_type", "test_data_id"); + // verify no overwrite of existing data + ensure_equals("verify no overwrite 1", (std::string)data["data1"], "test_data_1"); + ensure_equals("verify no overwrite 2", (std::string)data["data2"], "test_data_2"); + ensure_equals("verify no overwrite 3", (std::string)data["data3"]["elem1"], "test element1"); + + // verify written data is good + data = handler->getProtectedData("test_data_type", "test_data_id1"); + ensure_equals("verify stored data1", (std::string)data["store_data1"], "test_store_data1"); + ensure_equals("verify stored data2", (int)data["store_data2"], 27); + ensure_equals("verify stored data3", (std::string)data["store_data3"]["subelem1"], "test_subelem1"); + + // verify overwrite works + handler->setProtectedData("test_data_type", "test_data_id", store_data); + data = handler->getProtectedData("test_data_type", "test_data_id"); + ensure_equals("verify overwrite stored data1", (std::string)data["store_data1"], "test_store_data1"); + ensure_equals("verify overwrite stored data2", (int)data["store_data2"], 27); + ensure_equals("verify overwrite stored data3", (std::string)data["store_data3"]["subelem1"], "test_subelem1"); + + // verify other datatype doesn't conflict + store_data["store_data3"] = "test_store_data3"; + store_data["store_data4"] = 28; + store_data["store_data5"] = LLSD::emptyMap(); + store_data["store_data5"]["subelem2"] = "test_subelem2"; + + handler->setProtectedData("test_data_type1", "test_data_id", store_data); + data = handler->getProtectedData("test_data_type1", "test_data_id"); + ensure_equals("verify datatype stored data3", (std::string)data["store_data3"], "test_store_data3"); + ensure_equals("verify datatype stored data4", (int)data["store_data4"], 28); + ensure_equals("verify datatype stored data5", (std::string)data["store_data5"]["subelem2"], "test_subelem2"); + + // test data not found + + data = handler->getProtectedData("test_data_type1", "test_data_not_found"); + ensure("not found", data.isUndefined()); + + // cause a 'write' by using 'LLPointer' to delete then instantiate a handler + handler = NULL; + handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", "test_password.dat"); + handler->init(); + + data = handler->getProtectedData("test_data_type1", "test_data_id"); + ensure_equals("verify datatype stored data3a", (std::string)data["store_data3"], "test_store_data3"); + ensure_equals("verify datatype stored data4a", (int)data["store_data4"], 28); + ensure_equals("verify datatype stored data5a", (std::string)data["store_data5"]["subelem2"], "test_subelem2"); + + // rewrite the initial file to verify reloads + handler = NULL; + std::ofstream temp_file2("sechandler_settings.tmp", std::ofstream::binary); + temp_file2.write((const char *)&binary_data[0], binary_data.size()); + temp_file2.close(); + + // cause a 'write' + handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", "test_password.dat"); + handler->init(); + data = handler->getProtectedData("test_data_type1", "test_data_id"); + ensure("not found", data.isUndefined()); + + handler->deleteProtectedData("test_data_type", "test_data_id"); + ensure("Deleted data not found", handler->getProtectedData("test_data_type", "test_data_id").isUndefined()); + + LLFile::remove("sechandler_settings.tmp"); + handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", "test_password.dat"); + handler->init(); + data = handler->getProtectedData("test_data_type1", "test_data_id"); + ensure("not found", data.isUndefined()); + handler = NULL; + + ensure(LLFile::isfile("sechandler_settings.tmp")); + } + + // test credenitals + template<> template<> + void sechandler_basic_test_object::test<3>() + { + LLPointer<LLSecAPIBasicHandler> handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", "test_password.dat"); + handler->init(); + + LLSD my_id = LLSD::emptyMap(); + LLSD my_authenticator = LLSD::emptyMap(); + my_id["type"] = "test_type"; + my_id["username"] = "testuser@lindenlab.com"; + my_authenticator["type"] = "test_auth"; + my_authenticator["creds"] = "12345"; + + // test creation of credentials + LLPointer<LLCredential> my_cred = handler->createCredential("my_grid", my_id, my_authenticator); + + // test retrieval of credential components + ensure_equals("basic credential creation: identifier", my_id, my_cred->getIdentifier()); + ensure_equals("basic credential creation: authenticator", my_authenticator, my_cred->getAuthenticator()); + ensure_equals("basic credential creation: grid", "my_grid", my_cred->getGrid()); + + // test setting/overwriting of credential components + my_id["first_name"] = "firstname"; + my_id.erase("username"); + my_authenticator.erase("creds"); + my_authenticator["hash"] = "6563245"; + + my_cred->setCredentialData(my_id, my_authenticator); + ensure_equals("set credential data: identifier", my_id, my_cred->getIdentifier()); + ensure_equals("set credential data: authenticator", my_authenticator, my_cred->getAuthenticator()); + ensure_equals("set credential data: grid", "my_grid", my_cred->getGrid()); + + // test loading of a credential, that hasn't been saved, without + // any legacy saved credential data + LLPointer<LLCredential> my_new_cred = handler->loadCredential("my_grid2"); + ensure("unknown credential load test", my_new_cred->getIdentifier().isMap()); + ensure("unknown credential load test", !my_new_cred->getIdentifier().has("type")); + ensure("unknown credential load test", my_new_cred->getAuthenticator().isMap()); + ensure("unknown credential load test", !my_new_cred->getAuthenticator().has("type")); + // test saving of a credential + handler->saveCredential(my_cred, true); + + // test loading of a known credential + my_new_cred = handler->loadCredential("my_grid"); + ensure_equals("load a known credential: identifier", my_id, my_new_cred->getIdentifier()); + ensure_equals("load a known credential: authenticator",my_authenticator, my_new_cred->getAuthenticator()); + ensure_equals("load a known credential: grid", "my_grid", my_cred->getGrid()); + + // test deletion of a credential + handler->deleteCredential(my_new_cred); + + ensure("delete credential: identifier", my_new_cred->getIdentifier().isUndefined()); + ensure("delete credentialt: authenticator", my_new_cred->getIdentifier().isUndefined()); + ensure_equals("delete credential: grid", "my_grid", my_cred->getGrid()); + // load unknown cred + + my_new_cred = handler->loadCredential("my_grid"); + ensure("deleted credential load test", my_new_cred->getIdentifier().isMap()); + ensure("deleted credential load test", !my_new_cred->getIdentifier().has("type")); + ensure("deleted credential load test", my_new_cred->getAuthenticator().isMap()); + ensure("deleted credential load test", !my_new_cred->getAuthenticator().has("type")); + + // test loading of an unknown credential with legacy saved username, but without + // saved password + gFirstName = "myfirstname"; + gLastName = "mylastname"; + my_new_cred = handler->loadCredential("my_legacy_grid"); + ensure_equals("legacy credential with no password: type", + (const std::string)my_new_cred->getIdentifier()["type"], "agent"); + ensure_equals("legacy credential with no password: first_name", + (const std::string)my_new_cred->getIdentifier()["first_name"], "myfirstname"); + ensure_equals("legacy credential with no password: last_name", + (const std::string)my_new_cred->getIdentifier()["last_name"], "mylastname"); + + ensure("legacy credential with no password: no authenticator", my_new_cred->getAuthenticator().isUndefined()); + + // test loading of an unknown credential with legacy saved password and username + + std::string hashed_password = "fSQcLG03eyIWJmkzfyYaKm81dSweLmsxeSAYKGE7fSQ="; + int length = apr_base64_decode_len(hashed_password.c_str()); + std::vector<char> decoded_password(length); + apr_base64_decode(&decoded_password[0], hashed_password.c_str()); + LLXORCipher cipher(gMACAddress, MAC_ADDRESS_BYTES); + cipher.decrypt((U8*)&decoded_password[0], length); + unsigned char unique_id[MAC_ADDRESS_BYTES]; + LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); + LLXORCipher cipher2(unique_id, sizeof(unique_id)); + cipher2.encrypt((U8*)&decoded_password[0], length); + llofstream password_file("test_password.dat", std::ofstream::binary); + password_file.write(&decoded_password[0], length); + password_file.close(); + + my_new_cred = handler->loadCredential("my_legacy_grid2"); + ensure_equals("legacy credential with password: type", + (const std::string)my_new_cred->getIdentifier()["type"], "agent"); + ensure_equals("legacy credential with password: first_name", + (const std::string)my_new_cred->getIdentifier()["first_name"], "myfirstname"); + ensure_equals("legacy credential with password: last_name", + (const std::string)my_new_cred->getIdentifier()["last_name"], "mylastname"); + + LLSD legacy_authenticator = my_new_cred->getAuthenticator(); + ensure_equals("legacy credential with password: type", + (std::string)legacy_authenticator["type"], + "hash"); + ensure_equals("legacy credential with password: algorithm", + (std::string)legacy_authenticator["algorithm"], + "md5"); + ensure_equals("legacy credential with password: algorithm", + (std::string)legacy_authenticator["secret"], + "01234567890123456789012345678901"); + + // test creation of credentials + my_cred = handler->createCredential("mysavedgrid", my_id, my_authenticator); + // test save without saving authenticator. + handler->saveCredential(my_cred, FALSE); + my_new_cred = handler->loadCredential("mysavedgrid"); + ensure_equals("saved credential without auth", + (const std::string)my_new_cred->getIdentifier()["type"], "test_type"); + ensure("no authenticator values were saved", my_new_cred->getAuthenticator().isUndefined()); + } + + // test cert vector + template<> template<> + void sechandler_basic_test_object::test<4>() + { + + // validate create from empty vector + LLPointer<LLBasicCertificateVector> test_vector = new LLBasicCertificateVector(); + ensure_equals("when loading with nothing, we should result in no certs in vector", test_vector->size(), 0); + + test_vector->add(new LLBasicCertificate(mPemTestCert)); + ensure_equals("one element in vector", test_vector->size(), 1); + test_vector->add(new LLBasicCertificate(mPemChildCert)); + ensure_equals("two elements in vector after add", test_vector->size(), 2); + + test_vector->add(new LLBasicCertificate(mPemChildCert)); + ensure_equals("two elements in vector after re-add", test_vector->size(), 2); + // validate order + X509* test_cert = (*test_vector)[0]->getOpenSSLX509(); + ensure("first cert added remains first cert", !X509_cmp(test_cert, mX509TestCert)); + X509_free(test_cert); + + test_cert = (*test_vector)[1]->getOpenSSLX509(); + ensure("adding a duplicate cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + + // + // validate iterator + // + LLBasicCertificateVector::iterator current_cert = test_vector->begin(); + LLBasicCertificateVector::iterator copy_current_cert = current_cert; + // operator++(int) + ensure("validate iterator++ element in vector is expected cert", *current_cert++ == (*test_vector)[0]); + ensure("validate 2nd iterator++ element in vector is expected cert", *current_cert++ == (*test_vector)[1]); + ensure("validate end iterator++", current_cert == test_vector->end()); + + // copy + ensure("validate copy iterator element in vector is expected cert", *copy_current_cert == (*test_vector)[0]); + + // operator--(int) + current_cert--; + ensure("validate iterator-- element in vector is expected cert", *current_cert-- == (*test_vector)[1]); + ensure("validate iterator-- element in vector is expected cert", *current_cert == (*test_vector)[0]); + + ensure("begin iterator is equal", current_cert == test_vector->begin()); + + // operator++ + ensure("validate ++iterator element in vector is expected cert", *++current_cert == (*test_vector)[1]); + ensure("end of cert vector after ++iterator", ++current_cert == test_vector->end()); + // operator-- + ensure("validate --iterator element in vector is expected cert", *--current_cert == (*test_vector)[1]); + ensure("validate 2nd --iterator element in vector is expected cert", *--current_cert == (*test_vector)[0]); + + // validate remove + // validate create from empty vector + test_vector = new LLBasicCertificateVector(); + test_vector->add(new LLBasicCertificate(mPemTestCert)); + test_vector->add(new LLBasicCertificate(mPemChildCert)); + test_vector->erase(test_vector->begin()); + ensure_equals("one element in store after remove", test_vector->size(), 1); + test_cert = (*test_vector)[0]->getOpenSSLX509(); + ensure("validate cert was removed", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + + // validate insert + test_vector->insert(test_vector->begin(), new LLBasicCertificate(mPemChildCert)); + test_cert = (*test_vector)[0]->getOpenSSLX509(); + + ensure("validate cert was inserted", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + + //validate find + LLSD find_info = LLSD::emptyMap(); + test_vector->insert(test_vector->begin(), new LLBasicCertificate(mPemRootCert)); + find_info["issuer_name"] = LLSD::emptyMap(); + find_info["issuer_name"]["commonName"] = "Roxies intermediate CA"; + find_info["md5_digest"] = "97:24:c7:4c:d4:ba:2d:0e:9c:a1:18:8e:3a:c6:1f:c3"; + current_cert = test_vector->find(find_info); + ensure("found", current_cert != test_vector->end()); + ensure("found cert", (*current_cert).get() == (*test_vector)[1].get()); + find_info["sha1_digest"] = "bad value"; + current_cert =test_vector->find(find_info); + ensure("didn't find cert", current_cert == test_vector->end()); + } + + // test cert store + template<> template<> + void sechandler_basic_test_object::test<5>() + { + // validate load with nothing + LLFile::remove("mycertstore.pem"); + LLPointer<LLBasicCertificateStore> test_store = new LLBasicCertificateStore("mycertstore.pem"); + ensure_equals("when loading with nothing, we should result in no certs in store", test_store->size(), 0); + + // validate load with empty file + test_store->save(); + test_store = NULL; + test_store = new LLBasicCertificateStore("mycertstore.pem"); + ensure_equals("when loading with nothing, we should result in no certs in store", test_store->size(), 0); + test_store=NULL; + + // instantiate a cert store from a file + llofstream certstorefile("mycertstore.pem", std::ios::out); + certstorefile << mPemChildCert << std::endl << mPemTestCert << std::endl; + certstorefile.close(); + // validate loaded certs + test_store = new LLBasicCertificateStore("mycertstore.pem"); + ensure_equals("two elements in store", test_store->size(), 2); + + // operator[] + X509* test_cert = (*test_store)[0]->getOpenSSLX509(); + + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + test_cert = (*test_store)[1]->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509TestCert)); + X509_free(test_cert); + + + // validate save + LLFile::remove("mycertstore.pem"); + test_store->save(); + test_store = NULL; + test_store = new LLBasicCertificateStore("mycertstore.pem"); + ensure_equals("two elements in store after save", test_store->size(), 2); + LLCertificateStore::iterator current_cert = test_store->begin(); + test_cert = (*current_cert)->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + current_cert++; + X509_free(test_cert); + test_cert = (*current_cert)->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509TestCert)); + X509_free(test_cert); + current_cert++; + ensure("end of cert store", current_cert == test_store->end()); + + } + + // cert name wildcard matching + template<> template<> + void sechandler_basic_test_object::test<6>() + { + ensure("simple name match", + _cert_hostname_wildcard_match("foo", "foo")); + + ensure("simple name match, with end period", + _cert_hostname_wildcard_match("foo.", "foo.")); + + ensure("simple name match, with begin period", + _cert_hostname_wildcard_match(".foo", ".foo")); + + ensure("simple name match, with mismatched period cn", + _cert_hostname_wildcard_match("foo.", "foo")); + + ensure("simple name match, with mismatched period hostname", + _cert_hostname_wildcard_match("foo", "foo.")); + + ensure("simple name match, with subdomain", + _cert_hostname_wildcard_match("foo.bar", "foo.bar")); + + ensure("stutter name match", + _cert_hostname_wildcard_match("foobbbbfoo", "foo*bbbfoo")); + + ensure("simple name match, with beginning wildcard", + _cert_hostname_wildcard_match("foobar", "*bar")); + + ensure("simple name match, with ending wildcard", + _cert_hostname_wildcard_match("foobar", "foo*")); + + ensure("simple name match, with beginning null wildcard", + _cert_hostname_wildcard_match("foobar", "*foobar")); + + ensure("simple name match, with ending null wildcard", + _cert_hostname_wildcard_match("foobar", "foobar*")); + + ensure("simple name match, with embedded wildcard", + _cert_hostname_wildcard_match("foobar", "f*r")); + + ensure("simple name match, with embedded null wildcard", + _cert_hostname_wildcard_match("foobar", "foo*bar")); + + ensure("simple name match, with dual embedded wildcard", + _cert_hostname_wildcard_match("foobar", "f*o*ar")); + + ensure("simple name mismatch", + !_cert_hostname_wildcard_match("bar", "foo")); + + ensure("simple name mismatch, with end period", + !_cert_hostname_wildcard_match("foobar.", "foo.")); + + ensure("simple name mismatch, with begin period", + !_cert_hostname_wildcard_match(".foobar", ".foo")); + + ensure("simple name mismatch, with subdomain", + !_cert_hostname_wildcard_match("foobar.bar", "foo.bar")); + + ensure("simple name mismatch, with beginning wildcard", + !_cert_hostname_wildcard_match("foobara", "*bar")); + + ensure("simple name mismatch, with ending wildcard", + !_cert_hostname_wildcard_match("oobar", "foo*")); + + ensure("simple name mismatch, with embedded wildcard", + !_cert_hostname_wildcard_match("oobar", "f*r")); + + ensure("simple name mismatch, with dual embedded wildcard", + !_cert_hostname_wildcard_match("foobar", "f*d*ar")); + + ensure("simple wildcard", + _cert_hostname_wildcard_match("foobar", "*")); + + ensure("long domain", + _cert_hostname_wildcard_match("foo.bar.com", "foo.bar.com")); + + ensure("long domain with multiple wildcards", + _cert_hostname_wildcard_match("foo.bar.com", "*.b*r.com")); + + ensure("end periods", + _cert_hostname_wildcard_match("foo.bar.com.", "*.b*r.com.")); + + ensure("match end period", + _cert_hostname_wildcard_match("foo.bar.com.", "*.b*r.com")); + + ensure("match end period2", + _cert_hostname_wildcard_match("foo.bar.com", "*.b*r.com.")); + + ensure("wildcard mismatch", + !_cert_hostname_wildcard_match("bar.com", "*.bar.com")); + + ensure("wildcard match", + _cert_hostname_wildcard_match("foo.bar.com", "*.bar.com")); + + ensure("wildcard match", + _cert_hostname_wildcard_match("foo.foo.bar.com", "*.bar.com")); + + ensure("wildcard match", + _cert_hostname_wildcard_match("foo.foo.bar.com", "*.*.com")); + + ensure("wildcard mismatch", + !_cert_hostname_wildcard_match("foo.foo.bar.com", "*.foo.com")); + } + + // test cert chain + template<> template<> + void sechandler_basic_test_object::test<7>() + { + // validate create from empty chain + LLPointer<LLBasicCertificateChain> test_chain = new LLBasicCertificateChain(NULL); + ensure_equals("when loading with nothing, we should result in no certs in chain", test_chain->size(), 0); + + // Single cert in the chain. + X509_STORE_CTX *test_store = X509_STORE_CTX_new(); + test_store->cert = mX509ChildCert; + test_store->untrusted = NULL; + test_chain = new LLBasicCertificateChain(test_store); + X509_STORE_CTX_free(test_store); + ensure_equals("two elements in store", test_chain->size(), 1); + X509* test_cert = (*test_chain)[0]->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + + // cert + CA + + test_store = X509_STORE_CTX_new(); + test_store->cert = mX509ChildCert; + test_store->untrusted = sk_X509_new_null(); + sk_X509_push(test_store->untrusted, mX509IntermediateCert); + test_chain = new LLBasicCertificateChain(test_store); + X509_STORE_CTX_free(test_store); + ensure_equals("two elements in store", test_chain->size(), 2); + test_cert = (*test_chain)[0]->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + test_cert = (*test_chain)[1]->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509IntermediateCert)); + X509_free(test_cert); + + // cert + nonrelated + + test_store = X509_STORE_CTX_new(); + test_store->cert = mX509ChildCert; + test_store->untrusted = sk_X509_new_null(); + sk_X509_push(test_store->untrusted, mX509TestCert); + test_chain = new LLBasicCertificateChain(test_store); + X509_STORE_CTX_free(test_store); + ensure_equals("two elements in store", test_chain->size(), 1); + test_cert = (*test_chain)[0]->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + + // cert + CA + nonrelated + test_store = X509_STORE_CTX_new(); + test_store->cert = mX509ChildCert; + test_store->untrusted = sk_X509_new_null(); + sk_X509_push(test_store->untrusted, mX509IntermediateCert); + sk_X509_push(test_store->untrusted, mX509TestCert); + test_chain = new LLBasicCertificateChain(test_store); + X509_STORE_CTX_free(test_store); + ensure_equals("two elements in store", test_chain->size(), 2); + test_cert = (*test_chain)[0]->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + test_cert = (*test_chain)[1]->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509IntermediateCert)); + X509_free(test_cert); + + // cert + intermediate + CA + test_store = X509_STORE_CTX_new(); + test_store->cert = mX509ChildCert; + test_store->untrusted = sk_X509_new_null(); + sk_X509_push(test_store->untrusted, mX509IntermediateCert); + sk_X509_push(test_store->untrusted, mX509RootCert); + test_chain = new LLBasicCertificateChain(test_store); + X509_STORE_CTX_free(test_store); + ensure_equals("three elements in store", test_chain->size(), 3); + test_cert = (*test_chain)[0]->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + test_cert = (*test_chain)[1]->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509IntermediateCert)); + X509_free(test_cert); + + test_cert = (*test_chain)[2]->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509RootCert)); + X509_free(test_cert); + } + // test cert validation + template<> template<> + void sechandler_basic_test_object::test<8>() + { + // start with a trusted store with our known root cert + LLFile::remove("mycertstore.pem"); + LLPointer<LLBasicCertificateStore> test_store = new LLBasicCertificateStore("mycertstore.pem"); + test_store->add(new LLBasicCertificate(mX509RootCert)); + LLSD validation_params; + + // validate basic trust for a chain containing only the intermediate cert. (1 deep) + LLPointer<LLBasicCertificateChain> test_chain = new LLBasicCertificateChain(NULL); + + test_chain->add(new LLBasicCertificate(mX509IntermediateCert)); + + test_store->validate(0, test_chain, validation_params); + + // add the root certificate to the chain and revalidate + test_chain->add(new LLBasicCertificate(mX509RootCert)); + test_store->validate(0, test_chain, validation_params); + + // add the child cert at the head of the chain, and revalidate (3 deep chain) + test_chain->insert(test_chain->begin(), new LLBasicCertificate(mX509ChildCert)); + test_store->validate(0, test_chain, validation_params); + + // basic failure cases + test_chain = new LLBasicCertificateChain(NULL); + //validate with only the child cert in chain, but child cert was previously + // trusted + test_chain->add(new LLBasicCertificate(mX509ChildCert)); + + // validate without the trust flag. + test_store->validate(VALIDATION_POLICY_TRUSTED, test_chain, validation_params); + + // Validate with child cert but no parent, and no parent in CA store + test_store = new LLBasicCertificateStore("mycertstore.pem"); + ensure_throws("no CA, with only a child cert", + LLCertValidationTrustException, + (*test_chain)[0], + test_store->validate, + VALIDATION_POLICY_TRUSTED, + test_chain, + validation_params); + + + // validate without the trust flag. + test_store->validate(0, test_chain, validation_params); + + // clear out the store + test_store = new LLBasicCertificateStore("mycertstore.pem"); + // append the intermediate cert + test_chain->add(new LLBasicCertificate(mX509IntermediateCert)); + ensure_throws("no CA, with child and intermediate certs", + LLCertValidationTrustException, + (*test_chain)[1], + test_store->validate, + VALIDATION_POLICY_TRUSTED, + test_chain, + validation_params); + // validate without the trust flag + test_store->validate(0, test_chain, validation_params); + + // Test time validity + LLSD child_info; + ((*test_chain)[0])->getLLSD(child_info); + validation_params = LLSD::emptyMap(); + validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_FROM].asDate().secondsSinceEpoch() + 1.0); + test_store->validate(VALIDATION_POLICY_TIME, test_chain, validation_params); + + validation_params = LLSD::emptyMap(); + validation_params[CERT_VALIDATION_DATE] = child_info[CERT_VALID_FROM].asDate(); + + validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_FROM].asDate().secondsSinceEpoch() - 1.0); + + // test not yet valid + ensure_throws("Child cert not yet valid" , + LLCertValidationExpirationException, + (*test_chain)[0], + test_store->validate, + VALIDATION_POLICY_TIME, + test_chain, + validation_params); + validation_params = LLSD::emptyMap(); + validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_TO].asDate().secondsSinceEpoch() + 1.0); + + // test cert expired + ensure_throws("Child cert expired", + LLCertValidationExpirationException, + (*test_chain)[0], + test_store->validate, + VALIDATION_POLICY_TIME, + test_chain, + validation_params); + + // test SSL KU + // validate basic trust for a chain containing child and intermediate. + test_chain = new LLBasicCertificateChain(NULL); + test_chain->add(new LLBasicCertificate(mX509ChildCert)); + test_chain->add(new LLBasicCertificate(mX509IntermediateCert)); + test_store->validate(VALIDATION_POLICY_SSL_KU, test_chain, validation_params); + + test_chain = new LLBasicCertificateChain(NULL); + test_chain->add(new LLBasicCertificate(mX509TestCert)); + + test_store = new LLBasicCertificateStore("mycertstore.pem"); + ensure_throws("Cert doesn't have ku", + LLCertKeyUsageValidationException, + (*test_chain)[0], + test_store->validate, + VALIDATION_POLICY_SSL_KU, + test_chain, + validation_params); + + // test sha1RSA validation + test_chain = new LLBasicCertificateChain(NULL); + test_chain->add(new LLBasicCertificate(mSha1RSATestCert)); + test_chain->add(new LLBasicCertificate(mSha1RSATestCA)); + + test_store->validate(0, test_chain, validation_params); + } + +}; + diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp new file mode 100644 index 0000000000..803020dc7a --- /dev/null +++ b/indra/newview/tests/llslurl_test.cpp @@ -0,0 +1,258 @@ +/** + * @file llsecapi_test.cpp + * @author Roxie + * @date 2009-02-10 + * @brief Test the sec api functionality + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version maps.secondlife.com2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ +#include "../llviewerprecompiledheaders.h" +#include "../llviewernetwork.h" +#include "../test/lltut.h" +#include "../llslurl.h" +#include "../../llxml/llcontrol.h" +#include "llsdserialize.h" +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing + +LLControlGroup::LLControlGroup(const std::string& name) +: LLInstanceTracker<LLControlGroup, std::string>(name) {} +LLControlGroup::~LLControlGroup() {} +BOOL LLControlGroup::declareString(const std::string& name, + const std::string& initial_val, + const std::string& comment, + BOOL persist) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} + +std::string gCmdLineLoginURI; +std::string gCmdLineGridChoice; +std::string gCmdLineHelperURI; +std::string gLoginPage; +std::string gCurrentGrid; +std::string LLControlGroup::getString(const std::string& name) +{ + if (name == "CmdLineGridChoice") + return gCmdLineGridChoice; + else if (name == "CmdLineHelperURI") + return gCmdLineHelperURI; + else if (name == "LoginPage") + return gLoginPage; + else if (name == "CurrentGrid") + return gCurrentGrid; + return ""; +} + +LLSD LLControlGroup::getLLSD(const std::string& name) +{ + if (name == "CmdLineLoginURI") + { + if(!gCmdLineLoginURI.empty()) + { + return LLSD(gCmdLineLoginURI); + } + } + return LLSD(); +} + + +LLControlGroup gSavedSettings("test"); + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- +namespace tut +{ + // Test wrapper declaration : wrapping nothing for the moment + struct slurlTest + { + slurlTest() + { + LLGridManager::getInstance()->initialize(std::string("")); + } + ~slurlTest() + { + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<slurlTest> slurlTestFactory; + typedef slurlTestFactory::object slurlTestObject; + tut::slurlTestFactory tut_test("llslurl"); + + // --------------------------------------------------------------------------------------- + // Test functions + // --------------------------------------------------------------------------------------- + // construction from slurl string + template<> template<> + void slurlTestObject::test<1>() + { + LLGridManager::getInstance()->setGridChoice("util.agni.lindenlab.com"); + + LLSLURL slurl = LLSLURL(""); + ensure_equals("null slurl", (int)slurl.getType(), LLSLURL::LAST_LOCATION); + + slurl = LLSLURL("http://slurl.com/secondlife/myregion"); + ensure_equals("slurl.com slurl, region only - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("slurl.com slurl, region only", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/128/128/0"); + + slurl = LLSLURL("http://maps.secondlife.com/secondlife/myregion/1/2/3"); + ensure_equals("maps.secondlife.com slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("maps.secondlife.com slurl, region + coords", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/1/2/3"); + + slurl = LLSLURL("secondlife://myregion"); + ensure_equals("secondlife: slurl, region only - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("secondlife: slurl, region only", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/128/128/0"); + + slurl = LLSLURL("secondlife://myregion/1/2/3"); + ensure_equals("secondlife: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("secondlife slurl, region + coords", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/1/2/3"); + + slurl = LLSLURL("/myregion"); + ensure_equals("/region slurl, region- type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("/region slurl, region ", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/128/128/0"); + + slurl = LLSLURL("/myregion/1/2/3"); + ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("/ slurl, region + coords", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/1/2/3"); + + slurl = LLSLURL("my region/1/2/3"); + ensure_equals(" slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals(" slurl, region + coords", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/my%20region/1/2/3"); + + slurl = LLSLURL("https://my.grid.com/region/my%20region/1/2/3"); + ensure_equals("grid slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("grid slurl, region + coords", slurl.getSLURLString(), + "https://my.grid.com/region/my%20region/1/2/3"); + + slurl = LLSLURL("https://my.grid.com/region/my region"); + ensure_equals("grid slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("grid slurl, region + coords", slurl.getSLURLString(), + "https://my.grid.com/region/my%20region/128/128/0"); + + LLGridManager::getInstance()->setGridChoice("foo.bar.com"); + slurl = LLSLURL("/myregion/1/2/3"); + ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("/ slurl, region + coords", slurl.getSLURLString(), + "https://foo.bar.com/region/myregion/1/2/3"); + + slurl = LLSLURL("myregion/1/2/3"); + ensure_equals(": slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals(" slurl, region + coords", slurl.getSLURLString(), + "https://foo.bar.com/region/myregion/1/2/3"); + + slurl = LLSLURL(LLSLURL::SIM_LOCATION_HOME); + ensure_equals("home", slurl.getType(), LLSLURL::HOME_LOCATION); + + slurl = LLSLURL(LLSLURL::SIM_LOCATION_LAST); + ensure_equals("last", slurl.getType(), LLSLURL::LAST_LOCATION); + + slurl = LLSLURL("secondlife:///app/foo/bar?12345"); + ensure_equals("app", slurl.getType(), LLSLURL::APP); + ensure_equals("appcmd", slurl.getAppCmd(), "foo"); + ensure_equals("apppath", slurl.getAppPath().size(), 1); + ensure_equals("apppath2", slurl.getAppPath()[0].asString(), "bar"); + ensure_equals("appquery", slurl.getAppQuery(), "12345"); + ensure_equals("grid1", "foo.bar.com", slurl.getGrid()); + + slurl = LLSLURL("secondlife://Aditi/app/foo/bar?12345"); + ensure_equals("app", slurl.getType(), LLSLURL::APP); + ensure_equals("appcmd", slurl.getAppCmd(), "foo"); + ensure_equals("apppath", slurl.getAppPath().size(), 1); + ensure_equals("apppath2", slurl.getAppPath()[0].asString(), "bar"); + ensure_equals("appquery", slurl.getAppQuery(), "12345"); + ensure_equals("grid2", "util.aditi.lindenlab.com", slurl.getGrid()); + + LLGridManager::getInstance()->setGridChoice("foo.bar.com"); + slurl = LLSLURL("secondlife:///secondlife/myregion/1/2/3"); + ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("location", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("region" , "myregion", slurl.getRegion()); + ensure_equals("grid3", "util.agni.lindenlab.com", slurl.getGrid()); + + slurl = LLSLURL("secondlife://Aditi/secondlife/myregion/1/2/3"); + ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("location", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("region" , "myregion", slurl.getRegion()); + ensure_equals("grid4", "util.aditi.lindenlab.com", slurl.getGrid()); + + slurl = LLSLURL("https://my.grid.com/app/foo/bar?12345"); + ensure_equals("app", slurl.getType(), LLSLURL::APP); + ensure_equals("appcmd", slurl.getAppCmd(), "foo"); + ensure_equals("apppath", slurl.getAppPath().size(), 1); + ensure_equals("apppath2", slurl.getAppPath()[0].asString(), "bar"); + ensure_equals("appquery", slurl.getAppQuery(), "12345"); + + } + + // construction from grid/region/vector combos + template<> template<> + void slurlTestObject::test<2>() + { + LLSLURL slurl = LLSLURL("mygrid.com", "my region"); + ensure_equals("grid/region - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("grid/region", slurl.getSLURLString(), + "https://mygrid.com/region/my%20region/128/128/0"); + + slurl = LLSLURL("mygrid.com", "my region", LLVector3(1,2,3)); + ensure_equals("grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals(" grid/region/vector", slurl.getSLURLString(), + "https://mygrid.com/region/my%20region/1/2/3"); + + LLGridManager::getInstance()->setGridChoice("foo.bar.com.bar"); + slurl = LLSLURL("my region", LLVector3(1,2,3)); + ensure_equals("grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals(" grid/region/vector", slurl.getSLURLString(), + "https://foo.bar.com.bar/region/my%20region/1/2/3"); + + LLGridManager::getInstance()->setGridChoice("util.agni.lindenlab.com"); + slurl = LLSLURL("my region", LLVector3(1,2,3)); + ensure_equals("default grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals(" default grid/region/vector", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/my%20region/1/2/3"); + + } + // Accessors + template<> template<> + void slurlTestObject::test<3>() + { + LLSLURL slurl = LLSLURL("https://my.grid.com/region/my%20region/1/2/3"); + ensure_equals("login string", slurl.getLoginString(), "uri:my region&1&2&3"); + ensure_equals("location string", slurl.getLocationString(), "my region/1/2/3"); + ensure_equals("grid", slurl.getGrid(), "my.grid.com"); + ensure_equals("region", slurl.getRegion(), "my region"); + ensure_equals("position", slurl.getPosition(), LLVector3(1, 2, 3)); + + } +} diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp new file mode 100644 index 0000000000..5fba5eb69c --- /dev/null +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -0,0 +1,582 @@ +/** + * @file llviewernetwork_test.cpp + * @author Roxie + * @date 2009-03-9 + * @brief Test the viewernetwork functionality + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden LregisterSecAPIab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ +#include "../llviewerprecompiledheaders.h" +#include "../llviewernetwork.h" +#include "../test/lltut.h" +#include "../../llxml/llcontrol.h" +#include "llfile.h" + +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing + +LLControlGroup::LLControlGroup(const std::string& name) +: LLInstanceTracker<LLControlGroup, std::string>(name) {} +LLControlGroup::~LLControlGroup() {} +BOOL LLControlGroup::declareString(const std::string& name, + const std::string& initial_val, + const std::string& comment, + BOOL persist) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} + +std::string gCmdLineLoginURI; +std::string gCmdLineGridChoice; +std::string gCmdLineHelperURI; +std::string gLoginPage; +std::string gCurrentGrid; +std::string LLControlGroup::getString(const std::string& name) +{ + if (name == "CmdLineGridChoice") + return gCmdLineGridChoice; + else if (name == "CmdLineHelperURI") + return gCmdLineHelperURI; + else if (name == "LoginPage") + return gLoginPage; + else if (name == "CurrentGrid") + return gCurrentGrid; + return ""; +} + +LLSD LLControlGroup::getLLSD(const std::string& name) +{ + if (name == "CmdLineLoginURI") + { + if(!gCmdLineLoginURI.empty()) + { + return LLSD(gCmdLineLoginURI); + } + } + return LLSD(); +} + + +LLControlGroup gSavedSettings("test"); + +const char *gSampleGridFile = "<llsd><map>" +"<key>grid1</key><map>" +" <key>favorite</key><integer>1</integer>" +" <key>helper_uri</key><string>https://helper1/helpers/</string>" +" <key>label</key><string>mylabel</string>" +" <key>login_page</key><string>loginpage</string>" +" <key>login_uri</key><array><string>myloginuri</string></array>" +" <key>name</key><string>grid1</string>" +" <key>visible</key><integer>1</integer>" +" <key>credential_type</key><string>agent</string>" +" <key>grid_login_id</key><string>MyGrid</string>" +"</map>" +"<key>util.agni.lindenlab.com</key><map>" +" <key>favorite</key><integer>1</integer>" +" <key>helper_uri</key><string>https://helper1/helpers/</string>" +" <key>label</key><string>mylabel</string>" +" <key>login_page</key><string>loginpage</string>" +" <key>login_uri</key><array><string>myloginuri</string></array>" +" <key>name</key><string>util.agni.lindenlab.com</string>" +"</map></map></llsd>"; +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- +namespace tut +{ + // Test wrapper declaration : wrapping nothing for the moment + struct viewerNetworkTest + { + viewerNetworkTest() + { + LLFile::remove("grid_test.xml"); + gCmdLineLoginURI.clear(); + gCmdLineGridChoice.clear(); + gCmdLineHelperURI.clear(); + gLoginPage.clear(); + gCurrentGrid.clear(); + } + ~viewerNetworkTest() + { + LLFile::remove("grid_test.xml"); + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<viewerNetworkTest> viewerNetworkTestFactory; + typedef viewerNetworkTestFactory::object viewerNetworkTestObject; + tut::viewerNetworkTestFactory tut_test("llviewernetwork"); + + // --------------------------------------------------------------------------------------- + // Test functions + // --------------------------------------------------------------------------------------- + // initialization without a grid file + template<> template<> + void viewerNetworkTestObject::test<1>() + { + + LLGridManager *manager = LLGridManager::getInstance(); + // grid file doesn't exist + manager->initialize("grid_test.xml"); + // validate that some of the defaults are available. + std::map<std::string, std::string> known_grids = manager->getKnownGrids(); + ensure_equals("Known grids is a string-string map of size 23", known_grids.size(), 23); + ensure_equals("Agni has the right name and label", + known_grids[std::string("util.agni.lindenlab.com")], std::string("Agni")); + ensure_equals("None exists", known_grids[""], "None"); + + LLSD grid; + LLGridManager::getInstance()->getGridInfo("util.agni.lindenlab.com", grid); + ensure("Grid info for agni is a map", grid.isMap()); + ensure_equals("name is correct for agni", + grid[GRID_VALUE].asString(), std::string("util.agni.lindenlab.com")); + ensure_equals("label is correct for agni", + grid[GRID_LABEL_VALUE].asString(), std::string("Agni")); + ensure("Login URI is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Agni login uri is correct", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://login.agni.lindenlab.com/cgi-bin/login.cgi")); + ensure_equals("Agni helper uri is correct", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://secondlife.com/helpers/")); + ensure_equals("Agni login page is correct", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://secondlife.com/app/login/")); + ensure("Agni is a favorite", + grid.has(GRID_IS_FAVORITE_VALUE)); + ensure("Agni is a system grid", + grid.has(GRID_IS_SYSTEM_GRID_VALUE)); + ensure("Grid file wasn't greated as it wasn't saved", + !LLFile::isfile("grid_test.xml")); + } + + // initialization with a grid file + template<> template<> + void viewerNetworkTestObject::test<2>() + { + llofstream gridfile("grid_test.xml"); + gridfile << gSampleGridFile; + gridfile.close(); + + LLGridManager::getInstance()->initialize("grid_test.xml"); + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("adding a grid via a grid file increases known grid size", + known_grids.size(), 24); + ensure_equals("Agni is still there after we've added a grid via a grid file", + known_grids["util.agni.lindenlab.com"], std::string("Agni")); + + + // assure Agni doesn't get overwritten + LLSD grid; + LLGridManager::getInstance()->getGridInfo("util.agni.lindenlab.com", grid); + + ensure_equals("Agni grid label was not modified by grid file", + grid[GRID_LABEL_VALUE].asString(), std::string("Agni")); + + ensure_equals("Agni name wasn't modified by grid file", + grid[GRID_VALUE].asString(), std::string("util.agni.lindenlab.com")); + ensure("Agni grid URI is still an array after grid file", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Agni login uri still the same after grid file", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://login.agni.lindenlab.com/cgi-bin/login.cgi")); + ensure_equals("Agni helper uri still the same after grid file", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://secondlife.com/helpers/")); + ensure_equals("Agni login page the same after grid file", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://secondlife.com/app/login/")); + ensure("Agni still a favorite after grid file", + grid.has(GRID_IS_FAVORITE_VALUE)); + ensure("Agni system grid still set after grid file", + grid.has(GRID_IS_SYSTEM_GRID_VALUE)); + + ensure_equals("Grid file adds to name<->label map", + known_grids["grid1"], std::string("mylabel")); + LLGridManager::getInstance()->getGridInfo("grid1", grid); + ensure_equals("grid file grid name is set", + grid[GRID_VALUE].asString(), std::string("grid1")); + ensure_equals("grid file label is set", + grid[GRID_LABEL_VALUE].asString(), std::string("mylabel")); + ensure("grid file login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("grid file login uri is set", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("myloginuri")); + ensure_equals("grid file helper uri is set", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://helper1/helpers/")); + ensure_equals("grid file login page is set", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("loginpage")); + ensure("grid file favorite is set", + grid.has(GRID_IS_FAVORITE_VALUE)); + ensure("grid file isn't a system grid", + !grid.has(GRID_IS_SYSTEM_GRID_VALUE)); + ensure("Grid file still exists after loading", + LLFile::isfile("grid_test.xml")); + } + + // Initialize via command line + + template<> template<> + void viewerNetworkTestObject::test<3>() + { + // USE --grid command line + // initialize with a known grid + LLSD grid; + gCmdLineGridChoice = "Aditi"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + // with single login uri specified. + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("Using a known grid via command line doesn't increase number of known grids", + known_grids.size(), 23); + ensure_equals("getGridLabel", LLGridManager::getInstance()->getGridLabel(), std::string("Aditi")); + // initialize with a known grid in lowercase + gCmdLineGridChoice = "agni"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + ensure_equals("getGridLabel", LLGridManager::getInstance()->getGridLabel(), std::string("Agni")); + + // now try a command line with a custom grid identifier + gCmdLineGridChoice = "mycustomgridchoice"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("adding a command line grid with custom name increases known grid size", + known_grids.size(), 24); + ensure_equals("Custom Command line grid is added to the list of grids", + known_grids["mycustomgridchoice"], std::string("mycustomgridchoice")); + LLGridManager::getInstance()->getGridInfo("mycustomgridchoice", grid); + ensure_equals("Custom Command line grid name is set", + grid[GRID_VALUE].asString(), std::string("mycustomgridchoice")); + ensure_equals("Custom Command line grid label is set", + grid[GRID_LABEL_VALUE].asString(), std::string("mycustomgridchoice")); + ensure("Custom Command line grid login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Custom Command line grid login uri is set", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://mycustomgridchoice/cgi-bin/login.cgi")); + ensure_equals("Custom Command line grid helper uri is set", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://mycustomgridchoice/helpers/")); + ensure_equals("Custom Command line grid login page is set", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://mycustomgridchoice/app/login/")); + } + + // validate override of login uri with cmd line + template<> template<> + void viewerNetworkTestObject::test<4>() + { + // Override with loginuri + // override known grid + LLSD grid; + gCmdLineGridChoice = "Aditi"; + gCmdLineLoginURI = "https://my.login.uri/cgi-bin/login.cgi"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("Override known grid login uri: No grids are added", + known_grids.size(), 23); + LLGridManager::getInstance()->getGridInfo(grid); + ensure("Override known grid login uri: login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Override known grid login uri: Command line grid login uri is set", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://my.login.uri/cgi-bin/login.cgi")); + ensure_equals("Override known grid login uri: helper uri is not changed", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("http://aditi-secondlife.webdev.lindenlab.com/helpers/")); + ensure_equals("Override known grid login uri: login page is not set", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://secondlife.com/app/login/")); + + // Override with loginuri + // override custom grid + gCmdLineGridChoice = "mycustomgridchoice"; + gCmdLineLoginURI = "https://my.login.uri/cgi-bin/login.cgi"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + known_grids = LLGridManager::getInstance()->getKnownGrids(); + LLGridManager::getInstance()->getGridInfo(grid); + ensure_equals("Override custom grid login uri: Grid is added", + known_grids.size(), 24); + ensure("Override custom grid login uri: login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Override custom grid login uri: login uri is set", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://my.login.uri/cgi-bin/login.cgi")); + ensure_equals("Override custom grid login uri: Helper uri is not set", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://mycustomgridchoice/helpers/")); + ensure_equals("Override custom grid login uri: Login page is not set", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://mycustomgridchoice/app/login/")); + } + + // validate override of helper uri with cmd line + template<> template<> + void viewerNetworkTestObject::test<5>() + { + // Override with helperuri + // override known grid + LLSD grid; + gCmdLineGridChoice = "Aditi"; + gCmdLineLoginURI = ""; + gCmdLineHelperURI = "https://my.helper.uri/mycustomhelpers"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("Override known grid helper uri: No grids are added", + known_grids.size(), 23); + LLGridManager::getInstance()->getGridInfo(grid); + ensure("Override known known helper uri: login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Override known grid helper uri: login uri is not changed", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://login.aditi.lindenlab.com/cgi-bin/login.cgi")); + ensure_equals("Override known grid helper uri: helper uri is changed", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://my.helper.uri/mycustomhelpers")); + ensure_equals("Override known grid helper uri: login page is not changed", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://secondlife.com/app/login/")); + + // Override with helperuri + // override custom grid + gCmdLineGridChoice = "mycustomgridchoice"; + gCmdLineHelperURI = "https://my.helper.uri/mycustomhelpers"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("Override custom grid helper uri: grids is added", + known_grids.size(), 24); + LLGridManager::getInstance()->getGridInfo(grid); + ensure("Override custom helper uri: login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Override custom grid helper uri: login uri is not changed", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://mycustomgridchoice/cgi-bin/login.cgi")); + ensure_equals("Override custom grid helper uri: helper uri is changed", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://my.helper.uri/mycustomhelpers")); + ensure_equals("Override custom grid helper uri: login page is not changed", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://mycustomgridchoice/app/login/")); + } + + // validate overriding of login page via cmd line + template<> template<> + void viewerNetworkTestObject::test<6>() + { + // Override with login page + // override known grid + LLSD grid; + gCmdLineGridChoice = "Aditi"; + gCmdLineHelperURI = ""; + gLoginPage = "myloginpage"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("Override known grid login page: No grids are added", + known_grids.size(), 23); + LLGridManager::getInstance()->getGridInfo(grid); + ensure("Override known grid login page: Command line grid login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Override known grid login page: login uri is not changed", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://login.aditi.lindenlab.com/cgi-bin/login.cgi")); + ensure_equals("Override known grid login page: helper uri is not changed", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("http://aditi-secondlife.webdev.lindenlab.com/helpers/")); + ensure_equals("Override known grid login page: login page is changed", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("myloginpage")); + + // Override with login page + // override custom grid + gCmdLineGridChoice = "mycustomgridchoice"; + gLoginPage = "myloginpage"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("Override custom grid login page: grids are added", + known_grids.size(), 24); + LLGridManager::getInstance()->getGridInfo(grid); + ensure("Override custom grid login page: Command line grid login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Override custom grid login page: login uri is not changed", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://mycustomgridchoice/cgi-bin/login.cgi")); + ensure_equals("Override custom grid login page: helper uri is not changed", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://mycustomgridchoice/helpers/")); + ensure_equals("Override custom grid login page: login page is changed", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("myloginpage")); + + } + + // validate grid selection + template<> template<> + void viewerNetworkTestObject::test<7>() + { + LLSD loginURI = LLSD::emptyArray(); + LLSD grid = LLSD::emptyMap(); + // adding a grid with simply a name will populate the values. + grid[GRID_VALUE] = "myaddedgrid"; + + LLGridManager::getInstance()->initialize("grid_test.xml"); + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->setGridChoice("util.agni.lindenlab.com"); + ensure_equals("getGridLabel", LLGridManager::getInstance()->getGridLabel(), std::string("Agni")); + ensure_equals("getGrid", LLGridManager::getInstance()->getGrid(), + std::string("util.agni.lindenlab.com")); + ensure_equals("getHelperURI", LLGridManager::getInstance()->getHelperURI(), + std::string("https://secondlife.com/helpers/")); + ensure_equals("getLoginPage", LLGridManager::getInstance()->getLoginPage(), + std::string("http://secondlife.com/app/login/")); + ensure_equals("getLoginPage2", LLGridManager::getInstance()->getLoginPage("util.agni.lindenlab.com"), + std::string("http://secondlife.com/app/login/")); + ensure("Is Agni a production grid", LLGridManager::getInstance()->isInProductionGrid()); + std::vector<std::string> uris; + LLGridManager::getInstance()->getLoginURIs(uris); + ensure_equals("getLoginURIs size", uris.size(), 1); + ensure_equals("getLoginURIs", uris[0], + std::string("https://login.agni.lindenlab.com/cgi-bin/login.cgi")); + LLGridManager::getInstance()->setGridChoice("myaddedgrid"); + ensure_equals("getGridLabel", LLGridManager::getInstance()->getGridLabel(), std::string("myaddedgrid")); + ensure("Is myaddedgrid a production grid", !LLGridManager::getInstance()->isInProductionGrid()); + + LLGridManager::getInstance()->setFavorite(); + LLGridManager::getInstance()->getGridInfo("myaddedgrid", grid); + ensure("setting favorite", grid.has(GRID_IS_FAVORITE_VALUE)); + } + + // name based grid population + template<> template<> + void viewerNetworkTestObject::test<8>() + { + LLGridManager::getInstance()->initialize("grid_test.xml"); + LLSD grid = LLSD::emptyMap(); + // adding a grid with simply a name will populate the values. + grid[GRID_VALUE] = "myaddedgrid"; + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->getGridInfo("myaddedgrid", grid); + + ensure_equals("name based grid has name value", + grid[GRID_VALUE].asString(), + std::string("myaddedgrid")); + ensure_equals("name based grid has label value", + grid[GRID_LABEL_VALUE].asString(), + std::string("myaddedgrid")); + ensure_equals("name based grid has name value", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://myaddedgrid/helpers/")); + ensure_equals("name based grid has name value", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://myaddedgrid/app/login/")); + ensure("name based grid has array loginuri", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("name based grid has single login uri value", + grid[GRID_LOGIN_URI_VALUE].size(), 1); + ensure_equals("Name based grid login uri is correct", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://myaddedgrid/cgi-bin/login.cgi")); + ensure("name based grid is not a favorite yet", + !grid.has(GRID_IS_FAVORITE_VALUE)); + ensure("name based grid does not have system setting", + !grid.has(GRID_IS_SYSTEM_GRID_VALUE)); + + llofstream gridfile("grid_test.xml"); + gridfile << gSampleGridFile; + gridfile.close(); + } + + // persistence of the grid list with an empty gridfile. + template<> template<> + void viewerNetworkTestObject::test<9>() + { + // try with initial grid list without a grid file, + // without setting the grid to a saveable favorite. + LLGridManager::getInstance()->initialize("grid_test.xml"); + LLSD grid = LLSD::emptyMap(); + grid[GRID_VALUE] = std::string("mynewgridname"); + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->saveFavorites(); + ensure("Grid file exists after saving", + LLFile::isfile("grid_test.xml")); + LLGridManager::getInstance()->initialize("grid_test.xml"); + // should not be there + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure("New grid wasn't added to persisted list without being marked a favorite", + known_grids.find(std::string("mynewgridname")) == known_grids.end()); + + // mark a grid a favorite to make sure it's persisted + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->setGridChoice("mynewgridname"); + LLGridManager::getInstance()->setFavorite(); + LLGridManager::getInstance()->saveFavorites(); + ensure("Grid file exists after saving", + LLFile::isfile("grid_test.xml")); + LLGridManager::getInstance()->initialize("grid_test.xml"); + // should not be there + known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure("New grid wasn't added to persisted list after being marked a favorite", + known_grids.find(std::string("mynewgridname")) != + known_grids.end()); + } + + // persistence of the grid file with existing gridfile + template<> template<> + void viewerNetworkTestObject::test<10>() + { + + llofstream gridfile("grid_test.xml"); + gridfile << gSampleGridFile; + gridfile.close(); + + LLGridManager::getInstance()->initialize("grid_test.xml"); + LLSD grid = LLSD::emptyMap(); + grid[GRID_VALUE] = std::string("mynewgridname"); + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->saveFavorites(); + // validate we didn't lose existing favorites + LLGridManager::getInstance()->initialize("grid_test.xml"); + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure("New grid wasn't added to persisted list after being marked a favorite", + known_grids.find(std::string("grid1")) != + known_grids.end()); + + // add a grid + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->setGridChoice("mynewgridname"); + LLGridManager::getInstance()->setFavorite(); + LLGridManager::getInstance()->saveFavorites(); + known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure("New grid wasn't added to persisted list after being marked a favorite", + known_grids.find(std::string("grid1")) != + known_grids.end()); + known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure("New grid wasn't added to persisted list after being marked a favorite", + known_grids.find(std::string("mynewgridname")) != + known_grids.end()); + } +} diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 668e21c253..2a966f4adf 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -349,6 +349,7 @@ class WindowsManifest(ViewerManifest): self.path("qtwebkitd4.dll") self.path("qtxmlpatternsd4.dll") self.path("ssleay32.dll") + self.path("winmm.dll") # For WebKit/Qt plugin runtimes (image format plugins) if self.prefix(src="imageformats", dst="imageformats"): diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index b9f61ca7e1..e1922367bf 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -122,29 +122,35 @@ private: LLSD mAuthResponse, mValidAuthResponse; }; -void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials) +void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params) { + LL_DEBUGS("LLLogin") << " connect with uri '" << uri << "', login_params " << login_params << LL_ENDL; + // Launch a coroutine with our login_() method. Run the coroutine until // its first wait; at that point, return here. std::string coroname = LLCoros::instance().launch("LLLogin::Impl::login_", - boost::bind(&Impl::login_, this, _1, uri, credentials)); + boost::bind(&Impl::login_, this, _1, uri, login_params)); + LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL; } -void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credentials) +void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_params) { - LLSD printable_credentials = credentials; - if(printable_credentials.has("params") - && printable_credentials["params"].has("passwd")) + try { - printable_credentials["params"]["passwd"] = "*******"; - } + LLSD printable_params = login_params; + //if(printable_params.has("params") + // && printable_params["params"].has("passwd")) + //{ + // printable_params["params"]["passwd"] = "*******"; + //} LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) - << " with uri '" << uri << "', credentials " << printable_credentials << LL_ENDL; + << " with uri '" << uri << "', parameters " << printable_params << LL_ENDL; // Arriving in SRVRequest state LLEventStream replyPump("SRVreply", true); // Should be an array of one or more uri strings. + LLSD rewrittenURIs; { LLEventTimeout filter(replyPump); @@ -155,9 +161,9 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential // *NOTE:Mani - Completely arbitrary default timeout value for SRV request. F32 seconds_to_timeout = 5.0f; - if(credentials.has("cfg_srv_timeout")) + if(login_params.has("cfg_srv_timeout")) { - seconds_to_timeout = credentials["cfg_srv_timeout"].asReal(); + seconds_to_timeout = login_params["cfg_srv_timeout"].asReal(); } // If the SRV request times out (e.g. EXT-3934), simulate response: an @@ -167,9 +173,9 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential filter.eventAfter(seconds_to_timeout, fakeResponse); std::string srv_pump_name = "LLAres"; - if(credentials.has("cfg_srv_pump")) + if(login_params.has("cfg_srv_pump")) { - srv_pump_name = credentials["cfg_srv_pump"].asString(); + srv_pump_name = login_params["cfg_srv_pump"].asString(); } // Make request @@ -194,7 +200,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential urend(rewrittenURIs.endArray()); urit != urend; ++urit) { - LLSD request(credentials); + LLSD request(login_params); request["reply"] = loginReplyPump.getName(); request["uri"] = *urit; std::string status; @@ -291,8 +297,17 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential // to success, add a data/message and data/reason fields. LLSD error_response; error_response["reason"] = mAuthResponse["status"]; + error_response["errorcode"] = mAuthResponse["errorcode"]; error_response["message"] = mAuthResponse["error"]; + if(mAuthResponse.has("certificate")) + { + error_response["certificate"] = mAuthResponse["certificate"]; + } sendProgressEvent("offline", "fail.login", error_response); + } + catch (...) { + llerrs << "login exception caught" << llendl; + } } void LLLogin::Impl::disconnect() diff --git a/install.xml b/install.xml index 651a6b9cf9..ccebe2fe50 100644 --- a/install.xml +++ b/install.xml @@ -118,9 +118,9 @@ <key>linux</key> <map> <key>md5sum</key> - <string>946c2e106f14f7a1e521d4a14e0e146f</string> + <string>91694429e391efeea1de974df26032a2</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/ares-1.4.0-linux-20081202.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/ares-1.7.1-linux-20100527.tar.bz2</uri> </map> <key>linux64</key> <map> @@ -240,9 +240,9 @@ <key>linux</key> <map> <key>md5sum</key> - <string>0f366e421ae9c72d9659bd20a2a326d6</string> + <string>a20e73f2e7d6a032ff25a5161b1b7394</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/curl-7.16.4a-linux-20090303a.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/curl-7.20.1-linux-20100527.tar.bz2</uri> </map> <key>linux64</key> <map> @@ -948,23 +948,23 @@ anguage Infrstructure (CLI) international standard</string> <key>darwin</key> <map> <key>md5sum</key> - <string>1956228a93537f250b92f2929fa4ea40</string> + <string>1417e04ca4bec1ed281c43d37b613845</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6+cookies-darwin-20100415.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6+cookies-darwin-20100519.tar.bz2</uri> </map> <key>linux</key> <map> <key>md5sum</key> - <string>a90135a68d2821eef742d15cb06b15b9</string> + <string>7a5e02d252b76ab41bdca58506fa4147</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-20100407-cookie-api.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-20100521.tar.bz2</uri> </map> <key>windows</key> <map> <key>md5sum</key> - <string>b873755dff5f4221b5a3ba63129435a7</string> + <string>1d9697fed57084eea7b3dc250e9c66f7</string> <key>url</key> - <uri>http://viewer-source-downloads.s3.amazonaws.com/install_pkgs/llqtwebkit-windows-qt4.6-cookies-20100402.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-qt4.6-20100525.tar.bz2</uri> </map> </map> </map> @@ -1112,9 +1112,9 @@ anguage Infrstructure (CLI) international standard</string> <key>darwin</key> <map> <key>md5sum</key> - <string>a7b49e0f3eedbd5de117a3524c414b3a</string> + <string>11d2be4f2b172430747b7d4a6739e3d8</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/openSSL-0.9.7c-darwin-20080812.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/openSSL-0.9.8l-darwin-20100428.tar.bz2</uri> </map> <key>linux</key> <map> @@ -1386,23 +1386,23 @@ anguage Infrstructure (CLI) international standard</string> <key>darwin</key> <map> <key>md5sum</key> - <string>3b7fa3a7ac07034a747759f22956b6d5</string> + <string>aa144917d0e33453d3c2cc2c05c6c47c</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8385-darwin-20100412.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8821-darwin-20100529.tar.bz2</uri> </map> <key>linux</key> <map> <key>md5sum</key> - <string>3f834e00fa06e636814f22ad8685e407</string> + <string>98f7945755f3ee8e52f685a3eff4d7be</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8385-linux-20100412.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8821-linux-20100529.tar.bz2</uri> </map> <key>windows</key> <map> <key>md5sum</key> - <string>089a715a33cb48e030c9206966dfe31b</string> + <string>e8fdd46cb026c2ec72c4489eb3bf39c1</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8385-windows-20100412.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8821-windows-20100529.tar.bz2</uri> </map> </map> </map> |