diff options
Diffstat (limited to 'indra/newview')
923 files changed, 14428 insertions, 8301 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b3de276e9c..08e43da9e4 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -216,7 +216,6 @@ set(viewer_SOURCE_FILES llfloaterwhitelistentry.cpp llfloaterwindlight.cpp llfloaterworldmap.cpp - llfoldertype.cpp llfolderview.cpp llfolderviewitem.cpp llfollowcam.cpp @@ -239,7 +238,6 @@ set(viewer_SOURCE_FILES llhudrender.cpp llhudtext.cpp llhudview.cpp - llimcontrolpanel.cpp llimfloater.cpp llimhandler.cpp llimpanel.cpp @@ -270,7 +268,6 @@ set(viewer_SOURCE_FILES llmaniprotate.cpp llmanipscale.cpp llmaniptranslate.cpp - llmapresponders.cpp llmediactrl.cpp llmediadataclient.cpp llmediaremotectrl.cpp @@ -292,6 +289,7 @@ set(viewer_SOURCE_FILES llnotificationalerthandler.cpp llnotificationgrouphandler.cpp llnotificationmanager.cpp + llnotificationofferhandler.cpp llnotificationscripthandler.cpp llnotificationtiphandler.cpp llnotify.cpp @@ -317,13 +315,13 @@ set(viewer_SOURCE_FILES llpanelimcontrolpanel.cpp llpanelland.cpp llpanellandaudio.cpp + llpanellandmarkinfo.cpp llpanellandmarks.cpp llpanellandmedia.cpp llpanellogin.cpp llpanellookinfo.cpp llpanellooks.cpp llpanelmaininventory.cpp - llpanelmedia.cpp llpanelmediasettingsgeneral.cpp llpanelmediasettingspermissions.cpp llpanelmediasettingssecurity.cpp @@ -337,6 +335,7 @@ set(viewer_SOURCE_FILES llpanelpicks.cpp llpanelplace.cpp llpanelplaceinfo.cpp + llpanelplaceprofile.cpp llpanelplaces.cpp llpanelplacestab.cpp llpanelprimmediacontrols.cpp @@ -378,6 +377,7 @@ set(viewer_SOURCE_FILES llsky.cpp llslurl.cpp llspatialpartition.cpp + llspeakbutton.cpp llspeakers.cpp llsplitbutton.cpp llsprite.cpp @@ -398,6 +398,10 @@ set(viewer_SOURCE_FILES lltexturecache.cpp lltexturectrl.cpp lltexturefetch.cpp + lltextureinfo.cpp + lltextureinfodetails.cpp + lltexturestats.cpp + lltexturestatsuploader.cpp lltextureview.cpp lltoast.cpp lltoastalertpanel.cpp @@ -438,12 +442,14 @@ set(viewer_SOURCE_FILES llvectorperfoptions.cpp llviewchildren.cpp llviewerassetstorage.cpp + llviewerassettype.cpp llvieweraudio.cpp llviewercamera.cpp llviewercontrol.cpp llviewercontrollistener.cpp llviewerdisplay.cpp llviewerfloaterreg.cpp + llviewerfoldertype.cpp llviewergenericmessage.cpp llviewergesture.cpp llviewerhelp.cpp @@ -521,6 +527,8 @@ set(viewer_SOURCE_FILES llwlparamset.cpp llworld.cpp llworldmap.cpp + llworldmapmessage.cpp + llworldmipmap.cpp llworldmapview.cpp llxmlrpclistener.cpp llxmlrpctransaction.cpp @@ -704,7 +712,6 @@ set(viewer_HEADER_FILES llfloaterwhitelistentry.h llfloaterwindlight.h llfloaterworldmap.h - llfoldertype.h llfolderview.h llfoldervieweventlistener.h llfolderviewitem.h @@ -727,7 +734,6 @@ set(viewer_HEADER_FILES llhudrender.h llhudtext.h llhudview.h - llimcontrolpanel.h llimfloater.h llimpanel.h llimview.h @@ -758,7 +764,6 @@ set(viewer_HEADER_FILES llmaniprotate.h llmanipscale.h llmaniptranslate.h - llmapresponders.h llmediactrl.h llmediadataclient.h llmediaremotectrl.h @@ -802,13 +807,13 @@ set(viewer_HEADER_FILES llpanelimcontrolpanel.h llpanelland.h llpanellandaudio.h + llpanellandmarkinfo.h llpanellandmarks.h llpanellandmedia.h llpanellogin.h llpanellookinfo.h llpanellooks.h llpanelmaininventory.h - llpanelmedia.h llpanelmediasettingsgeneral.h llpanelmediasettingspermissions.h llpanelmediasettingssecurity.h @@ -822,6 +827,7 @@ set(viewer_HEADER_FILES llpanelpicks.h llpanelplace.h llpanelplaceinfo.h + llpanelplaceprofile.h llpanelplaces.h llpanelplacestab.h llpanelprimmediacontrols.h @@ -865,6 +871,7 @@ set(viewer_HEADER_FILES llsky.h llslurl.h llspatialpartition.h + llspeakbutton.h llspeakers.h llsplitbutton.h llsprite.h @@ -886,6 +893,10 @@ set(viewer_HEADER_FILES lltexturecache.h lltexturectrl.h lltexturefetch.h + lltextureinfo.h + lltextureinfodetails.h + lltexturestats.h + lltexturestatsuploader.h lltextureview.h lltoast.h lltoastalertpanel.h @@ -927,6 +938,7 @@ set(viewer_HEADER_FILES llvectorperfoptions.h llviewchildren.h llviewerassetstorage.h + llviewerassettype.h llvieweraudio.h llviewerbuild.h llviewercamera.h @@ -934,6 +946,7 @@ set(viewer_HEADER_FILES llviewercontrollistener.h llviewerdisplay.h llviewerfloaterreg.h + llviewerfoldertype.h llviewergenericmessage.h llviewergesture.h llviewerhelp.h @@ -1010,6 +1023,8 @@ set(viewer_HEADER_FILES llwlparamset.h llworld.h llworldmap.h + llworldmapmessage.h + llworldmipmap.h llworldmapview.h llxmlrpclistener.h llxmlrpctransaction.h @@ -1662,6 +1677,12 @@ LL_ADD_INTEGRATION_TEST(llcapabilitylistener ) #ADD_VIEWER_BUILD_TEST(llmemoryview viewer) +#ADD_VIEWER_BUILD_TEST(llagentaccess viewer) +#ADD_VIEWER_BUILD_TEST(llworldmap viewer) +#ADD_VIEWER_BUILD_TEST(llworldmipmap viewer) +#ADD_VIEWER_BUILD_TEST(lltextureinfo viewer) +#ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer) +#ADD_VIEWER_BUILD_TEST(lltexturestatsuploader viewer) # Don't do these for DARWIN or LINUX here -- they're taken care of by viewer_manifest.py diff --git a/indra/newview/app_settings/foldertypes.xml b/indra/newview/app_settings/foldertypes.xml index 2038779c4f..0d539177f3 100644 --- a/indra/newview/app_settings/foldertypes.xml +++ b/indra/newview/app_settings/foldertypes.xml @@ -1,66 +1,61 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <ensemble_defs> <ensemble - asset_num="-1" - xui_name="default" - icon_name="inv_plain_closed.tga" - /> - <ensemble - asset_num="27" + foldertype_num="27" xui_name="head" icon_name="inv_folder_outfit_head.tga" allowed="hair,eyes" /> <ensemble - asset_num="28" + foldertype_num="28" xui_name="gloves" icon_name="inv_folder_outfit_gloves.tga" allowed="gloves" /> <ensemble - asset_num="29" + foldertype_num="29" xui_name="jacket" icon_name="inv_folder_outfit_jacket.tga" allowed="jacket" /> <ensemble - asset_num="30" + foldertype_num="30" xui_name="pants" icon_name="inv_folder_outfit_pants.tga" allowed="pants,underpants" /> <ensemble - asset_num="31" + foldertype_num="31" xui_name="shape" icon_name="inv_folder_outfit_shape.tga" allowed="shape,skin,hair,eyes" /> <ensemble - asset_num="32" + foldertype_num="32" xui_name="shoes" icon_name="inv_folder_outfit_shoes.tga" allowed="shoes,socks" /> <ensemble - asset_num="33" + foldertype_num="33" xui_name="shirt" icon_name="inv_folder_outfit_shirt.tga" allowed="shirt,undershirt" /> <ensemble - asset_num="34" + foldertype_num="34" xui_name="skirt" icon_name="inv_folder_outfit_skirt.tga" allowed="" /> <ensemble - asset_num="35" + foldertype_num="35" xui_name="underpants" icon_name="inv_folder_outfit_underpants.tga" allowed="underpants" /> <ensemble - asset_num="36" + foldertype_num="36" xui_name="undershirt" icon_name="inv_folder_outfit_undershirt.tga" allowed="undershirt" diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 544f1c598e..5f6fd6e4a7 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -560,7 +560,8 @@ STATUS_WHITELIST_FAILED URL failed to pass whitelist NULL_KEY Indicates an empty key EOF Indicates the last line of a notecard was read TEXTURE_BLANK UUID for the "Blank" texture -TEXTURE_DEFAULT UUID for the "Default Media" texture +TEXTURE_DEFAULT Alias for TEXTURE_PLYWOOD +TEXTURE_MEDIA UUID for the "Default Media" texture TEXTURE_PLYWOOD UUID for the default "Plywood" texture TEXTURE_TRANSPARENT UUID for the "White - Transparent" texture diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 768fdd4103..6f6d5fb979 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -133,7 +133,7 @@ <key>Value</key> <integer>1</integer> </map> - <key>ArrowKeysMoveAvatar</key> + <key>ArrowKeysAlwaysMove</key> <map> <key>Comment</key> <string>While cursor is in chat entry box, arrow keys still control your avatar</string> @@ -142,7 +142,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>AskedAboutCrashReports</key> <map> @@ -309,7 +309,18 @@ <key>Value</key> <integer>0</integer> </map> - <key>AutoAcceptNewInventory</key> + <key>AuditTexture</key> + <map> + <key>Comment</key> + <string>Enable texture auditting.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>AutoAcceptNewInventory</key> <map> <key>Comment</key> <string>Automatically accept new notecards/textures/landmarks</string> @@ -3574,7 +3585,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://www.google.com/search?q=site%3Awiki.secondlife.com+[TOPIC]&ignore_channel=[CHANNEL]&ignore_version=[VERSION]&ignore_os=[OS]&ignore_language=[LANGUAGE]&ignore_version_major=[VERSION_MAJOR]&ignore_version_minor=[VERSION_MINOR]&ignore_version_patch=[VERSION_PATCH]&ignore_version_build=[VERSION_BUILD]</string> + <string>http://docs.lindenlab.com/help/helpfloater.php?topic=[TOPIC]&channel=[CHANNEL]&version=[VERSION]&os=[OS]&language=[LANGUAGE]&version_major=[VERSION_MAJOR]&version_minor=[VERSION_MINOR]&version_patch=[VERSION_PATCH]&version_build=[VERSION_BUILD]</string> </map> <key>HighResSnapshot</key> <map> @@ -4567,6 +4578,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>MiniMapPrimMaxRadius</key> + <map> + <key>Comment</key> + <string>Radius of the largest prim to show on the MiniMap. Increasing beyond 256 may cause client lag.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>256.0</real> + </map> <key>MiniMapRotate</key> <map> <key>Comment</key> @@ -4581,7 +4603,7 @@ <key>MiniMapScale</key> <map> <key>Comment</key> - <string>Miniature world map zoom levle (pixels per region)</string> + <string>Miniature world map zoom level (pixels per region)</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -5473,7 +5495,18 @@ <key>QAModeEventHostPort</key> <map> <key>Comment</key> - <string>Enable Testing Features.</string> + <string>Port on which lleventhost should listen</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>-1</integer> + </map> + <key>QAModeTermCode</key> + <map> + <key>Comment</key> + <string>On LL_ERRS, terminate with this code instead of OS message box</string> <key>Persist</key> <integer>0</integer> <key>Type</key> @@ -5558,6 +5591,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>RegInClient</key> + <map> + <key>Comment</key> + <string>Experimental: Embed registration in login screen</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> @@ -6225,7 +6269,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>RenderHighlightFadeTime</key> @@ -8589,6 +8633,28 @@ <key>Value</key> <real>20.0</real> </map> + <key>TextureDisable</key> + <map> + <key>Comment</key> + <string>If TRUE, do not load textures for in-world content</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>TextureLoadFullRes</key> + <map> + <key>Comment</key> + <string>If TRUE, always load textures at full resolution (discard = 0)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>TextureMemory</key> <map> <key>Comment</key> @@ -10647,5 +10713,38 @@ <key>Value</key> <integer>0</integer> </map> - </map> + <key>LogTextureDownloadsToViewerLog</key> + <map> + <key>Comment</key> + <string>Send texture download details to the viewer log</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>LogTextureDownloadsToSimulator</key> + <map> + <key>Comment</key> + <string>Send a digest of texture info to the sim</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>TextureLoggingThreshold</key> + <map> + <key>Comment</key> + <string>Specifies the byte threshold at which texture download data should be sent to the sim.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>1</integer> + </map> +</map> </llsd> diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index c43ba27984..10c197d09e 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="US-ASCII" standalone="yes"?> <linden_avatar - version="1.0" wearable_definition_version="23"> + version="1.0" wearable_definition_version="24"> <!-- The wearable_definition_version is checked during asset upload. --> <!-- If you increment it, check indra/lib/python/indra/assetutil.py. --> <skeleton @@ -8985,7 +8985,7 @@ render_pass="bump"> id="1017" /> <driven - id="1033" /> + id="1035" /> <driven id="914" diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 75a72e5b17..24bdf66c2a 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -75,6 +75,8 @@ #include "llstatusbar.h" #include "llteleportflags.h" #include "llteleporthistory.h" +#include "lltexturestats.h" +#include "lltexturestats.h" #include "lltool.h" #include "lltoolcomp.h" #include "lltoolmgr.h" @@ -6085,17 +6087,16 @@ void LLAgent::teleportCancel() void LLAgent::teleportViaLocation(const LLVector3d& pos_global) { LLViewerRegion* regionp = getRegion(); - LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global); + U64 handle = to_region_handle(pos_global); + LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromHandle(handle); if(regionp && info) { - U32 x_pos; - U32 y_pos; - from_region_handle(info->mHandle, &x_pos, &y_pos); + LLVector3d region_origin = info->getGlobalOrigin(); LLVector3 pos_local( - (F32)(pos_global.mdV[VX] - x_pos), - (F32)(pos_global.mdV[VY] - y_pos), + (F32)(pos_global.mdV[VX] - region_origin.mdV[VX]), + (F32)(pos_global.mdV[VY] - region_origin.mdV[VY]), (F32)(pos_global.mdV[VZ])); - teleportRequest(info->mHandle, pos_local); + teleportRequest(handle, pos_local); } else if(regionp && teleportCore(regionp->getHandle() == to_region_handle_global((F32)pos_global.mdV[VX], (F32)pos_global.mdV[VY]))) @@ -6512,3 +6513,4 @@ LLAgentQueryManager::~LLAgentQueryManager() } // EOF + diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp index 6e5835bace..3c8d0dac42 100644 --- a/indra/newview/llagentpicksinfo.cpp +++ b/indra/newview/llagentpicksinfo.cpp @@ -47,7 +47,8 @@ public: ~LLAgentPicksObserver() { - LLAvatarPropertiesProcessor::getInstance()->removeObserver(gAgent.getID(), this); + if (LLAvatarPropertiesProcessor::instanceExists()) + LLAvatarPropertiesProcessor::getInstance()->removeObserver(gAgent.getID(), this); } void sendAgentPicksRequest() diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 09f7c49f23..2911a35581 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -92,7 +92,10 @@ std::string LLAgentUI::buildSLURL(const bool escaped /*= true*/) //static BOOL LLAgentUI::checkAgentDistance(const LLVector3& pole, F32 radius) { - return (gAgent.getPositionAgent() - pole).length() < radius; + F32 delta_x = gAgent.getPositionAgent().mV[VX] - pole.mV[VX]; + F32 delta_y = gAgent.getPositionAgent().mV[VY] - pole.mV[VY]; + + return sqrt( delta_x* delta_x + delta_y* delta_y ) < radius; } BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region) { diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 4b3d27767c..3fc1055acd 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -434,7 +434,7 @@ void LLAgentWearables::saveWearableAs(const EWearableType type, if (save_in_lost_and_found) { category_id = gInventory.findCategoryUUIDForType( - LLAssetType::AT_LOST_AND_FOUND); + LLFolderType::FT_LOST_AND_FOUND); } else { @@ -840,7 +840,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs } // Get the UUID of the current outfit folder (will be created if it doesn't exist) - LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT); + const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(); @@ -981,8 +981,7 @@ void LLAgentWearables::recoverMissingWearable(const EWearableType type, U32 inde // Add a new one in the lost and found folder. // (We used to overwrite the "not found" one, but that could potentially // destory content.) JC - LLUUID lost_and_found_id = - gInventory.findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); + const LLUUID lost_and_found_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); LLPointer<LLInventoryCallback> cb = new addWearableToAgentInventoryCallback( LLPointer<LLRefCount>(NULL), @@ -1123,8 +1122,8 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, // First, make a folder in the Clothes directory. LLUUID folder_id = gInventory.createNewCategory( - gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING), - LLAssetType::AT_NONE, + gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING), + LLFolderType::FT_NONE, new_folder_name); bool found_first_item = false; @@ -1257,10 +1256,10 @@ LLUUID LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name) } // First, make a folder in the My Outfits directory. - LLUUID parent_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_MY_OUTFITS); + const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); LLUUID folder_id = gInventory.createNewCategory( parent_id, - LLAssetType::AT_OUTFIT, + LLFolderType::FT_OUTFIT, new_folder_name); LLAppearanceManager::shallowCopyCategory(LLAppearanceManager::getCOF(),folder_id, NULL); @@ -1393,6 +1392,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem const LLUUID &item_id = getWearableItemID(type,i); popWearable(type,i); gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + LLAppearanceManager::removeItemLinks(item_id,false); //queryWearableCache(); // moved below if (old_wearable) @@ -1409,6 +1409,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem const LLUUID &item_id = getWearableItemID(type,index); popWearable(type, index); gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + LLAppearanceManager::removeItemLinks(item_id,false); //queryWearableCache(); // moved below @@ -1722,10 +1723,8 @@ void LLAgentWearables::queryWearableCache() // MULTI_WEARABLE: need a way to specify by wearable rather than by type. // User has picked "remove from avatar" from a menu. // static -void LLAgentWearables::userRemoveWearable(void* userdata) +void LLAgentWearables::userRemoveWearable(EWearableType& type) { - EWearableType type = (EWearableType)(intptr_t)userdata; - if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR)) //&& //!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT))) { @@ -1735,7 +1734,7 @@ void LLAgentWearables::userRemoveWearable(void* userdata) } // static -void LLAgentWearables::userRemoveAllClothes(void* userdata) +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) @@ -2032,7 +2031,7 @@ void LLInitialWearablesFetch::processWearablesMessage() { if (!mAgentInitialWearables.empty()) // We have an empty current outfit folder, use the message data instead. { - LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT); + const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); for (U8 i = 0; i < mAgentInitialWearables.size(); ++i) { // Populate the current outfit folder with links to the wearables passed in the message diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 97de785c87..317f4a7e4f 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -191,9 +191,9 @@ public: //-------------------------------------------------------------------- public: // MULTI-WEARABLE: assuming one wearable per type. Need upstream changes. - static void userRemoveWearable(void* userdata); // userdata is EWearableType - static void userRemoveAllClothes(void* userdata); // userdata is NULL - + static void userRemoveWearable(EWearableType& type); + static void userRemoveAllClothes(); + typedef std::vector<LLViewerObject*> llvo_vec_t; static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 8d0f11e021..41cd77b45d 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -130,11 +130,11 @@ void LLOutfitObserver::done() { if(LLInventoryType::IT_GESTURE == item->getInventoryType()) { - pid = gInventory.findCategoryUUIDForType(LLAssetType::AT_GESTURE); + pid = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE); } else { - pid = gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING); + pid = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); } break; } @@ -146,7 +146,7 @@ void LLOutfitObserver::done() LLUUID cat_id = gInventory.createNewCategory( pid, - LLAssetType::AT_NONE, + LLFolderType::FT_NONE, name); mCatID = cat_id; LLPointer<LLInventoryCallback> cb = new LLWearInventoryCategoryCallback(mCatID, mAppend); @@ -300,14 +300,25 @@ struct LLWearableHoldingPattern { LLInventoryModel::item_array_t new_items; std::set<LLUUID> items_seen; - for (S32 i=0; i<items.count(); i++) + std::deque<LLViewerInventoryItem*> tmp_list; + // Traverse from the front and keep the first of each item + // encountered, so we actually keep the *last* of each duplicate + // item. This is needed to give the right priority when adding + // duplicate items to an existing outfit. + for (S32 i=items.count()-1; i>=0; i--) { LLViewerInventoryItem *item = items.get(i); LLUUID item_id = item->getLinkedUUID(); if (items_seen.find(item_id)!=items_seen.end()) continue; items_seen.insert(item_id); - new_items.push_back(item); + tmp_list.push_front(item); + } + for (std::deque<LLViewerInventoryItem*>::iterator it = tmp_list.begin(); + it != tmp_list.end(); + ++it) + { + new_items.put(*it); } items = new_items; } @@ -353,7 +364,7 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory /* static */ LLUUID LLAppearanceManager::getCOF() { - return gInventory.findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT); + return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); } // Update appearance from outfit folder. @@ -373,12 +384,12 @@ void LLAppearanceManager::changeOutfit(bool proceed, const LLUUID& category, boo else { LLViewerInventoryCategory* catp = gInventory.getCategory(category); - if (catp->getPreferredType() == LLAssetType::AT_NONE || - LLAssetType::lookupIsEnsembleCategoryType(catp->getPreferredType())) + if (catp->getPreferredType() == LLFolderType::FT_NONE || + LLFolderType::lookupIsEnsembleType(catp->getPreferredType())) { updateCOFFromCategory(category, append); // append is false - rebuild COF. } - else if (catp->getPreferredType() == LLAssetType::AT_OUTFIT) + else if (catp->getPreferredType() == LLFolderType::FT_OUTFIT) { rebuildCOFFromOutfit(category); } @@ -405,7 +416,7 @@ void LLAppearanceManager::updateCOFFromCategory(const LLUUID& category, bool app return; } - const LLUUID ¤t_outfit_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT); + const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); // Processes that take time should show the busy cursor //inc_busy_count(); @@ -503,7 +514,7 @@ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID { LLViewerInventoryCategory *catp = item->getLinkedCategory(); // Skip copying outfit links. - if (catp && catp->getPreferredType() != LLAssetType::AT_OUTFIT) + if (catp && catp->getPreferredType() != LLFolderType::FT_OUTFIT) { link_inventory_item(gAgent.getID(), item->getLinkedUUID(), @@ -641,7 +652,7 @@ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID // Add link to outfit if category is an outfit. LLViewerInventoryCategory* catp = gInventory.getCategory(category); - if (!append && catp && catp->getPreferredType() == LLAssetType::AT_OUTFIT) + if (!append && catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT) { link_inventory_item(gAgent.getID(), category, cof, catp->getName(), LLAssetType::AT_LINK_FOLDER, link_waiter); @@ -732,7 +743,7 @@ void LLAppearanceManager::rebuildCOFFromOutfit(const LLUUID& category) LLNotifications::instance().add("CouldNotPutOnOutfit"); return; } - + // Processes that take time should show the busy cursor //inc_busy_count(); @@ -750,7 +761,7 @@ void LLAppearanceManager::rebuildCOFFromOutfit(const LLUUID& category) // Create a link to the outfit that we wore. LLViewerInventoryCategory* catp = gInventory.getCategory(category); - if (catp && catp->getPreferredType() == LLAssetType::AT_OUTFIT) + if (catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT) { link_inventory_item(gAgent.getID(), category, current_outfit_id, catp->getName(), LLAssetType::AT_LINK_FOLDER, link_waiter); @@ -1068,9 +1079,21 @@ void LLAppearanceManager::wearOutfitByName(const std::string& name) //dec_busy_count(); } +bool areMatchingWearables(const LLViewerInventoryItem *a, const LLViewerInventoryItem *b) +{ + return (a->isWearableType() && b->isWearableType() && + (a->getWearableType() == b->getWearableType())); +} /* static */ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update ) { + LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); + if (!vitem) + { + llwarns << "not an llviewerinventoryitem, failed" << llendl; + return; + } + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(LLAppearanceManager::getCOF(), @@ -1080,11 +1103,20 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update ) bool linked_already = false; for (S32 i=0; i<item_array.count(); i++) { - const LLInventoryItem* inv_item = item_array.get(i).get(); + // Are these links to the same object? + const LLViewerInventoryItem* inv_item = item_array.get(i).get(); if (inv_item->getLinkedUUID() == item->getLinkedUUID()) { linked_already = true; - break; + } + // Are these links to different items of the same wearable + // type? If so, new item will replace old. + // MULTI-WEARABLES: revisit if more than one per type is allowed. + else if (areMatchingWearables(vitem,inv_item)) + { + gAgentWearables.removeWearable(inv_item->getWearableType(),true,0); + gInventory.purgeObject(inv_item->getUUID()); + gInventory.notifyObservers(); } } if (linked_already) @@ -1096,9 +1128,9 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update ) { LLPointer<LLInventoryCallback> cb = do_update ? new ModifiedCOFCallback : 0; link_inventory_item( gAgent.getID(), - item->getLinkedUUID(), + vitem->getLinkedUUID(), getCOF(), - item->getName(), + vitem->getName(), LLAssetType::AT_LINK, cb); } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 873215169e..8e6d6b885d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -57,6 +57,8 @@ #include "llallocator.h" #include "llares.h" #include "llcurl.h" +#include "lltexturestats.h" +#include "lltexturestats.h" #include "llviewerwindow.h" #include "llviewerdisplay.h" #include "llviewermedia.h" @@ -255,9 +257,6 @@ F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME; BOOL gDisconnected = FALSE; -// Map scale in pixels per region -F32 gMapScale = 128.f; - // used to restore texture state after a mode switch LLFrameTimer gRestoreGLTimer; BOOL gRestoreGL = FALSE; @@ -419,7 +418,7 @@ static void settings_to_globals() gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc"); gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); - gMapScale = gSavedSettings.getF32("MapScale"); + LLWorldMapView::sMapScale = gSavedSettings.getF32("MapScale"); LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap"); } @@ -432,7 +431,7 @@ static void settings_modify() LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession; gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline"); - + gAuditTexture = gSavedSettings.getBOOL("AuditTexture"); #if LL_VECTORIZE if (gSysCPU.hasAltivec()) { @@ -553,7 +552,7 @@ LLAppViewer* LLAppViewer::sInstance = NULL; const std::string LLAppViewer::sGlobalSettingsName = "Global"; LLTextureCache* LLAppViewer::sTextureCache = NULL; -LLWorkerThread* LLAppViewer::sImageDecodeThread = NULL; +LLImageDecodeThread* LLAppViewer::sImageDecodeThread = NULL; LLTextureFetch* LLAppViewer::sTextureFetch = NULL; LLAppViewer::LLAppViewer() : @@ -620,7 +619,19 @@ bool LLAppViewer::init() if (!initConfiguration()) return false; - + + // Although initLogging() is the right place to mess with + // setFatalFunction(), we can't query gSavedSettings until after + // initConfiguration(). + S32 rc(gSavedSettings.getS32("QAModeTermCode")); + if (rc >= 0) + { + // QAModeTermCode set, terminate with that rc on LL_ERRS. Use _exit() + // rather than exit() because normal cleanup depends too much on + // successful startup! + LLError::setFatalFunction(boost::bind(_exit, rc)); + } + mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling")); // *NOTE:Mani - LLCurl::initClass is not thread safe. @@ -645,6 +656,9 @@ bool LLAppViewer::init() ////////////////////////////////////////////////////////////////////////////// // *FIX: The following code isn't grouped into functions yet. + // Statistics / debug timer initialization + init_statistics(); + // // Various introspection concerning the libs we're using - particularly // the libs involved in getting to a full login screen. @@ -1625,14 +1639,14 @@ bool LLAppViewer::initThreads() LLWatchdog::getInstance()->init(watchdog_killer_callback); } - LLVFSThread::initClass(enable_threads && true); - LLLFSThread::initClass(enable_threads && true); + LLVFSThread::initClass(enable_threads && false); + LLLFSThread::initClass(enable_threads && false); // Image decoding - LLAppViewer::sImageDecodeThread = new LLWorkerThread("ImageDecode", enable_threads && true); + LLAppViewer::sImageDecodeThread = new LLImageDecodeThread(enable_threads && true); LLAppViewer::sTextureCache = new LLTextureCache(enable_threads && true); - LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(), enable_threads && false); - LLImage::initClass(LLAppViewer::getImageDecodeThread()); + LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(), sImageDecodeThread, enable_threads && true); + LLImage::initClass(); if (LLFastTimer::sLog || LLFastTimer::sMetricLog) { @@ -1665,7 +1679,7 @@ bool LLAppViewer::initLogging() LLError::initForApplication( gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")); LLError::setFatalFunction(errorCallback); - + // Remove the last ".old" log file. std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.old"); @@ -2425,7 +2439,7 @@ void LLAppViewer::cleanupSavedSettings() } } - gSavedSettings.setF32("MapScale", gMapScale ); + gSavedSettings.setF32("MapScale", LLWorldMapView::sMapScale ); // Some things are cached in LLAgent. if (gAgent.mInitialized) @@ -2751,7 +2765,7 @@ void LLAppViewer::initMarkerFile() // Create the marker file for this execution & lock it apr_status_t s; - s = mMarkerFile.open(mMarkerFileName, LL_APR_W, gAPRPoolp); + s = mMarkerFile.open(mMarkerFileName, LL_APR_W, TRUE); if (s == APR_SUCCESS && mMarkerFile.getFileHandle()) { diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 73256a8fe6..c1bfbca868 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -41,15 +41,13 @@ class LLCommandLineParser; class LLFrameTimer; class LLPumpIO; class LLTextureCache; +class LLImageDecodeThread; class LLTextureFetch; -class LLTimer; -class LLVFS; class LLWatchdogTimeout; -class LLWorkerThread; +class LLCommandLineParser; struct apr_dso_handle_t; - class LLAppViewer : public LLApp { public: @@ -100,7 +98,7 @@ public: // Thread accessors static LLTextureCache* getTextureCache() { return sTextureCache; } - static LLWorkerThread* getImageDecodeThread() { return sImageDecodeThread; } + static LLImageDecodeThread* getImageDecodeThread() { return sImageDecodeThread; } static LLTextureFetch* getTextureFetch() { return sTextureFetch; } const std::string& getSerialNumber() { return mSerialNumber; } @@ -232,7 +230,7 @@ private: // Thread objects. static LLTextureCache* sTextureCache; - static LLWorkerThread* sImageDecodeThread; + static LLImageDecodeThread* sImageDecodeThread; static LLTextureFetch* sTextureFetch; S32 mNumSessions; @@ -320,9 +318,6 @@ extern F32 gSimFrames; extern BOOL gDisconnected; -// Map scale in pixels per region -extern F32 gMapScale; - extern LLFrameTimer gRestoreGLTimer; extern BOOL gRestoreGL; extern BOOL gUseWireframe; diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 5dbf57c9be..4d85ecb97c 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -334,7 +334,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) LLAssetStorage::LLStoreAssetCallback callback = NULL; void *userdata = NULL; upload_new_resource(next_file, asset_name, asset_name, - 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE, + 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, next_owner_perms, group_perms, everyone_perms, display_name, callback, expected_upload_cost, userdata); @@ -369,7 +369,7 @@ void LLSendTexLayerResponder::uploadComplete(const LLSD& content) std::string result = content["state"]; LLUUID new_id = content["new_asset"]; - llinfos << "LLSendTexLayerResponder::result from capabilities: " << result << llendl; + llinfos << "result: " << result << "new_id:" << new_id << llendl; if (result == "complete" && mBakedUploadData != NULL) { // Invoke @@ -383,6 +383,14 @@ void LLSendTexLayerResponder::uploadComplete(const LLSD& content) } } +void LLSendTexLayerResponder::error(U32 statusNum, const std::string& reason) +{ + llinfos << "status: " << statusNum << " reason: " << reason << llendl; + + // Invoke the original callback with an error result + LLTexLayerSetBuffer::onTextureUploadComplete(LLUUID(), (void*) mBakedUploadData, -1, LL_EXSTAT_NONE); + mBakedUploadData = NULL; // deleted in onTextureUploadComplete() +} LLUpdateAgentInventoryResponder::LLUpdateAgentInventoryResponder(const LLSD& post_data, const LLUUID& vfile_id, diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h index a08d70213c..e656351305 100644 --- a/indra/newview/llassetuploadresponders.h +++ b/indra/newview/llassetuploadresponders.h @@ -84,6 +84,7 @@ public: ~LLSendTexLayerResponder(); virtual void uploadComplete(const LLSD& content); + virtual void error(U32 statusNum, const std::string& reason); LLBakedUploadData * mBakedUploadData; }; diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 2f67401301..67ffe54b7e 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -57,6 +57,7 @@ #include "llviewerobjectlist.h" #include "llviewermessage.h" // for handle_lure #include "llviewerregion.h" +#include "llimfloater.h" // static @@ -176,7 +177,8 @@ void LLAvatarActions::startIM(const LLUUID& id) std::string name; gCacheName->getFullName(id, name); - gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id); + LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id); + LLIMFloater::show(session_id); make_ui_sound("UISndStartIM"); } @@ -343,7 +345,7 @@ bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& re // Servers older than 1.25 require the text of the message to be the // calling card folder ID for the offering user. JC LLUUID calling_card_folder_id = - gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); + gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); std::string message = calling_card_folder_id.asString(); requestFriendship(notification["payload"]["id"].asUUID(), notification["payload"]["name"].asString(), @@ -355,7 +357,7 @@ bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& re // static void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message) { - LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); + const LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); send_improved_im(target_id, target_name, message, diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 7b2dc02864..bb03f47f46 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -65,6 +65,20 @@ void LLAvatarList::toggleIcons() } } +void LLAvatarList::setSpeakingIndicatorsVisible(bool visible) +{ + // Save the new value for new items to use. + mShowSpeakingIndicator = visible; + + // Show/hide icons for all existing items. + std::vector<LLPanel*> items; + getItems(items); + for( std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++) + { + static_cast<LLAvatarListItem*>(*it)->setSpeakingIndicatorVisible(mShowSpeakingIndicator); + } +} + static bool findInsensitive(std::string haystack, const std::string& needle_upper) { LLStringUtil::toUpper(haystack); @@ -81,6 +95,7 @@ LLAvatarList::Params::Params() , show_last_interaction_time("show_last_interaction_time", false) , show_info_btn("show_info_btn", true) , show_profile_btn("show_profile_btn", true) +, show_speaking_indicator("show_speaking_indicator", true) { } @@ -94,6 +109,7 @@ LLAvatarList::LLAvatarList(const Params& p) , mShowIcons(true) , mShowInfoBtn(p.show_info_btn) , mShowProfileBtn(p.show_profile_btn) +, mShowSpeakingIndicator(p.show_speaking_indicator) { setCommitOnSelectionChange(true); @@ -239,11 +255,46 @@ void LLAvatarList::refresh() bool dirty = add_limit_exceeded || (have_filter && !have_names); setDirty(dirty); + // Refreshed all items, lets send refresh_complete signal. + if(!dirty) + { + std::vector<LLSD> cur_values; + getValues(cur_values); + mRefreshCompleteSignal(this, LLSD((S32)cur_values.size())); + } + // Commit if we've added/removed items. if (modified) onCommit(); } +bool LLAvatarList::filterHasMatches() +{ + uuid_vector_t values = getIDs(); + + for (uuid_vector_t::const_iterator it=values.begin(); it != values.end(); it++) + { + std::string name; + const LLUUID& buddy_id = *it; + BOOL have_name = gCacheName->getFullName(buddy_id, name); + + // If name has not been loaded yet we consider it as a match. + // When the name will be loaded the filter will be applied again(in refresh()). + + if (have_name && !findInsensitive(name, mNameFilter)) + { + continue; + } + + return true; + } + return false; +} + +boost::signals2::connection LLAvatarList::setRefreshCompleteCallback(const commit_signal_t::slot_type& cb) +{ + return mRefreshCompleteSignal.connect(cb); +} void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos) { @@ -260,6 +311,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is item->setAvatarIconVisible(mShowIcons); item->setShowInfoBtn(mShowInfoBtn); item->setShowProfileBtn(mShowProfileBtn); + item->setSpeakingIndicatorVisible(mShowSpeakingIndicator); addItem(item, id, pos); } diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 51d3760d39..490f93e501 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -61,6 +61,7 @@ public: Optional<bool> show_last_interaction_time; // show most recent interaction time. *HACK: move this to a derived class Optional<bool> show_info_btn; Optional<bool> show_profile_btn; + Optional<bool> show_speaking_indicator; Params(); }; @@ -76,12 +77,18 @@ public: void setContextMenu(LLAvatarListItem::ContextMenu* menu) { mContextMenu = menu; } void toggleIcons(); + void setSpeakingIndicatorsVisible(bool visible); void sortByName(); void setShowIcons(std::string param_name); bool getIconsVisible() const { return mShowIcons; } const std::string getIconParamName() const{return mIconParamName;} virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + // Return true if filter has at least one match. + bool filterHasMatches(); + + boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb); + protected: void refresh(); @@ -100,6 +107,7 @@ private: bool mShowIcons; bool mShowInfoBtn; bool mShowProfileBtn; + bool mShowSpeakingIndicator; LLTimer* mLITUpdateTimer; // last interaction time update timer std::string mIconParamName; @@ -107,6 +115,8 @@ private: uuid_vector_t mIDs; LLAvatarListItem::ContextMenu* mContextMenu; + + commit_signal_t mRefreshCompleteSignal; }; /** Abstract comparator for avatar items */ diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index a7ac14c948..7df278d887 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -62,6 +62,7 @@ LLAvatarListItem::LLAvatarListItem() mIconWidth = mAvatarName->getRect().mLeft - mAvatarIcon->getRect().mLeft; mInfoBtnWidth = mInfoBtn->getRect().mRight - mSpeakingIndicator->getRect().mRight; mProfileBtnWidth = mProfileBtn->getRect().mRight - mInfoBtn->getRect().mRight; + mSpeakingIndicatorWidth = mSpeakingIndicator->getRect().mRight - mAvatarName->getRect().mRight; } LLAvatarListItem::~LLAvatarListItem() @@ -230,6 +231,18 @@ void LLAvatarListItem::setShowProfileBtn(bool show) mAvatarName->reshape(mAvatarName->getRect().getWidth() + width_delta, mAvatarName->getRect().getHeight()); } +void LLAvatarListItem::setSpeakingIndicatorVisible(bool visible) +{ + // Already done? Then do nothing. + if (mSpeakingIndicator->getVisible() == (BOOL)visible) + return; + mSpeakingIndicator->setVisible(visible); + S32 width_delta = visible ? - mSpeakingIndicatorWidth : mSpeakingIndicatorWidth; + + //Reshaping avatar name + mAvatarName->reshape(mAvatarName->getRect().getWidth() + width_delta, mAvatarName->getRect().getHeight()); +} + void LLAvatarListItem::setAvatarIconVisible(bool visible) { // Already done? Then do nothing. diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index cd7a85c3dc..d379797a46 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -65,8 +65,9 @@ public: void setAvatarId(const LLUUID& id, bool ignore_status_changes = false); void setLastInteractionTime(const std::string& val); //Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly - void setShowProfileBtn(bool hide); - void setShowInfoBtn(bool hide); + void setShowProfileBtn(bool show); + void setShowInfoBtn(bool show); + void setSpeakingIndicatorVisible(bool visible); void setAvatarIconVisible(bool visible); const LLUUID& getAvatarId() const; @@ -109,6 +110,7 @@ private: S32 mIconWidth; // icon width + padding S32 mInfoBtnWidth; //info btn width + padding S32 mProfileBtnWidth; //profile btn width + padding + S32 mSpeakingIndicatorWidth; //speaking indicator width + padding }; #endif //LL_LLAVATARLISTITEM_H diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index ddcee5f453..a17ba79078 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -47,7 +47,7 @@ LLBottomTray::LLBottomTray(const LLSD&) : mChicletPanel(NULL), mSysWell(NULL), - mTalkBtn(NULL), + mSpeakBtn(NULL), mNearbyChatBar(NULL), mToolbarStack(NULL) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index a28f1e42ec..02588a1975 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -43,7 +43,7 @@ class LLChicletPanel; class LLLineEditor; class LLLayoutStack; class LLNotificationChiclet; -class LLTalkButton; +class LLSpeakButton; class LLNearbyChatBar; class LLIMChiclet; @@ -110,7 +110,7 @@ protected: LLChicletPanel* mChicletPanel; LLNotificationChiclet* mSysWell; - LLTalkButton* mTalkBtn; + LLSpeakButton* mSpeakBtn; LLNearbyChatBar* mNearbyChatBar; LLLayoutStack* mToolbarStack; LLMenuGL* mBottomTrayContextMenu; diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index e561507e69..2ccd6b7d35 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -132,8 +132,7 @@ public: menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mPopupMenuHandleObject = menu->getHandle(); - LLPanel* visible_panel = getChild<LLPanel>("im_header"); - visible_panel->setMouseDownCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4)); + setMouseDownCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4)); return LLPanel::postBuild(); } @@ -290,7 +289,11 @@ mMessageSeparatorFilename(p.message_separator), mLeftTextPad(p.left_text_pad), mRightTextPad(p.right_text_pad), mLeftWidgetPad(p.left_widget_pad), -mRightWidgetPad(p.right_widget_pad) +mRightWidgetPad(p.right_widget_pad), +mTopSeparatorPad(p.top_separator_pad), +mBottomSeparatorPad(p.bottom_separator_pad), +mTopHeaderPad(p.top_header_pad), +mBottomHeaderPad(p.bottom_header_pad) { } @@ -332,16 +335,30 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty LLView* view = NULL; std::string view_text; + LLInlineViewSegment::Params p; + p.force_newline = true; + p.left_pad = mLeftWidgetPad; + p.right_pad = mRightWidgetPad; + if (mLastFromName == chat.mFromName) { view = getSeparator(); view_text = "\n"; + p.top_pad = mTopSeparatorPad; + p.bottom_pad = mBottomSeparatorPad; } else { view = getHeader(chat); view_text = chat.mFromName + MESSAGE_USERNAME_DATE_SEPARATOR + formatCurrentTime() + '\n'; + if (getText().size() == 0) + p.top_pad = 0; + else + p.top_pad = mTopHeaderPad; + p.bottom_pad = mBottomHeaderPad; } + p.view = view; + //Prepare the rect for the view LLRect target_rect = getDocumentView()->getRect(); // squeeze down the widget by subtracting padding off left and right @@ -350,12 +367,6 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty view->reshape(target_rect.getWidth(), view->getRect().getHeight()); view->setOrigin(target_rect.mLeft, view->getRect().mBottom); - LLInlineViewSegment::Params p; - p.view = view; - p.force_newline = true; - p.left_pad = mLeftWidgetPad; - p.right_pad = mRightWidgetPad; - appendWidget(p, view_text, false); //Append the text message diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index 92dcfdd958..3789ebff4e 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -54,6 +54,14 @@ class LLChatHistory : public LLTextEditor Optional<S32> left_widget_pad; //Widget right padding from the scroll rect Optional<S32> right_widget_pad; + //Separator top padding + Optional<S32> top_separator_pad; + //Separator bottom padding + Optional<S32> bottom_separator_pad; + //Header top padding + Optional<S32> top_header_pad; + //Header bottom padding + Optional<S32> bottom_header_pad; Params() : message_header("message_header"), @@ -61,7 +69,11 @@ class LLChatHistory : public LLTextEditor left_text_pad("left_text_pad"), right_text_pad("right_text_pad"), left_widget_pad("left_widget_pad"), - right_widget_pad("right_widget_pad") + right_widget_pad("right_widget_pad"), + top_separator_pad("top_separator_pad"), + bottom_separator_pad("bottom_separator_pad"), + top_header_pad("top_header_pad"), + bottom_header_pad("bottom_header_pad") { } @@ -105,9 +117,16 @@ class LLChatHistory : public LLTextEditor std::string mLastFromName; std::string mMessageHeaderFilename; std::string mMessageSeparatorFilename; + S32 mLeftTextPad; S32 mRightTextPad; + S32 mLeftWidgetPad; S32 mRightWidgetPad; + + S32 mTopSeparatorPad; + S32 mBottomSeparatorPad; + S32 mTopHeaderPad; + S32 mBottomHeaderPad; }; #endif /* LLCHATHISTORY_H_ */ diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index bad61101c1..53c4bb32ca 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -51,10 +51,9 @@ #include "lltransientfloatermgr.h" static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel"); -static LLDefaultChildRegistry::Register<LLTalkButton> t2("chiclet_talk"); -static LLDefaultChildRegistry::Register<LLNotificationChiclet> t3("chiclet_notification"); -static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t4("chiclet_im_p2p"); -static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t5("chiclet_im_group"); +static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notification"); +static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t3("chiclet_im_p2p"); +static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t4("chiclet_im_group"); S32 LLNotificationChiclet::mUreadSystemNotifications = 0; @@ -198,9 +197,38 @@ void LLChiclet::setValue(const LLSD& value) ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -LLIMChiclet::LLIMChiclet(const LLChiclet::Params& p) +LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) : LLChiclet(p) +, mNewMessagesIcon(NULL) +, mCounterCtrl(NULL) { + // initialize an overlay icon for new messages + LLIconCtrl::Params icon_params; + icon_params.visible = false; + icon_params.image = LLUI::getUIImage(p.new_messages_icon_name); + mNewMessagesIcon = LLUICtrlFactory::create<LLIconCtrl>(icon_params); + // adjust size and position of an icon + LLRect chiclet_rect = p.rect; + LLRect overlay_icon_rect = LLRect(chiclet_rect.getWidth()/2, chiclet_rect.mTop, chiclet_rect.mRight, chiclet_rect.getHeight()/2); + // shift an icon a little bit to the right and up corner of a chiclet + overlay_icon_rect.translate(overlay_icon_rect.getWidth()/5, overlay_icon_rect.getHeight()/5); + mNewMessagesIcon->setRect(overlay_icon_rect); + addChild(mNewMessagesIcon); + + setShowCounter(false); +} + +void LLIMChiclet::setShowNewMessagesIcon(bool show) +{ + if(mNewMessagesIcon) + { + mNewMessagesIcon->setVisible(show); + } +} + +bool LLIMChiclet::getShowNewMessagesIcon() +{ + return mNewMessagesIcon->getVisible(); } void LLIMChiclet::onMouseDown() @@ -218,8 +246,6 @@ BOOL LLIMChiclet::handleMouseDown(S32 x, S32 y, MASK mask) void LLIMChiclet::draw() { LLUICtrl::draw(); - - gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4(0.0f,0.0f,0.0f,1.f), FALSE); } // static @@ -274,7 +300,7 @@ LLIMP2PChiclet::Params::Params() , show_speaker("show_speaker") { // *TODO Vadim: Get rid of hardcoded values. - rect(LLRect(0, 25, 45, 0)); + rect(LLRect(0, 25, 25, 0)); avatar_icon.name("avatar_icon"); avatar_icon.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_BOTTOM); @@ -293,6 +319,7 @@ LLIMP2PChiclet::Params::Params() unread_notifications.v_pad(5); unread_notifications.text_color(LLColor4::white); unread_notifications.mouse_opaque(false); + unread_notifications.visible(false); speaker.name("speaker"); speaker.rect(LLRect(45, 25, 65, 0)); @@ -303,7 +330,6 @@ LLIMP2PChiclet::Params::Params() LLIMP2PChiclet::LLIMP2PChiclet(const Params& p) : LLIMChiclet(p) , mChicletIconCtrl(NULL) -, mCounterCtrl(NULL) , mSpeakerCtrl(NULL) , mPopupMenu(NULL) { @@ -322,28 +348,14 @@ LLIMP2PChiclet::LLIMP2PChiclet(const Params& p) mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params); addChild(mSpeakerCtrl); + sendChildToFront(mNewMessagesIcon); setShowSpeaker(p.show_speaker); } void LLIMP2PChiclet::setCounter(S32 counter) { mCounterCtrl->setCounter(counter); - - if(getShowCounter()) - { - LLRect counter_rect = mCounterCtrl->getRect(); - LLRect required_rect = mCounterCtrl->getRequiredRect(); - bool needs_resize = required_rect.getWidth() != counter_rect.getWidth(); - - if(needs_resize) - { - counter_rect.mRight = counter_rect.mLeft + required_rect.getWidth(); - mCounterCtrl->reshape(counter_rect.getWidth(), counter_rect.getHeight()); - mCounterCtrl->setRect(counter_rect); - - onChicletSizeChanged(); - } - } + setShowNewMessagesIcon(counter); } LLRect LLIMP2PChiclet::getRequiredRect() @@ -455,9 +467,10 @@ LLAdHocChiclet::Params::Params() , unread_notifications("unread_notifications") , speaker("speaker") , show_speaker("show_speaker") +, avatar_icon_color("avatar_icon_color", LLColor4::green) { // *TODO Vadim: Get rid of hardcoded values. - rect(LLRect(0, 25, 45, 0)); + rect(LLRect(0, 25, 25, 0)); avatar_icon.name("avatar_icon"); avatar_icon.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_BOTTOM); @@ -476,6 +489,8 @@ LLAdHocChiclet::Params::Params() unread_notifications.v_pad(5); unread_notifications.text_color(LLColor4::white); unread_notifications.mouse_opaque(false); + unread_notifications.visible(false); + speaker.name("speaker"); speaker.rect(LLRect(45, 25, 65, 0)); @@ -486,12 +501,13 @@ LLAdHocChiclet::Params::Params() LLAdHocChiclet::LLAdHocChiclet(const Params& p) : LLIMChiclet(p) , mChicletIconCtrl(NULL) -, mCounterCtrl(NULL) , mSpeakerCtrl(NULL) , mPopupMenu(NULL) { LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon; mChicletIconCtrl = LLUICtrlFactory::create<LLChicletAvatarIconCtrl>(avatar_params); + //Make the avatar modified + mChicletIconCtrl->setColor(p.avatar_icon_color); addChild(mChicletIconCtrl); LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications; @@ -505,6 +521,7 @@ LLAdHocChiclet::LLAdHocChiclet(const Params& p) mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params); addChild(mSpeakerCtrl); + sendChildToFront(mNewMessagesIcon); setShowSpeaker(p.show_speaker); } @@ -518,22 +535,7 @@ void LLAdHocChiclet::setSessionId(const LLUUID& session_id) void LLAdHocChiclet::setCounter(S32 counter) { mCounterCtrl->setCounter(counter); - - if(getShowCounter()) - { - LLRect counter_rect = mCounterCtrl->getRect(); - LLRect required_rect = mCounterCtrl->getRequiredRect(); - bool needs_resize = required_rect.getWidth() != counter_rect.getWidth(); - - if(needs_resize) - { - counter_rect.mRight = counter_rect.mLeft + required_rect.getWidth(); - mCounterCtrl->reshape(counter_rect.getWidth(), counter_rect.getHeight()); - mCounterCtrl->setRect(counter_rect); - - onChicletSizeChanged(); - } - } + setShowNewMessagesIcon(counter); } LLRect LLAdHocChiclet::getRequiredRect() @@ -562,7 +564,7 @@ BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) LLIMGroupChiclet::Params::Params() : group_icon("group_icon") { - rect(LLRect(0, 25, 45, 0)); + rect(LLRect(0, 25, 25, 0)); group_icon.name("group_icon"); @@ -578,6 +580,7 @@ LLIMGroupChiclet::Params::Params() unread_notifications.font_halign(LLFontGL::HCENTER); unread_notifications.v_pad(5); unread_notifications.text_color(LLColor4::white); + unread_notifications.visible(false); speaker.name("speaker"); speaker.rect(LLRect(45, 25, 65, 0)); @@ -589,7 +592,6 @@ LLIMGroupChiclet::LLIMGroupChiclet(const Params& p) : LLIMChiclet(p) , LLGroupMgrObserver(LLUUID::null) , mChicletIconCtrl(NULL) -, mCounterCtrl(NULL) , mSpeakerCtrl(NULL) , mPopupMenu(NULL) { @@ -608,6 +610,7 @@ LLIMGroupChiclet::LLIMGroupChiclet(const Params& p) mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params); addChild(mSpeakerCtrl); + sendChildToFront(mNewMessagesIcon); setShowSpeaker(p.show_speaker); } @@ -619,22 +622,7 @@ LLIMGroupChiclet::~LLIMGroupChiclet() void LLIMGroupChiclet::setCounter(S32 counter) { mCounterCtrl->setCounter(counter); - - if(getShowCounter()) - { - LLRect counter_rect = mCounterCtrl->getRect(); - LLRect required_rect = mCounterCtrl->getRequiredRect(); - bool needs_resize = required_rect.getWidth() != counter_rect.getWidth(); - - if(needs_resize) - { - counter_rect.mRight = counter_rect.mLeft + required_rect.getWidth(); - mCounterCtrl->reshape(counter_rect.getWidth(), counter_rect.getHeight()); - mCounterCtrl->setRect(counter_rect); - - onChicletSizeChanged(); - } - } + setShowNewMessagesIcon(counter); } LLRect LLIMGroupChiclet::getRequiredRect() @@ -830,13 +818,21 @@ LLChicletPanel::~LLChicletPanel() void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ LLUUID session_id = data["session_id"].asUUID(); + S32 unread = data["num_unread"].asInteger(); + + LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + if (im_floater && im_floater->getVisible()) + { + unread = 0; + } + std::list<LLChiclet*> chiclets = LLIMChiclet::sFindChicletsSignal(session_id); std::list<LLChiclet *>::iterator iter; for (iter = chiclets.begin(); iter != chiclets.end(); iter++) { LLChiclet* chiclet = *iter; if (chiclet != NULL) { - chiclet->setCounter(data["num_unread"].asInteger()); + chiclet->setCounter(unread); } else { @@ -1250,152 +1246,6 @@ bool LLChicletPanel::isAnyIMFloaterDoked() ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -// *TODO Vadim: Move this out of llchiclet.cpp. - -LLTalkButton::Params::Params() - : speak_button("speak_button") - , show_button("show_button") - , monitor("monitor") -{ - // *TODO Vadim: move hardcoded labels (!) and other params to XUI. - speak_button.name("left"); - speak_button.label("Speak"); - speak_button.label_selected("Speak"); - speak_button.font(LLFontGL::getFontSansSerifSmall()); - speak_button.tab_stop(false); - speak_button.is_toggle(true); - speak_button.picture_style(true); - // Use default button art. JC - //speak_button.image_selected(LLUI::getUIImage("SegmentedBtn_Left_Selected")); - //speak_button.image_unselected(LLUI::getUIImage("SegmentedBtn_Left_Off")); - - show_button.name("right"); - show_button.label(LLStringUtil::null); - show_button.rect(LLRect(0, 0, 20, 0)); - show_button.tab_stop(false); - show_button.is_toggle(true); - show_button.picture_style(true); - show_button.image_selected(LLUI::getUIImage("ComboButton_Selected")); - show_button.image_unselected(LLUI::getUIImage("ComboButton_Off")); - - monitor.name("monitor"); - // *TODO: Make this data driven. - monitor.rect(LLRect(0, 18, 18, 0)); -} - -LLTalkButton::LLTalkButton(const Params& p) -: LLUICtrl(p) -, mPrivateCallPanel(NULL) -, mOutputMonitor(NULL) -, mSpeakBtn(NULL) -, mShowBtn(NULL) -{ - LLRect rect = p.rect(); - LLRect speak_rect(0, rect.getHeight(), rect.getWidth(), 0); - LLRect show_rect = p.show_button.rect(); - show_rect.set(0, rect.getHeight(), show_rect.getWidth(), 0); - - speak_rect.mRight -= show_rect.getWidth(); - show_rect.mLeft = speak_rect.getWidth(); - show_rect.mRight = rect.getWidth(); - - LLButton::Params speak_params = p.speak_button; - speak_params.rect(speak_rect); - mSpeakBtn = LLUICtrlFactory::create<LLButton>(speak_params); - addChild(mSpeakBtn); - LLTransientFloaterMgr::getInstance()->addControlView(mSpeakBtn); - - mSpeakBtn->setClickedCallback(boost::bind(&LLTalkButton::onClick_SpeakBtn, this)); - mSpeakBtn->setToggleState(FALSE); - - LLButton::Params show_params = p.show_button; - show_params.rect(show_rect); - mShowBtn = LLUICtrlFactory::create<LLButton>(show_params); - addChild(mShowBtn); - LLTransientFloaterMgr::getInstance()->addControlView(mShowBtn); - - mShowBtn->setClickedCallback(boost::bind(&LLTalkButton::onClick_ShowBtn, this)); - mShowBtn->setToggleState(FALSE); - - static const S32 MONITOR_RIGHT_PAD = 2; - - LLRect monitor_rect = p.monitor.rect(); - S32 monitor_height = monitor_rect.getHeight(); - monitor_rect.mLeft = speak_rect.getWidth() - monitor_rect.getWidth() - MONITOR_RIGHT_PAD; - monitor_rect.mRight = speak_rect.getWidth() - MONITOR_RIGHT_PAD; - monitor_rect.mBottom = (rect.getHeight() / 2) - (monitor_height / 2); - monitor_rect.mTop = monitor_rect.mBottom + monitor_height; - - LLOutputMonitorCtrl::Params monitor_params = p.monitor; - monitor_params.draw_border(false); - monitor_params.rect(monitor_rect); - monitor_params.auto_update(true); - monitor_params.speaker_id(gAgentID); - mOutputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(monitor_params); - mSpeakBtn->addChild(mOutputMonitor); - - // never show "muted" because you can't mute yourself - mOutputMonitor->setIsMuted(false); -} - -LLTalkButton::~LLTalkButton() -{ -} - -void LLTalkButton::setSpeakBtnToggleState(bool state) -{ - mSpeakBtn->setToggleState(state); -} - -void LLTalkButton::onClick_SpeakBtn() -{ - bool speaking = mSpeakBtn->getToggleState(); - gVoiceClient->setUserPTTState(speaking); -} - -void LLTalkButton::onClick_ShowBtn() -{ - if(!mShowBtn->getToggleState()) - { - mPrivateCallPanel->onClickClose(mPrivateCallPanel); - delete mPrivateCallPanel; - mPrivateCallPanel = NULL; - mShowBtn->setToggleState(FALSE); - return; - } - - S32 x = mSpeakBtn->getRect().mLeft; - S32 y = 0; - - localPointToScreen(x, y, &x, &y); - - mPrivateCallPanel = new LLVoiceControlPanel; - getRootView()->addChild(mPrivateCallPanel); - - y = LLBottomTray::getInstance()->getRect().getHeight() + mPrivateCallPanel->getRect().getHeight(); - - LLRect rect; - rect.setLeftTopAndSize(x, y, mPrivateCallPanel->getRect().getWidth(), mPrivateCallPanel->getRect().getHeight()); - mPrivateCallPanel->setRect(rect); - - - LLAvatarListItem* item = new LLAvatarListItem(); - item->showLastInteractionTime(false); - item->showInfoBtn(true); - item->showSpeakingIndicator(true); - item->reshape(mPrivateCallPanel->getRect().getWidth(), item->getRect().getHeight(), FALSE); - - mPrivateCallPanel->addItem(item); - mPrivateCallPanel->setVisible(TRUE); - mPrivateCallPanel->setFrontmost(TRUE); - - mShowBtn->setToggleState(TRUE); -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - LLChicletNotificationCounterCtrl::LLChicletNotificationCounterCtrl(const Params& p) : LLTextBox(p) , mCounter(0) diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 6eefd9829f..b50702205c 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -278,6 +278,14 @@ public: TYPE_GROUP, TYPE_AD_HOC }; + struct Params : public LLInitParam::Block<Params, LLChiclet::Params> + { + Optional<std::string> new_messages_icon_name; + + Params() : new_messages_icon_name("new_messages_icon_name", "icn_voice-localchat.tga") + {} + }; + /*virtual*/ ~LLIMChiclet() {}; @@ -308,6 +316,16 @@ public: virtual bool getShowSpeaker() {return mShowSpeaker;}; /* + * Shows/hides overlay icon concerning new unread messages. + */ + virtual void setShowNewMessagesIcon(bool show); + + /* + * Returns visibility of overlay icon concerning new unread messages. + */ + virtual bool getShowNewMessagesIcon(); + + /* * Draws border around chiclet. */ /*virtual*/ void draw(); @@ -335,7 +353,7 @@ public: protected: - LLIMChiclet(const LLChiclet::Params& p); + LLIMChiclet(const LLIMChiclet::Params& p); /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); @@ -343,6 +361,9 @@ protected: bool mShowSpeaker; + LLIconCtrl* mNewMessagesIcon; + LLChicletNotificationCounterCtrl* mCounterCtrl; + /** the id of another participant, either an avatar id or a group id*/ LLUUID mOtherParticipantId; @@ -374,7 +395,7 @@ public: class LLIMP2PChiclet : public LLIMChiclet { public: - struct Params : public LLInitParam::Block<Params, LLChiclet::Params> + struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params> { Optional<LLChicletAvatarIconCtrl::Params> avatar_icon; @@ -436,7 +457,6 @@ protected: private: LLChicletAvatarIconCtrl* mChicletIconCtrl; - LLChicletNotificationCounterCtrl* mCounterCtrl; LLChicletSpeakerCtrl* mSpeakerCtrl; LLMenuGL* mPopupMenu; }; @@ -447,7 +467,7 @@ private: class LLAdHocChiclet : public LLIMChiclet { public: - struct Params : public LLInitParam::Block<Params, LLChiclet::Params> + struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params> { Optional<LLChicletAvatarIconCtrl::Params> avatar_icon; @@ -457,6 +477,8 @@ public: Optional<bool> show_speaker; + Optional<LLColor4> avatar_icon_color; + Params(); }; @@ -495,7 +517,6 @@ protected: private: LLChicletAvatarIconCtrl* mChicletIconCtrl; - LLChicletNotificationCounterCtrl* mCounterCtrl; LLChicletSpeakerCtrl* mSpeakerCtrl; LLMenuGL* mPopupMenu; }; @@ -507,7 +528,7 @@ class LLIMGroupChiclet : public LLIMChiclet, public LLGroupMgrObserver { public: - struct Params : public LLInitParam::Block<Params, LLChiclet::Params> + struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params> { Optional<LLChicletGroupIconCtrl::Params> group_icon; @@ -576,7 +597,6 @@ protected: private: LLChicletGroupIconCtrl* mChicletIconCtrl; - LLChicletNotificationCounterCtrl* mCounterCtrl; LLChicletSpeakerCtrl* mSpeakerCtrl; LLMenuGL* mPopupMenu; }; @@ -833,42 +853,6 @@ protected: bool mShowControls; }; -/* - * Button displaying voice chat status. Displays voice chat options When clicked. -*/ -class LLTalkButton : public LLUICtrl -{ -public: - - struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> - { - Optional<LLButton::Params> speak_button, - show_button; - - Optional<LLOutputMonitorCtrl::Params> monitor; - - Params(); - }; - - /*virtual*/ ~LLTalkButton(); - - void setSpeakBtnToggleState(bool state); - -protected: - friend class LLUICtrlFactory; - LLTalkButton(const Params& p); - - void onClick_SpeakBtn(); - - void onClick_ShowBtn(); - -private: - LLButton* mSpeakBtn; - LLButton* mShowBtn; - LLVoiceControlPanel* mPrivateCallPanel; - LLOutputMonitorCtrl* mOutputMonitor; -}; - template<class T> T* LLChicletPanel::createChiclet(const LLUUID& session_id, S32 index) { diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index 7b75c77a1e..442e9ab27b 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -228,7 +228,8 @@ void LLColorSwatchCtrl::draw() { if (!mFallbackImageName.empty()) { - LLPointer<LLViewerTexture> fallback_image = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + LLPointer<LLViewerFetchedTexture> fallback_image = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, TRUE, + LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); if( fallback_image->getComponents() == 4 ) { gl_rect_2d_checkerboard( interior ); diff --git a/indra/newview/lldebugmessagebox.cpp b/indra/newview/lldebugmessagebox.cpp index 29e375c9fa..7814e94dfd 100644 --- a/indra/newview/lldebugmessagebox.cpp +++ b/indra/newview/lldebugmessagebox.cpp @@ -124,6 +124,7 @@ LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarTy LLButton::Params p; p.name(std::string("Animate")); + p.label(std::string("Animate")); p.rect(LLRect(20, 45, 180, 25)); p.click_callback.function(boost::bind(&LLDebugVarMessageBox::onAnimateClicked, this, _2)); mAnimateButton = LLUICtrlFactory::create<LLButton>(p); diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index 24a57cb0c1..9057d84f63 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -45,7 +45,7 @@ #include "llviewerwindow.h" #include "llappviewer.h" #include "llmemoryview.h" - +#include "llviewertexture.h" // // Globals // @@ -102,17 +102,29 @@ LLDebugView::LLDebugView(const LLDebugView::Params& p) gTextureView = LLUICtrlFactory::create<LLTextureView>(tvp); addChild(gTextureView); //gTextureView->reshape(r.getWidth(), r.getHeight(), TRUE); -#if !LL_RELEASE_FOR_DOWNLOAD - r.set(150, rect.getHeight() - 50, 900 + LLImageGL::sTextureLoadedCounter.size() * 30, 100); - LLTextureSizeView::Params tsvp; - tsvp.name("gTextureSizeView"); - tsvp.rect(r); - tsvp.follows.flags(FOLLOWS_BOTTOM|FOLLOWS_LEFT); - tsvp.visible(false); - gTextureSizeView = LLUICtrlFactory::create<LLTextureSizeView>(tsvp); - addChild(gTextureSizeView); -#endif + if(gAuditTexture) + { + r.set(150, rect.getHeight() - 50, 900 + LLImageGL::sTextureLoadedCounter.size() * 30, 100); + LLTextureSizeView::Params tsv ; + tsv.name("gTextureSizeView"); + tsv.rect(r); + tsv.follows.flags(FOLLOWS_BOTTOM|FOLLOWS_LEFT); + tsv.visible(false); + gTextureSizeView = LLUICtrlFactory::create<LLTextureSizeView>(tsv); + addChild(gTextureSizeView); + gTextureSizeView->setType(LLTextureSizeView::TEXTURE_MEM_OVER_SIZE) ; + + r.set(150, rect.getHeight() - 50, 900 + LLViewerTexture::getTotalNumOfCategories() * 30, 100); + LLTextureSizeView::Params tcv ; + tcv.name("gTextureCategoryView"); + tcv.rect(r); + tcv.follows.flags(FOLLOWS_BOTTOM|FOLLOWS_LEFT); + tcv.visible(false); + gTextureCategoryView = LLUICtrlFactory::create<LLTextureSizeView>(tcv); + gTextureCategoryView->setType(LLTextureSizeView::TEXTURE_MEM_OVER_CATEGORY); + addChild(gTextureCategoryView); + } } @@ -122,5 +134,6 @@ LLDebugView::~LLDebugView() gDebugView = NULL; gTextureView = NULL; gTextureSizeView = NULL; + gTextureCategoryView = NULL; } diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 069155c255..03a3f2b43d 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -105,7 +105,7 @@ void LLDrawable::init() mVObjp = NULL; // mFaces mSpatialGroupp = NULL; - mVisible = 0; + mVisible = sCurVisible - 2;//invisible for the current frame and the last frame. mRadius = 0.f; mGeneration = -1; diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index d8c34581d5..95ddacb722 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -279,7 +279,7 @@ S32 LLFacePool::drawLoopSetTex(face_array_t& face_list, S32 stage) iter != face_list.end(); iter++) { LLFace *facep = *iter; - gGL.getTexUnit(stage)->bind(facep->getTexture()); + gGL.getTexUnit(stage)->bind(facep->getTexture(), TRUE) ; gGL.getTexUnit(0)->activate(); res += facep->renderIndexed(); } @@ -475,17 +475,13 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) { if (params.mTexture.notNull()) { - gGL.getTexUnit(0)->bind(params.mTexture.get()); + gGL.getTexUnit(0)->bind(params.mTexture, TRUE) ; if (params.mTextureMatrix) { glMatrixMode(GL_TEXTURE); glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix); gPipeline.mTextureMatrixOps++; } - if(params.mTexture.notNull())//will be removed. - { - params.mTexture->addTextureStats(params.mVSize); - } } else { diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index a5a29dea7b..6d77361414 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -219,7 +219,7 @@ void LLDrawPoolAlpha::render(S32 pass) gPipeline.enableLightsFullbright(LLColor4(1,1,1,1)); glColor4f(1,0,0,1); LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f*1024.f); - gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep) ; + gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep, TRUE) ; renderAlphaHighlight(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0); } diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index e087feeaec..5f845c3721 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -144,7 +144,7 @@ void LLStandardBumpmap::restoreGL() gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage = LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id), TRUE, - FALSE, + LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0); diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 790e75cfaa..9dc22cddcd 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -72,7 +72,7 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) : sDetailScale = 1.f/gSavedSettings.getF32("RenderTerrainScale"); sDetailMode = gSavedSettings.getS32("RenderTerrainDetail"); mAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga", - TRUE, TRUE, + TRUE, LLViewerTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, GL_ALPHA8, GL_ALPHA, LLUUID("e97cf410-8e61-7005-ec06-629eba4cd1fb")); @@ -81,7 +81,7 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) : mAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP); m2DAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c", - TRUE, TRUE, + TRUE, LLViewerTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, GL_ALPHA8, GL_ALPHA, LLUUID("38b86f85-2575-52a9-a531-23108d8da837")); diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 8d2cbc583c..5521fb05a8 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -253,7 +253,7 @@ void LLDrawPoolTree::renderTree(BOOL selecting) LLGLState normalize(GL_NORMALIZE, TRUE); // Bind the texture for this tree. - gGL.getTexUnit(sDiffTex)->bind(mTexturep.get()); + gGL.getTexUnit(sDiffTex)->bind(mTexturep.get(), TRUE); U32 indices_drawn = 0; diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 21e17cc207..107de934df 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -69,11 +69,11 @@ LLVector3 LLDrawPoolWater::sLightDir; LLDrawPoolWater::LLDrawPoolWater() : LLFacePool(POOL_WATER) { - mHBTex[0] = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, TRUE); + mHBTex[0] = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, LLViewerTexture::BOOST_UI); gGL.getTexUnit(0)->bind(mHBTex[0]) ; mHBTex[0]->setAddressMode(LLTexUnit::TAM_CLAMP); - mHBTex[1] = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, TRUE); + mHBTex[1] = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, LLViewerTexture::BOOST_UI); gGL.getTexUnit(0)->bind(mHBTex[1]); mHBTex[1]->setAddressMode(LLTexUnit::TAM_CLAMP); diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp index 527656ab6b..45f4b4fbd0 100644 --- a/indra/newview/lldriverparam.cpp +++ b/indra/newview/lldriverparam.cpp @@ -224,7 +224,6 @@ void LLDriverParam::setAvatar(LLVOAvatar *avatarp) } } *new_param = *this; - new_param->setIsDummy(FALSE); return new_param; } diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index 0bb5edf3f9..e41c4104eb 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -104,7 +104,7 @@ void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum { setExplicitFormat(internal_format, primary_format, type_format, swap_bytes); } - createGLTexture(0, raw_image); + createGLTexture(0, raw_image, 0, TRUE, LLViewerTexture::DYNAMIC_TEX); setAddressMode((mClamp) ? LLTexUnit::TAM_CLAMP : LLTexUnit::TAM_WRAP); mGLTexturep->setGLTextureCreated(false); } diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 7bc48185e6..424d635321 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -48,11 +48,12 @@ public: mExpanderLabel(more_text) {} - /*virtual*/ void getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const + /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { // more label always spans width of text box width = mEditor.getTextRect().getWidth() - mEditor.getHPad(); height = llceil(mStyle->getFont()->getLineHeight()); + return true; } /*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const { diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 09b3ce1e86..c54b83d865 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -52,6 +52,7 @@ #include "llvovolume.h" #include "pipeline.h" #include "llviewerregion.h" +#include "llviewerwindow.h" #define LL_MAX_INDICES_COUNT 1000000 @@ -175,6 +176,9 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) mLastIndicesCount = mIndicesCount; mLastIndicesIndex = mIndicesIndex; + mImportanceToCamera = 0.f ; + mBoundingSphereRadius = 0.0f ; + mAtlasInfop = NULL ; mUsingAtlas = FALSE ; } @@ -186,6 +190,7 @@ void LLFace::destroy() { mTexture->removeFace(this) ; } + if (mDrawPoolp) { mDrawPoolp->removeFace(this); @@ -207,7 +212,7 @@ void LLFace::destroy() } } } - + setDrawInfo(NULL); removeAtlas(); @@ -256,6 +261,7 @@ void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep) } mDrawPoolp = new_pool; } + setTexture(texturep) ; } @@ -515,8 +521,8 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color) /* removed in lieu of raycast uv detection void LLFace::renderSelectedUV() { - LLViewerTexture* red_blue_imagep = LLViewerTextureManager::getFetchedTextureFromFile("uv_test1.j2c", TRUE, TRUE); - LLViewerTexture* green_imagep = LLViewerTextureManager::getFetchedTextureFromFile("uv_test2.tga", TRUE, TRUE); + LLViewerTexture* red_blue_imagep = LLViewerTextureManager::getFetchedTextureFromFile("uv_test1.j2c", TRUE, LLViewerTexture::BOOST_UI); + LLViewerTexture* green_imagep = LLViewerTextureManager::getFetchedTextureFromFile("uv_test2.tga", TRUE, LLViewerTexture::BOOST_UI); LLGLSUVSelect object_select; @@ -750,7 +756,9 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, } mCenterLocal = (newMin+newMax)*0.5f; - + LLVector3 tmp = (newMin - newMax) ; + mBoundingSphereRadius = tmp.length() * 0.5f ; + updateCenterAgent(); } @@ -1314,6 +1322,151 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, return TRUE; } +const F32 LEAST_IMPORTANCE = 0.05f ; +const F32 LEAST_IMPORTANCE_FOR_LARGE_IMAGE = 0.3f ; + +F32 LLFace::getTextureVirtualSize() +{ + F32 radius; + F32 cos_angle_to_view_dir; + mPixelArea = calcPixelArea(cos_angle_to_view_dir, radius); + + if (mPixelArea <= 0) + { + return 0.f; + } + + //get area of circle in texture space + LLVector2 tdim = mTexExtents[1] - mTexExtents[0]; + F32 texel_area = (tdim * 0.5f).lengthSquared()*3.14159f; + if (texel_area <= 0) + { + // Probably animated, use default + 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); + + if(face_area > LLViewerTexture::sMaxSmallImageSize) + { + if(mImportanceToCamera < LEAST_IMPORTANCE) //if the face is not important, do not load hi-res. + { + static const F32 MAX_LEAST_IMPORTANCE_IMAGE_SIZE = 128.0f * 128.0f ; + face_area = llmin(face_area * 0.5f, MAX_LEAST_IMPORTANCE_IMAGE_SIZE) ; + } + else if(face_area > LLViewerTexture::sMinLargeImageSize) //if is large image, shrink face_area by considering the partial overlapping. + { + if(mImportanceToCamera < LEAST_IMPORTANCE_FOR_LARGE_IMAGE)//if the face is not important, do not load hi-res. + { + face_area = LLViewerTexture::sMinLargeImageSize ; + } + else if(mTexture.notNull() && mTexture->isLargeImage()) + { + face_area *= adjustPartialOverlapPixelArea(cos_angle_to_view_dir, radius ); + } + } + } + + return face_area; +} + +F32 LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) +{ + //get area of circle around face + LLVector3 center = getPositionAgent(); + LLVector3 size = (mExtents[1] - mExtents[0]) * 0.5f; + + LLVector3 lookAt = center - LLViewerCamera::getInstance()->getOrigin(); + F32 dist = lookAt.normVec() ; + + //get area of circle around node + F32 app_angle = atanf(size.length()/dist); + radius = app_angle*LLDrawable::sCurPixelAngle; + F32 face_area = radius*radius * 3.14159f; + + if(dist < mBoundingSphereRadius) //camera is very close + { + cos_angle_to_view_dir = 1.0f ; + mImportanceToCamera = 1.0f ; + } + else + { + cos_angle_to_view_dir = lookAt * LLViewerCamera::getInstance()->getXAxis() ; + mImportanceToCamera = LLFace::calcImportanceToCamera(cos_angle_to_view_dir, dist) ; + } + + return face_area ; +} + +//the projection of the face partially overlaps with the screen +F32 LLFace::adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius ) +{ + F32 screen_radius = (F32)llmax(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight()) ; + F32 center_angle = acosf(cos_angle_to_view_dir) ; + F32 d = center_angle * LLDrawable::sCurPixelAngle ; + + if(d + radius > screen_radius + 5.f) + { + //---------------------------------------------- + //calculate the intersection area of two circles + //F32 radius_square = radius * radius ; + //F32 d_square = d * d ; + //F32 screen_radius_square = screen_radius * screen_radius ; + //face_area = + // radius_square * acosf((d_square + radius_square - screen_radius_square)/(2 * d * radius)) + + // screen_radius_square * acosf((d_square + screen_radius_square - radius_square)/(2 * d * screen_radius)) - + // 0.5f * sqrtf((-d + radius + screen_radius) * (d + radius - screen_radius) * (d - radius + screen_radius) * (d + radius + screen_radius)) ; + //---------------------------------------------- + + //the above calculation is too expensive + //the below is a good estimation: bounding box of the bounding sphere: + F32 alpha = 0.5f * (radius + screen_radius - d) / radius ; + alpha = llclamp(alpha, 0.f, 1.f) ; + return alpha * alpha ; + } + return 1.0f ; +} + +const S8 FACE_IMPORTANCE_LEVEL = 4 ; +const F32 FACE_IMPORTANCE_TO_CAMERA_OVER_DISTANCE[FACE_IMPORTANCE_LEVEL][2] = //{distance, importance_weight} + {{16.1f, 1.0f}, {32.1f, 0.5f}, {48.1f, 0.2f}, {96.1f, 0.05f} } ; +const F32 FACE_IMPORTANCE_TO_CAMERA_OVER_ANGLE[FACE_IMPORTANCE_LEVEL][2] = //{cos(angle), importance_weight} + {{0.985f /*cos(10 degrees)*/, 1.0f}, {0.94f /*cos(20 degrees)*/, 0.8f}, {0.866f /*cos(30 degrees)*/, 0.64f}, {0.0f, 0.36f}} ; + +//static +F32 LLFace::calcImportanceToCamera(F32 cos_angle_to_view_dir, F32 dist) +{ + F32 importance = 0.f ; + + if(cos_angle_to_view_dir > LLViewerCamera::getInstance()->getCosHalfFov() && + dist < FACE_IMPORTANCE_TO_CAMERA_OVER_DISTANCE[FACE_IMPORTANCE_LEVEL - 1][0]) + { + F32 camera_moving_speed = LLViewerCamera::getInstance()->getAverageSpeed() ; + F32 camera_angular_speed = LLViewerCamera::getInstance()->getAverageAngularSpeed(); + + if(camera_moving_speed > 10.0f || camera_angular_speed > 1.0f) + { + //if camera moves or rotates too fast, ignore the importance factor + return 0.f ; + } + + //F32 camera_relative_speed = camera_moving_speed * (lookAt * LLViewerCamera::getInstance()->getVelocityDir()) ; + + S32 i = 0 ; + for(i = 0; i < FACE_IMPORTANCE_LEVEL && dist > FACE_IMPORTANCE_TO_CAMERA_OVER_DISTANCE[i][0]; ++i); + i = llmin(i, FACE_IMPORTANCE_LEVEL - 1) ; + F32 dist_factor = FACE_IMPORTANCE_TO_CAMERA_OVER_DISTANCE[i][1] ; + + for(i = 0; i < FACE_IMPORTANCE_LEVEL && cos_angle_to_view_dir < FACE_IMPORTANCE_TO_CAMERA_OVER_ANGLE[i][0] ; ++i) ; + i = llmin(i, FACE_IMPORTANCE_LEVEL - 1) ; + importance = dist_factor * FACE_IMPORTANCE_TO_CAMERA_OVER_ANGLE[i][1] ; + } + + return importance ; +} + BOOL LLFace::verify(const U32* indices_array) const { BOOL ok = TRUE; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 2b134c8c31..68eee061b8 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -188,6 +188,9 @@ public: void setIndicesIndex(S32 idx) { mIndicesIndex = idx; } void setDrawInfo(LLDrawInfo* draw_info); + F32 getTextureVirtualSize() ; + F32 getImportanceToCamera()const {return mImportanceToCamera ;} + //for atlas LLTextureAtlasSlot* getAtlasInfo() ; void setAtlasInUse(BOOL flag); @@ -200,6 +203,12 @@ public: void removeAtlas() ; BOOL switchTexture() ; +private: + F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius ); + F32 calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ; +public: + static F32 calcImportanceToCamera(F32 to_view_dir, F32 dist); + public: LLVector3 mCenterLocal; @@ -214,7 +223,7 @@ public: LLMatrix4* mTextureMatrix; LLDrawInfo* mDrawInfo; -protected: +private: friend class LLGeometryManager; friend class LLVolumeGeometryManager; @@ -244,6 +253,13 @@ protected: F32 mVSize; F32 mPixelArea; + //importance factor, in the range [0, 1.0]. + //1.0: the most important. + //based on the distance from the face to the view point and the angle from the face center to the view direction. + F32 mImportanceToCamera ; + F32 mBoundingSphereRadius ; + + //atlas LLPointer<LLTextureAtlasSlot> mAtlasInfop ; BOOL mUsingAtlas ; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index a6afbc05be..18135fc558 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -437,7 +437,7 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } else { - LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE); + const LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); if (item->getParentUUID() == favorites_id) { llwarns << "Attemt to copy a favorite item into the same folder." << llendl; @@ -539,7 +539,7 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con LLToolDragAndDrop* tool_dad = LLToolDragAndDrop::getInstance(); if (tool_dad->getSource() == LLToolDragAndDrop::SOURCE_NOTECARD) { - viewer_item->setType(LLAssetType::AT_FAVORITE); + viewer_item->setType(LLAssetType::AT_LANDMARK); copy_inventory_from_notecard(tool_dad->getObjectID(), tool_dad->getSourceID(), viewer_item.get(), gInventoryCallbacks.registerCB(cb)); } else @@ -561,7 +561,7 @@ void LLFavoritesBarCtrl::changed(U32 mask) { if (mFavoriteFolderId.isNull()) { - mFavoriteFolderId = gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE); + mFavoriteFolderId = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); if (mFavoriteFolderId.notNull()) { @@ -750,6 +750,7 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width) bparams.tab_stop(false); bparams.font(mFont); bparams.name(">>"); + bparams.label(">>"); bparams.tool_tip(mChevronButtonToolTip); bparams.click_callback.function(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this)); diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index 55b7ed0c99..095fe0a220 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -989,7 +989,7 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata) name, desc, 0, - LLAssetType::AT_NONE, + LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION, LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), name, diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 7cb8987879..538b44c056 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -264,7 +264,6 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, Invent ( asstype == LLAssetType::AT_BODYPART && gSavedSettings.getBOOL("BulkChangeIncludeBodyParts" )) || ( asstype == LLAssetType::AT_CLOTHING && gSavedSettings.getBOOL("BulkChangeIncludeClothing" )) || ( asstype == LLAssetType::AT_GESTURE && gSavedSettings.getBOOL("BulkChangeIncludeGestures" )) || - ( asstype == LLAssetType::AT_FAVORITE && gSavedSettings.getBOOL("BulkChangeIncludeFavourite" )) || ( asstype == LLAssetType::AT_NOTECARD && gSavedSettings.getBOOL("BulkChangeIncludeNotecards" )) || ( asstype == LLAssetType::AT_OBJECT && gSavedSettings.getBOOL("BulkChangeIncludeObjects" )) || ( asstype == LLAssetType::AT_LSL_TEXT && gSavedSettings.getBOOL("BulkChangeIncludeScripts" )) || diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 3da06fa7b3..cefd7a3808 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -293,7 +293,7 @@ void LLFloaterBuy::onClickBuy() { // Put the items where we put new folders. LLUUID category_id; - category_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT); + category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); // *NOTE: doesn't work for multiple object buy, which UI does not // currently support sale info is used for verification only, if diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index f3eaa0c916..32802f6a20 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -286,7 +286,7 @@ void LLFloaterBuyContents::onClickBuy() // Put the items where we put new folders. LLUUID category_id; - category_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CATEGORY); + category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CATEGORY); // *NOTE: doesn't work for multiple object buy, which UI does not // currently support sale info is used for verification only, if diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index 8570b5eb4a..92778510e7 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -40,6 +40,7 @@ #include "llinventorymodel.h" #include "llpanelmaininventory.h" #include "llresmgr.h" +#include "llviewerfoldertype.h" ///---------------------------------------------------------------------------- /// LLFloaterInventory diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h index f2f2963a33..c0de89bff2 100644 --- a/indra/newview/llfloaterinventory.h +++ b/indra/newview/llfloaterinventory.h @@ -35,6 +35,7 @@ #define LL_LLFLOATERINVENTORY_H #include "llfloater.h" +#include "llfoldertype.h" class LLInventoryPanel; class LLPanelMainInventory; diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 0c9a759f32..3fe711a166 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -51,11 +51,26 @@ #include "llviewermenu.h" // +// Constants +// +const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f; + +// // Member functions // LLFloaterMap::LLFloaterMap(const LLSD& key) - : LLFloater(key) + : LLFloater(key), + mPopupMenu(NULL), + mTextBoxEast(NULL), + mTextBoxNorth(NULL), + mTextBoxWest(NULL), + mTextBoxSouth(NULL), + mTextBoxSouthEast(NULL), + mTextBoxNorthEast(NULL), + mTextBoxNorthWest(NULL), + mTextBoxSouthWest(NULL), + mMap(NULL) { //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_map.xml", FALSE); } @@ -92,6 +107,8 @@ BOOL LLFloaterMap::postBuild() mPopupMenu->setItemEnabled ("Stop Tracking", false); } + updateMinorDirections(); + // Get the drag handle all the way in back sendChildToBack(getDragHandle()); @@ -139,6 +156,23 @@ void LLFloaterMap::setDirectionPos( LLTextBox* text_box, F32 rotation ) llround(map_half_height - text_half_height + radius * sin( rotation )) ); } +void LLFloaterMap::updateMinorDirections() +{ + if (mTextBoxNorthEast == NULL) + { + return; + } + + // Hide minor directions if they cover too much of the map + bool show_minors = mTextBoxNorthEast->getRect().getHeight() < MAP_MINOR_DIR_THRESHOLD * + llmin(getRect().getWidth(), getRect().getHeight()); + + mTextBoxNorthEast->setVisible(show_minors); + mTextBoxNorthWest->setVisible(show_minors); + mTextBoxSouthWest->setVisible(show_minors); + mTextBoxSouthEast->setVisible(show_minors); +} + // virtual void LLFloaterMap::draw() { @@ -180,17 +214,23 @@ void LLFloaterMap::draw() LLFloater::draw(); } +void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + LLFloater::reshape(width, height, called_from_parent); + updateMinorDirections(); +} + void LLFloaterMap::handleZoom(const LLSD& userdata) { std::string level = userdata.asString(); F32 scale = 0.0f; if (level == std::string("close")) - scale = MAP_SCALE_MAX; + scale = LLNetMap::MAP_SCALE_MAX; else if (level == std::string("medium")) - scale = MAP_SCALE_MID; + scale = LLNetMap::MAP_SCALE_MID; else if (level == std::string("far")) - scale = MAP_SCALE_MIN; + scale = LLNetMap::MAP_SCALE_MIN; if (scale != 0.0f) { gSavedSettings.setF32("MiniMapScale", scale ); diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h index 501777ed07..6c9138c6a7 100644 --- a/indra/newview/llfloatermap.h +++ b/indra/newview/llfloatermap.h @@ -51,12 +51,14 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /*virtual*/ void draw(); private: void handleZoom(const LLSD& userdata); void handleStopTracking (const LLSD& userdata); void setDirectionPos( LLTextBox* text_box, F32 rotation ); + void updateMinorDirections(); LLMenuGL* mPopupMenu; diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index ed7d2c71ea..b7296518d4 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -176,7 +176,7 @@ void LLFloaterNameDesc::onBtnOK( ) upload_new_resource(mFilenameAndPath, // file childGetValue("name_form").asString(), childGetValue("description_form").asString(), - 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE, + 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), display_name, callback, expected_upload_cost, nruserdata); closeFloater(false); diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index b6ec0868cf..e277aba493 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -158,14 +158,14 @@ void LLFloaterOpenObject::moveToInventory(bool wear) if (wear) { parent_category_id = gInventory.findCategoryUUIDForType( - LLAssetType::AT_CLOTHING); + LLFolderType::FT_CLOTHING); } else { parent_category_id = gInventory.getRootFolderID(); } LLUUID category_id = gInventory.createNewCategory(parent_category_id, - LLAssetType::AT_NONE, + LLFolderType::FT_NONE, name); LLCatAndWear* data = new LLCatAndWear; diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index 88811d06fe..c2389e73a0 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -444,13 +444,11 @@ void LLFloaterPay::onCacheOwnerName(const LLUUID& owner_id, { if (is_group) { - childSetVisible("payee_group",true); - childSetVisible("payee_resident",false); + setTitle(getString("payee_group")); } else { - childSetVisible("payee_group",false); - childSetVisible("payee_resident",true); + setTitle(getString("payee_resident")); } childSetTextArg("payee_name", "[FIRST]", firstname); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 70a3ad5252..1002697fe5 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -770,7 +770,7 @@ void LLFloaterReporter::takeScreenshot() if (COMPLAINT_REPORT == mReportType) { mResourceDatap->mAssetInfo.mType = LLAssetType::AT_TEXTURE; - mResourceDatap->mPreferredLocation = LLAssetType::EType(-2); + mResourceDatap->mPreferredLocation = LLFolderType::EType(LLResourceData::INVALID_LOCATION); } else { @@ -789,8 +789,8 @@ void LLFloaterReporter::takeScreenshot() // store in the image list so it doesn't try to fetch from the server LLPointer<LLViewerFetchedTexture> image_in_list = - LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid, TRUE, FALSE, LLViewerTexture::FETCHED_TEXTURE); - image_in_list->createGLTexture(0, raw); + LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::FETCHED_TEXTURE); + image_in_list->createGLTexture(0, raw, 0, TRUE, LLViewerTexture::OTHER); // the texture picker then uses that texture LLTexturePicker* texture = getChild<LLTextureCtrl>("screenshot"); @@ -838,7 +838,7 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, } EReportType report_type = UNKNOWN_REPORT; - if (data->mPreferredLocation == -2) + if (data->mPreferredLocation == LLResourceData::INVALID_LOCATION) { report_type = COMPLAINT_REPORT; } diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 3bf1848efb..eeea71cc4c 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -106,7 +106,7 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: if (objectp) { - objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, TRUE)); + objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI)); floater_label = llformat("%s(%.2f, %.2f)", user_name.c_str(), objectp->getPositionRegion().mV[VX], objectp->getPositionRegion().mV[VY]); } else diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index bd9798c18e..97c573ddea 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -34,8 +34,8 @@ #include "llviewerprecompiledheaders.h" #include "llfloatersearch.h" #include "llmediactrl.h" -#include "llagent.h" - +#include "lllogininstance.h" +#include "lluri.h" LLFloaterSearch::LLFloaterSearch(const LLSD& key) : LLFloater(key), @@ -116,15 +116,11 @@ void LLFloaterSearch::search(const LLSD &key) // append the search query string std::string search_text = key.has("id") ? key["id"].asString() : ""; - url += std::string("?q=") + search_text; + url += std::string("?q=") + LLURI::escape(search_text); - // append the maturity and teen capabilities for this agent - BOOL godlike = gAgent.isGodlike(); - bool mature_enabled = gAgent.canAccessMature() || godlike; - bool adult_enabled = gAgent.canAccessAdult() || godlike; - std::string mature = (mature_enabled) ? "True" : "False"; - std::string teen = (!adult_enabled) ? "True" : "False"; - url += "&t=" + teen + "&m=" + mature; + // append the permissions token that login.cgi gave us + LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token"); + url += "&p=" + search_token.asString(); // and load the URL in the web view mBrowser->navigateTo(url); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 235e819218..fd2e7b3487 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -980,7 +980,7 @@ void LLSnapshotLivePreview::saveTexture() "Snapshot : " + pos_string, "Taken by " + who_took_it + " at " + pos_string, 0, - LLAssetType::AT_SNAPSHOT_CATEGORY, + LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, PERM_ALL, // Note: Snapshots to inventory is a special case of content upload PERM_NONE, // that ignores the user's premissions preferences and continues to @@ -1373,8 +1373,10 @@ void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp, void LLFloaterSnapshot::Impl::onClickDiscard(void* data) { LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; + if (view) { + view->getParent()->setMouseOpaque(FALSE); view->closeFloater(); } } diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp index aca9198f59..bbeb287171 100644 --- a/indra/newview/llfloatervoicedevicesettings.cpp +++ b/indra/newview/llfloatervoicedevicesettings.cpp @@ -49,6 +49,9 @@ #include "lluictrlfactory.h" +static LLRegisterPanelClassWrapper<LLPanelVoiceDeviceSettings> t_panel_group_general("panel_voice_device_settings"); + + LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings() : LLPanel() { @@ -82,8 +85,22 @@ BOOL LLPanelVoiceDeviceSettings::postBuild() return TRUE; } +// virtual +void LLPanelVoiceDeviceSettings::handleVisibilityChange ( BOOL new_visibility ) +{ + if (new_visibility) + { + initialize(); + } + else + { + cleanup(); + } +} void LLPanelVoiceDeviceSettings::draw() { + refresh(); + // let user know that volume indicator is not yet available bool is_in_tuning_mode = gVoiceClient->inTuningMode(); childSetVisible("wait_text", !is_in_tuning_mode); diff --git a/indra/newview/llfloatervoicedevicesettings.h b/indra/newview/llfloatervoicedevicesettings.h index f1603dc414..d67283d0a2 100644 --- a/indra/newview/llfloatervoicedevicesettings.h +++ b/indra/newview/llfloatervoicedevicesettings.h @@ -50,6 +50,8 @@ public: void initialize(); void cleanup(); + /*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); + protected: static void onCommitInputDevice(LLUICtrl* ctrl, void* user_data); static void onCommitOutputDevice(LLUICtrl* ctrl, void* user_data); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index f3f600149f..7d2eb98111 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -56,7 +56,6 @@ #include "llregionhandle.h" #include "llscrolllistctrl.h" #include "llslurl.h" -#include "lltabcontainer.h" #include "lltextbox.h" #include "lltracker.h" #include "lltrans.h" @@ -64,7 +63,9 @@ #include "llviewermenu.h" #include "llviewerregion.h" #include "llviewerstats.h" +#include "llviewertexture.h" #include "llworldmap.h" +#include "llworldmapmessage.h" #include "llworldmapview.h" #include "lluictrlfactory.h" #include "llappviewer.h" @@ -80,6 +81,12 @@ //--------------------------------------------------------------------------- static const F32 MAP_ZOOM_TIME = 0.2f; +// Merov: we switched from using the "world size" (which varies depending where the user went) to a fixed +// width of 512 regions max visible at a time. This makes the zoom slider works in a consistent way across +// sessions and doesn't prevent the user to pan the world if it was to grow a lot beyond that limit. +// Currently (01/26/09), this value allows the whole grid to be visible in a 1024x1024 window. +static const S32 MAX_VISIBLE_REGIONS = 512; + enum EPanDirection { PAN_UP, @@ -190,11 +197,11 @@ LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key) gFloaterWorldMap = this; mFactoryMap["objects_mapview"] = LLCallbackMap(createWorldMapView, NULL); - mFactoryMap["terrain_mapview"] = LLCallbackMap(createWorldMapView, NULL); //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_world_map.xml", FALSE); mCommitCallbackRegistrar.add("WMap.Location", boost::bind(&LLFloaterWorldMap::onLocationCommit, this)); mCommitCallbackRegistrar.add("WMap.AvatarCombo", boost::bind(&LLFloaterWorldMap::onAvatarComboCommit, this)); + mCommitCallbackRegistrar.add("WMap.Landmark", boost::bind(&LLFloaterWorldMap::onLandmarkComboCommit, this)); mCommitCallbackRegistrar.add("WMap.SearchResult", boost::bind(&LLFloaterWorldMap::onCommitSearchResult, this)); mCommitCallbackRegistrar.add("WMap.CommitLocation", boost::bind(&LLFloaterWorldMap::onCommitLocation, this)); mCommitCallbackRegistrar.add("WMap.GoHome", boost::bind(&LLFloaterWorldMap::onGoHome, this)); @@ -213,17 +220,7 @@ void* LLFloaterWorldMap::createWorldMapView(void* data) BOOL LLFloaterWorldMap::postBuild() { - mTabs = getChild<LLTabContainer>("maptab"); - if (!mTabs) return FALSE; - - mTabs->setCommitCallback(boost::bind(&LLFloaterWorldMap::onCommitBackground, this)); - - // The following callback syncs the worlmap tabs with the images. - // Commented out since it was crashing when LLWorldMap became a singleton. - // We should be fine without it but override the onOpen method and put it - // there if it turns out to be needed. -MG - // - //onCommitBackground(); + mPanel = getChild<LLPanel>("objects_mapview"); LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo"); if (avatar_combo) @@ -251,8 +248,8 @@ BOOL LLFloaterWorldMap::postBuild() landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) ); } - mCurZoomVal = log(gMapScale)/log(2.f); - childSetValue("zoom slider", gMapScale); + mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f); + childSetValue("zoom slider", LLWorldMapView::sMapScale); setDefaultBtn(NULL); @@ -265,7 +262,7 @@ BOOL LLFloaterWorldMap::postBuild() LLFloaterWorldMap::~LLFloaterWorldMap() { // All cleaned up by LLView destructor - mTabs = NULL; + mPanel = NULL; // Inventory deletes all observers on shutdown mInventory = NULL; @@ -298,7 +295,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) mIsClosing = FALSE; LLWorldMapView* map_panel; - map_panel = (LLWorldMapView*)mTabs->getCurrentPanel(); + map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel; map_panel->clearLastClick(); { @@ -309,15 +306,8 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) } map_panel->updateVisibleBlocks(); - // Reload the agent positions when we show the window - LLWorldMap::getInstance()->eraseItems(); - - // Reload any maps that may have changed - LLWorldMap::getInstance()->clearSimFlags(); - - const S32 panel_num = mTabs->getCurrentPanelIndex(); - const bool request_from_sim = true; - LLWorldMap::getInstance()->setCurrentLayer(panel_num, request_from_sim); + // Reload items as they may have changed + LLWorldMap::getInstance()->reloadItems(); // We may already have a bounding box for the regions of the world, // so use that to adjust the view. @@ -327,7 +317,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) LLFirstUse::useMap(); // Start speculative download of landmarks - LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); + const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); gInventory.startBackgroundFetch(landmark_folder_id); childSetFocus("location", TRUE); @@ -351,12 +341,9 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) // static void LLFloaterWorldMap::reloadIcons(void*) { - LLWorldMap::getInstance()->eraseItems(); - - LLWorldMap::getInstance()->sendMapLayerRequest(); + LLWorldMap::getInstance()->reloadItems(); } - // virtual BOOL LLFloaterWorldMap::handleHover(S32 x, S32 y, MASK mask) { @@ -388,12 +375,6 @@ BOOL LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks) void LLFloaterWorldMap::reshape( S32 width, S32 height, BOOL called_from_parent ) { LLFloater::reshape( width, height, called_from_parent ); - - // Might have changed size of world display area - // JC: Technically, this is correct, but it makes the slider "pop" - // if you resize the window, then draw the slider. Just leaving it - // the way it was when you opened the window seems better. - // adjustZoomSliderBounds(); } @@ -457,7 +438,7 @@ void LLFloaterWorldMap::draw() { F64 seconds = LLTimer::getElapsedSeconds(); double value = fmod(seconds, 2); - value = 0.5 + 0.5*cos(value * 3.14159f); + value = 0.5 + 0.5*cos(value * F_PI); LLColor4 loading_color(0.0, F32(value/2), F32(value), 1.0); childSetColor("location_icon", loading_color); } @@ -475,7 +456,7 @@ void LLFloaterWorldMap::draw() childSetEnabled("Teleport", (BOOL)tracking_status); // childSetEnabled("Clear", (BOOL)tracking_status); - childSetEnabled("Show Destination", (BOOL)tracking_status || LLWorldMap::getInstance()->mIsTrackingUnknownLocation); + childSetEnabled("Show Destination", (BOOL)tracking_status || LLWorldMap::getInstance()->isTracking()); childSetEnabled("copy_slurl", (mSLURL.size() > 0) ); setMouseOpaque(TRUE); @@ -495,6 +476,18 @@ void LLFloaterWorldMap::draw() mCurZoomVal = lerp(mCurZoomVal, (F32)childGetValue("zoom slider").asReal(), interp); F32 map_scale = 256.f*pow(2.f, mCurZoomVal); LLWorldMapView::setScale( map_scale ); + + // Enable/disable checkboxes depending on the zoom level + // If above threshold level (i.e. low res) -> Disable all checkboxes + // If under threshold level (i.e. high res) -> Enable all checkboxes + bool enable = LLWorldMapView::showRegionInfo(); + childSetEnabled("people_chk", enable); + childSetEnabled("infohub_chk", enable); + childSetEnabled("telehub_chk", enable); + childSetEnabled("land_for_sale_chk", enable); + childSetEnabled("event_chk", enable); + childSetEnabled("event_mature_chk", enable); + childSetEnabled("event_adult_chk", enable); LLFloater::draw(); } @@ -583,14 +576,14 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id ) void LLFloaterWorldMap::trackEvent(const LLItemInfo &event_info) { mTrackedStatus = LLTracker::TRACKING_LOCATION; - LLTracker::trackLocation(event_info.mPosGlobal, event_info.mName, event_info.mToolTip, LLTracker::LOCATION_EVENT); + LLTracker::trackLocation(event_info.getGlobalPosition(), event_info.getName(), event_info.getToolTip(), LLTracker::LOCATION_EVENT); setDefaultBtn("Teleport"); } void LLFloaterWorldMap::trackGenericItem(const LLItemInfo &item) { mTrackedStatus = LLTracker::TRACKING_LOCATION; - LLTracker::trackLocation(item.mPosGlobal, item.mName, item.mToolTip, LLTracker::LOCATION_ITEM); + LLTracker::trackLocation(item.getGlobalPosition(), item.getName(), item.getToolTip(), LLTracker::LOCATION_ITEM); setDefaultBtn("Teleport"); } @@ -599,29 +592,27 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global); if (!sim_info) { - LLWorldMap::getInstance()->mIsTrackingUnknownLocation = TRUE; - LLWorldMap::getInstance()->mInvalidLocation = FALSE; - LLWorldMap::getInstance()->mUnknownLocation = pos_global; + // We haven't found a region for that point yet, leave the tracking to the world map + LLWorldMap::getInstance()->setTracking(pos_global); LLTracker::stopTracking(NULL); S32 world_x = S32(pos_global.mdV[0] / 256); S32 world_y = S32(pos_global.mdV[1] / 256); - LLWorldMap::getInstance()->sendMapBlockRequest(world_x, world_y, world_x, world_y, true); + LLWorldMapMessage::getInstance()->sendMapBlockRequest(world_x, world_y, world_x, world_y, true); setDefaultBtn(""); return; } - if (sim_info->mAccess == SIM_ACCESS_DOWN) + if (sim_info->isDown()) { - // Down sim. Show the blue circle of death! - LLWorldMap::getInstance()->mIsTrackingUnknownLocation = TRUE; - LLWorldMap::getInstance()->mUnknownLocation = pos_global; - LLWorldMap::getInstance()->mInvalidLocation = TRUE; + // Down region. Show the blue circle of death! + // i.e. let the world map that this and tell it it's invalid + LLWorldMap::getInstance()->setTracking(pos_global); + LLWorldMap::getInstance()->setTrackingInvalid(); LLTracker::stopTracking(NULL); setDefaultBtn(""); return; } - std::string sim_name; - LLWorldMap::getInstance()->simNameFromPosGlobal( pos_global, sim_name ); + std::string sim_name = sim_info->getName(); 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 ); std::string full_name = llformat("%s (%d, %d, %d)", @@ -633,9 +624,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) std::string tooltip(""); mTrackedStatus = LLTracker::TRACKING_LOCATION; LLTracker::trackLocation(pos_global, full_name, tooltip); - LLWorldMap::getInstance()->mIsTrackingUnknownLocation = FALSE; - LLWorldMap::getInstance()->mIsTrackingDoubleClick = FALSE; - LLWorldMap::getInstance()->mIsTrackingCommit = FALSE; + LLWorldMap::getInstance()->cancelTracking(); // The floater is taking over the tracking setDefaultBtn("Teleport"); } @@ -748,9 +737,9 @@ void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S3 // pass sim name to combo box gFloaterWorldMap->mCompletingRegionName = region_name; - LLWorldMap::getInstance()->sendNamedRegionRequest(region_name); + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name); LLStringUtil::toLower(gFloaterWorldMap->mCompletingRegionName); - LLWorldMap::getInstance()->mIsTrackingCommit = TRUE; + LLWorldMap::getInstance()->setTrackingCommit(); } } @@ -817,19 +806,12 @@ void LLFloaterWorldMap::buildAvatarIDList() // Delete all but the "None" entry S32 list_size = list->getItemCount(); - while (list_size > 1) + if (list_size > 1) { - list->selectNthItem(1); + list->selectItemRange(1, -1); list->operateOnSelection(LLCtrlListInterface::OP_DELETE); - --list_size; } - LLSD default_column; - default_column["name"] = "friend name"; - default_column["label"] = "Friend Name"; - default_column["width"] = 500; - list->addColumn(default_column); - // Get all of the calling cards for avatar that are currently online LLCollectMappableBuddies collector; LLAvatarTracker::instance().applyFunctor(collector); @@ -850,10 +832,7 @@ void LLFloaterWorldMap::buildAvatarIDList() void LLFloaterWorldMap::buildLandmarkIDLists() { LLCtrlListInterface *list = childGetListInterface("landmark combo"); - if (!list) - { - return; - } + if (!list) return; // Delete all but the "None" entry S32 list_size = list->getItemCount(); @@ -894,7 +873,6 @@ void LLFloaterWorldMap::buildLandmarkIDLists() mLandmarkAssetIDList.put( item->getAssetUUID() ); mLandmarkItemIDList.put( item->getUUID() ); } - list->sortByColumn(std::string("landmark name"), TRUE); list->selectFirstItem(); } @@ -931,7 +909,7 @@ void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui) { childSetValue("spin z", 0); } - LLWorldMap::getInstance()->mIsTrackingCommit = FALSE; + LLWorldMap::getInstance()->cancelTracking(); mCompletingRegionName = ""; } @@ -967,18 +945,16 @@ void LLFloaterWorldMap::clearAvatarSelection(BOOL clear_ui) // can see the whole world, plus a little. void LLFloaterWorldMap::adjustZoomSliderBounds() { - // World size in regions - S32 world_width_regions = LLWorldMap::getInstance()->getWorldWidth() / REGION_WIDTH_UNITS; - S32 world_height_regions = LLWorldMap::getInstance()->getWorldHeight() / REGION_WIDTH_UNITS; - - // Pad the world size a little bit, so we have a nice border on - // the edge - world_width_regions++; - world_height_regions++; + // Merov: we switched from using the "world size" (which varies depending where the user went) to a fixed + // width of 512 regions max visible at a time. This makes the zoom slider works in a consistent way across + // sessions and doesn't prevent the user to pan the world if it was to grow a lot beyond that limit. + // Currently (01/26/09), this value allows the whole grid to be visible in a 1024x1024 window. + S32 world_width_regions = MAX_VISIBLE_REGIONS; + S32 world_height_regions = MAX_VISIBLE_REGIONS; // Find how much space we have to display the world LLWorldMapView* map_panel; - map_panel = (LLWorldMapView*)mTabs->getCurrentPanel(); + map_panel = (LLWorldMapView*)mPanel; LLRect view_rect = map_panel->getRect(); // View size in pixels @@ -1191,15 +1167,15 @@ void LLFloaterWorldMap::onLocationCommit() LLStringUtil::toLower(str); mCompletingRegionName = str; - LLWorldMap::getInstance()->mIsTrackingCommit = TRUE; + LLWorldMap::getInstance()->setTrackingCommit(); if (str.length() >= 3) { - LLWorldMap::getInstance()->sendNamedRegionRequest(str); + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(str); } else { str += "#"; - LLWorldMap::getInstance()->sendNamedRegionRequest(str); + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(str); } } @@ -1207,8 +1183,8 @@ void LLFloaterWorldMap::onClearBtn() { mTrackedStatus = LLTracker::TRACKING_NOTHING; LLTracker::stopTracking((void *)(intptr_t)TRUE); - LLWorldMap::getInstance()->mIsTrackingUnknownLocation = FALSE; - mSLURL = ""; // Clear the SLURL since it's invalid + LLWorldMap::getInstance()->cancelTracking(); + mSLURL = ""; // Clear the SLURL since it's invalid mSetToUserPosition = TRUE; // Revert back to the current user position } @@ -1260,9 +1236,9 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate) pos_global = LLTracker::getTrackedPositionGlobal() - gAgent.getCameraPositionGlobal(); } } - else if(LLWorldMap::getInstance()->mIsTrackingUnknownLocation) + else if(LLWorldMap::getInstance()->isTracking()) { - pos_global = LLWorldMap::getInstance()->mUnknownLocation - gAgent.getCameraPositionGlobal();; + pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal() - gAgent.getCameraPositionGlobal();; } else { @@ -1270,8 +1246,8 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate) pos_global.clearVec(); } - LLWorldMapView::setPan( -llfloor((F32)(pos_global.mdV[VX] * (F64)LLWorldMapView::sPixelsPerMeter)), - -llfloor((F32)(pos_global.mdV[VY] * (F64)LLWorldMapView::sPixelsPerMeter)), + LLWorldMapView::setPan( -llfloor((F32)(pos_global.mdV[VX] * (F64)LLWorldMapView::sMapScale / REGION_WIDTH_METERS)), + -llfloor((F32)(pos_global.mdV[VY] * (F64)LLWorldMapView::sMapScale / REGION_WIDTH_METERS)), !animate); mWaitingForTracker = FALSE; } @@ -1429,13 +1405,6 @@ void LLFloaterWorldMap::flyToAvatar() } } -void LLFloaterWorldMap::onCommitBackground() -{ - // Find my index - S32 index = mTabs->getCurrentPanelIndex(); - LLWorldMap::getInstance()->setCurrentLayer(index); -} - void LLFloaterWorldMap::updateSims(bool found_null_sim) { if (mCompletingRegionName == "") @@ -1452,24 +1421,23 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) S32 num_results = 0; std::map<U64, LLSimInfo*>::const_iterator it; - for (it = LLWorldMap::getInstance()->mSimInfoMap.begin(); it != LLWorldMap::getInstance()->mSimInfoMap.end(); ++it) + for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it) { - LLSimInfo* info = (*it).second; - std::string sim_name = info->mName; - std::string sim_name_lower = sim_name; + LLSimInfo* info = it->second; + std::string sim_name_lower = info->getName(); LLStringUtil::toLower(sim_name_lower); if (sim_name_lower.substr(0, name_length) == mCompletingRegionName) { if (sim_name_lower == mCompletingRegionName) { - match = sim_name; + match = info->getName(); } LLSD value; - value["id"] = sim_name; + value["id"] = info->getName(); value["columns"][0]["column"] = "sim_name"; - value["columns"][0]["value"] = sim_name; + value["columns"][0]["value"] = info->getName(); list->addElement(value); num_results++; } @@ -1526,15 +1494,13 @@ void LLFloaterWorldMap::onCommitSearchResult() LLStringUtil::toLower(sim_name); std::map<U64, LLSimInfo*>::const_iterator it; - for (it = LLWorldMap::getInstance()->mSimInfoMap.begin(); it != LLWorldMap::getInstance()->mSimInfoMap.end(); ++it) + for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it) { - LLSimInfo* info = (*it).second; - std::string info_sim_name = info->mName; - LLStringUtil::toLower(info_sim_name); + LLSimInfo* info = it->second; - if (sim_name == info_sim_name) + if (info->isName(sim_name)) { - LLVector3d pos_global = from_region_handle( info->mHandle ); + LLVector3d pos_global = info->getGlobalOrigin(); F64 local_x = childGetValue("spin x"); F64 local_y = childGetValue("spin y"); F64 local_z = childGetValue("spin z"); diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index 20a8e6d321..7feebb583d 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -96,7 +96,7 @@ public: static const LLUUID& getHomeID() { return sHomeID; } // A z_attenuation of 0.0f collapses the distance into the X-Y plane - F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const; + F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const; void clearLocationSelection(BOOL clear_ui = FALSE); void clearAvatarSelection(BOOL clear_ui = FALSE); @@ -121,8 +121,6 @@ protected: void onAvatarComboPrearrange(); void onAvatarComboCommit(); - void onCommitBackground(); - void onComboTextEntry( ); void onSearchTextEntry( LLLineEditor* ctrl ); @@ -155,10 +153,10 @@ protected: void cacheLandmarkPosition(); -protected: - LLTabContainer* mTabs; +private: + LLPanel* mPanel; // Panel displaying the map - // Sets gMapScale, in pixels per region + // Ties to LLWorldMapView::sMapScale, in pixels per region F32 mCurZoomVal; LLFrameTimer mZoomTimer; diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index a963c96da4..7863c373c6 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -55,6 +55,7 @@ #include "llviewermenu.h" #include "lluictrlfactory.h" #include "llviewercontrol.h" +#include "llviewerfoldertype.h" #include "llviewerwindow.h" #include "llvoavatar.h" #include "llfloaterproperties.h" @@ -1108,7 +1109,7 @@ void LLFolderView::propertiesSelectedItems( void ) } } -void LLFolderView::changeType(LLInventoryModel *model, LLAssetType::EType new_folder_type) +void LLFolderView::changeType(LLInventoryModel *model, LLFolderType::EType new_folder_type) { LLFolderBridge *folder_bridge = LLFolderBridge::sSelf; @@ -1958,7 +1959,7 @@ bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) if (action.length() > change_folder_string.length() && (action.compare(0,change_folder_string.length(),"change_folder_type_") == 0)) { - LLAssetType::EType new_folder_type = LLFolderType::lookupTypeFromXUIName(action.substr(change_folder_string.length())); + LLFolderType::EType new_folder_type = LLViewerFolderType::lookupTypeFromXUIName(action.substr(change_folder_string.length())); changeType(model, new_folder_type); return true; } diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index ebfb4efde2..0bd65b5f90 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -192,7 +192,7 @@ public: void propertiesSelectedItems( void ); // change the folder type - void changeType(LLInventoryModel *model, LLAssetType::EType new_folder_type); + void changeType(LLInventoryModel *model, LLFolderType::EType new_folder_type); void autoOpenItem(LLFolderViewFolder* item); void closeAutoOpenedFolders(); diff --git a/indra/newview/llfoldervieweventlistener.h b/indra/newview/llfoldervieweventlistener.h index ff38da279a..60ece75cea 100644 --- a/indra/newview/llfoldervieweventlistener.h +++ b/indra/newview/llfoldervieweventlistener.h @@ -32,6 +32,7 @@ #define LLFOLDERVIEWEVENTLISTENER_H #include "lldarray.h" // JAMESDEBUG convert to std::vector +#include "llfoldertype.h" #include "llfontgl.h" // just for StyleFlags enum #include "llpointer.h" @@ -57,7 +58,7 @@ public: virtual const LLUUID& getUUID() const = 0; virtual time_t getCreationDate() const = 0; // UTC seconds virtual PermissionMask getPermissionMask() const = 0; - virtual LLAssetType::EType getPreferredType() const = 0; + virtual LLFolderType::EType getPreferredType() const = 0; virtual LLPointer<LLUIImage> getIcon() const = 0; virtual LLFontGL::StyleFlags getLabelStyle() const = 0; virtual std::string getLabelSuffix() const = 0; diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index f83a426cda..6fdaefd21a 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -248,13 +248,13 @@ void LLFolderViewItem::refreshFromListener() if(mListener) { mLabel = mListener->getDisplayName(); - LLAssetType::EType preferred_type = mListener->getPreferredType(); + LLFolderType::EType preferred_type = mListener->getPreferredType(); // *TODO: to be removed when database supports multi language. This is a // temporary attempt to display the inventory folder in the user locale. // mantipov: *NOTE: be sure this code is synchronized with LLFriendCardsManager::findChildFolderUUID // it uses the same way to find localized string - if (LLAssetType::lookupIsProtectedCategoryType(preferred_type)) + if (LLFolderType::lookupIsProtectedType(preferred_type)) { LLTrans::findString(mLabel, "InvFolder " + mLabel); }; @@ -1753,7 +1753,7 @@ bool LLFolderViewFolder::isTrash() const { if (mAmTrash == LLFolderViewFolder::UNKNOWN) { - mAmTrash = mListener->getUUID() == gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH, false) ? LLFolderViewFolder::TRASH : LLFolderViewFolder::NOT_TRASH; + mAmTrash = mListener->getUUID() == gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH, false) ? LLFolderViewFolder::TRASH : LLFolderViewFolder::NOT_TRASH; } return mAmTrash == LLFolderViewFolder::TRASH; } @@ -2167,7 +2167,7 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) { const LLUUID &cat_uuid = getListener()->getUUID(); const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_uuid); - if (cat && cat->getPreferredType() == LLAssetType::AT_OUTFIT) + if (cat && cat->getPreferredType() == LLFolderType::FT_OUTFIT) { getListener()->performAction(NULL, NULL,"replaceoutfit"); return TRUE; @@ -2490,7 +2490,7 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde && b->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK) { - static LLUUID favorites_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE); + static const LLUUID& favorites_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); LLUUID a_uuid = a->getParentFolder()->getListener()->getUUID(); LLUUID b_uuid = b->getParentFolder()->getListener()->getUUID(); diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index fbcaeee01f..c956657825 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -91,8 +91,44 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect return LLUUID::null; } + +// LLViewerInventoryCategory::fetchDescendents has it own period of fetching. +// for now it is FETCH_TIMER_EXPIRY = 10.0f; So made our period a bit more. +const F32 FETCH_FRIENDS_DESCENDENTS_PERIOD = 11.0f; + + +/** + * Intended to call passed callback after the specified period of time. + * + * Implemented to fix an issue when Inventory folders are in incomplete state. See EXT-2061, EXT-1935, EXT-813. + * For now it uses to periodically sync Inventory Friends/All folder with a Agent's Friends List + * until it is complete. + */ +class FriendListUpdater : public LLEventTimer +{ +public: + typedef boost::function<bool()> callback_t; + + FriendListUpdater(callback_t cb, F32 period) + : LLEventTimer(period) + , mCallback(cb) + { + mEventTimer.start(); + } + + virtual BOOL tick() // from LLEventTimer + { + return mCallback(); + } + +private: + callback_t mCallback; +}; + + // LLFriendCardsManager Constructor / Destructor LLFriendCardsManager::LLFriendCardsManager() +: mFriendsAllFolderCompleted(true) { LLAvatarTracker::instance().addObserver(this); } @@ -135,14 +171,14 @@ const LLUUID LLFriendCardsManager::extractAvatarID(const LLUUID& avatarID) // and this method must be called before any actions with friend list void LLFriendCardsManager::ensureFriendFoldersExist() { - LLUUID callingCardsFolderID = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); + const LLUUID callingCardsFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); LLUUID friendFolderUUID = findFriendFolderUUIDImpl(); if (friendFolderUUID.isNull()) { friendFolderUUID = gInventory.createNewCategory(callingCardsFolderID, - LLAssetType::AT_CALLINGCARD, get_friend_folder_name()); + LLFolderType::FT_CALLINGCARD, get_friend_folder_name()); } LLUUID friendAllSubfolderUUID = findFriendAllSubfolderUUIDImpl(); @@ -150,7 +186,7 @@ void LLFriendCardsManager::ensureFriendFoldersExist() if (friendAllSubfolderUUID.isNull()) { friendAllSubfolderUUID = gInventory.createNewCategory(friendFolderUUID, - LLAssetType::AT_CALLINGCARD, get_friend_all_subfolder_name()); + LLFolderType::FT_CALLINGCARD, get_friend_all_subfolder_name()); } } @@ -269,7 +305,7 @@ bool LLFriendCardsManager::isAnyFriendCategory(const LLUUID& catID) const return TRUE == gInventory.isObjectDescendentOf(catID, friendFolderID); } -void LLFriendCardsManager::syncFriendsFolder() +bool LLFriendCardsManager::syncFriendsFolder() { //lets create "Friends" and "Friends/All" in the Inventory "Calling Cards" if they are absent LLFriendCardsManager::instance().ensureFriendFoldersExist(); @@ -297,11 +333,35 @@ void LLFriendCardsManager::syncFriendsFolder() // 2. Add missing Friend Cards for friends LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); llinfos << "try to build friends, count: " << all_buddies.size() << llendl; + mFriendsAllFolderCompleted = true; for(; buddy_it != all_buddies.end(); ++buddy_it) { const LLUUID& buddy_id = (*buddy_it).first; addFriendCardToInventory(buddy_id); } + + if (!mFriendsAllFolderCompleted) + { + forceFriendListIsLoaded(findFriendAllSubfolderUUIDImpl()); + + static bool timer_started = false; + if (!timer_started) + { + lldebugs << "Create and start timer to sync Inventory Friends All folder with Friends list" << llendl; + + // do not worry about destruction of the FriendListUpdater. + // It will be deleted by LLEventTimer::updateClass when FriendListUpdater::tick() returns true. + new FriendListUpdater(boost::bind(&LLFriendCardsManager::syncFriendsFolder, this), + FETCH_FRIENDS_DESCENDENTS_PERIOD); + } + timer_started = true; + } + else + { + lldebugs << "Friends/All Inventory folder is synchronized with the Agent's Friends List" << llendl; + } + + return mFriendsAllFolderCompleted; } void LLFriendCardsManager::collectFriendsLists(folderid_buddies_map_t& folderBuddiesMap) const @@ -351,7 +411,7 @@ void LLFriendCardsManager::collectFriendsLists(folderid_buddies_map_t& folderBud /************************************************************************/ const LLUUID& LLFriendCardsManager::findFriendFolderUUIDImpl() const { - LLUUID callingCardsFolderID = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); + const LLUUID callingCardsFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); std::string friendFolderName = get_friend_folder_name(); @@ -461,7 +521,9 @@ bool LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID) LLUUID friendListFolderID = findFriendAllSubfolderUUIDImpl(); if (shouldBeAdded && !invModel->isCategoryComplete(friendListFolderID)) { + mFriendsAllFolderCompleted = false; shouldBeAdded = false; + lldebugs << "Friends/All category is not completed" << llendl; } if (shouldBeAdded) { @@ -520,4 +582,11 @@ void LLFriendCardsManager::onFriendListUpdate(U32 changed_mask) } } +void LLFriendCardsManager::forceFriendListIsLoaded(const LLUUID& folder_id) const +{ + bool fetching_inventory = gInventory.fetchDescendentsOf(folder_id); + lldebugs << "Trying to fetch descendants of Friends/All Inventory folder, fetched: " + << fetching_inventory << llendl; +} + // EOF diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h index 6ada342831..feea05bc1d 100644 --- a/indra/newview/llfriendcard.h +++ b/indra/newview/llfriendcard.h @@ -89,8 +89,10 @@ public: /** * Synchronizes content of the Calling Card/Friends/All Global Inventory folder with Agent's Friend List + * + * @return true - if folder is already synchronized, false otherwise. */ - void syncFriendsFolder(); + bool syncFriendsFolder(); /*! * \brief @@ -144,11 +146,20 @@ private: void onFriendListUpdate(U32 changed_mask); + /** + * Force fetching of the Inventory folder specified by passed folder's LLUUID. + * + * It only sends request to server, server reply should be processed in other place. + * Because request can be sent via UDP we need to periodically check if request was completed with success. + */ + void forceFriendListIsLoaded(const LLUUID& folder_id) const; + private: typedef std::set<LLUUID> avatar_uuid_set_t; avatar_uuid_set_t mBuddyIDSet; + bool mFriendsAllFolderCompleted; }; #endif // LL_LLFRIENDCARD_H diff --git a/indra/newview/llhudview.cpp b/indra/newview/llhudview.cpp index 027cd2ab07..261d9f1df7 100644 --- a/indra/newview/llhudview.cpp +++ b/indra/newview/llhudview.cpp @@ -71,20 +71,6 @@ void LLHUDView::draw() LLView::draw(); } - -// public -const LLColor4& LLHUDView::colorFromType(S32 type) -{ - switch (type) - { - case 0: - return LLColor4::green; - default: - return LLColor4::black; - } -} - - /*virtual*/ BOOL LLHUDView::handleMouseDown(S32 x, S32 y, MASK mask) { diff --git a/indra/newview/llhudview.h b/indra/newview/llhudview.h index 05ff9c8596..0946e2c5c8 100644 --- a/indra/newview/llhudview.h +++ b/indra/newview/llhudview.h @@ -47,8 +47,6 @@ public: virtual void draw(); - const LLColor4& colorFromType(S32 type); - protected: /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); }; diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index dee86f4a22..85863ed85b 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -106,6 +106,8 @@ void LLIMFloater::onFocusReceived() // virtual void LLIMFloater::onClose(bool app_quitting) { + if (!gIMMgr->hasSession(mSessionID)) return; + setTyping(false); gIMMgr->leaveSession(mSessionID); } @@ -223,6 +225,7 @@ BOOL LLIMFloater::postBuild() // enable line history support for instant message bar mInputEditor->setEnableLineHistory(TRUE); + mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) ); mInputEditor->setFocusLostCallback( boost::bind(onInputEditorFocusLost, _1, this) ); mInputEditor->setKeystrokeCallback( onInputEditorKeystroke, this ); @@ -230,11 +233,17 @@ BOOL LLIMFloater::postBuild() mInputEditor->setRevertOnEsc( FALSE ); mInputEditor->setReplaceNewlinesWithSpaces( FALSE ); + std::string session_name(LLIMModel::instance().getName(mSessionID)); + + mInputEditor->setLabel(mInputEditor->getLabel() + " " + session_name); + + LLStringUtil::toUpper(session_name); + setTitle(session_name); + childSetCommitCallback("chat_editor", onSendMsg, this); mChatHistory = getChild<LLChatHistory>("chat_history"); - - setTitle(LLIMModel::instance().getName(mSessionID)); + setDocked(true); mTypingStart = LLTrans::getString("IM_typing_start_string"); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 66a3e3e85c..7e8701bf21 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1604,7 +1604,6 @@ LLUUID LLIMMgr::addSession( LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids); } - LLIMFloater::show(session_id); //*TODO remove this "floater" thing when Communicate Floater's gone LLFloaterIMPanel* floater = findFloaterBySession(session_id); diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index bfad2b1624..9989a3b473 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -188,7 +188,8 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) { mCommitCallbackRegistrar.add("InspectAvatar.ViewProfile", boost::bind(&LLInspectAvatar::onClickViewProfile, this)); mCommitCallbackRegistrar.add("InspectAvatar.AddFriend", boost::bind(&LLInspectAvatar::onClickAddFriend, this)); - mCommitCallbackRegistrar.add("InspectAvatar.IM", boost::bind(&LLInspectAvatar::onClickIM, this)); + mCommitCallbackRegistrar.add("InspectAvatar.IM", + boost::bind(&LLInspectAvatar::onClickIM, this)); mCommitCallbackRegistrar.add("InspectAvatar.Teleport", boost::bind(&LLInspectAvatar::onClickTeleport, this)); mCommitCallbackRegistrar.add("InspectAvatar.InviteToGroup", boost::bind(&LLInspectAvatar::onClickInviteToGroup, this)); mCommitCallbackRegistrar.add("InspectAvatar.Pay", boost::bind(&LLInspectAvatar::onClickPay, this)); @@ -306,7 +307,21 @@ void LLInspectAvatar::requestUpdate() // You can't re-add someone as a friend if they are already your friend bool is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarID) != NULL; bool is_self = (mAvatarID == gAgentID); - childSetEnabled("add_friend_btn", !is_friend && !is_self); + if (is_self) + { + getChild<LLUICtrl>("add_friend_btn")->setVisible(false); + getChild<LLUICtrl>("im_btn")->setVisible(false); + } + else if (is_friend) + { + getChild<LLUICtrl>("add_friend_btn")->setVisible(false); + getChild<LLUICtrl>("im_btn")->setVisible(true); + } + else + { + getChild<LLUICtrl>("add_friend_btn")->setVisible(true); + getChild<LLUICtrl>("im_btn")->setVisible(false); + } // Use an avatar_icon even though the image id will come down with the // avatar properties because the avatar_icon code maintains a cache of icons diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 050a61c79b..e3780f93ff 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -112,6 +112,7 @@ private: LLUUID mObjectID; S32 mObjectFace; viewer_media_t mMediaImpl; + LLMediaEntry* mMediaEntry; LLSafeHandle<LLObjectSelection> mObjectSelection; }; @@ -120,7 +121,8 @@ LLInspectObject::LLInspectObject(const LLSD& sd) mObjectID(NULL), // set in onOpen() mObjectFace(0), mObjectSelection(NULL), - mMediaImpl(NULL) + mMediaImpl(NULL), + mMediaEntry(NULL) { // can't make the properties request until the widgets are constructed // as it might return immediately, so do it in postBuild. @@ -231,11 +233,11 @@ void LLInspectObject::onOpen(const LLSD& data) if (!tep) return; - const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL; - if(!mep) + mMediaEntry = tep->hasMedia() ? tep->getMediaData() : NULL; + if(!mMediaEntry) return; - mMediaImpl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); + mMediaImpl = LLViewerMedia::getMediaImplFromTextureID(mMediaEntry->getMediaID()); } } @@ -282,11 +284,11 @@ void LLInspectObject::update() if (!tep) return; - const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL; - if(!mep) + mMediaEntry = tep->hasMedia() ? tep->getMediaData() : NULL; + if(!mMediaEntry) return; - mMediaImpl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); + mMediaImpl = LLViewerMedia::getMediaImplFromTextureID(mMediaEntry->getMediaID()); updateMediaCurrentURL(); updateSecureBrowsing(); @@ -430,14 +432,17 @@ void LLInspectObject::updateDescription(LLSelectNode* nodep) void LLInspectObject::updateMediaCurrentURL() { + if(!mMediaEntry) + return; LLTextBox* textbox = getChild<LLTextBox>("object_media_url"); std::string media_url = ""; textbox->setValue(media_url); textbox->setToolTip(media_url); + LLStringUtil::format_map_t args; if(mMediaImpl.notNull() && mMediaImpl->hasMedia()) { - LLStringUtil::format_map_t args; + LLPluginClassMedia* media_plugin = NULL; media_plugin = mMediaImpl->getMediaPlugin(); if(media_plugin) @@ -451,15 +456,17 @@ void LLInspectObject::updateMediaCurrentURL() args["[CurrentURL]"] = media_plugin->getLocation(); } media_url = LLTrans::getString("CurrentURL", args); - textbox->setText(media_url); - textbox->setToolTip(media_url); + } } - else + else if(mMediaEntry->getCurrentURL() != "") { - textbox->setText(media_url); - textbox->setToolTip(media_url); + args["[CurrentURL]"] = mMediaEntry->getCurrentURL(); + media_url = LLTrans::getString("CurrentURL", args); } + + textbox->setText(media_url); + textbox->setToolTip(media_url); } void LLInspectObject::updateCreator(LLSelectNode* nodep) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 9c7be2fcf5..dbc12f0617 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -78,6 +78,7 @@ #include "llscrollcontainer.h"
#include "llimview.h"
#include "lltooldraganddrop.h"
+#include "llviewerfoldertype.h"
#include "llviewertexturelist.h"
#include "llviewerinventory.h"
#include "llviewerobjectlist.h"
@@ -85,6 +86,7 @@ #include "llvoavatar.h"
#include "llwearable.h"
#include "llwearablelist.h"
+#include "llviewerassettype.h"
#include "llviewermessage.h"
#include "llviewerregion.h"
#include "llvoavatarself.h"
@@ -202,9 +204,9 @@ PermissionMask LLInvFVBridge::getPermissionMask() const }
// virtual
-LLAssetType::EType LLInvFVBridge::getPreferredType() const
+LLFolderType::EType LLInvFVBridge::getPreferredType() const
{
- return LLAssetType::AT_NONE;
+ return LLFolderType::FT_NONE;
}
@@ -339,7 +341,7 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener* LLInventoryModel* model = getInventoryModel();
if(!model) return;
LLMessageSystem* msg = gMessageSystem;
- LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
LLViewerInventoryItem* item = NULL;
LLViewerInventoryCategory* cat = NULL;
std::vector<LLUUID> move_ids;
@@ -504,7 +506,7 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const }
}
const LLViewerInventoryCategory *cat = model->getCategory(objects.get(i));
- if (cat && !LLAssetType::lookupCanLink(cat->getPreferredType()))
+ if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
{
return FALSE;
}
@@ -645,7 +647,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const if(obj)
{
- *type = LLAssetType::lookupDragAndDropType(obj->getActualType());
+ *type = LLViewerAssetType::lookupDragAndDropType(obj->getActualType());
if(*type == DAD_NONE)
{
return FALSE;
@@ -686,7 +688,7 @@ BOOL LLInvFVBridge::isInTrash() const {
LLInventoryModel* model = getInventoryModel();
if(!model) return FALSE;
- const LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
return model->isObjectDescendentOf(mUUID, trash_id);
}
@@ -699,7 +701,7 @@ BOOL LLInvFVBridge::isLinkedObjectInTrash() const {
LLInventoryModel* model = getInventoryModel();
if(!model) return FALSE;
- const LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
return model->isObjectDescendentOf(obj->getLinkedUUID(), trash_id);
}
return FALSE;
@@ -717,7 +719,7 @@ BOOL LLInvFVBridge::isCOFFolder() const {
const LLInventoryModel* model = getInventoryModel();
if(!model) return TRUE;
- const LLUUID cof_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT);
+ const LLUUID cof_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
if (mUUID == cof_id || model->isObjectDescendentOf(mUUID, cof_id))
{
return TRUE;
@@ -1044,7 +1046,7 @@ void LLItemBridge::restoreItem() if(item)
{
LLInventoryModel* model = getInventoryModel();
- const LLUUID new_parent = model->findCategoryUUIDForType(item->getType());
+ const LLUUID new_parent = model->findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(item->getType()));
// do not restamp on restore.
LLInvFVBridge::changeItemParent(model, item, new_parent, FALSE);
}
@@ -1077,7 +1079,7 @@ void LLItemBridge::restoreToWorld() }
// Check if it's in the trash. (again similar to the normal rez logic)
- const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
if(gInventory.isObjectDescendentOf(itemp->getUUID(), trash_id))
{
remove_from_inventory = TRUE;
@@ -1272,7 +1274,7 @@ BOOL LLItemBridge::removeItem() LLPreview::hide(mUUID, TRUE);
LLInventoryModel* model = getInventoryModel();
if(!model) return FALSE;
- LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
LLViewerInventoryItem* item = getItem();
// if item is not already in trash
@@ -1365,7 +1367,7 @@ BOOL LLFolderBridge::isItemMovable() const LLInventoryObject* obj = getInventoryObject();
if(obj)
{
- return (!LLAssetType::lookupIsProtectedCategoryType(((LLInventoryCategory*)obj)->getPreferredType()));
+ return (!LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)obj)->getPreferredType()));
}
return FALSE;
}
@@ -1401,7 +1403,7 @@ BOOL LLFolderBridge::isItemRemovable() return FALSE;
}
- if(LLAssetType::lookupIsProtectedCategoryType(category->getPreferredType()))
+ if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
{
return FALSE;
}
@@ -1414,7 +1416,7 @@ BOOL LLFolderBridge::isItemRemovable() for( i = 0; i < descendent_categories.count(); i++ )
{
LLInventoryCategory* category = descendent_categories[i];
- if(LLAssetType::lookupIsProtectedCategoryType(category->getPreferredType()))
+ if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
{
return FALSE;
}
@@ -1591,20 +1593,20 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLUUID& cat_id = inv_cat->getUUID();
// Is the destination the trash?
- const LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
BOOL move_is_into_trash = (mUUID == trash_id)
|| model->isObjectDescendentOf(mUUID, trash_id);
- BOOL is_movable = (!LLAssetType::lookupIsProtectedCategoryType(inv_cat->getPreferredType()));
- LLUUID current_outfit_id = model->findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT);
+ BOOL is_movable = (!LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType()));
+ const LLUUID current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
- BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLAssetType::AT_OUTFIT);
+ BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
if (move_is_into_current_outfit || move_is_into_outfit)
{
// BAP - restrictions?
is_movable = true;
}
- if (mUUID == gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE))
+ if (mUUID == gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE))
{
is_movable = FALSE; // It's generally movable but not into Favorites folder. EXT-1604
}
@@ -1616,7 +1618,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, for( i = 0; i < descendent_categories.count(); i++ )
{
LLInventoryCategory* category = descendent_categories[i];
- if(LLAssetType::lookupIsProtectedCategoryType(category->getPreferredType()))
+ if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
{
// ...can't move "special folders" like Textures
is_movable = FALSE;
@@ -1849,8 +1851,8 @@ bool LLFindCOFValidItems::operator()(LLInventoryCategory* cat, LLViewerInventoryCategory *linked_category = ((LLViewerInventoryItem*)item)->getLinkedCategory(); // BAP - safe?
// BAP remove AT_NONE support after ensembles are fully working?
return (linked_category &&
- ((linked_category->getPreferredType() == LLAssetType::AT_NONE) ||
- (LLAssetType::lookupIsEnsembleCategoryType(linked_category->getPreferredType()))));
+ ((linked_category->getPreferredType() == LLFolderType::FT_NONE) ||
+ (LLFolderType::lookupIsEnsembleType(linked_category->getPreferredType()))));
}
}
@@ -2152,7 +2154,7 @@ void LLFolderBridge::determineFolderType() BOOL LLFolderBridge::isItemRenameable() const
{
LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)getCategory();
- if(cat && !LLAssetType::lookupIsProtectedCategoryType(cat->getPreferredType())
+ if(cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType())
&& (cat->getOwnerID() == gAgent.getID()))
{
return TRUE;
@@ -2167,15 +2169,15 @@ void LLFolderBridge::restoreItem() if(cat)
{
LLInventoryModel* model = getInventoryModel();
- LLUUID new_parent = model->findCategoryUUIDForType(cat->getType());
+ const LLUUID new_parent = model->findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(cat->getType()));
// do not restamp children on restore
LLInvFVBridge::changeCategoryParent(model, cat, new_parent, FALSE);
}
}
-LLAssetType::EType LLFolderBridge::getPreferredType() const
+LLFolderType::EType LLFolderBridge::getPreferredType() const
{
- LLAssetType::EType preferred_type = LLAssetType::AT_NONE;
+ LLFolderType::EType preferred_type = LLFolderType::FT_NONE;
LLViewerInventoryCategory* cat = getCategory();
if(cat)
{
@@ -2188,7 +2190,7 @@ LLAssetType::EType LLFolderBridge::getPreferredType() const // Icons for folders are based on the preferred type
LLUIImagePtr LLFolderBridge::getIcon() const
{
- LLAssetType::EType preferred_type = LLAssetType::AT_NONE;
+ LLFolderType::EType preferred_type = LLFolderType::FT_NONE;
LLViewerInventoryCategory* cat = getCategory();
if(cat)
{
@@ -2197,7 +2199,7 @@ LLUIImagePtr LLFolderBridge::getIcon() const return getIcon(preferred_type);
}
-LLUIImagePtr LLFolderBridge::getIcon(LLAssetType::EType preferred_type)
+LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type)
{
// we only have one folder image now
return LLUI::getUIImage("Inv_FolderClosed");
@@ -2236,7 +2238,7 @@ BOOL LLFolderBridge::removeItem() LLInventoryModel* model = getInventoryModel();
if(!model) return FALSE;
- LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
// Look for any gestures and deactivate them
LLInventoryModel::cat_array_t descendent_categories;
@@ -2354,11 +2356,11 @@ void LLFolderBridge::folderOptionsMenu() if(!model) return;
const LLInventoryCategory* category = model->getCategory(mUUID);
- LLAssetType::EType type = category->getPreferredType();
- const bool is_default_folder = category && LLAssetType::lookupIsProtectedCategoryType(type);
+ LLFolderType::EType type = category->getPreferredType();
+ const bool is_default_folder = category && LLFolderType::lookupIsProtectedType(type);
// BAP change once we're no longer treating regular categories as ensembles.
- const bool is_ensemble = category && (type == LLAssetType::AT_NONE ||
- LLAssetType::lookupIsEnsembleCategoryType(type));
+ const bool is_ensemble = category && (type == LLFolderType::FT_NONE ||
+ LLFolderType::lookupIsEnsembleType(type));
// calling card related functionality for folders.
@@ -2424,8 +2426,8 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) // std::vector<std::string> disabled_items;
LLInventoryModel* model = getInventoryModel();
if(!model) return;
- LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
- LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND);
+ const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
+ const LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
mItems.clear(); //adding code to clear out member Items (which means Items should not have other data here at this point)
mDisabledItems.clear(); //adding code to clear out disabled members from previous
@@ -2455,7 +2457,6 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else if(isAgentInventory()) // do not allow creating in library
{
LLViewerInventoryCategory *cat = getCategory();
-
// BAP removed protected check to re-enable standard ops in untyped folders.
// Not sure what the right thing is to do here.
if (!isCOFFolder() && cat /*&&
@@ -2472,7 +2473,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) mItems.push_back(std::string("Change Type"));
LLViewerInventoryCategory *cat = getCategory();
- if (cat && LLAssetType::lookupIsProtectedCategoryType(cat->getPreferredType()))
+ if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
{
mDisabledItems.push_back(std::string("Change Type"));
}
@@ -2482,7 +2483,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else
{
// Want some but not all of the items from getClipboardEntries for outfits.
- if (cat && cat->getPreferredType()==LLAssetType::AT_OUTFIT)
+ if (cat && cat->getPreferredType()==LLFolderType::FT_OUTFIT)
{
mItems.push_back(std::string("Rename"));
mItems.push_back(std::string("Delete"));
@@ -2618,7 +2619,7 @@ void LLFolderBridge::createNewCategory(void* user_data) if(!model) return;
LLUUID id;
id = model->createNewCategory(bridge->getUUID(),
- LLAssetType::AT_NONE,
+ LLFolderType::FT_NONE,
LLStringUtil::null);
model->notifyObservers();
@@ -2703,7 +2704,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(LLUUID parent_id, EWearableType type)
+void LLFolderBridge::createWearable(const LLUUID &parent_id, EWearableType type)
{
LLWearable* wearable = LLWearableList::instance().createNewWearable(type);
LLAssetType::EType asset_type = wearable->getAssetType();
@@ -2846,17 +2847,17 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, break;
case LLAssetType::AT_CATEGORY:
- is_movable = !LLAssetType::lookupIsProtectedCategoryType(((LLInventoryCategory*)inv_item)->getPreferredType());
+ is_movable = !LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)inv_item)->getPreferredType());
break;
default:
break;
}
- LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
- LLUUID current_outfit_id = model->findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT);
+ const LLUUID current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
- BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLAssetType::AT_OUTFIT);
+ BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
if(is_movable && move_is_into_trash)
{
@@ -2886,7 +2887,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, .isObjDirectDescendentOfCategory (inv_item, getCategory());
}
- LLUUID favorites_id = model->findCategoryUUIDForType(LLAssetType::AT_FAVORITE);
+ const LLUUID& favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
// we can move item inside a folder only if this folder is Favorites. See EXT-719
accept = is_movable && ((mUUID != inv_item->getParentUUID()) || (mUUID == favorites_id));
@@ -4977,7 +4978,7 @@ void LLLSLTextBridgeAction::doIt() BOOL LLWearableBridgeAction::isInTrash() const
{
if(!mModel) return FALSE;
- LLUUID trash_id = mModel->findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ const LLUUID trash_id = mModel->findCategoryUUIDForType(LLFolderType::FT_TRASH);
return mModel->isObjectDescendentOf(mUUID, trash_id);
}
@@ -5116,7 +5117,7 @@ std::string LLLinkFolderBridge::sPrefix("Link: "); LLUIImagePtr LLLinkFolderBridge::getIcon() const
{
- LLAssetType::EType preferred_type = LLAssetType::AT_NONE;
+ LLFolderType::EType preferred_type = LLFolderType::FT_NONE;
if (LLViewerInventoryItem *item = getItem())
{
if (const LLViewerInventoryCategory* cat = item->getLinkedCategory())
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index cce06813b7..3ffeb55d6c 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -159,7 +159,7 @@ public: virtual const std::string& getName() const; virtual const std::string& getDisplayName() const; virtual PermissionMask getPermissionMask() const; - virtual LLAssetType::EType getPreferredType() const; + virtual LLFolderType::EType getPreferredType() const; virtual time_t getCreationDate() const; virtual LLFontGL::StyleFlags getLabelStyle() const { @@ -298,9 +298,9 @@ public: virtual void selectItem(); virtual void restoreItem(); - virtual LLAssetType::EType getPreferredType() const; + virtual LLFolderType::EType getPreferredType() const; virtual LLUIImagePtr getIcon() const; - static LLUIImagePtr getIcon(LLAssetType::EType asset_type); + static LLUIImagePtr getIcon(LLFolderType::EType preferred_type); virtual BOOL renameItem(const std::string& new_name); virtual BOOL removeItem(); @@ -321,7 +321,7 @@ public: virtual BOOL copyToClipboard() const; static void createWearable(LLFolderBridge* bridge, EWearableType type); - static void createWearable(LLUUID parent_folder_id, EWearableType type); + static void createWearable(const LLUUID &parent_folder_id, EWearableType type); LLViewerInventoryCategory* getCategory() const; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 77121bd922..75218e98e0 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -317,10 +317,6 @@ const std::string& get_item_icon_name(LLAssetType::EType asset_type, case LLAssetType::AT_GESTURE: idx = GESTURE_ICON_NAME; break; - case LLAssetType::AT_FAVORITE: - //TODO - need bette idx - idx = LANDMARK_ICON_NAME; - break; case LLAssetType::AT_LINK: idx = LINKITEM_ICON_NAME; break; diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 23439191f3..baf34b42ff 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -49,6 +49,7 @@ #include "llinventoryfunctions.h" #include "llinventorypanel.h" #include "llfloaterinventory.h" +#include "llviewerfoldertype.h" #include "llviewerinventory.h" #include "llviewermessage.h" #include "llviewerwindow.h" @@ -316,7 +317,7 @@ 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. -LLUUID LLInventoryModel::findCategoryUUIDForType(LLAssetType::EType t, bool create_folder) +const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bool create_folder) { const LLUUID &rv = findCatUUID(t); if(rv.isNull() && isInventoryUsable() && create_folder) @@ -332,10 +333,10 @@ LLUUID LLInventoryModel::findCategoryUUIDForType(LLAssetType::EType t, bool crea // Internal method which looks for a category with the specified // preferred type. Returns LLUUID::null if not found. -const LLUUID &LLInventoryModel::findCatUUID(LLAssetType::EType preferred_type) const +const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type) const { const LLUUID &root_id = gInventory.getRootFolderID(); - if(LLAssetType::AT_CATEGORY == preferred_type) + if(LLFolderType::FT_CATEGORY == preferred_type) { return root_id; } @@ -363,7 +364,7 @@ const LLUUID &LLInventoryModel::findCatUUID(LLAssetType::EType preferred_type) c // version will take care of details like what the name should be // based on preferred type. Returns the UUID of the new category. LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, - LLAssetType::EType preferred_type, + LLFolderType::EType preferred_type, const std::string& pname) { LLUUID id; @@ -373,9 +374,9 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, return id; } - if(preferred_type == LLAssetType::AT_SIMSTATE) + if(LLFolderType::lookup(preferred_type) == LLFolderType::badLookup()) { - lldebugs << "Attempt to create simstate category." << llendl; + lldebugs << "Attempt to create undefined category." << llendl; return id; } @@ -387,7 +388,7 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, } else { - name.assign(LLAssetType::lookupCategoryName(preferred_type)); + name.assign(LLViewerFolderType::lookupNewCategoryName(preferred_type)); } // Add the category to the internal representation @@ -451,7 +452,7 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, // Start with categories if(!include_trash) { - const LLUUID trash_id = findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH); if(trash_id.notNull() && (trash_id == id)) return; } @@ -485,7 +486,7 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, if (item->getActualType() == LLAssetType::AT_LINK_FOLDER) { LLViewerInventoryCategory *linked_cat = item->getLinkedCategory(); - if (linked_cat && linked_cat->getPreferredType() != LLAssetType::AT_OUTFIT) + if (linked_cat && linked_cat->getPreferredType() != LLFolderType::FT_OUTFIT) // BAP - was // LLAssetType::lookupIsEnsembleCategoryType(linked_cat->getPreferredType())) // Change back once ensemble typing is in place. @@ -665,7 +666,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) if(item->getParentUUID().isNull()) { - LLUUID category_id = findCategoryUUIDForType(new_item->getType()); + const LLUUID category_id = findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(new_item->getType())); new_item->setParent(category_id); item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, category_id); if( item_array ) @@ -689,7 +690,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) LLUUID parent_id = item->getParentUUID(); if(parent_id == CATEGORIZE_LOST_AND_FOUND_ID) { - parent_id = findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); + parent_id = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); new_item->setParent(parent_id); } item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, parent_id); @@ -702,7 +703,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) // Whoops! No such parent, make one. llinfos << "Lost item: " << new_item->getUUID() << " - " << new_item->getName() << llendl; - parent_id = findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); + parent_id = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); new_item->setParent(parent_id); item_array = get_ptr_in_map(mParentChildItemTree, parent_id); if(item_array) @@ -1184,7 +1185,7 @@ void LLInventoryModel::mock(const LLUUID& root_id) root_id, LLUUID::null, LLAssetType::AT_CATEGORY, - LLAssetType::lookupCategoryName(LLAssetType::AT_ROOT_CATEGORY), + LLFolderType::lookupNewCategoryName(LLFolderType::FT_ROOT_CATEGORY), gAgent.getID()); addCategory(cat); gInventory.buildParentChildMap(); @@ -1342,7 +1343,7 @@ void fetchDescendentsResponder::result(const LLSD& content) item_it != folder_sd["items"].endArray(); ++item_it) { - LLUUID lost_uuid = gInventory.findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); + const LLUUID lost_uuid = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); if (lost_uuid.notNull()) { LLSD item = *item_it; @@ -2049,11 +2050,11 @@ bool LLInventoryModel::loadSkeleton( cat->setUUID(folder_id.asUUID()); cat->setParent(parent_id.asUUID()); - LLAssetType::EType preferred_type = LLAssetType::AT_NONE; + LLFolderType::EType preferred_type = LLFolderType::FT_NONE; LLSD type_default = (*it)["type_default"]; if(type_default.isDefined()) { - preferred_type = (LLAssetType::EType)type_default.asInteger(); + preferred_type = (LLFolderType::EType)type_default.asInteger(); } cat->setPreferredType(preferred_type); cat->setVersion(version.asInteger()); @@ -2400,12 +2401,12 @@ void LLInventoryModel::buildParentChildMap() << cat->getName() << llendl; ++lost; // plop it into the lost & found. - LLAssetType::EType pref = cat->getPreferredType(); - if(LLAssetType::AT_NONE == pref) + LLFolderType::EType pref = cat->getPreferredType(); + if(LLFolderType::FT_NONE == pref) { - cat->setParent(findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND)); + cat->setParent(findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND)); } - else if(LLAssetType::AT_CATEGORY == pref) + else if(LLFolderType::FT_CATEGORY == pref) { // it's the root cat->setParent(LLUUID::null); @@ -2464,7 +2465,7 @@ void LLInventoryModel::buildParentChildMap() ++lost; // plop it into the lost & found. // - item->setParent(findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND)); + item->setParent(findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND)); // move it later using a special message to move items. If // we update server here, the client might crash. //item->updateServer(); @@ -2485,7 +2486,7 @@ void LLInventoryModel::buildParentChildMap() llwarns << "Found " << lost << " lost items." << llendl; LLMessageSystem* msg = gMessageSystem; BOOL start_new_message = TRUE; - LLUUID lnf = findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); + const LLUUID lnf = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); for(std::vector<LLUUID>::iterator it = lost_item_ids.begin() ; it < lost_item_ids.end(); ++it) { if(start_new_message) @@ -2938,7 +2939,7 @@ void LLInventoryModel::processUpdateInventoryFolder(LLMessageSystem* msg, lastfolder = tfolder; tfolder->unpackMessage(msg, _PREHASH_FolderData, i); // make sure it's not a protected folder - tfolder->setPreferredType(LLAssetType::AT_NONE); + tfolder->setPreferredType(LLFolderType::FT_NONE); folders.push_back(tfolder); // examine update for changes. LLViewerInventoryCategory* folderp = gInventory.getCategory(tfolder->getUUID()); @@ -3325,31 +3326,31 @@ void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**) //---------------------------------------------------------------------------- -// Trash: LLAssetType::AT_TRASH, "ConfirmEmptyTrash" -// Lost&Found: LLAssetType::AT_LOST_AND_FOUND, "ConfirmEmptyLostAndFound" +// Trash: LLFolderType::FT_TRASH, "ConfirmEmptyTrash" +// Lost&Found: LLFolderType::FT_LOST_AND_FOUND, "ConfirmEmptyLostAndFound" -bool LLInventoryModel::callbackEmptyFolderType(const LLSD& notification, const LLSD& response, LLAssetType::EType folder_type) +bool LLInventoryModel::callbackEmptyFolderType(const LLSD& notification, const LLSD& response, LLFolderType::EType preferred_type) { S32 option = LLNotification::getSelectedOption(notification, response); if (option == 0) // YES { - LLUUID folder_id = findCategoryUUIDForType(folder_type); + const LLUUID folder_id = findCategoryUUIDForType(preferred_type); purgeDescendentsOf(folder_id); notifyObservers(); } return false; } -void LLInventoryModel::emptyFolderType(const std::string notification, LLAssetType::EType folder_type) +void LLInventoryModel::emptyFolderType(const std::string notification, LLFolderType::EType preferred_type) { if (!notification.empty()) { LLNotifications::instance().add(notification, LLSD(), LLSD(), - boost::bind(&LLInventoryModel::callbackEmptyFolderType, this, _1, _2, folder_type)); + boost::bind(&LLInventoryModel::callbackEmptyFolderType, this, _1, _2, preferred_type)); } else { - LLUUID folder_id = findCategoryUUIDForType(folder_type); + const LLUUID folder_id = findCategoryUUIDForType(preferred_type); purgeDescendentsOf(folder_id); notifyObservers(); } @@ -3360,7 +3361,7 @@ void LLInventoryModel::emptyFolderType(const std::string notification, LLAssetTy void LLInventoryModel::removeItem(const LLUUID& item_id) { LLViewerInventoryItem* item = getItem(item_id); - const LLUUID new_parent = findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID new_parent = findCategoryUUIDForType(LLFolderType::FT_TRASH); if (item && item->getParentUUID() != new_parent) { LLInventoryModel::update_list_t update; diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index d51460b374..aba0a619db 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -34,6 +34,7 @@ #define LL_LLINVENTORYMODEL_H #include "llassettype.h" +#include "llfoldertype.h" #include "lldarray.h" #include "llframetimer.h" #include "llhttpclient.h" @@ -280,7 +281,7 @@ public: // SDK: Added flag to specify whether the folder should be created if not found. This fixes the horrible // multiple trash can bug. - LLUUID findCategoryUUIDForType(LLAssetType::EType preferred_type, bool create_folder = true); + const LLUUID findCategoryUUIDForType(LLFolderType::EType preferred_type, bool create_folder = true); // Call this method when it's time to update everyone on a new // state, by default, the inventory model will not update @@ -329,7 +330,7 @@ public: // 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, - LLAssetType::EType preferred_type, + LLFolderType::EType preferred_type, const std::string& name); // methods to load up inventory skeleton & meat. These are used @@ -385,9 +386,9 @@ public: bool isCategoryComplete(const LLUUID& cat_id) const; // callbacks - // Trigger a notification and empty the folder type (AT_TRASH or AT_LOST_AND_FOUND) if confirmed - void emptyFolderType(const std::string notification, LLAssetType::EType folder_type); - bool callbackEmptyFolderType(const LLSD& notification, const LLSD& response, LLAssetType::EType folder_type); + // 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); @@ -431,7 +432,7 @@ protected: // // Internal method which looks for a category with the specified // preferred type. Returns LLUUID::null if not found - const LLUUID &findCatUUID(LLAssetType::EType preferred_type) const; + const LLUUID &findCatUUID(LLFolderType::EType preferred_type) const; // Empty the entire contents void empty(); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index f13651f7f9..0a13d819a5 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -78,6 +78,7 @@ #include "lltabcontainer.h"
#include "lltooldraganddrop.h"
#include "lluictrlfactory.h"
+#include "llviewerfoldertype.h"
#include "llviewerinventory.h"
#include "llviewermessage.h"
#include "llviewerobjectlist.h"
@@ -110,8 +111,8 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : // contex menu callbacks
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryPanel::doToSelected, this, _2));
- mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLAssetType::AT_TRASH));
- mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLAssetType::AT_LOST_AND_FOUND));
+ mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
+ mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND));
mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLInventoryPanel::doCreate, this, _2));
mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2));
mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this));
@@ -169,19 +170,19 @@ BOOL LLInventoryPanel::postBuild() // determine the root folder, if any, so inventory contents show just the children
// of that folder (i.e. not including the folder itself).
- const LLAssetType::EType preferred_type = LLAssetType::lookupHumanReadable(mStartFolderString);
+ const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(mStartFolderString);
- if ("inventory" == mStartFolderString)
+ if ("INVENTORY" == mStartFolderString)
{
mStartFolderID = gInventory.getRootFolderID();
}
- else if ("library" == mStartFolderString)
+ else if ("LIBRARY" == mStartFolderString)
{
mStartFolderID = gInventory.getLibraryRootFolderID();
}
else
{
- mStartFolderID = (preferred_type != LLAssetType::AT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
+ mStartFolderID = (preferred_type != LLFolderType::FT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
}
// build view of inventory if we need default full hierarchy and inventory ready, otherwise wait for modelChanged() callback
@@ -192,7 +193,7 @@ BOOL LLInventoryPanel::postBuild() }
// bit of a hack to make sure the inventory is open.
- mFolders->openFolder(preferred_type != LLAssetType::AT_NONE ? LLAssetType::lookupCategoryName(preferred_type) : "My Inventory");
+ mFolders->openFolder(preferred_type != LLFolderType::FT_NONE ? LLViewerFolderType::lookupNewCategoryName(preferred_type) : "My Inventory");
if (mSortOrderSetting != INHERIT_SORT_ORDER)
{
@@ -382,6 +383,19 @@ void LLInventoryPanel::modelChanged(U32 mask) view_item->getParentFolder()->extractItem(view_item);
view_item->addToFolder(new_parent, mFolders);
}
+/*
+ on the other side in case Inventory Panel has content of the any folder
+ it is possible that item moved to some folder which is absent in current
+ Panel. For ex. removing item (via moving to trash).
+ In this case we need to check if new parent is other then inventory start folder
+ and simply remove its View from the hierarchy.
+ See details in EXT-2098.
+*/
+ // So, let check if item was moved into folder out of this Inventory Panel.
+ else if (mStartFolderID.notNull() && NULL == new_parent && model_item->getParentUUID() != mStartFolderID)
+ {
+ view_item->getParentFolder()->extractItem(view_item);
+ }
}
}
else
@@ -650,7 +664,7 @@ void LLInventoryPanel::openAllFolders() mFolders->arrangeAll();
}
-void LLInventoryPanel::openDefaultFolderForType(LLAssetType::EType type)
+void LLInventoryPanel::openDefaultFolderForType(LLFolderType::EType type)
{
LLUUID category_id = mInventory->findCategoryUUIDForType(type);
LLOpenFolderByID opener(category_id);
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 997678a478..9f74fad5c1 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -122,7 +122,7 @@ public: // Call this method to set the selection. void openAllFolders(); - void openDefaultFolderForType(LLAssetType::EType); + void openDefaultFolderForType(LLFolderType::EType); void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus); void setSelectCallback(const LLFolderView::signal_t::slot_type& cb) { if (mFolders) mFolders->setSelectCallback(cb); } void clearSelection(); diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index 4fd3b7bddc..bd6702a0b2 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -517,43 +517,52 @@ void LLJoystickCameraRotate::draw() LLGLSUIDefault gls_ui; getImageUnselected()->draw( 0, 0 ); + LLPointer<LLUIImage> image = getImageSelected(); if( mInTop ) { - drawRotatedImage( getImageSelected()->getImage(), 0 ); + drawRotatedImage( getImageSelected(), 0 ); } if( mInRight ) { - drawRotatedImage( getImageSelected()->getImage(), 1 ); + drawRotatedImage( getImageSelected(), 1 ); } if( mInBottom ) { - drawRotatedImage( getImageSelected()->getImage(), 2 ); + drawRotatedImage( getImageSelected(), 2 ); } if( mInLeft ) { - drawRotatedImage( getImageSelected()->getImage(), 3 ); + drawRotatedImage( getImageSelected(), 3 ); } } // Draws image rotated by multiples of 90 degrees -void LLJoystickCameraRotate::drawRotatedImage( LLTexture* image, S32 rotations ) +void LLJoystickCameraRotate::drawRotatedImage( LLPointer<LLUIImage> image, S32 rotations ) { S32 width = image->getWidth(); S32 height = image->getHeight(); - + LLTexture* texture = image->getImage(); + + /* + * Scale texture coordinate system + * to handle the different between image size and size of texture. + * If we will use default matrix, + * it may break texture mapping after rotation. + * see EXT-2023 Camera floater: arrows became shifted when pressed. + */ F32 uv[][2] = { - { 1.f, 1.f }, - { 0.f, 1.f }, + { (F32)width/texture->getWidth(), (F32)height/texture->getHeight() }, + { 0.f, (F32)height/texture->getHeight() }, { 0.f, 0.f }, - { 1.f, 0.f } + { (F32)width/texture->getWidth(), 0.f } }; - gGL.getTexUnit(0)->bind(image); + gGL.getTexUnit(0)->bind(texture); gGL.color4fv(UI_VERTEX_COLOR.mV); diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h index 8caef30fa4..4c657913b8 100644 --- a/indra/newview/lljoystickbutton.h +++ b/indra/newview/lljoystickbutton.h @@ -150,7 +150,7 @@ public: protected: F32 getOrbitRate(); virtual void updateSlop(); - void drawRotatedImage( LLTexture* image, S32 rotations ); + void drawRotatedImage( LLPointer<LLUIImage> image, S32 rotations ); protected: BOOL mInLeft; diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 0b07dd4f21..e0dc1b6f0f 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -49,6 +49,7 @@ #include "llstring.h" #include "llviewerinventory.h" #include "llviewerparcelmgr.h" +#include "llworldmapmessage.h" #include "llviewerwindow.h" #include "llwindow.h" #include "llworldmap.h" @@ -135,13 +136,13 @@ public: // Returns true if the given inventory item is a landmark pointing to the current parcel. // Used to find out if there is at least one landmark from current parcel. -class LLFistAgentParcelLandmark : public LLInventoryCollectFunctor +class LLFirstAgentParcelLandmark : public LLInventoryCollectFunctor { private: bool mFounded;// to avoid unnecessary check public: - LLFistAgentParcelLandmark(): mFounded(false){} + LLFirstAgentParcelLandmark(): mFounded(false){} /*virtual*/ bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) { @@ -165,8 +166,7 @@ static void fetch_landmarks(LLInventoryModel::cat_array_t& cats, LLInventoryCollectFunctor& add) { // Look in "My Favorites" - LLUUID favorites_folder_id = - gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE); + const LLUUID favorites_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); gInventory.collectDescendentsIf(favorites_folder_id, cats, items, @@ -174,8 +174,7 @@ static void fetch_landmarks(LLInventoryModel::cat_array_t& cats, add); // Look in "Landmarks" - LLUUID landmarks_folder_id = - gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); + const LLUUID landmarks_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); gInventory.collectDescendentsIf(landmarks_folder_id, cats, items, @@ -202,7 +201,7 @@ bool LLLandmarkActions::landmarkAlreadyExists() //static bool LLLandmarkActions::hasParcelLandmark() { - LLFistAgentParcelLandmark get_first_agent_landmark; + LLFirstAgentParcelLandmark get_first_agent_landmark; LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; fetch_landmarks(cats, items, get_first_agent_landmark); @@ -287,7 +286,7 @@ void LLLandmarkActions::createLandmarkHere() LLAgentUI::buildLocationString(landmark_name, LLAgentUI::LOCATION_FORMAT_LANDMARK); LLAgentUI::buildLocationString(landmark_desc, LLAgentUI::LOCATION_FORMAT_FULL); - LLUUID folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); + const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); createLandmarkHere(landmark_name, landmark_desc, folder_id); } @@ -307,13 +306,13 @@ void LLLandmarkActions::getSLURLfromPosGlobal(const LLVector3d& global_pos, slur { U64 new_region_handle = to_region_handle(global_pos); - LLWorldMap::url_callback_t url_cb = boost::bind(&LLLandmarkActions::onRegionResponseSLURL, + LLWorldMapMessage::url_callback_t url_cb = boost::bind(&LLLandmarkActions::onRegionResponseSLURL, cb, global_pos, escaped, _2); - LLWorldMap::getInstance()->sendHandleRegionRequest(new_region_handle, url_cb, std::string("unused"), false); + LLWorldMapMessage::getInstance()->sendHandleRegionRequest(new_region_handle, url_cb, std::string("unused"), false); } } @@ -324,18 +323,19 @@ void LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(const LLVector3d& gl if (sim_infop) { LLVector3 pos = sim_infop->getLocalPos(global_pos); - cb(sim_infop->mName, llround(pos.mV[VX]), llround(pos.mV[VY])); + std::string name = sim_infop->getName() ; + cb(name, llround(pos.mV[VX]), llround(pos.mV[VY])); } else { U64 new_region_handle = to_region_handle(global_pos); - LLWorldMap::url_callback_t url_cb = boost::bind(&LLLandmarkActions::onRegionResponseNameAndCoords, + LLWorldMapMessage::url_callback_t url_cb = boost::bind(&LLLandmarkActions::onRegionResponseNameAndCoords, cb, global_pos, _1); - LLWorldMap::getInstance()->sendHandleRegionRequest(new_region_handle, url_cb, std::string("unused"), false); + LLWorldMapMessage::getInstance()->sendHandleRegionRequest(new_region_handle, url_cb, std::string("unused"), false); } } @@ -367,7 +367,8 @@ void LLLandmarkActions::onRegionResponseNameAndCoords(region_name_and_coords_cal if (sim_infop) { LLVector3 local_pos = sim_infop->getLocalPos(global_pos); - cb(sim_infop->mName, llround(local_pos.mV[VX]), llround(local_pos.mV[VY])); + std::string name = sim_infop->getName() ; + cb(name, llround(local_pos.mV[VX]), llround(local_pos.mV[VY])); } } diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h index 312426cab0..1c524c820c 100644 --- a/indra/newview/lllandmarkactions.h +++ b/indra/newview/lllandmarkactions.h @@ -55,7 +55,7 @@ public: static bool landmarkAlreadyExists(); /** - * @brief Checks whether landmark exists for current parcel. + * @brief Checks whether landmark exists for current agent parcel. */ static bool hasParcelLandmark(); diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp index 6f0b8a3c1e..2a1f42c3c4 100644 --- a/indra/newview/llloginhandler.cpp +++ b/indra/newview/llloginhandler.cpp @@ -56,7 +56,7 @@ bool LLLoginHandler::parseDirectLogin(std::string url) LLURI uri(url); parse(uri.queryMap()); - if (mWebLoginKey.isNull() || + if (/*mWebLoginKey.isNull() ||*/ mFirstName.empty() || mLastName.empty()) { @@ -71,7 +71,7 @@ bool LLLoginHandler::parseDirectLogin(std::string url) void LLLoginHandler::parse(const LLSD& queryMap) { - mWebLoginKey = queryMap["web_login_key"].asUUID(); + //mWebLoginKey = queryMap["web_login_key"].asUUID(); mFirstName = queryMap["first_name"].asString(); mLastName = queryMap["last_name"].asString(); @@ -165,7 +165,15 @@ void LLLoginHandler::parse(const LLSD& queryMap) bool LLLoginHandler::handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) -{ +{ + if (tokens.size() == 1 + && tokens[0].asString() == "show") + { + // We're using reg-in-client, so show the XUI login widgets + LLPanelLogin::showLoginWidgets(); + return true; + } + parse(query_map); //if we haven't initialized stuff yet, this is @@ -200,14 +208,15 @@ bool LLLoginHandler::handle(const LLSD& tokens, LLPanelLogin::setFields(mFirstName, mLastName, password); } - if (mWebLoginKey.isNull()) - { - LLPanelLogin::loadLoginPage(); - } - else - { - LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); - } + //if (mWebLoginKey.isNull()) + //{ + // LLPanelLogin::loadLoginPage(); + //} + //else + //{ + // LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); + //} + LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); } return true; } diff --git a/indra/newview/llloginhandler.h b/indra/newview/llloginhandler.h index d36ceaf3cc..ac4648761b 100644 --- a/indra/newview/llloginhandler.h +++ b/indra/newview/llloginhandler.h @@ -48,7 +48,9 @@ class LLLoginHandler : public LLCommandHandler std::string getFirstName() const { return mFirstName; } std::string getLastName() const { return mLastName; } - LLUUID getWebLoginKey() const { return mWebLoginKey; } + + // Web-based login unsupported + //LLUUID getWebLoginKey() const { return mWebLoginKey; } private: void parse(const LLSD& queryMap); @@ -56,7 +58,7 @@ private: private: std::string mFirstName; std::string mLastName; - LLUUID mWebLoginKey; + //LLUUID mWebLoginKey; }; extern LLLoginHandler gLoginHandler; diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 2153f77336..f1b3a37677 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -163,7 +163,7 @@ void LLManipTranslate::restoreGL() GLuint* d = new GLuint[rez*rez]; - gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, sGridTex->getTexName()); + gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, sGridTex->getTexName(), true); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR); while (rez >= 1) diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e63daac4af..63794be085 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -50,8 +50,9 @@ #include "llslurl.h" #include "llurlsimstring.h" #include "llviewerinventory.h" +#include "llviewermenu.h" #include "llviewerparcelmgr.h" -#include "llworldmap.h" +#include "llworldmapmessage.h" #include "llappviewer.h" #include "llviewercontrol.h" #include "llfloatermediabrowser.h" @@ -173,8 +174,6 @@ LLNavigationBar::LLNavigationBar() mSearchComboBox(NULL), mPurgeTPHistoryItems(false) { - setIsChrome(TRUE); - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_navigation_bar.xml"); // set a listener function for LoginComplete event @@ -271,6 +270,18 @@ void LLNavigationBar::draw() LLPanel::draw(); } +BOOL LLNavigationBar::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + BOOL handled = childrenHandleRightMouseDown( x, y, mask) != NULL; + if(!handled && !gMenuHolder->hasVisibleMenu()) + { + show_navbar_context_menu(this,x,y); + handled = true; + } + + return handled; +} + void LLNavigationBar::onBackButtonClicked() { LLTeleportHistory::getInstance()->goBack(); @@ -382,14 +393,13 @@ void LLNavigationBar::onLocationSelection() // Resolve the region name to its global coordinates. // If resolution succeeds we'll teleport. - LLWorldMap::url_callback_t cb = boost::bind( + LLWorldMapMessage::url_callback_t cb = boost::bind( &LLNavigationBar::onRegionNameResponse, this, typed_location, region_name, local_coords, _1, _2, _3, _4); // connect the callback each time, when user enter new location to get real location of agent after teleport mTeleportFinishConnection = LLViewerParcelMgr::getInstance()-> setTeleportFinishedCallback(boost::bind(&LLNavigationBar::onTeleportFinished, this, _1,typed_location)); - - LLWorldMap::getInstance()->sendNamedRegionRequest(region_name, cb, std::string("unused"), false); + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, cb, std::string("unused"), false); } void LLNavigationBar::onTeleportFinished(const LLVector3d& global_agent_pos, const std::string& typed_location) diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 04707d8d48..52f5a827e4 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -54,6 +54,7 @@ public: virtual ~LLNavigationBar(); /*virtual*/ void draw(); + /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL postBuild(); void handleLoginComplete(); diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 12638ab855..974291a54e 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -61,7 +61,7 @@ static const S32 RESIZE_BAR_THICKNESS = 3; LLNearbyChat::LLNearbyChat(const LLSD& key) - : LLDockableFloater(NULL, key) + : LLDockableFloater(NULL, false, key) ,mChatHistory(NULL) { @@ -97,14 +97,41 @@ BOOL LLNearbyChat::postBuild() if (getDockControl() == NULL) { setDockControl(new LLDockControl( - LLBottomTray::getInstance()->getNearbyChatBar(), this, - getDockTongue(), LLDockControl::LEFT, boost::bind(&LLNearbyChat::getAllowedRect, this, _1))); + LLBottomTray::getInstance()->getNearbyChatBar(), this, + getDockTongue(), LLDockControl::LEFT, boost::bind(&LLNearbyChat::getAllowedRect, this, _1))); } return true; } +void LLNearbyChat::applySavedVariables() +{ + if (mRectControl.size() > 1) + { + const LLRect& rect = LLUI::sSettingGroups["floater"]->getRect(mRectControl); + if(!rect.isEmpty() && rect.isValid()) + { + reshape(rect.getWidth(), rect.getHeight()); + setRect(rect); + } + } + + + if(!LLUI::sSettingGroups["floater"]->controlExists(mDocStateControl)) + { + setDocked(true); + } + else + { + if (mDocStateControl.size() > 1) + { + bool dockState = LLUI::sSettingGroups["floater"]->getBOOL(mDocStateControl); + setDocked(dockState); + } + } +} + LLColor4 nearbychat_get_text_color(const LLChat& chat) { LLColor4 text_color; @@ -265,11 +292,5 @@ void LLNearbyChat::getAllowedRect(LLRect& rect) { rect = gViewerWindow->getWorldViewRect(); } -void LLNearbyChat::setVisible (BOOL visible) -{ - LLDockableFloater::setVisible(visible); -} -void LLNearbyChat::toggleWindow() -{ -} + diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index 20cbf7537d..cb4654654a 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -52,16 +52,15 @@ public: void onNearbyChatContextMenuItemClicked(const LLSD& userdata); bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); - void setDocked (bool docked, bool pop_on_undock); - void toggleWindow (); + void setDocked (bool docked, bool pop_on_undock = true); /*virtual*/ void onOpen (const LLSD& key); - virtual void setVisible (BOOL visible); - virtual void setRect (const LLRect &rect); private: + virtual void applySavedVariables(); + void getAllowedRect (LLRect& rect); void onNearbySpeakers (); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 32dc5e5927..bcb4edd7c1 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -36,6 +36,7 @@ #include "lltrans.h" #include "llnearbychatbar.h" +#include "llspeakbutton.h" #include "llbottomtray.h" #include "llagent.h" #include "llgesturemgr.h" @@ -77,6 +78,10 @@ LLGestureComboBox::LLGestureComboBox(const LLGestureComboBox::Params& p) // refresh list from current active gestures refreshGestures(); + + // This forces using of halign from xml, since LLComboBox + // sets it to LLFontGL::LEFT, if text entry is disabled + mButton->setHAlign(p.drop_down_button.font_halign); } LLGestureComboBox::~LLGestureComboBox() @@ -207,6 +212,7 @@ LLNearbyChatBar::LLNearbyChatBar() : LLPanel() , mChatBox(NULL) { + mSpeakerMgr = LLLocalSpeakerMgr::getInstance(); } //virtual @@ -228,11 +234,11 @@ BOOL LLNearbyChatBar::postBuild() mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator"); mOutputMonitor->setVisible(FALSE); - mTalkBtn = getParent()->getChild<LLTalkButton>("talk"); + mSpeakBtn = getParent()->getChild<LLSpeakButton>("talk"); // Speak button should be initially disabled because // it takes some time between logging in to world and connecting to voice channel. - mTalkBtn->setEnabled(FALSE); + mSpeakBtn->setEnabled(FALSE); // Registering Chat Bar to receive Voice client status change notifications. gVoiceClient->addObserver(this); @@ -516,8 +522,8 @@ void LLNearbyChatBar::displaySpeakingIndicator() LLUUID id; id.setNull(); - mSpeakerMgr.update(TRUE); - mSpeakerMgr.getSpeakerList(&speaker_list, FALSE); + mSpeakerMgr->update(TRUE); + mSpeakerMgr->getSpeakerList(&speaker_list, FALSE); for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) { @@ -691,7 +697,7 @@ LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channe void LLNearbyChatBar::setPTTState(bool state) { - mTalkBtn->setSpeakBtnToggleState(state); + mSpeakBtn->setSpeakBtnToggleState(state); } void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) @@ -747,7 +753,7 @@ void LLNearbyChatBar::onChange(EStatusType status, const std::string &channelURI break; } - mTalkBtn->setEnabled(enable); + mSpeakBtn->setEnabled(enable); } // Creating the object registers with the dispatcher. diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index 06204e6367..aa25b6aa68 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -37,11 +37,14 @@ #include "llcombobox.h" #include "llgesturemgr.h" #include "llchat.h" -#include "llchiclet.h" #include "llvoiceclient.h" #include "lloutputmonitorctrl.h" #include "llspeakers.h" + +class LLSpeakButton; + + class LLGestureComboBox : public LLComboBox , public LLGestureManagerObserver @@ -125,9 +128,9 @@ protected: static S32 sLastSpecialChatChannel; LLLineEditor* mChatBox; - LLTalkButton* mTalkBtn; + LLSpeakButton* mSpeakBtn; LLOutputMonitorCtrl* mOutputMonitor; - LLActiveSpeakerMgr mSpeakerMgr; + LLLocalSpeakerMgr* mSpeakerMgr; }; #endif diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index b6b433c28f..4286582cdc 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -65,9 +65,15 @@ static LLDefaultChildRegistry::Register<LLNetMap> r1("net_map"); +const F32 LLNetMap::MAP_SCALE_MIN = 32; +const F32 LLNetMap::MAP_SCALE_MID = 1024; +const F32 LLNetMap::MAP_SCALE_MAX = 4096; + const F32 MAP_SCALE_INCREMENT = 16; -const F32 MAP_MIN_PICK_DIST = 4; -const F32 MAX_PRIM_RADIUS = 256.0f; // Don't try to draw giant mega-prims on the mini map +const F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%) +const F32 MIN_DOT_RADIUS = 3.5f; +const F32 DOT_SCALE = 0.75f; +const F32 MIN_PICK_SCALE = 2.f; LLNetMap::LLNetMap (const Params & p) : LLUICtrl (p), @@ -89,6 +95,7 @@ LLNetMap::LLNetMap (const Params & p) mRotateMap(FALSE), mToolTipMsg() { + mDotRadius = llmax(DOT_SCALE * mPixelsPerMeter, MIN_DOT_RADIUS); } LLNetMap::~LLNetMap() @@ -101,17 +108,18 @@ void LLNetMap::setScale( F32 scale ) if (mObjectImagep.notNull()) { - F32 half_width = (F32)(getRect().getWidth() / 2); - F32 half_height = (F32)(getRect().getHeight() / 2); - F32 radius = sqrt( half_width * half_width + half_height * half_height ); - F32 region_widths = (2.f*radius)/mScale; + F32 width = (F32)(getRect().getWidth()); + F32 height = (F32)(getRect().getHeight()); + F32 diameter = sqrt(width * width + height * height); + F32 region_widths = diameter / mScale; F32 meters = region_widths * LLWorld::getInstance()->getRegionWidthInMeters(); F32 num_pixels = (F32)mObjectImagep->getWidth(); - mObjectMapTPM = num_pixels/meters; - mObjectMapPixels = 2.f*radius; + mObjectMapTPM = num_pixels / meters; + mObjectMapPixels = diameter; } mPixelsPerMeter = mScale / REGION_WIDTH_METERS; + mDotRadius = llmax(DOT_SCALE * mPixelsPerMeter, MIN_DOT_RADIUS); mUpdateNow = TRUE; } @@ -302,6 +310,7 @@ void LLNetMap::draw() LLUI::getMousePositionLocal(this, &local_mouse_x, &local_mouse_y); mClosestAgentToCursor.setNull(); F32 closest_dist = F32_MAX; + F32 min_pick_dist = mDotRadius * MIN_PICK_SCALE; // Draw avatars for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); @@ -345,10 +354,10 @@ void LLNetMap::draw() LLWorldMapView::drawAvatar( pos_map.mV[VX], pos_map.mV[VY], show_as_friend ? map_avatar_friend_color : map_avatar_color, - pos_map.mV[VZ]); + pos_map.mV[VZ], mDotRadius); F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); - if(dist_to_cursor < MAP_MIN_PICK_DIST && dist_to_cursor < closest_dist) + if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) { closest_dist = dist_to_cursor; mClosestAgentToCursor = regionp->mMapAvatarIDs.get(i); @@ -378,10 +387,12 @@ void LLNetMap::draw() // Draw dot for self avatar position pos_global = gAgent.getPositionGlobal(); pos_map = globalPosToView(pos_global); - LLUIImagePtr you = LLWorldMapView::sAvatarYouSmallImage; - you->draw( - llround(pos_map.mV[VX]) - you->getWidth()/2, - llround(pos_map.mV[VY]) - you->getHeight()/2); + LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage; + S32 dot_width = llround(mDotRadius * 2.f); + you->draw(llround(pos_map.mV[VX] - mDotRadius), + llround(pos_map.mV[VY] - mDotRadius), + dot_width, + dot_width); // Draw frustum F32 meters_to_pixels = mScale/ LLWorld::getInstance()->getRegionWidthInMeters(); @@ -429,6 +440,12 @@ void LLNetMap::draw() LLUICtrl::draw(); } +void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + LLUICtrl::reshape(width, height, called_from_parent); + createObjectImage(); +} + LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos ) { LLVector3d relative_pos_global = global_pos - gAgent.getCameraPositionGlobal(); @@ -504,8 +521,12 @@ LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y ) BOOL LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks) { - // note that clicks are reversed from what you'd think - setScale(llclamp(mScale - clicks*MAP_SCALE_INCREMENT, MAP_SCALE_MIN, MAP_SCALE_MAX)); + // note that clicks are reversed from what you'd think: i.e. > 0 means zoom out, < 0 means zoom in + F32 scale = mScale; + + scale *= pow(MAP_SCALE_ZOOM_FACTOR, -clicks); + setScale(llclamp(scale, MAP_SCALE_MIN, MAP_SCALE_MAX)); + return TRUE; } @@ -567,9 +588,7 @@ void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U & LLVector3 local_pos; local_pos.setVec( pos - mObjectImageCenterGlobal ); - F32 radius_clamped = llmin(radius_meters, MAX_PRIM_RADIUS); - - S32 diameter_pixels = llround(2 * radius_clamped * mObjectMapTPM); + S32 diameter_pixels = llround(2 * radius_meters * mObjectMapTPM); renderPoint( local_pos, color, diameter_pixels ); } @@ -662,13 +681,13 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, void LLNetMap::createObjectImage() { // Find the size of the side of a square that surrounds the circle that surrounds getRect(). - F32 half_width = (F32)(getRect().getWidth() / 2); - F32 half_height = (F32)(getRect().getHeight() / 2); - F32 radius = sqrt( half_width * half_width + half_height * half_height ); - S32 square_size = S32( 2 * radius ); + // ... which is, the diagonal of the rect. + F32 width = (F32)getRect().getWidth(); + F32 height = (F32)getRect().getHeight(); + S32 square_size = llround( sqrt(width*width + height*height) ); // Find the least power of two >= the minimum size. - const S32 MIN_SIZE = 32; + const S32 MIN_SIZE = 64; const S32 MAX_SIZE = 256; S32 img_size = MIN_SIZE; while( (img_size*2 < square_size ) && (img_size < MAX_SIZE) ) @@ -684,7 +703,7 @@ void LLNetMap::createObjectImage() U8* data = mObjectRawImagep->getData(); memset( data, 0, img_size * img_size * 4 ); mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), FALSE); - setScale(mScale); } + setScale(mScale); mUpdateNow = TRUE; } diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index 5ebdd13384..7088ab3e70 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -70,9 +70,14 @@ protected: public: virtual ~LLNetMap(); + static const F32 MAP_SCALE_MIN; + static const F32 MAP_SCALE_MID; + static const F32 MAP_SCALE_MAX; + /*virtual*/ void draw(); /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); /*virtual*/ BOOL handleToolTip( S32 x, S32 y, MASK mask); + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); void setScale( F32 scale ); void setRotateMap( BOOL b ) { mRotateMap = b; } @@ -94,16 +99,17 @@ private: void drawTracking( const LLVector3d& pos_global, const LLColor4& color, BOOL draw_arrow = TRUE); - - void createObjectImage(); + void createObjectImage(); + private: LLUIColor mBackgroundColor; F32 mScale; // Size of a region in pixels F32 mPixelsPerMeter; // world meters to map pixels F32 mObjectMapTPM; // texels per meter on map - F32 mObjectMapPixels; // Width of object map in pixels; + F32 mObjectMapPixels; // Width of object map in pixels + F32 mDotRadius; // Size of avatar markers F32 mTargetPanX; F32 mTargetPanY; F32 mCurPanX; diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index cd4e640ec4..23998a0e5d 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -53,7 +53,8 @@ typedef enum e_notification_type NT_GROUPCHAT, NT_NEARBYCHAT, NT_ALERT, - NT_ALERTMODAL + NT_ALERTMODAL, + NT_OFFER } ENotificationType; /** @@ -231,6 +232,27 @@ protected: bool mIsModal; }; +/** + * Handler for offers notices. + * It manages life time of offer notices. + */ +class LLOfferHandler : public LLSysHandler +{ +public: + LLOfferHandler(e_notification_type type, const LLSD& id); + virtual ~LLOfferHandler(); + + // base interface functions + virtual bool processNotification(const LLSD& notify); + +protected: + virtual void onDeleteToast(LLToast* toast); + virtual void initChannel(); + + // own handlers + void onRejectToast(LLUUID& id); +}; + } #endif diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index 81a6b32917..1083cf3634 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -63,6 +63,7 @@ void LLNotificationManager::init() LLNotificationChannel::buildChannel("Alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert")); LLNotificationChannel::buildChannel("AlertModal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal")); LLNotificationChannel::buildChannel("IM Notifications", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "notifytoast")); + LLNotificationChannel::buildChannel("Offer", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "offer")); LLNotifications::instance().getChannel("Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); LLNotifications::instance().getChannel("NotificationTips")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); @@ -70,6 +71,7 @@ void LLNotificationManager::init() LLNotifications::instance().getChannel("Alerts")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); LLNotifications::instance().getChannel("IM Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); + LLNotifications::instance().getChannel("Offer")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); mNotifyHandlers["notify"] = boost::shared_ptr<LLEventHandler>(new LLScriptHandler(NT_NOTIFY, LLSD())); mNotifyHandlers["notifytip"] = boost::shared_ptr<LLEventHandler>(new LLTipHandler(NT_NOTIFY, LLSD())); @@ -80,6 +82,7 @@ void LLNotificationManager::init() mNotifyHandlers["notifytoast"] = boost::shared_ptr<LLEventHandler>(new LLIMHandler(NT_IMCHAT, LLSD())); mNotifyHandlers["nearbychat"] = boost::shared_ptr<LLEventHandler>(new LLNearbyChatHandler(NT_NEARBYCHAT, LLSD())); + mNotifyHandlers["offer"] = boost::shared_ptr<LLEventHandler>(new LLOfferHandler(NT_OFFER, LLSD())); } //-------------------------------------------------------------------------- diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp new file mode 100644 index 0000000000..8e3a44682c --- /dev/null +++ b/indra/newview/llnotificationofferhandler.cpp @@ -0,0 +1,153 @@ +/** + * @file llnotificationofferhandler.cpp + * @brief Notification Handler Class for Simple Notifications and Notification Tips + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-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" // must be first include + +#include "llnotificationhandler.h" +#include "lltoastnotifypanel.h" +#include "llviewercontrol.h" +#include "llviewerwindow.h" +#include "llimview.h" +#include "llimfloater.h" +#include "llnotificationmanager.h" + +using namespace LLNotificationsUI; + +//-------------------------------------------------------------------------- +LLOfferHandler::LLOfferHandler(e_notification_type type, const LLSD& id) +{ + mType = type; + + // Getting a Channel for our notifications + mChannel = LLChannelManager::getInstance()->createNotificationChannel(); + mChannel->setControlHovering(true); + + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); + if(channel) + channel->setOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1)); +} + +//-------------------------------------------------------------------------- +LLOfferHandler::~LLOfferHandler() +{ +} + +//-------------------------------------------------------------------------- +void LLOfferHandler::initChannel() +{ + S32 channel_right_bound = gViewerWindow->getWorldViewRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); + S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); + mChannel->init(channel_right_bound - channel_width, channel_right_bound); +} + +//-------------------------------------------------------------------------- +bool LLOfferHandler::processNotification(const LLSD& notify) +{ + if(!mChannel) + { + return false; + } + + LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); + + if(!notification) + return false; + + // arrange a channel on a screen + if(!mChannel->getVisible()) + { + initChannel(); + } + + if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") + { + // add message to IM + LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, notification->getPayload()["from_id"]); + if (!LLIMMgr::instance().hasSession(session_id)) + { + // create session with faked type to avoid creating chicklets + session_id = LLIMMgr::instance().addSession( + notification->getSubstitutions()["NAME"], IM_NOTHING_SPECIAL, + notification->getPayload()["from_id"]); + } + LLIMMgr::instance().addMessage(session_id, LLUUID(), + notification->getSubstitutions()["NAME"], + notification->getMessage()); + + LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); + + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = notify_box; + p.on_delete_toast = boost::bind(&LLOfferHandler::onDeleteToast, this, _1); + + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); + if(channel) + channel->addToast(p); + + // send a signal to the counter manager + mNewNotificationSignal(); + } + else if (notify["sigtype"].asString() == "delete") + { + mChannel->killToastByNotificationID(notification->getID()); + } + + return true; +} + +//-------------------------------------------------------------------------- + +void LLOfferHandler::onDeleteToast(LLToast* toast) +{ + // send a signal to the counter manager + mDelNotificationSignal(); + + // send a signal to a listener to let him perform some action + // in this case listener is a SysWellWindow and it will remove a corresponding item from its list + mNotificationIDSignal(toast->getNotificationID()); +} + +//-------------------------------------------------------------------------- +void LLOfferHandler::onRejectToast(LLUUID& id) +{ + LLNotificationPtr notification = LLNotifications::instance().find(id); + + if (notification + && LLNotificationManager::getInstance()->getHandlerForNotification( + notification->getType()) == this) + { + LLNotifications::instance().cancel(notification); + } +} diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index 070af432d6..dac7a4ca3a 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -37,6 +37,7 @@ #include "lltoastnotifypanel.h" #include "llviewercontrol.h" #include "llviewerwindow.h" +#include "llnotificationmanager.h" using namespace LLNotificationsUI; @@ -129,7 +130,9 @@ void LLScriptHandler::onRejectToast(LLUUID& id) { LLNotificationPtr notification = LLNotifications::instance().find(id); - if(notification) + if (notification + && LLNotificationManager::getInstance()->getHandlerForNotification( + notification->getType()) == this) { LLNotifications::instance().cancel(notification); } diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 8bac9937f0..39381e3faa 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -80,7 +80,8 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p) mImageLevel2(p.image_level_2), mImageLevel3(p.image_level_3), mAutoUpdate(p.auto_update), - mSpeakerId(p.speaker_id) + mSpeakerId(p.speaker_id), + mIsAgentControl(false) { //static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange); //static LLUIColor output_monitor_overdriven_color = LLUIColorTable::instance().getColor("OutputMonitorOverdrivenColor", LLColor4::red); @@ -132,7 +133,14 @@ void LLOutputMonitorCtrl::draw() if (getVisible() && mAutoUpdate && !mIsMuted && mSpeakerId.notNull()) { setPower(gVoiceClient->getCurrentPower(mSpeakerId)); - setIsTalking(gVoiceClient->getIsSpeaking(mSpeakerId)); + if(mIsAgentControl) + { + setIsTalking(gVoiceClient->getUserPTTState()); + } + else + { + setIsTalking(gVoiceClient->getIsSpeaking(mSpeakerId)); + } } LLPointer<LLUIImage> icon; diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 7a7b8bc3a1..85ea552a57 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -81,6 +81,8 @@ public: // For the current user, need to know the PTT state to show // correct button image. + void setIsAgentControl(bool val) { mIsAgentControl = val; } + void setIsTalking(bool val) { mIsTalking = val; } void setSpeakerId(const LLUUID& speaker_id); @@ -100,6 +102,7 @@ private: F32 mPower; + bool mIsAgentControl; bool mIsMuted; bool mIsTalking; LLPointer<LLUIImage> mImageMute; diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index c28792a711..9d591ef43d 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -59,6 +59,7 @@ #include "lltoolcomp.h" #include "lltoolmgr.h" #include "lltrans.h" +#include "llviewerassettype.h" #include "llviewerobject.h" #include "llviewerregion.h" #include "llviewerwindow.h" @@ -167,7 +168,7 @@ void LLPanelContents::onClickNewScript(void *userdata) PERM_NONE, PERM_MOVE | PERM_TRANSFER); std::string desc; - LLAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc); + LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc); LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem( LLUUID::null, diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 10f015774a..61f2396168 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -291,6 +291,7 @@ void LLPanelGroup::update(LLGroupChange gc) if(gdatap) { childSetValue("group_name", gdatap->mName); + childSetToolTip("group_name",gdatap->mName); LLButton* btn_join = getChild<LLButton>("btn_join"); LLUICtrl* join_text = getChild<LLUICtrl>("join_cost_text"); @@ -337,7 +338,10 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID); if(gdatap) + { childSetValue("group_name", gdatap->mName); + childSetToolTip("group_name",gdatap->mName); + } LLButton* button_apply = findChild<LLButton>("btn_apply"); LLButton* button_refresh = findChild<LLButton>("btn_refresh"); diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index b54975b76b..c9168670d5 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -59,6 +59,14 @@ void LLPanelChatControlPanel::onOpenVoiceControlsClicked() // TODO: implement Voice Control Panel opening } +void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) +{ + bool is_call_started = ( new_state >= LLVoiceChannel::STATE_CALL_STARTED ); + childSetVisible("end_call_btn", is_call_started); + childSetVisible("voice_ctrls_btn", is_call_started); + childSetVisible("call_btn", ! is_call_started); +} + BOOL LLPanelChatControlPanel::postBuild() { childSetAction("call_btn", boost::bind(&LLPanelChatControlPanel::onCallButtonClicked, this)); @@ -76,15 +84,6 @@ void LLPanelChatControlPanel::draw() LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId); if (!session) return; - LLVoiceChannel* voice_channel = session->mVoiceChannel; - if (voice_channel && voice_enabled) - { - bool is_call_started = ( voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED ); - childSetVisible("end_call_btn", is_call_started); - childSetVisible("voice_ctrls_btn", is_call_started); - childSetVisible("call_btn", ! is_call_started); - } - bool session_initialized = session->mSessionInitialized; bool callback_enabled = session->mCallBackEnabled; LLViewerRegion* region = gAgent.getRegion(); @@ -98,6 +97,15 @@ void LLPanelChatControlPanel::draw() LLPanel::draw(); } +void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id) +{ + //Method is called twice for AdHoc and Group chat. Second time when server init reply received + mSessionId = session_id; + LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionId); + if(voice_channel) + voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2)); +} + LLPanelIMControlPanel::LLPanelIMControlPanel() { } @@ -112,21 +120,34 @@ BOOL LLPanelIMControlPanel::postBuild() childSetAction("add_friend_btn", boost::bind(&LLPanelIMControlPanel::onAddFriendButtonClicked, this)); childSetAction("share_btn", boost::bind(&LLPanelIMControlPanel::onShareButtonClicked, this)); + childSetAction("teleport_btn", boost::bind(&LLPanelIMControlPanel::onTeleportButtonClicked, this)); + childSetAction("pay_btn", boost::bind(&LLPanelIMControlPanel::onPayButtonClicked, this)); childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId())); + + return LLPanelChatControlPanel::postBuild(); } +void LLPanelIMControlPanel::onTeleportButtonClicked() +{ + LLAvatarActions::offerTeleport(mAvatarID); +} +void LLPanelIMControlPanel::onPayButtonClicked() +{ + LLAvatarActions::pay(mAvatarID); +} + void LLPanelIMControlPanel::onViewProfileButtonClicked() { - LLAvatarActions::showProfile(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId()); + LLAvatarActions::showProfile(mAvatarID); } void LLPanelIMControlPanel::onAddFriendButtonClicked() { LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon"); std::string full_name = avatar_icon->getFirstName() + " " + avatar_icon->getLastName(); - LLAvatarActions::requestFriendshipDialog(avatar_icon->getAvatarId(), full_name); + LLAvatarActions::requestFriendshipDialog(mAvatarID, full_name); } void LLPanelIMControlPanel::onShareButtonClicked() @@ -140,12 +161,15 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) LLIMModel& im_model = LLIMModel::instance(); - LLUUID avatar_id = im_model.getOtherParticipantID(session_id); + mAvatarID = im_model.getOtherParticipantID(session_id); // Disable "Add friend" button for friends. - childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(avatar_id)); + childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID)); - getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(avatar_id); + getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(mAvatarID); + + // Fetch the currect name + gCacheName->get(mAvatarID, FALSE, boost::bind(&LLPanelIMControlPanel::nameUpdatedCallback, this, _1, _2, _3, _4)); // Disable profile button if participant is not realy SL avatar LLIMModel::LLIMSession* im_session = @@ -154,6 +178,17 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) childSetEnabled("view_profile_btn", FALSE); } +void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group) +{ + if ( id == mAvatarID ) + { + std::string avatar_name; + avatar_name.assign(first); + avatar_name.append(" "); + avatar_name.append(last); + getChild<LLTextBox>("avatar_name")->setValue(avatar_name); + } +} LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id) { @@ -188,6 +223,26 @@ void LLPanelGroupControlPanel::onGroupInfoButtonClicked() LLGroupActions::show(mGroupID); } +void LLPanelGroupControlPanel::onSortMenuItemClicked(const LLSD& userdata) +{ + // TODO: Check this code when when sort order menu will be added. (EM) + if (false && !mParticipantList) + return; + + std::string chosen_item = userdata.asString(); + + if (chosen_item == "sort_name") + { + mParticipantList->setSortOrder(LLParticipantList::E_SORT_BY_NAME); + } + +} + +void LLPanelGroupControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) +{ + LLPanelChatControlPanel::onVoiceChannelStateChanged(old_state, new_state); + mAvatarList->setSpeakingIndicatorsVisible(new_state >= LLVoiceChannel::STATE_CALL_STARTED); +} void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id) { diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index d25f33935a..ac5d86345e 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -34,6 +34,7 @@ #define LL_LLPANELIMCONTROLPANEL_H #include "llpanel.h" +#include "llvoicechannel.h" class LLSpeakerMgr; class LLAvatarList; @@ -52,7 +53,9 @@ public: void onEndCallButtonClicked(); void onOpenVoiceControlsClicked(); - virtual void setSessionId(const LLUUID& session_id) { mSessionId = session_id; } + virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); + + virtual void setSessionId(const LLUUID& session_id); private: LLUUID mSessionId; @@ -69,10 +72,15 @@ public: void setSessionId(const LLUUID& session_id); +protected: + void nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); + private: void onViewProfileButtonClicked(); void onAddFriendButtonClicked(); void onShareButtonClicked(); + void onTeleportButtonClicked(); + void onPayButtonClicked(); LLUUID mAvatarID; }; @@ -97,6 +105,8 @@ protected: private: void onGroupInfoButtonClicked(); + void onSortMenuItemClicked(const LLSD& userdata); + /*virtual*/ void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); }; class LLPanelAdHocControlPanel : public LLPanelGroupControlPanel diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp new file mode 100644 index 0000000000..4985663833 --- /dev/null +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -0,0 +1,420 @@ +/** + * @file llpanellandmarkinfo.cpp + * @brief Displays landmark info in Side Tray. + * + * $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 "llviewerprecompiledheaders.h" + +#include "llpanellandmarkinfo.h" + +#include "llcombobox.h" +#include "lllineeditor.h" +#include "lltextbox.h" +#include "lltexteditor.h" +#include "lltrans.h" + +#include "llagent.h" +#include "llagentui.h" +#include "lllandmarkactions.h" +#include "llviewerinventory.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" + +//---------------------------------------------------------------------------- +// Aux types and methods +//---------------------------------------------------------------------------- + +typedef std::pair<LLUUID, std::string> folder_pair_t; + +static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right); +static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats); + +static LLRegisterPanelClassWrapper<LLPanelLandmarkInfo> t_landmark_info("panel_landmark_info"); + +LLPanelLandmarkInfo::LLPanelLandmarkInfo() +: LLPanelPlaceInfo() +{} + +// virtual +LLPanelLandmarkInfo::~LLPanelLandmarkInfo() +{} + +// virtual +BOOL LLPanelLandmarkInfo::postBuild() +{ + LLPanelPlaceInfo::postBuild(); + + mOwner = getChild<LLTextBox>("owner"); + mCreator = getChild<LLTextBox>("creator"); + mCreated = getChild<LLTextBox>("created"); + + mTitleEditor = getChild<LLLineEditor>("title_editor"); + mNotesEditor = getChild<LLTextEditor>("notes_editor"); + mFolderCombo = getChild<LLComboBox>("folder_combo"); + + return TRUE; +} + +// virtual +void LLPanelLandmarkInfo::resetLocation() +{ + LLPanelPlaceInfo::resetLocation(); + + std::string not_available = getString("not_available"); + mCreator->setText(not_available); + mOwner->setText(not_available); + mCreated->setText(not_available); + mTitleEditor->setText(LLStringUtil::null); + mNotesEditor->setText(LLStringUtil::null); +} + +// virtual +void LLPanelLandmarkInfo::setInfoType(INFO_TYPE type) +{ + LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel"); + + bool is_info_type_create_landmark = type == CREATE_LANDMARK; + bool is_info_type_landmark = type == LANDMARK; + + landmark_info_panel->setVisible(is_info_type_landmark); + + getChild<LLTextBox>("folder_label")->setVisible(is_info_type_create_landmark); + mFolderCombo->setVisible(is_info_type_create_landmark); + + switch(type) + { + case CREATE_LANDMARK: + mCurrentTitle = getString("title_create_landmark"); + + mTitleEditor->setEnabled(TRUE); + mNotesEditor->setEnabled(TRUE); + break; + + case LANDMARK: + default: + mCurrentTitle = getString("title_landmark"); + + mTitleEditor->setEnabled(FALSE); + mNotesEditor->setEnabled(FALSE); + break; + } + + populateFoldersList(); + + LLPanelPlaceInfo::setInfoType(type); +} + +// virtual +void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data) +{ + LLPanelPlaceInfo::processParcelInfo(parcel_data); + + S32 region_x; + S32 region_y; + S32 region_z; + + // If the region position is zero, grab position from the global + if(mPosRegion.isExactlyZero()) + { + region_x = llround(parcel_data.global_x) % REGION_WIDTH_UNITS; + region_y = llround(parcel_data.global_y) % REGION_WIDTH_UNITS; + region_z = llround(parcel_data.global_z); + } + else + { + region_x = llround(mPosRegion.mV[VX]); + region_y = llround(mPosRegion.mV[VY]); + region_z = llround(mPosRegion.mV[VZ]); + } + + if (mInfoType == CREATE_LANDMARK) + { + if (parcel_data.name.empty()) + { + mTitleEditor->setText(llformat("%s (%d, %d, %d)", + parcel_data.sim_name.c_str(), region_x, region_y, region_z)); + } + else + { + mTitleEditor->setText(parcel_data.name); + } + + std::string desc; + LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_FULL, gAgent.getPositionAgent()); + mNotesEditor->setText(desc); + + if (!LLLandmarkActions::landmarkAlreadyExists()) + { + createLandmark(mFolderCombo->getValue().asUUID()); + } + } +} + +void LLPanelLandmarkInfo::displayItemInfo(const LLInventoryItem* pItem) +{ + if (!pItem) + return; + + if(!gCacheName) + return; + + const LLPermissions& perm = pItem->getPermissions(); + + ////////////////// + // CREATOR NAME // + ////////////////// + if (pItem->getCreatorUUID().notNull()) + { + std::string name; + LLUUID creator_id = pItem->getCreatorUUID(); + if (!gCacheName->getFullName(creator_id, name)) + { + gCacheName->get(creator_id, FALSE, + boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mCreator, _2, _3)); + } + mCreator->setText(name); + } + else + { + mCreator->setText(getString("unknown")); + } + + //////////////// + // OWNER NAME // + //////////////// + if(perm.isOwned()) + { + std::string name; + if (perm.isGroupOwned()) + { + LLUUID group_id = perm.getGroup(); + if (!gCacheName->getGroupName(group_id, name)) + { + gCacheName->get(group_id, TRUE, + boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mOwner, _2, _3)); + } + } + else + { + LLUUID owner_id = perm.getOwner(); + if (!gCacheName->getFullName(owner_id, name)) + { + gCacheName->get(owner_id, FALSE, + boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mOwner, _2, _3)); + } + } + mOwner->setText(name); + } + else + { + mOwner->setText(getString("public")); + } + + ////////////////// + // ACQUIRE DATE // + ////////////////// + time_t time_utc = pItem->getCreationDate(); + if (0 == time_utc) + { + mCreated->setText(getString("unknown")); + } + else + { + std::string timeStr = getString("acquired_date"); + LLSD substitution; + substitution["datetime"] = (S32) time_utc; + LLStringUtil::format (timeStr, substitution); + mCreated->setText(timeStr); + } + + mTitleEditor->setText(pItem->getName()); + mNotesEditor->setText(pItem->getDescription()); +} + +void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled) +{ + // If switching to edit mode while creating landmark + // the "Create Landmark" title remains. + if (enabled && mInfoType != CREATE_LANDMARK) + { + mTitle->setText(getString("title_edit_landmark")); + } + else + { + mTitle->setText(mCurrentTitle); + } + + if (mNotesEditor->getReadOnly() == (enabled == TRUE)) + { + mTitleEditor->setEnabled(enabled); + mNotesEditor->setReadOnly(!enabled); + mFolderCombo->setVisible(enabled); + getChild<LLTextBox>("folder_label")->setVisible(enabled); + + // HACK: To change the text color in a text editor + // when it was enabled/disabled we set the text once again. + mNotesEditor->setText(mNotesEditor->getText()); + } +} + +const std::string& LLPanelLandmarkInfo::getLandmarkTitle() const +{ + return mTitleEditor->getText(); +} + +const std::string LLPanelLandmarkInfo::getLandmarkNotes() const +{ + return mNotesEditor->getText(); +} + +const LLUUID LLPanelLandmarkInfo::getLandmarkFolder() const +{ + return mFolderCombo->getValue().asUUID(); +} + +BOOL LLPanelLandmarkInfo::setLandmarkFolder(const LLUUID& id) +{ + return mFolderCombo->setCurrentByID(id); +} + +void LLPanelLandmarkInfo::createLandmark(const LLUUID& folder_id) +{ + std::string name = mTitleEditor->getText(); + std::string desc = mNotesEditor->getText(); + + LLStringUtil::trim(name); + LLStringUtil::trim(desc); + + // If typed name is empty use the parcel name instead. + if (name.empty()) + { + name = mParcelName->getText(); + + // If no parcel exists use the region name instead. + if (name.empty()) + { + name = mRegionName->getText(); + } + } + + LLStringUtil::replaceChar(desc, '\n', ' '); + // If no folder chosen use the "Landmarks" folder. + LLLandmarkActions::createLandmarkHere(name, desc, + folder_id.notNull() ? folder_id : gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK)); +} + +// static +std::string LLPanelLandmarkInfo::getFullFolderName(const LLViewerInventoryCategory* cat) +{ + std::string name = cat->getName(); + LLUUID parent_id; + + // translate category name, if it's right below the root + // FIXME: it can throw notification about non existent string in strings.xml + if (cat->getParentUUID().notNull() && cat->getParentUUID() == gInventory.getRootFolderID()) + { + LLTrans::findString(name, "InvFolder " + name); + } + + // we don't want "My Inventory" to appear in the name + while ((parent_id = cat->getParentUUID()).notNull() && parent_id != gInventory.getRootFolderID()) + { + cat = gInventory.getCategory(parent_id); + name = cat->getName() + "/" + name; + } + + return name; +} + +void LLPanelLandmarkInfo::populateFoldersList() +{ + // Collect all folders that can contain landmarks. + LLInventoryModel::cat_array_t cats; + collectLandmarkFolders(cats); + + mFolderCombo->removeall(); + + // Put the "Landmarks" folder first in list. + LLUUID landmarks_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); + const LLViewerInventoryCategory* cat = gInventory.getCategory(landmarks_id); + if (!cat) + { + llwarns << "Cannot find the landmarks folder" << llendl; + } + std::string cat_full_name = getFullFolderName(cat); + mFolderCombo->add(cat_full_name, cat->getUUID()); + + typedef std::vector<folder_pair_t> folder_vec_t; + folder_vec_t folders; + // Sort the folders by their full name. + for (S32 i = 0; i < cats.count(); i++) + { + cat = cats.get(i); + cat_full_name = getFullFolderName(cat); + folders.push_back(folder_pair_t(cat->getUUID(), cat_full_name)); + } + sort(folders.begin(), folders.end(), cmp_folders); + + // Finally, populate the combobox. + for (folder_vec_t::const_iterator it = folders.begin(); it != folders.end(); it++) + mFolderCombo->add(it->second, LLSD(it->first)); +} + +static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right) +{ + return left.second < right.second; +} + +static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats) +{ + LLUUID landmarks_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); + + // Add descendent folders of the "Landmarks" category. + LLInventoryModel::item_array_t items; // unused + LLIsType is_category(LLAssetType::AT_CATEGORY); + gInventory.collectDescendentsIf( + landmarks_id, + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + is_category); + + // Add the "My Favorites" category. + LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + LLViewerInventoryCategory* favorites_cat = gInventory.getCategory(favorites_id); + if (!favorites_cat) + { + llwarns << "Cannot find the favorites folder" << llendl; + } + else + { + cats.put(favorites_cat); + } +} diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h new file mode 100644 index 0000000000..73e0ddb9cc --- /dev/null +++ b/indra/newview/llpanellandmarkinfo.h @@ -0,0 +1,85 @@ +/** + * @file llpanellandmarkinfo.h + * @brief Displays landmark info in Side Tray. + * + * $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_LLPANELLANDMARKINFO_H +#define LL_LLPANELLANDMARKINFO_H + +#include "llpanelplaceinfo.h" + +class LLComboBox; +class LLLineEditor; +class LLTextEditor; + +class LLPanelLandmarkInfo : public LLPanelPlaceInfo +{ +public: + LLPanelLandmarkInfo(); + /*virtual*/ ~LLPanelLandmarkInfo(); + + /*virtual*/ BOOL postBuild(); + + /*virtual*/ void resetLocation(); + + /*virtual*/ void setInfoType(INFO_TYPE type); + + /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); + + // Displays landmark owner, creator and creation date info. + void displayItemInfo(const LLInventoryItem* pItem); + + void toggleLandmarkEditMode(BOOL enabled); + + const std::string& getLandmarkTitle() const; + const std::string getLandmarkNotes() const; + const LLUUID getLandmarkFolder() const; + + // Select current landmark folder in combobox. + BOOL setLandmarkFolder(const LLUUID& id); + + // Create a landmark for the current location + // in a folder specified by folder_id. + void createLandmark(const LLUUID& folder_id); + + static std::string getFullFolderName(const LLViewerInventoryCategory* cat); + +private: + void populateFoldersList(); + + LLTextBox* mOwner; + LLTextBox* mCreator; + LLTextBox* mCreated; + LLLineEditor* mTitleEditor; + LLTextEditor* mNotesEditor; + LLComboBox* mFolderCombo; +}; + +#endif // LL_LLPANELLANDMARKINFO_H diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index cb5f471837..dc0a49b6e2 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2001-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -101,6 +101,8 @@ BOOL LLLandmarksPanel::postBuild() initLandmarksInventroyPanel(); initMyInventroyPanel(); initLibraryInventroyPanel(); + getChild<LLAccordionCtrlTab>("tab_favorites")->setDisplayChildren(true); + getChild<LLAccordionCtrlTab>("tab_landmarks")->setDisplayChildren(true); gIdleCallbacks.addFunction(LLLandmarksPanel::doIdle, this); return TRUE; @@ -422,6 +424,7 @@ void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLIn mAccordionTabs.push_back(accordion_tab); accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLLandmarksPanel::onAccordionExpandedCollapsed, this, _2, inventory_list)); + accordion_tab->setDisplayChildren(false); } void LLLandmarksPanel::onAccordionExpandedCollapsed(const LLSD& param, LLInventorySubTreePanel* inventory_list) @@ -553,14 +556,16 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const std::string command_name = userdata.asString(); if("add_landmark" == command_name) { - if(LLLandmarkActions::landmarkAlreadyExists()) + LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos(); + if(landmark) + { + LLSideTray::getInstance()->showPanel("panel_places", + LLSD().insert("type", "landmark").insert("id",landmark->getUUID())); + } + else { - std::string location; - LLAgentUI::buildLocationString(location, LLAgentUI::LOCATION_FORMAT_FULL); - llwarns<<" Landmark already exists at location: "<< location<<llendl; - return; + LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); } - LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); } else if ("category" == command_name) { @@ -584,7 +589,7 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const menu_create_inventory_item(mCurrentSelectedList->getRootFolder(), dynamic_cast<LLFolderBridge*> (folder_bridge), LLSD( "category"), gInventory.findCategoryUUIDForType( - LLAssetType::AT_LANDMARK)); + LLFolderType::FT_LANDMARK)); } } } diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 6498f2c778..745f9364c2 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2001-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 24e76e2c6e..5d826f0a56 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -198,7 +198,16 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, //leave room for the login menu bar setRect(LLRect(0, rect.getHeight()-18, rect.getWidth(), 0)); #endif - reshape(rect.getWidth(), rect.getHeight()); + // Legacy login web page is hidden under the menu bar. + // Adjust reg-in-client web browser widget to not be hidden. + if (gSavedSettings.getBOOL("RegInClient")) + { + reshape(rect.getWidth(), rect.getHeight() - MENU_BAR_HEIGHT); + } + else + { + reshape(rect.getWidth(), rect.getHeight()); + } #if !USE_VIEWER_AUTH childSetPrevalidate("first_name_edit", LLLineEditor::prevalidatePrintableNoSpace); @@ -234,9 +243,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, childSetAction("connect_btn", onClickConnect, this); - setDefaultBtn("connect_btn"); - - // childSetAction("quit_btn", onClickQuit, this); + getChild<LLPanel>("login_widgets")->setDefaultBtn("connect_btn"); std::string channel = gSavedSettings.getString("VersionChannelName"); std::string version = llformat("%d.%d.%d (%d)", @@ -267,19 +274,20 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, web_browser->setTabStop(FALSE); // web_browser->navigateToLocalPage( "loading", "loading.html" ); - // make links open in external browser - web_browser->setOpenInExternalBrowser( true ); + if (gSavedSettings.getBOOL("RegInClient")) + { + // need to follow links in the internal browser + web_browser->setOpenInExternalBrowser( false ); - // force the size to be correct (XML doesn't seem to be sufficient to do this) (with some padding so the other login screen doesn't show through) - LLRect htmlRect = getRect(); -#if USE_VIEWER_AUTH - htmlRect.setCenterAndSize( getRect().getCenterX() - 2, getRect().getCenterY(), getRect().getWidth() + 6, getRect().getHeight()); -#else - htmlRect.setCenterAndSize( getRect().getCenterX() - 2, getRect().getCenterY() + 40, getRect().getWidth() + 6, getRect().getHeight() - 78 ); -#endif - web_browser->setRect( htmlRect ); - web_browser->reshape( htmlRect.getWidth(), htmlRect.getHeight(), TRUE ); - reshape( getRect().getWidth(), getRect().getHeight(), 1 ); + getChild<LLView>("login_widgets")->setVisible(false); + } + else + { + // make links open in external browser + web_browser->setOpenInExternalBrowser( true ); + + reshapeBrowser(); + } // kick off a request to grab the url manually gResponsePtr = LLIamHereLogin::build( this ); @@ -297,6 +305,27 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, } +// force the size to be correct (XML doesn't seem to be sufficient to do this) +// (with some padding so the other login screen doesn't show through) +void LLPanelLogin::reshapeBrowser() +{ + LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html"); + LLRect rect = gViewerWindow->getVirtualWindowRect(); + LLRect html_rect; +#if USE_VIEWER_AUTH + html_rect.setCenterAndSize( + rect.getCenterX() - 2, rect.getCenterY(), + rect.getWidth() + 6, rect.getHeight()); +#else + html_rect.setCenterAndSize( + rect.getCenterX() - 2, rect.getCenterY() + 40, + rect.getWidth() + 6, rect.getHeight() - 78 ); +#endif + web_browser->setRect( html_rect ); + web_browser->reshape( html_rect.getWidth(), html_rect.getHeight(), TRUE ); + reshape( rect.getWidth(), rect.getHeight(), 1 ); +} + void LLPanelLogin::setSiteIsAlive( bool alive ) { LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html"); @@ -384,10 +413,14 @@ void LLPanelLogin::draw() if ( mHtmlAvailable ) { #if !USE_VIEWER_AUTH - // draw a background box in black - gl_rect_2d( 0, height - 264, width, 264, LLColor4( 0.0f, 0.0f, 0.0f, 1.f ) ); - // draw the bottom part of the background image - just the blue background to the native client UI - mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight()); + if (getChild<LLView>("login_widgets")->getVisible()) + { + // draw a background box in black + gl_rect_2d( 0, height - 264, width, 264, LLColor4::black ); + // draw the bottom part of the background image + // just the blue background to the native client UI + mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight()); + } #endif } else @@ -418,12 +451,6 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask) return TRUE; } - if (KEY_RETURN == key && MASK_NONE == mask) - { - // let the panel handle UICtrl processing: calls onClickConnect() - return LLPanel::handleKeyHere(key, mask); - } - return LLPanel::handleKeyHere(key, mask); } @@ -483,6 +510,19 @@ void LLPanelLogin::giveFocus() #endif } +// static +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); +} // static void LLPanelLogin::show(const LLRect &rect, @@ -797,8 +837,17 @@ void LLPanelLogin::loadLoginPage() LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html"); - // navigate to the "real" page - web_browser->navigateTo( oStr.str(), "text/html" ); + // navigate to the "real" page + if (gSavedSettings.getBOOL("RegInClient")) + { + web_browser->setFocus(TRUE); + login_page = sInstance->getString("reg_in_client_url"); + web_browser->navigateTo(login_page, "text/html"); + } + else + { + web_browser->navigateTo( oStr.str(), "text/html" ); + } } void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event) @@ -883,22 +932,6 @@ void LLPanelLogin::onClickNewAccount(void*) } -// *NOTE: This function is dead as of 2008 August. I left it here in case -// we suddenly decide to put the Quit button back. JC -// static -void LLPanelLogin::onClickQuit(void*) -{ - if (sInstance && sInstance->mCallback) - { - // tell the responder we're not here anymore - if ( gResponsePtr ) - gResponsePtr->setParent( 0 ); - - sInstance->mCallback(1, sInstance->mCallbackData); - } -} - - // static void LLPanelLogin::onClickVersion(void*) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 5692b8d345..acb2001c22 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -56,6 +56,10 @@ public: virtual void draw(); virtual void setFocus( BOOL b ); + // Show the XUI first name, last name, and password widgets. They are + // hidden on startup for reg-in-client + static void showLoginWidgets(); + static void show(const LLRect &rect, BOOL show_server, void (*callback)(S32 option, void* user_data), void* callback_data); @@ -86,10 +90,10 @@ public: /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); private: + void reshapeBrowser(); static void onClickConnect(void*); static void onClickNewAccount(void*); // static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response); - static void onClickQuit(void*); static void onClickVersion(void*); static void onClickForgotPassword(void*); static void onPassKey(LLLineEditor* caller, void* user_data); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index f4c88b9f82..15a75cb930 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -102,8 +102,8 @@ LLPanelMainInventory::LLPanelMainInventory() // Menu Callbacks (non contex menus)
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelMainInventory::doToSelected, this, _2));
mCommitCallbackRegistrar.add("Inventory.CloseAllFolders", boost::bind(&LLPanelMainInventory::closeAllFolders, this));
- mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLAssetType::AT_TRASH));
- mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLAssetType::AT_LOST_AND_FOUND));
+ mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
+ mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND));
mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLPanelMainInventory::doCreate, this, _2));
mCommitCallbackRegistrar.add("Inventory.NewWindow", boost::bind(&LLPanelMainInventory::newWindow, this));
mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this));
@@ -950,12 +950,12 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) if (command_name == "empty_trash")
{
const std::string notification = "ConfirmEmptyTrash";
- gInventory.emptyFolderType(notification, LLAssetType::AT_TRASH);
+ gInventory.emptyFolderType(notification, LLFolderType::FT_TRASH);
}
if (command_name == "empty_lostnfound")
{
const std::string notification = "ConfirmEmptyLostAndFound";
- gInventory.emptyFolderType(notification, LLAssetType::AT_LOST_AND_FOUND);
+ gInventory.emptyFolderType(notification, LLFolderType::FT_LOST_AND_FOUND);
}
if (command_name == "save_texture")
{
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 85efe0f93e..5186a5888b 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -55,6 +55,8 @@ #include "llfloatertools.h" #include "lltrans.h" +const char *CHECKERBOARD_DATA_URL = "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22100%%22 height=%22100%%22 %3E%3Cdefs%3E%3Cpattern id=%22checker%22 patternUnits=%22userSpaceOnUse%22 x=%220%22 y=%220%22 width=%22128%22 height=%22128%22 viewBox=%220 0 128 128%22 %3E%3Crect x=%220%22 y=%220%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3Crect x=%2264%22 y=%2264%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3C/pattern%3E%3C/defs%3E%3Crect x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22 fill=%22url(#checker)%22 /%3E%3C/svg%3E"; + //////////////////////////////////////////////////////////////////////////////// // LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() : @@ -97,7 +99,6 @@ BOOL LLPanelMediaSettingsGeneral::postBuild() childSetCommitCallback( "current_url_reset_btn",onBtnResetCurrentUrl, this); // interrogates controls and updates widgets as required updateMediaPreview(); - updateCurrentURL(); return true; } @@ -160,9 +161,9 @@ void LLPanelMediaSettingsGeneral::draw() }; }; - // current URL can change over time. -// updateCurrentURL(); - + // current URL can change over time, update it here + updateCurrentUrl(); + LLPermissions perm; bool user_can_press_reset = mMediaEditable; @@ -215,26 +216,15 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable) self->updateMediaPreview(); } -//////////////////////////////////////////////////////////////////////////////// -// static -void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_settings ,bool editable) +// static +bool LLPanelMediaSettingsGeneral::isMultiple() { - LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata; - self->mMediaEditable = editable; - - //llinfos << "---------------" << llendl; - //llinfos << ll_pretty_print_sd(media_settings) << llendl; - //llinfos << "---------------" << llendl; - // IF all the faces have media (or all dont have media) if ( LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo ) { if(LLFloaterMediaSettings::getInstance()->mMultipleMedia) { - self->clearValues(self, self->mMediaEditable); - // only show multiple - self->mHomeURL ->setText(LLTrans::getString("Multiple Media")); - return; + return true; } } @@ -242,13 +232,32 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_ { if(LLFloaterMediaSettings::getInstance()->mMultipleValidMedia) { - self->clearValues(self, self->mMediaEditable); - // only show multiple - self->mHomeURL ->setText(LLTrans::getString("Multiple Media")); - return; - } - + return true; + } } + return false; +} + +//////////////////////////////////////////////////////////////////////////////// +// static +void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_settings ,bool editable) +{ + LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata; + self->mMediaEditable = editable; + + //llinfos << "---------------" << llendl; + //llinfos << ll_pretty_print_sd(media_settings) << llendl; + //llinfos << "---------------" << llendl; + + if ( LLPanelMediaSettingsGeneral::isMultiple() ) + { + self->clearValues(self, self->mMediaEditable); + // only show multiple + self->mHomeURL->setText(LLTrans::getString("Multiple Media")); + self->mCurrentURL->setText(LLTrans::getString("Multiple Media")); + return; + } + std::string base_key( "" ); std::string tentative_key( "" ); @@ -305,7 +314,6 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_ // interrogates controls and updates widgets as required self->updateMediaPreview(); - self->updateCurrentURL(); } //////////////////////////////////////////////////////////////////////////////// @@ -320,22 +328,11 @@ void LLPanelMediaSettingsGeneral::updateMediaPreview() // new home URL will be empty if media is deleted so display a // "preview goes here" data url page { - mPreviewMedia->navigateTo( "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22100%%22 height=%22100%%22 %3E%3Cdefs%3E%3Cpattern id=%22checker%22 patternUnits=%22userSpaceOnUse%22 x=%220%22 y=%220%22 width=%22128%22 height=%22128%22 viewBox=%220 0 128 128%22 %3E%3Crect x=%220%22 y=%220%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3Crect x=%2264%22 y=%2264%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3C/pattern%3E%3C/defs%3E%3Crect x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22 fill=%22url(#checker)%22 /%3E%3C/svg%3E" ); + mPreviewMedia->navigateTo( CHECKERBOARD_DATA_URL ); }; } //////////////////////////////////////////////////////////////////////////////// -// Helper to set current URL -void LLPanelMediaSettingsGeneral::updateCurrentURL() -{ - if( mCurrentURL->getText().empty() ) - { - childSetText( "current_url", mHomeURL->getText() ); - } - -} - -//////////////////////////////////////////////////////////////////////////////// // virtual void LLPanelMediaSettingsGeneral::onClose(bool app_quitting) @@ -441,6 +438,8 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace() LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection(); selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated ); + // Note: we don't update the 'current URL' field until the media data itself changes + return all_face_media_navigated; } @@ -451,3 +450,31 @@ const std::string LLPanelMediaSettingsGeneral::getHomeUrl() return mHomeURL->getValue().asString(); } +//////////////////////////////////////////////////////////////////////////////// +// +void LLPanelMediaSettingsGeneral::updateCurrentUrl() +{ + // Get the current URL from the selection + + const LLMediaEntry default_media_data; + std::string value_str = default_media_data.getCurrentURL(); + struct functor_getter_current_url : public LLSelectedTEGetFunctor< std::string > + { + functor_getter_current_url(const LLMediaEntry& entry): mMediaEntry(entry) {} + + std::string get( LLViewerObject* object, S32 face ) + { + if ( object ) + if ( object->getTE(face) ) + if ( object->getTE(face)->getMediaData() ) + return object->getTE(face)->getMediaData()->getCurrentURL(); + return mMediaEntry.getCurrentURL(); + }; + + const LLMediaEntry & mMediaEntry; + + } func_current_url(default_media_data); + bool identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func_current_url, value_str ); + mCurrentURL->setText(value_str); + mCurrentURL->setTentative(identical); +} diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h index e82a31382e..b48e081a1b 100644 --- a/indra/newview/llpanelmediasettingsgeneral.h +++ b/indra/newview/llpanelmediasettingsgeneral.h @@ -63,7 +63,6 @@ public: bool navigateHomeSelectedFace(); void updateMediaPreview(); - void updateCurrentURL(); const std::string getHomeUrl(); @@ -72,8 +71,12 @@ protected: bool mMediaEditable; private: + void updateCurrentUrl(); + static void onBtnResetCurrentUrl(LLUICtrl* ctrl, void *userdata); static void onCommitHomeURL(LLUICtrl* ctrl, void *userdata ); + + static bool isMultiple(); LLComboBox* mControls; LLCheckBoxCtrl* mAutoLoop; diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 68181f12b9..79b33e29f5 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -60,6 +60,7 @@ #include "llsidetray.h" #include "llstatusbar.h" #include "lltrans.h" +#include "llviewerassettype.h" #include "llviewerregion.h" #include "llviewerobjectlist.h" #include "llviewermessage.h" @@ -102,7 +103,7 @@ public: virtual const std::string& getName() const; virtual const std::string& getDisplayName() const; virtual PermissionMask getPermissionMask() const { return PERM_NONE; } - /*virtual*/ LLAssetType::EType getPreferredType() const { return LLAssetType::AT_NONE; } + /*virtual*/ LLFolderType::EType getPreferredType() const { return LLFolderType::FT_NONE; } virtual const LLUUID& getUUID() const { return mUUID; } virtual time_t getCreationDate() const; virtual LLUIImagePtr getIcon() const; @@ -275,7 +276,7 @@ bool LLTaskInvFVBridge::commitBuyItem(const LLSD& notification, const LLSD& resp msg->addUUIDFast(_PREHASH_ObjectID, notification["payload"]["task_id"].asUUID()); msg->addUUIDFast(_PREHASH_ItemID, notification["payload"]["item_id"].asUUID()); msg->addUUIDFast(_PREHASH_FolderID, - gInventory.findCategoryUUIDForType((LLAssetType::EType)notification["payload"]["type"].asInteger())); + gInventory.findCategoryUUIDForType((LLFolderType::EType)notification["payload"]["type"].asInteger())); msg->sendReliable(object->getRegion()->getHost()); } return false; @@ -573,7 +574,7 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const // || gAgent.isGodlike()) { - *type = LLAssetType::lookupDragAndDropType(inv->getType()); + *type = LLViewerAssetType::lookupDragAndDropType(inv->getType()); *id = inv->getUUID(); return TRUE; @@ -778,7 +779,7 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const // || gAgent.isGodlike()) { - *type = LLAssetType::lookupDragAndDropType(inv->getType()); + *type = LLViewerAssetType::lookupDragAndDropType(inv->getType()); *id = inv->getUUID(); return TRUE; @@ -1461,7 +1462,6 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* item->getFlags()); break; case LLAssetType::AT_CATEGORY: - case LLAssetType::AT_FAVORITE: new_bridge = new LLTaskCategoryBridge(panel, object->getUUID(), object->getName()); @@ -1503,8 +1503,8 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par { // Setup context menu callbacks mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelObjectInventory::doToSelected, this, _2)); - mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLAssetType::AT_TRASH)); - mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLAssetType::AT_LOST_AND_FOUND)); + mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH)); + mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND)); mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing)); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 4580eeb336..65a7b5322b 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -42,6 +42,7 @@ #include "llpanelpeople.h" // newview +#include "llaccordionctrl.h" #include "llaccordionctrltab.h" #include "llagent.h" #include "llavataractions.h" @@ -453,7 +454,7 @@ BOOL LLPanelPeople::postBuild() mNearbyList->setCommitCallback(boost::bind(&LLPanelPeople::onAvatarListCommitted, this, mNearbyList)); mRecentList->setCommitCallback(boost::bind(&LLPanelPeople::onAvatarListCommitted, this, mRecentList)); - mGroupList->setDoubleClickCallback(boost::bind(&LLPanelPeople::onGroupInfoButtonClicked, this)); + mGroupList->setDoubleClickCallback(boost::bind(&LLPanelPeople::onChatButtonClicked, this)); mGroupList->setCommitCallback(boost::bind(&LLPanelPeople::updateButtons, this)); LLAccordionCtrlTab* accordion_tab = getChild<LLAccordionCtrlTab>("tab_all"); @@ -516,6 +517,9 @@ BOOL LLPanelPeople::postBuild() // call this method in case some list is empty and buttons can be in inconsistent state updateButtons(); + mOnlineFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2)); + mAllFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2)); + return TRUE; } @@ -560,6 +564,8 @@ void LLPanelPeople::updateFriendList() mOnlineFriendList->setDirty(); mAllFriendList->setDirty(); + + showFriendsAccordionsIfNeeded(); } void LLPanelPeople::updateNearbyList() @@ -797,14 +803,15 @@ void LLPanelPeople::reSelectedCurrentTab() void LLPanelPeople::onFilterEdit(const std::string& search_string) { - if (mFilterSubString == search_string) - return; + std::string search_upper = search_string; + // Searches are case-insensitive + LLStringUtil::toUpper(search_upper); + LLStringUtil::trimHead(search_upper); - mFilterSubString = search_string; + if (mFilterSubString == search_upper) + return; - // Searches are case-insensitive - LLStringUtil::toUpper(mFilterSubString); - LLStringUtil::trimHead(mFilterSubString); + mFilterSubString = search_upper; // Apply new filter. mNearbyList->setNameFilter(mFilterSubString); @@ -812,6 +819,8 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string) mAllFriendList->setNameFilter(mFilterSubString); mRecentList->setNameFilter(mFilterSubString); mGroupList->setNameFilter(mFilterSubString); + + showFriendsAccordionsIfNeeded(); } void LLPanelPeople::onTabSelected(const LLSD& param) @@ -983,9 +992,6 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata) mAllFriendList->toggleIcons(); mOnlineFriendList->toggleIcons(); } - else if (chosen_item == "organize_offline") - { - } } void LLPanelPeople::onGroupsViewSortMenuItemClicked(const LLSD& userdata) @@ -1124,3 +1130,49 @@ void LLPanelPeople::onOpen(const LLSD& key) else reSelectedCurrentTab(); } + +void LLPanelPeople::showAccordion(const std::string name, bool show) +{ + if(name.empty()) + { + llwarns << "No name provided" << llendl; + return; + } + + LLAccordionCtrlTab* tab = getChild<LLAccordionCtrlTab>(name); + tab->setVisible(show); + if(show) + { + // expand accordion + tab->changeOpenClose(false); + } +} + +void LLPanelPeople::showFriendsAccordionsIfNeeded() +{ + if(FRIENDS_TAB_NAME == getActiveTabName()) + { + // Expand and show accordions if needed, else - hide them + showAccordion("tab_online", mOnlineFriendList->filterHasMatches()); + showAccordion("tab_all", mAllFriendList->filterHasMatches()); + + // Rearrange accordions + LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion"); + accordion->arrange(); + } +} + +void LLPanelPeople::onFriendListRefreshComplete(LLUICtrl*ctrl, const LLSD& param) +{ + if(ctrl == mOnlineFriendList) + { + showAccordion("tab_online", param.asInteger()); + } + else if(ctrl == mAllFriendList) + { + showAccordion("tab_all", param.asInteger()); + } + + LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion"); + accordion->arrange(); +} diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index dc0aaeb70f..9bf9befe90 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -124,6 +124,12 @@ private: void onFriendsAccordionExpandedCollapsed(const LLSD& param, LLAvatarList* avatar_list); + void showAccordion(const std::string name, bool show); + + void showFriendsAccordionsIfNeeded(); + + void onFriendListRefreshComplete(LLUICtrl*ctrl, const LLSD& param); + LLFilterEditor* mFilterEditor; LLTabContainer* mTabContainer; LLAvatarList* mOnlineFriendList; diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp index e725479abb..f5c4f89702 100644 --- a/indra/newview/llpanelpick.cpp +++ b/indra/newview/llpanelpick.cpp @@ -40,6 +40,7 @@ #include "llagent.h" #include "llagentpicksinfo.h" #include "llbutton.h" +#include "lliconctrl.h" #include "lllineeditor.h" #include "llparcel.h" #include "llviewerparcelmgr.h" @@ -62,6 +63,7 @@ #define XML_SNAPSHOT "pick_snapshot" #define XML_LOCATION "pick_location" +#define XML_BTN_ON_TXTR "edit_icon" #define XML_BTN_SAVE "save_changes_btn" #define SAVE_BTN_LABEL "[WHAT]" @@ -401,8 +403,6 @@ BOOL LLPanelPickEdit::postBuild() LLPanelPickInfo::postBuild(); mSnapshotCtrl->setOnSelectCallback(boost::bind(&LLPanelPickEdit::onPickChanged, this, _1)); - mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelPickEdit::childSetVisible, this, "edit_icon", true)); - mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelPickEdit::childSetVisible, this, "edit_icon", false)); LLLineEditor* line_edit = getChild<LLLineEditor>("pick_name"); line_edit->setKeystrokeCallback(boost::bind(&LLPanelPickEdit::onPickChanged, this, _1), NULL); @@ -413,6 +413,8 @@ BOOL LLPanelPickEdit::postBuild() childSetAction(XML_BTN_SAVE, boost::bind(&LLPanelPickEdit::onClickSave, this)); childSetAction("set_to_curr_location_btn", boost::bind(&LLPanelPickEdit::onClickSetLocation, this)); + initTexturePickerMouseEvents(); + return TRUE; } @@ -547,3 +549,23 @@ void LLPanelPickEdit::processProperties(void* data, EAvatarProcessorType type) LLPanelPickInfo::processProperties(data, type); } } + +// PRIVATE AREA + +void LLPanelPickEdit::initTexturePickerMouseEvents() +{ + text_icon = getChild<LLIconCtrl>(XML_BTN_ON_TXTR); + mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelPickEdit::onTexturePickerMouseEnter, this, _1)); + mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelPickEdit::onTexturePickerMouseLeave, this, _1)); + text_icon->setVisible(FALSE); +} + +void LLPanelPickEdit::onTexturePickerMouseEnter(LLUICtrl* ctrl) +{ + text_icon->setVisible(TRUE); +} + +void LLPanelPickEdit::onTexturePickerMouseLeave(LLUICtrl* ctrl) +{ + text_icon->setVisible(FALSE); +} diff --git a/indra/newview/llpanelpick.h b/indra/newview/llpanelpick.h index 9b605cd6b1..2c0830f2ac 100644 --- a/indra/newview/llpanelpick.h +++ b/indra/newview/llpanelpick.h @@ -41,6 +41,7 @@ #include "llremoteparcelrequest.h" #include "llavatarpropertiesprocessor.h" +class LLIconCtrl; class LLTextureCtrl; class LLMessageSystem; class LLAvatarPropertiesObserver; @@ -236,6 +237,16 @@ protected: bool mLocationChanged; bool mNeedData; bool mNewPick; + +private: + + void initTexturePickerMouseEvents(); + void onTexturePickerMouseEnter(LLUICtrl* ctrl); + void onTexturePickerMouseLeave(LLUICtrl* ctrl); + +private: + + LLIconCtrl* text_icon; }; #endif // LL_LLPANELPICK_H diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 6181531f82..2bf04f9681 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h index 06a0f0a0fd..5a2754ad10 100644 --- a/indra/newview/llpanelpicks.h +++ b/indra/newview/llpanelpicks.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 34644cfe42..c600651015 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -1,10 +1,10 @@ /** * @file llpanelplaceinfo.cpp - * @brief Displays place information in Side Tray. + * @brief Base class for place information in Side Tray. * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -38,67 +38,30 @@ #include "llsdutil.h" #include "llsecondlifeurls.h" -#include "llinventory.h" -#include "llparcel.h" - -#include "llqueryflags.h" +#include "llsdutil_math.h" -#include "llbutton.h" -#include "llcombobox.h" -#include "lliconctrl.h" #include "llscrollcontainer.h" #include "lltextbox.h" -#include "lltrans.h" -#include "llaccordionctrl.h" -#include "llaccordionctrltab.h" #include "llagent.h" -#include "llagentui.h" -#include "llappviewer.h" #include "llavatarpropertiesprocessor.h" -#include "llcallbacklist.h" #include "llexpandabletextbox.h" -#include "llfloaterworldmap.h" -#include "llfloaterbuycurrency.h" -#include "llinventorymodel.h" -#include "lllandmarkactions.h" #include "llpanelpick.h" #include "lltexturectrl.h" -#include "llstatusbar.h" #include "llviewerinventory.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" -#include "llviewercontrol.h" #include "llviewertexteditor.h" -#include "llworldmap.h" -#include "llsdutil_math.h" - -//---------------------------------------------------------------------------- -// Aux types and methods -//---------------------------------------------------------------------------- - -typedef std::pair<LLUUID, std::string> folder_pair_t; - -static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right); -static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats); - -static LLRegisterPanelClassWrapper<LLPanelPlaceInfo> t_place_info("panel_place_info"); LLPanelPlaceInfo::LLPanelPlaceInfo() : LLPanel(), mParcelID(), mRequestedID(), mPosRegion(), - mLandmarkID(), - mMinHeight(0), - mScrollingPanel(NULL), - mInfoPanel(NULL), - mMediaPanel(NULL), - mForSalePanel(NULL), - mYouAreHerePanel(NULL), - mSelectedParcelID(-1) + mMinHeight(0) {} +//virtual LLPanelPlaceInfo::~LLPanelPlaceInfo() { if (mParcelID.notNull()) @@ -107,220 +70,41 @@ LLPanelPlaceInfo::~LLPanelPlaceInfo() } } +//virtual BOOL LLPanelPlaceInfo::postBuild() { - mTitle = getChild<LLTextBox>("panel_title"); + mTitle = getChild<LLTextBox>("title"); mCurrentTitle = mTitle->getText(); - mForSalePanel = getChild<LLPanel>("for_sale_panel"); - mYouAreHerePanel = getChild<LLPanel>("here_panel"); - gIdleCallbacks.addFunction(&LLPanelPlaceInfo::updateYouAreHereBanner, this); - - //Icon value should contain sale price of last selected parcel. - mForSalePanel->getChild<LLIconCtrl>("icon_for_sale")-> - setMouseDownCallback(boost::bind(&LLPanelPlaceInfo::onForSaleBannerClick, this)); - mSnapshotCtrl = getChild<LLTextureCtrl>("logo"); mRegionName = getChild<LLTextBox>("region_title"); mParcelName = getChild<LLTextBox>("parcel_title"); mDescEditor = getChild<LLExpandableTextBox>("description"); mMaturityRatingText = getChild<LLTextBox>("maturity_value"); - mParcelOwner = getChild<LLTextBox>("owner_value"); - mLastVisited = getChild<LLTextBox>("last_visited_value"); - - mRatingText = getChild<LLTextBox>("rating_value"); - mVoiceText = getChild<LLTextBox>("voice_value"); - mFlyText = getChild<LLTextBox>("fly_value"); - mPushText = getChild<LLTextBox>("push_value"); - mBuildText = getChild<LLTextBox>("build_value"); - mScriptsText = getChild<LLTextBox>("scripts_value"); - mDamageText = getChild<LLTextBox>("damage_value"); - - mRegionNameText = getChild<LLTextBox>("region_name"); - mRegionTypeText = getChild<LLTextBox>("region_type"); - mRegionRatingText = getChild<LLTextBox>("region_rating"); - mRegionOwnerText = getChild<LLTextBox>("region_owner"); - mRegionGroupText = getChild<LLTextBox>("region_group"); - - mEstateNameText = getChild<LLTextBox>("estate_name"); - mEstateRatingText = getChild<LLTextBox>("estate_rating"); - mEstateOwnerText = getChild<LLTextBox>("estate_owner"); - mCovenantText = getChild<LLTextEditor>("covenant"); - mSalesPriceText = getChild<LLTextBox>("sales_price"); - mAreaText = getChild<LLTextBox>("area"); - mTrafficText = getChild<LLTextBox>("traffic"); - mPrimitivesText = getChild<LLTextBox>("primitives"); - mParcelScriptsText = getChild<LLTextBox>("parcel_scripts"); - mTerraformLimitsText = getChild<LLTextBox>("terraform_limits"); - mSubdivideText = getChild<LLTextEditor>("subdivide"); - mResaleText = getChild<LLTextEditor>("resale"); - mSaleToText = getChild<LLTextBox>("sale_to"); - - mOwner = getChild<LLTextBox>("owner"); - mCreator = getChild<LLTextBox>("creator"); - mCreated = getChild<LLTextBox>("created"); - - mTitleEditor = getChild<LLLineEditor>("title_editor"); - mNotesEditor = getChild<LLTextEditor>("notes_editor"); - mFolderCombo = getChild<LLComboBox>("folder_combo"); - - LLScrollContainer* scroll_container = getChild<LLScrollContainer>("scroll_container"); + LLScrollContainer* scroll_container = getChild<LLScrollContainer>("place_scroll"); scroll_container->setBorderVisible(FALSE); mMinHeight = scroll_container->getScrolledViewRect().getHeight(); - mScrollingPanel = getChild<LLPanel>("scrolling_panel"); - mInfoPanel = getChild<LLPanel>("info_panel"); - mMediaPanel = getChild<LLMediaPanel>("media_panel"); - if (!mMediaPanel) - return FALSE; - return TRUE; } -void LLPanelPlaceInfo::displayItemInfo(const LLInventoryItem* pItem) -{ - if (!pItem) - return; - - mLandmarkID = pItem->getUUID(); - - if(!gCacheName) - return; - - const LLPermissions& perm = pItem->getPermissions(); - - ////////////////// - // CREATOR NAME // - ////////////////// - if (pItem->getCreatorUUID().notNull()) - { - std::string name; - LLUUID creator_id = pItem->getCreatorUUID(); - if (!gCacheName->getFullName(creator_id, name)) - { - gCacheName->get(creator_id, FALSE, - boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, this, mCreator, _2, _3)); - } - mCreator->setText(name); - } - else - { - mCreator->setText(getString("unknown")); - } - - //////////////// - // OWNER NAME // - //////////////// - if(perm.isOwned()) - { - std::string name; - if (perm.isGroupOwned()) - { - LLUUID group_id = perm.getGroup(); - if (!gCacheName->getGroupName(group_id, name)) - { - gCacheName->get(group_id, TRUE, - boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, this, mOwner, _2, _3)); - } - } - else - { - LLUUID owner_id = perm.getOwner(); - if (!gCacheName->getFullName(owner_id, name)) - { - gCacheName->get(owner_id, FALSE, - boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, this, mOwner, _2, _3)); - } - } - mOwner->setText(name); - } - else - { - mOwner->setText(getString("public")); - } - - ////////////////// - // ACQUIRE DATE // - ////////////////// - time_t time_utc = pItem->getCreationDate(); - if (0 == time_utc) - { - mCreated->setText(getString("unknown")); - } - else - { - std::string timeStr = getString("acquired_date"); - LLSD substitution; - substitution["datetime"] = (S32) time_utc; - LLStringUtil::format (timeStr, substitution); - mCreated->setText(timeStr); - } - - mTitleEditor->setText(pItem->getName()); - mNotesEditor->setText(pItem->getDescription()); -} - -void LLPanelPlaceInfo::nameUpdatedCallback( - LLTextBox* text, - const std::string& first, - const std::string& last) -{ - text->setText(first + " " + last); -} - +//virtual void LLPanelPlaceInfo::resetLocation() { mParcelID.setNull(); mRequestedID.setNull(); - mLandmarkID.setNull(); mPosRegion.clearVec(); - mForSalePanel->setVisible(FALSE); - mYouAreHerePanel->setVisible(FALSE); + std::string not_available = getString("not_available"); mMaturityRatingText->setValue(not_available); - mParcelOwner->setValue(not_available); - mLastVisited->setValue(not_available); mRegionName->setText(not_available); mParcelName->setText(not_available); mDescEditor->setText(not_available); - mCreator->setText(not_available); - mOwner->setText(not_available); - mCreated->setText(not_available); - mTitleEditor->setText(LLStringUtil::null); - mNotesEditor->setText(LLStringUtil::null); + mSnapshotCtrl->setImageAssetID(LLUUID::null); mSnapshotCtrl->setFallbackImageName("default_land_picture.j2c"); - - mRatingText->setText(not_available); - mVoiceText->setText(not_available); - mFlyText->setText(not_available); - mPushText->setText(not_available); - mBuildText->setText(not_available); - mParcelScriptsText->setText(not_available); - mDamageText->setText(not_available); - - mRegionNameText->setValue(not_available); - mRegionTypeText->setValue(not_available); - mRegionRatingText->setValue(not_available); - mRegionOwnerText->setValue(not_available); - mRegionGroupText->setValue(not_available); - - mEstateNameText->setValue(not_available); - mEstateRatingText->setValue(not_available); - mEstateOwnerText->setValue(not_available); - mCovenantText->setValue(not_available); - - mSalesPriceText->setValue(not_available); - mAreaText->setValue(not_available); - mTrafficText->setValue(not_available); - mPrimitivesText->setValue(not_available); - mParcelScriptsText->setValue(not_available); - mTerraformLimitsText->setValue(not_available); - mSubdivideText->setValue(not_available); - mResaleText->setValue(not_available); - mSaleToText->setValue(not_available); } //virtual @@ -330,108 +114,55 @@ void LLPanelPlaceInfo::setParcelID(const LLUUID& parcel_id) sendParcelInfoRequest(); } +//virtual void LLPanelPlaceInfo::setInfoType(INFO_TYPE type) { - LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel"); - LLPanel* landmark_edit_panel = getChild<LLPanel>("landmark_edit_panel"); - - bool is_info_type_agent = type == AGENT; - bool is_info_type_create_landmark = type == CREATE_LANDMARK; - bool is_info_type_landmark = type == LANDMARK; - bool is_info_type_teleport_history = type == TELEPORT_HISTORY; - - getChild<LLTextBox>("maturity_label")->setVisible(!is_info_type_agent); - mMaturityRatingText->setVisible(!is_info_type_agent); - - getChild<LLTextBox>("owner_label")->setVisible(is_info_type_agent); - mParcelOwner->setVisible(is_info_type_agent); - - getChild<LLTextBox>("last_visited_label")->setVisible(is_info_type_teleport_history); - mLastVisited->setVisible(is_info_type_teleport_history); - - landmark_info_panel->setVisible(is_info_type_landmark); - landmark_edit_panel->setVisible(is_info_type_landmark || is_info_type_create_landmark); - - getChild<LLTextBox>("folder_lable")->setVisible(is_info_type_create_landmark); - mFolderCombo->setVisible(is_info_type_create_landmark); - - getChild<LLAccordionCtrl>("advanced_info_accordion")->setVisible(is_info_type_agent); - - switch(type) - { - case CREATE_LANDMARK: - mCurrentTitle = getString("title_create_landmark"); - - mTitleEditor->setEnabled(TRUE); - mNotesEditor->setEnabled(TRUE); - - populateFoldersList(); - break; - - case AGENT: - case PLACE: - mCurrentTitle = getString("title_place"); - - if (!isMediaPanelVisible()) - { - mTitle->setText(mCurrentTitle); - } - break; - - case LANDMARK: - mCurrentTitle = getString("title_landmark"); - - mTitleEditor->setEnabled(FALSE); - mNotesEditor->setEnabled(FALSE); - - populateFoldersList(); - break; - - case TELEPORT_HISTORY: - mCurrentTitle = getString("title_teleport_history"); - break; - } - - if (type != AGENT) - toggleMediaPanel(FALSE); + mTitle->setText(mCurrentTitle); mInfoType = type; } -BOOL LLPanelPlaceInfo::isMediaPanelVisible() +void LLPanelPlaceInfo::sendParcelInfoRequest() { - if (!mMediaPanel) - return FALSE; + if (mParcelID != mRequestedID) + { + LLRemoteParcelInfoProcessor::getInstance()->addObserver(mParcelID, this); + LLRemoteParcelInfoProcessor::getInstance()->sendParcelInfoRequest(mParcelID); - return mMediaPanel->getVisible(); + mRequestedID = mParcelID; + } } -void LLPanelPlaceInfo::toggleMediaPanel(BOOL visible) +void LLPanelPlaceInfo::displayParcelInfo(const LLUUID& region_id, + const LLVector3d& pos_global) { - if (!mMediaPanel) - return; + LLViewerRegion* region = gAgent.getRegion(); + if (!region) + return; + + mPosRegion.setVec((F32)fmod(pos_global.mdV[VX], (F64)REGION_WIDTH_METERS), + (F32)fmod(pos_global.mdV[VY], (F64)REGION_WIDTH_METERS), + (F32)pos_global.mdV[VZ]); - if (visible) + LLSD body; + std::string url = region->getCapability("RemoteParcelRequest"); + if (!url.empty()) { - mTitle->setText(getString("title_media")); + body["location"] = ll_sd_from_vector3(mPosRegion); + if (!region_id.isNull()) + { + body["region_id"] = region_id; + } + if (!pos_global.isExactlyZero()) + { + U64 region_handle = to_region_handle(pos_global); + body["region_handle"] = ll_sd_from_U64(region_handle); + } + LLHTTPClient::post(url, body, new LLRemoteParcelRequestResponder(getObserverHandle())); } else { - mTitle->setText(mCurrentTitle); - } - - mInfoPanel->setVisible(!visible); - mMediaPanel->setVisible(visible); -} - -void LLPanelPlaceInfo::sendParcelInfoRequest() -{ - if (mParcelID != mRequestedID) - { - LLRemoteParcelInfoProcessor::getInstance()->addObserver(mParcelID, this); - LLRemoteParcelInfoProcessor::getInstance()->sendParcelInfoRequest(mParcelID); - - mRequestedID = mParcelID; + mDescEditor->setText(getString("server_update_text")); } } @@ -486,13 +217,6 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) } mMaturityRatingText->setValue(rating); - mRatingText->setValue(rating); - - //update for_sale banner, here we should use DFQ_FOR_SALE instead of PF_FOR_SALE - //because we deal with remote parcel response format - bool is_for_sale = (parcel_data.flags & DFQ_FOR_SALE) && - mInfoType == AGENT ? TRUE : FALSE; - mForSalePanel->setVisible(is_for_sale); S32 region_x; S32 region_y; @@ -521,408 +245,25 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) { mParcelName->setText(getString("not_available")); } - - if (mInfoType == CREATE_LANDMARK) - { - if (parcel_data.name.empty()) - { - mTitleEditor->setText(llformat("%s (%d, %d, %d)", - parcel_data.sim_name.c_str(), region_x, region_y, region_z)); - } - else - { - mTitleEditor->setText(parcel_data.name); - } - - // FIXME: Creating landmark works only for current agent location. - std::string desc; - LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_FULL, gAgent.getPositionAgent()); - mNotesEditor->setText(desc); - - if (!LLLandmarkActions::landmarkAlreadyExists()) - { - createLandmark(mFolderCombo->getValue().asUUID()); - } - } } -void LLPanelPlaceInfo::displayParcelInfo(const LLUUID& region_id, - const LLVector3d& pos_global) +// virtual +void LLPanelPlaceInfo::handleVisibilityChange(BOOL new_visibility) { - LLViewerRegion* region = gAgent.getRegion(); - if (!region) - return; - - mPosRegion.setVec((F32)fmod(pos_global.mdV[VX], (F64)REGION_WIDTH_METERS), - (F32)fmod(pos_global.mdV[VY], (F64)REGION_WIDTH_METERS), - (F32)pos_global.mdV[VZ]); - - LLSD body; - std::string url = region->getCapability("RemoteParcelRequest"); - if (!url.empty()) - { - body["location"] = ll_sd_from_vector3(mPosRegion); - if (!region_id.isNull()) - { - body["region_id"] = region_id; - } - if (!pos_global.isExactlyZero()) - { - U64 region_handle = to_region_handle(pos_global); - body["region_handle"] = ll_sd_from_U64(region_handle); - } - LLHTTPClient::post(url, body, new LLRemoteParcelRequestResponder(getObserverHandle())); - } - else - { - mDescEditor->setText(getString("server_update_text")); - } -} + LLPanel::handleVisibilityChange(new_visibility); -void LLPanelPlaceInfo::displaySelectedParcelInfo(LLParcel* parcel, - LLViewerRegion* region, - const LLVector3d& pos_global, - bool is_current_parcel) -{ - if (!region || !parcel) + LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); + if (!parcel_mgr) return; - // send EstateCovenantInfo message - LLMessageSystem *msg = gMessageSystem; - msg->newMessage("EstateCovenantRequest"); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); - msg->sendReliable(region->getHost()); - - LLParcelData parcel_data; - - // HACK: Converting sim access flags to the format - // returned by remote parcel response. - switch(region->getSimAccess()) - { - case SIM_ACCESS_MATURE: - parcel_data.flags = 0x1; - break; - - case SIM_ACCESS_ADULT: - parcel_data.flags = 0x2; - break; - - default: - parcel_data.flags = 0; - } - parcel_data.desc = parcel->getDesc(); - parcel_data.name = parcel->getName(); - parcel_data.sim_name = region->getName(); - parcel_data.snapshot_id = parcel->getSnapshotID(); - mPosRegion.setVec((F32)fmod(pos_global.mdV[VX], (F64)REGION_WIDTH_METERS), - (F32)fmod(pos_global.mdV[VY], (F64)REGION_WIDTH_METERS), - (F32)pos_global.mdV[VZ]); - parcel_data.global_x = pos_global.mdV[VX]; - parcel_data.global_y = pos_global.mdV[VY]; - parcel_data.global_z = pos_global.mdV[VZ]; - - std::string on = getString("on"); - std::string off = getString("off"); - - // Processing parcel characteristics - if (parcel->getParcelFlagAllowVoice()) - { - mVoiceText->setText(on); - } - else - { - mVoiceText->setText(off); - } - - if (!region->getBlockFly() && parcel->getAllowFly()) - { - mFlyText->setText(on); - } - else - { - mFlyText->setText(off); - } - - if (region->getRestrictPushObject() || parcel->getRestrictPushObject()) - { - mPushText->setText(off); - } - else - { - mPushText->setText(on); - } - - if (parcel->getAllowModify()) - { - mBuildText->setText(on); - } - else - { - mBuildText->setText(off); - } - - if((region->getRegionFlags() & REGION_FLAGS_SKIP_SCRIPTS) || - (region->getRegionFlags() & REGION_FLAGS_ESTATE_SKIP_SCRIPTS) || - !parcel->getAllowOtherScripts()) - { - mScriptsText->setText(off); - } - else - { - mScriptsText->setText(on); - } - - if (region->getAllowDamage() || parcel->getAllowDamage()) - { - mDamageText->setText(on); - } - else - { - mDamageText->setText(off); - } - - mRegionNameText->setText(region->getName()); - mRegionTypeText->setText(region->getSimProductName()); - mRegionRatingText->setText(region->getSimAccessString()); - - // Determine parcel owner - if (parcel->isPublic()) - { - mParcelOwner->setText(getString("public")); - mRegionOwnerText->setText(getString("public")); - } - else - { - if (parcel->getIsGroupOwned()) - { - mRegionOwnerText->setText(getString("group_owned_text")); - - if(!parcel->getGroupID().isNull()) - { - // FIXME: Using parcel group as region group. - gCacheName->get(parcel->getGroupID(), TRUE, - boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, this, mRegionGroupText, _2, _3)); - - gCacheName->get(parcel->getGroupID(), TRUE, - boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, this, mParcelOwner, _2, _3)); - } - else - { - std::string owner = getString("none_text"); - mRegionGroupText->setText(owner); - mParcelOwner->setText(owner); - } - } - else - { - // Figure out the owner's name - gCacheName->get(parcel->getOwnerID(), FALSE, - boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, this, mParcelOwner, _2, _3)); - gCacheName->get(region->getOwner(), FALSE, - boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, this, mRegionOwnerText, _2, _3)); - } - - if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus()) - { - mRegionOwnerText->setText(mRegionOwnerText->getText() + getString("sale_pending_text")); - } - } - - mEstateRatingText->setText(region->getSimAccessString()); - - S32 area; - S32 claim_price; - S32 rent_price; - F32 dwell; - BOOL for_sale = parcel->getForSale(); - LLViewerParcelMgr::getInstance()->getDisplayInfo(&area, - &claim_price, - &rent_price, - &for_sale, - &dwell); - if (for_sale) - { - // Adding "For Sale" flag in remote parcel response format. - parcel_data.flags |= DFQ_FOR_SALE; - - const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID(); - if(auth_buyer_id.notNull()) - { - gCacheName->get(auth_buyer_id, TRUE, - boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, this, mSaleToText, _2, _3)); - - // Show sales info to a specific person or a group he belongs to. - if (auth_buyer_id != gAgent.getID() && !gAgent.isInGroup(auth_buyer_id)) - { - for_sale = FALSE; - } - } - else - { - mSaleToText->setText(getString("anyone")); - } - - const U8* sign = (U8*)getString("price_text").c_str(); - const U8* sqm = (U8*)getString("area_text").c_str(); - - mSalesPriceText->setText(llformat("%s%d ", sign, parcel->getSalePrice())); - mAreaText->setText(llformat("%d %s", area, sqm)); - mTrafficText->setText(llformat("%.0f", dwell)); - - // Can't have more than region max tasks, regardless of parcel - // object bonus factor. - S32 primitives = llmin(llround(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus()), - (S32)region->getMaxTasks()); - - const U8* available = (U8*)getString("available").c_str(); - const U8* allocated = (U8*)getString("allocated").c_str(); - - mPrimitivesText->setText(llformat("%d %s, %d %s", primitives, available, parcel->getPrimCount(), allocated)); - - if (parcel->getAllowOtherScripts()) - { - mParcelScriptsText->setText(getString("all_residents_text")); - } - else if (parcel->getAllowGroupScripts()) - { - mParcelScriptsText->setText(getString("group_text")); - } - else - { - mParcelScriptsText->setText(off); - } - - mTerraformLimitsText->setText(parcel->getAllowTerraform() ? on : off); - - if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES) - { - mSubdivideText->setText(getString("can_change")); - } - else - { - mSubdivideText->setText(getString("can_not_change")); - } - if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL) - { - mResaleText->setText(getString("can_not_resell")); - } - else - { - mResaleText->setText(getString("can_resell")); - } - } - - mSelectedParcelID = parcel->getLocalID(); - mLastSelectedRegionID = region->getRegionID(); - processParcelInfo(parcel_data); - - mYouAreHerePanel->setVisible(is_current_parcel); - getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(for_sale); -} - -void LLPanelPlaceInfo::updateEstateName(const std::string& name) -{ - mEstateNameText->setText(name); -} - -void LLPanelPlaceInfo::updateEstateOwnerName(const std::string& name) -{ - mEstateOwnerText->setText(name); -} - -void LLPanelPlaceInfo::updateCovenantText(const std::string &text) -{ - mCovenantText->setText(text); -} - -void LLPanelPlaceInfo::updateLastVisitedText(const LLDate &date) -{ - if (date.isNull()) - { - mLastVisited->setText(getString("unknown")); - } - else - { - std::string timeStr = getString("acquired_date"); - LLSD substitution; - substitution["datetime"] = (S32) date.secondsSinceEpoch(); - LLStringUtil::format (timeStr, substitution); - mLastVisited->setText(timeStr); - } -} - -void LLPanelPlaceInfo::toggleLandmarkEditMode(BOOL enabled) -{ - // If switching to edit mode while creating landmark - // the "Create Landmark" title remains. - if (enabled && mInfoType != CREATE_LANDMARK) - { - mTitle->setText(getString("title_edit_landmark")); - } - else - { - mTitle->setText(mCurrentTitle); - } - - if (mNotesEditor->getReadOnly() == (enabled == TRUE)) - { - mTitleEditor->setEnabled(enabled); - mNotesEditor->setReadOnly(!enabled); - mFolderCombo->setVisible(enabled); - getChild<LLTextBox>("folder_lable")->setVisible(enabled); - - // HACK: To change the text color in a text editor - // when it was enabled/disabled we set the text once again. - mNotesEditor->setText(mNotesEditor->getText()); - } -} - -const std::string& LLPanelPlaceInfo::getLandmarkTitle() const -{ - return mTitleEditor->getText(); -} - -const std::string LLPanelPlaceInfo::getLandmarkNotes() const -{ - return mNotesEditor->getText(); -} - -const LLUUID LLPanelPlaceInfo::getLandmarkFolder() const -{ - return mFolderCombo->getValue().asUUID(); -} - -BOOL LLPanelPlaceInfo::setLandmarkFolder(const LLUUID& id) -{ - return mFolderCombo->setCurrentByID(id); -} - -void LLPanelPlaceInfo::createLandmark(const LLUUID& folder_id) -{ - std::string name = mTitleEditor->getText(); - std::string desc = mNotesEditor->getText(); - - LLStringUtil::trim(name); - LLStringUtil::trim(desc); - - // If typed name is empty use the parcel name instead. - if (name.empty()) + // Remove land selection when panel hides. + if (!new_visibility) { - name = mParcelName->getText(); - - // If no parcel exists use the region name instead. - if (name.empty()) + if (!parcel_mgr->selectionEmpty()) { - name = mRegionName->getText(); + parcel_mgr->deselectLand(); } } - - LLStringUtil::replaceChar(desc, '\n', ' '); - // If no folder chosen use the "Landmarks" folder. - LLLandmarkActions::createLandmarkHere(name, desc, - folder_id.notNull() ? folder_id : gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK)); } void LLPanelPlaceInfo::createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel) @@ -942,159 +283,10 @@ void LLPanelPlaceInfo::createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel->setPickData(&data); } -// virtual -void LLPanelPlaceInfo::handleVisibilityChange (BOOL new_visibility) -{ - LLPanel::handleVisibilityChange(new_visibility); - - LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); - if (!parcel_mgr) - return; - - // Remove land selection when panel hides. - if (!new_visibility) - { - if (!parcel_mgr->selectionEmpty()) - { - parcel_mgr->deselectLand(); - } - } -} - -void LLPanelPlaceInfo::populateFoldersList() -{ - // Collect all folders that can contain landmarks. - LLInventoryModel::cat_array_t cats; - collectLandmarkFolders(cats); - - mFolderCombo->removeall(); - - // Put the "Landmarks" folder first in list. - LLUUID landmarks_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); - const LLViewerInventoryCategory* cat = gInventory.getCategory(landmarks_id); - if (!cat) - { - llwarns << "Cannot find the landmarks folder" << llendl; - } - std::string cat_full_name = getFullFolderName(cat); - mFolderCombo->add(cat_full_name, cat->getUUID()); - - typedef std::vector<folder_pair_t> folder_vec_t; - folder_vec_t folders; - // Sort the folders by their full name. - for (S32 i = 0; i < cats.count(); i++) - { - cat = cats.get(i); - cat_full_name = getFullFolderName(cat); - folders.push_back(folder_pair_t(cat->getUUID(), cat_full_name)); - } - sort(folders.begin(), folders.end(), cmp_folders); - - // Finally, populate the combobox. - for (folder_vec_t::const_iterator it = folders.begin(); it != folders.end(); it++) - mFolderCombo->add(it->second, LLSD(it->first)); -} - -//static -void LLPanelPlaceInfo::updateYouAreHereBanner(void* userdata) -{ - //YouAreHere Banner should be displayed only for selected places, - // If you want to display it for landmark or teleport history item, you should check by mParcelId - - LLPanelPlaceInfo* self = static_cast<LLPanelPlaceInfo*>(userdata); - if(!self->getVisible()) - return; - if(!gDisconnected) - { - static F32 radius = gSavedSettings.getF32("YouAreHereDistance"); - - BOOL display_banner = gAgent.getRegion()->getRegionID() == self->mLastSelectedRegionID && - LLAgentUI::checkAgentDistance(self->mPosRegion, radius); - - self->mYouAreHerePanel->setVisible(display_banner); - } -} - -void LLPanelPlaceInfo::onForSaleBannerClick() -{ - LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance(); - LLParcelSelectionHandle hParcel = mgr->getFloatingParcelSelection(); - LLViewerRegion* selected_region = mgr->getSelectionRegion(); - if(!hParcel.isNull() && selected_region) - { - if(hParcel->getParcel()->getLocalID() == mSelectedParcelID && - mLastSelectedRegionID ==selected_region->getRegionID()) - { - if(hParcel->getParcel()->getSalePrice() - gStatusBar->getBalance() > 0) - { - LLFloaterBuyCurrency::buyCurrency("Buying selected land ", hParcel->getParcel()->getSalePrice()); - } - else - { - LLViewerParcelMgr::getInstance()->startBuyLand(); - } - } - else - { - LL_WARNS("Places") << "User is trying to buy remote parcel.Operation is not supported"<< LL_ENDL; - } - - } - - -} - -/*static*/ -std::string LLPanelPlaceInfo::getFullFolderName(const LLViewerInventoryCategory* cat) -{ - std::string name = cat->getName(); - LLUUID parent_id; - - // translate category name, if it's right below the root - // FIXME: it can throw notification about non existent string in strings.xml - if (cat->getParentUUID().notNull() && cat->getParentUUID() == gInventory.getRootFolderID()) - { - LLTrans::findString(name, "InvFolder " + name); - } - - // we don't want "My Inventory" to appear in the name - while ((parent_id = cat->getParentUUID()).notNull() && parent_id != gInventory.getRootFolderID()) - { - cat = gInventory.getCategory(parent_id); - name = cat->getName() + "/" + name; - } - - return name; -} - -static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right) -{ - return left.second < right.second; -} - -static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats) +// static +void LLPanelPlaceInfo::nameUpdatedCallback(LLTextBox* text, + const std::string& first, + const std::string& last) { - LLUUID landmarks_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); - - // Add descendent folders of the "Landmarks" category. - LLInventoryModel::item_array_t items; // unused - LLIsType is_category(LLAssetType::AT_CATEGORY); - gInventory.collectDescendentsIf( - landmarks_id, - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - is_category); - - // Add the "My Favorites" category. - LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE); - LLViewerInventoryCategory* favorites_cat = gInventory.getCategory(favorites_id); - if (!favorites_cat) - { - llwarns << "Cannot find the favorites folder" << llendl; - } - else - { - cats.put(favorites_cat); - } + text->setText(first + " " + last); } diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 07a2434d59..ec30397cff 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -1,10 +1,10 @@ /** * @file llpanelplaceinfo.h - * @brief Displays place information in Side Tray. + * @brief Base class for place information in Side Tray. * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -38,19 +38,13 @@ #include "v3dmath.h" #include "lluuid.h" -#include "llpanelmedia.h" #include "llremoteparcelrequest.h" -class LLButton; -class LLComboBox; class LLExpandableTextBox; class LLInventoryItem; -class LLLineEditor; class LLPanelPickEdit; class LLParcel; -class LLIconCtrl; class LLTextBox; -class LLTextEditor; class LLTextureCtrl; class LLViewerRegion; class LLViewerInventoryCategory; @@ -74,30 +68,18 @@ public: // Ignore all old location information, useful if you are // recycling an existing dialog and need to clear it. - void resetLocation(); + virtual void resetLocation(); // Sends a request for data about the given parcel, which will // only update the location if there is none already available. /*virtual*/ void setParcelID(const LLUUID& parcel_id); - // Depending on how the panel was triggered - // (from landmark or current location, or other) + // Depending on how the panel was triggered + // (from landmark or current location, or other) // sets a corresponding title and contents. - void setInfoType(INFO_TYPE type); - - // Create a landmark for the current location - // in a folder specified by folder_id. - void createLandmark(const LLUUID& folder_id); - - // Create a pick for the location specified - // by global_pos. - void createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel); - - BOOL isMediaPanelVisible(); - void toggleMediaPanel(BOOL visible); - void displayItemInfo(const LLInventoryItem* pItem); - /*virtual*/ void setErrorStatus(U32 status, const std::string& reason); + virtual void setInfoType(INFO_TYPE type); + // Requests remote parcel info by parcel ID. void sendParcelInfoRequest(); // Displays information about a remote parcel. @@ -105,109 +87,37 @@ public: void displayParcelInfo(const LLUUID& region_id, const LLVector3d& pos_global); - // Displays information about the currently selected parcel - // without sending a request to the server. - // If is_current_parcel true shows "You Are Here" banner. - void displaySelectedParcelInfo(LLParcel* parcel, - LLViewerRegion* region, - const LLVector3d& pos_global, - bool is_current_parcel); - - void updateEstateName(const std::string& name); - void updateEstateOwnerName(const std::string& name); - void updateCovenantText(const std::string &text); - void updateLastVisitedText(const LLDate &date); - - void nameUpdatedCallback(LLTextBox* text, - const std::string& first, - const std::string& last); - - void toggleLandmarkEditMode(BOOL enabled); - - const std::string& getLandmarkTitle() const; - const std::string getLandmarkNotes() const; - const LLUUID getLandmarkFolder() const; - - // Select current landmark folder in combobox. - BOOL setLandmarkFolder(const LLUUID& id); + /*virtual*/ void setErrorStatus(U32 status, const std::string& reason); /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); + /*virtual*/ void handleVisibilityChange (BOOL new_visibility); - - static std::string getFullFolderName(const LLViewerInventoryCategory* cat); -private: + // Create a pick for the location specified + // by global_pos. + void createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel); - void populateFoldersList(); - static void updateYouAreHereBanner(void*);// added to gIdleCallbacks - void onForSaleBannerClick(); +protected: + static void nameUpdatedCallback(LLTextBox* text, + const std::string& first, + const std::string& last); /** * mParcelID is valid only for remote places, in other cases it's null. See resetLocation() */ - LLUUID mParcelID; - LLUUID mRequestedID; - LLUUID mLandmarkID; - LLVector3 mPosRegion; - std::string mCurrentTitle; - S32 mMinHeight; - INFO_TYPE mInfoType; - - /** - * Hold last displayed parcel. Needs for YouAreHere banner. - */ - S32 mSelectedParcelID; - LLUUID mLastSelectedRegionID; - - LLTextBox* mTitle; - LLPanel* mForSalePanel; - LLPanel* mYouAreHerePanel; - LLTextureCtrl* mSnapshotCtrl; - LLTextBox* mRegionName; - LLTextBox* mParcelName; - LLExpandableTextBox*mDescEditor; - LLTextBox* mMaturityRatingText; - LLTextBox* mParcelOwner; - LLTextBox* mLastVisited; - - LLTextBox* mRatingText; - LLTextBox* mVoiceText; - LLTextBox* mFlyText; - LLTextBox* mPushText; - LLTextBox* mBuildText; - LLTextBox* mScriptsText; - LLTextBox* mDamageText; - - LLTextBox* mRegionNameText; - LLTextBox* mRegionTypeText; - LLTextBox* mRegionRatingText; - LLTextBox* mRegionOwnerText; - LLTextBox* mRegionGroupText; - - LLTextBox* mEstateNameText; - LLTextBox* mEstateRatingText; - LLTextBox* mEstateOwnerText; - LLTextEditor* mCovenantText; - - LLTextBox* mSalesPriceText; - LLTextBox* mAreaText; - LLTextBox* mTrafficText; - LLTextBox* mPrimitivesText; - LLTextBox* mParcelScriptsText; - LLTextBox* mTerraformLimitsText; - LLTextEditor* mSubdivideText; - LLTextEditor* mResaleText; - LLTextBox* mSaleToText; - - LLTextBox* mOwner; - LLTextBox* mCreator; - LLTextBox* mCreated; - LLLineEditor* mTitleEditor; - LLTextEditor* mNotesEditor; - LLComboBox* mFolderCombo; - LLPanel* mScrollingPanel; - LLPanel* mInfoPanel; - LLMediaPanel* mMediaPanel; + LLUUID mParcelID; + LLUUID mRequestedID; + LLVector3 mPosRegion; + std::string mCurrentTitle; + S32 mMinHeight; + INFO_TYPE mInfoType; + + LLTextBox* mTitle; + LLTextureCtrl* mSnapshotCtrl; + LLTextBox* mRegionName; + LLTextBox* mParcelName; + LLExpandableTextBox* mDescEditor; + LLTextBox* mMaturityRatingText; }; #endif // LL_LLPANELPLACEINFO_H diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp new file mode 100644 index 0000000000..2a9ba4697d --- /dev/null +++ b/indra/newview/llpanelplaceprofile.cpp @@ -0,0 +1,586 @@ +/** + * @file llpanelplaceprofile.cpp + * @brief Displays place profile in Side Tray. + * + * $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 "llviewerprecompiledheaders.h" + +#include "llpanelplaceprofile.h" + +#include "llparcel.h" + +#include "lliconctrl.h" +#include "lllineeditor.h" +#include "lltextbox.h" +#include "lltexteditor.h" + +#include "llaccordionctrl.h" +#include "llaccordionctrltab.h" +#include "llagent.h" +#include "llagentui.h" +#include "llappviewer.h" +#include "llcallbacklist.h" +#include "llfloaterbuycurrency.h" +#include "llstatusbar.h" +#include "llviewercontrol.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" + +static LLRegisterPanelClassWrapper<LLPanelPlaceProfile> t_place_profile("panel_place_profile"); + +// Statics for textures filenames +static std::string icon_pg; +static std::string icon_m; +static std::string icon_r; +static std::string icon_voice; +static std::string icon_voice_no; +static std::string icon_fly; +static std::string icon_fly_no; +static std::string icon_push; +static std::string icon_push_no; +static std::string icon_build; +static std::string icon_build_no; +static std::string icon_scripts; +static std::string icon_scripts_no; +static std::string icon_damage; +static std::string icon_damage_no; + +LLPanelPlaceProfile::LLPanelPlaceProfile() +: LLPanelPlaceInfo(), + mForSalePanel(NULL), + mYouAreHerePanel(NULL), + mSelectedParcelID(-1) +{} + +// virtual +LLPanelPlaceProfile::~LLPanelPlaceProfile() +{} + +// virtual +BOOL LLPanelPlaceProfile::postBuild() +{ + LLPanelPlaceInfo::postBuild(); + + mForSalePanel = getChild<LLPanel>("for_sale_panel"); + mYouAreHerePanel = getChild<LLPanel>("here_panel"); + gIdleCallbacks.addFunction(&LLPanelPlaceProfile::updateYouAreHereBanner, this); + + //Icon value should contain sale price of last selected parcel. + mForSalePanel->getChild<LLIconCtrl>("icon_for_sale")-> + setMouseDownCallback(boost::bind(&LLPanelPlaceProfile::onForSaleBannerClick, this)); + + mParcelOwner = getChild<LLTextBox>("owner_value"); + mLastVisited = getChild<LLTextBox>("last_visited_value"); + + mParcelRatingIcon = getChild<LLIconCtrl>("rating_icon"); + mParcelRatingText = getChild<LLTextBox>("rating_value"); + mVoiceIcon = getChild<LLIconCtrl>("voice_icon"); + mVoiceText = getChild<LLTextBox>("voice_value"); + mFlyIcon = getChild<LLIconCtrl>("fly_icon"); + mFlyText = getChild<LLTextBox>("fly_value"); + mPushIcon = getChild<LLIconCtrl>("push_icon"); + mPushText = getChild<LLTextBox>("push_value"); + mBuildIcon = getChild<LLIconCtrl>("build_icon"); + mBuildText = getChild<LLTextBox>("build_value"); + mScriptsIcon = getChild<LLIconCtrl>("scripts_icon"); + mScriptsText = getChild<LLTextBox>("scripts_value"); + mDamageIcon = getChild<LLIconCtrl>("damage_icon"); + mDamageText = getChild<LLTextBox>("damage_value"); + + mRegionNameText = getChild<LLTextBox>("region_name"); + mRegionTypeText = getChild<LLTextBox>("region_type"); + mRegionRatingIcon = getChild<LLIconCtrl>("region_rating_icon"); + mRegionRatingText = getChild<LLTextBox>("region_rating"); + mRegionOwnerText = getChild<LLTextBox>("region_owner"); + mRegionGroupText = getChild<LLTextBox>("region_group"); + + mEstateNameText = getChild<LLTextBox>("estate_name"); + mEstateRatingText = getChild<LLTextBox>("estate_rating"); + mEstateOwnerText = getChild<LLTextBox>("estate_owner"); + mCovenantText = getChild<LLTextEditor>("covenant"); + + mSalesPriceText = getChild<LLTextBox>("sales_price"); + mAreaText = getChild<LLTextBox>("area"); + mTrafficText = getChild<LLTextBox>("traffic"); + mPrimitivesText = getChild<LLTextBox>("primitives"); + mParcelScriptsText = getChild<LLTextBox>("parcel_scripts"); + mTerraformLimitsText = getChild<LLTextBox>("terraform_limits"); + mSubdivideText = getChild<LLTextEditor>("subdivide"); + mResaleText = getChild<LLTextEditor>("resale"); + mSaleToText = getChild<LLTextBox>("sale_to"); + + icon_pg = getString("icon_PG"); + icon_m = getString("icon_M"); + icon_r = getString("icon_R"); + icon_voice = getString("icon_Voice"); + icon_voice_no = getString("icon_VoiceNo"); + icon_fly = getString("icon_Fly"); + icon_fly_no = getString("icon_FlyNo"); + icon_push = getString("icon_Push"); + icon_push_no = getString("icon_PushNo"); + icon_build = getString("icon_Build"); + icon_build_no = getString("icon_BuildNo"); + icon_scripts = getString("icon_Scripts"); + icon_scripts_no = getString("icon_ScriptsNo"); + icon_damage = getString("icon_Damage"); + icon_damage_no = getString("icon_DamageNo"); + + return TRUE; +} + +// virtual +void LLPanelPlaceProfile::resetLocation() +{ + LLPanelPlaceInfo::resetLocation(); + + mForSalePanel->setVisible(FALSE); + mYouAreHerePanel->setVisible(FALSE); + + std::string not_available = getString("not_available"); + mParcelOwner->setValue(not_available); + mLastVisited->setValue(not_available); + + mParcelRatingIcon->setValue(not_available); + mParcelRatingText->setText(not_available); + mVoiceIcon->setValue(not_available); + mVoiceText->setText(not_available); + mFlyIcon->setValue(not_available); + mFlyText->setText(not_available); + mPushIcon->setValue(not_available); + mPushText->setText(not_available); + mBuildIcon->setValue(not_available); + mBuildText->setText(not_available); + mScriptsIcon->setValue(not_available); + mScriptsText->setText(not_available); + mDamageIcon->setValue(not_available); + mDamageText->setText(not_available); + + mRegionNameText->setValue(not_available); + mRegionTypeText->setValue(not_available); + mRegionRatingIcon->setValue(not_available); + mRegionRatingText->setValue(not_available); + mRegionOwnerText->setValue(not_available); + mRegionGroupText->setValue(not_available); + + mEstateNameText->setValue(not_available); + mEstateRatingText->setValue(not_available); + mEstateOwnerText->setValue(not_available); + mCovenantText->setValue(not_available); + + mSalesPriceText->setValue(not_available); + mAreaText->setValue(not_available); + mTrafficText->setValue(not_available); + mPrimitivesText->setValue(not_available); + mParcelScriptsText->setValue(not_available); + mTerraformLimitsText->setValue(not_available); + mSubdivideText->setValue(not_available); + mResaleText->setValue(not_available); + mSaleToText->setValue(not_available); +} + +// virtual +void LLPanelPlaceProfile::setInfoType(INFO_TYPE type) +{ + bool is_info_type_agent = type == AGENT; + bool is_info_type_teleport_history = type == TELEPORT_HISTORY; + + getChild<LLTextBox>("maturity_label")->setVisible(!is_info_type_agent); + mMaturityRatingText->setVisible(!is_info_type_agent); + + getChild<LLTextBox>("owner_label")->setVisible(is_info_type_agent); + mParcelOwner->setVisible(is_info_type_agent); + + getChild<LLTextBox>("last_visited_label")->setVisible(is_info_type_teleport_history); + mLastVisited->setVisible(is_info_type_teleport_history); + + getChild<LLAccordionCtrl>("advanced_info_accordion")->setVisible(is_info_type_agent); + + switch(type) + { + case AGENT: + case PLACE: + default: + mCurrentTitle = getString("title_place"); + break; + + case TELEPORT_HISTORY: + mCurrentTitle = getString("title_teleport_history"); + break; + } + + LLPanelPlaceInfo::setInfoType(type); +} + +void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, + LLViewerRegion* region, + const LLVector3d& pos_global, + bool is_current_parcel) +{ + if (!region || !parcel) + return; + + // send EstateCovenantInfo message + LLMessageSystem *msg = gMessageSystem; + msg->newMessage("EstateCovenantRequest"); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); + msg->sendReliable(region->getHost()); + + LLParcelData parcel_data; + + // HACK: Converting sim access flags to the format + // returned by remote parcel response. + U8 sim_access = region->getSimAccess(); + switch(sim_access) + { + case SIM_ACCESS_MATURE: + parcel_data.flags = 0x1; + + mParcelRatingIcon->setValue(icon_m); + mRegionRatingIcon->setValue(icon_m); + break; + + case SIM_ACCESS_ADULT: + parcel_data.flags = 0x2; + + mParcelRatingIcon->setValue(icon_r); + mRegionRatingIcon->setValue(icon_r); + break; + + default: + parcel_data.flags = 0; + + mParcelRatingIcon->setValue(icon_pg); + mRegionRatingIcon->setValue(icon_pg); + } + + std::string rating = LLViewerRegion::accessToString(sim_access); + mParcelRatingText->setText(rating); + mRegionRatingText->setText(rating); + + parcel_data.desc = parcel->getDesc(); + parcel_data.name = parcel->getName(); + parcel_data.sim_name = region->getName(); + parcel_data.snapshot_id = parcel->getSnapshotID(); + mPosRegion.setVec((F32)fmod(pos_global.mdV[VX], (F64)REGION_WIDTH_METERS), + (F32)fmod(pos_global.mdV[VY], (F64)REGION_WIDTH_METERS), + (F32)pos_global.mdV[VZ]); + parcel_data.global_x = pos_global.mdV[VX]; + parcel_data.global_y = pos_global.mdV[VY]; + parcel_data.global_z = pos_global.mdV[VZ]; + + std::string on = getString("on"); + std::string off = getString("off"); + + // Processing parcel characteristics + if (parcel->getParcelFlagAllowVoice()) + { + mVoiceIcon->setValue(icon_voice); + mVoiceText->setText(on); + } + else + { + mVoiceIcon->setValue(icon_voice_no); + mVoiceText->setText(off); + } + + if (!region->getBlockFly() && parcel->getAllowFly()) + { + mFlyIcon->setValue(icon_fly); + mFlyText->setText(on); + } + else + { + mFlyIcon->setValue(icon_fly_no); + mFlyText->setText(off); + } + + if (region->getRestrictPushObject() || parcel->getRestrictPushObject()) + { + mPushIcon->setValue(icon_push_no); + mPushText->setText(off); + } + else + { + mPushIcon->setValue(icon_push); + mPushText->setText(on); + } + + if (parcel->getAllowModify()) + { + mBuildIcon->setValue(icon_build); + mBuildText->setText(on); + } + else + { + mBuildIcon->setValue(icon_build_no); + mBuildText->setText(off); + } + + if((region->getRegionFlags() & REGION_FLAGS_SKIP_SCRIPTS) || + (region->getRegionFlags() & REGION_FLAGS_ESTATE_SKIP_SCRIPTS) || + !parcel->getAllowOtherScripts()) + { + mScriptsIcon->setValue(icon_scripts_no); + mScriptsText->setText(off); + } + else + { + mScriptsIcon->setValue(icon_scripts); + mScriptsText->setText(on); + } + + if (region->getAllowDamage() || parcel->getAllowDamage()) + { + mDamageIcon->setValue(icon_damage); + mDamageText->setText(on); + } + else + { + mDamageIcon->setValue(icon_damage_no); + mDamageText->setText(off); + } + + mRegionNameText->setText(region->getName()); + mRegionTypeText->setText(region->getSimProductName()); + + // Determine parcel owner + if (parcel->isPublic()) + { + mParcelOwner->setText(getString("public")); + mRegionOwnerText->setText(getString("public")); + } + else + { + if (parcel->getIsGroupOwned()) + { + mRegionOwnerText->setText(getString("group_owned_text")); + + if(!parcel->getGroupID().isNull()) + { + // FIXME: Using parcel group as region group. + gCacheName->get(parcel->getGroupID(), TRUE, + boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mRegionGroupText, _2, _3)); + + gCacheName->get(parcel->getGroupID(), TRUE, + boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mParcelOwner, _2, _3)); + } + else + { + std::string owner = getString("none_text"); + mRegionGroupText->setText(owner); + mParcelOwner->setText(owner); + } + } + else + { + // Figure out the owner's name + gCacheName->get(parcel->getOwnerID(), FALSE, + boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mParcelOwner, _2, _3)); + gCacheName->get(region->getOwner(), FALSE, + boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mRegionOwnerText, _2, _3)); + } + + if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus()) + { + mRegionOwnerText->setText(mRegionOwnerText->getText() + getString("sale_pending_text")); + } + } + + mEstateRatingText->setText(region->getSimAccessString()); + + S32 area; + S32 claim_price; + S32 rent_price; + F32 dwell; + BOOL for_sale = parcel->getForSale(); + LLViewerParcelMgr::getInstance()->getDisplayInfo(&area, + &claim_price, + &rent_price, + &for_sale, + &dwell); + if (for_sale) + { + const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID(); + if(auth_buyer_id.notNull()) + { + gCacheName->get(auth_buyer_id, TRUE, + boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mSaleToText, _2, _3)); + + // Show sales info to a specific person or a group he belongs to. + if (auth_buyer_id != gAgent.getID() && !gAgent.isInGroup(auth_buyer_id)) + { + for_sale = FALSE; + } + } + else + { + mSaleToText->setText(getString("anyone")); + } + + mForSalePanel->setVisible(for_sale); + + const U8* sign = (U8*)getString("price_text").c_str(); + const U8* sqm = (U8*)getString("area_text").c_str(); + + mSalesPriceText->setText(llformat("%s%d ", sign, parcel->getSalePrice())); + mAreaText->setText(llformat("%d %s", area, sqm)); + mTrafficText->setText(llformat("%.0f", dwell)); + + // Can't have more than region max tasks, regardless of parcel + // object bonus factor. + S32 primitives = llmin(llround(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus()), + (S32)region->getMaxTasks()); + + const U8* available = (U8*)getString("available").c_str(); + const U8* allocated = (U8*)getString("allocated").c_str(); + + mPrimitivesText->setText(llformat("%d %s, %d %s", primitives, available, parcel->getPrimCount(), allocated)); + + if (parcel->getAllowOtherScripts()) + { + mParcelScriptsText->setText(getString("all_residents_text")); + } + else if (parcel->getAllowGroupScripts()) + { + mParcelScriptsText->setText(getString("group_text")); + } + else + { + mParcelScriptsText->setText(off); + } + + mTerraformLimitsText->setText(parcel->getAllowTerraform() ? on : off); + + if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES) + { + mSubdivideText->setText(getString("can_change")); + } + else + { + mSubdivideText->setText(getString("can_not_change")); + } + if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL) + { + mResaleText->setText(getString("can_not_resell")); + } + else + { + mResaleText->setText(getString("can_resell")); + } + } + + mSelectedParcelID = parcel->getLocalID(); + mLastSelectedRegionID = region->getRegionID(); + LLPanelPlaceInfo::processParcelInfo(parcel_data); + + mYouAreHerePanel->setVisible(is_current_parcel); + getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(for_sale); +} + +void LLPanelPlaceProfile::updateEstateName(const std::string& name) +{ + mEstateNameText->setText(name); +} + +void LLPanelPlaceProfile::updateEstateOwnerName(const std::string& name) +{ + mEstateOwnerText->setText(name); +} + +void LLPanelPlaceProfile::updateCovenantText(const std::string &text) +{ + mCovenantText->setText(text); +} + +void LLPanelPlaceProfile::updateLastVisitedText(const LLDate &date) +{ + if (date.isNull()) + { + mLastVisited->setText(getString("unknown")); + } + else + { + std::string timeStr = getString("acquired_date"); + LLSD substitution; + substitution["datetime"] = (S32) date.secondsSinceEpoch(); + LLStringUtil::format (timeStr, substitution); + mLastVisited->setText(timeStr); + } +} + +void LLPanelPlaceProfile::onForSaleBannerClick() +{ + LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance(); + LLParcelSelectionHandle hParcel = mgr->getFloatingParcelSelection(); + LLViewerRegion* selected_region = mgr->getSelectionRegion(); + if(!hParcel.isNull() && selected_region) + { + if(hParcel->getParcel()->getLocalID() == mSelectedParcelID && + mLastSelectedRegionID ==selected_region->getRegionID()) + { + if(hParcel->getParcel()->getSalePrice() - gStatusBar->getBalance() > 0) + { + LLFloaterBuyCurrency::buyCurrency("Buying selected land ", hParcel->getParcel()->getSalePrice()); + } + else + { + LLViewerParcelMgr::getInstance()->startBuyLand(); + } + } + else + { + LL_WARNS("Places") << "User is trying to buy remote parcel.Operation is not supported"<< LL_ENDL; + } + + } +} + +// static +void LLPanelPlaceProfile::updateYouAreHereBanner(void* userdata) +{ + //YouAreHere Banner should be displayed only for selected places, + // If you want to display it for landmark or teleport history item, you should check by mParcelId + + LLPanelPlaceProfile* self = static_cast<LLPanelPlaceProfile*>(userdata); + if(!self->getVisible()) + return; + + if(!gDisconnected && gAgent.getRegion()) + { + static F32 radius = gSavedSettings.getF32("YouAreHereDistance"); + + BOOL display_banner = gAgent.getRegion()->getRegionID() == self->mLastSelectedRegionID && + LLAgentUI::checkAgentDistance(self->mPosRegion, radius); + + self->mYouAreHerePanel->setVisible(display_banner); + } +} diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h new file mode 100644 index 0000000000..b3ef4acf51 --- /dev/null +++ b/indra/newview/llpanelplaceprofile.h @@ -0,0 +1,121 @@ +/** + * @file llpanelplaceprofile.h + * @brief Displays place profile in Side Tray. + * + * $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_LLPANELPLACEPROFILE_H +#define LL_LLPANELPLACEPROFILE_H + +#include "llpanelplaceinfo.h" + +class LLIconCtrl; +class LLTextEditor; + +class LLPanelPlaceProfile : public LLPanelPlaceInfo +{ +public: + LLPanelPlaceProfile(); + /*virtual*/ ~LLPanelPlaceProfile(); + + /*virtual*/ BOOL postBuild(); + + /*virtual*/ void resetLocation(); + + /*virtual*/ void setInfoType(INFO_TYPE type); + + // Displays information about the currently selected parcel + // without sending a request to the server. + // If is_current_parcel true shows "You Are Here" banner. + void displaySelectedParcelInfo(LLParcel* parcel, + LLViewerRegion* region, + const LLVector3d& pos_global, + bool is_current_parcel); + + void updateEstateName(const std::string& name); + void updateEstateOwnerName(const std::string& name); + void updateCovenantText(const std::string &text); + void updateLastVisitedText(const LLDate &date); + +private: + void onForSaleBannerClick(); + + static void updateYouAreHereBanner(void*);// added to gIdleCallbacks + + /** + * Holds last displayed parcel. Needed for YouAreHere banner. + */ + S32 mSelectedParcelID; + LLUUID mLastSelectedRegionID; + + LLPanel* mForSalePanel; + LLPanel* mYouAreHerePanel; + + LLTextBox* mParcelOwner; + LLTextBox* mLastVisited; + + LLIconCtrl* mParcelRatingIcon; + LLTextBox* mParcelRatingText; + LLIconCtrl* mVoiceIcon; + LLTextBox* mVoiceText; + LLIconCtrl* mFlyIcon; + LLTextBox* mFlyText; + LLIconCtrl* mPushIcon; + LLTextBox* mPushText; + LLIconCtrl* mBuildIcon; + LLTextBox* mBuildText; + LLIconCtrl* mScriptsIcon; + LLTextBox* mScriptsText; + LLIconCtrl* mDamageIcon; + LLTextBox* mDamageText; + + LLTextBox* mRegionNameText; + LLTextBox* mRegionTypeText; + LLIconCtrl* mRegionRatingIcon; + LLTextBox* mRegionRatingText; + LLTextBox* mRegionOwnerText; + LLTextBox* mRegionGroupText; + + LLTextBox* mEstateNameText; + LLTextBox* mEstateRatingText; + LLTextBox* mEstateOwnerText; + LLTextEditor* mCovenantText; + + LLTextBox* mSalesPriceText; + LLTextBox* mAreaText; + LLTextBox* mTrafficText; + LLTextBox* mPrimitivesText; + LLTextBox* mParcelScriptsText; + LLTextBox* mTerraformLimitsText; + LLTextEditor* mSubdivideText; + LLTextEditor* mResaleText; + LLTextBox* mSaleToText; +}; + +#endif // LL_LLPANELPLACEPROFILE_H diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index b2e9110e96..8d117afcfe 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -57,9 +57,10 @@ #include "llinventorymodel.h" #include "lllandmarkactions.h" #include "lllandmarklist.h" -#include "llpanelplaceinfo.h" +#include "llpanellandmarkinfo.h" #include "llpanellandmarks.h" #include "llpanelpick.h" +#include "llpanelplaceprofile.h" #include "llpanelteleporthistory.h" #include "llteleporthistorystorage.h" #include "lltoggleablemenu.h" @@ -121,7 +122,8 @@ LLPanelPlaces::LLPanelPlaces() mFilterSubString(LLStringUtil::null), mActivePanel(NULL), mFilterEditor(NULL), - mPlaceInfo(NULL), + mPlaceProfile(NULL), + mLandmarkInfo(NULL), mPickPanel(NULL), mItem(NULL), mPlaceMenu(NULL), @@ -135,7 +137,7 @@ LLPanelPlaces::LLPanelPlaces() gInventory.addObserver(mInventoryObserver); LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback( - boost::bind(&LLPanelPlaces::onAgentParcelChange, this)); + boost::bind(&LLPanelPlaces::updateVerbs, this)); //LLUICtrlFactory::getInstance()->buildPanel(this, "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() } @@ -158,9 +160,6 @@ BOOL LLPanelPlaces::postBuild() mShowOnMapBtn = getChild<LLButton>("map_btn"); mShowOnMapBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onShowOnMapButtonClicked, this)); - - mShareBtn = getChild<LLButton>("share_btn"); - //mShareBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onShareButtonClicked, this)); mEditBtn = getChild<LLButton>("edit_btn"); mEditBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this)); @@ -206,25 +205,32 @@ BOOL LLPanelPlaces::postBuild() mFilterEditor->setCommitCallback(boost::bind(&LLPanelPlaces::onFilterEdit, this, _2, false)); } - mPlaceInfo = getChild<LLPanelPlaceInfo>("panel_place_info"); + mPlaceProfile = getChild<LLPanelPlaceProfile>("panel_place_profile"); + mLandmarkInfo = getChild<LLPanelLandmarkInfo>("panel_landmark_info"); + if (!mPlaceProfile || !mLandmarkInfo) + return FALSE; + + LLButton* back_btn = mPlaceProfile->getChild<LLButton>("back_btn"); + back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); - LLButton* back_btn = mPlaceInfo->getChild<LLButton>("back_btn"); + back_btn = mLandmarkInfo->getChild<LLButton>("back_btn"); back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); - LLLineEditor* title_editor = mPlaceInfo->getChild<LLLineEditor>("title_editor"); + LLLineEditor* title_editor = mLandmarkInfo->getChild<LLLineEditor>("title_editor"); title_editor->setKeystrokeCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this), NULL); - LLTextEditor* notes_editor = mPlaceInfo->getChild<LLTextEditor>("notes_editor"); + LLTextEditor* notes_editor = mLandmarkInfo->getChild<LLTextEditor>("notes_editor"); notes_editor->setKeystrokeCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this)); - LLComboBox* folder_combo = mPlaceInfo->getChild<LLComboBox>("folder_combo"); + LLComboBox* folder_combo = mLandmarkInfo->getChild<LLComboBox>("folder_combo"); folder_combo->setSelectionCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this)); + return TRUE; } void LLPanelPlaces::onOpen(const LLSD& key) { - if(mPlaceInfo == NULL || key.size() == 0) + if(!mPlaceProfile || !mLandmarkInfo || key.size() == 0) return; mFilterEditor->clear(); @@ -239,11 +245,11 @@ void LLPanelPlaces::onOpen(const LLSD& key) if (mPlaceInfoType == AGENT_INFO_TYPE) { - mPlaceInfo->setInfoType(LLPanelPlaceInfo::AGENT); + mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT); } else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE) { - mPlaceInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK); + mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK); if (key.has("x") && key.has("y") && key.has("z")) { @@ -256,11 +262,11 @@ void LLPanelPlaces::onOpen(const LLSD& key) mPosGlobal = gAgent.getPositionGlobal(); } - mPlaceInfo->displayParcelInfo(LLUUID(), mPosGlobal); + mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal); } else if (mPlaceInfoType == LANDMARK_INFO_TYPE) { - mPlaceInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); + mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); LLInventoryItem* item = gInventory.getItem(key["id"].asUUID()); if (!item) @@ -270,17 +276,12 @@ void LLPanelPlaces::onOpen(const LLSD& key) } else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) { - if (mPlaceInfo->isMediaPanelVisible()) - { - toggleMediaPanel(); - } - mPosGlobal = LLVector3d(key["x"].asReal(), key["y"].asReal(), key["z"].asReal()); - mPlaceInfo->setInfoType(LLPanelPlaceInfo::PLACE); - mPlaceInfo->displayParcelInfo(LLUUID(), mPosGlobal); + mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE); + mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); } else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) { @@ -291,9 +292,9 @@ void LLPanelPlaces::onOpen(const LLSD& key) mPosGlobal = hist_items[index].mGlobalPos; - mPlaceInfo->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); - mPlaceInfo->updateLastVisitedText(hist_items[index].mDate); - mPlaceInfo->displayParcelInfo(LLUUID(), mPosGlobal); + mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); + mPlaceProfile->updateLastVisitedText(hist_items[index].mDate); + mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); } LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); @@ -321,7 +322,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) void LLPanelPlaces::setItem(LLInventoryItem* item) { - if (!mPlaceInfo || !item) + if (!mLandmarkInfo || !item) return; mItem = item; @@ -351,19 +352,19 @@ void LLPanelPlaces::setItem(LLInventoryItem* item) if (is_landmark_editable) { - if(!mPlaceInfo->setLandmarkFolder(mItem->getParentUUID()) && !mItem->getParentUUID().isNull()) + if(!mLandmarkInfo->setLandmarkFolder(mItem->getParentUUID()) && !mItem->getParentUUID().isNull()) { const LLViewerInventoryCategory* cat = gInventory.getCategory(mItem->getParentUUID()); - if(cat) + if (cat) { - std::string cat_fullname = LLPanelPlaceInfo::getFullFolderName(cat); - LLComboBox* folderList = mPlaceInfo->getChild<LLComboBox>("folder_combo"); - folderList->add(cat_fullname, cat->getUUID(),ADD_TOP); + std::string cat_fullname = LLPanelLandmarkInfo::getFullFolderName(cat); + LLComboBox* folderList = mLandmarkInfo->getChild<LLComboBox>("folder_combo"); + folderList->add(cat_fullname, cat->getUUID(), ADD_TOP); } } } - mPlaceInfo->displayItemInfo(mItem); + mLandmarkInfo->displayItemInfo(mItem); LLLandmark* lm = gLandmarkList.getAsset(mItem->getAssetUUID(), boost::bind(&LLPanelPlaces::onLandmarkLoaded, this, _1)); @@ -375,13 +376,13 @@ void LLPanelPlaces::setItem(LLInventoryItem* item) void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark) { - if (!mPlaceInfo) + if (!mLandmarkInfo) return; LLUUID region_id; landmark->getRegionID(region_id); landmark->getGlobalPos(mPosGlobal); - mPlaceInfo->displayParcelInfo(region_id, mPosGlobal); + mLandmarkInfo->displayParcelInfo(region_id, mPosGlobal); } void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_filter) @@ -409,19 +410,10 @@ void LLPanelPlaces::onTabSelected() mActivePanel->updateVerbs(); } -/* -void LLPanelPlaces::onShareButtonClicked() -{ - // TODO: Launch the "Things" Share wizard -} -*/ - void LLPanelPlaces::onTeleportButtonClicked() { - if (!mPlaceInfo) - return; - - if (mPlaceInfo->getVisible()) + LLPanelPlaceInfo* panel = getCurrentInfoPanel(); + if (panel && panel->getVisible()) { if (mPlaceInfoType == LANDMARK_INFO_TYPE) { @@ -450,10 +442,8 @@ void LLPanelPlaces::onTeleportButtonClicked() void LLPanelPlaces::onShowOnMapButtonClicked() { - if (!mPlaceInfo) - return; - - if (mPlaceInfo->getVisible()) + LLPanelPlaceInfo* panel = getCurrentInfoPanel(); + if (panel && panel->getVisible()) { LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance(); if(!worldmap_instance) @@ -496,31 +486,31 @@ void LLPanelPlaces::onShowOnMapButtonClicked() void LLPanelPlaces::onEditButtonClicked() { - if (!mPlaceInfo || isLandmarkEditModeOn) + if (!mLandmarkInfo || isLandmarkEditModeOn) return; isLandmarkEditModeOn = true; - mPlaceInfo->toggleLandmarkEditMode(TRUE); + mLandmarkInfo->toggleLandmarkEditMode(TRUE); updateVerbs(); } void LLPanelPlaces::onSaveButtonClicked() { - if (!mPlaceInfo || mItem.isNull()) + if (!mLandmarkInfo || mItem.isNull()) return; - std::string current_title_value = mPlaceInfo->getLandmarkTitle(); + std::string current_title_value = mLandmarkInfo->getLandmarkTitle(); std::string item_title_value = mItem->getName(); - std::string current_notes_value = mPlaceInfo->getLandmarkNotes(); + std::string current_notes_value = mLandmarkInfo->getLandmarkNotes(); std::string item_notes_value = mItem->getDescription(); LLStringUtil::trim(current_title_value); LLStringUtil::trim(current_notes_value); LLUUID item_id = mItem->getUUID(); - LLUUID folder_id = mPlaceInfo->getLandmarkFolder(); + LLUUID folder_id = mLandmarkInfo->getLandmarkFolder(); LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(mItem); @@ -553,7 +543,7 @@ void LLPanelPlaces::onSaveButtonClicked() void LLPanelPlaces::onCancelButtonClicked() { - if (!mPlaceInfo) + if (!mLandmarkInfo) return; if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE) @@ -562,13 +552,13 @@ void LLPanelPlaces::onCancelButtonClicked() } else { - mPlaceInfo->toggleLandmarkEditMode(FALSE); + mLandmarkInfo->toggleLandmarkEditMode(FALSE); isLandmarkEditModeOn = false; updateVerbs(); // Reload the landmark properties. - mPlaceInfo->displayItemInfo(mItem); + mLandmarkInfo->displayItemInfo(mItem); } } @@ -597,7 +587,7 @@ void LLPanelPlaces::onOverflowButtonClicked() if (mItem.notNull()) { const LLUUID& item_id = mItem->getUUID(); - const LLUUID& trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); is_landmark_removable = gInventory.isObjectDescendentOf(item_id, gInventory.getRootFolderID()) && !gInventory.isObjectDescendentOf(item_id, trash_id); } @@ -652,9 +642,6 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param) } else if (item == "pick") { - if (!mPlaceInfo) - return; - if (mPickPanel == NULL) { mPickPanel = LLPanelPickEdit::create(); @@ -667,7 +654,12 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param) togglePickPanel(TRUE); mPickPanel->onOpen(LLSD()); - mPlaceInfo->createPick(mPosGlobal, mPickPanel); + + LLPanelPlaceInfo* panel = getCurrentInfoPanel(); + if (panel) + { + panel->createPick(mPosGlobal, mPickPanel); + } LLRect rect = getRect(); mPickPanel->reshape(rect.getWidth(), rect.getHeight()); @@ -677,7 +669,7 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param) { if ( mItem.notNull() ) { - LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE); + const LLUUID& favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); if ( favorites_id.notNull() ) { copy_inventory_item(gAgent.getID(), @@ -694,39 +686,16 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param) void LLPanelPlaces::onBackButtonClicked() { - if (!mPlaceInfo) - return; - - if (mPlaceInfo->isMediaPanelVisible()) - { - toggleMediaPanel(); - } - else - { - togglePlaceInfoPanel(FALSE); + togglePlaceInfoPanel(FALSE); - // Resetting mPlaceInfoType when Place Info panel is closed. - mPlaceInfoType = LLStringUtil::null; + // Resetting mPlaceInfoType when Place Info panel is closed. + mPlaceInfoType = LLStringUtil::null; - isLandmarkEditModeOn = false; - } + isLandmarkEditModeOn = false; updateVerbs(); } -void LLPanelPlaces::toggleMediaPanel() -{ - if (!mPlaceInfo) - return; - - mPlaceInfo->toggleMediaPanel(!mPlaceInfo->isMediaPanelVisible()); - - // Refresh the current place info because - // the media panel controls can't refer to - // the remote parcel media. - onOpen(LLSD().insert("type", AGENT_INFO_TYPE)); -} - void LLPanelPlaces::togglePickPanel(BOOL visible) { setAllChildrenVisible(this, !visible); @@ -737,26 +706,50 @@ void LLPanelPlaces::togglePickPanel(BOOL visible) void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) { - if (!mPlaceInfo) + if (!mPlaceProfile || !mLandmarkInfo) return; - mPlaceInfo->setVisible(visible); mFilterEditor->setVisible(!visible); mTabContainer->setVisible(!visible); - if (visible) + if (mPlaceInfoType == AGENT_INFO_TYPE || + mPlaceInfoType == REMOTE_PLACE_INFO_TYPE || + mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) { - mPlaceInfo->resetLocation(); + mPlaceProfile->setVisible(visible); - LLRect rect = getRect(); - LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom); - mPlaceInfo->reshape(new_rect.getWidth(),new_rect.getHeight()); + if (visible) + { + mPlaceProfile->resetLocation(); + + LLRect rect = getRect(); + LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom); + mPlaceProfile->reshape(new_rect.getWidth(), new_rect.getHeight()); + + mLandmarkInfo->setVisible(FALSE); + } + } + else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE || + mPlaceInfoType == LANDMARK_INFO_TYPE) + { + mLandmarkInfo->setVisible(visible); + + if (visible) + { + mLandmarkInfo->resetLocation(); + + LLRect rect = getRect(); + LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom); + mLandmarkInfo->reshape(new_rect.getWidth(), new_rect.getHeight()); + + mPlaceProfile->setVisible(FALSE); + } } } void LLPanelPlaces::changedParcelSelection() { - if (!mPlaceInfo) + if (!mPlaceProfile) return; LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); @@ -782,8 +775,8 @@ void LLPanelPlaces::changedParcelSelection() } } - mPlaceInfo->resetLocation(); - mPlaceInfo->displaySelectedParcelInfo(parcel, region, mPosGlobal, is_current_parcel); + mPlaceProfile->resetLocation(); + mPlaceProfile->displaySelectedParcelInfo(parcel, region, mPosGlobal, is_current_parcel); updateVerbs(); } @@ -830,41 +823,32 @@ void LLPanelPlaces::changedInventory(U32 mask) gInventory.removeObserver(mInventoryObserver); } -void LLPanelPlaces::onAgentParcelChange() +void LLPanelPlaces::updateVerbs() { - if (!mPlaceInfo) - return; + bool is_place_info_visible; - if (mPlaceInfo->isMediaPanelVisible()) + LLPanelPlaceInfo* panel = getCurrentInfoPanel(); + if (panel) { - onOpen(LLSD().insert("type", AGENT_INFO_TYPE)); + is_place_info_visible = panel->getVisible(); } else { - updateVerbs(); + is_place_info_visible = false; } -} - -void LLPanelPlaces::updateVerbs() -{ - if (!mPlaceInfo) - return; - bool is_place_info_visible = mPlaceInfo->getVisible(); bool is_agent_place_info_visible = mPlaceInfoType == AGENT_INFO_TYPE; bool is_create_landmark_visible = mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE; - bool is_media_panel_visible = mPlaceInfo->isMediaPanelVisible(); mTeleportBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); mShowOnMapBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); - mShareBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); mOverflowBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); mEditBtn->setVisible(mPlaceInfoType == LANDMARK_INFO_TYPE && !isLandmarkEditModeOn); mSaveBtn->setVisible(isLandmarkEditModeOn); mCancelBtn->setVisible(isLandmarkEditModeOn); mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); - mOverflowBtn->setEnabled(is_place_info_visible && !is_media_panel_visible && !is_create_landmark_visible); + mOverflowBtn->setEnabled(is_place_info_visible && !is_create_landmark_visible); if (is_place_info_visible) { @@ -872,16 +856,13 @@ void LLPanelPlaces::updateVerbs() { // We don't need to teleport to the current location // so check if the location is not within the current parcel. - mTeleportBtn->setEnabled(!is_media_panel_visible && - !mPosGlobal.isExactlyZero() && + mTeleportBtn->setEnabled(!mPosGlobal.isExactlyZero() && !LLViewerParcelMgr::getInstance()->inAgentParcel(mPosGlobal)); } else if (mPlaceInfoType == LANDMARK_INFO_TYPE || mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) { mTeleportBtn->setEnabled(TRUE); } - - mShowOnMapBtn->setEnabled(!is_media_panel_visible); } else { @@ -890,6 +871,23 @@ void LLPanelPlaces::updateVerbs() } } +LLPanelPlaceInfo* LLPanelPlaces::getCurrentInfoPanel() +{ + if (mPlaceInfoType == AGENT_INFO_TYPE || + mPlaceInfoType == REMOTE_PLACE_INFO_TYPE || + mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) + { + return mPlaceProfile; + } + else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE || + mPlaceInfoType == LANDMARK_INFO_TYPE) + { + return mLandmarkInfo; + } + + return NULL; +} + static bool is_agent_in_selected_parcel(LLParcel* parcel) { LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index e2d281dd84..0d97353b66 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -37,6 +37,10 @@ class LLInventoryItem; class LLFilterEditor; class LLLandmark; + +class LLPanelLandmarkInfo; +class LLPanelPlaceProfile; + class LLPanelPickEdit; class LLPanelPlaceInfo; class LLPanelPlacesTab; @@ -69,7 +73,6 @@ private: void onFilterEdit(const std::string& search_string, bool force_filter); void onTabSelected(); - //void onShareButtonClicked(); void onTeleportButtonClicked(); void onShowOnMapButtonClicked(); void onEditButtonClicked(); @@ -85,20 +88,22 @@ private: void togglePickPanel(BOOL visible); void togglePlaceInfoPanel(BOOL visible); - void onAgentParcelChange(); void updateVerbs(); + LLPanelPlaceInfo* getCurrentInfoPanel(); + LLFilterEditor* mFilterEditor; LLPanelPlacesTab* mActivePanel; LLTabContainer* mTabContainer; - LLPanelPlaceInfo* mPlaceInfo; + LLPanelPlaceProfile* mPlaceProfile; + LLPanelLandmarkInfo* mLandmarkInfo; + LLPanelPickEdit* mPickPanel; LLToggleableMenu* mPlaceMenu; LLToggleableMenu* mLandmarkMenu; LLButton* mTeleportBtn; LLButton* mShowOnMapBtn; - LLButton* mShareBtn; LLButton* mEditBtn; LLButton* mSaveBtn; LLButton* mCancelBtn; diff --git a/indra/newview/llpanelplacestab.cpp b/indra/newview/llpanelplacestab.cpp index 7c0a7b0cc4..42c871a41a 100644 --- a/indra/newview/llpanelplacestab.cpp +++ b/indra/newview/llpanelplacestab.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -51,7 +51,6 @@ bool LLPanelPlacesTab::isTabVisible() void LLPanelPlacesTab::setPanelPlacesButtons(LLPanelPlaces* panel) { - //mShareBtn = panel->getChild<LLButton>("share_btn"); mTeleportBtn = panel->getChild<LLButton>("teleport_btn"); mShowOnMapBtn = panel->getChild<LLButton>("map_btn"); } diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h index 1c70869414..458694d766 100644 --- a/indra/newview/llpanelplacestab.h +++ b/indra/newview/llpanelplacestab.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -44,10 +44,8 @@ public: virtual void onSearchEdit(const std::string& string) = 0; virtual void updateVerbs() = 0; // Updates buttons at the bottom of Places panel - //virtual void onShare() = 0; virtual void onShowOnMap() = 0; virtual void onTeleport() = 0; - //virtual void onCopySLURL() = 0; bool isTabVisible(); // Check if parent TabContainer is visible. @@ -58,7 +56,6 @@ public: const LLUUID& snapshot_id, bool teleport); protected: - //LLButton* mShareBtn; LLButton* mTeleportBtn; LLButton* mShowOnMapBtn; }; diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 58ca481b77..73e19b3b2a 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -228,6 +228,7 @@ void LLPanelPrimMediaControls::updateShape() bool can_navigate = parcel->getMediaAllowNavigate(); bool enabled = false; + bool is_zoomed = (mCurrentZoom != ZOOM_NONE); // There is no such thing as "has_focus" being different from normal controls set // anymore (as of user feedback from bri 10/09). So we cheat here and force 'has_focus' // to 'true' (or, actually, we use a setting) @@ -256,7 +257,7 @@ void LLPanelPrimMediaControls::updateShape() LLUICtrl* stop_ctrl = getChild<LLUICtrl>("stop"); LLUICtrl* media_stop_ctrl = getChild<LLUICtrl>("media_stop"); LLUICtrl* home_ctrl = getChild<LLUICtrl>("home"); - LLUICtrl* close_ctrl = getChild<LLUICtrl>("close"); + LLUICtrl* unzoom_ctrl = getChild<LLUICtrl>("close"); // This is actually "unzoom" LLUICtrl* open_ctrl = getChild<LLUICtrl>("new_window"); LLUICtrl* zoom_ctrl = getChild<LLUICtrl>("zoom_frame"); LLPanel* media_loading_panel = getChild<LLPanel>("media_progress_indicator"); @@ -283,7 +284,8 @@ void LLPanelPrimMediaControls::updateShape() reload_ctrl->setVisible(has_focus); stop_ctrl->setVisible(false); home_ctrl->setVisible(has_focus); - close_ctrl->setVisible(has_focus); + zoom_ctrl->setVisible(!is_zoomed); + unzoom_ctrl->setVisible(has_focus && is_zoomed); open_ctrl->setVisible(true); media_address_ctrl->setVisible(has_focus && !mini_controls); media_play_slider_panel->setVisible(has_focus && !mini_controls); @@ -294,6 +296,7 @@ void LLPanelPrimMediaControls::updateShape() whitelist_icon->setVisible(!mini_controls && (media_data)?media_data->getWhiteListEnable():false); // Disable zoom if HUD zoom_ctrl->setEnabled(!objectp->isHUDAttachment()); + unzoom_ctrl->setEnabled(!objectp->isHUDAttachment()); secure_lock_icon->setVisible(false); mCurrentURL = media_impl->getCurrentMediaURL(); @@ -691,24 +694,31 @@ bool LLPanelPrimMediaControls::isMouseOver() getWindow()->getCursorPosition(&cursor_pos_window); getWindow()->convertCoords(cursor_pos_window, &cursor_pos_gl); - LLPanel* controls_panel = NULL; - controls_panel = getChild<LLPanel>("media_hover_controls"); - if(controls_panel && !controls_panel->getVisible()) - { - // The hover controls aren't visible -- use the focused controls instead. - controls_panel = getChild<LLPanel>("media_focused_controls"); - } + LLView* controls_view = NULL; + controls_view = getChild<LLView>("media_controls"); - if(controls_panel && controls_panel->getVisible()) + if(controls_view && controls_view->getVisible()) { - controls_panel->screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &x, &y); + controls_view->screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &x, &y); - LLView *hit_child = controls_panel->childFromPoint(x, y); - if(hit_child) + LLView *hit_child = controls_view->childFromPoint(x, y); + if(hit_child && hit_child->getVisible()) { // This was useful for debugging both coordinate translation and view hieararchy problems... -// llinfos << "mouse coords: " << x << ", " << y << " hit child " << hit_child->getName() << llendl; - result = true; + // llinfos << "mouse coords: " << x << ", " << y << " hit child " << hit_child->getName() << llendl; + + // This will be a direct child of the LLLayoutStack, which should be a layout_panel. + // These may not shown/hidden by the logic in updateShape(), so we need to do another hit test on the children of the layout panel, + // which are the actual controls. + hit_child->screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &x, &y); + + LLView *hit_child_2 = hit_child->childFromPoint(x, y); + if(hit_child_2 && hit_child_2->getVisible()) + { + // This was useful for debugging both coordinate translation and view hieararchy problems... + // llinfos << " mouse coords: " << x << ", " << y << " hit child 2 " << hit_child_2->getName() << llendl; + result = true; + } } } } diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h index b59d1d42f3..45c2fc116e 100644 --- a/indra/newview/llpanelprofileview.h +++ b/indra/newview/llpanelprofileview.h @@ -36,6 +36,8 @@ #include "llpanel.h" #include "llpanelprofile.h" #include "llavatarpropertiesprocessor.h" +#include "llagent.h" +#include "lltooldraganddrop.h" class LLPanelProfile; class LLPanelProfileTab; @@ -64,6 +66,18 @@ public: /*virtual*/ void togglePanel(LLPanel* panel); + BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, + BOOL drop, EDragAndDropType cargo_type, + void *cargo_data, EAcceptance *accept, + std::string& tooltip_msg) + { + LLToolDragAndDrop::handleGiveDragAndDrop(getAvatarId(), gAgent.getSessionID(), drop, + cargo_type, cargo_data, accept); + + return TRUE; + } + + protected: void onBackBtnClick(); diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 7dd9df674c..28e89fd619 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2001-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -71,9 +71,10 @@ public: static void showPlaceInfoPanel(S32 index); private: - void onInfoBtnClick(); + void onProfileBtnClick(); - LLButton* mInfoBtn; + LLButton* mProfileBtn; + LLTeleportHistoryPanel::ContextMenu *mContextMenu; S32 mIndex; @@ -95,8 +96,9 @@ BOOL LLTeleportHistoryFlatItem::postBuild() LLTextBox *region = getChild<LLTextBox>("region"); region->setValue(mRegionName); - mInfoBtn = getChild<LLButton>("info_btn"); - mInfoBtn->setClickedCallback(boost::bind(&LLTeleportHistoryFlatItem::onInfoBtnClick, this)); + mProfileBtn = getChild<LLButton>("profile_btn"); + + mProfileBtn->setClickedCallback(boost::bind(&LLTeleportHistoryFlatItem::onProfileBtnClick, this)); return true; } @@ -111,7 +113,7 @@ void LLTeleportHistoryFlatItem::setValue(const LLSD& value) void LLTeleportHistoryFlatItem::onMouseEnter(S32 x, S32 y, MASK mask) { childSetVisible("hovered_icon", true); - mInfoBtn->setVisible(true); + mProfileBtn->setVisible(true); LLPanel::onMouseEnter(x, y, mask); } @@ -119,7 +121,7 @@ void LLTeleportHistoryFlatItem::onMouseEnter(S32 x, S32 y, MASK mask) void LLTeleportHistoryFlatItem::onMouseLeave(S32 x, S32 y, MASK mask) { childSetVisible("hovered_icon", false); - mInfoBtn->setVisible(false); + mProfileBtn->setVisible(false); LLPanel::onMouseLeave(x, y, mask); } @@ -142,7 +144,7 @@ void LLTeleportHistoryFlatItem::showPlaceInfoPanel(S32 index) LLSideTray::getInstance()->showPanel("panel_places", params); } -void LLTeleportHistoryFlatItem::onInfoBtnClick() +void LLTeleportHistoryFlatItem::onProfileBtnClick() { LLTeleportHistoryFlatItem::showPlaceInfoPanel(mIndex); } @@ -357,7 +359,7 @@ void LLTeleportHistoryPanel::onCopySLURL() U64 new_region_handle = to_region_handle(global_pos); - LLWorldMap::url_callback_t cb = boost::bind( + LLWorldMapMessage::url_callback_t cb = boost::bind( &LLPanelPlacesTab::onRegionResponse, this, global_pos, _1, _2, _3, _4); diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index 7c1b403432..b34d9e876c 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2001-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index e97eb1df2b..32223e314e 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -32,23 +32,35 @@ #include "llviewerprecompiledheaders.h" +// common includes +#include "lltrans.h" +#include "llavataractions.h" +#include "llagent.h" + #include "llparticipantlist.h" #include "llavatarlist.h" #include "llspeakers.h" //LLParticipantList retrieves add, clear and remove events and updates view accordingly +#if LL_MSVC +#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally +#endif LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list): mSpeakerMgr(data_source), - mAvatarList(avatar_list) + mAvatarList(avatar_list), + mSortOrder(E_SORT_BY_NAME) { - mSpeakerAddListener = new SpeakerAddListener(mAvatarList); - mSpeakerRemoveListener = new SpeakerRemoveListener(mAvatarList); - mSpeakerClearListener = new SpeakerClearListener(mAvatarList); + mSpeakerAddListener = new SpeakerAddListener(*this); + mSpeakerRemoveListener = new SpeakerRemoveListener(*this); + mSpeakerClearListener = new SpeakerClearListener(*this); mSpeakerMgr->addListener(mSpeakerAddListener, "add"); mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove"); mSpeakerMgr->addListener(mSpeakerClearListener, "clear"); + mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData")); + mAvatarList->setDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList)); + //Lets fill avatarList with existing speakers LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); @@ -58,24 +70,33 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av { group_members.push_back((*it)->mID); } - mAvatarList->setDirty(); - mAvatarList->sortByName(); + sort(); } LLParticipantList::~LLParticipantList() { - delete mSpeakerAddListener; - delete mSpeakerRemoveListener; - delete mSpeakerClearListener; - mSpeakerAddListener = NULL; - mSpeakerRemoveListener = NULL; - mSpeakerClearListener = NULL; } -// -// LLParticipantList::SpeakerAddListener -// -bool LLParticipantList::SpeakerAddListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +void LLParticipantList::onAvatarListDoubleClicked(LLAvatarList* list) +{ + LLUUID clicked_id = list->getSelectedUUID(); + + if (clicked_id.isNull() || clicked_id == gAgent.getID()) + return; + + LLAvatarActions::startIM(clicked_id); +} + +void LLParticipantList::setSortOrder(EParticipantSortOrder order) +{ + if ( mSortOrder != order ) + { + mSortOrder = order; + sort(); + } +} + +bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); LLUUID uu_id = event->getValue().asUUID(); @@ -88,15 +109,11 @@ bool LLParticipantList::SpeakerAddListener::handleEvent(LLPointer<LLOldEvents::L } group_members.push_back(uu_id); - mAvatarList->setDirty(); - mAvatarList->sortByName(); + sort(); return true; } -// -// LLParticipantList::SpeakerRemoveListener -// -bool LLParticipantList::SpeakerRemoveListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +bool LLParticipantList::onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); LLAvatarList::uuid_vector_t::iterator pos = std::find(group_members.begin(), group_members.end(), event->getValue().asUUID()); @@ -108,10 +125,7 @@ bool LLParticipantList::SpeakerRemoveListener::handleEvent(LLPointer<LLOldEvents return true; } -// -// LLParticipantList::SpeakerClearListener -// -bool LLParticipantList::SpeakerClearListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +bool LLParticipantList::onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); group_members.clear(); @@ -119,3 +133,45 @@ bool LLParticipantList::SpeakerClearListener::handleEvent(LLPointer<LLOldEvents: return true; } +void LLParticipantList::sort() +{ + if ( !mAvatarList ) + return; + + // Mark AvatarList as dirty one + mAvatarList->setDirty(); + + // TODO: Implement more sorting orders after specs updating (EM) + switch ( mSortOrder ) { + case E_SORT_BY_NAME : + mAvatarList->sortByName(); + break; + default : + llwarns << "Unrecognized sort order for " << mAvatarList->getName() << llendl; + return; + } +} + +// +// LLParticipantList::SpeakerAddListener +// +bool LLParticipantList::SpeakerAddListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +{ + return mParent.onAddItemEvent(event, userdata); +} + +// +// LLParticipantList::SpeakerRemoveListener +// +bool LLParticipantList::SpeakerRemoveListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +{ + return mParent.onRemoveItemEvent(event, userdata); +} + +// +// LLParticipantList::SpeakerClearListener +// +bool LLParticipantList::SpeakerClearListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +{ + return mParent.onClearListEvent(event, userdata); +} diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 68aae0aee5..8c209c0b20 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -38,46 +38,74 @@ class LLAvatarList; class LLParticipantList { + LOG_CLASS(LLParticipantList); public: LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list); ~LLParticipantList(); + typedef enum e_participant_sort_oder { + E_SORT_BY_NAME = 0, + } EParticipantSortOrder; + + /** + * Set and sort Avatarlist by given order + */ + void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME); + protected: + /** + * LLSpeakerMgr event handlers + */ + bool onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); + bool onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); + bool onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); + + /** + * Sorts the Avatarlist by stored order + */ + void sort(); //List of listeners implementing LLOldEvents::LLSimpleListener. //There is no way to handle all the events in one listener as LLSpeakerMgr registers listeners in such a way //that one listener can handle only one type of event - class SpeakerAddListener : public LLOldEvents::LLSimpleListener + class BaseSpeakerListner : public LLOldEvents::LLSimpleListener { public: - SpeakerAddListener(LLAvatarList* avatar_list) : mAvatarList(avatar_list) {} + BaseSpeakerListner(LLParticipantList& parent) : mParent(parent) {} + protected: + LLParticipantList& mParent; + }; + class SpeakerAddListener : public BaseSpeakerListner + { + public: + SpeakerAddListener(LLParticipantList& parent) : BaseSpeakerListner(parent) {} /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); - LLAvatarList* mAvatarList; }; - class SpeakerRemoveListener : public LLOldEvents::LLSimpleListener + class SpeakerRemoveListener : public BaseSpeakerListner { public: - SpeakerRemoveListener(LLAvatarList* avatar_list) : mAvatarList(avatar_list) {} - + SpeakerRemoveListener(LLParticipantList& parent) : BaseSpeakerListner(parent) {} /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); - LLAvatarList* mAvatarList; }; - class SpeakerClearListener : public LLOldEvents::LLSimpleListener + class SpeakerClearListener : public BaseSpeakerListner { public: - SpeakerClearListener(LLAvatarList* avatar_list) : mAvatarList(avatar_list) {} - + SpeakerClearListener(LLParticipantList& parent) : BaseSpeakerListner(parent) {} /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); - LLAvatarList* mAvatarList; }; + private: + void onAvatarListDoubleClicked(LLAvatarList* list); + LLSpeakerMgr* mSpeakerMgr; - LLAvatarList* mAvatarList; + LLAvatarList* mAvatarList; + + LLPointer<SpeakerAddListener> mSpeakerAddListener; + LLPointer<SpeakerRemoveListener> mSpeakerRemoveListener; + LLPointer<SpeakerClearListener> mSpeakerClearListener; - SpeakerAddListener* mSpeakerAddListener; - SpeakerRemoveListener* mSpeakerRemoveListener; - SpeakerClearListener* mSpeakerClearListener; + EParticipantSortOrder mSortOrder; }; diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index b06e70c00a..34e78b5c46 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -45,6 +45,7 @@ #include "lltooldraganddrop.h" #include "llradiogroup.h" #include "llassetstorage.h" +#include "llviewerassettype.h" #include "llviewerobject.h" #include "llviewerobjectlist.h" #include "lldbstrings.h" @@ -317,7 +318,7 @@ BOOL LLPreview::handleHover(S32 x, S32 y, MASK mask) && LLToolDragAndDrop::getInstance()->isOverThreshold(screen_x, screen_y)) { EDragAndDropType type; - type = LLAssetType::lookupDragAndDropType(item->getType()); + type = LLViewerAssetType::lookupDragAndDropType(item->getType()); LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_LIBRARY; if(!mObjectUUID.isNull()) { @@ -406,7 +407,7 @@ void LLPreview::onDiscardBtn(void* data) */ // Move the item to the trash - LLUUID trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if (item->getParentUUID() != trash_id) { LLInventoryModel::update_list_t update; diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index ab2afb8056..7b3a20d102 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -130,10 +130,10 @@ LLPreviewGesture* LLPreviewGesture::show(const LLUUID& item_id, const LLUUID& ob preview->setObjectID(object_id); // Start speculative download of sounds and animations - LLUUID animation_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_ANIMATION); + const LLUUID animation_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_ANIMATION); gInventory.startBackgroundFetch(animation_folder_id); - LLUUID sound_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_SOUND); + const LLUUID sound_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_SOUND); gInventory.startBackgroundFetch(sound_folder_id); // this will call refresh when we have everything. diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 6324b0adf9..d2527065db 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -204,6 +204,11 @@ void LLPreviewTexture::draw() // Pump the texture priority F32 pixel_area = mLoadingFullImage ? (F32)MAX_IMAGE_AREA : (F32)(interior.getWidth() * interior.getHeight() ); mImage->addTextureStats( pixel_area ); + if(pixel_area > 0.f) + { + //boost the previewed image priority to the highest to make it to get loaded first. + mImage->setAdditionalDecodePriority(1.0f) ; + } // Don't bother decoding more than we can display, unless // we're loading the full image. @@ -570,8 +575,9 @@ void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata) void LLPreviewTexture::loadAsset() { - mImage = LLViewerTextureManager::getFetchedTexture(mImageID, MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + mImage = LLViewerTextureManager::getFetchedTexture(mImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); mImage->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); + mImage->forceToSaveRawImage(0) ; mAssetStatus = PREVIEW_ASSET_LOADING; updateDimensions(); } diff --git a/indra/newview/llresourcedata.h b/indra/newview/llresourcedata.h index 46b79150bb..b4b9042689 100644 --- a/indra/newview/llresourcedata.h +++ b/indra/newview/llresourcedata.h @@ -39,11 +39,12 @@ struct LLResourceData { LLAssetInfo mAssetInfo; - LLAssetType::EType mPreferredLocation; + LLFolderType::EType mPreferredLocation; LLInventoryType::EType mInventoryType; U32 mNextOwnerPerm; S32 mExpectedUploadCost; void *mUserData; + static const S8 INVALID_LOCATION = -2; }; #endif diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 987bc4b596..fd31690622 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -204,8 +204,7 @@ public: // signal on rejecting of a toast event typedef boost::function<void (LLUUID id)> reject_tost_callback_t; typedef boost::signals2::signal<void (LLUUID id)> reject_tost_signal_t; - reject_tost_signal_t mRejectToastSignal; - boost::signals2::connection setOnRejectToastCallback(reject_tost_callback_t cb) { return mRejectToastSignal.connect(cb); } + reject_tost_signal_t mRejectToastSignal; boost::signals2::connection setOnRejectToastCallback(reject_tost_callback_t cb) { return mRejectToastSignal.connect(cb); } private: struct ToastElem diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index 0a520ff65f..1fbaeb94f5 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -209,7 +209,7 @@ void LLScrollingPanelParam::onSliderMoved(LLUICtrl* ctrl, void* userdata) F32 new_weight = self->percentToWeight( (F32)slider->getValue().asReal() ); if (current_weight != new_weight ) { - self->mWearable->setVisualParamWeight( param->getID(), new_weight, TRUE ); + self->mWearable->setVisualParamWeight( param->getID(), new_weight, FALSE ); gAgent.getAvatarObject()->updateVisualParams(); } } @@ -298,7 +298,7 @@ void LLScrollingPanelParam::onHintHeldDown( LLVisualParamHint* hint ) if (slider->getMinValue() < new_percent && new_percent < slider->getMaxValue()) { - mWearable->setVisualParamWeight( hint->getVisualParam()->getID(), new_weight, TRUE); + mWearable->setVisualParamWeight( hint->getVisualParam()->getID(), new_weight, FALSE); gAgent.getAvatarObject()->updateVisualParams(); slider->setValue( weightToPercent( new_weight ) ); @@ -330,7 +330,7 @@ void LLScrollingPanelParam::onHintMinMouseUp( void* userdata ) if (slider->getMinValue() < new_percent && new_percent < slider->getMaxValue()) { - self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, TRUE); + self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, FALSE); slider->setValue( self->weightToPercent( new_weight ) ); } } @@ -364,7 +364,7 @@ void LLScrollingPanelParam::onHintMaxMouseUp( void* userdata ) if (slider->getMinValue() < new_percent && new_percent < slider->getMaxValue()) { - self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, TRUE); + self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight, FALSE); slider->setValue( self->weightToPercent( new_weight ) ); } } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 47e745c9d3..4cb561381d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1449,7 +1449,7 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid) // Texture picker defaults aren't inventory items // * Don't need to worry about permissions for them // * Can just apply the texture and be done with it. - objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE)); + objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } return true; } @@ -1605,7 +1605,7 @@ BOOL LLSelectMgr::selectionRevertTextures() } else { - object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE)); + object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } } } @@ -2828,7 +2828,7 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response, case 0: { // TODO: Make sure you have delete permissions on all of them. - LLUUID trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); // attempt to derez into the trash. LLDeRezInfo* info = new LLDeRezInfo(DRD_TRASH, trash_id); LLSelectMgr::getInstance()->sendListToRegions("DeRezObject", @@ -3407,7 +3407,7 @@ void LLSelectMgr::deselectAll() { return; } - + // Zap the angular velocity, as the sim will set it to zero for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); iter != mSelectedObjects->end(); iter++ ) @@ -3497,6 +3497,7 @@ void LLSelectMgr::deselectAllIfTooFar() LLVector3d selectionCenter = getSelectionCenterGlobal(); if (gSavedSettings.getBOOL("LimitSelectDistance") && (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar()) + && (mSelectedObjects->getPrimaryObject() != LLViewerMediaFocus::getInstance()->getFocusedObject()) && !mSelectedObjects->isAttachment() && !selectionCenter.isExactlyZero()) { @@ -4605,7 +4606,7 @@ void LLSelectMgr::updateSilhouettes() if (!mSilhouetteImagep) { - mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", TRUE, TRUE); + mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", TRUE, LLViewerTexture::BOOST_UI); } mHighlightedObjects->cleanupNodes(); @@ -4921,6 +4922,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) inspect_item_id = panel_task_info->getSelectedUUID(); } + LLUUID focus_item_id = LLViewerMediaFocus::getInstance()->getFocusedObjectID(); for (S32 pass = 0; pass < 2; pass++) { for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); @@ -4934,7 +4936,11 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) { continue; } - if(objectp->getID() == inspect_item_id) + if (objectp->getID() == focus_item_id) + { + node->renderOneSilhouette(gFocusMgr.getFocusColor()); + } + else if(objectp->getID() == inspect_item_id) { node->renderOneSilhouette(sHighlightInspectColor); } @@ -4988,19 +4994,6 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) } } -#if 0 - // Hilight focused media object - { - LLViewerObject* objectp = LLViewerMediaFocus::getInstance()->getFocusedObject(); - if(objectp) - { - // FIXME: how do I construct a silhouette for an object that's not selected? - // Would we need to add another LLObjectSelectionHandle for this purpose? - node->renderOneSilhouette(gFocusMgr.getFocusColor()); - } - } -#endif - if (for_hud && avatar) { glMatrixMode(GL_PROJECTION); diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 9f317803ce..8c5439d47e 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2679,8 +2679,7 @@ void renderTexturePriority(LLDrawable* drawable) //LLViewerTexture* imagep = facep->getTexture(); //if (imagep) { - - //F32 vsize = LLVOVolume::getTextureVirtualSize(facep); + //F32 vsize = imagep->mMaxVirtualSize; F32 vsize = facep->getPixelArea(); @@ -2704,7 +2703,7 @@ void renderTexturePriority(LLDrawable* drawable) drawBox(center, size); /*S32 boost = imagep->getBoostLevel(); - if (boost) + if (boost>LLViewerTexture::BOOST_NONE) { F32 t = (F32) boost / (F32) (LLViewerTexture::BOOST_MAX_LEVEL-1); LLVector4 col = lerp(boost_cold, boost_hot, t); diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp new file mode 100644 index 0000000000..cd765b0338 --- /dev/null +++ b/indra/newview/llspeakbutton.cpp @@ -0,0 +1,174 @@ +/** +* @file llspeakbutton.cpp +* @brief LLSpeakButton 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" // must be first include + +#include "llagent.h" +#include "llbottomtray.h" +#include "llfloaterreg.h" +#include "llvoiceclient.h" +#include "llvoicecontrolpanel.h" +#include "lltransientfloatermgr.h" + +#include "llavatariconctrl.h" +#include "llbutton.h" +#include "llpanel.h" +#include "lltextbox.h" +#include "lloutputmonitorctrl.h" +#include "llgroupmgr.h" + +#include "llspeakbutton.h" + +static LLDefaultChildRegistry::Register<LLSpeakButton> t1("talk_button"); + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +LLSpeakButton::Params::Params() + : speak_button("speak_button") + , show_button("show_button") + , monitor("monitor") +{ + // See widgets/talk_button.xml +} + +LLSpeakButton::LLSpeakButton(const Params& p) +: LLUICtrl(p) +, mPrivateCallPanel(NULL) +, mOutputMonitor(NULL) +, mSpeakBtn(NULL) +, mShowBtn(NULL) +{ + LLRect rect = p.rect(); + LLRect speak_rect(0, rect.getHeight(), rect.getWidth(), 0); + LLRect show_rect = p.show_button.rect(); + show_rect.set(0, rect.getHeight(), show_rect.getWidth(), 0); + + speak_rect.mRight -= show_rect.getWidth(); + show_rect.mLeft = speak_rect.getWidth(); + show_rect.mRight = rect.getWidth(); + + LLButton::Params speak_params = p.speak_button; + speak_params.rect(speak_rect); + mSpeakBtn = LLUICtrlFactory::create<LLButton>(speak_params); + addChild(mSpeakBtn); + LLTransientFloaterMgr::getInstance()->addControlView(mSpeakBtn); + + mSpeakBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_SpeakBtn, this)); + mSpeakBtn->setToggleState(FALSE); + + LLButton::Params show_params = p.show_button; + show_params.rect(show_rect); + mShowBtn = LLUICtrlFactory::create<LLButton>(show_params); + addChild(mShowBtn); + LLTransientFloaterMgr::getInstance()->addControlView(mShowBtn); + + mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this)); + mShowBtn->setToggleState(FALSE); + + static const S32 MONITOR_RIGHT_PAD = 2; + + LLRect monitor_rect = p.monitor.rect(); + S32 monitor_height = monitor_rect.getHeight(); + monitor_rect.mLeft = speak_rect.getWidth() - monitor_rect.getWidth() - MONITOR_RIGHT_PAD; + monitor_rect.mRight = speak_rect.getWidth() - MONITOR_RIGHT_PAD; + monitor_rect.mBottom = (rect.getHeight() / 2) - (monitor_height / 2); + monitor_rect.mTop = monitor_rect.mBottom + monitor_height; + + LLOutputMonitorCtrl::Params monitor_params = p.monitor; + monitor_params.draw_border(false); + monitor_params.rect(monitor_rect); + monitor_params.auto_update(true); + monitor_params.speaker_id(gAgentID); + mOutputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(monitor_params); + mSpeakBtn->addChild(mOutputMonitor); + + // never show "muted" because you can't mute yourself + mOutputMonitor->setIsMuted(false); + mOutputMonitor->setIsAgentControl(true); +} + +LLSpeakButton::~LLSpeakButton() +{ +} + +void LLSpeakButton::setSpeakBtnToggleState(bool state) +{ + mSpeakBtn->setToggleState(state); +} + +void LLSpeakButton::onClick_SpeakBtn() +{ + bool speaking = mSpeakBtn->getToggleState(); + gVoiceClient->setUserPTTState(speaking); +} + +void LLSpeakButton::onClick_ShowBtn() +{ + if(!mShowBtn->getToggleState()) + { + mPrivateCallPanel->onClickClose(mPrivateCallPanel); + delete mPrivateCallPanel; + mPrivateCallPanel = NULL; + mShowBtn->setToggleState(FALSE); + return; + } + + S32 x = mSpeakBtn->getRect().mLeft; + S32 y = 0; + + localPointToScreen(x, y, &x, &y); + + mPrivateCallPanel = new LLVoiceControlPanel; + getRootView()->addChild(mPrivateCallPanel); + + y = LLBottomTray::getInstance()->getRect().getHeight() + mPrivateCallPanel->getRect().getHeight(); + + LLRect rect; + rect.setLeftTopAndSize(x, y, mPrivateCallPanel->getRect().getWidth(), mPrivateCallPanel->getRect().getHeight()); + mPrivateCallPanel->setRect(rect); + + + LLAvatarListItem* item = new LLAvatarListItem(); + item->showLastInteractionTime(false); + item->showInfoBtn(true); + item->showSpeakingIndicator(true); + item->reshape(mPrivateCallPanel->getRect().getWidth(), item->getRect().getHeight(), FALSE); + + mPrivateCallPanel->addItem(item); + mPrivateCallPanel->setVisible(TRUE); + mPrivateCallPanel->setFrontmost(TRUE); + + mShowBtn->setToggleState(TRUE); +} + diff --git a/indra/newview/llspeakbutton.h b/indra/newview/llspeakbutton.h new file mode 100644 index 0000000000..f59ded2133 --- /dev/null +++ b/indra/newview/llspeakbutton.h @@ -0,0 +1,82 @@ +/** +* @file llspeakbutton.h +* @brief LLSpeakButton 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_LLSPEAKBUTTON_H +#define LL_LLSPEAKBUTTON_H + +#include "llinitparam.h" +#include "lluictrl.h" + +class LLVoiceControlPanel; +class LLButton; +class LLOutputMonitorCtrl; + +/* + * Button displaying voice chat status. Displays voice chat options when + * clicked. +*/ +class LLSpeakButton : public LLUICtrl + +{ +public: + + struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> + { + Optional<LLButton::Params> + speak_button, + show_button; + + Optional<LLOutputMonitorCtrl::Params> monitor; + + Params(); + }; + + /*virtual*/ ~LLSpeakButton(); + + void setSpeakBtnToggleState(bool state); + +protected: + friend class LLUICtrlFactory; + LLSpeakButton(const Params& p); + + void onClick_SpeakBtn(); + + void onClick_ShowBtn(); + +private: + LLButton* mSpeakBtn; + LLButton* mShowBtn; + LLVoiceControlPanel* mPrivateCallPanel; + LLOutputMonitorCtrl* mOutputMonitor; +}; + +#endif // LL_LLSPEAKBUTTON_H diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 9aa74e8b9f..4c322810d5 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -60,6 +60,7 @@ #include "llfocusmgr.h" #include "llhttpsender.h" #include "lllocationhistory.h" +#include "llimageworker.h" #include "llloginflags.h" #include "llmd5.h" #include "llmemorystream.h" @@ -168,7 +169,7 @@ #include "llvoclouds.h" #include "llweb.h" #include "llworld.h" -#include "llworldmap.h" +#include "llworldmapmessage.h" #include "llxfermanager.h" #include "pipeline.h" #include "llappviewer.h" @@ -334,7 +335,7 @@ void populate_favorites_bar() S32 count = lib_cats->count(); for(S32 i = 0; i < count; ++i) { - if(lib_cats->get(i)->getPreferredType() == LLAssetType::AT_LANDMARK) + if(lib_cats->get(i)->getPreferredType() == LLFolderType::FT_LANDMARK) { lib_landmarks = lib_cats->get(i)->getUUID(); break; @@ -351,7 +352,7 @@ void populate_favorites_bar() gInventory.getDirectDescendentsOf(lib_landmarks, lm_cats, lm_items); if (!lm_items) return; - LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE); + const LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); if (favorites_id.isNull()) { llerror("My Inventory is missing My Favorites", 0); @@ -738,7 +739,7 @@ bool idle_startup() } if (!gLoginHandler.getFirstName().empty() || !gLoginHandler.getLastName().empty() - || !gLoginHandler.getWebLoginKey().isNull() ) + /*|| !gLoginHandler.getWebLoginKey().isNull()*/ ) { // We have at least some login information on a SLURL gFirstname = gLoginHandler.getFirstName(); @@ -895,13 +896,9 @@ bool idle_startup() gViewerWindow->moveProgressViewToFront(); //reset the values that could have come in from a slurl - if (!gLoginHandler.getWebLoginKey().isNull()) - { - gFirstname = gLoginHandler.getFirstName(); - gLastname = gLoginHandler.getLastName(); -// gWebLoginKey = gLoginHandler.getWebLoginKey(); - } - + gFirstname = gLoginHandler.getFirstName(); + gLastname = gLoginHandler.getLastName(); + if (show_connect_box) { // TODO if not use viewer auth @@ -1314,6 +1311,7 @@ bool idle_startup() gViewerWindow->moveProgressViewToFront(); LLError::logToFixedBuffer(gDebugView->mDebugConsolep); + // set initial visibility of debug console gDebugView->mDebugConsolep->setVisible(gSavedSettings.getBOOL("ShowDebugConsole")); } @@ -1677,7 +1675,7 @@ bool idle_startup() gInventory.buildParentChildMap(); //all categories loaded. lets create "My Favorites" category - gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE,true); + gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE,true); // lets create "Friends" and "Friends/All" in the Inventory "Calling Cards" and fill it with buddies LLFriendCardsManager::instance().syncFriendsFolder(); @@ -2529,9 +2527,8 @@ void register_viewer_callbacks(LLMessageSystem* msg) msg->setHandlerFunc("AvatarPickerReply", LLFloaterAvatarPicker::processAvatarPickerReply); - msg->setHandlerFunc("MapLayerReply", LLWorldMap::processMapLayerReply); - msg->setHandlerFunc("MapBlockReply", LLWorldMap::processMapBlockReply); - msg->setHandlerFunc("MapItemReply", LLWorldMap::processMapItemReply); + msg->setHandlerFunc("MapBlockReply", LLWorldMapMessage::processMapBlockReply); + msg->setHandlerFunc("MapItemReply", LLWorldMapMessage::processMapItemReply); msg->setHandlerFunc("EventInfoReply", LLPanelEvent::processEventInfoReply); msg->setHandlerFunc("PickInfoReply", &LLAvatarPropertiesProcessor::processPickInfoReply); diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index 5440b2c9ad..1d479bac8c 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -234,12 +234,7 @@ void LLSurface::createSTexture() { if (!mSTexturep) { - // Fill with dummy gray data. - - //mSTexturep = LLViewerTextureManager::getLocalTexture(sTextureSize, sTextureSize, 3, FALSE); - //mSTexturep->dontDiscard(); - //mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); - + // Fill with dummy gray data. // GL NOT ACTIVE HERE LLPointer<LLImageRaw> raw = new LLImageRaw(sTextureSize, sTextureSize, 3); U8 *default_texture = raw->getData(); diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index c255418429..723ac0fc33 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -66,6 +66,7 @@ BOOL LLSysWellWindow::postBuild() // init connections to the list's update events connectListUpdaterToSignal("notify"); connectListUpdaterToSignal("groupnotify"); + connectListUpdaterToSignal("offer"); // get a corresponding channel initChannel(); diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 5d9046ac90..5d682cad3c 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -670,8 +670,6 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE); gGL.setColorMask(true, true); - BOOL render_morph = mAvatar->morphMaskNeedsUpdate(mBakedTexIndex); - // clear buffer area to ensure we don't pick up UI elements { gGL.flush(); @@ -691,12 +689,8 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) if (layer->getRenderPass() == LLTexLayer::RP_COLOR) { gGL.flush(); - success &= layer->render(x, y, width, height, render_morph); + success &= layer->render(x, y, width, height); gGL.flush(); - if (layer->isMorphValid()) - { - mAvatar->setMorphMasksValid(TRUE, mBakedTexIndex); - } } } @@ -786,12 +780,10 @@ void LLTexLayerSet::gatherMorphMaskAlpha(U8 *data, S32 width, S32 height) { memset(data, 255, width * height); - BOOL render_morph = mAvatar->morphMaskNeedsUpdate(mBakedTexIndex); - for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ ) { LLTexLayerInterface* layer = *iter; - layer->gatherAlphaMasks(data, mComposite->getOriginX(),mComposite->getOriginY(), width, height, render_morph); + layer->gatherAlphaMasks(data, mComposite->getOriginX(),mComposite->getOriginY(), width, height); } // Set alpha back to that of our alpha masks. @@ -863,6 +855,31 @@ void LLTexLayerSet::applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_ mAvatar->applyMorphMask(tex_data, width, height, num_components, mBakedTexIndex); } +BOOL LLTexLayerSet::isMorphValid() +{ + for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ ) + { + LLTexLayerInterface* layer = *iter; + if (layer && !layer->isMorphValid()) + { + return FALSE; + } + } + return TRUE; +} + +void LLTexLayerSet::invalidateMorphMasks() +{ + for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ ) + { + LLTexLayerInterface* layer = *iter; + if (layer) + { + layer->invalidateMorphMasks(); + } + } +} + //----------------------------------------------------------------------------- // LLTexLayerInfo @@ -1282,7 +1299,7 @@ void LLTexLayer::calculateTexLayerColor(const param_color_list_t ¶m_list, LL } } -BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, BOOL render_morph) +BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height) { LLGLEnable color_mat(GL_COLOR_MATERIAL); gPipeline.disableLights(); @@ -1333,7 +1350,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, BOOL render_morph) } }//*/ - renderMorphMasks(x, y, width, height, net_color, render_morph); + renderMorphMasks(x, y, width, height, net_color); alpha_mask_specified = TRUE; gGL.flush(); gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ONE_MINUS_DEST_ALPHA); @@ -1371,7 +1388,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, BOOL render_morph) LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode(); - gGL.getTexUnit(0)->bind(tex); + gGL.getTexUnit(0)->bind(tex, TRUE); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); gl_rect_2d_simple_tex( width, height ); @@ -1393,7 +1410,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, BOOL render_morph) LLViewerTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask); if( tex ) { - gGL.getTexUnit(0)->bind(tex); + gGL.getTexUnit(0)->bind(tex, TRUE); gl_rect_2d_simple_tex( width, height ); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } @@ -1506,7 +1523,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) if( tex ) { LLGLSNoAlphaTest gls_no_alpha_test; - gGL.getTexUnit(0)->bind(tex); + gGL.getTexUnit(0)->bind(tex, TRUE); gl_rect_2d_simple_tex( width, height ); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } @@ -1534,12 +1551,12 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) return success; } -/*virtual*/ void LLTexLayer::gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, BOOL render_morph) +/*virtual*/ void LLTexLayer::gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height) { - addAlphaMask(data, originX, originY, width, height, render_morph); + addAlphaMask(data, originX, originY, width, height); } -BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, BOOL render_morph) +BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color) { BOOL success = TRUE; @@ -1578,46 +1595,38 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC // Accumulate the alpha component of the texture if( getInfo()->mLocalTexture != -1 ) { - LLViewerTexture* tex = mLocalTextureObject->getImage(); - if( tex && (tex->getComponents() == 4) ) - { - LLGLSNoAlphaTest gls_no_alpha_test; + LLViewerTexture* tex = mLocalTextureObject->getImage(); + if( tex && (tex->getComponents() == 4) ) + { + LLGLSNoAlphaTest gls_no_alpha_test; - LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode(); - - gGL.getTexUnit(0)->bind(tex); - gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); + LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode(); + + gGL.getTexUnit(0)->bind(tex, TRUE); + gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); - gl_rect_2d_simple_tex( width, height ); + gl_rect_2d_simple_tex( width, height ); - gGL.getTexUnit(0)->setTextureAddressMode(old_mode); - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - } - else - { - success = FALSE; - } + gGL.getTexUnit(0)->setTextureAddressMode(old_mode); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } + } if( !getInfo()->mStaticImageFileName.empty() ) { - LLViewerTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask); - if( tex ) - { - if( (tex->getComponents() == 4) || - ( (tex->getComponents() == 1) && getInfo()->mStaticImageIsMask ) ) - { - LLGLSNoAlphaTest gls_no_alpha_test; - gGL.getTexUnit(0)->bind(tex); - gl_rect_2d_simple_tex( width, height ); - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - } - } - else + LLViewerTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask); + if( tex ) + { + if( (tex->getComponents() == 4) || + ( (tex->getComponents() == 1) && getInfo()->mStaticImageIsMask ) ) { - success = FALSE; + LLGLSNoAlphaTest gls_no_alpha_test; + gGL.getTexUnit(0)->bind(tex, TRUE); + gl_rect_2d_simple_tex( width, height ); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } } + } // Draw a rectangle with the layer color to multiply the alpha by that color's alpha. // Note: we're still using gGL.blendFunc( GL_DST_ALPHA, GL_ZERO ); @@ -1634,7 +1643,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC gGL.setColorMask(true, true); - if (render_morph && mHasMorph && success) + if (hasMorph() && success) { LLCRC alpha_mask_crc; const LLUUID& uuid = getUUID(); @@ -1674,7 +1683,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC return success; } -void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height, BOOL render_morph) +void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height) { S32 size = width * height; U8* alphaData = getAlphaData(); @@ -1684,7 +1693,7 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 findNetColor( &net_color ); // TODO: eliminate need for layer morph mask valid flag invalidateMorphMasks(); - renderMorphMasks(originX, originY, width, height, net_color, render_morph); + renderMorphMasks(originX, originY, width, height, net_color); alphaData = getAlphaData(); } if (alphaData) @@ -1805,7 +1814,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) return layer; } -/*virtual*/ BOOL LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height, BOOL render_morph) +/*virtual*/ BOOL LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height) { BOOL success = TRUE; updateWearableCache(); @@ -1827,7 +1836,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) { wearable->writeToAvatar(FALSE, FALSE); layer->setLTO(lto); - success &= layer->render(x,y,width,height,render_morph); + success &= layer->render(x,y,width,height); } } @@ -1849,7 +1858,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) return success; } -/*virtual*/ void LLTexLayerTemplate::gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, BOOL render_morph) +/*virtual*/ void LLTexLayerTemplate::gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height) { U32 num_wearables = updateWearableCache(); for (U32 i = 0; i < num_wearables; i++) @@ -1857,7 +1866,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) LLTexLayer *layer = getLayer(i); if (layer) { - layer->addAlphaMask(data, originX, originY, width, height, render_morph); + layer->addAlphaMask(data, originX, originY, width, height); } } } @@ -2034,7 +2043,7 @@ LLViewerTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_n // that once an image is a mask it's always a mask. tex->setExplicitFormat( GL_ALPHA8, GL_ALPHA ); } - tex->createGLTexture(0, image_raw); + tex->createGLTexture(0, image_raw, 0, TRUE, LLViewerTexture::LOCAL); gGL.getTexUnit(0)->bind(tex); tex->setAddressMode(LLTexUnit::TAM_CLAMP); diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index e4a6e82ba5..cd8f27a96b 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -81,13 +81,14 @@ public: const LLTexLayerInfo* getInfo() const { return mInfo; } virtual BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable ); // This sets mInfo and calls initialization functions - virtual BOOL render(S32 x, S32 y, S32 width, S32 height, BOOL render_morph) = 0; + virtual BOOL render(S32 x, S32 y, S32 width, S32 height) = 0; void requestUpdate(); LLTexLayerSet* const getTexLayerSet() const { return mTexLayerSet; } virtual void deleteCaches() = 0; void invalidateMorphMasks(); virtual void setHasMorph(BOOL newval) { mHasMorph = newval; } + BOOL hasMorph() { return mHasMorph; } BOOL isMorphValid() { return mMorphMasksValid; } const std::string& getName() const; @@ -95,7 +96,7 @@ public: const std::string& getGlobalColor() const; virtual BOOL blendAlphaTexture( S32 x, S32 y, S32 width, S32 height) = 0; - virtual void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, BOOL render_morph) = 0; + virtual void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height) = 0; BOOL hasAlphaParams() const { return !mParamAlphaList.empty(); } BOOL isVisibilityMask() const; @@ -134,10 +135,10 @@ public: LLTexLayerTemplate(const LLTexLayerTemplate &layer); /*virtual*/ ~LLTexLayerTemplate(); - /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, BOOL render_morph); + /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height); /*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable ); // This sets mInfo and calls initialization functions /*virtual*/ BOOL blendAlphaTexture( S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer - /*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, BOOL render_morph); + /*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height); /*virtual*/ void setHasMorph(BOOL newval); /*virtual*/ void deleteCaches(); private: @@ -162,16 +163,16 @@ public: /*virtual*/ ~LLTexLayer(); /*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable ); // This sets mInfo and calls initialization functions - /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, BOOL render_morph); + /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height); /*virtual*/ void deleteCaches(); U8* getAlphaData(); BOOL findNetColor(LLColor4* color) const; /*virtual*/ BOOL blendAlphaTexture( S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer - /*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, BOOL render_morph); - BOOL renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, BOOL render_morph); - void addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height, BOOL render_morph); + /*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height); + BOOL renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color); + void addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height); void setLTO(LLLocalTextureObject *lto) { mLocalTextureObject = lto; } LLLocalTextureObject* getLTO() { return mLocalTextureObject; } @@ -261,6 +262,8 @@ public: void deleteCaches(); void gatherMorphMaskAlpha(U8 *data, S32 width, S32 height); void applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components); + BOOL isMorphValid(); + void invalidateMorphMasks(); LLTexLayerInterface* findLayerByName(const std::string& name); void cloneTemplates(LLLocalTextureObject *lto, LLVOAvatarDefines::ETextureIndex tex_index, LLWearable* wearable); diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 1b249d75d1..69a2d1d7a6 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -43,11 +43,17 @@ // Included to allow LLTextureCache::purgeTextures() to pause watchdog timeout #include "llappviewer.h" -#define USE_LFS_READ 0 -#define USE_LFS_WRITE 0 - -// Note: first 4 bytes store file size, rest is j2c data -const S32 TEXTURE_CACHE_ENTRY_SIZE = FIRST_PACKET_SIZE; //1024; +// Cache organization: +// cache/texture.entries +// Unordered array of Entry structs +// cache/texture.cache +// First TEXTURE_CACHE_ENTRY_SIZE bytes of each texture in texture.entries in same order +// cache/textures/[0-F]/UUID.texture +// Actual texture body files + +const S32 TEXTURE_CACHE_ENTRY_SIZE = 1024; +const F32 TEXTURE_CACHE_PURGE_AMOUNT = .20f; // % amount to reduce the cache by when it exceeds its limit +const F32 TEXTURE_CACHE_LRU_SIZE = .10f; // % amount for LRU list (low overhead to regenerate) class LLTextureCacheWorker : public LLWorkerClass { @@ -309,94 +315,75 @@ void LLTextureCacheWorker::startWork(S32 param) { } +// This is where a texture is read from the cache system (header and body) +// Current assumption are: +// - the whole data are in a raw form, will be stored at mReadData +// - the size of this raw data is mDataSize and can be smaller than TEXTURE_CACHE_ENTRY_SIZE (the size of a record in the header cache) +// - the code supports offset reading but this is actually never exercised in the viewer bool LLTextureCacheRemoteWorker::doRead() { + bool done = false; + S32 idx = -1; + S32 local_size = 0; std::string local_filename; + // First state / stage : find out if the file is local if (mState == INIT) { std::string filename = mCache->getLocalFileName(mID); - local_filename = filename + ".j2c"; - local_size = LLAPRFile::size(local_filename, mCache->getLocalAPRFilePool()); - if (local_size == 0) + // Is it a JPEG2000 file? { - local_filename = filename + ".tga"; + local_filename = filename + ".j2c"; local_size = LLAPRFile::size(local_filename, mCache->getLocalAPRFilePool()); if (local_size > 0) { - mImageFormat = IMG_CODEC_TGA; - mDataSize = local_size; // Only a complete .tga file is valid + mImageFormat = IMG_CODEC_J2C; } } - if (local_size > 0) - { - mState = LOCAL; - } - else - { - mState = CACHE; - } - } - - if (mState == LOCAL) - { -#if USE_LFS_READ - if (mFileHandle == LLLFSThread::nullHandle()) + // If not, is it a jpeg file? + if (local_size == 0) { - mImageLocal = TRUE; - mImageSize = local_size; - if (!mDataSize || mDataSize + mOffset > local_size) + local_filename = filename + ".jpg"; + local_size = LLAPRFile::size(local_filename, mCache->getLocalAPRFilePool()); + if (local_size > 0) { - mDataSize = local_size - mOffset; + mImageFormat = IMG_CODEC_JPEG; + mDataSize = local_size; // Only a complete .jpg file is valid } - if (mDataSize <= 0) - { - // no more data to read - mDataSize = 0; - return true; - } - mReadData = new U8[mDataSize]; - mBytesRead = -1; - mBytesToRead = mDataSize; - setPriority(LLWorkerThread::PRIORITY_LOW | mPriority); - mFileHandle = LLLFSThread::sLocal->read(local_filename, mReadData, mOffset, mDataSize, - new ReadResponder(mCache, mRequestHandle)); - return false; } - else + // Hmm... What about a targa file? (used for UI texture mostly) + if (local_size == 0) { - if (mBytesRead >= 0) - { - if (mBytesRead != mBytesToRead) - { -// llwarns << "Error reading file from local cache: " << local_filename -// << " Bytes: " << mDataSize << " Offset: " << mOffset -// << " / " << mDataSize << llendl; - mDataSize = 0; // failed - delete[] mReadData; - mReadData = NULL; - } - return true; - } - else + local_filename = filename + ".tga"; + local_size = LLAPRFile::size(local_filename, mCache->getLocalAPRFilePool()); + if (local_size > 0) { - return false; + mImageFormat = IMG_CODEC_TGA; + mDataSize = local_size; // Only a complete .tga file is valid } } -#else + // Determine the next stage: if we found a file, then LOCAL else CACHE + mState = (local_size > 0 ? LOCAL : CACHE); + } + + // Second state / stage : if the file is local, load it and leave + if (!done && (mState == LOCAL)) + { + llassert(local_size != 0); // we're assuming there is a non empty local file here... if (!mDataSize || mDataSize > local_size) { mDataSize = local_size; } + // Allocate read buffer mReadData = new U8[mDataSize]; S32 bytes_read = LLAPRFile::readEx(local_filename, mReadData, mOffset, mDataSize, mCache->getLocalAPRFilePool()); if (bytes_read != mDataSize) { -// llwarns << "Error reading file from local cache: " << local_filename -// << " Bytes: " << mDataSize << " Offset: " << mOffset -// << " / " << mDataSize << llendl; + llwarns << "Error reading file from local cache: " << local_filename + << " Bytes: " << mDataSize << " Offset: " << mOffset + << " / " << mDataSize << llendl; mDataSize = 0; delete[] mReadData; mReadData = NULL; @@ -406,405 +393,275 @@ bool LLTextureCacheRemoteWorker::doRead() mImageSize = local_size; mImageLocal = TRUE; } - return true; -#endif + // We're done... + done = true; } - S32 idx = -1; - - if (mState == CACHE) + // Second state / stage : identify the cache or not... + if (!done && (mState == CACHE)) { - llassert_always(mImageSize == 0); - idx = mCache->getHeaderCacheEntry(mID, false, &mImageSize); - if (idx >= 0 && mImageSize > mOffset) + idx = mCache->getHeaderCacheEntry(mID, mImageSize); + if (idx < 0) { - llassert_always(mImageSize > 0); - if (!mDataSize || mDataSize > mImageSize) - { - mDataSize = mImageSize; - } - mState = mOffset < TEXTURE_CACHE_ENTRY_SIZE ? HEADER : BODY; + // The texture is *not* cached. We're done here... + mDataSize = 0; // no data + done = true; } else { - mDataSize = 0; // no data - return true; + // 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; } } - if (mState == HEADER) + // Third state / stage : read data from the header cache (texture.entries) file + if (!done && (mState == HEADER)) { -#if USE_LFS_READ - if (mFileHandle == LLLFSThread::nullHandle()) - { - llassert_always(idx >= 0); - llassert_always(mOffset < TEXTURE_CACHE_ENTRY_SIZE); - S32 offset = idx * TEXTURE_CACHE_ENTRY_SIZE + mOffset; - S32 size = TEXTURE_CACHE_ENTRY_SIZE - mOffset; - llassert_always(mReadData == NULL); - mReadData = new U8[size]; - mBytesRead = -1; - mBytesToRead = size; - setPriority(LLWorkerThread::PRIORITY_LOW | mPriority); - mFileHandle = LLLFSThread::sLocal->read(mCache->mHeaderDataFileName, - mReadData, offset, mBytesToRead, - new ReadResponder(mCache, mRequestHandle)); - return false; - } - else - { - if (mBytesRead >= 0) - { - if (mBytesRead != mBytesToRead) - { -// llwarns << "LLTextureCacheWorker: " << mID -// << " incorrect number of bytes read from header: " << mBytesRead -// << " != " << mBytesToRead << llendl; - mDataSize = -1; // failed - return true; - } - if (mDataSize <= TEXTURE_CACHE_ENTRY_SIZE) - { - return true; // done - } - else - { - mFileHandle = LLLFSThread::nullHandle(); - mState = BODY; - } - } - else - { - return false; - } - } -#else - llassert_always(idx >= 0); + llassert_always(idx >= 0); // we need an entry here or reading the header makes no sense llassert_always(mOffset < TEXTURE_CACHE_ENTRY_SIZE); S32 offset = idx * TEXTURE_CACHE_ENTRY_SIZE + mOffset; + // Compute the size we need to read (in bytes) S32 size = TEXTURE_CACHE_ENTRY_SIZE - mOffset; + size = llmin(size, mDataSize); + // Allocate the read buffer mReadData = new U8[size]; S32 bytes_read = LLAPRFile::readEx(mCache->mHeaderDataFileName, mReadData, offset, size, mCache->getLocalAPRFilePool()); if (bytes_read != size) { -// llwarns << "LLTextureCacheWorker: " << mID -// << " incorrect number of bytes read from header: " << bytes_read -// << " / " << size << llendl; + llwarns << "LLTextureCacheWorker: " << mID + << " incorrect number of bytes read from header: " << bytes_read + << " / " << size << llendl; + delete[] mReadData; + mReadData = NULL; mDataSize = -1; // failed - return true; + done = true; } - if (mDataSize <= TEXTURE_CACHE_ENTRY_SIZE) + // If we already read all we expected, we're actually done + if (mDataSize <= bytes_read) { - return true; // done + done = true; } else { mState = BODY; } -#endif } - if (mState == BODY) + // Fourth state / stage : read the rest of the data from the UUID based cached file + if (!done && (mState == BODY)) { -#if USE_LFS_READ - if (mFileHandle == LLLFSThread::nullHandle()) - { - std::string filename = mCache->getTextureFileName(mID); - S32 filesize = LLAPRFile::size(filename, mCache->getLocalAPRFilePool()); - if (filesize > mOffset) - { - S32 datasize = TEXTURE_CACHE_ENTRY_SIZE + filesize; - mDataSize = llmin(datasize, mDataSize); - S32 data_offset = TEXTURE_CACHE_ENTRY_SIZE - mOffset; - data_offset = llmax(data_offset, 0); - S32 file_size = mDataSize - data_offset; - S32 file_offset = mOffset - TEXTURE_CACHE_ENTRY_SIZE; - file_offset = llmax(file_offset, 0); - - llassert_always(mDataSize > 0); - U8* data = new U8[mDataSize]; - if (data_offset > 0) - { - llassert_always(mReadData); - llassert_always(data_offset <= mDataSize); - memcpy(data, mReadData, data_offset); - delete[] mReadData; - mReadData = NULL; - } - llassert_always(mReadData == NULL); - mReadData = data; - - mBytesRead = -1; - mBytesToRead = file_size; - setPriority(LLWorkerThread::PRIORITY_LOW | mPriority); - llassert_always(data_offset + mBytesToRead <= mDataSize); - mFileHandle = LLLFSThread::sLocal->read(filename, - mReadData + data_offset, file_offset, mBytesToRead, - new ReadResponder(mCache, mRequestHandle)); - return false; - } - else - { - mDataSize = TEXTURE_CACHE_ENTRY_SIZE; - return true; // done - } - } - else - { - if (mBytesRead >= 0) - { - if (mBytesRead != mBytesToRead) - { -// llwarns << "LLTextureCacheWorker: " << mID -// << " incorrect number of bytes read from body: " << mBytesRead -// << " != " << mBytesToRead << llendl; - mDataSize = -1; // failed - } - return true; - } - else - { - return false; - } - } -#else std::string filename = mCache->getTextureFileName(mID); S32 filesize = LLAPRFile::size(filename, mCache->getLocalAPRFilePool()); - S32 bytes_read = 0; - if (filesize > mOffset) + + if (filesize && (filesize + TEXTURE_CACHE_ENTRY_SIZE) > mOffset) { - S32 datasize = TEXTURE_CACHE_ENTRY_SIZE + filesize; - mDataSize = llmin(datasize, mDataSize); - S32 data_offset = TEXTURE_CACHE_ENTRY_SIZE - mOffset; - data_offset = llmax(data_offset, 0); - S32 file_size = mDataSize - data_offset; - S32 file_offset = mOffset - TEXTURE_CACHE_ENTRY_SIZE; - file_offset = llmax(file_offset, 0); + S32 max_datasize = TEXTURE_CACHE_ENTRY_SIZE + filesize - mOffset; + mDataSize = llmin(max_datasize, mDataSize); + + S32 data_offset, file_size, file_offset; + // Reserve the whole data buffer first U8* data = new U8[mDataSize]; - if (data_offset > 0) + + // Set the data file pointers taking the read offset into account. 2 cases: + if (mOffset < TEXTURE_CACHE_ENTRY_SIZE) { + // Offset within the header record. That means we read something from the header cache. + // Note: most common case is (mOffset = 0), so this is the "normal" code path. + data_offset = TEXTURE_CACHE_ENTRY_SIZE - mOffset; // i.e. TEXTURE_CACHE_ENTRY_SIZE if mOffset nul (common case) + file_offset = 0; + file_size = mDataSize - data_offset; + // Copy the raw data we've been holding from the header cache into the new sized buffer llassert_always(mReadData); memcpy(data, mReadData, data_offset); delete[] mReadData; + mReadData = NULL; + } + else + { + // Offset bigger than the header record. That means we haven't read anything yet. + data_offset = 0; + file_offset = mOffset - TEXTURE_CACHE_ENTRY_SIZE; + file_size = mDataSize; + // No data from header cache to copy in that case, we skipped it all } + + // Now use that buffer as the object read buffer + llassert_always(mReadData == NULL); mReadData = data; - bytes_read = LLAPRFile::readEx(filename, + + // Read the data at last + S32 bytes_read = LLAPRFile::readEx(filename, mReadData + data_offset, file_offset, file_size, mCache->getLocalAPRFilePool()); if (bytes_read != file_size) { -// llwarns << "LLTextureCacheWorker: " << mID -// << " incorrect number of bytes read from body: " << bytes_read -// << " / " << file_size << llendl; + llwarns << "LLTextureCacheWorker: " << mID + << " incorrect number of bytes read from body: " << bytes_read + << " / " << file_size << llendl; + delete[] mReadData; + mReadData = NULL; mDataSize = -1; // failed - return true; + done = true; } } else { - mDataSize = TEXTURE_CACHE_ENTRY_SIZE; - } - - return true; -#endif + // No body, we're done. + mDataSize = llmax(TEXTURE_CACHE_ENTRY_SIZE - mOffset, 0); + lldebugs << "No body file for: " << filename << llendl; + } + // Nothing else to do at that point... + done = true; } - - return false; + + // Clean up and exit + return done; } +// This is where *everything* about a texture is written down in the cache system (entry map, header and body) +// Current assumption are: +// - the whole data are in a raw form, starting at mWriteData +// - the size of this raw data is mDataSize and can be smaller than TEXTURE_CACHE_ENTRY_SIZE (the size of a record in the header cache) +// - the code *does not* support offset writing so there are no difference between buffer addresses and start of data bool LLTextureCacheRemoteWorker::doWrite() { + bool done = false; S32 idx = -1; - // No LOCAL state for write() - + // 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... + mState = CACHE; + } + + // No LOCAL state for write(): because it doesn't make much sense to cache a local file... + + // Second state / stage : set an entry in the headers entry (texture.entries) file + if (!done && (mState == CACHE)) + { + bool alreadyCached = false; S32 cur_imagesize = 0; - S32 offset = mOffset; - idx = mCache->getHeaderCacheEntry(mID, false, &cur_imagesize); - if (idx >= 0 && cur_imagesize > 0) + // Checks if this image is already in the entry list + idx = mCache->getHeaderCacheEntry(mID, cur_imagesize); + if (idx >= 0 && (cur_imagesize >= 0)) { - offset = TEXTURE_CACHE_ENTRY_SIZE; // don't re-write header + alreadyCached = true; // already there and non empty } - idx = mCache->getHeaderCacheEntry(mID, true, &mImageSize); // touch entry - if (idx >= 0) + idx = mCache->setHeaderCacheEntry(mID, mImageSize); // create or touch the entry + if (idx < 0) { - if(cur_imagesize > 0 && mImageSize != cur_imagesize) - { -// llwarns << "Header cache entry size: " << cur_imagesize << " != mImageSize: " << mImageSize << llendl; - offset = 0; // re-write header - } - mState = offset < TEXTURE_CACHE_ENTRY_SIZE ? HEADER : BODY; + llwarns << "LLTextureCacheWorker: " << mID + << " Unable to create header entry for writing!" << llendl; + mDataSize = -1; // failed + done = true; } else { - mDataSize = -1; // failed - return true; + 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 + done = true; + } + else + { + // If the texture has already been cached, we don't resave the header and go directly to the body part + mState = alreadyCached ? BODY : HEADER; + } } } - - if (mState == HEADER) + + // Third stage / state : write the header record in the header file (texture.cache) + if (!done && (mState == HEADER)) { -#if USE_LFS_WRITE - if (mFileHandle == LLLFSThread::nullHandle()) + llassert_always(idx >= 0); // we need an entry here or storing the header makes no sense + S32 offset = idx * TEXTURE_CACHE_ENTRY_SIZE; // skip to the correct spot in the header file + S32 size = TEXTURE_CACHE_ENTRY_SIZE; // record size is fixed for the header + S32 bytes_written; + + if (mDataSize < TEXTURE_CACHE_ENTRY_SIZE) { - llassert_always(idx >= 0); - llassert_always(mOffset < TEXTURE_CACHE_ENTRY_SIZE); - S32 offset = idx * TEXTURE_CACHE_ENTRY_SIZE + mOffset; - S32 size = TEXTURE_CACHE_ENTRY_SIZE - mOffset; - mBytesRead = -1; - mBytesToRead = size; - setPriority(LLWorkerThread::PRIORITY_LOW | mPriority); - mFileHandle = LLLFSThread::sLocal->write(mCache->mHeaderDataFileName, - mWriteData, offset, mBytesToRead, - new WriteResponder(mCache, mRequestHandle)); - return false; + // We need to write a full record in the header cache so, if the amount of data is smaller + // than a record, we need to transfer the data to a buffer padded with 0 and write that + U8* padBuffer = new U8[TEXTURE_CACHE_ENTRY_SIZE]; + memset(padBuffer, 0, TEXTURE_CACHE_ENTRY_SIZE); // Init with zeros + memcpy(padBuffer, mWriteData, mDataSize); // Copy the write buffer + bytes_written = LLAPRFile::writeEx(mCache->mHeaderDataFileName, padBuffer, offset, size, mCache->getLocalAPRFilePool()); + delete [] padBuffer; } else { - if (mBytesRead >= 0) - { - if (mBytesRead != mBytesToRead) - { -// llwarns << "LLTextureCacheWorker: " << mID -// << " incorrect number of bytes written to header: " << mBytesRead -// << " != " << mBytesToRead << llendl; - mDataSize = -1; // failed - return true; - } - if (mDataSize <= mBytesToRead) - { - return true; // done - } - else - { - mFileHandle = LLLFSThread::nullHandle(); - mState = BODY; - } - } - else - { - return false; - } + // Write the header record (== first TEXTURE_CACHE_ENTRY_SIZE bytes of the raw file) in the header file + bytes_written = LLAPRFile::writeEx(mCache->mHeaderDataFileName, mWriteData, offset, size, mCache->getLocalAPRFilePool()); } -#else - llassert_always(idx >= 0); - llassert_always(mOffset < TEXTURE_CACHE_ENTRY_SIZE); - S32 offset = idx * TEXTURE_CACHE_ENTRY_SIZE + mOffset; - S32 size = TEXTURE_CACHE_ENTRY_SIZE - mOffset; - S32 bytes_written = LLAPRFile::writeEx(mCache->mHeaderDataFileName, mWriteData, offset, size, mCache->getLocalAPRFilePool()); if (bytes_written <= 0) { -// llwarns << "LLTextureCacheWorker: missing entry: " << mID << llendl; + llwarns << "LLTextureCacheWorker: " << mID + << " Unable to write header entry!" << llendl; mDataSize = -1; // failed - return true; + done = true; } - if (mDataSize <= size) + // If we wrote everything (may be more with padding) in the header cache, + // we're done so we don't have a body to store + if (mDataSize <= bytes_written) { - return true; // done + done = true; } else { mState = BODY; } -#endif } - if (mState == BODY) + // Fourth stage / state : write the body file, i.e. the rest of the texture in a "UUID" file name + if (!done && (mState == BODY)) { -#if USE_LFS_WRITE - if (mFileHandle == LLLFSThread::nullHandle()) + 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)) { - S32 data_offset = TEXTURE_CACHE_ENTRY_SIZE - mOffset; - data_offset = llmax(data_offset, 0); - S32 file_size = mDataSize - data_offset; - S32 file_offset = mOffset - TEXTURE_CACHE_ENTRY_SIZE; - file_offset = llmax(file_offset, 0); - if (file_size > 0 && mCache->appendToTextureEntryList(mID, file_size)) - { - std::string filename = mCache->getTextureFileName(mID); - mBytesRead = -1; - mBytesToRead = file_size; - setPriority(LLWorkerThread::PRIORITY_LOW | mPriority); - mFileHandle = LLLFSThread::sLocal->write(filename, - mWriteData + data_offset, file_offset, mBytesToRead, - new WriteResponder(mCache, mRequestHandle)); - return false; - } - else - { - mDataSize = 0; // no data written - return true; // done - } - } - else - { - if (mBytesRead >= 0) - { - if (mBytesRead != mBytesToRead) - { -// llwarns << "LLTextureCacheWorker: " << mID -// << " incorrect number of bytes written to body: " << mBytesRead -// << " != " << mBytesToRead << llendl; - mDataSize = -1; // failed - } - return true; - } - else - { - return false; - } - } -#else - S32 data_offset = TEXTURE_CACHE_ENTRY_SIZE - mOffset; - data_offset = llmax(data_offset, 0); - S32 file_size = mDataSize - data_offset; - S32 file_offset = mOffset - TEXTURE_CACHE_ENTRY_SIZE; - file_offset = llmax(file_offset, 0); - S32 bytes_written = 0; - if (file_size > 0 && mCache->appendToTextureEntryList(mID, file_size)) - { - std::string filename = mCache->getTextureFileName(mID); - - bytes_written = LLAPRFile::writeEx(filename, - mWriteData + data_offset, - file_offset, file_size, - mCache->getLocalAPRFilePool()); + // build the cache file name from the UUID + std::string filename = mCache->getTextureFileName(mID); +// llinfos << "Writing Body: " << filename << " Bytes: " << file_offset+file_size << llendl; + S32 bytes_written = LLAPRFile::writeEx( filename, + mWriteData + TEXTURE_CACHE_ENTRY_SIZE, + 0, file_size, + mCache->getLocalAPRFilePool()); if (bytes_written <= 0) { + llwarns << "LLTextureCacheWorker: " << mID + << " incorrect number of bytes written to body: " << bytes_written + << " / " << file_size << llendl; mDataSize = -1; // failed + done = true; } } else { mDataSize = 0; // no data written } - - return true; -#endif + // Nothing else to do at that point... + done = true; } - - return false; + + // Clean up and exit + return done; } //virtual bool LLTextureCacheWorker::doWork(S32 param) { -// *TODO reenable disabled apr_pool usage disabled due to maint-render-9 merge breakage -brad - //allocate a new local apr_pool -// LLAPRPool pool ; - - //save the current mFileAPRPool to avoid breaking anything. -// apr_pool_t* old_pool = mCache->getFileAPRPool() ; - //make mFileAPRPool to point to the local one -// mCache->setFileAPRPool(pool.getAPRPool()) ; - bool res = false; if (param == 0) // read { @@ -818,10 +675,6 @@ bool LLTextureCacheWorker::doWork(S32 param) { llassert_always(0); } - - //set mFileAPRPool back, the local one will be released automatically. -// mCache->setFileAPRPool(old_pool) ; - return res; } @@ -887,6 +740,7 @@ LLTextureCache::LLTextureCache(bool threaded) mWorkersMutex(NULL), mHeaderMutex(NULL), mListMutex(NULL), + mHeaderAPRFile(NULL), mReadOnly(FALSE), mTexturesSizeTotal(0), mDoPurge(FALSE) @@ -926,6 +780,9 @@ S32 LLTextureCache::update(U32 max_time_ms) } } + unlockWorkers(); + + // call 'completed' with workers list unlocked (may call readComplete() or writeComplete() for (responder_list_t::iterator iter1 = completed_list.begin(); iter1 != completed_list.end(); ++iter1) { @@ -934,8 +791,6 @@ S32 LLTextureCache::update(U32 max_time_ms) responder->completed(success); } - unlockWorkers(); - return res; } @@ -954,33 +809,48 @@ std::string LLTextureCache::getTextureFileName(const LLUUID& id) { std::string idstr = id.asString(); std::string delem = gDirUtilp->getDirDelimiter(); - std::string filename = mTexturesDirName + delem + idstr[0] + delem + idstr; + std::string filename = mTexturesDirName + delem + idstr[0] + delem + idstr + ".texture"; return filename; } -bool LLTextureCache::appendToTextureEntryList(const LLUUID& id, S32 bodysize) +bool LLTextureCache::updateTextureEntryList(const LLUUID& id, S32 bodysize) { bool res = false; bool purge = false; - // Append UUID to end of texture entries { LLMutexLock lock(&mHeaderMutex); - size_map_t::iterator iter = mTexturesSizeMap.find(id); - if (iter == mTexturesSizeMap.end() || iter->second < bodysize) + size_map_t::iterator iter1 = mTexturesSizeMap.find(id); + if (iter1 == mTexturesSizeMap.end() || iter1->second < bodysize) { llassert_always(bodysize > 0); - Entry* entry = new Entry(id, bodysize, time(NULL)); - LLAPRFile::writeEx(mTexturesDirEntriesFileName, - (U8*)entry, -1, 1*sizeof(Entry), - getLocalAPRFilePool()); - delete entry; - if (iter != mTexturesSizeMap.end()) + S32 oldbodysize = 0; + if (iter1 != mTexturesSizeMap.end()) + { + oldbodysize = iter1->second; + } + + Entry entry; + S32 idx = openAndReadEntry(id, entry, false); + if (idx < 0) + { + // TODO: change to llwarns + llerrs << "Failed to open entry: " << id << llendl; + removeFromCache(id); + return false; + } + else if (oldbodysize != entry.mBodySize) { - mTexturesSizeTotal -= iter->second; + // TODO: change to llwarns + llerrs << "Entry mismatch in mTextureSizeMap / mHeaderIDMap" + << " idx=" << idx << " oldsize=" << oldbodysize << " entrysize=" << entry.mBodySize << llendl; } + entry.mBodySize = bodysize; + writeEntryAndClose(idx, entry); + + mTexturesSizeTotal -= oldbodysize; mTexturesSizeTotal += bodysize; - mTexturesSizeMap[id] = bodysize; + if (mTexturesSizeTotal > sCacheMaxTexturesSize) { purge = true; @@ -995,11 +865,59 @@ bool LLTextureCache::appendToTextureEntryList(const LLUUID& id, S32 bodysize) return res; } +//debug +BOOL LLTextureCache::isInCache(const LLUUID& id) +{ + LLMutexLock lock(&mHeaderMutex); + id_map_t::const_iterator iter = mHeaderIDMap.find(id); + + return (iter != mHeaderIDMap.end()) ; +} + +//debug +BOOL LLTextureCache::isInLocal(const LLUUID& id) +{ + S32 local_size = 0; + std::string local_filename; + + std::string filename = getLocalFileName(id); + // Is it a JPEG2000 file? + { + local_filename = filename + ".j2c"; + local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool()); + if (local_size > 0) + { + return TRUE ; + } + } + + // If not, is it a jpeg file? + { + local_filename = filename + ".jpg"; + local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool()); + if (local_size > 0) + { + return TRUE ; + } + } + + // Hmm... What about a targa file? (used for UI texture mostly) + { + local_filename = filename + ".tga"; + local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool()); + if (local_size > 0) + { + return TRUE ; + } + } + + return FALSE ; +} ////////////////////////////////////////////////////////////////////////////// //static const S32 MAX_REASONABLE_FILE_SIZE = 512*1024*1024; // 512 MB -F32 LLTextureCache::sHeaderCacheVersion = 1.0f; +F32 LLTextureCache::sHeaderCacheVersion = 1.3f; U32 LLTextureCache::sCacheMaxEntries = MAX_REASONABLE_FILE_SIZE / TEXTURE_CACHE_ENTRY_SIZE; S64 LLTextureCache::sCacheMaxTexturesSize = 0; // no limit const char* entries_filename = "texture.entries"; @@ -1012,7 +930,6 @@ void LLTextureCache::setDirNames(ELLPath location) mHeaderEntriesFileName = gDirUtilp->getExpandedFilename(location, entries_filename); mHeaderDataFileName = gDirUtilp->getExpandedFilename(location, cache_filename); mTexturesDirName = gDirUtilp->getExpandedFilename(location, textures_dirname); - mTexturesDirEntriesFileName = mTexturesDirName + delem + entries_filename; } void LLTextureCache::purgeCache(ELLPath location) @@ -1020,7 +937,7 @@ void LLTextureCache::purgeCache(ELLPath location) if (!mReadOnly) { setDirNames(location); - + llassert_always(mHeaderAPRFile == NULL); LLAPRFile::remove(mHeaderEntriesFileName, getLocalAPRFilePool()); LLAPRFile::remove(mHeaderDataFileName, getLocalAPRFilePool()); } @@ -1063,83 +980,317 @@ S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL read_only) return max_size; // unused cache space } -struct lru_data +//---------------------------------------------------------------------------- +// mHeaderMutex must be locked for the following functions! + +LLAPRFile* LLTextureCache::openHeaderEntriesFile(bool readonly, S32 offset) +{ + llassert_always(mHeaderAPRFile == NULL); + apr_int32_t flags = readonly ? APR_READ|APR_BINARY : APR_READ|APR_WRITE|APR_BINARY; + mHeaderAPRFile = new LLAPRFile(mHeaderEntriesFileName, flags, getLocalAPRFilePool()); + mHeaderAPRFile->seek(APR_SET, offset); + return mHeaderAPRFile; +} + +void LLTextureCache::closeHeaderEntriesFile() +{ + llassert_always(mHeaderAPRFile != NULL); + delete mHeaderAPRFile; + mHeaderAPRFile = NULL; +} + +void LLTextureCache::readEntriesHeader() +{ + // mHeaderEntriesInfo initializes to default values so safe not to read it + llassert_always(mHeaderAPRFile == NULL); + if (LLAPRFile::isExist(mHeaderEntriesFileName, getLocalAPRFilePool())) + { + LLAPRFile::readEx(mHeaderEntriesFileName, (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo), + getLocalAPRFilePool()); + } +} + +void LLTextureCache::writeEntriesHeader() { - lru_data(U32 t, S32 i, const LLUUID& id) { time=t; index=i; uuid=id; } - U32 time; - S32 index; - LLUUID uuid; - struct Compare - { - // lhs < rhs - typedef const lru_data* lru_data_ptr; - bool operator()(const lru_data_ptr& a, const lru_data_ptr& b) const + llassert_always(mHeaderAPRFile == NULL); + if (!mReadOnly) + { + LLAPRFile::writeEx(mHeaderEntriesFileName, (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo), + getLocalAPRFilePool()); + } +} + +static S32 mHeaderEntriesMaxWriteIdx = 0; + +S32 LLTextureCache::openAndReadEntry(const LLUUID& id, Entry& entry, bool create) +{ + S32 idx = -1; + + id_map_t::iterator iter1 = mHeaderIDMap.find(id); + if (iter1 != mHeaderIDMap.end()) + { + idx = iter1->second; + } + + if (idx < 0) + { + if (create && !mReadOnly) { - if(a->time == b->time) - return (a->index < b->index); + if (mHeaderEntriesInfo.mEntries < sCacheMaxEntries) + { + // Add an entry to the end of the list + idx = mHeaderEntriesInfo.mEntries++; + + } + else if (!mFreeList.empty()) + { + idx = *(mFreeList.begin()); + mFreeList.erase(mFreeList.begin()); + } else - return (a->time >= b->time); + { + // Look for a still valid entry in the LRU + for (std::set<LLUUID>::iterator iter2 = mLRU.begin(); iter2 != mLRU.end();) + { + std::set<LLUUID>::iterator curiter2 = iter2++; + LLUUID oldid = *curiter2; + // Erase entry from LRU regardless + mLRU.erase(curiter2); + // Look up entry and use it if it is valid + id_map_t::iterator iter3 = mHeaderIDMap.find(oldid); + if (iter3 != mHeaderIDMap.end() && iter3->second >= 0) + { + idx = iter3->second; + mHeaderIDMap.erase(oldid); + mTexturesSizeMap.erase(oldid); + break; + } + } + // if (idx < 0) at this point, we will rebuild the LRU + // and retry if called from setHeaderCacheEntry(), + // otherwise this shouldn't happen and will trigger an error + } + if (idx >= 0) + { + // Set the header index + mHeaderIDMap[id] = idx; + llassert_always(mTexturesSizeMap.erase(id) == 0); + // Initialize the entry (will get written later) + entry.init(id, time(NULL)); + // Update Header + writeEntriesHeader(); + // Write Entry + S32 offset = sizeof(EntriesInfo) + idx * sizeof(Entry); + LLAPRFile* aprfile = openHeaderEntriesFile(false, offset); + S32 bytes_written = aprfile->write((void*)&entry, (S32)sizeof(Entry)); + llassert_always(bytes_written == sizeof(Entry)); + mHeaderEntriesMaxWriteIdx = llmax(mHeaderEntriesMaxWriteIdx, idx); + closeHeaderEntriesFile(); + } } - }; -}; + } + else + { + // Remove this entry from the LRU if it exists + mLRU.erase(id); + // Read the entry + S32 offset = sizeof(EntriesInfo) + idx * sizeof(Entry); + LLAPRFile* aprfile = openHeaderEntriesFile(true, offset); + S32 bytes_read = aprfile->read((void*)&entry, (S32)sizeof(Entry)); + llassert_always(bytes_read == sizeof(Entry)); + llassert_always(entry.mImageSize == 0 || entry.mImageSize == -1 || entry.mImageSize > entry.mBodySize); + closeHeaderEntriesFile(); + } + return idx; +} + +void LLTextureCache::writeEntryAndClose(S32 idx, Entry& entry) +{ + if (idx >= 0) + { + if (!mReadOnly) + { + entry.mTime = time(NULL); + llassert_always(entry.mImageSize == 0 || entry.mImageSize == -1 || entry.mImageSize > entry.mBodySize); + if (entry.mBodySize > 0) + { + mTexturesSizeMap[entry.mID] = entry.mBodySize; + } +// llinfos << "Updating TE: " << idx << ": " << id << " Size: " << entry.mBodySize << " Time: " << entry.mTime << llendl; + S32 offset = sizeof(EntriesInfo) + idx * sizeof(Entry); + LLAPRFile* aprfile = openHeaderEntriesFile(false, offset); + S32 bytes_written = aprfile->write((void*)&entry, (S32)sizeof(Entry)); + llassert_always(bytes_written == sizeof(Entry)); + mHeaderEntriesMaxWriteIdx = llmax(mHeaderEntriesMaxWriteIdx, idx); + closeHeaderEntriesFile(); + } + } +} + +U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries) +{ + U32 num_entries = mHeaderEntriesInfo.mEntries; + + mHeaderIDMap.clear(); + mTexturesSizeMap.clear(); + mFreeList.clear(); + mTexturesSizeTotal = 0; + + LLAPRFile* aprfile = openHeaderEntriesFile(false, (S32)sizeof(EntriesInfo)); + for (U32 idx=0; idx<num_entries; idx++) + { + Entry entry; + S32 bytes_read = aprfile->read((void*)(&entry), (S32)sizeof(Entry)); + if (bytes_read < sizeof(Entry)) + { + llwarns << "Corrupted header entries, failed at " << idx << " / " << num_entries << llendl; + closeHeaderEntriesFile(); + purgeAllTextures(false); + return 0; + } + entries.push_back(entry); +// llinfos << "ENTRY: " << entry.mTime << " TEX: " << entry.mID << " IDX: " << idx << " Size: " << entry.mImageSize << llendl; + if (entry.mImageSize < 0) + { + mFreeList.insert(idx); + } + else + { + mHeaderIDMap[entry.mID] = idx; + if (entry.mBodySize > 0) + { + mTexturesSizeMap[entry.mID] = entry.mBodySize; + mTexturesSizeTotal += entry.mBodySize; + } + llassert_always(entry.mImageSize == 0 || entry.mImageSize > entry.mBodySize); + } + } + closeHeaderEntriesFile(); + return num_entries; +} + +void LLTextureCache::writeEntriesAndClose(const std::vector<Entry>& entries) +{ + S32 num_entries = entries.size(); + llassert_always(num_entries == mHeaderEntriesInfo.mEntries); + + if (!mReadOnly) + { + LLAPRFile* aprfile = openHeaderEntriesFile(false, (S32)sizeof(EntriesInfo)); + for (S32 idx=0; idx<num_entries; idx++) + { + S32 bytes_written = aprfile->write((void*)(&entries[idx]), (S32)sizeof(Entry)); + llassert_always(bytes_written == sizeof(Entry)); + } + mHeaderEntriesMaxWriteIdx = llmax(mHeaderEntriesMaxWriteIdx, num_entries-1); + closeHeaderEntriesFile(); + } +} + +//---------------------------------------------------------------------------- // Called from either the main thread or the worker thread void LLTextureCache::readHeaderCache() { LLMutexLock lock(&mHeaderMutex); - mHeaderEntriesInfo.mVersion = 0.f; - mHeaderEntriesInfo.mEntries = 0; - if (LLAPRFile::isExist(mHeaderEntriesFileName, getLocalAPRFilePool())) - { - LLAPRFile::readEx(mHeaderEntriesFileName, - (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo), - getLocalAPRFilePool()); - } + + mLRU.clear(); // always clear the LRU + + readEntriesHeader(); + if (mHeaderEntriesInfo.mVersion != sHeaderCacheVersion) { if (!mReadOnly) { - // Info with 0 entries - mHeaderEntriesInfo.mVersion = sHeaderCacheVersion; - - LLAPRFile::writeEx(mHeaderEntriesFileName, - (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo), - getLocalAPRFilePool()); + purgeAllTextures(false); } } else { - S32 num_entries = mHeaderEntriesInfo.mEntries; + std::vector<Entry> entries; + U32 num_entries = openAndReadEntries(entries); if (num_entries) { - Entry* entries = new Entry[num_entries]; + U32 empty_entries = 0; + typedef std::pair<U32, LLUUID> lru_data_t; + std::set<lru_data_t> lru; + std::vector<LLUUID> purge_list; + for (U32 i=0; i<num_entries; i++) + { + Entry& entry = entries[i]; + const LLUUID& id = entry.mID; + if (entry.mImageSize < 0) + { + // This will be in the Free List, don't put it in the LRY + ++empty_entries; + } + else + { + lru.insert(std::make_pair(entry.mTime, id)); + if (entry.mBodySize > 0) + { + if (entry.mBodySize > entry.mImageSize) + { + // Shouldn't happen, failsafe only + llwarns << "Bad entry: " << i << ": " << id << ": BodySize: " << entry.mBodySize << llendl; + purge_list.push_back(id); + } + } + } + } + if (num_entries > sCacheMaxEntries) + { + // Special case: cache size was reduced, need to remove entries + // Note: After we prune entries, we will call this again and create the LRU + U32 entries_to_purge = (num_entries-empty_entries) - sCacheMaxEntries; + if (entries_to_purge > 0) + { + for (std::set<lru_data_t>::iterator iter = lru.begin(); iter != lru.end(); ++iter) + { + purge_list.push_back(iter->second); + if (--entries_to_purge <= 0) + break; + } + } + } + else { - LLAPRFile::readEx(mHeaderEntriesFileName, - (U8*)entries, sizeof(EntriesInfo), num_entries*sizeof(Entry), - getLocalAPRFilePool()); + S32 lru_entries = (S32)((F32)sCacheMaxEntries * TEXTURE_CACHE_LRU_SIZE); + for (std::set<lru_data_t>::iterator iter = lru.begin(); iter != lru.end(); ++iter) + { + mLRU.insert(iter->second); +// llinfos << "LRU: " << iter->first << " : " << iter->second << llendl; + if (--lru_entries <= 0) + break; + } } - typedef std::set<lru_data*, lru_data::Compare> lru_set_t; - lru_set_t lru; - for (S32 i=0; i<num_entries; i++) + + if (purge_list.size() > 0) { - if (entries[i].mSize >= 0) // -1 indicates erased entry, skip + for (std::vector<LLUUID>::iterator iter = purge_list.begin(); iter != purge_list.end(); ++iter) { - const LLUUID& id = entries[i].mID; - lru.insert(new lru_data(entries[i].mTime, i, id)); - mHeaderIDMap[id] = i; + removeFromCache(*iter); } + // If we removed any entries, we need to rebuild the entries list, + // write the header, and call this again + std::vector<Entry> new_entries; + for (U32 i=0; i<num_entries; i++) + { + const Entry& entry = entries[i]; + if (entry.mImageSize >=0) + { + new_entries.push_back(entry); + } + } + llassert_always(new_entries.size() <= sCacheMaxEntries); + mHeaderEntriesInfo.mEntries = new_entries.size(); + writeEntriesAndClose(new_entries); + readHeaderCache(); // repeat with new entries file } - mLRU.clear(); - S32 lru_entries = sCacheMaxEntries / 10; - for (lru_set_t::iterator iter = lru.begin(); iter != lru.end(); ++iter) + else { - lru_data* data = *iter; - mLRU[data->index] = data->uuid; - if (--lru_entries <= 0) - break; + writeEntriesAndClose(entries); } - for_each(lru.begin(), lru.end(), DeletePointer()); - delete[] entries; } } } @@ -1162,13 +1313,21 @@ void LLTextureCache::purgeAllTextures(bool purge_directories) LLFile::rmdir(dirname); } } - LLAPRFile::remove(mTexturesDirEntriesFileName, getLocalAPRFilePool()); if (purge_directories) { LLFile::rmdir(mTexturesDirName); } } + mHeaderIDMap.clear(); mTexturesSizeMap.clear(); + mTexturesSizeTotal = 0; + mFreeList.clear(); + mTexturesSizeTotal = 0; + + // Info with 0 entries + mHeaderEntriesInfo.mVersion = sHeaderCacheVersion; + mHeaderEntriesInfo.mEntries = 0; + writeEntriesHeader(); } void LLTextureCache::purgeTextures(bool validate) @@ -1182,51 +1341,37 @@ void LLTextureCache::purgeTextures(bool validate) LLAppViewer::instance()->pauseMainloopTimeout(); LLMutexLock lock(&mHeaderMutex); - - S32 filesize = LLAPRFile::size(mTexturesDirEntriesFileName, getLocalAPRFilePool()); - S32 num_entries = filesize / sizeof(Entry); - if (num_entries * (S32)sizeof(Entry) != filesize) - { - LL_WARNS("TextureCache") << "Bad cache file: " << mTexturesDirEntriesFileName << " Purging." << LL_ENDL; - purgeAllTextures(false); - return; - } - if (num_entries == 0) + + llinfos << "TEXTURE CACHE: Purging." << llendl; + + // Read the entries list + std::vector<Entry> entries; + U32 num_entries = openAndReadEntries(entries); + if (!num_entries) { - return; // nothing to do + writeEntriesAndClose(entries); + return; // nothing to purge } - Entry* entries = new Entry[num_entries]; - S32 bytes_read = LLAPRFile::readEx(mTexturesDirEntriesFileName, - (U8*)entries, 0, num_entries*sizeof(Entry), - getLocalAPRFilePool()); - if (bytes_read != filesize) - { - LL_WARNS("TextureCache") << "Bad cache file (2): " << mTexturesDirEntriesFileName << " Purging." << LL_ENDL; - purgeAllTextures(false); - return; - } - - LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Reading Entries..." << LL_ENDL; - - std::map<LLUUID, S32> entry_idx_map; - S64 total_size = 0; - for (S32 idx=0; idx<num_entries; idx++) - { - const LLUUID& id = entries[idx].mID; - LL_DEBUGS("TextureCache") << "Entry: " << id << " Size: " << entries[idx].mSize << " Time: " << entries[idx].mTime << LL_ENDL; - std::map<LLUUID, S32>::iterator iter = entry_idx_map.find(id); - if (iter != entry_idx_map.end()) + // Use mTexturesSizeMap to collect UUIDs of textures with bodies + typedef std::set<std::pair<U32,S32> > time_idx_set_t; + std::set<std::pair<U32,S32> > time_idx_set; + for (size_map_t::iterator iter1 = mTexturesSizeMap.begin(); + iter1 != mTexturesSizeMap.end(); ++iter1) + { + if (iter1->second > 0) { - // Newer entry replacing older entry - S32 pidx = iter->second; - total_size -= entries[pidx].mSize; - entries[pidx].mSize = 0; // flag: skip older entry + id_map_t::iterator iter2 = mHeaderIDMap.find(iter1->first); + if (iter2 != mHeaderIDMap.end()) + { + S32 idx = iter2->second; + time_idx_set.insert(std::make_pair(entries[idx].mTime, idx)); +// llinfos << "TIME: " << entries[idx].mTime << " TEX: " << entries[idx].mID << " IDX: " << idx << " Size: " << entries[idx].mImageSize << llendl; + } } - entry_idx_map[id] = idx; - total_size += entries[idx].mSize; } - + + // Validate 1/256th of the files on startup U32 validate_idx = 0; if (validate) { @@ -1235,19 +1380,17 @@ void LLTextureCache::purgeTextures(bool validate) gSavedSettings.setU32("CacheValidateCounter", next_idx); LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Validating: " << validate_idx << LL_ENDL; } - - S64 min_cache_size = (sCacheMaxTexturesSize * 9) / 10; + + S64 cache_size = mTexturesSizeTotal; + S64 purged_cache_size = (sCacheMaxTexturesSize * (S64)((1.f-TEXTURE_CACHE_PURGE_AMOUNT)*100)) / 100; S32 purge_count = 0; - S32 next_idx = 0; - for (S32 idx=0; idx<num_entries; idx++) + for (time_idx_set_t::iterator iter = time_idx_set.begin(); + iter != time_idx_set.end(); ++iter) { - if (entries[idx].mSize == 0) - { - continue; - } + S32 idx = iter->second; bool purge_entry = false; std::string filename = getTextureFileName(entries[idx].mID); - if (total_size >= min_cache_size) + if (cache_size >= purged_cache_size) { purge_entry = true; } @@ -1257,60 +1400,44 @@ void LLTextureCache::purgeTextures(bool validate) U32 uuididx = entries[idx].mID.mData[0]; if (uuididx == validate_idx) { - LL_DEBUGS("TextureCache") << "Validating: " << filename << "Size: " << entries[idx].mSize << LL_ENDL; + LL_DEBUGS("TextureCache") << "Validating: " << filename << "Size: " << entries[idx].mBodySize << LL_ENDL; S32 bodysize = LLAPRFile::size(filename, getLocalAPRFilePool()); - if (bodysize != entries[idx].mSize) + if (bodysize != entries[idx].mBodySize) { - LL_WARNS("TextureCache") << "TEXTURE CACHE BODY HAS BAD SIZE: " << bodysize << " != " << entries[idx].mSize + LL_WARNS("TextureCache") << "TEXTURE CACHE BODY HAS BAD SIZE: " << bodysize << " != " << entries[idx].mBodySize << filename << LL_ENDL; purge_entry = true; } } } + else + { + break; + } + if (purge_entry) { purge_count++; LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL; LLAPRFile::remove(filename, getLocalAPRFilePool()); - total_size -= entries[idx].mSize; - entries[idx].mSize = 0; - } - else - { - if (next_idx != idx) - { - entries[next_idx] = entries[idx]; - } - ++next_idx; + cache_size -= entries[idx].mBodySize; + mTexturesSizeTotal -= entries[idx].mBodySize; + entries[idx].mBodySize = 0; + mTexturesSizeMap.erase(entries[idx].mID); } } - num_entries = next_idx; LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Writing Entries: " << num_entries << LL_ENDL; - - LLAPRFile::remove(mTexturesDirEntriesFileName, getLocalAPRFilePool()); - LLAPRFile::writeEx(mTexturesDirEntriesFileName, - (U8*)&entries[0], 0, num_entries*sizeof(Entry), - getLocalAPRFilePool()); - - mTexturesSizeTotal = 0; - mTexturesSizeMap.clear(); - for (S32 idx=0; idx<num_entries; idx++) - { - mTexturesSizeMap[entries[idx].mID] = entries[idx].mSize; - mTexturesSizeTotal += entries[idx].mSize; - } - llassert(mTexturesSizeTotal == total_size); - - delete[] entries; + writeEntriesAndClose(entries); + // *FIX:Mani - watchdog back on. LLAppViewer::instance()->resumeMainloopTimeout(); LL_INFOS("TextureCache") << "TEXTURE CACHE:" << " PURGED: " << purge_count << " ENTRIES: " << num_entries - << " CACHE SIZE: " << total_size / 1024*1024 << " MB" + << " CACHE SIZE: " << mTexturesSizeTotal / 1024*1024 << " MB" << llendl; } @@ -1340,78 +1467,39 @@ LLTextureCacheWorker* LLTextureCache::getWriter(handle_t handle) } ////////////////////////////////////////////////////////////////////////////// - // Called from work thread -S32 LLTextureCache::getHeaderCacheEntry(const LLUUID& id, bool touch, S32* imagesize) -{ - bool retry = false; - S32 idx = -1; +// Reads imagesize from the header, updates timestamp +S32 LLTextureCache::getHeaderCacheEntry(const LLUUID& id, S32& imagesize) +{ + LLMutexLock lock(&mHeaderMutex); + Entry entry; + S32 idx = openAndReadEntry(id, entry, false); + if (idx >= 0) { - LLMutexLock lock(&mHeaderMutex); - id_map_t::iterator iter = mHeaderIDMap.find(id); - if (iter != mHeaderIDMap.end()) - { - idx = iter->second; - } - else if (touch && !mReadOnly) - { - if (mHeaderEntriesInfo.mEntries < sCacheMaxEntries) - { - // Add an entry - idx = mHeaderEntriesInfo.mEntries++; - mHeaderIDMap[id] = idx; - // Update Info - LLAPRFile::writeEx(mHeaderEntriesFileName, - (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo), - getLocalAPRFilePool()); - } - else if (!mLRU.empty()) - { - idx = mLRU.begin()->first; // will be erased below - const LLUUID& oldid = mLRU.begin()->second; - mHeaderIDMap.erase(oldid); - mTexturesSizeMap.erase(oldid); - mHeaderIDMap[id] = idx; - } - else - { - idx = -1; - retry = true; - } - } - if (idx >= 0) - { - if (touch && !mReadOnly) - { - // Update the lru entry - mLRU.erase(idx); - llassert_always(imagesize && *imagesize > 0); - Entry* entry = new Entry(id, *imagesize, time(NULL)); - S32 offset = sizeof(EntriesInfo) + idx * sizeof(Entry); - LLAPRFile::writeEx(mHeaderEntriesFileName, - (U8*)entry, offset, sizeof(Entry), - getLocalAPRFilePool()); - delete entry; - } - else if (imagesize) - { - // Get the image size - Entry entry; - S32 offset = sizeof(EntriesInfo) + idx * sizeof(Entry); + imagesize = entry.mImageSize; + writeEntryAndClose(idx, entry); // updates time + } + return idx; +} - LLAPRFile::readEx(mHeaderEntriesFileName, - (U8*)&entry, offset, sizeof(Entry), - getLocalAPRFilePool()); - *imagesize = entry.mSize; - } - } +// Writes imagesize to the header, updates timestamp +S32 LLTextureCache::setHeaderCacheEntry(const LLUUID& id, S32 imagesize) +{ + LLMutexLock lock(&mHeaderMutex); + llassert_always(imagesize >= 0); + Entry entry; + S32 idx = openAndReadEntry(id, entry, true); + if (idx >= 0) + { + entry.mImageSize = imagesize; + writeEntryAndClose(idx, entry); } - if (retry) + else // retry { - readHeaderCache(); // updates the lru + readHeaderCache(); // We couldn't write an entry, so refresh the LRU llassert_always(!mLRU.empty() || mHeaderEntriesInfo.mEntries < sCacheMaxEntries); - idx = getHeaderCacheEntry(id, touch, imagesize); // assert above ensures no inf. recursion + idx = setHeaderCacheEntry(id, imagesize); // assert above ensures no inf. recursion } return idx; } @@ -1427,8 +1515,8 @@ LLTextureCache::handle_t LLTextureCache::readFromCache(const std::string& filena // so let the thread handle it LLMutexLock lock(&mWorkersMutex); LLTextureCacheWorker* worker = new LLTextureCacheLocalFileWorker(this, priority, filename, id, - NULL, size, offset, 0, - responder); + NULL, size, offset, 0, + responder); handle_t handle = worker->read(); mReaders[handle] = worker; return handle; @@ -1441,8 +1529,8 @@ LLTextureCache::handle_t LLTextureCache::readFromCache(const LLUUID& id, U32 pri // so let the thread handle it LLMutexLock lock(&mWorkersMutex); LLTextureCacheWorker* worker = new LLTextureCacheRemoteWorker(this, priority, id, - NULL, size, offset, 0, - responder); + NULL, size, offset, + 0, responder); handle_t handle = worker->read(); mReaders[handle] = worker; return handle; @@ -1453,7 +1541,7 @@ bool LLTextureCache::readComplete(handle_t handle, bool abort) { lockWorkers(); handle_map_t::iterator iter = mReaders.find(handle); - llassert_always(iter != mReaders.end()); + llassert_always(iter != mReaders.end() || abort); LLTextureCacheWorker* worker = iter->second; bool res = worker->complete(); if (res || abort) @@ -1487,19 +1575,13 @@ LLTextureCache::handle_t LLTextureCache::writeToCache(const LLUUID& id, U32 prio purgeTextures(false); mDoPurge = FALSE; } - if (datasize >= TEXTURE_CACHE_ENTRY_SIZE) - { - LLMutexLock lock(&mWorkersMutex); - llassert_always(imagesize > 0); - LLTextureCacheWorker* worker = new LLTextureCacheRemoteWorker(this, priority, id, - data, datasize, 0, - imagesize, responder); - handle_t handle = worker->write(); - mWriters[handle] = worker; - return handle; - } - delete responder; - return LLWorkerThread::nullHandle(); + LLMutexLock lock(&mWorkersMutex); + LLTextureCacheWorker* worker = new LLTextureCacheRemoteWorker(this, priority, id, + data, datasize, 0, + imagesize, responder); + handle_t handle = worker->write(); + mWriters[handle] = worker; + return handle; } bool LLTextureCache::writeComplete(handle_t handle, bool abort) @@ -1542,25 +1624,17 @@ void LLTextureCache::addCompleted(Responder* responder, bool success) bool LLTextureCache::removeHeaderCacheEntry(const LLUUID& id) { - if (mReadOnly) - { - return false; - } - LLMutexLock lock(&mHeaderMutex); - id_map_t::iterator iter = mHeaderIDMap.find(id); - if (iter != mHeaderIDMap.end()) + if (!mReadOnly) { - S32 idx = iter->second; + LLMutexLock lock(&mHeaderMutex); + Entry entry; + S32 idx = openAndReadEntry(id, entry, false); if (idx >= 0) { - Entry* entry = new Entry(id, -1, time(NULL)); - S32 offset = sizeof(EntriesInfo) + idx * sizeof(Entry); - - LLAPRFile::writeEx(mHeaderEntriesFileName, - (U8*)entry, offset, sizeof(Entry), - getLocalAPRFilePool()); - delete entry; - mLRU[idx] = id; + entry.mImageSize = -1; + entry.mBodySize = 0; + writeEntryAndClose(idx, entry); + mFreeList.insert(idx); mHeaderIDMap.erase(id); mTexturesSizeMap.erase(id); return true; diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 68b1458e9a..bc9c988648 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -48,6 +48,27 @@ class LLTextureCache : public LLWorkerThread friend class LLTextureCacheRemoteWorker; friend class LLTextureCacheLocalFileWorker; +private: + // Entries + struct EntriesInfo + { + EntriesInfo() : mVersion(0.f), mEntries(0) {} + F32 mVersion; + U32 mEntries; + }; + struct Entry + { + Entry() {} + Entry(const LLUUID& id, S32 imagesize, S32 bodysize, U32 time) : + mID(id), mImageSize(imagesize), mBodySize(bodysize), mTime(time) {} + void init(const LLUUID& id, U32 time) { mID = id, mImageSize = 0; mBodySize = 0; mTime = time; } + LLUUID mID; // 16 bytes + S32 mImageSize; // total size of image if known + S32 mBodySize; // size of body file in body cache + U32 mTime; // seconds since 1/1/1970 + }; + + public: class Responder : public LLResponder @@ -106,10 +127,16 @@ public: // debug S32 getNumReads() { return mReaders.size(); } S32 getNumWrites() { return mWriters.size(); } + S64 getUsage() { return mTexturesSizeTotal; } + S64 getMaxUsage() { return sCacheMaxTexturesSize; } + U32 getEntries() { return mHeaderEntriesInfo.mEntries; } + U32 getMaxEntries() { return sCacheMaxEntries; }; + BOOL isInCache(const LLUUID& id) ; + BOOL isInLocal(const LLUUID& id) ; protected: // Accessed by LLTextureCacheWorker - bool appendToTextureEntryList(const LLUUID& id, S32 size); + 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); @@ -122,7 +149,16 @@ private: void readHeaderCache(); void purgeAllTextures(bool purge_directories); void purgeTextures(bool validate); - S32 getHeaderCacheEntry(const LLUUID& id, bool touch, S32* imagesize = NULL); + LLAPRFile* openHeaderEntriesFile(bool readonly, S32 offset); + void closeHeaderEntriesFile(); + void readEntriesHeader(); + void writeEntriesHeader(); + S32 openAndReadEntry(const LLUUID& id, Entry& entry, bool create); + void writeEntryAndClose(S32 idx, Entry& entry); + U32 openAndReadEntries(std::vector<Entry>& entries); + void writeEntriesAndClose(const std::vector<Entry>& entries); + S32 getHeaderCacheEntry(const LLUUID& id, S32& imagesize); + S32 setHeaderCacheEntry(const LLUUID& id, S32 imagesize); bool removeHeaderCacheEntry(const LLUUID& id); void lockHeaders() { mHeaderMutex.lock(); } void unlockHeaders() { mHeaderMutex.unlock(); } @@ -132,6 +168,7 @@ private: LLMutex mWorkersMutex; LLMutex mHeaderMutex; LLMutex mListMutex; + LLAPRFile* mHeaderAPRFile; typedef std::map<handle_t, LLTextureCacheWorker*> handle_map_t; handle_map_t mReaders; @@ -145,42 +182,28 @@ private: BOOL mReadOnly; - // Entries - struct EntriesInfo - { - F32 mVersion; - U32 mEntries; - }; - struct Entry - { - Entry() {} - Entry(const LLUUID& id, S32 size, U32 time) : mID(id), mSize(size), mTime(time) {} - LLUUID mID; // 128 bits - S32 mSize; // total size of image if known (NOT size cached) - U32 mTime; // seconds since 1/1/1970 - }; - // HEADERS (Include first mip) std::string mHeaderEntriesFileName; std::string mHeaderDataFileName; EntriesInfo mHeaderEntriesInfo; - typedef std::map<S32,LLUUID> index_map_t; - index_map_t mLRU; // index, id; stored as a map for fast removal + std::set<S32> mFreeList; // deleted entries + std::set<LLUUID> mLRU; typedef std::map<LLUUID,S32> id_map_t; id_map_t mHeaderIDMap; // BODIES (TEXTURES minus headers) std::string mTexturesDirName; - std::string mTexturesDirEntriesFileName; typedef std::map<LLUUID,S32> size_map_t; size_map_t mTexturesSizeMap; S64 mTexturesSizeTotal; LLAtomic32<BOOL> mDoPurge; - + // Statics static F32 sHeaderCacheVersion; static U32 sCacheMaxEntries; static S64 sCacheMaxTexturesSize; }; +extern const S32 TEXTURE_CACHE_ENTRY_SIZE; + #endif // LL_LLTEXTURECACHE_H diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 50ebc205a9..de00ca8420 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -426,7 +426,7 @@ BOOL LLFloaterTexturePicker::postBuild() mInventoryPanel->getRootFolder()->getFilter()->markDefault(); // Commented out to stop opening all folders with textures - // mInventoryPanel->openDefaultFolderForType(LLAssetType::AT_TEXTURE); + // mInventoryPanel->openDefaultFolderForType(LLFolderType::FT_TEXTURE); // don't put keyboard focus on selected item, because the selection callback // will assume that this was user input @@ -529,7 +529,7 @@ void LLFloaterTexturePicker::draw() mTexturep = NULL; if(mImageAssetID.notNull()) { - mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES, IMMEDIATE_NO); + mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES); mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); } else if (!mFallbackImageName.empty()) @@ -1073,7 +1073,7 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask) { showPicker(FALSE); //grab textures first... - gInventory.startBackgroundFetch(gInventory.findCategoryUUIDForType(LLAssetType::AT_TEXTURE)); + gInventory.startBackgroundFetch(gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE)); //...then start full inventory fetch. gInventory.startBackgroundFetch(); handled = TRUE; @@ -1190,7 +1190,7 @@ void LLTextureCtrl::draw() } else if (!mImageAssetID.isNull()) { - mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES, IMMEDIATE_NO); + mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES); mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); } else if (!mFallbackImageName.empty()) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 88fc7f98c0..c918f98895 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -32,108 +32,35 @@ #include "llviewerprecompiledheaders.h" +#include <iostream> + #include "llstl.h" #include "lltexturefetch.h" #include "llcurl.h" +#include "lldir.h" #include "llhttpclient.h" +#include "llhttpstatuscodes.h" #include "llimage.h" #include "llimageworker.h" #include "llworkerthread.h" #include "llagent.h" #include "lltexturecache.h" +#include "llviewercontrol.h" #include "llviewertexturelist.h" #include "llviewertexture.h" #include "llviewerregion.h" +#include "llworld.h" ////////////////////////////////////////////////////////////////////////////// -//static class LLTextureFetchWorker : public LLWorkerClass { -friend class LLTextureFetch; - -private: -#if 0 - class URLResponder : public LLHTTPClient::Responder - { - public: - URLResponder(LLTextureFetch* fetcher, const LLUUID& id) - : mFetcher(fetcher), mID(id) - { - } - ~URLResponder() - { - } - virtual void error(U32 status, const std::string& reason) - { - mFetcher->lockQueue(); - LLTextureFetchWorker* worker = mFetcher->getWorker(mID); - if (worker) - { -// llwarns << "LLTextureFetchWorker::URLResponder::error " << status << ": " << reason << llendl; - worker->callbackURLReceived(LLSD(), false); - } - mFetcher->unlockQueue(); - } - virtual void result(const LLSD& content) - { - mFetcher->lockQueue(); - LLTextureFetchWorker* worker = mFetcher->getWorker(mID); - if (worker) - { - worker->callbackURLReceived(content, true); - } - mFetcher->unlockQueue(); - } - private: - LLTextureFetch* mFetcher; - LLUUID mID; - }; - - class HTTPGetResponder : public LLHTTPClient::Responder - { - public: - HTTPGetResponder(LLTextureFetch* fetcher, const LLUUID& id) - : mFetcher(fetcher), mID(id) - { - } - ~HTTPGetResponder() - { - } - virtual void completed(U32 status, const std::stringstream& content) - { - mFetcher->lockQueue(); - LLTextureFetchWorker* worker = mFetcher->getWorker(mID); - if (worker) - { - const std::string& cstr = content.str(); - if (200 <= status && status < 300) - { - if (203 == status) // partial information (i.e. last block) - { - worker->callbackHttpGet((U8*)cstr.c_str(), cstr.length(), true); - } - else - { - worker->callbackHttpGet((U8*)cstr.c_str(), cstr.length(), false); - } - } - else - { -// llinfos << "LLTextureFetchWorker::HTTPGetResponder::error " << status << ": " << cstr << llendl; - worker->callbackHttpGet(NULL, -1, true); - } - } - mFetcher->unlockQueue(); - } - private: - LLTextureFetch* mFetcher; - LLUUID mID; - }; -#endif + friend class LLTextureFetch; + friend class HTTPGetResponder; +private: class CacheReadResponder : public LLTextureCache::ReadResponder { public: @@ -179,20 +106,20 @@ private: LLUUID mID; }; - class DecodeResponder : public LLResponder + class DecodeResponder : public LLImageDecodeThread::Responder { public: DecodeResponder(LLTextureFetch* fetcher, const LLUUID& id, LLTextureFetchWorker* worker) : mFetcher(fetcher), mID(id), mWorker(worker) { } - virtual void completed(bool success) + virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux) { mFetcher->lockQueue(); LLTextureFetchWorker* worker = mFetcher->getWorker(mID); if (worker) { - worker->callbackDecoded(success); + worker->callbackDecoded(success, raw, aux); } mFetcher->unlockQueue(); } @@ -227,37 +154,45 @@ public: ~LLTextureFetchWorker(); void relese() { --mActiveCount; } + void callbackHttpGet(const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer, + bool last_block, bool success); + void callbackCacheRead(bool success, LLImageFormatted* image, + S32 imagesize, BOOL islocal); + void callbackCacheWrite(bool success); + void callbackDecoded(bool success, LLImageRaw* raw, LLImageRaw* aux); + + void setGetStatus(U32 status, const std::string& reason) + { + mGetStatus = status; + mGetReason = reason; + } + protected: LLTextureFetchWorker(LLTextureFetch* fetcher, const LLUUID& id, const LLHost& host, F32 priority, S32 discard, S32 size); + LLTextureFetchWorker(LLTextureFetch* fetcher, const std::string& url, const LLUUID& id, const LLHost& host, + F32 priority, S32 discard, S32 size); private: /*virtual*/ void startWork(S32 param); // called from addWork() (MAIN THREAD) /*virtual*/ void endWork(S32 param, bool aborted); // called from doWork() (MAIN THREAD) - virtual std::string getName() { return LLStringUtil::null; } void resetFormattedData(); void setImagePriority(F32 priority); void setDesiredDiscard(S32 discard, S32 size); bool insertPacket(S32 index, U8* data, S32 size); void clearPackets(); + void setupPacketData(); U32 calcWorkPriority(); void removeFromCache(); bool processSimulatorPackets(); - bool decodeImage(); bool writeToCacheComplete(); - void lockWorkData() { mWorkMutex.lock(); } - void unlockWorkData() { mWorkMutex.unlock(); } + void lockWorkMutex() { mWorkMutex.lock(); } + void unlockWorkMutex() { mWorkMutex.unlock(); } - void callbackURLReceived(const LLSD& data, bool success); - void callbackHttpGet(U8* data, S32 data_size, bool last_block); - void callbackCacheRead(bool success, LLImageFormatted* image, - S32 imagesize, BOOL islocal); - void callbackCacheWrite(bool success); - void callbackDecoded(bool success); - private: enum e_state // mState { @@ -268,8 +203,8 @@ private: CACHE_POST, LOAD_FROM_NETWORK, LOAD_FROM_SIMULATOR, - LOAD_FROM_HTTP_GET_URL, - LOAD_FROM_HTTP_GET_DATA, + SEND_HTTP_REQ, + WAIT_HTTP_REQ, DECODE_IMAGE, DECODE_IMAGE_UPDATE, WRITE_TO_CACHE, @@ -280,19 +215,17 @@ private: { UNSENT = 0, QUEUED = 1, - SENT_SIM = 2, - SENT_URL = 3, - SENT_HTTP = 4 + SENT_SIM = 2 }; static const char* sStateDescs[]; e_state mState; LLTextureFetch* mFetcher; - LLImageWorker* mImageWorker; LLPointer<LLImageFormatted> mFormattedImage; LLPointer<LLImageRaw> mRawImage; LLPointer<LLImageRaw> mAuxImage; LLUUID mID; LLHost mHost; + std::string mUrl; U8 mType; F32 mImagePriority; U32 mWorkPriority; @@ -314,15 +247,18 @@ private: S32 mCachedSize; BOOL mLoaded; e_request_state mSentRequest; + handle_t mDecodeHandle; BOOL mDecoded; BOOL mWritten; BOOL mNeedsAux; BOOL mHaveAllData; BOOL mInLocalCache; + S32 mHTTPFailCount; S32 mRetryAttempt; - std::string mURL; S32 mActiveCount; - + U32 mGetStatus; + std::string mGetReason; + // Work Data LLMutex mWorkMutex; struct PacketData @@ -340,25 +276,79 @@ private: U8 mImageCodec; }; -class LLTextureFetchLocalFileWorker : public LLTextureFetchWorker -{ -friend class LLTextureFetch; - -protected: - LLTextureFetchLocalFileWorker(LLTextureFetch* fetcher, const std::string& filename, const LLUUID& id, const LLHost& host, - F32 priority, S32 discard, S32 size) - : LLTextureFetchWorker(fetcher, id, host, priority, discard, size), - mFileName(filename) - {} +////////////////////////////////////////////////////////////////////////////// -private: - /*virtual*/ std::string getName() { return mFileName; } +class HTTPGetResponder : public LLCurl::Responder +{ + LOG_CLASS(HTTPGetResponder); +public: + HTTPGetResponder(LLTextureFetch* fetcher, const LLUUID& id, U64 startTime, S32 requestedSize, U32 offset) + : mFetcher(fetcher), mID(id), mStartTime(startTime), mRequestedSize(requestedSize), mOffset(offset) + { + } + ~HTTPGetResponder() + { + } + virtual void completedRaw(U32 status, const std::string& reason, + const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) + { + if ((gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog")) || (gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"))) + { + mFetcher->mTextureInfo.setRequestStartTime(mID, mStartTime); + U64 timeNow = LLTimer::getTotalTime(); + mFetcher->mTextureInfo.setRequestType(mID, LLTextureInfoDetails::REQUEST_TYPE_HTTP); + mFetcher->mTextureInfo.setRequestSize(mID, mRequestedSize); + mFetcher->mTextureInfo.setRequestOffset(mID, mOffset); + mFetcher->mTextureInfo.setRequestCompleteTimeAndLog(mID, timeNow); + } + lldebugs << "HTTP COMPLETE: " << mID << llendl; + mFetcher->lockQueue(); + LLTextureFetchWorker* worker = mFetcher->getWorker(mID); + if (worker) + { + bool success = false; + bool partial = false; + if (200 <= status && status < 300) + { + success = true; + if (203 == status) // partial information (i.e. last block) + { + partial = true; + } + } + else + { + worker->setGetStatus(status, reason); +// llwarns << status << ": " << reason << llendl; + } + if (!success) + { + worker->setGetStatus(status, reason); +// llwarns << "CURL GET FAILED, status:" << status << " reason:" << reason << llendl; + } + mFetcher->removeFromHTTPQueue(mID); + worker->callbackHttpGet(channels, buffer, partial, success); + } + else + { + mFetcher->removeFromHTTPQueue(mID); + llwarns << "Worker not found: " << mID << llendl; + } + mFetcher->unlockQueue(); + } + private: - std::string mFileName; + LLTextureFetch* mFetcher; + LLUUID mID; + U64 mStartTime; + S32 mRequestedSize; + U32 mOffset; }; +////////////////////////////////////////////////////////////////////////////// //static const char* LLTextureFetchWorker::sStateDescs[] = { @@ -368,8 +358,8 @@ const char* LLTextureFetchWorker::sStateDescs[] = { "CACHE_POST", "LOAD_FROM_NETWORK", "LOAD_FROM_SIMULATOR", - "LOAD_FROM_HTTP_URL", - "LOAD_FROM_HTTP_DATA", + "SEND_HTTP_REQ", + "WAIT_HTTP_REQ", "DECODE_IMAGE", "DECODE_IMAGE_UPDATE", "WRITE_TO_CACHE", @@ -380,6 +370,7 @@ const char* LLTextureFetchWorker::sStateDescs[] = { // called from MAIN THREAD LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, + const std::string& url, // Optional URL const LLUUID& id, // Image UUID const LLHost& host, // Simulator host F32 priority, // Priority @@ -388,9 +379,9 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, : LLWorkerClass(fetcher, "TextureFetch"), mState(INIT), mFetcher(fetcher), - mImageWorker(NULL), mID(id), mHost(host), + mUrl(url), mImagePriority(priority), mWorkPriority(0), mRequestedPriority(0.f), @@ -404,18 +395,21 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, mBuffer(NULL), mBufferSize(0), mRequestedSize(0), - mDesiredSize(FIRST_PACKET_SIZE), + mDesiredSize(TEXTURE_CACHE_ENTRY_SIZE), mFileSize(0), mCachedSize(0), mLoaded(FALSE), mSentRequest(UNSENT), + mDecodeHandle(0), mDecoded(FALSE), mWritten(FALSE), mNeedsAux(FALSE), mHaveAllData(FALSE), mInLocalCache(FALSE), + mHTTPFailCount(0), mRetryAttempt(0), mActiveCount(0), + mGetStatus(0), mWorkMutex(NULL), mFirstPacket(0), mLastPacket(-1), @@ -440,7 +434,7 @@ LLTextureFetchWorker::~LLTextureFetchWorker() // << " Requested=" << mRequestedDiscard // << " Desired=" << mDesiredDiscard << llendl; llassert_always(!haveWork()); - lockWorkData(); + lockWorkMutex(); if (mCacheReadHandle != LLTextureCache::nullHandle()) { mFetcher->mTextureCache->readComplete(mCacheReadHandle, true); @@ -449,13 +443,9 @@ LLTextureFetchWorker::~LLTextureFetchWorker() { mFetcher->mTextureCache->writeComplete(mCacheWriteHandle, true); } - if (mImageWorker) - { - mImageWorker->scheduleDelete(); - } mFormattedImage = NULL; clearPackets(); - unlockWorkData(); + unlockWorkMutex(); } void LLTextureFetchWorker::clearPackets() @@ -467,6 +457,38 @@ void LLTextureFetchWorker::clearPackets() mFirstPacket = 0; } +void LLTextureFetchWorker::setupPacketData() +{ + S32 data_size = 0; + if (mFormattedImage.notNull()) + { + data_size = mFormattedImage->getDataSize(); + } + if (data_size > 0) + { + // Only used for simulator requests + mFirstPacket = (data_size - FIRST_PACKET_SIZE) / MAX_IMG_PACKET_SIZE + 1; + if (FIRST_PACKET_SIZE + (mFirstPacket-1) * MAX_IMG_PACKET_SIZE != data_size) + { + llwarns << "Bad CACHED TEXTURE size: " << data_size << " removing." << llendl; + removeFromCache(); + resetFormattedData(); + clearPackets(); + } + else if (mFileSize > 0) + { + mLastPacket = mFirstPacket-1; + mTotalPackets = (mFileSize - FIRST_PACKET_SIZE + MAX_IMG_PACKET_SIZE-1) / MAX_IMG_PACKET_SIZE + 1; + } + else + { + // This file was cached using HTTP so we have to refetch the first packet + resetFormattedData(); + clearPackets(); + } + } +} + U32 LLTextureFetchWorker::calcWorkPriority() { // llassert_always(mImagePriority >= 0 && mImagePriority <= LLViewerTexture::maxDecodePriority()); @@ -538,7 +560,6 @@ void LLTextureFetchWorker::resetFormattedData() // Called from MAIN thread void LLTextureFetchWorker::startWork(S32 param) { - llassert(mImageWorker == NULL); llassert(mFormattedImage.isNull()); } @@ -549,6 +570,14 @@ bool LLTextureFetchWorker::doWork(S32 param) { LLMutexLock lock(&mWorkMutex); + if ((mFetcher->isQuitting() || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) + { + if (mState < WRITE_TO_CACHE) + { + return true; // abort + } + } + if (mFetcher->mDebugPause) { return false; // debug: don't do any work @@ -563,16 +592,9 @@ bool LLTextureFetchWorker::doWork(S32 param) mFetchTimer.reset(); } - if (mImagePriority <= 0.0f) - { - if (mState < WRITE_TO_CACHE) - { - return true; // cancel request - } - } - if (mState == INIT) { + mRawImage = NULL ; mRequestedDiscard = -1; mLoadedDiscard = -1; mDecodedDiscard = -1; @@ -590,8 +612,9 @@ bool LLTextureFetchWorker::doWork(S32 param) clearPackets(); // TODO: Shouldn't be necessary mCacheReadHandle = LLTextureCache::nullHandle(); mCacheWriteHandle = LLTextureCache::nullHandle(); - mURL.clear(); mState = LOAD_FROM_TEXTURE_CACHE; + LL_DEBUGS("Texture") << mID << ": Priority: " << llformat("%8.0f",mImagePriority) + << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL; // fall through } @@ -612,16 +635,27 @@ bool LLTextureFetchWorker::doWork(S32 param) setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); - if (getName().empty()) + if (mUrl.compare(0, 7, "file://") == 0) + { + // read file from local disk + std::string filename = mUrl.substr(7, std::string::npos); + mCacheReadHandle = mFetcher->mTextureCache->readFromCache(filename, mID, cache_priority, + offset, size, responder); + } + else if (mUrl.empty()) { mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority, offset, size, responder); } else { - // read file from local disk - mCacheReadHandle = mFetcher->mTextureCache->readFromCache(getName(), mID, cache_priority, - offset, size, responder); + if (!(mUrl.compare(0, 7, "http://") == 0)) + { + // *TODO:?remove this warning + llwarns << "Unknown URL Type: " << mUrl << llendl; + } + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + mState = SEND_HTTP_REQ; } } @@ -647,75 +681,101 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mState == CACHE_POST) { - mDesiredSize = llmax(mDesiredSize, FIRST_PACKET_SIZE); + mDesiredSize = llmax(mDesiredSize, TEXTURE_CACHE_ENTRY_SIZE); mCachedSize = mFormattedImage.notNull() ? mFormattedImage->getDataSize() : 0; // Successfully loaded if ((mCachedSize >= mDesiredSize) || mHaveAllData) { // we have enough data, decode it llassert_always(mFormattedImage->getDataSize() > 0); + mLoadedDiscard = mDesiredDiscard; mState = DECODE_IMAGE; + LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize() + << " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight()) + << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL; // fall through } else { - if (!getName().empty()) + if (mUrl.compare(0, 7, "file://") == 0) { // failed to load local file, we're done. return true; } // need more data - mState = LOAD_FROM_NETWORK; + else + { + LL_DEBUGS("Texture") << mID << ": Not in Cache" << LL_ENDL; + mState = LOAD_FROM_NETWORK; + } // fall through } } if (mState == LOAD_FROM_NETWORK) { - if (mSentRequest == UNSENT) + bool get_url = gSavedSettings.getBOOL("ImagePipelineUseHTTP"); + if (!mUrl.empty()) get_url = false; +// if (mHost != LLHost::invalid) get_url = false; + if ( get_url ) { - if (mFormattedImage.isNull()) - { - mFormattedImage = new LLImageJ2C; - } - // Add this to the network queue and sit here. - // LLTextureFetch::update() will send off a request which will change our state - S32 data_size = mFormattedImage->getDataSize(); - if (data_size > 0) + LLViewerRegion* region = NULL; + if (mHost == LLHost::invalid) + region = gAgent.getRegion(); + else + region = LLWorld::getInstance()->getRegion(mHost); + + if (region) { - // Only used for simulator requests - mFirstPacket = (data_size - FIRST_PACKET_SIZE) / MAX_IMG_PACKET_SIZE + 1; - if (FIRST_PACKET_SIZE + (mFirstPacket-1) * MAX_IMG_PACKET_SIZE != data_size) - { -// llwarns << "Bad CACHED TEXTURE size: " << data_size << " removing." << llendl; - removeFromCache(); - resetFormattedData(); - clearPackets(); - } - else + std::string http_url = region->getCapability("GetTexture"); + if (!http_url.empty()) { - mLastPacket = mFirstPacket-1; - mTotalPackets = (mFileSize - FIRST_PACKET_SIZE + MAX_IMG_PACKET_SIZE-1) / MAX_IMG_PACKET_SIZE + 1; + mUrl = http_url + "/?texture_id=" + mID.asString().c_str(); } } + else + { + llwarns << "Region not found for host: " << mHost << llendl; + } + } + if (!mUrl.empty()) + { + mState = LLTextureFetchWorker::SEND_HTTP_REQ; + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + // don't return, fall through to next state + } + else if (mSentRequest == UNSENT) + { + // Add this to the network queue and sit here. + // LLTextureFetch::update() will send off a request which will change our state mRequestedSize = mDesiredSize; mRequestedDiscard = mDesiredDiscard; mSentRequest = QUEUED; - mFetcher->lockQueue(); mFetcher->addToNetworkQueue(this); - mFetcher->unlockQueue(); setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); + return false; + } + else + { + // Shouldn't need to do anything here + //llassert_always(mFetcher->mNetworkQueue.find(mID) != mFetcher->mNetworkQueue.end()); + // Make certain this is in the network queue + //mFetcher->addToNetworkQueue(this); + //setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); + return false; } - return false; } if (mState == LOAD_FROM_SIMULATOR) { + if (mFormattedImage.isNull()) + { + mFormattedImage = new LLImageJ2C; + } if (processSimulatorPackets()) { - mFetcher->lockQueue(); - mFetcher->removeFromNetworkQueue(this); - mFetcher->unlockQueue(); + LL_DEBUGS("Texture") << mID << ": Loaded from Sim. Bytes: " << mFormattedImage->getDataSize() << LL_ENDL; + mFetcher->removeFromNetworkQueue(this, false); if (mFormattedImage.isNull() || !mFormattedImage->getDataSize()) { // processSimulatorPackets() failed @@ -727,108 +787,99 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { + mFetcher->addToNetworkQueue(this); // failsafe setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); } return false; } -#if 0 - if (mState == LOAD_FROM_HTTP_GET_URL) - { - if (!mSentRequest) - { - mSentRequest = TRUE; - mLoaded = FALSE; - std::string url; - LLViewerRegion* region = gAgent.getRegion(); - if (region) + if (mState == SEND_HTTP_REQ) + { + { + const S32 HTTP_QUEUE_MAX_SIZE = 32; + // *TODO: Integrate this with llviewerthrottle + // Note: LLViewerThrottle uses dynamic throttling which makes sense for UDP, + // but probably not for Textures. + // Set the throttle to the entire bandwidth, assuming UDP packets will get priority + // when they are needed + F32 max_bandwidth = mFetcher->mMaxBandwidth; + if ((mFetcher->getHTTPQueueSize() >= HTTP_QUEUE_MAX_SIZE) || + (mFetcher->getTextureBandwidth() > max_bandwidth)) { - url = region->getCapability("RequestTextureDownload"); - } - if (!url.empty()) - { - LLSD sd; - sd = mID.asString(); - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); - LLHTTPClient::post(url, sd, new URLResponder(mFetcher, mID)); + // Make normal priority and return (i.e. wait until there is room in the queue) + setPriority(LLWorkerThread::PRIORITY_NORMAL | mWorkPriority); return false; } - else - { -// llwarns << mID << ": HTTP get url failed, requesting from simulator" << llendl; - mSentRequest = FALSE; - mState = LOAD_FROM_SIMULATOR; - return false; - } - } - else - { - if (mLoaded) + + mFetcher->removeFromNetworkQueue(this, false); + + S32 cur_size = 0; + if (mFormattedImage.notNull()) { - if (!mURL.empty()) - { - mState = LOAD_FROM_HTTP_GET_DATA; - mSentRequest = FALSE; // reset - mLoaded = FALSE; // reset - } - else - { -// llwarns << mID << ": HTTP get url is empty, requesting from simulator" << llendl; - mSentRequest = FALSE; - mState = LOAD_FROM_SIMULATOR; - return false; - } + cur_size = mFormattedImage->getDataSize(); // amount of data we already have } - } - // fall through - } - - if (mState == LOAD_FROM_HTTP_GET_DATA) - { - if (!mSentRequest) - { - mSentRequest = TRUE; - S32 cur_size = mFormattedImage->getDataSize(); // amount of data we already have mRequestedSize = mDesiredSize; mRequestedDiscard = mDesiredDiscard; -#if 1 // *TODO: LLCurl::getByteRange is broken (ignores range) - cur_size = 0; - mFormattedImage->deleteData(); -#endif mRequestedSize -= cur_size; - // F32 priority = mImagePriority / (F32)LLViewerTexture::maxDecodePriority(); // 0-1 S32 offset = cur_size; mBufferSize = cur_size; // This will get modified by callbackHttpGet() - std::string url; - if (mURL.empty()) + + bool res = false; + if (!mUrl.empty()) { - //url = "http://asset.agni/0000002f-38ae-0e17-8e72-712e58964e9c.texture"; - std::stringstream urlstr; - urlstr << "http://asset.agni/" << mID.asString() << ".texture"; - url = urlstr.str(); + mLoaded = FALSE; + mGetStatus = 0; + mGetReason.clear(); + lldebugs << "HTTP GET: " << mID << " Offset: " << offset + << " Bytes: " << mRequestedSize + << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth + << llendl; + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); + mState = WAIT_HTTP_REQ; + + mFetcher->addToHTTPQueue(mID); + // Will call callbackHttpGet when curl request completes + std::vector<std::string> headers; + headers.push_back("Accept: image/x-j2c"); + res = mFetcher->mCurlGetRequest->getByteRange(mUrl, headers, offset, mRequestedSize, + new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, offset)); } - else + if (!res) { - url = mURL; + llwarns << "HTTP GET request failed for " << mID << llendl; + resetFormattedData(); + ++mHTTPFailCount; + return true; // failed } - mLoaded = FALSE; -// llinfos << "HTTP GET: " << mID << " Offset: " << offset << " Bytes: " << mRequestedSize << llendl; - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); - LLCurl::getByteRange(url, offset, mRequestedSize, - new HTTPGetResponder(mFetcher, mID)); // *TODO: use mWorkPriority - return false; // not done + // fall through } - + } + + if (mState == WAIT_HTTP_REQ) + { if (mLoaded) { - S32 cur_size = mFormattedImage->getDataSize(); + S32 cur_size = mFormattedImage.notNull() ? mFormattedImage->getDataSize() : 0; if (mRequestedSize < 0) { -// llwarns << "http get failed for: " << mID << llendl; + const S32 HTTP_MAX_RETRY_COUNT = 3; + S32 max_attempts = (mGetStatus == HTTP_NOT_FOUND) ? 1 : HTTP_MAX_RETRY_COUNT + 1; + llinfos << "HTTP GET failed for: " << mUrl + << " Status: " << mGetStatus << " Reason: '" << mGetReason << "'" + << " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl; if (cur_size == 0) { - resetFormattedData(); - return true; // failed + ++mHTTPFailCount; + if (mHTTPFailCount >= max_attempts) + { + resetFormattedData(); + return true; // failed + } + else + { + mState = SEND_HTTP_REQ; + return false; // retry + } } else { @@ -836,6 +887,18 @@ bool LLTextureFetchWorker::doWork(S32 param) return false; // use what we have } } + + if (mFormattedImage.isNull()) + { + // For now, create formatted image based on extension + std::string extension = gDirUtilp->getExtension(mUrl); + mFormattedImage = LLImageFormatted::createFromType(LLImageBase::getCodecFromExtension(extension)); + if (mFormattedImage.isNull()) + { + mFormattedImage = new LLImageJ2C; // default + } + } + llassert_always(mBufferSize == cur_size + mRequestedSize); if (mHaveAllData) { @@ -854,43 +917,51 @@ bool LLTextureFetchWorker::doWork(S32 param) mBuffer = NULL; mBufferSize = 0; mLoadedDiscard = mRequestedDiscard; - setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); mState = DECODE_IMAGE; + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + return false; + } + else + { + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); return false; } - - // NOTE: Priority gets updated when the http get completes (in callbackHTTPGet()) - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); - return false; } -#endif if (mState == DECODE_IMAGE) { - llassert_always(mFormattedImage->getDataSize() > 0); + if (mFormattedImage->getDataSize() <= 0) + { + llerrs << "Decode entered with invalid mFormattedImage. ID = " << mID << llendl; + } setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it mRawImage = NULL; mAuxImage = NULL; - llassert_always(mImageWorker == NULL); llassert_always(mFormattedImage.notNull()); + llassert_always(mLoadedDiscard >= 0); S32 discard = mHaveAllData ? 0 : mLoadedDiscard; U32 image_priority = LLWorkerThread::PRIORITY_NORMAL | mWorkPriority; mDecoded = FALSE; mState = DECODE_IMAGE_UPDATE; - mImageWorker = new LLImageWorker(mFormattedImage, image_priority, discard, new DecodeResponder(mFetcher, mID, this)); - // fall though (need to call requestDecodedData() to start work) + LL_DEBUGS("Texture") << mID << ": Decoding. Bytes: " << mFormattedImage->getDataSize() << " Discard: " << discard + << " All Data: " << mHaveAllData << LL_ENDL; + mDecodeHandle = mFetcher->mImageDecodeThread->decodeImage(mFormattedImage, image_priority, discard, mNeedsAux, + new DecodeResponder(mFetcher, mID, this)); + // fall though } if (mState == DECODE_IMAGE_UPDATE) { - if (decodeImage()) + if (mDecoded) { if (mDecodedDiscard < 0) { + LL_DEBUGS("Texture") << mID << ": Failed to Decode." << LL_ENDL; if (mCachedSize > 0 && !mInLocalCache && mRetryAttempt == 0) { // Cache file should be deleted, try again // llwarns << mID << ": Decode of cached file failed (removed), retrying" << llendl; + llassert_always(mDecodeHandle == 0); mFormattedImage = NULL; ++mRetryAttempt; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); @@ -905,6 +976,9 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { + llassert_always(mRawImage.notNull()); + LL_DEBUGS("Texture") << mID << ": Decoded. Discard: " << mDecodedDiscard + << " Raw Image: " << llformat("%dx%d",mRawImage->getWidth(),mRawImage->getHeight()) << LL_ENDL; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); mState = WRITE_TO_CACHE; } @@ -918,9 +992,10 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mState == WRITE_TO_CACHE) { - if (mInLocalCache || !mFileSize || mSentRequest == UNSENT) + if (mInLocalCache || mSentRequest == UNSENT || mFormattedImage.isNull()) { - // If we're in a local cache or we didn't actually receive any new data, skip + // If we're in a local cache or we didn't actually receive any new data, + // or we failed to load anything, skip mState = DONE; return false; } @@ -979,10 +1054,10 @@ bool LLTextureFetchWorker::doWork(S32 param) // Called from MAIN thread void LLTextureFetchWorker::endWork(S32 param, bool aborted) { - if (mImageWorker) + if (mDecodeHandle != 0) { - mImageWorker->scheduleDelete(); - mImageWorker = NULL; + mFetcher->mImageDecodeThread->abortRequest(mDecodeHandle, false); + mDecodeHandle = 0; } mFormattedImage = NULL; } @@ -1035,7 +1110,7 @@ bool LLTextureFetchWorker::deleteOK() if ((haveWork() && // not ok to delete from these states - ((mState >= LOAD_FROM_HTTP_GET_URL && mState <= LOAD_FROM_HTTP_GET_DATA) || + ((mState >= SEND_HTTP_REQ && mState <= WAIT_HTTP_REQ) || (mState >= WRITE_TO_CACHE && mState <= WAIT_ON_WRITE)))) { delete_ok = false; @@ -1044,7 +1119,6 @@ bool LLTextureFetchWorker::deleteOK() return delete_ok; } - void LLTextureFetchWorker::removeFromCache() { if (!mInLocalCache) @@ -1061,6 +1135,7 @@ bool LLTextureFetchWorker::processSimulatorPackets() if (mFormattedImage.isNull() || mRequestedSize < 0) { // not sure how we got here, but not a valid state, abort! + llassert_always(mDecodeHandle == 0); mFormattedImage = NULL; return true; } @@ -1074,6 +1149,12 @@ bool LLTextureFetchWorker::processSimulatorPackets() buffer_size += mPackets[i]->mSize; } bool have_all_data = mLastPacket >= mTotalPackets-1; + if (mRequestedSize <= 0) + { + // We received a packed but haven't requested anything yet (edge case) + // Return true (we're "done") since we didn't request anything + return true; + } if (buffer_size >= mRequestedSize || have_all_data) { /// We have enough (or all) data @@ -1109,50 +1190,36 @@ bool LLTextureFetchWorker::processSimulatorPackets() ////////////////////////////////////////////////////////////////////////////// -void LLTextureFetchWorker::callbackURLReceived(const LLSD& data, bool success) +void LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer, + bool last_block, bool success) { -#if 0 LLMutexLock lock(&mWorkMutex); - if (!mSentRequest || mState != LOAD_FROM_HTTP_GET_URL) - { - llwarns << "callbackURLReceived for unrequested fetch worker, req=" - << mSentRequest << " state= " << mState << llendl; - return; - } - if (success) - { - mURL = data.asString(); - } - mLoaded = TRUE; - setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); -#endif -} - -////////////////////////////////////////////////////////////////////////////// -void LLTextureFetchWorker::callbackHttpGet(U8* data, S32 data_size, bool last_block) -{ -#if 0 - LLMutexLock lock(&mWorkMutex); - if (!mSentRequest || mState != LOAD_FROM_HTTP_GET_DATA) + if (mState != WAIT_HTTP_REQ) { - llwarns << "callbackHttpGet for unrequested fetch worker, req=" - << mSentRequest << " state= " << mState << llendl; + llwarns << "callbackHttpGet for unrequested fetch worker: " << mID + << " req=" << mSentRequest << " state= " << mState << llendl; return; } -// llinfos << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << llendl; if (mLoaded) { llwarns << "Duplicate callback for " << mID.asString() << llendl; return; // ignore duplicate callback } - if (data_size >= 0) + if (success) { + // get length of stream: + S32 data_size = buffer->countAfter(channels.in(), NULL); + + gTextureList.sTextureBits += data_size * 8; // Approximate - does not include header bits + + //llinfos << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << llendl; if (data_size > 0) { + // *TODO: set the formatted image data here directly to avoid the copy mBuffer = new U8[data_size]; - // *TODO: set the formatted image data here - memcpy(mBuffer, data, data_size); + buffer->readAfter(channels.in(), NULL, mBuffer, data_size); mBufferSize += data_size; if (data_size < mRequestedSize || last_block == true) { @@ -1160,10 +1227,11 @@ void LLTextureFetchWorker::callbackHttpGet(U8* data, S32 data_size, bool last_bl } else if (data_size > mRequestedSize) { - // *TODO: This will happen until we fix LLCurl::getByteRange() -// llinfos << "HUH?" << llendl; + // *TODO: This shouldn't be happening any more + llwarns << "data_size = " << data_size << " > requested: " << mRequestedSize << llendl; mHaveAllData = TRUE; - mFormattedImage->deleteData(); + llassert_always(mDecodeHandle == 0); + mFormattedImage = NULL; // discard any previous data we had mBufferSize = data_size; } } @@ -1181,7 +1249,6 @@ void LLTextureFetchWorker::callbackHttpGet(U8* data, S32 data_size, bool last_bl } mLoaded = TRUE; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); -#endif } ////////////////////////////////////////////////////////////////////////////// @@ -1197,7 +1264,7 @@ void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* ima } if (success) { - llassert_always(imagesize > 0); + llassert_always(imagesize >= 0); mFileSize = imagesize; mFormattedImage = image; mImageCodec = image->getCodec(); @@ -1225,65 +1292,40 @@ void LLTextureFetchWorker::callbackCacheWrite(bool success) ////////////////////////////////////////////////////////////////////////////// -void LLTextureFetchWorker::callbackDecoded(bool success) +void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImageRaw* aux) { + LLMutexLock lock(&mWorkMutex); + if (mDecodeHandle == 0) + { + return; // aborted, ignore + } if (mState != DECODE_IMAGE_UPDATE) { // llwarns << "Decode callback for " << mID << " with state = " << mState << llendl; + mDecodeHandle = 0; return; } -// llinfos << mID << " : DECODE COMPLETE " << llendl; - setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); -} - -////////////////////////////////////////////////////////////////////////////// - -bool LLTextureFetchWorker::decodeImage() -{ - if(!mImageWorker) - { - //LLTextureFetchWorker is aborted, skip image decoding. - return true ; - } - - bool res = true; - if (mRawImage.isNull()) - { - res = false; - if (mImageWorker->requestDecodedData(mRawImage, -1)) - { - res = true; -// llinfos << mID << " : BASE DECODE FINISHED" << llendl; - } - } - if (res && - (mRawImage.notNull() && mRawImage->getDataSize() > 0) && - (mNeedsAux && mAuxImage.isNull())) + llassert_always(mFormattedImage.notNull()); + + mDecodeHandle = 0; + if (success) { - res = false; - if (mImageWorker->requestDecodedAuxData(mAuxImage, 4, -1)) - { - res = true; -// llinfos << mID << " : AUX DECODE FINISHED" << llendl; - } + llassert_always(raw); + mRawImage = raw; + mAuxImage = aux; + mDecodedDiscard = mFormattedImage->getDiscardLevel(); + LL_DEBUGS("Texture") << mID << ": Decode Finished. Discard: " << mDecodedDiscard + << " Raw Image: " << llformat("%dx%d",mRawImage->getWidth(),mRawImage->getHeight()) << LL_ENDL; } - if (res) + else { - if ((mRawImage.notNull() && mRawImage->getDataSize() > 0) && - (!mNeedsAux || (mAuxImage.notNull() && mAuxImage->getDataSize() > 0))) - { - mDecodedDiscard = mFormattedImage->getDiscardLevel(); -// llinfos << mID << " : DECODE FINISHED. DISCARD: " << mDecodedDiscard << llendl; - } - else - { -// llwarns << "DECODE FAILED: " << mID << " Discard: " << (S32)mFormattedImage->getDiscardLevel() << llendl; - removeFromCache(); - } - mImageWorker->scheduleDelete(); - mImageWorker = NULL; + llwarns << "DECODE FAILED: " << mID << " Discard: " << (S32)mFormattedImage->getDiscardLevel() << llendl; + removeFromCache(); + mDecodedDiscard = -1; // Redundant, here for clarity and paranoia } - return res; + mDecoded = TRUE; +// llinfos << mID << " : DECODE COMPLETE " << llendl; + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); } ////////////////////////////////////////////////////////////////////////////// @@ -1314,15 +1356,21 @@ bool LLTextureFetchWorker::writeToCacheComplete() ////////////////////////////////////////////////////////////////////////////// // public -LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded) +LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded) : LLWorkerThread("TextureFetch", threaded), mDebugCount(0), mDebugPause(FALSE), mPacketCount(0), mBadPacketCount(0), mQueueMutex(getAPRPool()), - mTextureCache(cache) + mNetworkQueueMutex(getAPRPool()), + mTextureCache(cache), + mImageDecodeThread(imagedecodethread), + mTextureBandwidth(0), + mCurlGetRequest(NULL) { + mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); + mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), gSavedSettings.getU32("TextureLoggingThreshold")); } LLTextureFetch::~LLTextureFetch() @@ -1330,13 +1378,7 @@ LLTextureFetch::~LLTextureFetch() // ~LLQueuedThread() called here } -bool LLTextureFetch::createRequest(const LLUUID& id, const LLHost& host, F32 priority, - S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux) -{ - return createRequest(LLStringUtil::null, id, host, priority, w, h, c, desired_discard, needs_aux); -} - -bool LLTextureFetch::createRequest(const std::string& filename, const LLUUID& id, const LLHost& host, F32 priority, +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) { if (mDebugPause) @@ -1361,7 +1403,14 @@ bool LLTextureFetch::createRequest(const std::string& filename, const LLUUID& id } S32 desired_size; - if (desired_discard == 0) + std::string exten = gDirUtilp->getExtension(url); + if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C)) + { + // Only do partial requests for J2C at the moment + //llinfos << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << llendl; + desired_size = MAX_IMAGE_DATA_SIZE; + } + else if (desired_discard == 0) { // if we want the entire image, and we know its size, then get it all // (calcDataSizeJ2C() below makes assumptions about how the image @@ -1378,7 +1427,7 @@ bool LLTextureFetch::createRequest(const std::string& filename, const LLUUID& id } else { - desired_size = FIRST_PACKET_SIZE; + desired_size = TEXTURE_CACHE_ENTRY_SIZE; desired_discard = MAX_DISCARD_LEVEL; } @@ -1389,10 +1438,10 @@ bool LLTextureFetch::createRequest(const std::string& filename, const LLUUID& id { return false; // need to wait for previous aborted request to complete } - worker->lockWorkData(); + worker->lockWorkMutex(); worker->setImagePriority(priority); worker->setDesiredDiscard(desired_discard, desired_size); - worker->unlockWorkData(); + worker->unlockWorkMutex(); if (!worker->haveWork()) { worker->mState = LLTextureFetchWorker::INIT; @@ -1401,16 +1450,7 @@ bool LLTextureFetch::createRequest(const std::string& filename, const LLUUID& id } else { - if (filename.empty()) - { - // do remote fetch - worker = new LLTextureFetchWorker(this, id, host, priority, desired_discard, desired_size); - } - else - { - // do local file fetch - worker = new LLTextureFetchLocalFileWorker(this, filename, id, host, priority, desired_discard, desired_size); - } + worker = new LLTextureFetchWorker(this, url, id, host, priority, desired_discard, desired_size); mRequestMap[id] = worker; } worker->mActiveCount++; @@ -1430,10 +1470,9 @@ void LLTextureFetch::deleteRequest(const LLUUID& id, bool cancel) } // protected - -// call lockQueue() first! void LLTextureFetch::addToNetworkQueue(LLTextureFetchWorker* worker) { + LLMutexLock lock(&mNetworkQueueMutex); if (mRequestMap.find(worker->mID) != mRequestMap.end()) { // only add to the queue if in the request map @@ -1447,10 +1486,27 @@ void LLTextureFetch::addToNetworkQueue(LLTextureFetchWorker* worker) } } -// call lockQueue() first! -void LLTextureFetch::removeFromNetworkQueue(LLTextureFetchWorker* worker) +void LLTextureFetch::removeFromNetworkQueue(LLTextureFetchWorker* worker, bool cancel) { - mNetworkQueue.erase(worker->mID); + LLMutexLock lock(&mNetworkQueueMutex); + size_t erased = mNetworkQueue.erase(worker->mID); + if (cancel && erased > 0) + { + mCancelQueue[worker->mHost].insert(worker->mID); + } +} + +// protected +void LLTextureFetch::addToHTTPQueue(const LLUUID& id) +{ + LLMutexLock lock(&mNetworkQueueMutex); + mHTTPTextureQueue.insert(id); +} + +void LLTextureFetch::removeFromHTTPQueue(const LLUUID& id) +{ + LLMutexLock lock(&mNetworkQueueMutex); + mHTTPTextureQueue.erase(id); } // call lockQueue() first! @@ -1458,11 +1514,7 @@ void LLTextureFetch::removeRequest(LLTextureFetchWorker* worker, bool cancel) { size_t erased_1 = mRequestMap.erase(worker->mID); llassert_always(erased_1 > 0) ; - size_t erased = mNetworkQueue.erase(worker->mID); - if (cancel && erased > 0) - { - mCancelQueue[worker->mHost].insert(worker->mID); - } + removeFromNetworkQueue(worker, cancel); llassert_always(!(worker->getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) ; worker->scheduleDelete(); @@ -1504,24 +1556,27 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, } else if (worker->checkWork()) { + worker->lockWorkMutex(); discard_level = worker->mDecodedDiscard; - raw = worker->mRawImage; worker->mRawImage = NULL; - aux = worker->mAuxImage; worker->mAuxImage = NULL; + raw = worker->mRawImage; + aux = worker->mAuxImage; res = true; + LL_DEBUGS("Texture") << id << ": Request Finished. State: " << worker->mState << " Discard: " << discard_level << LL_ENDL; + worker->unlockWorkMutex(); } else { - worker->lockWorkData(); + worker->lockWorkMutex(); if ((worker->mDecodedDiscard >= 0) && (worker->mDecodedDiscard < discard_level || discard_level < 0) && (worker->mState >= LLTextureFetchWorker::WAIT_ON_WRITE)) { // Not finished, but data is ready discard_level = worker->mDecodedDiscard; - if (worker->mRawImage) raw = worker->mRawImage; - if (worker->mAuxImage) aux = worker->mAuxImage; + raw = worker->mRawImage; + aux = worker->mAuxImage; } - worker->unlockWorkData(); + worker->unlockWorkMutex(); } } else @@ -1538,9 +1593,9 @@ bool LLTextureFetch::updateRequestPriority(const LLUUID& id, F32 priority) LLTextureFetchWorker* worker = getWorker(id); if (worker) { - worker->lockWorkData(); + worker->lockWorkMutex(); worker->setImagePriority(priority); - worker->unlockWorkData(); + worker->unlockWorkMutex(); res = true; } return res; @@ -1548,40 +1603,106 @@ bool LLTextureFetch::updateRequestPriority(const LLUUID& id, F32 priority) ////////////////////////////////////////////////////////////////////////////// +// MAIN THREAD //virtual S32 LLTextureFetch::update(U32 max_time_ms) { S32 res; + + mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); + res = LLWorkerThread::update(max_time_ms); - const F32 REQUEST_TIME = 1.f; - - // Periodically, gather the list of textures that need data from the network - // And send the requests out to the simulators - if (mNetworkTimer.getElapsedTimeF32() >= REQUEST_TIME) + if (!mDebugPause) { - mNetworkTimer.reset(); sendRequestListToSimulators(); } return res; } +// WORKER THREAD +void LLTextureFetch::startThread() +{ + // Construct mCurlGetRequest from Worker Thread + mCurlGetRequest = new LLCurlRequest(); +} + +// WORKER THREAD +void LLTextureFetch::endThread() +{ + // Destroy mCurlGetRequest from Worker Thread + delete mCurlGetRequest; + mCurlGetRequest = NULL; +} + +// WORKER THREAD +void LLTextureFetch::threadedUpdate() +{ + llassert_always(mCurlGetRequest); + + // Limit update frequency + const F32 PROCESS_TIME = 0.05f; + static LLFrameTimer process_timer; + if (process_timer.getElapsedTimeF32() < PROCESS_TIME) + { + return; + } + process_timer.reset(); + + // Update Curl on same thread as mCurlGetRequest was constructed + S32 processed = mCurlGetRequest->process(); + if (processed > 0) + { + lldebugs << "processed: " << processed << " messages." << llendl; + } + +#if 0 + const F32 INFO_TIME = 1.0f; + static LLFrameTimer info_timer; + if (info_timer.getElapsedTimeF32() >= INFO_TIME) + { + S32 q = mCurlGetRequest->getQueued(); + if (q > 0) + { + llinfos << "Queued gets: " << q << llendl; + info_timer.reset(); + } + } +#endif + +} + ////////////////////////////////////////////////////////////////////////////// void LLTextureFetch::sendRequestListToSimulators() { + // All requests + const F32 REQUEST_DELTA_TIME = 0.10f; // 10 fps + + // Sim requests const S32 IMAGES_PER_REQUEST = 50; - const F32 LAZY_FLUSH_TIMEOUT = 15.f; // 10.0f // temp + const F32 SIM_LAZY_FLUSH_TIMEOUT = 10.0f; // temp const F32 MIN_REQUEST_TIME = 1.0f; const F32 MIN_DELTA_PRIORITY = 1000.f; - LLMutexLock lock(&mQueueMutex); + // Periodically, gather the list of textures that need data from the network + // And send the requests out to the simulators + static LLFrameTimer timer; + if (timer.getElapsedTimeF32() < REQUEST_DELTA_TIME) + { + return; + } + timer.reset(); + LLMutexLock lock(&mQueueMutex); + // Send requests typedef std::set<LLTextureFetchWorker*,LLTextureFetchWorker::Compare> request_list_t; typedef std::map< LLHost, request_list_t > work_request_map_t; work_request_map_t requests; + { + LLMutexLock lock2(&mNetworkQueueMutex); for (queue_t::iterator iter = mNetworkQueue.begin(); iter != mNetworkQueue.end(); ) { queue_t::iterator curiter = iter++; @@ -1591,65 +1712,65 @@ void LLTextureFetch::sendRequestListToSimulators() mNetworkQueue.erase(curiter); continue; // paranoia } + if ((req->mState != LLTextureFetchWorker::LOAD_FROM_NETWORK) && + (req->mState != LLTextureFetchWorker::LOAD_FROM_SIMULATOR)) + { + // We already received our URL, remove from the queue + llwarns << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << llendl; + mNetworkQueue.erase(curiter); + continue; + } if (req->mID == mDebugID) { mDebugCount++; // for setting breakpoints } - if (req->mTotalPackets > 0 && req->mLastPacket >= req->mTotalPackets-1) + if (req->mSentRequest == LLTextureFetchWorker::SENT_SIM && + req->mTotalPackets > 0 && + req->mLastPacket >= req->mTotalPackets-1) { // We have all the packets... make sure this is high priority // req->setPriority(LLWorkerThread::PRIORITY_HIGH | req->mWorkPriority); continue; } F32 elapsed = req->mRequestedTimer.getElapsedTimeF32(); - F32 delta_priority = llabs(req->mRequestedPriority - req->mImagePriority); - if ((req->mSimRequestedDiscard != req->mDesiredDiscard) || - (delta_priority > MIN_DELTA_PRIORITY && elapsed >= MIN_REQUEST_TIME) || - (elapsed >= LAZY_FLUSH_TIMEOUT)) { - requests[req->mHost].insert(req); + F32 delta_priority = llabs(req->mRequestedPriority - req->mImagePriority); + if ((req->mSimRequestedDiscard != req->mDesiredDiscard) || + (delta_priority > MIN_DELTA_PRIORITY && elapsed >= MIN_REQUEST_TIME) || + (elapsed >= SIM_LAZY_FLUSH_TIMEOUT)) + { + requests[req->mHost].insert(req); + } } } - - std::string http_url; -#if 0 - if (gSavedSettings.getBOOL("ImagePipelineUseHTTP")) - { - LLViewerRegion* region = gAgent.getRegion(); - if (region) - { - http_url = region->getCapability("RequestTextureDownload"); - } } -#endif - + for (work_request_map_t::iterator iter1 = requests.begin(); iter1 != requests.end(); ++iter1) { - bool use_http = http_url.empty() ? false : true; LLHost host = iter1->first; // invalid host = use agent host if (host == LLHost::invalid) { host = gAgent.getRegionHost(); } - else - { - use_http = false; - } - if (use_http) + S32 sim_request_count = 0; + + for (request_list_t::iterator iter2 = iter1->second.begin(); + iter2 != iter1->second.end(); ++iter2) { - } - else - { - S32 request_count = 0; - for (request_list_t::iterator iter2 = iter1->second.begin(); - iter2 != iter1->second.end(); ++iter2) + LLTextureFetchWorker* req = *iter2; + if (gMessageSystem) { - LLTextureFetchWorker* req = *iter2; - req->mSentRequest = LLTextureFetchWorker::SENT_SIM; - if (0 == request_count) + if (req->mSentRequest != LLTextureFetchWorker::SENT_SIM) + { + // Initialize packet data based on data read from cache + req->lockWorkMutex(); + req->setupPacketData(); + req->unlockWorkMutex(); + } + if (0 == sim_request_count) { gMessageSystem->newMessageFast(_PREHASH_RequestImage); gMessageSystem->nextBlockFast(_PREHASH_AgentData); @@ -1666,30 +1787,42 @@ void LLTextureFetch::sendRequestListToSimulators() // llinfos << "IMAGE REQUEST: " << req->mID << " Discard: " << req->mDesiredDiscard // << " Packet: " << packet << " Priority: " << req->mImagePriority << llendl; - req->lockWorkData(); + if ((gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog")) || (gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"))) + { + mTextureInfo.setRequestStartTime(req->mID, LLTimer::getTotalTime()); + mTextureInfo.setRequestOffset(req->mID, 0); + mTextureInfo.setRequestSize(req->mID, 0); + mTextureInfo.setRequestType(req->mID, LLTextureInfoDetails::REQUEST_TYPE_UDP); + } + + req->lockWorkMutex(); + req->mSentRequest = LLTextureFetchWorker::SENT_SIM; req->mSimRequestedDiscard = req->mDesiredDiscard; req->mRequestedPriority = req->mImagePriority; req->mRequestedTimer.reset(); - req->unlockWorkData(); - request_count++; - if (request_count >= IMAGES_PER_REQUEST) + req->unlockWorkMutex(); + sim_request_count++; + if (sim_request_count >= IMAGES_PER_REQUEST) { -// llinfos << "REQUESTING " << request_count << " IMAGES FROM HOST: " << host.getIPString() << llendl; +// llinfos << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << llendl; + gMessageSystem->sendSemiReliable(host, NULL, NULL); - request_count = 0; + sim_request_count = 0; } } - if (request_count > 0 && request_count < IMAGES_PER_REQUEST) - { -// llinfos << "REQUESTING " << request_count << " IMAGES FROM HOST: " << host.getIPString() << llendl; - gMessageSystem->sendSemiReliable(host, NULL, NULL); - request_count = 0; - } + } + if (gMessageSystem && sim_request_count > 0 && sim_request_count < IMAGES_PER_REQUEST) + { +// llinfos << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << llendl; + gMessageSystem->sendSemiReliable(host, NULL, NULL); + sim_request_count = 0; } } // Send cancelations - if (!mCancelQueue.empty()) + { + LLMutexLock lock2(&mNetworkQueueMutex); + if (gMessageSystem && !mCancelQueue.empty()) { for (cancel_queue_t::iterator iter1 = mCancelQueue.begin(); iter1 != mCancelQueue.end(); ++iter1) @@ -1732,6 +1865,7 @@ void LLTextureFetch::sendRequestListToSimulators() } mCancelQueue.clear(); } + } } ////////////////////////////////////////////////////////////////////////////// @@ -1808,7 +1942,7 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8 return false; } - worker->lockWorkData(); + worker->lockWorkMutex(); // Copy header data into image object worker->mImageCodec = codec; @@ -1819,7 +1953,7 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8 res = worker->insertPacket(0, data, data_size); worker->setPriority(LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority); worker->mState = LLTextureFetchWorker::LOAD_FROM_SIMULATOR; - worker->unlockWorkData(); + worker->unlockWorkMutex(); return res; } @@ -1853,7 +1987,7 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 return false; } - worker->lockWorkData(); + worker->lockWorkMutex(); res = worker->insertPacket(packet_num, data, data_size); @@ -1866,12 +2000,20 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 else { // llwarns << "receiveImagePacket " << packet_num << "/" << worker->mLastPacket << " for worker: " << id -// << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState] << llendl; - removeFromNetworkQueue(worker); // failsafe - mCancelQueue[host].insert(id); +// << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState] << llendl; + removeFromNetworkQueue(worker, true); // failsafe } - - worker->unlockWorkData(); + + if(packet_num >= (worker->mTotalPackets - 1)) + { + if ((gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog")) || (gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"))) + { + U64 timeNow = LLTimer::getTotalTime(); + mTextureInfo.setRequestSize(id, worker->mFileSize); + mTextureInfo.setRequestCompleteTimeAndLog(id, timeNow); + } + } + worker->unlockWorkMutex(); return res; } @@ -1885,9 +2027,9 @@ BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id) LLTextureFetchWorker* worker = getWorker(id); if (worker) { - worker->lockWorkData(); + worker->lockWorkMutex() ; from_cache = worker->mInLocalCache ; - worker->unlockWorkData(); + worker->unlockWorkMutex() ; } return from_cache ; @@ -1907,7 +2049,7 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r LLTextureFetchWorker* worker = getWorker(id); if (worker && worker->haveWork()) { - worker->lockWorkData(); + worker->lockWorkMutex(); state = worker->mState; fetch_dtime = worker->mFetchTimer.getElapsedTimeF32(); request_dtime = worker->mRequestedTimer.getElapsedTimeF32(); @@ -1924,7 +2066,7 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r data_progress = (F32)worker->mFormattedImage->getDataSize() / (F32)worker->mFileSize; } } - if (state >= LLTextureFetchWorker::LOAD_FROM_NETWORK && state <= LLTextureFetchWorker::LOAD_FROM_HTTP_GET_DATA) + if (state >= LLTextureFetchWorker::LOAD_FROM_NETWORK && state <= LLTextureFetchWorker::WAIT_HTTP_REQ) { requested_priority = worker->mRequestedPriority; } @@ -1933,7 +2075,7 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r requested_priority = worker->mImagePriority; } fetch_priority = worker->getPriority(); - worker->unlockWorkData(); + worker->unlockWorkMutex(); } data_progress_p = data_progress; requested_priority_p = requested_priority; @@ -1959,5 +2101,3 @@ void LLTextureFetch::dump() } } - -////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 97719a9468..373e38a83c 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -37,26 +37,29 @@ #include "llimage.h" #include "lluuid.h" #include "llworkerthread.h" +#include "llcurl.h" +#include "lltextureinfo.h" class LLViewerTexture; class LLTextureFetchWorker; +class HTTPGetResponder; class LLTextureCache; +class LLImageDecodeThread; class LLHost; // Interface class class LLTextureFetch : public LLWorkerThread { friend class LLTextureFetchWorker; + friend class HTTPGetResponder; public: - LLTextureFetch(LLTextureCache* cache, bool threaded); + LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded); ~LLTextureFetch(); /*virtual*/ S32 update(U32 max_time_ms); - bool createRequest(const LLUUID& id, const LLHost& host, F32 priority, - S32 w, S32 h, S32 c, S32 discard, bool needs_aux); - bool createRequest(const std::string& filename, const LLUUID& id, const LLHost& host, F32 priority, + 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); void deleteRequest(const LLUUID& id, bool cancel); bool getRequestFinished(const LLUUID& id, S32& discard_level, @@ -66,25 +69,39 @@ public: bool receiveImageHeader(const LLHost& host, const LLUUID& id, U8 codec, U16 packets, U32 totalbytes, U16 data_size, U8* data); bool receiveImagePacket(const LLHost& host, const LLUUID& id, U16 packet_num, U16 data_size, U8* data); + void setTextureBandwidth(F32 bandwidth) { mTextureBandwidth = bandwidth; } + F32 getTextureBandwidth() { return mTextureBandwidth; } + // 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); void dump(); S32 getNumRequests() { return mRequestMap.size(); } + S32 getNumHTTPRequests() { return mHTTPTextureQueue.size(); } // Public for access by callbacks void lockQueue() { mQueueMutex.lock(); } void unlockQueue() { mQueueMutex.unlock(); } LLTextureFetchWorker* getWorker(const LLUUID& id); + + LLTextureInfo* getTextureInfo() { return &mTextureInfo; } protected: void addToNetworkQueue(LLTextureFetchWorker* worker); - void removeFromNetworkQueue(LLTextureFetchWorker* worker); + void removeFromNetworkQueue(LLTextureFetchWorker* worker, bool cancel); + void addToHTTPQueue(const LLUUID& id); + void removeFromHTTPQueue(const LLUUID& id); + S32 getHTTPQueueSize() { return (S32)mHTTPTextureQueue.size(); } void removeRequest(LLTextureFetchWorker* worker, bool cancel); + // Called from worker thread (during doWork) + void processCurlRequests(); private: void sendRequestListToSimulators(); + /*virtual*/ void startThread(void); + /*virtual*/ void endThread(void); + /*virtual*/ void threadedUpdate(void); public: LLUUID mDebugID; @@ -95,8 +112,11 @@ public: private: LLMutex mQueueMutex; + LLMutex mNetworkQueueMutex; LLTextureCache* mTextureCache; + LLImageDecodeThread* mImageDecodeThread; + LLCurlRequest* mCurlGetRequest; // Map of all requests by UUID typedef std::map<LLUUID,LLTextureFetchWorker*> map_t; @@ -105,10 +125,13 @@ private: // Set of requests that require network data typedef std::set<LLUUID> queue_t; queue_t mNetworkQueue; + queue_t mHTTPTextureQueue; typedef std::map<LLHost,std::set<LLUUID> > cancel_queue_t; cancel_queue_t mCancelQueue; - - LLFrameTimer mNetworkTimer; + F32 mTextureBandwidth; + F32 mMaxBandwidth; + LLTextureInfo mTextureInfo; }; #endif // LL_LLTEXTUREFETCH_H + diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp new file mode 100644 index 0000000000..672a36a8bd --- /dev/null +++ b/indra/newview/lltextureinfo.cpp @@ -0,0 +1,290 @@ +/** + * @file lltextureinfo.cpp + * @brief Object which handles local texture info + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-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 "lltextureinfo.h" +#include "lltexturestats.h" +#include "llviewercontrol.h" + +LLTextureInfo::LLTextureInfo() : + mLogTextureDownloadsToViewerLog(false), + mLogTextureDownloadsToSimulator(false), + mTotalBytes(0), + mTotalMilliseconds(0), + mTextureDownloadsStarted(0), + mTextureDownloadsCompleted(0), + mTextureDownloadProtocol("NONE"), + mTextureLogThreshold(100 * 1024), + mCurrentStatsBundleStartTime(0) +{ + mTextures.clear(); +} + +void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, U32 textureLogThreshold) +{ + mLogTextureDownloadsToViewerLog = writeToViewerLog; + mLogTextureDownloadsToSimulator = sendToSim; + mTextureLogThreshold = textureLogThreshold; +} + +LLTextureInfo::~LLTextureInfo() +{ + std::map<LLUUID, LLTextureInfoDetails *>::iterator iterator; + for (iterator = mTextures.begin(); iterator != mTextures.end(); iterator++) + { + LLTextureInfoDetails *info = (*iterator).second; + delete info; + } + + mTextures.clear(); +} + +void LLTextureInfo::addRequest(const LLUUID& id) +{ + LLTextureInfoDetails *info = new LLTextureInfoDetails(); + mTextures[id] = info; +} + +U32 LLTextureInfo::getTextureInfoMapSize() +{ + return mTextures.size(); +} + +bool LLTextureInfo::has(const LLUUID& id) +{ + std::map<LLUUID, LLTextureInfoDetails *>::iterator iterator = mTextures.find(id); + if (iterator == mTextures.end()) + { + return false; + } + else + { + return true; + } +} + +void LLTextureInfo::setRequestStartTime(const LLUUID& id, U64 startTime) +{ + if (!has(id)) + { + addRequest(id); + } + mTextures[id]->mStartTime = startTime; + mTextureDownloadsStarted++; +} + +void LLTextureInfo::setRequestSize(const LLUUID& id, U32 size) +{ + if (!has(id)) + { + addRequest(id); + } + mTextures[id]->mSize = size; +} + +void LLTextureInfo::setRequestOffset(const LLUUID& id, U32 offset) +{ + if (!has(id)) + { + addRequest(id); + } + mTextures[id]->mOffset = offset; +} + +void LLTextureInfo::setRequestType(const LLUUID& id, LLTextureInfoDetails::LLRequestType type) +{ + if (!has(id)) + { + addRequest(id); + } + mTextures[id]->mType = type; +} + +void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64 completeTime) +{ + if (!has(id)) + { + addRequest(id); + } + mTextures[id]->mCompleteTime = completeTime; + + std::string protocol = "NONE"; + switch(mTextures[id]->mType) + { + case LLTextureInfoDetails::REQUEST_TYPE_HTTP: + protocol = "HTTP"; + break; + + case LLTextureInfoDetails::REQUEST_TYPE_UDP: + protocol = "UDP"; + break; + + case LLTextureInfoDetails::REQUEST_TYPE_NONE: + default: + break; + } + + if (mLogTextureDownloadsToViewerLog) + { + llinfos << "texture=" << id + << " start=" << mTextures[id]->mStartTime + << " end=" << mTextures[id]->mCompleteTime + << " size=" << mTextures[id]->mSize + << " offset=" << mTextures[id]->mOffset + << " length_in_ms=" << (mTextures[id]->mCompleteTime - mTextures[id]->mStartTime) / 1000 + << " protocol=" << protocol + << llendl; + } + + if(mLogTextureDownloadsToSimulator) + { + S32 texture_stats_upload_threshold = mTextureLogThreshold; + mTotalBytes += mTextures[id]->mSize; + mTotalMilliseconds += mTextures[id]->mCompleteTime - mTextures[id]->mStartTime; + mTextureDownloadsCompleted++; + mTextureDownloadProtocol = protocol; + if (mTotalBytes >= texture_stats_upload_threshold) + { + LLSD texture_data; + std::stringstream startTime; + startTime << mCurrentStatsBundleStartTime; + texture_data["start_time"] = startTime.str(); + std::stringstream endTime; + endTime << completeTime; + texture_data["end_time"] = endTime.str(); + texture_data["averages"] = getAverages(); + send_texture_stats_to_sim(texture_data); + resetTextureStatistics(); + } + } + + mTextures.erase(id); +} + +LLSD LLTextureInfo::getAverages() +{ + LLSD averagedTextureData; + S32 averageDownloadRate; + if(mTotalMilliseconds == 0) + { + averageDownloadRate = 0; + } + else + { + averageDownloadRate = (mTotalBytes * 8) / mTotalMilliseconds; + } + + averagedTextureData["bits_per_second"] = averageDownloadRate; + averagedTextureData["bytes_downloaded"] = mTotalBytes; + averagedTextureData["texture_downloads_started"] = mTextureDownloadsStarted; + averagedTextureData["texture_downloads_completed"] = mTextureDownloadsCompleted; + averagedTextureData["transport"] = mTextureDownloadProtocol; + + return averagedTextureData; +} + +void LLTextureInfo::resetTextureStatistics() +{ + mTotalMilliseconds = 0; + mTotalBytes = 0; + mTextureDownloadsStarted = 0; + mTextureDownloadsCompleted = 0; + mTextureDownloadProtocol = "NONE"; + mCurrentStatsBundleStartTime = LLTimer::getTotalTime(); +} + +U32 LLTextureInfo::getRequestStartTime(const LLUUID& id) +{ + if (!has(id)) + { + return 0; + } + else + { + std::map<LLUUID, LLTextureInfoDetails *>::iterator iterator = mTextures.find(id); + return (*iterator).second->mStartTime; + } +} + +U32 LLTextureInfo::getRequestSize(const LLUUID& id) +{ + if (!has(id)) + { + return 0; + } + else + { + std::map<LLUUID, LLTextureInfoDetails *>::iterator iterator = mTextures.find(id); + return (*iterator).second->mSize; + } +} + +U32 LLTextureInfo::getRequestOffset(const LLUUID& id) +{ + if (!has(id)) + { + return 0; + } + else + { + std::map<LLUUID, LLTextureInfoDetails *>::iterator iterator = mTextures.find(id); + return (*iterator).second->mOffset; + } +} + +LLTextureInfoDetails::LLRequestType LLTextureInfo::getRequestType(const LLUUID& id) +{ + if (!has(id)) + { + return LLTextureInfoDetails::REQUEST_TYPE_NONE; + } + else + { + std::map<LLUUID, LLTextureInfoDetails *>::iterator iterator = mTextures.find(id); + return (*iterator).second->mType; + } +} + +U32 LLTextureInfo::getRequestCompleteTime(const LLUUID& id) +{ + if (!has(id)) + { + return 0; + } + else + { + std::map<LLUUID, LLTextureInfoDetails *>::iterator iterator = mTextures.find(id); + return (*iterator).second->mCompleteTime; + } +} + diff --git a/indra/newview/lltextureinfo.h b/indra/newview/lltextureinfo.h new file mode 100644 index 0000000000..71b0ea431f --- /dev/null +++ b/indra/newview/lltextureinfo.h @@ -0,0 +1,80 @@ +/** + * @file lltextureinfo.h + * @brief Object for managing texture information. + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-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_LLTEXTUREINFO_H +#define LL_LLTEXTUREINFO_H + +#include "lluuid.h" +#include "lltextureinfodetails.h" +#include <map> + +class LLTextureInfo +{ +public: + LLTextureInfo(); + ~LLTextureInfo(); + + void setUpLogging(bool writeToViewerLog, bool sendToSim, U32 textureLogThreshold); + bool has(const LLUUID& id); + void setRequestStartTime(const LLUUID& id, U64 startTime); + void setRequestSize(const LLUUID& id, U32 size); + void setRequestOffset(const LLUUID& id, U32 offset); + void setRequestType(const LLUUID& id, LLTextureInfoDetails::LLRequestType type); + void setRequestCompleteTimeAndLog(const LLUUID& id, U64 completeTime); + U32 getRequestStartTime(const LLUUID& id); + U32 getRequestSize(const LLUUID& id); + U32 getRequestOffset(const LLUUID& id); + LLTextureInfoDetails::LLRequestType getRequestType(const LLUUID& id); + U32 getRequestCompleteTime(const LLUUID& id); + void resetTextureStatistics(); + U32 getTextureInfoMapSize(); + LLSD getAverages(); + +private: + void addRequest(const LLUUID& id); + + std::map<LLUUID, LLTextureInfoDetails *> mTextures; + + LLSD mAverages; + + bool mLogTextureDownloadsToViewerLog; + bool mLogTextureDownloadsToSimulator; + S32 mTotalBytes; + S32 mTotalMilliseconds; + S32 mTextureDownloadsStarted; + S32 mTextureDownloadsCompleted; + std::string mTextureDownloadProtocol; + U32 mTextureLogThreshold; // in bytes + U64 mCurrentStatsBundleStartTime; +}; + +#endif // LL_LLTEXTUREINFO_H diff --git a/indra/newview/lltextureinfodetails.cpp b/indra/newview/lltextureinfodetails.cpp new file mode 100644 index 0000000000..f6ef47a2ee --- /dev/null +++ b/indra/newview/lltextureinfodetails.cpp @@ -0,0 +1,40 @@ +/** + * @file lltextureinfodetails.cpp + * @brief Object which handles details of any individual texture + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-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 "lltextureinfodetails.h" + +LLTextureInfoDetails::LLTextureInfoDetails() : mStartTime(0), mCompleteTime(0), mSize(0), mType(REQUEST_TYPE_NONE), mOffset(0) +{ +} + diff --git a/indra/newview/lltextureinfodetails.h b/indra/newview/lltextureinfodetails.h new file mode 100644 index 0000000000..091fa01a3d --- /dev/null +++ b/indra/newview/lltextureinfodetails.h @@ -0,0 +1,58 @@ +/** + * @file lltextureinfo.h + * @brief Object for managing texture information. + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-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_LLTEXTUREINFODETAILS_H +#define LL_LLTEXTUREINFODETAILS_H + +#include "lluuid.h" + +class LLTextureInfoDetails +{ +public: + enum LLRequestType + { + REQUEST_TYPE_NONE, + REQUEST_TYPE_HTTP, + REQUEST_TYPE_UDP + }; + + U32 mStartTime; + U32 mCompleteTime; + U32 mOffset; + U32 mSize; + LLRequestType mType; + + LLTextureInfoDetails(); +}; + +#endif // LL_LLTEXTUREINFODETAILS_H + diff --git a/indra/newview/lltexturestats.cpp b/indra/newview/lltexturestats.cpp new file mode 100644 index 0000000000..c91bfd4df2 --- /dev/null +++ b/indra/newview/lltexturestats.cpp @@ -0,0 +1,61 @@ +/** + * @file lltexturerstats.cpp + * @brief texture stats helper methods + * + * $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 "pipeline.h" +#include "llagent.h" +#include "lltexturefetch.h" +#include "lltexturestats.h" +#include "lltexturestatsuploader.h" +#include "llviewerregion.h" + +void send_texture_stats_to_sim(const LLSD &texture_stats) +{ + LLSD texture_stats_report; + // Only send stats if the agent is connected to a region. + if (!gAgent.getRegion() || gNoRender) + { + return; + } + + LLUUID agent_id = gAgent.getID(); + texture_stats_report["agent_id"] = agent_id; + texture_stats_report["region_id"] = gAgent.getRegion()->getRegionID(); + texture_stats_report["stats_data"] = texture_stats; + + std::string texture_cap_url = gAgent.getRegion()->getCapability("TextureStats"); + LLTextureStatsUploader tsu; + llinfos << "uploading texture stats data to simulator" << llendl; + tsu.uploadStatsToSimulator(texture_cap_url, texture_stats); +} + diff --git a/indra/newview/lltexturestats.h b/indra/newview/lltexturestats.h new file mode 100644 index 0000000000..2deb377dfd --- /dev/null +++ b/indra/newview/lltexturestats.h @@ -0,0 +1,41 @@ +/** + * @file lltexturestats.h + * @brief texture stats utilities + * + * $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_LLTEXTURESTATS_H +#define LL_LLTEXTURESTATS_H + +#include "llappviewer.h" + +// utility functions to capture data on texture download speeds and send to simulator periodically +void send_texture_stats_to_sim(const LLSD &texture_stats); + +#endif // LL_LLTEXTURESTATS_H diff --git a/indra/newview/lltexturestatsuploader.cpp b/indra/newview/lltexturestatsuploader.cpp new file mode 100644 index 0000000000..e0358e1fca --- /dev/null +++ b/indra/newview/lltexturestatsuploader.cpp @@ -0,0 +1,59 @@ +/** + * @file lltexturerstats.cpp + * @brief texture stats upload class + * + * $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 "lltexturestatsuploader.h" + +LLTextureStatsUploader::LLTextureStatsUploader() +{ +} + +LLTextureStatsUploader::~LLTextureStatsUploader() +{ +} + +void LLTextureStatsUploader::uploadStatsToSimulator(const std::string texture_cap_url, const LLSD &texture_stats) +{ + if ( texture_cap_url != "" ) + { + LLHTTPClient::post(texture_cap_url, texture_stats, NULL); + } + else + { + llinfos << "Not sending texture stats: " + << texture_stats + << " as there is no cap url." + << llendl; + } +} + diff --git a/indra/newview/lltexturestatsuploader.h b/indra/newview/lltexturestatsuploader.h new file mode 100644 index 0000000000..f6cc8be8fe --- /dev/null +++ b/indra/newview/lltexturestatsuploader.h @@ -0,0 +1,48 @@ +/** + * @file lltexturestatsuploader.h + * @brief Class to send the texture stats to the simulatore + * + * $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_LLTEXTURESTATSUPLOADER_H +#define LL_LLTEXTURESTATSUPLOADER_H + +#include "llappviewer.h" + +// utility functions to capture data on texture download speeds and send to simulator periodically + +class LLTextureStatsUploader +{ +public: + LLTextureStatsUploader(); + ~LLTextureStatsUploader(); + void uploadStatsToSimulator(const std::string texture_cap_url, const LLSD &texture_stats); +}; + +#endif // LL_LLTEXTURESTATSUPLOADER_H diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index ea675c5a6e..b6e20608eb 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -44,19 +44,21 @@ #include "llrender.h" #include "lltooltip.h" +#include "llappviewer.h" #include "llselectmgr.h" #include "lltexlayer.h" #include "lltexturecache.h" #include "lltexturefetch.h" +#include "llviewercontrol.h" #include "llviewerobject.h" #include "llviewertexture.h" #include "llviewertexturelist.h" -#include "llappviewer.h" - +#include "llvovolume.h" extern F32 texmem_lower_bound_scale; LLTextureView *gTextureView = NULL; LLTextureSizeView *gTextureSizeView = NULL; +LLTextureSizeView *gTextureCategoryView = NULL; //static std::set<LLViewerFetchedTexture*> LLTextureView::sDebugImages; @@ -168,7 +170,7 @@ void LLTextureBar::draw() { color = LLColor4::green4; } - else if (mImagep->getBoostLevel()) + else if (mImagep->getBoostLevel() > LLViewerTexture::BOOST_NONE) { color = LLColor4::magenta; } @@ -230,10 +232,10 @@ void LLTextureBar::draw() { "DSK", LLColor4::blue }, // CACHE_POST { "NET", LLColor4::green }, // LOAD_FROM_NETWORK { "SIM", LLColor4::green }, // LOAD_FROM_SIMULATOR - { "URL", LLColor4::green2 },// LOAD_FROM_HTTP_GET_URL - { "HTP", LLColor4::green }, // LOAD_FROM_HTTP_GET_DATA + { "REQ", LLColor4::yellow },// SEND_HTTP_REQ + { "HTP", LLColor4::green }, // WAIT_HTTP_REQ { "DEC", LLColor4::yellow },// DECODE_IMAGE - { "DEC", LLColor4::yellow },// DECODE_IMAGE_UPDATE + { "DEC", LLColor4::green }, // DECODE_IMAGE_UPDATE { "WRT", LLColor4::purple },// WRITE_TO_CACHE { "WRT", LLColor4::orange },// WAIT_ON_WRITE { "END", LLColor4::red }, // DONE @@ -261,7 +263,7 @@ void LLTextureBar::draw() // Draw the progress bar. S32 bar_width = 100; - S32 bar_left = 280; + S32 bar_left = 260; left = bar_left; right = left + bar_width; @@ -286,30 +288,31 @@ void LLTextureBar::draw() S32 pip_x = title_x3 + pip_space/2; // Draw the packet pip + const F32 pip_max_time = 5.f; F32 last_event = mImagep->mLastPacketTimer.getElapsedTimeF32(); - if (last_event < 1.f) + if (last_event < pip_max_time) { clr = LLColor4::white; } else { last_event = mImagep->mRequestDeltaTime; - if (last_event < 1.f) + if (last_event < pip_max_time) { clr = LLColor4::green; } else { last_event = mImagep->mFetchDeltaTime; - if (last_event < 1.f) + if (last_event < pip_max_time) { clr = LLColor4::yellow; } } } - if (last_event < 1.f) + if (last_event < pip_max_time) { - clr.setAlpha(1.f - last_event); + clr.setAlpha(1.f - last_event/pip_max_time); gGL.color4fv(clr.mV); gl_rect_2d(pip_x, top, pip_x + pip_width, bottom); } @@ -406,89 +409,113 @@ void LLGLTexMemBar::draw() S32 total_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sTotalTextureMemoryInBytes); S32 max_total_mem = LLViewerTexture::sMaxTotalTextureMemInMegaBytes; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; + F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ; + F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ; S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); S32 h_offset = (S32)((texture_bar_height + 2.5f) * mTextureView->mNumTextureBars + 2.5f); //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; - F32 text_color[] = {1.f, 1.f, 1.f, 0.75f}; + LLColor4 text_color(1.f, 1.f, 1.f, 0.75f); + LLColor4 color; std::string text; - text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Discard Bias: %.2f", + 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, bound_mem, max_bound_mem, - discard_bias); + LLImageRaw::sGlobalRawMemory >> 20, discard_bias, + cache_usage, cache_max_usage); + //, cache_entries, cache_max_entries LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, h_offset + line_height*3, - text_color, LLFontGL::LEFT, LLFontGL::TOP); + text_color, LLFontGL::LEFT, LLFontGL::TOP); //---------------------------------------------------------------------------- - S32 bar_left = 380; +#if 0 + S32 bar_left = 400; S32 bar_width = 200; S32 top = line_height*3 - 2 + h_offset; S32 bottom = top - 6; S32 left = bar_left; S32 right = left + bar_width; - - F32 bar_scale = (F32)bar_width / (max_bound_mem * 1.5f); + F32 bar_scale; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - - gGL.color4f(0.5f, 0.5f, 0.5f, 0.75f); - gl_rect_2d(left, top, right, bottom); - + // GL Mem Bar + left = bar_left; - right = left + llfloor(bound_mem * bar_scale); - if (bound_mem < llfloor(max_bound_mem * texmem_lower_bound_scale)) - { - gGL.color4f(0.f, 1.f, 0.f, 0.75f); - } - else if (bound_mem < max_bound_mem) - { - gGL.color4f(1.f, 1.f, 0.f, 0.75f); - } - else - { - gGL.color4f(1.f, 0.f, 0.f, 0.75f); - } + text = "GL"; + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left, line_height*3, + text_color, LLFontGL::LEFT, LLFontGL::TOP); + + left = bar_left+20; + right = left + bar_width; + + gGL.color4f(0.5f, 0.5f, 0.5f, 0.75f); // grey gl_rect_2d(left, top, right, bottom); bar_scale = (F32)bar_width / (max_total_mem * 1.5f); + right = left + llfloor(total_mem * bar_scale); + right = llclamp(right, bar_left, bar_left + bar_width); - top = bottom - 2; - bottom = top - 6; + color = (total_mem < llfloor(max_total_mem * texmem_lower_bound_scale)) ? LLColor4::green : + (total_mem < max_total_mem) ? LLColor4::yellow : LLColor4::red; + color[VALPHA] = .75f; + glColor4fv(color.mV); + + gl_rect_2d(left, top, right, bottom); // red/yellow/green + + // + bar_left += bar_width + bar_space; + //top = bottom - 2; bottom = top - 6; + + // Bound Mem Bar + left = bar_left; - right = left + llfloor(total_mem * bar_scale); - if (total_mem < llfloor(max_total_mem * texmem_lower_bound_scale)) - { - gGL.color4f(0.f, 1.f, 0.f, 0.75f); - } - else if (total_mem < max_total_mem) - { - gGL.color4f(1.f, 1.f, 0.f, 0.75f); - } - else - { - gGL.color4f(1.f, 0.f, 0.f, 0.75f); - } + text = "GL"; + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left, line_height*3, + text_color, LLFontGL::LEFT, LLFontGL::TOP); + left = bar_left + 20; + right = left + bar_width; + + gGL.color4f(0.5f, 0.5f, 0.5f, 0.75f); gl_rect_2d(left, top, right, bottom); + color = (bound_mem < llfloor(max_bound_mem * texmem_lower_bound_scale)) ? LLColor4::green : + (bound_mem < max_bound_mem) ? LLColor4::yellow : LLColor4::red; + color[VALPHA] = .75f; + glColor4fv(color.mV); + + gl_rect_2d(left, top, right, bottom); +#else + S32 left = 0 ; +#endif //---------------------------------------------------------------------------- - text = llformat("Textures: Count: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d(%d) RAW:%d mRaw:%d mAux:%d CB:%d", + text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d RAW:%d HTP:%d", gTextureList.getNumImages(), LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(), LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount, LLAppViewer::getTextureCache()->getNumReads(), LLAppViewer::getTextureCache()->getNumWrites(), LLLFSThread::sLocal->getPending(), - LLImageWorker::sCount, LLImageWorker::getWorkerThread()->getNumDeletes(), - LLImageRaw::sRawImageCount, LLViewerFetchedTexture::sRawCount, LLViewerFetchedTexture::sAuxCount, - gTextureList.mCallbackList.size()); + LLAppViewer::getImageDecodeThread()->getPending(), + LLImageRaw::sRawImageCount, + LLAppViewer::getTextureFetch()->getNumHTTPRequests()); LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, h_offset + line_height*2, text_color, LLFontGL::LEFT, LLFontGL::TOP); + + + left = 550; + F32 bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); + F32 max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); + color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color; + color[VALPHA] = text_color[VALPHA]; + text = llformat("BW:%.0f/%.0f",bandwidth, max_bandwidth); + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left, line_height*2, + color, LLFontGL::LEFT, LLFontGL::TOP); S32 dx1 = 0; if (LLAppViewer::getTextureFetch()->mDebugPause) @@ -555,7 +582,7 @@ public: void setTop(S32 loaded, S32 bound, F32 scale) {mTopLoaded = loaded ; mTopBound = bound; mScale = scale ;} void draw(); - BOOL handleHover(S32 x, S32 y, MASK mask) ; + BOOL handleHover(S32 x, S32 y, MASK mask, BOOL set_pick_size) ; private: S32 mIndex ; @@ -568,19 +595,16 @@ private: F32 mScale ; }; -BOOL LLGLTexSizeBar::handleHover(S32 x, S32 y, MASK mask) +BOOL LLGLTexSizeBar::handleHover(S32 x, S32 y, MASK mask, BOOL set_pick_size) { -#if !LL_RELEASE_FOR_DOWNLOAD if(y > mBottom && (y < mBottom + (S32)(mTopLoaded * mScale) || y < mBottom + (S32)(mTopBound * mScale))) { - LLImageGL::setCurTexSizebar(mIndex); + LLImageGL::setCurTexSizebar(mIndex, set_pick_size); } -#endif return TRUE ; } void LLGLTexSizeBar::draw() { -#if !LL_RELEASE_FOR_DOWNLOAD LLGLSUIDefault gls_ui; if(LLImageGL::sCurTexSizeBar == mIndex) @@ -601,7 +625,6 @@ void LLGLTexSizeBar::draw() F32 bound_color[] = {1.0f, 1.0f, 0.0f, 0.75f}; gl_rect_2d(mLeft, mBottom + (S32)(mTopLoaded * mScale), (mLeft + mRight) / 2, mBottom, loaded_color) ; gl_rect_2d((mLeft + mRight) / 2, mBottom + (S32)(mTopBound * mScale), mRight, mBottom, bound_color) ; -#endif } //////////////////////////////////////////////////////////////////////////// @@ -675,7 +698,13 @@ void LLTextureView::draw() << "\t" << cur_discard << llendl; } - + + if (imagep->getID() == LLAppViewer::getTextureFetch()->mDebugID) + { + static S32 debug_count = 0; + ++debug_count; // for breakpoints + } + #if 0 if (imagep->getDontDiscard()) { @@ -889,8 +918,7 @@ BOOL LLTextureView::handleKey(KEY key, MASK mask, BOOL called_from_parent) } //----------------------------------------------------------------- -LLTextureSizeView::LLTextureSizeView(const LLTextureSizeView::Params& p) - : LLView(p) +LLTextureSizeView::LLTextureSizeView(const LLTextureSizeView::Params& p) : LLContainerView(p) { setVisible(FALSE) ; @@ -910,7 +938,31 @@ LLTextureSizeView::~LLTextureSizeView() } void LLTextureSizeView::draw() { -#if !LL_RELEASE_FOR_DOWNLOAD + if(mType == TEXTURE_MEM_OVER_SIZE) + { + drawTextureSizeGraph(); + } + else + { + drawTextureCategoryGraph() ; + } + + LLView::draw(); +} + +BOOL LLTextureSizeView::handleHover(S32 x, S32 y, MASK mask) +{ + if(x > mTextureSizeBarRect.mLeft && x < mTextureSizeBarRect.mRight) + { + mTextureSizeBar[(x - mTextureSizeBarRect.mLeft) / mTextureSizeBarWidth]->handleHover(x, y, mask, (mType == TEXTURE_MEM_OVER_SIZE)) ; + } + + return TRUE ; +} + +//draw real-time texture mem bar over size +void LLTextureSizeView::drawTextureSizeGraph() +{ if(mTextureSizeBar.size() == 0) { S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); @@ -931,29 +983,16 @@ void LLTextureSizeView::draw() mTextureSizeBar[i]->draw() ; } LLImageGL::resetCurTexSizebar(); - - LLView::draw(); -#endif -} - -BOOL LLTextureSizeView::handleHover(S32 x, S32 y, MASK mask) -{ - if(x > mTextureSizeBarRect.mLeft && x < mTextureSizeBarRect.mRight) - { - mTextureSizeBar[(x - mTextureSizeBarRect.mLeft) / mTextureSizeBarWidth]->handleHover(x, y, mask) ; - } - - return TRUE ; } //draw background of texture size bar graph F32 LLTextureSizeView::drawTextureSizeDistributionGraph() { + //scale F32 scale = 1.0f ; -#if !LL_RELEASE_FOR_DOWNLOAD + LLGLSUIDefault gls_ui; - //scale { S32 count = 0 ; for(U32 i = 0 ; i < LLImageGL::sTextureLoadedCounter.size() ; i++) @@ -1043,8 +1082,137 @@ F32 LLTextureSizeView::drawTextureSizeDistributionGraph() text = llformat("Texture Size Distribution") ; LLFontGL::getFontMonospace()->renderUTF8(text, 0, left + 250, top + line_height * 3, text_color, LLFontGL::LEFT, LLFontGL::TOP); - -#endif return scale ; } +//draw real-time texture mem bar over category +void LLTextureSizeView::drawTextureCategoryGraph() +{ + if(mTextureSizeBar.size() == 0) + { + S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + mTextureSizeBar.resize(LLViewerTexture::getTotalNumOfCategories()) ; + mTextureSizeBarRect.set(700, line_height * 2 + 400, 700 + mTextureSizeBar.size() * mTextureSizeBarWidth, line_height * 2) ; + + for(U32 i = 0 ; i < mTextureSizeBar.size() ; i++) + { + mTextureSizeBar[i] = new LLGLTexSizeBar(i, mTextureSizeBarRect.mLeft + i * mTextureSizeBarWidth , + line_height * 2, mTextureSizeBarRect.mLeft + (i + 1) * mTextureSizeBarWidth, line_height) ; + } + } + + F32 size_bar_scale = drawTextureCategoryDistributionGraph() ; + for(U32 i = 0 ; i < mTextureSizeBar.size() ; i++) + { + U32 k = LLViewerTexture::getIndexFromCategory(i) ; + mTextureSizeBar[i]->setTop(LLImageGL::sTextureMemByCategory[k] >> 20, LLImageGL::sTextureMemByCategoryBound[k] >> 20, size_bar_scale) ; + mTextureSizeBar[i]->draw() ; + } + LLImageGL::resetCurTexSizebar(); +} + +//draw background for TEXTURE_MEM_OVER_CATEGORY +F32 LLTextureSizeView::drawTextureCategoryDistributionGraph() +{ + //scale + F32 scale = 4.0f ; + + LLGLSUIDefault gls_ui; + + { + S32 count = 0 ; + for(U32 i = 0 ; i < LLImageGL::sTextureMemByCategory.size() ; i++) + { + S32 tmp = LLImageGL::sTextureMemByCategory[i] >> 20 ; + if(tmp > count) + { + count = tmp ; + } + } + if(count > mTextureSizeBarRect.getHeight() * 0.25f) + { + scale = (F32)mTextureSizeBarRect.getHeight() * 0.25f / count ; + } + } + + S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + S32 left = mTextureSizeBarRect.mLeft ; + S32 bottom = mTextureSizeBarRect.mBottom ; + S32 right = mTextureSizeBarRect.mRight ; + S32 top = mTextureSizeBarRect.mTop ; + + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + + //background rect + gl_rect_2d(left - 25, top + 30, right + 100, bottom - 25, LLColor4(0.0f, 0.0f, 0.0f, 0.25f)) ; + + //-------------------------------------------------- + gGL.color4f(1.0f, 0.5f, 0.5f, 0.75f); + gl_line_2d(left, bottom, right, bottom) ; //x axis + gl_line_2d(left, bottom, left, top) ; //y axis + + //ruler + //-------------------------------------------------- + gGL.color4f(1.0f, 0.5f, 0.5f, 0.5f); + for(S32 i = bottom + 50 ; i <= top ; i += 50) + { + gl_line_2d(left, i, right, i) ; + } + + //texts + //-------------------------------------------------- + F32 text_color[] = {1.f, 1.f, 1.f, 0.75f}; + std::string text; + + //------- + //x axis: size label + static char category[LLViewerTexture::MAX_GL_IMAGE_CATEGORY][4] = + {"Non", "Bak", "Av", "Cld", "Scp", "Hi", "Trn", "Slt", "Hud", "Bsf", "UI", "Pvw", "Map", "Mvs", "Slf", "Loc", "Scr", "Dyn", "Mdi", "ALT", "Oth" } ; + + text = llformat("%s", category[0]) ; + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left + 12, bottom - line_height / 2, + text_color, LLFontGL::LEFT, LLFontGL::TOP); + for(U32 i = 1 ; i < mTextureSizeBar.size() ; i++) + { + text = llformat("%s", category[i]) ; + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left + i * mTextureSizeBarWidth + 12, bottom - line_height / 2, + text_color, LLFontGL::LEFT, LLFontGL::TOP); + } + //------- + + //y axis: number label + for(S32 i = bottom + 50 ; i <= top ; i += 50) + { + text = llformat("%d", (S32)((i - bottom) / scale)) ; + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left - 20, i + line_height / 2 , + text_color, LLFontGL::LEFT, LLFontGL::TOP); + LLFontGL::getFontMonospace()->renderUTF8(text, 0, right + 5, i + line_height / 2 , + text_color, LLFontGL::LEFT, LLFontGL::TOP); + } + + text = llformat("MB") ; + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left - 20, top + line_height * 2 , + text_color, LLFontGL::LEFT, LLFontGL::TOP); + //-------------------------------------------------- + F32 loaded_color[] = {1.0f, 0.0f, 0.0f, 0.75f}; + gl_rect_2d(left + 70, top + line_height * 2, left + 90, top + line_height, loaded_color) ; + text = llformat("Loaded") ; + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left + 100, top + line_height * 2, + loaded_color, + LLFontGL::LEFT, LLFontGL::TOP); + + F32 bound_color[] = {1.0f, 1.0f, 0.0f, 0.75f}; + gl_rect_2d(left + 170, top + line_height * 2, left + 190, top + line_height, bound_color) ; + text = llformat("Bound") ; + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left + 200, top + line_height * 2, + bound_color, LLFontGL::LEFT, LLFontGL::TOP); + + //-------------------------------------------------- + + //title + text = llformat("Texture Category Distribution") ; + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left + 250, top + line_height * 3, + text_color, LLFontGL::LEFT, LLFontGL::TOP); + + return scale ; +} diff --git a/indra/newview/lltextureview.h b/indra/newview/lltextureview.h index e917c0235e..435a55df83 100644 --- a/indra/newview/lltextureview.h +++ b/indra/newview/lltextureview.h @@ -79,24 +79,41 @@ public: }; class LLGLTexSizeBar; - -class LLTextureSizeView : public LLView +class LLTextureSizeView : public LLContainerView { -public: +protected: LLTextureSizeView(const Params&); + friend class LLUICtrlFactory; +public: ~LLTextureSizeView(); /*virtual*/ void draw(); /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask) ; + void setType(S32 type) {mType = type ;} + enum + { + TEXTURE_MEM_OVER_SIZE, + TEXTURE_MEM_OVER_CATEGORY + }; private: + //draw background for TEXTURE_MEM_OVER_SIZE F32 drawTextureSizeDistributionGraph() ; - + //draw real-time texture mem bar over size + void drawTextureSizeGraph(); + + //draw background for TEXTURE_MEM_OVER_CATEGORY + F32 drawTextureCategoryDistributionGraph() ; + //draw real-time texture mem bar over category + void drawTextureCategoryGraph(); + private: std::vector<LLGLTexSizeBar*> mTextureSizeBar ; LLRect mTextureSizeBarRect ; - S32 mTextureSizeBarWidth ; + S32 mTextureSizeBarWidth ; + S32 mType ; }; extern LLTextureView *gTextureView; extern LLTextureSizeView *gTextureSizeView; +extern LLTextureSizeView *gTextureCategoryView; #endif // LL_TEXTURE_VIEW_H diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index e4a3f8603b..beb31bc833 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -30,6 +30,9 @@ * $/LicenseInfo$ */ +// *NOTE: this module is a copy-paste of llui/llalertdialog.h +// Can we re-implement this as a subclass of LLAlertDialog and +// avoid all this code duplication? It already caused EXT-2232. #include "llviewerprecompiledheaders.h" // must be first include @@ -56,7 +59,7 @@ const F32 DEFAULT_BUTTON_DELAY = 0.5f; const S32 MSG_PAD = 8; /*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL; -/*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader; +/*static*/ LLAlertURLLoader* LLToastAlertPanel::sURLLoader; //----------------------------------------------------------------------------- // Private methods diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h index af0c9a9ddd..840143a2a9 100644 --- a/indra/newview/lltoastalertpanel.h +++ b/indra/newview/lltoastalertpanel.h @@ -30,6 +30,10 @@ * $/LicenseInfo$ */ +// *NOTE: this module is a copy-paste of llui/llalertdialog.h +// Can we re-implement this as a subclass of LLAlertDialog and +// avoid all this code duplication? It already caused EXT-2232. + #ifndef LL_TOASTALERTPANEL_H #define LL_TOASTALERTPANEL_H @@ -37,6 +41,7 @@ #include "llfloater.h" #include "llui.h" #include "llnotifications.h" +#include "llalertdialog.h" class LLButton; class LLCheckBoxCtrl; @@ -57,14 +62,7 @@ class LLToastAlertPanel public: typedef bool (*display_callback_t)(S32 modal); - class URLLoader - { - public: - virtual void load(const std::string& url, bool force_open_externally = 0 ) = 0; - virtual ~URLLoader() {} - }; - - static void setURLLoader(URLLoader* loader) + static void setURLLoader(LLAlertURLLoader* loader) { sURLLoader = loader; } @@ -97,7 +95,7 @@ private: BOOL hasTitleBar() const; private: - static URLLoader* sURLLoader; + static LLAlertURLLoader* sURLLoader; static LLControlGroup* sSettings; struct ButtonData diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index e78737fe0d..f82573f46c 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -220,7 +220,6 @@ bool LLToastGroupNotifyPanel::isAttachmentOpenable(LLAssetType::EType type) switch(type) { case LLAssetType::AT_LANDMARK: - case LLAssetType::AT_FAVORITE: case LLAssetType::AT_NOTECARD: case LLAssetType::AT_IMAGE_JPEG: case LLAssetType::AT_IMAGE_TGA: diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 9a63f07a7e..959cb3f182 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -92,7 +92,7 @@ public: virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) { - if(cat && (cat->getPreferredType() == LLAssetType::AT_NONE)) + if(cat && (cat->getPreferredType() == LLFolderType::FT_NONE)) { return true; } @@ -109,7 +109,7 @@ public: LLInventoryItem* item) { if(item) return true; - if(cat && (cat->getPreferredType() == LLAssetType::AT_NONE)) + if(cat && (cat->getPreferredType() == LLFolderType::FT_NONE)) { return true; } @@ -1317,8 +1317,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, // Check if it's in the trash. bool is_in_trash = false; - LLUUID trash_id; - trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { is_in_trash = true; @@ -2088,7 +2087,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( if(!item || !item->isComplete()) return ACCEPT_NO; // must not be in the trash - LLUUID trash_id(gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH)); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if( gInventory.isObjectDescendentOf( item->getUUID(), trash_id ) ) { return ACCEPT_NO; @@ -2170,8 +2169,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( } // Check if it's in the trash. - LLUUID trash_id; - trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { accept = ACCEPT_YES_SINGLE; @@ -2249,8 +2247,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( } // Check if it's in the trash. - LLUUID trash_id; - trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { accept = ACCEPT_YES_SINGLE; @@ -2388,7 +2385,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( if(mSource == SOURCE_AGENT || mSource == SOURCE_LIBRARY) { // it's in the agent inventory - LLUUID trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if( gInventory.isObjectDescendentOf( item->getUUID(), trash_id ) ) { return ACCEPT_NO; @@ -2443,7 +2440,7 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture( if(mSource == SOURCE_AGENT || mSource == SOURCE_LIBRARY) { // it's in the agent inventory - LLUUID trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if( gInventory.isObjectDescendentOf( item->getUUID(), trash_id ) ) { return ACCEPT_NO; @@ -2502,7 +2499,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( if(mSource == SOURCE_AGENT) { - LLUUID trash_id(gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH)); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if( gInventory.isObjectDescendentOf( category->getUUID(), trash_id ) ) { return ACCEPT_NO; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 0a9e72506b..93da32b115 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -494,6 +494,8 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) } else if (handleMediaHover(mHoverPick)) { + // *NOTE: If you think the hover glow conflicts with the media outline, you + // could disable it here. show_highlight = true; // cursor set by media object lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl; @@ -761,14 +763,14 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) { is_time_based_media = true; is_web_based_media = false; - args["[CurrentURL]"] = media_impl->getMediaURL(); + //args["[CurrentURL]"] = media_impl->getMediaURL(); is_media_playing = media_impl->isMediaPlaying(); } else { is_time_based_media = false; is_web_based_media = true; - args["[CurrentURL]"] = media_plugin->getLocation(); + //args["[CurrentURL]"] = media_plugin->getLocation(); } //tooltip_msg.append(LLTrans::getString("CurrentURL", args)); } @@ -1039,31 +1041,28 @@ void LLToolPie::playCurrentMedia(const LLPickInfo& info) if(!mep) return; + //TODO: Can you Use it? + LLPluginClassMedia* media_plugin = NULL; -// if (gSavedSettings.getBOOL("MediaOnAPrimUI")) -// { - viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); + viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); - if(media_impl.notNull() && media_impl->hasMedia()) + if(media_impl.notNull() && media_impl->hasMedia()) + { + media_plugin = media_impl->getMediaPlugin(); + if (media_plugin && media_plugin->pluginSupportsMediaTime()) { - media_plugin = media_impl->getMediaPlugin(); - - if (media_plugin && media_plugin->pluginSupportsMediaTime()) + if(media_impl->isMediaPlaying()) { - if(media_impl->isMediaPlaying()) - { - media_impl->pause(); - } - else //if(media_impl->isMediaPaused()) - { - media_impl->play(); - } - + media_impl->pause(); + } + else + { + media_impl->play(); } - } -// } + } + } @@ -1094,6 +1093,8 @@ void LLToolPie::VisitHomePage(const LLPickInfo& info) if(!mep) return; + //TODO: Can you Use it? + LLPluginClassMedia* media_plugin = NULL; viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index 5929ecd928..1a61717658 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -416,10 +416,10 @@ F32 pulse_func(F32 t, F32 z) return 0.f; } - t *= 3.14159f; + t *= F_PI; z -= t*64.f - 256.f; - F32 a = cosf(z*3.14159/512.f)*10.0f; + F32 a = cosf(z*F_PI/512.f)*10.0f; a = llmax(a, 9.9f); a -= 9.9f; a *= 10.f; @@ -433,7 +433,7 @@ void draw_shockwave(F32 center_z, F32 t, S32 steps, LLColor4 color) return; } - t *= 0.6284f/3.14159f; + t *= 0.6284f/F_PI; t -= (F32) (S32) t; diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 841902f683..a3daca6fa4 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -46,7 +46,7 @@ #include "llstartup.h" // gStartupState #include "llurlsimstring.h" #include "llweb.h" -#include "llworldmap.h" +#include "llworldmapmessage.h" // library includes #include "llsd.h" @@ -201,7 +201,7 @@ bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mous //if(url_displayp) url_displayp->setName(region_name); // Request a region handle by name - LLWorldMap::getInstance()->sendNamedRegionRequest(region_name, + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, LLURLDispatcherImpl::regionNameCallback, url, false); // don't teleport @@ -240,7 +240,7 @@ void LLURLDispatcherImpl::regionNameCallback(U64 region_handle, const std::strin LLVector3d global_pos = from_region_handle(region_handle) + LLVector3d(local_pos); U64 new_region_handle = to_region_handle(global_pos); - LLWorldMap::getInstance()->sendHandleRegionRequest(new_region_handle, + LLWorldMapMessage::getInstance()->sendHandleRegionRequest(new_region_handle, LLURLDispatcherImpl::regionHandleCallback, url, teleport); } @@ -335,7 +335,7 @@ public: { url += tokens[i].asString() + "/"; } - LLWorldMap::getInstance()->sendNamedRegionRequest(region_name, + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, LLURLDispatcherImpl::regionHandleCallback, url, true); // teleport diff --git a/indra/newview/llviewerassettype.cpp b/indra/newview/llviewerassettype.cpp new file mode 100644 index 0000000000..c974171c2c --- /dev/null +++ b/indra/newview/llviewerassettype.cpp @@ -0,0 +1,114 @@ +/** + * @file llassettype.cpp + * @brief Implementatino of LLViewerAssetType functionality. + * + * $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 "llviewerassettype.h" +#include "lldictionary.h" +#include "llmemory.h" +#include "llsingleton.h" + +static const std::string empty_string; + +struct ViewerAssetEntry : public LLDictionaryEntry +{ + ViewerAssetEntry(EDragAndDropType dad_type // drag and drop type + ) + : + LLDictionaryEntry(empty_string), // no reverse lookup needed for now, so just leave this blank + mDadType(dad_type) + { + } + EDragAndDropType mDadType; +}; + +class LLViewerAssetDictionary : public LLSingleton<LLViewerAssetDictionary>, + public LLDictionary<LLViewerAssetType::EType, ViewerAssetEntry> +{ +public: + LLViewerAssetDictionary(); +}; + +LLViewerAssetDictionary::LLViewerAssetDictionary() +{ + // DRAG&DROP TYPE + // |--------------------| + addEntry(LLViewerAssetType::AT_TEXTURE, new ViewerAssetEntry(DAD_TEXTURE)); + addEntry(LLViewerAssetType::AT_SOUND, new ViewerAssetEntry(DAD_SOUND)); + addEntry(LLViewerAssetType::AT_CALLINGCARD, new ViewerAssetEntry(DAD_CALLINGCARD)); + addEntry(LLViewerAssetType::AT_LANDMARK, new ViewerAssetEntry(DAD_LANDMARK)); + addEntry(LLViewerAssetType::AT_SCRIPT, new ViewerAssetEntry(DAD_NONE)); + addEntry(LLViewerAssetType::AT_CLOTHING, new ViewerAssetEntry(DAD_CLOTHING)); + addEntry(LLViewerAssetType::AT_OBJECT, new ViewerAssetEntry(DAD_OBJECT)); + addEntry(LLViewerAssetType::AT_NOTECARD, new ViewerAssetEntry(DAD_NOTECARD)); + addEntry(LLViewerAssetType::AT_CATEGORY, new ViewerAssetEntry(DAD_CATEGORY)); + addEntry(LLViewerAssetType::AT_ROOT_CATEGORY, new ViewerAssetEntry(DAD_ROOT_CATEGORY)); + addEntry(LLViewerAssetType::AT_LSL_TEXT, new ViewerAssetEntry(DAD_SCRIPT)); + addEntry(LLViewerAssetType::AT_LSL_BYTECODE, new ViewerAssetEntry(DAD_NONE)); + addEntry(LLViewerAssetType::AT_TEXTURE_TGA, new ViewerAssetEntry(DAD_NONE)); + addEntry(LLViewerAssetType::AT_BODYPART, new ViewerAssetEntry(DAD_BODYPART)); + addEntry(LLViewerAssetType::AT_SOUND_WAV, new ViewerAssetEntry(DAD_NONE)); + addEntry(LLViewerAssetType::AT_IMAGE_TGA, new ViewerAssetEntry(DAD_NONE)); + addEntry(LLViewerAssetType::AT_IMAGE_JPEG, new ViewerAssetEntry(DAD_NONE)); + addEntry(LLViewerAssetType::AT_ANIMATION, new ViewerAssetEntry(DAD_ANIMATION)); + addEntry(LLViewerAssetType::AT_GESTURE, new ViewerAssetEntry(DAD_GESTURE)); + addEntry(LLViewerAssetType::AT_SIMSTATE, new ViewerAssetEntry(DAD_NONE)); + + addEntry(LLViewerAssetType::AT_LINK, new ViewerAssetEntry(DAD_LINK)); + addEntry(LLViewerAssetType::AT_LINK_FOLDER, new ViewerAssetEntry(DAD_LINK)); + + addEntry(LLViewerAssetType::AT_NONE, new ViewerAssetEntry(DAD_NONE)); +}; + +EDragAndDropType LLViewerAssetType::lookupDragAndDropType(EType asset_type) +{ + const LLViewerAssetDictionary *dict = LLViewerAssetDictionary::getInstance(); + const ViewerAssetEntry *entry = dict->lookup(asset_type); + if (entry) + return entry->mDadType; + else + return DAD_NONE; +} + +// Generate a good default description +void LLViewerAssetType::generateDescriptionFor(LLViewerAssetType::EType asset_type, + std::string& description) +{ + const S32 BUF_SIZE = 30; + char time_str[BUF_SIZE]; /* Flawfinder: ignore */ + time_t now; + time(&now); + memset(time_str, '\0', BUF_SIZE); + strftime(time_str, BUF_SIZE - 1, "%Y-%m-%d %H:%M:%S ", localtime(&now)); + description.assign(time_str); + description.append(LLAssetType::lookupHumanReadable(asset_type)); +} diff --git a/indra/newview/llviewerassettype.h b/indra/newview/llviewerassettype.h new file mode 100644 index 0000000000..01158885ce --- /dev/null +++ b/indra/newview/llviewerassettype.h @@ -0,0 +1,54 @@ +/** + * @file llviewerassettype.h + * @brief Declaration of LLViewerViewerAssetType. + * + * $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_LLVIEWERASSETTYPE_H +#define LL_LLVIEWERASSETTYPE_H + +#include <string> +#include "llassettype.h" + +// This class is similar to llassettype, but contains methods +// only used by the viewer. +class LLViewerAssetType : public LLAssetType +{ +public: + // Generate a good default description. You may want to add a verb + // or agent name after this depending on your application. + static void generateDescriptionFor(LLViewerAssetType::EType asset_type, + std::string& description); + static EDragAndDropType lookupDragAndDropType(EType asset_type); +protected: + LLViewerAssetType() {} + ~LLViewerAssetType() {} +}; + +#endif // LL_LLVIEWERASSETTYPE_H diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index f65baea6ca..b5709fa102 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -109,10 +109,13 @@ LLViewerCamera::LLViewerCamera() : LLCamera() { calcProjection(getFar()); mCameraFOVDefault = DEFAULT_FIELD_OF_VIEW; + mCosHalfCameraFOV = cosf(mCameraFOVDefault * 0.5f); mPixelMeterRatio = 0.f; mScreenPixelArea = 0; mZoomFactor = 1.f; mZoomSubregion = 1; + mAverageSpeed = 0.f; + mAverageAngularSpeed = 0.f; gSavedSettings.getControl("CameraAngle")->getCommitSignal()->connect(boost::bind(&LLViewerCamera::updateCameraAngle, this, _2)); } @@ -151,15 +154,22 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 ¢er, setOriginAndLookAt(origin, up_direction, point_of_interest); - F32 dpos = (center - last_position).magVec(); + mVelocityDir = center - last_position ; + F32 dpos = mVelocityDir.normVec() ; LLQuaternion rotation; rotation.shortestArc(last_axis, getAtAxis()); F32 x, y, z; F32 drot; rotation.getAngleAxis(&drot, &x, &y, &z); + mVelocityStat.addValue(dpos); mAngularVelocityStat.addValue(drot); + + mAverageSpeed = mVelocityStat.getMeanPerSec() ; + mAverageAngularSpeed = mAngularVelocityStat.getMeanPerSec() ; + mCosHalfCameraFOV = cosf(0.5f * getView() * llmax(1.0f, getAspect())); + // update pixel meter ratio using default fov, not modified one mPixelMeterRatio = getViewHeightInPixels()/ (2.f*tanf(mCameraFOVDefault*0.5)); // update screen pixel area @@ -818,10 +828,12 @@ BOOL LLViewerCamera::areVertsVisible(LLViewerObject* volumep, BOOL all_verts) LLCamera::setView(vertical_fov_rads); // call base implementation } -void LLViewerCamera::setDefaultFOV(F32 vertical_fov_rads) { +void LLViewerCamera::setDefaultFOV(F32 vertical_fov_rads) +{ vertical_fov_rads = llclamp(vertical_fov_rads, getMinView(), getMaxView()); setView(vertical_fov_rads); mCameraFOVDefault = vertical_fov_rads; + mCosHalfCameraFOV = cosf(mCameraFOVDefault * 0.5f); } diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h index 90b77f771f..2b8a0892bf 100644 --- a/indra/newview/llviewercamera.h +++ b/indra/newview/llviewercamera.h @@ -91,17 +91,20 @@ public: BOOL projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const BOOL clamp = TRUE) const; BOOL projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const; - + const LLVector3* getVelocityDir() const {return &mVelocityDir;} LLStat *getVelocityStat() { return &mVelocityStat; } LLStat *getAngularVelocityStat() { return &mAngularVelocityStat; } + F32 getCosHalfFov() {return mCosHalfCameraFOV;} + F32 getAverageSpeed() {return mAverageSpeed ;} + F32 getAverageAngularSpeed() {return mAverageAngularSpeed;} void getPixelVectors(const LLVector3 &pos_agent, LLVector3 &up, LLVector3 &right); LLVector3 roundToPixel(const LLVector3 &pos_agent); // Sets the current matrix /* virtual */ void setView(F32 vertical_fov_rads); - // Sets the current matrix AND remembers result as default view - void setDefaultFOV(F32 vertical_fov_rads); + + void setDefaultFOV(F32 fov) ; F32 getDefaultFOV() { return mCameraFOVDefault; } BOOL cameraUnderWater() const; @@ -120,9 +123,14 @@ protected: LLStat mVelocityStat; LLStat mAngularVelocityStat; + LLVector3 mVelocityDir ; + F32 mAverageSpeed ; + F32 mAverageAngularSpeed ; + mutable LLMatrix4 mProjectionMatrix; // Cache of perspective matrix mutable LLMatrix4 mModelviewMatrix; F32 mCameraFOVDefault; + F32 mCosHalfCameraFOV; LLVector3 mLastPointOfInterest; F32 mPixelMeterRatio; // Divide by distance from camera to get pixels per meter at that distance. S32 mScreenPixelArea; // Pixel area of entire window diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 35226a1632..5e23a7e114 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -90,7 +90,7 @@ std::string gCurrentVersion; extern BOOL gResizeScreenTexture; extern BOOL gDebugGL; - +extern BOOL gAuditTexture; //////////////////////////////////////////////////////////////////////////// // Listeners @@ -378,6 +378,12 @@ static bool handleRenderUseImpostorsChanged(const LLSD& newvalue) return true; } +static bool handleAuditTextureChanged(const LLSD& newvalue) +{ + gAuditTexture = newvalue.asBoolean(); + return true; +} + static bool handleRenderDebugGLChanged(const LLSD& newvalue) { gDebugGL = newvalue.asBoolean() || gDebugSession; @@ -587,6 +593,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderDeferredShadow")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderDeferredGI")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _2)); + gSavedSettings.getControl("AuditTexture")->getSignal()->connect(boost::bind(&handleAuditTextureChanged, _2)); gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&handleChatFontSizeChanged, _2)); gSavedSettings.getControl("ChatPersistTime")->getSignal()->connect(boost::bind(&handleChatPersistTimeChanged, _2)); gSavedSettings.getControl("ConsoleMaxLines")->getSignal()->connect(boost::bind(&handleConsoleMaxLinesChanged, _2)); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index a6a72e9666..e0bb8fedeb 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -712,7 +712,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first. - const F32 max_image_decode_time = llmin(0.005f, 0.005f*10.f*gFrameIntervalSeconds); // 50 ms/second decode time (no more than 5ms/frame) + F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds; // 50 ms/second decode time + max_image_decode_time = llclamp(max_image_decode_time, 0.001f, 0.005f ); // min 1ms/frame, max 5ms/frame) gTextureList.updateImages(max_image_decode_time); //remove dead textures from GL diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp new file mode 100644 index 0000000000..384538364f --- /dev/null +++ b/indra/newview/llviewerfoldertype.cpp @@ -0,0 +1,263 @@ +/** + * @file llfoldertype.cpp + * @brief Implementation of LLViewerFolderType functionality. + * + * $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 "llviewerfoldertype.h" +#include "lldictionary.h" +#include "llmemory.h" +#include "llvisualparam.h" + +static const std::string empty_string; + +struct ViewerFolderEntry : public LLDictionaryEntry +{ + // Constructor for non-ensembles + ViewerFolderEntry(const std::string &new_category_name, // default name when creating a new category of this type + const std::string &icon_name // name of the folder icon + ) + : + LLDictionaryEntry(empty_string), // no reverse lookup needed on non-ensembles, so just leave this blank + mIconName(icon_name), + mNewCategoryName(new_category_name) + { + mAllowedNames.clear(); + } + + // Constructor for ensembles + ViewerFolderEntry(const std::string &xui_name, // name of the xui menu item + const std::string &new_category_name, // default name when creating a new category of this type + const std::string &icon_name, // name of the folder icon + const std::string allowed_names // allowed item typenames for this folder type + ) + : + LLDictionaryEntry(xui_name), + mIconName(icon_name), + mNewCategoryName(new_category_name) + { + const std::string delims (","); + LLStringUtilBase<char>::getTokens(allowed_names, mAllowedNames, delims); + } + + bool getIsAllowedName(const std::string &name) const + { + if (mAllowedNames.empty()) + return false; + for (name_vec_t::const_iterator iter = mAllowedNames.begin(); + iter != mAllowedNames.end(); + iter++) + { + if (name == (*iter)) + return true; + } + return false; + } + const std::string mIconName; + const std::string mNewCategoryName; + typedef std::vector<std::string> name_vec_t; + name_vec_t mAllowedNames; +}; + +class LLViewerFolderDictionary : public LLSingleton<LLViewerFolderDictionary>, + public LLDictionary<LLFolderType::EType, ViewerFolderEntry> +{ +public: + LLViewerFolderDictionary(); +protected: + bool initEnsemblesFromFile(); // Reads in ensemble information from foldertypes.xml +}; + +LLViewerFolderDictionary::LLViewerFolderDictionary() +{ + initEnsemblesFromFile(); + + // NEW CATEGORY NAME FOLDER ICON NAME + // |-------------------------|---------------------------| + addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "inv_folder_texture.tga")); + addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "inv_folder_sound.tga")); + addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "inv_folder_callingcard.tga")); + addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "inv_folder_landmark.tga")); + addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "inv_folder_clothing.tga")); + addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "inv_folder_object.tga")); + addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "inv_folder_notecard.tga")); + addEntry(LLFolderType::FT_CATEGORY, new ViewerFolderEntry("New Folder", "inv_folder_plain_closed.tga")); + addEntry(LLFolderType::FT_ROOT_CATEGORY, new ViewerFolderEntry("Inventory", "")); + addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "inv_folder_script.tga")); + addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "inv_folder_bodypart.tga")); + addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "inv_folder_trash.tga")); + addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "inv_folder_snapshot.tga")); + addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "inv_folder_lostandfound.tga")); + addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "inv_folder_animation.tga")); + addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "inv_folder_gesture.tga")); + addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorite", "inv_folder_plain_closed.tga")); + + addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "inv_folder_current_outfit.tga")); + addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "inv_folder_outfit.tga")); + addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "inv_folder_my_outfits.tga")); + addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "inv_folder_inbox.tga")); + + addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "inv_folder_plain_closed.tga")); +} + +bool LLViewerFolderDictionary::initEnsemblesFromFile() +{ + std::string xml_filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"foldertypes.xml"); + LLXmlTree folder_def; + if (!folder_def.parseFile(xml_filename)) + { + llerrs << "Failed to parse folders file " << xml_filename << llendl; + return false; + } + + LLXmlTreeNode* rootp = folder_def.getRoot(); + for (LLXmlTreeNode* ensemble = rootp->getFirstChild(); + ensemble; + ensemble = rootp->getNextChild()) + { + if (!ensemble->hasName("ensemble")) + { + llwarns << "Invalid ensemble definition node " << ensemble->getName() << llendl; + continue; + } + + S32 ensemble_type; + static LLStdStringHandle ensemble_num_string = LLXmlTree::addAttributeString("foldertype_num"); + if (!ensemble->getFastAttributeS32(ensemble_num_string, ensemble_type)) + { + llwarns << "No ensemble type defined" << llendl; + continue; + } + + + if (ensemble_type < S32(LLFolderType::FT_ENSEMBLE_START) || ensemble_type > S32(LLFolderType::FT_ENSEMBLE_END)) + { + llwarns << "Exceeded maximum ensemble index" << LLFolderType::FT_ENSEMBLE_END << llendl; + break; + } + + std::string xui_name; + static LLStdStringHandle xui_name_string = LLXmlTree::addAttributeString("xui_name"); + if (!ensemble->getFastAttributeString(xui_name_string, xui_name)) + { + llwarns << "No xui name defined" << llendl; + continue; + } + + std::string icon_name; + static LLStdStringHandle icon_name_string = LLXmlTree::addAttributeString("icon_name"); + if (!ensemble->getFastAttributeString(icon_name_string, icon_name)) + { + llwarns << "No ensemble icon name defined" << llendl; + continue; + } + + std::string allowed_names; + static LLStdStringHandle allowed_names_string = LLXmlTree::addAttributeString("allowed"); + if (!ensemble->getFastAttributeString(allowed_names_string, allowed_names)) + { + } + + // Add the entry and increment the asset number. + const static std::string new_ensemble_name = "New Ensemble"; + addEntry(LLFolderType::EType(ensemble_type), new ViewerFolderEntry(xui_name, new_ensemble_name, icon_name, allowed_names)); + } + + return true; +} + + +const std::string &LLViewerFolderType::lookupXUIName(LLFolderType::EType folder_type) +{ + const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); + if (entry) + { + return entry->mName; + } + return badLookup(); +} + +LLFolderType::EType LLViewerFolderType::lookupTypeFromXUIName(const std::string &name) +{ + return LLViewerFolderDictionary::getInstance()->lookup(name); +} + +const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder_type) +{ + const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); + if (entry) + { + return entry->mIconName; + } + return badLookup(); +} + +const std::string &LLViewerFolderType::lookupNewCategoryName(LLFolderType::EType folder_type) +{ + const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); + if (entry) + { + return entry->mNewCategoryName; + } + return badLookup(); +} + +LLFolderType::EType LLViewerFolderType::lookupTypeFromNewCategoryName(const std::string& name) +{ + for (LLViewerFolderDictionary::const_iterator iter = LLViewerFolderDictionary::getInstance()->begin(); + iter != LLViewerFolderDictionary::getInstance()->end(); + iter++) + { + const ViewerFolderEntry *entry = iter->second; + if (entry->mNewCategoryName == name) + { + return iter->first; + } + } + return FT_NONE; +} + + +U64 LLViewerFolderType::lookupValidFolderTypes(const std::string& item_name) +{ + U64 matching_folders = 0; + for (LLViewerFolderDictionary::const_iterator iter = LLViewerFolderDictionary::getInstance()->begin(); + iter != LLViewerFolderDictionary::getInstance()->end(); + iter++) + { + const ViewerFolderEntry *entry = iter->second; + if (entry->getIsAllowedName(item_name)) + { + matching_folders |= 1LL << iter->first; + } + } + return matching_folders; +} diff --git a/indra/newview/llviewerfoldertype.h b/indra/newview/llviewerfoldertype.h new file mode 100644 index 0000000000..a6aea62b2a --- /dev/null +++ b/indra/newview/llviewerfoldertype.h @@ -0,0 +1,57 @@ +/** + * @file llviewerfoldertype.h + * @brief Declaration of LLAssetType. + * + * $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_LLVIEWERFOLDERTYPE_H +#define LL_LLVIEWERFOLDERTYPE_H + +#include <string> +#include "llfoldertype.h" + +// This class is similar to llfoldertype, but contains methods +// only used by the viewer. This also handles ensembles. +class LLViewerFolderType : public LLFolderType +{ +public: + static const std::string& lookupXUIName(EType folder_type); // name used by the UI + static LLFolderType::EType lookupTypeFromXUIName(const std::string& name); + + static const std::string& lookupIconName(EType asset_type); // folder icon name + static const std::string& lookupNewCategoryName(EType folder_type); // default name when creating new category + static LLFolderType::EType lookupTypeFromNewCategoryName(const std::string& name); // default name when creating new category + + static U64 lookupValidFolderTypes(const std::string& item_name); // which folders allow an item of this type? +protected: + LLViewerFolderType() {} + ~LLViewerFolderType() {} +}; + +#endif // LL_LLVIEWERFOLDERTYPE_H diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 470739baa9..1d62ead843 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -37,7 +37,7 @@ #include "indra_constants.h" #include "llagent.h" -#include "llfoldertype.h" +#include "llviewerfoldertype.h" #include "llfolderview.h" #include "llviewercontrol.h" #include "llconsole.h" @@ -48,6 +48,7 @@ #include "llinventorybridge.h" #include "llfloaterinventory.h" +#include "llviewerassettype.h" #include "llviewerregion.h" #include "llviewerobjectlist.h" #include "llpreviewgesture.h" @@ -359,7 +360,7 @@ void LLViewerInventoryItem::updateParentOnServer(BOOL restamp) const LLViewerInventoryCategory::LLViewerInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid, - LLAssetType::EType pref, + LLFolderType::EType pref, const std::string& name, const LLUUID& owner_id) : LLInventoryCategory(uuid, parent_uuid, pref, name), @@ -416,7 +417,7 @@ void LLViewerInventoryCategory::updateServer(BOOL is_new) const { // communicate that change with the server. - if (LLAssetType::lookupIsProtectedCategoryType(mPreferredType)) + if (LLFolderType::lookupIsProtectedType(mPreferredType)) { LLNotifications::instance().add("CannotModifyProtectedCategories"); return; @@ -440,7 +441,7 @@ void LLViewerInventoryCategory::removeFromServer( void ) llinfos << "Removing inventory category " << mUUID << " from server." << llendl; // communicate that change with the server. - if(LLAssetType::lookupIsProtectedCategoryType(mPreferredType)) + if(LLFolderType::lookupIsProtectedType(mPreferredType)) { LLNotifications::instance().add("CannotRemoveProtectedCategories"); return; @@ -543,7 +544,7 @@ bool LLViewerInventoryCategory::importFileLocal(LLFILE* fp) } else if(0 == strcmp("pref_type", keyword)) { - mPreferredType = LLAssetType::lookup(valuestr); + mPreferredType = LLFolderType::lookup(valuestr); } else if(0 == strcmp("name", keyword)) { @@ -581,7 +582,7 @@ bool LLViewerInventoryCategory::exportFileLocal(LLFILE* fp) const mParentUUID.toString(uuid_str); fprintf(fp, "\t\tparent_id\t%s\n", uuid_str.c_str()); fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType)); - fprintf(fp, "\t\tpref_type\t%s\n", LLAssetType::lookup(mPreferredType)); + fprintf(fp, "\t\tpref_type\t%s\n", LLFolderType::lookup(mPreferredType).c_str()); fprintf(fp, "\t\tname\t%s|\n", mName.c_str()); mOwnerID.toString(uuid_str); fprintf(fp, "\t\towner_id\t%s\n", uuid_str.c_str()); @@ -592,8 +593,8 @@ bool LLViewerInventoryCategory::exportFileLocal(LLFILE* fp) const void LLViewerInventoryCategory::determineFolderType() { - LLAssetType::EType original_type = getPreferredType(); - if (LLAssetType::lookupIsProtectedCategoryType(original_type)) + LLFolderType::EType original_type = getPreferredType(); + if (LLFolderType::lookupIsProtectedType(original_type)) return; U64 folder_valid = 0; @@ -616,28 +617,28 @@ void LLViewerInventoryCategory::determineFolderType() { const EWearableType wearable_type = item->getWearableType(); const std::string& wearable_name = LLWearableDictionary::getTypeName(wearable_type); - U64 valid_folder_types = LLFolderType::lookupValidFolderTypes(wearable_name); + U64 valid_folder_types = LLViewerFolderType::lookupValidFolderTypes(wearable_name); folder_valid |= valid_folder_types; folder_invalid |= ~valid_folder_types; } } - for (U8 i = LLAssetType::AT_FOLDER_ENSEMBLE_START; i <= LLAssetType::AT_FOLDER_ENSEMBLE_END; i++) + for (U8 i = LLFolderType::FT_ENSEMBLE_START; i <= LLFolderType::FT_ENSEMBLE_END; i++) { if ((folder_valid & (1LL << i)) && !(folder_invalid & (1LL << i))) { - changeType((LLAssetType::EType)i); + changeType((LLFolderType::EType)i); return; } } } - if (LLAssetType::lookupIsEnsembleCategoryType(original_type)) + if (LLFolderType::lookupIsEnsembleType(original_type)) { - changeType(LLAssetType::AT_NONE); + changeType(LLFolderType::FT_NONE); } } -void LLViewerInventoryCategory::changeType(LLAssetType::EType new_folder_type) +void LLViewerInventoryCategory::changeType(LLFolderType::EType new_folder_type) { const LLUUID &folder_id = getUUID(); const LLUUID &parent_id = getParentUUID(); @@ -948,7 +949,7 @@ void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecar body["notecard-id"] = notecard_inv_id; body["object-id"] = object_id; body["item-id"] = src->getUUID(); - body["folder-id"] = gInventory.findCategoryUUIDForType(src->getType()); + body["folder-id"] = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(src->getType())); body["callback-id"] = (LLSD::Integer)callback_id; request["message"] = "CopyInventoryFromNotecard"; @@ -964,7 +965,7 @@ void create_new_item(const std::string& name, U32 next_owner_perm) { std::string desc; - LLAssetType::generateDescriptionFor(asset_type, desc); + LLViewerAssetType::generateDescriptionFor(asset_type, desc); next_owner_perm = (next_owner_perm) ? next_owner_perm : PERM_MOVE | PERM_TRANSFER; @@ -989,19 +990,14 @@ const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not) const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not) +// ! REFACTOR ! Really need to refactor this so that it's not a bunch of if-then statements... void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, const LLSD& userdata, const LLUUID& default_parent_uuid) { - std::string type = userdata.asString(); + std::string type_name = userdata.asString(); - if (("category" == type) || ("current" == type) || ("outfit" == type) || ("my_otfts" == type) ) + if (("category" == type_name) || ("current" == type_name) || ("outfit" == type_name) || ("my_otfts" == type_name)) { - LLAssetType::EType a_type = LLAssetType::AT_NONE; - if ("current" == type) - a_type = LLAssetType::AT_CURRENT_OUTFIT; - if ("outfit" == type) - a_type = LLAssetType::AT_OUTFIT; - if ("my_otfts" == type) - a_type = LLAssetType::AT_MY_OUTFITS; + LLFolderType::EType preferred_type = LLFolderType::lookup(type_name); LLUUID parent_id; if (bridge) @@ -1017,100 +1013,100 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co parent_id = gInventory.getRootFolderID(); } - LLUUID category = gInventory.createNewCategory(parent_id, a_type, LLStringUtil::null); + LLUUID category = gInventory.createNewCategory(parent_id, preferred_type, LLStringUtil::null); gInventory.notifyObservers(); folder->setSelectionByID(category, TRUE); } - else if ("lsl" == type) + else if ("lsl" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_LSL_TEXT); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_LSL_TEXT); create_new_item(NEW_LSL_NAME, parent_id, LLAssetType::AT_LSL_TEXT, LLInventoryType::IT_LSL, PERM_MOVE | PERM_TRANSFER); } - else if ("notecard" == type) + else if ("notecard" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_NOTECARD); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_NOTECARD); create_new_item(NEW_NOTECARD_NAME, parent_id, LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, PERM_ALL); } - else if ("gesture" == type) + else if ("gesture" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_GESTURE); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE); create_new_item(NEW_GESTURE_NAME, parent_id, LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, PERM_ALL); } - else if ("shirt" == type) + else if ("shirt" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); LLFolderBridge::createWearable(parent_id, WT_SHIRT); } - else if ("pants" == type) + else if ("pants" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); LLFolderBridge::createWearable(parent_id, WT_PANTS); } - else if ("shoes" == type) + else if ("shoes" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); LLFolderBridge::createWearable(parent_id, WT_SHOES); } - else if ("socks" == type) + else if ("socks" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); LLFolderBridge::createWearable(parent_id, WT_SOCKS); } - else if ("jacket" == type) + else if ("jacket" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); LLFolderBridge::createWearable(parent_id, WT_JACKET); } - else if ("skirt" == type) + else if ("skirt" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); LLFolderBridge::createWearable(parent_id, WT_SKIRT); } - else if ("gloves" == type) + else if ("gloves" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); LLFolderBridge::createWearable(parent_id, WT_GLOVES); } - else if ("undershirt" == type) + else if ("undershirt" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); LLFolderBridge::createWearable(parent_id, WT_UNDERSHIRT); } - else if ("underpants" == type) + else if ("underpants" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_CLOTHING); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); LLFolderBridge::createWearable(parent_id, WT_UNDERPANTS); } - else if ("shape" == type) + else if ("shape" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_BODYPART); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART); LLFolderBridge::createWearable(parent_id, WT_SHAPE); } - else if ("skin" == type) + else if ("skin" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_BODYPART); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART); LLFolderBridge::createWearable(parent_id, WT_SKIN); } - else if ("hair" == type) + else if ("hair" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_BODYPART); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART); LLFolderBridge::createWearable(parent_id, WT_HAIR); } - else if ("eyes" == type) + else if ("eyes" == type_name) { - LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_BODYPART); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART); LLFolderBridge::createWearable(parent_id, WT_EYES); } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index d523bf2859..529425aa25 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -185,7 +185,7 @@ protected: public: LLViewerInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid, - LLAssetType::EType preferred_type, + LLFolderType::EType preferred_type, const std::string& name, const LLUUID& owner_id); LLViewerInventoryCategory(const LLUUID& owner_id); @@ -221,7 +221,7 @@ public: bool exportFileLocal(LLFILE* fp) const; bool importFileLocal(LLFILE* fp); void determineFolderType(); - void changeType(LLAssetType::EType new_folder_type); + void changeType(LLFolderType::EType new_folder_type); protected: LLUUID mOwnerID; S32 mVersion; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 55e4f28e75..40bf9fb1fe 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -658,6 +658,8 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mMediaAutoScale(media_auto_scale), mMediaLoop(media_loop), mNeedsNewTexture(true), + mTextureUsedWidth(0), + mTextureUsedHeight(0), mSuspendUpdates(false), mVisible(true), mLastSetCursor( UI_CURSOR_ARROW ), @@ -1568,8 +1570,11 @@ LLViewerMediaTexture* LLViewerMediaImpl::updatePlaceholderImage() if (mNeedsNewTexture || placeholder_image->getUseMipMaps() - || placeholder_image->getWidth() != mMediaSource->getTextureWidth() - || placeholder_image->getHeight() != mMediaSource->getTextureHeight()) + || (placeholder_image->getWidth() != mMediaSource->getTextureWidth()) + || (placeholder_image->getHeight() != mMediaSource->getTextureHeight()) + || (mTextureUsedWidth > mMediaSource->getWidth()) + || (mTextureUsedHeight > mMediaSource->getHeight()) + ) { LL_DEBUGS("Media") << "initializing media placeholder" << LL_ENDL; LL_DEBUGS("Media") << "movie image id " << mTextureId << LL_ENDL; @@ -1601,6 +1606,11 @@ LLViewerMediaTexture* LLViewerMediaImpl::updatePlaceholderImage() // FIXME // placeholder_image->mIsMediaTexture = true; mNeedsNewTexture = false; + + // If the amount of the texture being drawn by the media goes down in either width or height, + // recreate the texture to avoid leaving parts of the old image behind. + mTextureUsedWidth = mMediaSource->getWidth(); + mTextureUsedHeight = mMediaSource->getHeight(); } return placeholder_image; diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index d6dde0c93e..4cb0817735 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -306,6 +306,8 @@ public: bool mMediaAutoScale; bool mMediaLoop; bool mNeedsNewTexture; + S32 mTextureUsedWidth; + S32 mTextureUsedHeight; bool mSuspendUpdates; bool mVisible; ECursorType mLastSetCursor; diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index 657c58364f..b2a0fa4b1c 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -77,6 +77,10 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac { old_media_impl->focus(false); } + + // Always clear the current selection. If we're setting focus on a face, we'll reselect the correct object below. + LLSelectMgr::getInstance()->deselectAll(); + mSelection = NULL; if (media_impl.notNull() && objectp.notNull()) { @@ -87,6 +91,9 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac mFocusedObjectFace = face; mFocusedObjectNormal = pick_normal; + // Set the selection in the selection manager so we can draw the focus ring. + mSelection = LLSelectMgr::getInstance()->selectObjectOnly(objectp, face); + // Focusing on a media face clears its disable flag. media_impl->setDisabled(false); diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h index e5f36d341c..89ee0ae283 100644 --- a/indra/newview/llviewermediafocus.h +++ b/indra/newview/llviewermediafocus.h @@ -76,6 +76,7 @@ public: LLViewerMediaImpl* getFocusedMediaImpl(); LLViewerObject* getFocusedObject(); S32 getFocusedFace() { return mFocusedObjectFace; } + LLUUID getFocusedObjectID() { return mFocusedObjectID; } // These look up (by uuid) and return the values that were set with setHoverFace. They will return null if the objects have been destroyed. LLViewerMediaImpl* getHoverMediaImpl(); @@ -95,6 +96,7 @@ protected: private: LLHandle<LLPanelPrimMediaControls> mMediaControls; + LLObjectSelectionHandle mSelection; LLUUID mFocusedObjectID; S32 mFocusedObjectFace; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e2e0e00dcf..207f0e3f42 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -146,7 +146,6 @@ #include "llmenucommands.h" #include "llmenugl.h" #include "llmimetypes.h" -#include "llmorphview.h" #include "llmoveview.h" #include "llmutelist.h" #include "llnotify.h" @@ -610,6 +609,14 @@ class LLAdvancedToggleConsole : public view_listener_t { toggle_visibility( (void*)((LLView*)gDebugView->mDebugConsolep) ); } + else if (gTextureSizeView && "texture size" == console_type) + { + toggle_visibility( (void*)gTextureSizeView ); + } + else if (gTextureCategoryView && "texture category" == console_type) + { + toggle_visibility( (void*)gTextureCategoryView ); + } else if ("fast timers" == console_type) { toggle_visibility( (void*)gDebugView->mFastTimerView ); @@ -637,6 +644,14 @@ class LLAdvancedCheckConsole : public view_listener_t { new_value = get_visibility( (void*)((LLView*)gDebugView->mDebugConsolep) ); } + else if (gTextureSizeView && "texture size" == console_type) + { + new_value = get_visibility( (void*)gTextureSizeView ); + } + else if (gTextureCategoryView && "texture category" == console_type) + { + new_value = get_visibility( (void*)gTextureCategoryView ); + } else if ("fast timers" == console_type) { new_value = get_visibility( (void*)gDebugView->mFastTimerView ); @@ -1161,28 +1176,6 @@ class LLAdvancedCheckWireframe : public view_listener_t }; ////////////////////// -// DISABLE TEXTURES // -////////////////////// - -class LLAdvancedToggleDisableTextures : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLViewerTexture::sDontLoadVolumeTextures = !LLViewerTexture::sDontLoadVolumeTextures; - return true; - } -}; - -class LLAdvancedCheckDisableTextures : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - bool new_value = LLViewerTexture::sDontLoadVolumeTextures; // <-- make this using LLCacheControl - return new_value; - } -}; - -////////////////////// // TEXTURE ATLAS // ////////////////////// @@ -1885,7 +1878,7 @@ class LLAdvancedRebakeTextures : public view_listener_t }; -#ifndef LL_RELEASE_FOR_DOWNLOAD +#if 1 //ndef LL_RELEASE_FOR_DOWNLOAD /////////////////////////// // DEBUG AVATAR TEXTURES // /////////////////////////// @@ -3445,26 +3438,13 @@ void handle_show_side_tray() root->addChild(side_tray); } -class LLSelfFriends : public view_listener_t +class LLShowPanelPeopleTab : public view_listener_t { bool handleEvent(const LLSD& userdata) { - // Open "Friends" tab of the "People" panel in side tray. + // Open tab of the "People" panel in side tray. LLSD param; - param["people_panel_tab_name"] = "friends_panel"; - - LLSideTray::getInstance()->showPanel("panel_people", param); - return true; - } -}; - -class LLSelfGroups : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - // Open "Groups" tab of the "People" panel in side tray. - LLSD param; - param["people_panel_tab_name"] = "groups_panel"; + param["people_panel_tab_name"] = userdata.asString(); LLSideTray::getInstance()->showPanel("panel_people", param); return true; } @@ -3499,9 +3479,8 @@ void set_god_level(U8 god_level) gAgent.setGodLevel( god_level ); LLViewerParcelMgr::getInstance()->notifyObservers(); - // God mode changes sim visibility - LLWorldMap::getInstance()->reset(); - LLWorldMap::getInstance()->setCurrentLayer(0); + // God mode changes region visibility + LLWorldMap::getInstance()->reloadItems(true); // inventory in items may change in god mode gObjectList.dirtyAllObjectInventory(); @@ -4178,12 +4157,10 @@ void handle_take_copy() { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return; - LLUUID category_id = - gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT); + const LLUUID category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id); } - // You can return an object to its owner if it is on your land. class LLObjectReturn : public view_listener_t { @@ -4264,7 +4241,7 @@ class LLObjectEnableReturn : public view_listener_t void force_take_copy(void*) { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return; - const LLUUID& category_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT); + const LLUUID category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); derez_objects(DRD_FORCE_TO_GOD_INVENTORY, category_id); } @@ -4325,8 +4302,7 @@ void handle_take() if(category_id.notNull()) { // check trash - LLUUID trash; - trash = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if(category_id == trash || gInventory.isObjectDescendentOf(category_id, trash)) { category_id.setNull(); @@ -4342,7 +4318,7 @@ void handle_take() } if(category_id.isNull()) { - category_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT); + category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); } LLSD payload; payload["folder_id"] = category_id; @@ -6921,7 +6897,7 @@ void handle_grab_texture(void* data) 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; - LLUUID folder_id(gInventory.findCategoryUUIDForType(asset_type)); + const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type)); if(folder_id.notNull()) { std::string name = "Unknown"; @@ -7463,52 +7439,10 @@ class LLEditEnableTakeOff : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string clothing = userdata.asString(); - bool new_value = false; - if (clothing == "shirt") - { - new_value = LLAgentWearables::selfHasWearable(WT_SHIRT); - } - if (clothing == "pants") - { - new_value = LLAgentWearables::selfHasWearable(WT_PANTS); - } - if (clothing == "shoes") - { - new_value = LLAgentWearables::selfHasWearable(WT_SHOES); - } - if (clothing == "socks") - { - new_value = LLAgentWearables::selfHasWearable(WT_SOCKS); - } - if (clothing == "jacket") - { - new_value = LLAgentWearables::selfHasWearable(WT_JACKET); - } - if (clothing == "gloves") - { - new_value = LLAgentWearables::selfHasWearable(WT_GLOVES); - } - if (clothing == "undershirt") - { - new_value = LLAgentWearables::selfHasWearable(WT_UNDERSHIRT); - } - if (clothing == "underpants") - { - new_value = LLAgentWearables::selfHasWearable(WT_UNDERPANTS); - } - if (clothing == "skirt") - { - new_value = LLAgentWearables::selfHasWearable(WT_SKIRT); - } - if (clothing == "alpha") - { - new_value = LLAgentWearables::selfHasWearable(WT_ALPHA); - } - if (clothing == "tattoo") - { - new_value = LLAgentWearables::selfHasWearable(WT_TATTOO); - } - return new_value; + EWearableType type = LLWearableDictionary::typeNameToType(clothing); + if (type >= WT_SHAPE && type < WT_COUNT) + return LLAgentWearables::selfHasWearable(type); + return false; } }; @@ -7517,53 +7451,13 @@ class LLEditTakeOff : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string clothing = userdata.asString(); - if (clothing == "shirt") - { - LLAgentWearables::userRemoveWearable((void*)WT_SHIRT); - } - else if (clothing == "pants") - { - LLAgentWearables::userRemoveWearable((void*)WT_PANTS); - } - else if (clothing == "shoes") - { - LLAgentWearables::userRemoveWearable((void*)WT_SHOES); - } - else if (clothing == "socks") - { - LLAgentWearables::userRemoveWearable((void*)WT_SOCKS); - } - else if (clothing == "jacket") - { - LLAgentWearables::userRemoveWearable((void*)WT_JACKET); - } - else if (clothing == "gloves") - { - LLAgentWearables::userRemoveWearable((void*)WT_GLOVES); - } - else if (clothing == "undershirt") - { - LLAgentWearables::userRemoveWearable((void*)WT_UNDERSHIRT); - } - else if (clothing == "underpants") - { - LLAgentWearables::userRemoveWearable((void*)WT_UNDERPANTS); - } - else if (clothing == "skirt") - { - LLAgentWearables::userRemoveWearable((void*)WT_SKIRT); - } - else if (clothing == "alpha") - { - LLAgentWearables::userRemoveWearable((void*)WT_ALPHA); - } - else if (clothing == "tattoo") - { - LLAgentWearables::userRemoveWearable((void*)WT_TATTOO); - } - else if (clothing == "all") + if (clothing == "all") + LLAgentWearables::userRemoveAllClothes(); + else { - LLAgentWearables::userRemoveAllClothes(NULL); + EWearableType type = LLWearableDictionary::typeNameToType(clothing); + if (type >= WT_SHAPE && type < WT_COUNT) + LLAgentWearables::userRemoveWearable(type); } return true; } @@ -7878,8 +7772,6 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedSelectedTextureInfo(), "Advanced.SelectedTextureInfo"); view_listener_t::addMenu(new LLAdvancedToggleWireframe(), "Advanced.ToggleWireframe"); view_listener_t::addMenu(new LLAdvancedCheckWireframe(), "Advanced.CheckWireframe"); - view_listener_t::addMenu(new LLAdvancedToggleDisableTextures(), "Advanced.ToggleDisableTextures"); - view_listener_t::addMenu(new LLAdvancedCheckDisableTextures(), "Advanced.CheckDisableTextures"); view_listener_t::addMenu(new LLAdvancedToggleTextureAtlas(), "Advanced.ToggleTextureAtlas"); view_listener_t::addMenu(new LLAdvancedCheckTextureAtlas(), "Advanced.CheckTextureAtlas"); view_listener_t::addMenu(new LLAdvancedEnableObjectObjectOcclusion(), "Advanced.EnableObjectObjectOcclusion"); @@ -8028,8 +7920,7 @@ void initialize_menus() view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments"); // we don't use boost::bind directly to delay side tray construction - view_listener_t::addMenu(new LLSelfFriends(), "Self.Friends"); - view_listener_t::addMenu(new LLSelfGroups(), "Self.Groups"); + view_listener_t::addMenu( new LLShowPanelPeopleTab(), "SideTray.PanelPeopleTab"); // Avatar pie menu view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute"); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index d3a9e1cef8..d17c7e486f 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -319,7 +319,7 @@ class LLFileUploadBulk : public view_listener_t LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); void *userdata = NULL; - upload_new_resource(filename, asset_name, asset_name, 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE, + upload_new_resource(filename, asset_name, asset_name, 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), display_name, callback, expected_upload_cost, userdata); @@ -493,7 +493,7 @@ void handle_compress_image(void*) void upload_new_resource(const std::string& src_filename, std::string name, std::string desc, S32 compression_info, - LLAssetType::EType destination_folder_type, + LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, @@ -810,7 +810,7 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt if(result >= 0) { - LLAssetType::EType dest_loc = (data->mPreferredLocation == LLAssetType::AT_NONE) ? data->mAssetInfo.mType : data->mPreferredLocation; + LLFolderType::EType dest_loc = (data->mPreferredLocation == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(data->mAssetInfo.mType) : data->mPreferredLocation; if (LLAssetType::AT_SOUND == data->mAssetInfo.mType || LLAssetType::AT_TEXTURE == data->mAssetInfo.mType || @@ -856,7 +856,7 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt { // Actually add the upload to inventory llinfos << "Adding " << uuid << " to inventory." << llendl; - LLUUID folder_id(gInventory.findCategoryUUIDForType(dest_loc)); + const LLUUID folder_id = gInventory.findCategoryUUIDForType(dest_loc); if(folder_id.notNull()) { U32 next_owner_perms = data->mNextOwnerPerm; @@ -903,7 +903,7 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt LLAssetStorage::LLStoreAssetCallback callback = NULL; void *userdata = NULL; upload_new_resource(next_file, asset_name, asset_name, // file - 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE, + 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, PERM_NONE, PERM_NONE, PERM_NONE, display_name, callback, @@ -915,7 +915,7 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_type, std::string name, std::string desc, S32 compression_info, - LLAssetType::EType destination_folder_type, + LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, @@ -973,14 +973,14 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty llinfos << "Name: " << name << llendl; llinfos << "Desc: " << desc << llendl; llinfos << "Expected Upload Cost: " << expected_upload_cost << llendl; - lldebugs << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLAssetType::AT_NONE) ? asset_type : destination_folder_type) << llendl; + lldebugs << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << llendl; lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl; std::string url = gAgent.getRegion()->getCapability("NewFileAgentInventory"); if (!url.empty()) { llinfos << "New Agent Inventory via capability" << llendl; LLSD body; - body["folder_id"] = gInventory.findCategoryUUIDForType((destination_folder_type == LLAssetType::AT_NONE) ? asset_type : destination_folder_type); + body["folder_id"] = gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type); body["asset_type"] = LLAssetType::lookup(asset_type); body["inventory_type"] = LLInventoryType::lookup(inv_type); body["name"] = name; diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index bf21292082..da78537a29 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -33,7 +33,7 @@ #ifndef LLVIEWERMENUFILE_H #define LLVIEWERMENUFILE_H -#include "llassettype.h" +#include "llfoldertype.h" #include "llinventorytype.h" class LLTransactionID; @@ -45,7 +45,7 @@ void upload_new_resource(const std::string& src_filename, std::string name, std::string desc, S32 compression_info, - LLAssetType::EType destination_folder_type, + LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, @@ -60,7 +60,7 @@ void upload_new_resource(const LLTransactionID &tid, std::string name, std::string desc, S32 compression_info, - LLAssetType::EType destination_folder_type, + LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ff1c7b526f..ea1097c477 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -140,7 +140,7 @@ #include "llgroupactions.h" #include "llagentui.h" #include "llpanelblockedlist.h" -#include "llpanelplaceinfo.h" +#include "llpanelplaceprofile.h" #include <boost/tokenizer.hpp> #include <boost/algorithm/string/split.hpp> @@ -209,7 +209,6 @@ const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] = bool friendship_offer_callback(const LLSD& notification, const LLSD& response) { S32 option = LLNotification::getSelectedOption(notification, response); - LLUUID fid; LLMessageSystem* msg = gMessageSystem; const LLSD& payload = notification["payload"]; @@ -219,10 +218,11 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) switch(option) { case 0: + { // accept LLAvatarTracker::formFriendship(payload["from_id"]); - fid = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); + const LLUUID fid = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); // This will also trigger an onlinenotification if the user is online msg->newMessageFast(_PREHASH_AcceptFriendship); @@ -235,7 +235,9 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) msg->addUUIDFast(_PREHASH_FolderID, fid); msg->sendReliable(LLHost(payload["sender"].asString())); break; + } case 1: + { // decline // We no longer notify other viewers, but we DO still send // the rejection to the simulator to delete the pending userop. @@ -247,6 +249,7 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) msg->addUUIDFast(_PREHASH_TransactionID, payload["session_id"]); msg->sendReliable(LLHost(payload["sender"].asString())); break; + } default: // close button probably, possibly timed out break; @@ -767,8 +770,7 @@ public: virtual void done() { LL_DEBUGS("Messaging") << "LLDiscardAgentOffer::done()" << LL_ENDL; - LLUUID trash_id; - trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); bool notify = false; if(trash_id.notNull() && mObjectID.notNull()) { @@ -875,7 +877,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name) { std::vector<LLUUID>::const_iterator it = items.begin(); std::vector<LLUUID>::const_iterator end = items.end(); - LLUUID trash_id(gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH)); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); LLInventoryItem* item; for(; it != end; ++it) { @@ -946,13 +948,12 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name) } //Trash Check - LLUUID trash_id; - trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { return; } - LLUUID lost_and_found_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); + const LLUUID lost_and_found_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); //BOOL inventory_has_focus = gFocusMgr.childHasKeyboardFocus(view); BOOL user_is_away = gAwayTimer.getStarted(); @@ -1716,7 +1717,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) info->mFromGroup = from_group; info->mTransactionID = session_id; info->mType = (LLAssetType::EType) asset_type; - info->mFolderID = gInventory.findCategoryUUIDForType(info->mType); + info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType)); std::string from_name; from_name += "A group member named "; @@ -1850,7 +1851,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) info->mFromID = from_id; info->mFromGroup = from_group; info->mTransactionID = session_id; - info->mFolderID = gInventory.findCategoryUUIDForType(info->mType); + info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType)); if (dialog == IM_TASK_INVENTORY_OFFERED) { @@ -2144,7 +2145,7 @@ bool callingcard_offer_callback(const LLSD& notification, const LLSD& response) msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_TransactionBlock); msg->addUUIDFast(_PREHASH_TransactionID, notification["payload"]["transaction_id"].asUUID()); - fid = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); + fid = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); msg->nextBlockFast(_PREHASH_FolderData); msg->addUUIDFast(_PREHASH_FolderID, fid); msg->sendReliable(LLHost(notification["payload"]["sender"].asString())); @@ -2597,11 +2598,10 @@ BOOL LLPostTeleportNotifiers::tick() { // get callingcards and landmarks available to the user arriving. LLInventoryFetchDescendentsObserver::folder_ref_t folders; - LLUUID folder_id; - folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); - if(folder_id.notNull()) - folders.push_back(folder_id); - folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); + const LLUUID callingcard_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); + if(callingcard_id.notNull()) + folders.push_back(callingcard_id); + const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); if(folder_id.notNull()) folders.push_back(folder_id); if(!folders.empty()) @@ -2914,46 +2914,37 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if (!gLastVersionChannel.empty()) { - LLSD payload; - payload["message"] = version_channel; - LLNotifications::instance().add("ServerVersionChanged", LLSD(), payload, server_version_changed_callback); - } - - gLastVersionChannel = version_channel; -} - -bool server_version_changed_callback(const LLSD& notification, const LLSD& response) -{ - if(notification["payload"]["message"].asString() =="") - return false; - std::string url ="http://wiki.secondlife.com/wiki/Release_Notes/"; - //parse the msg string - std::string server_version = notification["payload"]["message"].asString(); - std::vector<std::string> s_vect; - boost::algorithm::split(s_vect, server_version, isspace); - for(U32 i = 0; i < s_vect.size(); i++) - { - if (i != (s_vect.size() - 1)) + // work out the URL for this server's Release Notes + std::string url ="http://wiki.secondlife.com/wiki/Release_Notes/"; + std::string server_version = version_channel; + std::vector<std::string> s_vect; + boost::algorithm::split(s_vect, server_version, isspace); + for(U32 i = 0; i < s_vect.size(); i++) { - if(i != (s_vect.size() - 2)) + if (i != (s_vect.size() - 1)) { - url += s_vect[i] + "_"; + if(i != (s_vect.size() - 2)) + { + url += s_vect[i] + "_"; + } + else + { + url += s_vect[i] + "/"; + } } else { - url += s_vect[i] + "/"; + url += s_vect[i].substr(0,4); } } - else - { - url += s_vect[i].substr(0,4); - } + + LLSD args; + args["URL"] = url; + LLNotifications::instance().add("ServerVersionChanged", args); } - - LLWeb::loadURL(url); - return false; -} + gLastVersionChannel = version_channel; +} void process_crossed_region(LLMessageSystem* msg, void**) { @@ -4819,7 +4810,7 @@ void container_inventory_arrived(LLViewerObject* object, // create a new inventory category to put this in LLUUID cat_id; cat_id = gInventory.createNewCategory(gInventory.getRootFolderID(), - LLAssetType::AT_NONE, + LLFolderType::FT_NONE, LLTrans::getString("AcquiredItems")); InventoryObjectList::const_iterator it = inventory->begin(); @@ -4869,7 +4860,7 @@ void container_inventory_arrived(LLViewerObject* object, } LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); - LLUUID category = gInventory.findCategoryUUIDForType(item->getType()); + const LLUUID category = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(item->getType())); LLUUID item_id; item_id.generate(); @@ -5549,7 +5540,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLPanelLandCovenant::updateEstateOwnerName(owner_name); LLFloaterBuyLand::updateEstateOwnerName(owner_name); - LLPanelPlaceInfo* panel = LLSideTray::getInstance()->findChild<LLPanelPlaceInfo>("panel_place_info"); + LLPanelPlaceProfile* panel = LLSideTray::getInstance()->findChild<LLPanelPlaceProfile>("panel_place_profile"); if (panel) { panel->updateEstateName(estate_name); @@ -5683,7 +5674,7 @@ void onCovenantLoadComplete(LLVFS *vfs, LLPanelLandCovenant::updateCovenantText(covenant_text); LLFloaterBuyLand::updateCovenantText(covenant_text, asset_uuid); - LLPanelPlaceInfo* panel = LLSideTray::getInstance()->findChild<LLPanelPlaceInfo>("panel_place_info"); + LLPanelPlaceProfile* panel = LLSideTray::getInstance()->findChild<LLPanelPlaceProfile>("panel_place_profile"); if (panel) { panel->updateCovenantText(covenant_text); diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index c15e5df675..e24da2013d 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -132,7 +132,6 @@ void container_inventory_arrived(LLViewerObject* object, // agent movement void send_complete_agent_movement(const LLHost& sim_host); void process_agent_movement_complete(LLMessageSystem* msg, void**); -bool server_version_changed_callback(const LLSD& notification, const LLSD& response); void process_crossed_region(LLMessageSystem* msg, void**); void process_teleport_start(LLMessageSystem* msg, void**); void process_teleport_progress(LLMessageSystem* msg, void**); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 20cd516fa0..e491e11960 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2906,7 +2906,7 @@ F32 LLViewerObject::getMidScale() const } -void LLViewerObject::updateTextures(LLAgent &agent) +void LLViewerObject::updateTextures() { } @@ -2928,7 +2928,7 @@ void LLViewerObject::boostTexturePriority(BOOL boost_children /* = TRUE */) { LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); LLUUID sculpt_id = sculpt_params->getSculptTexture(); - LLViewerTextureManager::getFetchedTexture(sculpt_id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLViewerTexture::BOOST_SELECTED); + LLViewerTextureManager::getFetchedTexture(sculpt_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLViewerTexture::BOOST_SELECTED); } if (boost_children) @@ -3691,7 +3691,7 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry &texture_entry) // if (mDrawable.notNull() && mDrawable->isVisible()) // { const LLUUID& image_id = getTE(te)->getID(); - mTEImages[te] = LLViewerTextureManager::getFetchedTexture(image_id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + mTEImages[te] = LLViewerTextureManager::getFetchedTexture(image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); // } } @@ -3717,7 +3717,7 @@ S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, LLHost hos uuid == LLUUID::null) { retval = LLPrimitive::setTETexture(te, uuid); - mTEImages[te] = LLViewerTextureManager::getFetchedTexture(uuid, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); + mTEImages[te] = LLViewerTextureManager::getFetchedTexture(uuid, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); setChanged(TEXTURE); if (mDrawable.notNull()) { diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index b8ae31118c..01b213a87d 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -199,7 +199,7 @@ public: S32 getNumFaces() const { return mNumFaces; } // Graphical stuff for objects - maybe broken out into render class later? - virtual void updateTextures(LLAgent &agent); + virtual void updateTextures(); virtual void boostTexturePriority(BOOL boost_children = TRUE); // When you just want to boost priority of this object virtual LLDrawable* createDrawable(LLPipeline *pipeline); diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 2927ca5292..96828ee1b6 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -642,7 +642,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) // Update distance & gpw objectp->setPixelAreaAndAngle(agent); // Also sets the approx. pixel area - objectp->updateTextures(agent); // Update the image levels of textures for this object. + objectp->updateTextures(); // Update the image levels of textures for this object. } } @@ -1074,6 +1074,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) LLColor4 group_own_below_water_color = LLUIColorTable::instance().getColor( "NetMapGroupOwnBelowWater" ); + F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius"); for (S32 i = 0; i < mMapObjects.count(); i++) { @@ -1089,6 +1090,11 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) F32 approx_radius = (scale.mV[VX] + scale.mV[VY]) * 0.5f * 0.5f * 1.3f; // 1.3 is a fudge + // Limit the size of megaprims so they don't blot out everything on the minimap. + // Attempting to draw very large megaprims also causes client lag. + // See DEV-17370 and DEV-29869/SNOW-79 for details. + approx_radius = llmin(approx_radius, max_radius); + LLColor4U color = above_water_color; if( objectp->permYouOwner() ) { diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 7ea55b49e8..d1c9840a97 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1427,11 +1427,11 @@ void LLViewerRegion::setSeedCapability(const std::string& url) capabilityNames.append("EstateChangeInfo"); capabilityNames.append("EventQueueGet"); capabilityNames.append("FetchInventory"); - capabilityNames.append("WebFetchInventoryDescendents"); capabilityNames.append("ObjectMedia"); capabilityNames.append("ObjectMediaNavigate"); capabilityNames.append("FetchLib"); capabilityNames.append("FetchLibDescendents"); + capabilityNames.append("GetTexture"); capabilityNames.append("GroupProposalBallot"); capabilityNames.append("HomeLocation"); capabilityNames.append("MapLayer"); @@ -1452,6 +1452,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) capabilityNames.append("SendUserReportWithScreenshot"); capabilityNames.append("ServerReleaseNotes"); capabilityNames.append("StartGroupProposal"); + capabilityNames.append("TextureStats"); capabilityNames.append("UntrustedSimulatorMessage"); capabilityNames.append("UpdateAgentInformation"); capabilityNames.append("UpdateAgentLanguage"); @@ -1464,6 +1465,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) capabilityNames.append("UploadBakedTexture"); capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); + capabilityNames.append("WebFetchInventoryDescendents"); // Please add new capabilities alphabetically to reduce // merge conflicts. diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 6e07d8f246..caa94dba38 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -560,12 +560,18 @@ extern U32 gVisCompared; extern U32 gVisTested; std::map<S32,LLFrameTimer> gDebugTimers; +std::map<S32,std::string> gDebugTimerLabel; + +void init_statistics() +{ + // Label debug timers + gDebugTimerLabel[0] = "Texture"; +} void update_statistics(U32 frame_count) { gTotalWorldBytes += gVLManager.getTotalBytes(); gTotalObjectBytes += gObjectBits / 8; - gTotalTextureBytes += gTextureList.mTextureBits / 8; // make sure we have a valid time delta for this frame if (gFrameIntervalSeconds > 0.f) @@ -617,7 +623,6 @@ void update_statistics(U32 frame_count) F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); LLViewerStats::getInstance()->mLayersKBitStat.addValue(layer_bits/1024.f); LLViewerStats::getInstance()->mObjectKBitStat.addValue(gObjectBits/1024.f); - LLViewerStats::getInstance()->mTextureKBitStat.addValue(gTextureList.mTextureBits/1024.f); LLViewerStats::getInstance()->mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending()); LLViewerStats::getInstance()->mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); @@ -631,8 +636,6 @@ void update_statistics(U32 frame_count) gDebugTimers[0].unpause(); } - LLViewerStats::getInstance()->mTexturePacketsStat.addValue(gTextureList.mTexturePackets); - { static F32 visible_avatar_frames = 0.f; static F32 avg_visible_avatars = 0; @@ -652,8 +655,20 @@ void update_statistics(U32 frame_count) gObjectBits = 0; // gDecodedBits = 0; - gTextureList.mTextureBits = 0; - gTextureList.mTexturePackets = 0; + // Only update texture stats ones per second so that they are less noisy + { + static const F32 texture_stats_freq = 1.f; + static LLFrameTimer texture_stats_timer; + if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) + { + LLViewerStats::getInstance()->mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f); + LLViewerStats::getInstance()->mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets); + gTotalTextureBytes += LLViewerTextureList::sTextureBits / 8; + LLViewerTextureList::sTextureBits = 0; + LLViewerTextureList::sTexturePackets = 0; + texture_stats_timer.reset(); + } + } } @@ -826,3 +841,4 @@ void send_stats() LLViewerStats::getInstance()->addToMessage(body); LLHTTPClient::post(url, body, new ViewerStatsResponder()); } + diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index ba89fbf02a..13d73000d2 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -34,6 +34,7 @@ #define LL_LLVIEWERSTATS_H #include "llstat.h" +#include "lltextureinfo.h" class LLViewerStats : public LLSingleton<LLViewerStats> { @@ -205,10 +206,13 @@ private: static const F32 SEND_STATS_PERIOD = 300.0f; // The following are from (older?) statistics code found in appviewer. +void init_statistics(); void reset_statistics(); void output_statistics(void*); void update_statistics(U32 frame_count); void send_stats(); extern std::map<S32,LLFrameTimer> gDebugTimers; +extern std::map<S32,std::string> gDebugTimerLabel; + #endif // LL_LLVIEWERSTATS_H diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 5c40f2a540..6f8818be6e 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -62,6 +62,7 @@ #include "lltooltip.h" #include "lltrans.h" #include "lluictrlfactory.h" +#include "llviewerassettype.h" #include "llviewercontrol.h" #include "llviewerinventory.h" #include "llviewertexturelist.h" @@ -170,7 +171,7 @@ public: mToolTip = inv_item->getName() + '\n' + inv_item->getDescription(); } - /*virtual*/ void getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const + /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { if (num_chars == 0) { @@ -182,12 +183,29 @@ public: width = EMBEDDED_ITEM_LABEL_PADDING + mImage->getWidth() + mStyle->getFont()->getWidth(mLabel.c_str()); height = llmax(mImage->getHeight(), llceil(mStyle->getFont()->getLineHeight())); } - + return false; } /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const { - return 1; + // always draw at beginning of line + if (line_offset == 0) + { + return 1; + } + else + { + S32 width, height; + getDimensions(mStart, 1, width, height); + if (width > num_pixels) + { + return 0; + } + else + { + return 1; + } + } } /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { @@ -207,7 +225,7 @@ public: } F32 right_x; - mStyle->getFont()->render(mLabel, 0, image_rect.mRight + EMBEDDED_ITEM_LABEL_PADDING, draw_rect.mBottom, color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::UNDERLINE, LLFontGL::NO_SHADOW, mLabel.length(), S32_MAX, &right_x); + mStyle->getFont()->render(mLabel, 0, image_rect.mRight + EMBEDDED_ITEM_LABEL_PADDING, draw_rect.mTop, color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::UNDERLINE, LLFontGL::NO_SHADOW, mLabel.length(), S32_MAX, &right_x); return right_x; } @@ -505,19 +523,17 @@ LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const } break; - case LLAssetType::AT_SOUND: img_name = "Inv_Sound"; break; + case LLAssetType::AT_SOUND: img_name = "Inv_Sound"; break; case LLAssetType::AT_CLOTHING: img_name = "Inv_Clothing"; break; - case LLAssetType::AT_OBJECT: img_name = "Inv_Object"; break; + case LLAssetType::AT_OBJECT: img_name = "Inv_Object"; break; case LLAssetType::AT_CALLINGCARD: img_name = "Inv_CallingCard"; break; - case LLAssetType::AT_LANDMARK: img_name = "Inv_Landmark"; break; + case LLAssetType::AT_LANDMARK: img_name = "Inv_Landmark"; break; case LLAssetType::AT_NOTECARD: img_name = "Inv_Notecard"; break; case LLAssetType::AT_LSL_TEXT: img_name = "Inv_Script"; break; - case LLAssetType::AT_BODYPART: img_name = "Inv_Skin"; break; - case LLAssetType::AT_ANIMATION: img_name = "Inv_Animation";break; - case LLAssetType::AT_GESTURE: img_name = "Inv_Gesture"; break; - //TODO need img_name - case LLAssetType::AT_FAVORITE: img_name = "Inv_Landmark"; break; - default: llassert(0); + case LLAssetType::AT_BODYPART: img_name = "Inv_Skin"; break; + case LLAssetType::AT_ANIMATION: img_name = "Inv_Animation"; break; + case LLAssetType::AT_GESTURE: img_name = "Inv_Gesture"; break; + default: llassert(0); } return LLUI::getUIImage(img_name); @@ -732,11 +748,10 @@ BOOL LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask) if( LLToolDragAndDrop::getInstance()->isOverThreshold( screen_x, screen_y ) ) { LLToolDragAndDrop::getInstance()->beginDrag( - LLAssetType::lookupDragAndDropType( mDragItem->getType() ), + LLViewerAssetType::lookupDragAndDropType( mDragItem->getType() ), mDragItem->getUUID(), LLToolDragAndDrop::SOURCE_NOTECARD, mPreviewID, mObjectID); - return LLToolDragAndDrop::getInstance()->handleHover( x, y, mask ); } getWindow()->setCursor(UI_CURSOR_HAND); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 758bf8c1aa..b2d7d71b53 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -60,6 +60,8 @@ #include "llviewercontrol.h" #include "pipeline.h" #include "llappviewer.h" +#include "llface.h" +#include "llviewercamera.h" #include "lltextureatlas.h" #include "lltextureatlasmanager.h" #include "lltextureentry.h" @@ -88,7 +90,15 @@ S32 LLViewerTexture::sTotalTextureMemoryInBytes = 0; S32 LLViewerTexture::sMaxBoundTextureMemInMegaBytes = 0; S32 LLViewerTexture::sMaxTotalTextureMemInMegaBytes = 0; S32 LLViewerTexture::sMaxDesiredTextureMemInBytes = 0 ; -BOOL LLViewerTexture::sDontLoadVolumeTextures = FALSE; +S8 LLViewerTexture::sCameraMovingDiscardBias = 0 ; +S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size +const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64 ; +const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez ; +const S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128 ; +S32 LLViewerTexture::sMinLargeImageSize = 65536 ; //256 * 256. +S32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA ; +BOOL LLViewerTexture::sFreezeImageScalingDown = FALSE ; +F32 LLViewerTexture::sCurrentTime = 0.0f ; BOOL LLViewerTexture::sUseTextureAtlas = FALSE ; const F32 desired_discard_bias_min = -2.0f; // -max number of levels to improve image quality by @@ -162,6 +172,7 @@ LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(BOOL usemipma if(generate_gl_tex) { tex->generateGLTexture() ; + tex->setCategory(LLViewerTexture::LOCAL) ; } return tex ; } @@ -171,12 +182,14 @@ LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLUUID& if(generate_gl_tex) { tex->generateGLTexture() ; + tex->setCategory(LLViewerTexture::LOCAL) ; } return tex ; } LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLImageRaw* raw, BOOL usemipmaps) { LLPointer<LLViewerTexture> tex = new LLViewerTexture(raw, usemipmaps) ; + tex->setCategory(LLViewerTexture::LOCAL) ; return tex ; } LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex) @@ -185,6 +198,7 @@ LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 wid if(generate_gl_tex) { tex->generateGLTexture() ; + tex->setCategory(LLViewerTexture::LOCAL) ; } return tex ; } @@ -198,6 +212,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture( LLGLenum primary_format, LLHost request_from_host) { + llassert_always(boost_priority >= LLViewerTexture::BOOST_NONE) ; return gTextureList.getImage(image_id, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ; } @@ -210,9 +225,23 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile( LLGLenum primary_format, const LLUUID& force_id) { + llassert_always(boost_priority >= LLViewerTexture::BOOST_NONE) ; return gTextureList.getImageFromFile(filename, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ; } +//static +LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string& url, + BOOL usemipmaps, + S32 boost_priority, + S8 texture_type, + LLGLint internal_format, + LLGLenum primary_format, + const LLUUID& force_id + ) +{ + return gTextureList.getImageFromUrl(url, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ; +} + LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const LLUUID& image_id, LLHost host) { return gTextureList.getImageFromHost(image_id, host) ; @@ -254,12 +283,13 @@ void LLViewerTextureManager::init() } imagep->createGLTexture(0, image_raw); image_raw = NULL; - LLViewerFetchedTexture::sDefaultImagep->dontDiscard(); #else - LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE); + LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI); #endif - - LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, TRUE, TRUE); + LLViewerFetchedTexture::sDefaultImagep->dontDiscard(); + LLViewerFetchedTexture::sDefaultImagep->setCategory(LLViewerTexture::OTHER) ; + + LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, TRUE, LLViewerTexture::BOOST_UI); LLViewerFetchedTexture::sSmokeImagep->setNoDelete() ; LLViewerTexture::initClass() ; @@ -282,6 +312,8 @@ void LLViewerTextureManager::cleanup() LLViewerFetchedTexture::sWhiteImagep = NULL; LLViewerMediaTexture::cleanup() ; + + LLViewerTexture::cleanupClass() ; } //---------------------------------------------------------------------------------------------- @@ -292,6 +324,11 @@ void LLViewerTextureManager::cleanup() void LLViewerTexture::initClass() { LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture() ; + + if(gAuditTexture) + { + LLImageGL::setHighlightTexture(LLViewerTexture::OTHER) ; + } } // static @@ -299,6 +336,25 @@ void LLViewerTexture::cleanupClass() { } +// static +S32 LLViewerTexture::getTotalNumOfCategories() +{ + return MAX_GL_IMAGE_CATEGORY - (BOOST_HIGH - BOOST_SCULPTED) + 2 ; +} + +// static +//index starts from zero. +S32 LLViewerTexture::getIndexFromCategory(S32 category) +{ + return (category < BOOST_HIGH) ? category : category - (BOOST_HIGH - BOOST_SCULPTED) + 1 ; +} + +//static +S32 LLViewerTexture::getCategoryFromIndex(S32 index) +{ + return (index < BOOST_HIGH) ? index : index + (BOOST_HIGH - BOOST_SCULPTED) - 1 ; +} + // tuning params const F32 discard_bias_delta = .05f; const F32 discard_delta_time = 0.5f; @@ -310,6 +366,8 @@ F32 texmem_middle_bound_scale = 0.925f; //static void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity) { + sCurrentTime = gFrameTimeSeconds ; + if(LLViewerTextureManager::sTesterp) { LLViewerTextureManager::sTesterp->update() ; @@ -350,6 +408,13 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity } sDesiredDiscardBias = llclamp(sDesiredDiscardBias, desired_discard_bias_min, desired_discard_bias_max); LLViewerTexture::sUseTextureAtlas = gSavedSettings.getBOOL("EnableTextureAtlas") ; + + F32 camera_moving_speed = LLViewerCamera::getInstance()->getAverageSpeed() ; + F32 camera_angular_speed = LLViewerCamera::getInstance()->getAverageAngularSpeed(); + sCameraMovingDiscardBias = (S8)llmax(0.2f * camera_moving_speed, 2.0f * camera_angular_speed - 1) ; + + LLViewerTexture::sFreezeImageScalingDown = (BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) < 0.75f * sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale) && + (BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) < 0.75f * sMaxTotalTextureMemInMegaBytes * texmem_middle_bound_scale) ; } //end of static functions @@ -415,7 +480,9 @@ void LLViewerTexture::init(bool firstinit) mTextureState = NO_DELETE ; mDontDiscard = FALSE; mMaxVirtualSize = 0.f; + mNeedsGLTexture = FALSE ; mNeedsResetMaxVirtualSize = FALSE ; + mAdditionalDecodePriority = 0.f ; mParcelMedia = NULL ; } @@ -457,11 +524,15 @@ void LLViewerTexture::setBoostLevel(S32 level) { setNoDelete() ; } + if(gAuditTexture) + { + setCategory(mBoostLevel); + } } } -bool LLViewerTexture::bindDefaultImage(S32 stage) const +bool LLViewerTexture::bindDefaultImage(S32 stage) { if (stage < 0) return false; @@ -480,6 +551,10 @@ bool LLViewerTexture::bindDefaultImage(S32 stage) const llwarns << "LLViewerTexture::bindDefaultImage failed." << llendl; } stop_glerror(); + + //check if there is cached raw image and switch to it if possible + switchToCachedImage() ; + if(LLViewerTextureManager::sTesterp) { LLViewerTextureManager::sTesterp->updateGrayTextureBinding() ; @@ -498,24 +573,32 @@ void LLViewerTexture::forceImmediateUpdate() { } -void LLViewerTexture::addTextureStats(F32 virtual_size) const +void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const { - if (virtual_size > mMaxVirtualSize) + if(needs_gltexture) { - mMaxVirtualSize = virtual_size; + mNeedsGLTexture = TRUE ; } -} -void LLViewerTexture::resetTextureStats(BOOL zero) -{ - if (zero) + if(mNeedsResetMaxVirtualSize) { - mMaxVirtualSize = 0.0f; + //flag to reset the values because the old values are used. + mNeedsResetMaxVirtualSize = FALSE ; + mMaxVirtualSize = virtual_size; + mAdditionalDecodePriority = 0.f ; + mNeedsGLTexture = needs_gltexture ; } - else + else if (virtual_size > mMaxVirtualSize) { - mMaxVirtualSize -= mMaxVirtualSize * .10f; // decay by 5%/update - } + mMaxVirtualSize = virtual_size; + } +} + +void LLViewerTexture::resetTextureStats() +{ + mMaxVirtualSize = 0.0f; + mAdditionalDecodePriority = 0.f ; + mNeedsResetMaxVirtualSize = FALSE ; } //virtual @@ -542,6 +625,12 @@ void LLViewerTexture::removeFace(LLFace* facep) mFaceList.remove(facep) ; } +//virtual +void LLViewerTexture::switchToCachedImage() +{ + //nothing here. +} + void LLViewerTexture::forceActive() { mTextureState = ACTIVE ; @@ -586,11 +675,11 @@ BOOL LLViewerTexture::createGLTexture() return mGLTexturep->createGLTexture() ; } -BOOL LLViewerTexture::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename) +BOOL LLViewerTexture::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename, BOOL to_create, S32 category) { llassert_always(mGLTexturep.notNull()) ; - BOOL ret = mGLTexturep->createGLTexture(discard_level, imageraw, usename) ; + BOOL ret = mGLTexturep->createGLTexture(discard_level, imageraw, usename, to_create, category) ; if(ret) { @@ -702,6 +791,13 @@ void LLViewerTexture::setGLTextureCreated (bool initialized) mGLTexturep->setGLTextureCreated (initialized) ; } +void LLViewerTexture::setCategory(S32 category) +{ + llassert_always(mGLTexturep.notNull()) ; + + mGLTexturep->setCategory(category) ; +} + LLTexUnit::eTextureAddressMode LLViewerTexture::getAddressMode(void) const { llassert_always(mGLTexturep.notNull()) ; @@ -750,18 +846,18 @@ BOOL LLViewerTexture::getMissed() const return mGLTexturep->getMissed() ; } -BOOL LLViewerTexture::isValidForSculpt(S32 discard_level, S32 image_width, S32 image_height, S32 ncomponents) +BOOL LLViewerTexture::isJustBound() const { llassert_always(mGLTexturep.notNull()) ; - return mGLTexturep->isValidForSculpt(discard_level, image_width, image_height, ncomponents) ; + return mGLTexturep->isJustBound() ; } -BOOL LLViewerTexture::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const +void LLViewerTexture::forceUpdateBindStats(void) const { llassert_always(mGLTexturep.notNull()) ; - return mGLTexturep->readBackRaw(discard_level, imageraw, compressed_ok) ; + return mGLTexturep->forceUpdateBindStats() ; } U32 LLViewerTexture::getTexelsInAtlas() const @@ -801,6 +897,11 @@ void LLViewerTexture::destroyGLTexture() } } +BOOL LLViewerTexture::isLargeImage() +{ + return mFullWidth * mFullHeight > LLViewerTexture::sMinLargeImageSize ; +} + //virtual void LLViewerTexture::updateBindStatsForTester() { @@ -821,11 +922,12 @@ void LLViewerTexture::updateBindStatsForTester() //static F32 LLViewerFetchedTexture::maxDecodePriority() { - return 2000000.f; + return 6000000.f; } -LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, BOOL usemipmaps) - : LLViewerTexture(id, usemipmaps) +LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, const LLHost& host, BOOL usemipmaps) + : LLViewerTexture(id, usemipmaps), + mTargetHost(host) { init(TRUE) ; generateGLTexture() ; @@ -837,9 +939,9 @@ LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw* raw, BOOL usemi init(TRUE) ; } -LLViewerFetchedTexture::LLViewerFetchedTexture(const std::string& full_path, const LLUUID& id, BOOL usemipmaps) +LLViewerFetchedTexture::LLViewerFetchedTexture(const std::string& url, const LLUUID& id, BOOL usemipmaps) : LLViewerTexture(id, usemipmaps), - mLocalFileName(full_path) + mUrl(url) { init(TRUE) ; generateGLTexture() ; @@ -888,6 +990,16 @@ void LLViewerFetchedTexture::init(bool firstinit) mVisibleFrame = 0; mForSculpt = FALSE ; mIsFetched = FALSE ; + + mCachedRawImage = NULL ; + mCachedRawDiscardLevel = -1 ; + mCachedRawImageReady = FALSE ; + + mSavedRawImage = NULL ; + mForceToSaveRawImage = FALSE ; + mSavedRawDiscardLevel = -1 ; + mDesiredSavedRawDiscardLevel = -1 ; + mLastReferencedSavedRawImageTime = 0.0f ; } LLViewerFetchedTexture::~LLViewerFetchedTexture() @@ -924,11 +1036,25 @@ void LLViewerFetchedTexture::cleanup() // Clean up image data destroyRawImage(); + mCachedRawImage = NULL ; + mCachedRawDiscardLevel = -1 ; + mCachedRawImageReady = FALSE ; + mSavedRawImage = NULL ; } void LLViewerFetchedTexture::setForSculpt() { mForSculpt = TRUE ; + if(isForSculptOnly() && !getBoundRecently()) + { + destroyGLTexture() ; //sculpt image does not need gl texture. + } + checkCachedRawSculptImage() ; +} + +BOOL LLViewerFetchedTexture::isForSculptOnly() const +{ + return mForSculpt && !mNeedsGLTexture ; } BOOL LLViewerFetchedTexture::isDeleted() @@ -963,17 +1089,37 @@ void LLViewerFetchedTexture::setInactive() } } +BOOL LLViewerFetchedTexture::isFullyLoaded() const +{ + // Unfortunately, the boolean "mFullyLoaded" is never updated correctly so we use that logic + // to check if the texture is there and completely downloaded + return (mFullWidth != 0) && (mFullHeight != 0) && !mIsFetching && !mHasFetcher; +} + + // virtual void LLViewerFetchedTexture::dump() { LLViewerTexture::dump(); - llinfos << "LLViewerFetchedTexture" - << " mIsMissingAsset " << (S32)mIsMissingAsset - << " mFullWidth " << mFullWidth - << " mFullHeight " << mFullHeight - << " mOrigWidth" << mOrigWidth - << " mOrigHeight" << mOrigHeight + llinfos << "Dump : " << mID + << ", mIsMissingAsset = " << (S32)mIsMissingAsset + << ", mFullWidth = " << (S32)mFullWidth + << ", mFullHeight = " << (S32)mFullHeight + << ", mOrigWidth = " << (S32)mOrigWidth + << ", mOrigHeight = " << (S32)mOrigHeight + << llendl; + llinfos << " : " + << " mFullyLoaded = " << (S32)mFullyLoaded + << ", mFetchState = " << (S32)mFetchState + << ", mFetchPriority = " << (S32)mFetchPriority + << ", mDownloadProgress = " << (F32)mDownloadProgress + << llendl; + llinfos << " : " + << " mHasFetcher = " << (S32)mHasFetcher + << ", mIsFetching = " << (S32)mIsFetching + << ", mIsFetched = " << (S32)mIsFetched + << ", mBoostLevel = " << (S32)mBoostLevel << llendl; } @@ -994,6 +1140,75 @@ void LLViewerFetchedTexture::destroyTexture() mFullyLoaded = FALSE ; } +// +//do not change the discard level of the loaded texture image. +BOOL LLViewerFetchedTexture::keepReuestedDiscardLevel() +{ + if (!mLoadedCallbackList.empty()) + { + return TRUE ; + } + + return FALSE ; +} + +void LLViewerFetchedTexture::addToCreateTexture() +{ + if(isForSculptOnly()) + { + //just update some variables, not to create a real GL texture. + createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE) ; + mNeedsCreateTexture = FALSE ; + destroyRawImage(); + } + else + { +#if 1 + // + //if mRequestedDiscardLevel > mDesiredDiscardLevel, we assume the required image res keep going up, + //so do not scale down the over qualified image. + //Note: scaling down image is expensensive. Do it only when very necessary. + // + if(mRequestedDiscardLevel <= mDesiredDiscardLevel && !keepReuestedDiscardLevel()) + { + S32 w = mFullWidth >> mRawDiscardLevel; + S32 h = mFullHeight >> mRawDiscardLevel; + + //if big image, do not load extra data + //scale it down to size >= LLViewerTexture::sMinLargeImageSize + if(w * h > LLViewerTexture::sMinLargeImageSize) + { + S32 d_level = llmin(mRequestedDiscardLevel, (S32)mDesiredDiscardLevel) - mRawDiscardLevel ; + + if(d_level > 0) + { + S32 i = 0 ; + while((d_level > 0) && ((w >> i) * (h >> i) > LLViewerTexture::sMinLargeImageSize)) + { + i++; + d_level--; + } + if(i > 0) + { + mRawDiscardLevel += i ; + if(mRawDiscardLevel >= getDiscardLevel() && getDiscardLevel() > 0) + { + mNeedsCreateTexture = FALSE ; + destroyRawImage(); + return ; + } + mRawImage->scale(w >> i, h >> i) ; + } + } + } + } +#endif + mNeedsCreateTexture = TRUE; + gTextureList.mCreateTextureList.insert(this); + } + return ; +} + // ONLY called from LLViewerTextureList BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) { @@ -1015,7 +1230,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) if (!gNoRender) { // store original size only for locally-sourced images - if (!mLocalFileName.empty()) + if (mUrl.compare(0, 7, "file://") == 0) { mOrigWidth = mRawImage->getWidth(); mOrigHeight = mRawImage->getHeight(); @@ -1061,7 +1276,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) if(!(res = insertToAtlas())) { - res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename); + res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel); resetFaceAtlas() ; } setActive() ; @@ -1115,7 +1330,15 @@ void LLViewerFetchedTexture::processTextureStats() return ; } - if(!mFullWidth || !mFullHeight) + updateVirtualSize() ; + + static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes"); + + if (textures_fullres) + { + mDesiredDiscardLevel = 0; + } + else if(!mFullWidth || !mFullHeight) { mDesiredDiscardLevel = getMaxDiscardLevel() ; } @@ -1175,8 +1398,11 @@ F32 LLViewerFetchedTexture::calcDecodePriority() { return mDecodePriority; // no change while waiting to create } - - F32 priority; + if(mForceToSaveRawImage) + { + return maxDecodePriority() ; + } + S32 cur_discard = getDiscardLevel(); bool have_all_data = (cur_discard >= 0 && (cur_discard <= mDesiredDiscardLevel)); F32 pixel_priority = fsqrtf(mMaxVirtualSize); @@ -1186,11 +1412,24 @@ F32 LLViewerFetchedTexture::calcDecodePriority() { mVisibleFrame = mDecodeFrame; } - + + F32 priority; if (mIsMissingAsset) { priority = 0.0f; } + else if(mDesiredDiscardLevel >= cur_discard && cur_discard > -1) + { + priority = -1.0f ; + } + else if (!isJustBound() && mCachedRawImageReady && !mBoostLevel) + { + priority = -1.0f; + } + else if(mCachedRawDiscardLevel > -1 && mDesiredDiscardLevel >= mCachedRawDiscardLevel) + { + priority = -1.0f; + } else if (mDesiredDiscardLevel > getMaxDiscardLevel()) { // Don't decode anything we don't need @@ -1240,7 +1479,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() { ddiscard+=2; } - else if (mGLTexturep.notNull() && !mGLTexturep->getBoundRecently() && mBoostLevel == 0) + else if (ddiscard > 2 && mGLTexturep.notNull() && !mGLTexturep->getBoundRecently() && mBoostLevel == LLViewerTexture::BOOST_NONE) { ddiscard-=2; } @@ -1249,14 +1488,23 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } if (priority > 0.0f) { - pixel_priority = llclamp(pixel_priority, 0.0f, priority-1.f); // priority range = 100000-900000 + // priority range = 100000-900000 + pixel_priority = llclamp(pixel_priority, 0.0f, priority-1.f); + + // priority range = [100000.f, 2000000.f] if ( mBoostLevel > BOOST_HIGH) { - priority = 1000000.f + pixel_priority + 1000.f * mBoostLevel; + priority = 1000000.f + pixel_priority + 1000.f * (mBoostLevel - LLViewerTexture::BOOST_NONE); } else { - priority += 0.f + pixel_priority + 1000.f * mBoostLevel; + priority += 0.f + pixel_priority + 1000.f * (mBoostLevel - LLViewerTexture::BOOST_NONE); + } + + // priority range = [2100000.f, 5000000.f] if mAdditionalDecodePriority > 1.0 + if(mAdditionalDecodePriority > 1.0f) + { + priority += 2000000.f + mAdditionalDecodePriority ; } } return priority; @@ -1269,6 +1517,40 @@ void LLViewerFetchedTexture::setDecodePriority(F32 priority) mDecodePriority = priority; } +F32 LLViewerFetchedTexture::maxAdditionalDecodePriority() +{ + return 2000000.f; +} +void LLViewerFetchedTexture::setAdditionalDecodePriority(F32 priority) +{ + priority *= maxAdditionalDecodePriority(); + if(mAdditionalDecodePriority < priority) + { + mAdditionalDecodePriority = priority; + } +} + +void LLViewerFetchedTexture::updateVirtualSize() +{ + if(mNeedsResetMaxVirtualSize) + { + addTextureStats(0.f, FALSE) ;//reset + } + if(mFaceList.size() > 0) + { + for(std::list<LLFace*>::iterator iter = mFaceList.begin(); iter != mFaceList.end(); ++iter) + { + LLFace* facep = *iter ; + if(facep->getDrawable()->isRecentlyVisible()) + { + addTextureStats(facep->getVirtualSize()) ; + setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + } + } + } + mNeedsResetMaxVirtualSize = TRUE ; +} + bool LLViewerFetchedTexture::updateFetch() { mFetchState = 0; @@ -1308,6 +1590,15 @@ bool LLViewerFetchedTexture::updateFetch() { // Sets mRawDiscardLevel, mRawImage, mAuxRawImage S32 fetch_discard = current_discard; + + if(mForceToSaveRawImage) + { + if(fetch_discard >= 0) + { + fetch_discard = llmax(fetch_discard, mSavedRawDiscardLevel) ; + } + } + if (mRawImage.notNull()) sRawCount--; if (mAuxRawImage.notNull()) sAuxCount--; bool finished = LLAppViewer::getTextureFetch()->getRequestFinished(getID(), fetch_discard, mRawImage, mAuxRawImage); @@ -1347,11 +1638,24 @@ bool LLViewerFetchedTexture::updateFetch() (*iter)->dirtyTexture() ; } } - mIsRawImageValid = TRUE; - gTextureList.mCreateTextureList.insert(this); - mNeedsCreateTexture = TRUE; mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; mFullHeight = mRawImage->getHeight() << mRawDiscardLevel; + + if(mFullWidth > MAX_IMAGE_SIZE || mFullHeight > MAX_IMAGE_SIZE) + { + //discard all oversized textures. + destroyRawImage(); + setIsMissingAsset(); + mRawDiscardLevel = INVALID_DISCARD_LEVEL ; + mIsFetching = FALSE ; + } + else + { + mIsRawImageValid = TRUE; + addToCreateTexture() ; + } + + return TRUE ; } else { @@ -1374,13 +1678,13 @@ bool LLViewerFetchedTexture::updateFetch() } else { - llwarns << mID << ": Setting min discard to " << current_discard << llendl; + //llwarns << mID << ": Setting min discard to " << current_discard << llendl; mMinDiscardLevel = current_discard; desired_discard = current_discard; } destroyRawImage(); } - else if (mRawImage.isNull()) + else if (mRawImage.notNull()) { // We have data, but our fetch failed to return raw data // *TODO: FIgure out why this is happening and fix it @@ -1389,12 +1693,29 @@ bool LLViewerFetchedTexture::updateFetch() } else { +// // Useful debugging code for undesired deprioritization of textures. +// if (decode_priority <= 0.0f && desired_discard >= 0 && desired_discard < current_discard) +// { +// llinfos << "Calling updateRequestPriority() with decode_priority = 0.0f" << llendl; +// calcDecodePriority(); +// } LLAppViewer::getTextureFetch()->updateRequestPriority(mID, decode_priority); } } - bool make_request = true; - + if (!mDontDiscard) + { + if (mBoostLevel == 0) + { + desired_discard = llmax(desired_discard, current_discard-1); + } + else + { + desired_discard = llmax(desired_discard, current_discard-2); + } + } + + bool make_request = true; if (decode_priority <= 0) { make_request = false; @@ -1407,6 +1728,10 @@ bool LLViewerFetchedTexture::updateFetch() { make_request = false; } + else if (!isJustBound() && mCachedRawImageReady) + { + make_request = false; + } else { if (mIsFetching) @@ -1434,33 +1759,12 @@ bool LLViewerFetchedTexture::updateFetch() h = mGLTexturep->getHeight(0); c = mComponents; } - if (!mDontDiscard) - { - if (mBoostLevel == 0) - { - desired_discard = llmax(desired_discard, current_discard-1); - } - else - { - desired_discard = llmax(desired_discard, current_discard-2); - } - } - + // bypass texturefetch directly by pulling from LLTextureCache bool fetch_request_created = false; - if (mLocalFileName.empty()) - { - fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(getID(), getTargetHost(), decode_priority, - w, h, c, desired_discard, - needsAux()); - } - else - { - fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(mLocalFileName, getID(),getTargetHost(), decode_priority, - w, h, c, desired_discard, - needsAux()); - } - + fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(mUrl, getID(),getTargetHost(), decode_priority, + w, h, c, desired_discard, needsAux()); + if (fetch_request_created) { mHasFetcher = TRUE; @@ -1490,9 +1794,82 @@ bool LLViewerFetchedTexture::updateFetch() return mIsFetching ? true : false; } +// +//force to fetch a new raw image for this texture +// +BOOL LLViewerFetchedTexture::forceFetch() +{ + if(!mForceToSaveRawImage) + { + return false ; + } + if(mDesiredSavedRawDiscardLevel < getDiscardLevel()) + { + //no need to force fetching. normal fetching flow will do the work. + //return false ; + } + if (mNeedsCreateTexture) + { + // We may be fetching still (e.g. waiting on write) + // but don't check until we've processed the raw data we have + //return false; + } + if(mIsFetching) + { + return false ; + } + if (mIsMissingAsset) + { + mForceToSaveRawImage = false ; + llassert_always(!mHasFetcher); + return false; // skip + } + if (!mLoadedCallbackList.empty() && mRawImage.notNull()) + { + return false; // process any raw image data in callbacks before replacing + } + if(mRawImage.notNull() && mRawDiscardLevel <= mDesiredSavedRawDiscardLevel) + { + return false ; // mRawImage is enough + } + + S32 desired_discard = mDesiredSavedRawDiscardLevel ; + S32 current_discard = getDiscardLevel(); + + bool fetch_request_created = false; + S32 w=0, h=0, c=0; + if (current_discard >= 0) + { + w = getWidth(0); + h = getHeight(0); + c = getComponents(); + } + fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(mUrl, getID(),getTargetHost(), maxDecodePriority(), + w, h, c, desired_discard, needsAux()); + + if (fetch_request_created) + { + mHasFetcher = TRUE; + mIsFetching = TRUE; + mRequestedDiscardLevel = desired_discard ; + + mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority, + mFetchPriority, mFetchDeltaTime, mRequestDeltaTime); + } + + return mIsFetching ? true : false; +} + void LLViewerFetchedTexture::setIsMissingAsset() { - llwarns << mLocalFileName << " " << mID << ": Marking image as missing" << llendl; + if (mUrl.empty()) + { + llwarns << mID << ": Marking image as missing" << llendl; + } + else + { + llwarns << mUrl << ": Marking image as missing" << llendl; + } if (mHasFetcher) { LLAppViewer::getTextureFetch()->deleteRequest(getID(), true); @@ -1514,7 +1891,13 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call { // Put in list to call this->doLoadedCallbacks() periodically gTextureList.mCallbackList.insert(this); + mLoadedCallbackDesiredDiscardLevel = (S8)discard_level; + } + else + { + mLoadedCallbackDesiredDiscardLevel = llmin(mLoadedCallbackDesiredDiscardLevel, (S8)discard_level) ; } + LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata); mLoadedCallbackList.push_back(entryp); mNeedsAux |= needs_aux; @@ -1643,7 +2026,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() // We have GL data. destroyRawImage(); - readBackRawImage(gl_discard); + reloadRawImage(mLoadedCallbackDesiredDiscardLevel); llassert_always(mRawImage.notNull()); llassert_always(!mNeedsAux || mAuxRawImage.notNull()); } @@ -1752,8 +2135,7 @@ void LLViewerFetchedTexture::forceImmediateUpdate() return ; } -// Was in LLImageGL -LLImageRaw* LLViewerFetchedTexture::readBackRawImage(S8 discard_level) +LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level) { llassert_always(mGLTexturep.notNull()) ; llassert_always(discard_level >= 0); @@ -1763,25 +2145,216 @@ LLImageRaw* LLViewerFetchedTexture::readBackRawImage(S8 discard_level) llerrs << "called with existing mRawImage" << llendl; mRawImage = NULL; } - mRawImage = new LLImageRaw(mGLTexturep->getWidth(discard_level), mGLTexturep->getHeight(discard_level), mComponents); - sRawCount++; - mRawDiscardLevel = discard_level; - mGLTexturep->readBackRaw(mRawDiscardLevel, mRawImage, false); - mIsRawImageValid = TRUE; + + if(mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= discard_level) + { + mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()) ; + mRawImage->copy(getSavedRawImage()) ; + mRawDiscardLevel = discard_level ; + } + else + { + //force to fetch raw image again if cached raw image is not good enough. + if(mCachedRawDiscardLevel > discard_level) + { + mRawImage = mCachedRawImage ; + mRawDiscardLevel = mCachedRawDiscardLevel; + + forceToSaveRawImage(discard_level) ; + } + else //cached raw image is good enough, copy it. + { + mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()) ; + mRawImage->copy(mCachedRawImage) ; + mRawDiscardLevel = discard_level ; + } + } + mIsRawImageValid = TRUE ; + sRawCount++; return mRawImage; } void LLViewerFetchedTexture::destroyRawImage() -{ - if (mRawImage.notNull()) sRawCount--; +{ if (mAuxRawImage.notNull()) sAuxCount--; + + if (mRawImage.notNull()) + { + sRawCount--; + setCachedRawImage() ; + + if(mForceToSaveRawImage) + { + saveRawImage() ; + } + } + mRawImage = NULL; mAuxRawImage = NULL; mIsRawImageValid = FALSE; mRawDiscardLevel = INVALID_DISCARD_LEVEL; + + if(mForceToSaveRawImage) + { + forceFetch() ; + } +} + +//use the mCachedRawImage to (re)generate the gl texture. +//virtual +void LLViewerFetchedTexture::switchToCachedImage() +{ + if(mCachedRawImage.notNull()) + { + mRawImage = mCachedRawImage ; + + if (getComponents() != mRawImage->getComponents()) + { + // We've changed the number of components, so we need to move any + // objects using this pool to a different pool. + mComponents = mRawImage->getComponents(); + mGLTexturep->setComponents(mComponents) ; + gTextureList.dirtyImage(this); + } + + mIsRawImageValid = TRUE; + mRawDiscardLevel = mCachedRawDiscardLevel ; + gTextureList.mCreateTextureList.insert(this); + mNeedsCreateTexture = TRUE; + } +} + +void LLViewerFetchedTexture::setCachedRawImage() +{ + if(mRawImage == mCachedRawImage) + { + return ; + } + if(!mIsRawImageValid) + { + return ; + } + + if(mCachedRawImageReady) + { + return ; + } + + if(mCachedRawDiscardLevel < 0 || mCachedRawDiscardLevel > mRawDiscardLevel) + { + S32 i = 0 ; + S32 w = mRawImage->getWidth() ; + S32 h = mRawImage->getHeight() ; + + S32 max_size = MAX_CACHED_RAW_IMAGE_AREA ; + if(LLViewerTexture::BOOST_TERRAIN == mBoostLevel) + { + max_size = MAX_CACHED_RAW_TERRAIN_IMAGE_AREA ; + } + if(mForSculpt) + { + max_size = MAX_CACHED_RAW_SCULPT_IMAGE_AREA ; + mCachedRawImageReady = !mRawDiscardLevel ; + } + else + { + mCachedRawImageReady = (!mRawDiscardLevel || ((w * h) >= max_size)) ; + } + + while(((w >> i) * (h >> i)) > max_size) + { + ++i ; + } + + if(i) + { + if(!(w >> i) || !(h >> i)) + { + --i ; + } + //if(mForSculpt) + //{ + // mRawImage->scaleDownWithoutBlending(w >> i, h >> i) ; + //} + //else + { + mRawImage->scale(w >> i, h >> i) ; + } + } + mCachedRawImage = mRawImage ; + mCachedRawDiscardLevel = mRawDiscardLevel + i ; + } +} + +void LLViewerFetchedTexture::checkCachedRawSculptImage() +{ + if(mCachedRawImageReady && mCachedRawDiscardLevel > 0) + { + if(getDiscardLevel() != 0) + { + mCachedRawImageReady = FALSE ; + } + else if(isForSculptOnly()) + { + resetTextureStats() ; //do not update this image any more. + } + } } +void LLViewerFetchedTexture::saveRawImage() +{ + if(mRawImage.isNull() || mSavedRawDiscardLevel == mRawDiscardLevel) + { + return ; + } + + mSavedRawDiscardLevel = mRawDiscardLevel ; + mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents()) ; + + if(mSavedRawDiscardLevel <= mDesiredSavedRawDiscardLevel) + { + mForceToSaveRawImage = FALSE ; + } + + mLastReferencedSavedRawImageTime = sCurrentTime ; +} + +void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard) +{ + if(!mForceToSaveRawImage && (mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard)) + { + mForceToSaveRawImage = TRUE ; + mDesiredSavedRawDiscardLevel = desired_discard ; + + forceFetch() ; + } +} +void LLViewerFetchedTexture::destroySavedRawImage() +{ + mSavedRawImage = NULL ; + mForceToSaveRawImage = FALSE ; + mSavedRawDiscardLevel = -1 ; + mDesiredSavedRawDiscardLevel = -1 ; + mLastReferencedSavedRawImageTime = 0.0f ; +} + +LLImageRaw* LLViewerFetchedTexture::getSavedRawImage() +{ + mLastReferencedSavedRawImageTime = sCurrentTime ; + + return mSavedRawImage ; +} + +BOOL LLViewerFetchedTexture::hasSavedRawImage() const +{ + return mSavedRawImage.notNull() ; +} + +F32 LLViewerFetchedTexture::getElapsedLastReferencedSavedRawImageTime() const +{ + return mLastReferencedSavedRawImageTime - sCurrentTime ; +} //---------------------------------------------------------------------------------------------- //atlasing //---------------------------------------------------------------------------------------------- @@ -1979,14 +2552,14 @@ BOOL LLViewerFetchedTexture::insertToAtlas() //---------------------------------------------------------------------------------------------- //start of LLViewerLODTexture //---------------------------------------------------------------------------------------------- -LLViewerLODTexture::LLViewerLODTexture(const LLUUID& id, BOOL usemipmaps) - : LLViewerFetchedTexture(id, usemipmaps) +LLViewerLODTexture::LLViewerLODTexture(const LLUUID& id, const LLHost& host, BOOL usemipmaps) + : LLViewerFetchedTexture(id, host, usemipmaps) { init(TRUE) ; } -LLViewerLODTexture::LLViewerLODTexture(const std::string& full_path, const LLUUID& id, BOOL usemipmaps) - : LLViewerFetchedTexture(full_path, id, usemipmaps) +LLViewerLODTexture::LLViewerLODTexture(const std::string& url, const LLUUID& id, BOOL usemipmaps) + : LLViewerFetchedTexture(url, id, usemipmaps) { init(TRUE) ; } @@ -2004,12 +2577,25 @@ S8 LLViewerLODTexture::getType() const return LLViewerTexture::LOD_TEXTURE ; } +BOOL LLViewerLODTexture::isUpdateFrozen() +{ + return LLViewerTexture::sFreezeImageScalingDown && !getDiscardLevel() ; +} + // This is gauranteed to get called periodically for every texture //virtual void LLViewerLODTexture::processTextureStats() { + updateVirtualSize() ; + + static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes"); + + if (textures_fullres) + { + mDesiredDiscardLevel = 0; + } // Generate the request priority and render priority - if (mDontDiscard || !mUseMipMaps) + else if (mDontDiscard || !mUseMipMaps) { mDesiredDiscardLevel = 0; if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) @@ -2038,13 +2624,7 @@ void LLViewerLODTexture::processTextureStats() // If we know the output width and height, we can force the discard // level to the correct value, and thus not decode more texture // data than we need to. - /*if (mBoostLevel == LLViewerTexture::BOOST_UI || - mBoostLevel == LLViewerTexture::BOOST_PREVIEW || - mBoostLevel == LLViewerTexture::BOOST_AVATAR_SELF) // what about AVATAR_BAKED_SELF? - { - discard_level = 0; // full res - } - else*/ if (mKnownDrawWidth && mKnownDrawHeight) + if (mKnownDrawWidth && mKnownDrawHeight) { S32 draw_texels = mKnownDrawWidth * mKnownDrawHeight; @@ -2055,6 +2635,12 @@ void LLViewerLODTexture::processTextureStats() } else { + if(isLargeImage() && !isJustBound() && mAdditionalDecodePriority < 1.0f) + { + //if is a big image and not being used recently, nor close to the view point, do not load hi-res data. + mMaxVirtualSize = llmin(mMaxVirtualSize, (F32)LLViewerTexture::sMinLargeImageSize) ; + } + if ((mCalculatedDiscardLevel >= 0.f) && (llabs(mMaxVirtualSize - mDiscardVirtualSize) < mMaxVirtualSize*.20f)) { @@ -2071,13 +2657,11 @@ void LLViewerLODTexture::processTextureStats() } if (mBoostLevel < LLViewerTexture::BOOST_HIGH) { - static const F32 discard_bias = -.5f; // Must be < 1 or highest discard will never load! - discard_level += discard_bias; discard_level += sDesiredDiscardBias; discard_level *= sDesiredDiscardScale; // scale + discard_level += sCameraMovingDiscardBias ; } discard_level = floorf(discard_level); -// discard_level -= (gTextureList.mVideoMemorySetting>>1); // more video ram = higher detail F32 min_discard = 0.f; if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) @@ -2096,46 +2680,39 @@ void LLViewerLODTexture::processTextureStats() // proper action if we don't. // - BOOL increase_discard = FALSE; S32 current_discard = getDiscardLevel(); if ((sDesiredDiscardBias > 0.0f) && (current_discard >= 0 && mDesiredDiscardLevel >= current_discard)) { - if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale) + // Limit the amount of GL memory bound each frame + if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale && + (!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel)) { - // Limit the amount of GL memory bound each frame - if (mDesiredDiscardLevel > current_discard) - { - increase_discard = TRUE; - } - } - if ( BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) > sMaxTotalTextureMemInMegaBytes*texmem_middle_bound_scale) - { - // Only allow GL to have 2x the video card memory - if (!mGLTexturep->getBoundRecently()) - { - increase_discard = TRUE; - } + scaleDown() ; } - if (increase_discard) + // Only allow GL to have 2x the video card memory + else if ( BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) > sMaxTotalTextureMemInMegaBytes*texmem_middle_bound_scale && + (!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel)) { - // llinfos << "DISCARDED: " << mID << " Discard: " << current_discard << llendl; - sBoundTextureMemoryInBytes -= mGLTexturep->mTextureMemory; - sTotalTextureMemoryInBytes -= mGLTexturep->mTextureMemory; - // Increase the discard level (reduce the texture res) - S32 new_discard = current_discard+1; - mGLTexturep->setDiscardLevel(new_discard); - sBoundTextureMemoryInBytes += mGLTexturep->mTextureMemory; - sTotalTextureMemoryInBytes += mGLTexturep->mTextureMemory; - if(LLViewerTextureManager::sTesterp) - { - LLViewerTextureManager::sTesterp->setStablizingTime() ; - } + scaleDown() ; + } } } } +void LLViewerLODTexture::scaleDown() +{ + if(hasGLTexture() && mCachedRawDiscardLevel > getDiscardLevel()) + { + switchToCachedImage() ; + + if(LLViewerTextureManager::sTesterp) + { + LLViewerTextureManager::sTesterp->setStablizingTime() ; + } + } +} //---------------------------------------------------------------------------------------------- //end of LLViewerLODTexture //---------------------------------------------------------------------------------------------- @@ -2224,6 +2801,8 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL setMediaImpl() ; + setCategory(LLViewerTexture::MEDIA) ; + LLViewerTexture* tex = gTextureList.findImage(mID) ; if(tex) //this media is a parcel media for tex. { @@ -2768,7 +3347,7 @@ void LLTexturePipelineTester::updateTextureLoadingStats(const LLViewerFetchedTex mTotalBytesLoadedForLargeImage += data_size ; } - if(imagep->isForSculpt()) + if(imagep->forSculpt()) { mTotalBytesLoadedForSculpties += data_size ; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 020478beef..4da6620658 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -107,11 +107,12 @@ public: enum EBoostLevel { - BOOST_NONE = 0, - BOOST_AVATAR_BAKED = 1, - BOOST_AVATAR = 2, - BOOST_CLOUDS = 3, - BOOST_SCULPTED = 4, + //skip 0 and 1 to avoid mistakenly mixing boost level with boolean numbers. + BOOST_NONE = 2, + BOOST_AVATAR_BAKED = 3, + BOOST_AVATAR = 4, + BOOST_CLOUDS = 5, + BOOST_SCULPTED = 6, BOOST_HIGH = 10, BOOST_TERRAIN = 11, // has to be high priority for minimap / low detail @@ -122,10 +123,23 @@ public: BOOST_UI = 16, BOOST_PREVIEW = 17, BOOST_MAP = 18, - BOOST_AVATAR_SELF = 19, // needed for baking avatar - BOOST_MAX_LEVEL + BOOST_MAP_VISIBLE = 19, + BOOST_AVATAR_SELF = 20, // needed for baking avatar + BOOST_MAX_LEVEL, + + //other texture Categories + LOCAL = BOOST_MAX_LEVEL, + AVATAR_SCRATCH_TEX, + DYNAMIC_TEX, + MEDIA, + ATLAS, + OTHER, + MAX_GL_IMAGE_CATEGORY }; - + static S32 getTotalNumOfCategories() ; + static S32 getIndexFromCategory(S32 category) ; + static S32 getCategoryFromIndex(S32 index) ; + typedef std::list<LLFace*> ll_face_list_t ; protected: @@ -146,7 +160,7 @@ public: virtual BOOL isMissingAsset()const ; virtual void dump(); // debug info to llinfos - /*virtual*/ bool bindDefaultImage(const S32 stage = 0) const ; + /*virtual*/ bool bindDefaultImage(const S32 stage = 0) ; /*virtual*/ void forceImmediateUpdate() ; const LLUUID& getID() const { return mID; } @@ -154,9 +168,9 @@ public: void setBoostLevel(S32 level); S32 getBoostLevel() { return mBoostLevel; } - //maxVirtualSize of the texture - void addTextureStats(F32 virtual_size) const ; - void resetTextureStats(BOOL zero = FALSE); + void addTextureStats(F32 virtual_size, BOOL needs_gltexture = TRUE) const; + void resetTextureStats(); + virtual F32 getMaxVirtualSize() ; LLFrameTimer* getLastReferencedTimer() {return &mLastReferencedTimer ;} @@ -181,7 +195,7 @@ public: BOOL hasGLTexture() const ; LLGLuint getTexName() const ; BOOL createGLTexture() ; - BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0); + BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0, BOOL to_create = TRUE, S32 category = LLViewerTexture::OTHER); void setFilteringOption(LLTexUnit::eTextureFilterOptions option); void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE); @@ -189,7 +203,8 @@ public: BOOL setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height); BOOL setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height); void setGLTextureCreated (bool initialized); - + void setCategory(S32 category) ; + LLTexUnit::eTextureAddressMode getAddressMode(void) const ; S32 getMaxDiscardLevel() const; S32 getDiscardLevel() const; @@ -202,8 +217,8 @@ public: BOOL getMask(const LLVector2 &tc); F32 getTimePassedSinceLastBound(); BOOL getMissed() const ; - BOOL isValidForSculpt(S32 discard_level, S32 image_width, S32 image_height, S32 ncomponents) ; - BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const; + BOOL isJustBound()const ; + void forceUpdateBindStats(void) const; U32 getTexelsInAtlas() const ; U32 getTexelsInGLTexture() const ; @@ -221,6 +236,8 @@ public: BOOL getDontDiscard() const { return mDontDiscard; } //----------------- + BOOL isLargeImage() ; + void setParcelMedia(LLViewerMediaTexture* media) {mParcelMedia = media;} BOOL hasParcelMedia() const { return mParcelMedia != NULL;} LLViewerMediaTexture* getParcelMedia() const { return mParcelMedia;} @@ -233,6 +250,7 @@ protected: private: //note: do not make this function public. /*virtual*/ LLImageGL* getGLTexture() const ; + virtual void switchToCachedImage(); protected: LLUUID mID; @@ -242,7 +260,9 @@ protected: BOOL mUseMipMaps ; S8 mComponents; mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need? + mutable S8 mNeedsGLTexture; mutable BOOL mNeedsResetMaxVirtualSize ; + mutable F32 mAdditionalDecodePriority; // priority add to mDecodePriority. LLFrameTimer mLastReferencedTimer; ll_face_list_t mFaceList ; //reverse pointer pointing to the faces using this image as texture @@ -278,7 +298,12 @@ public: static S32 sMaxBoundTextureMemInMegaBytes; static S32 sMaxTotalTextureMemInMegaBytes; static S32 sMaxDesiredTextureMemInBytes ; - static BOOL sDontLoadVolumeTextures; + static S8 sCameraMovingDiscardBias; + static S32 sMaxSculptRez ; + static S32 sMinLargeImageSize ; + static S32 sMaxSmallImageSize ; + static BOOL sFreezeImageScalingDown ;//do not scale down image res if set. + static F32 sCurrentTime ; static BOOL sUseTextureAtlas ; static LLPointer<LLViewerTexture> sNullImagep; // Null texture for non-textured objects. @@ -298,9 +323,9 @@ class LLViewerFetchedTexture : public LLViewerTexture protected: /*virtual*/ ~LLViewerFetchedTexture(); public: - LLViewerFetchedTexture(const LLUUID& id, BOOL usemipmaps = TRUE); + LLViewerFetchedTexture(const LLUUID& id, const LLHost& host = LLHost::invalid, BOOL usemipmaps = TRUE); LLViewerFetchedTexture(const LLImageRaw* raw, BOOL usemipmaps); - LLViewerFetchedTexture(const std::string& full_path, const LLUUID& id, BOOL usemipmaps = TRUE); + LLViewerFetchedTexture(const std::string& url, const LLUUID& id, BOOL usemipmaps = TRUE); public: static F32 maxDecodePriority(); @@ -336,6 +361,8 @@ public: bool hasCallbacks() { return mLoadedCallbackList.empty() ? false : true; } bool doLoadedCallbacks(); + void addToCreateTexture(); + // ONLY call from LLViewerTextureList BOOL createTexture(S32 usename = 0); void destroyTexture() ; @@ -354,7 +381,12 @@ public: // the priority list, and cause horrible things to happen. void setDecodePriority(F32 priority = -1.0f); F32 getDecodePriority() const { return mDecodePriority; }; + + void setAdditionalDecodePriority(F32 priority) ; + F32 maxAdditionalDecodePriority() ; + void updateVirtualSize() ; + // setDesiredDiscardLevel is only used by LLViewerTextureList void setDesiredDiscardLevel(S32 discard) { mDesiredDiscardLevel = discard; } S32 getDesiredDiscardLevel() { return mDesiredDiscardLevel; } @@ -378,15 +410,15 @@ public: BOOL isInImageList() const {return mInImageList ;} void setInImageList(BOOL flag) {mInImageList = flag ;} - const std::string& getLocalFileName() const {return mLocalFileName ;} LLFrameTimer* getLastPacketTimer() {return &mLastPacketTimer;} U32 getFetchPriority() const { return mFetchPriority ;} F32 getDownloadProgress() const {return mDownloadProgress ;} - LLImageRaw* readBackRawImage(S8 discard_level) ; + LLImageRaw* reloadRawImage(S8 discard_level) ; void destroyRawImage(); + const std::string& getUrl() const {return mUrl;} //--------------- BOOL isDeleted() ; BOOL isInactive() ; @@ -397,13 +429,36 @@ public: //--------------- void setForSculpt(); - BOOL isForSculpt() const {return mForSculpt;} + BOOL forSculpt() const {return mForSculpt;} + BOOL isForSculptOnly() const; + + //raw image management + void checkCachedRawSculptImage() ; + LLImageRaw* getRawImage()const { return mRawImage ;} + S32 getRawImageLevel() const {return mRawDiscardLevel;} + LLImageRaw* getCachedRawImage() const { return mCachedRawImage ;} + S32 getCachedRawImageLevel() const {return mCachedRawDiscardLevel;} + BOOL isCachedRawImageReady() const {return mCachedRawImageReady ;} + BOOL isRawImageValid()const { return mIsRawImageValid ; } + void forceToSaveRawImage(S32 desired_discard = 0) ; + void destroySavedRawImage() ; + LLImageRaw* getSavedRawImage() ; + BOOL hasSavedRawImage() const ; + F32 getElapsedLastReferencedSavedRawImageTime() const ; + BOOL isFullyLoaded() const; + +protected: + /*virtual*/ void switchToCachedImage(); private: void init(bool firstinit) ; void cleanup() ; F32 calcDecodePriorityForUnknownTexture(F32 pixel_priority) ; + void saveRawImage() ; + BOOL forceFetch() ; + void setCachedRawImage() ; + BOOL keepReuestedDiscardLevel(); //for atlas void resetFaceAtlas() ; @@ -424,11 +479,8 @@ protected: S32 mKnownDrawWidth; S32 mKnownDrawHeight; BOOL mKnownDrawSizeChanged ; - - S8 mDesiredDiscardLevel; // The discard level we'd LIKE to have - if we have it and there's space - S8 mMinDesiredDiscardLevel; // The minimum discard level we'd like to have - S32 mMinDiscardLevel; - + std::string mUrl; + S32 mRequestedDiscardLevel; F32 mRequestedDownloadPriority; S32 mFetchState; @@ -438,6 +490,10 @@ protected: F32 mRequestDeltaTime; S32 mDecodeFrame; S32 mVisibleFrame; // decode frame where image was last visible + F32 mDecodePriority; // The priority for decoding this image. + S32 mMinDiscardLevel; + S8 mDesiredDiscardLevel; // The discard level we'd LIKE to have - if we have it and there's space + S8 mMinDesiredDiscardLevel; // The minimum discard level we'd like to have S8 mNeedsAux; // We need to decode the auxiliary channels S8 mDecodingAux; // Are we decoding high components @@ -445,10 +501,10 @@ protected: S8 mHasFetcher; // We've made a fecth request S8 mIsFetching; // Fetch request is active - mutable S8 mIsMissingAsset; // True if we know that there is no image asset with this image id in the database. + mutable S8 mIsMissingAsset; // True if we know that there is no image asset with this image id in the database. - F32 mDecodePriority; // The priority for decoding this image. typedef std::list<LLLoadedCallbackEntry*> callback_list_t; + S8 mLoadedCallbackDesiredDiscardLevel; callback_list_t mLoadedCallbackList; LLPointer<LLImageRaw> mRawImage; @@ -458,6 +514,19 @@ protected: // doing if you use it for anything else! - djs LLPointer<LLImageRaw> mAuxRawImage; + //keep a copy of mRawImage for some special purposes + //when mForceToSaveRawImage is set. + BOOL mForceToSaveRawImage ; + LLPointer<LLImageRaw> mSavedRawImage; + S32 mSavedRawDiscardLevel; + S32 mDesiredSavedRawDiscardLevel; + F32 mLastReferencedSavedRawImageTime ; + + //a small version of the copy of the raw image (<= 64 * 64) + LLPointer<LLImageRaw> mCachedRawImage; + S32 mCachedRawDiscardLevel; + BOOL mCachedRawImageReady; //the rez of the mCachedRawImage reaches the upper limit. + LLHost mTargetHost; // if LLHost::invalid, just request from agent's simulator // Timers @@ -486,15 +555,17 @@ protected: /*virtual*/ ~LLViewerLODTexture(){} public: - LLViewerLODTexture(const LLUUID& id, BOOL usemipmaps = TRUE); - LLViewerLODTexture(const std::string& full_path, const LLUUID& id, BOOL usemipmaps = TRUE); + LLViewerLODTexture(const LLUUID& id, const LLHost& host = LLHost::invalid, BOOL usemipmaps = TRUE); + LLViewerLODTexture(const std::string& url, const LLUUID& id, BOOL usemipmaps = TRUE); /*virtual*/ S8 getType() const; // Process image stats to determine priority/quality requirements. /*virtual*/ void processTextureStats(); - + BOOL isUpdateFrozen() ; + private: void init(bool firstinit) ; + void scaleDown() ; private: @@ -601,7 +672,7 @@ public: static LLViewerFetchedTexture* getFetchedTexture(const LLUUID &image_id, BOOL usemipmap = TRUE, - BOOL level_immediate = FALSE, // Get the requested level immediately upon creation. + S32 boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, @@ -610,7 +681,16 @@ public: static LLViewerFetchedTexture* getFetchedTextureFromFile(const std::string& filename, BOOL usemipmap = TRUE, - BOOL level_immediate = FALSE, // Get the requested level immediately upon creation. + S32 boost_priority = LLViewerTexture::BOOST_NONE, + S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, + LLGLint internal_format = 0, + LLGLenum primary_format = 0, + const LLUUID& force_id = LLUUID::null + ); + + static LLViewerFetchedTexture* getFetchedTextureFromUrl(const std::string& url, + BOOL usemipmap = TRUE, + S32 boost_priority = LLViewerTexture::BOOST_NONE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index b5986c70f5..081b7cc483 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -44,6 +44,7 @@ #include "llimagetga.h" #include "llimagejpeg.h" #include "llimagepng.h" +#include "llimageworker.h" #include "llsdserialize.h" #include "llsys.h" @@ -68,10 +69,15 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; -const S32 IMAGES_PER_REQUEST = 42; -const S32 IMAGES_MIN_UPDATES = 4; // Always update the highest N images each frame -const S32 IMAGES_MAX_PACKET_UPDATES = 1; // Only send N packets of IMAGES_PER_REQUEST in a frame -const F32 RESEND_IMAGE_REQUEST_TIME = 15.f; // seconds +U32 LLViewerTextureList::sTextureBits = 0; +U32 LLViewerTextureList::sTexturePackets = 0; +S32 LLViewerTextureList::sNumImages = 0; +LLStat LLViewerTextureList::sNumImagesStat(32, TRUE); +LLStat LLViewerTextureList::sNumRawImagesStat(32, TRUE); +LLStat LLViewerTextureList::sGLTexMemStat(32, TRUE); +LLStat LLViewerTextureList::sGLBoundMemStat(32, TRUE); +LLStat LLViewerTextureList::sRawMemStat(32, TRUE); +LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE); LLViewerTextureList gTextureList; static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); @@ -88,7 +94,7 @@ LLViewerTextureList::LLViewerTextureList() void LLViewerTextureList::init() { - mNumImages = 0; + sNumImages = 0; mMaxResidentTexMemInMegaBytes = 0; mMaxTotalTextureMemInMegaBytes = 0 ; if (gNoRender) @@ -197,7 +203,7 @@ void LLViewerTextureList::doPrefetchImages() if(LLViewerTexture::FETCHED_TEXTURE == texture_type || LLViewerTexture::LOD_TEXTURE == texture_type) { - LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, MIPMAP_TRUE, FALSE, texture_type); + LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, texture_type); if (image) { image->addTextureStats((F32)pixel_area); @@ -231,6 +237,10 @@ void LLViewerTextureList::shutdown() { continue; // avoid UI, baked, and other special images } + if(!image->getBoundRecently()) + { + continue ; + } S32 desired = image->getDesiredDiscardLevel(); if (desired >= 0 && desired < MAX_DISCARD_LEVEL) { @@ -321,18 +331,31 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& LLGLenum primary_format, const LLUUID& force_id) { - if (gNoRender) - { - // Never mind that this ignores image_set_id; - // getImage() will handle that later. - return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE); - } - std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename); if (full_path.empty()) { llwarns << "Failed to find local image file: " << filename << llendl; - return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE); + return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI); + } + + std::string url = "file://" + full_path; + + return getImageFromUrl(url, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id); +} + +LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& url, + BOOL usemipmaps, + S32 boost_priority, + S8 texture_type, + LLGLint internal_format, + LLGLenum primary_format, + const LLUUID& force_id) +{ + if (gNoRender) + { + // Never mind that this ignores image_set_id; + // getImage() will handle that later. + return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI); } // generate UUID based on hash of filename @@ -343,7 +366,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& } else { - new_id.generate(full_path); + new_id.generate(url); } LLPointer<LLViewerFetchedTexture> imagep = findImage(new_id); @@ -353,10 +376,10 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& switch(texture_type) { case LLViewerTexture::FETCHED_TEXTURE: - imagep = new LLViewerFetchedTexture(full_path, new_id, usemipmaps); + imagep = new LLViewerFetchedTexture(url, new_id, usemipmaps); break ; case LLViewerTexture::LOD_TEXTURE: - imagep = new LLViewerLODTexture(full_path, new_id, usemipmaps); + imagep = new LLViewerLODTexture(url, new_id, usemipmaps); break ; default: llerrs << "Invalid texture type " << texture_type << llendl ; @@ -400,7 +423,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, if ((&image_id == NULL) || image_id.isNull()) { - return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE)); + return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI)); } LLPointer<LLViewerFetchedTexture> imagep = findImage(image_id); @@ -428,18 +451,15 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, switch(texture_type) { case LLViewerTexture::FETCHED_TEXTURE: - imagep = new LLViewerFetchedTexture(image_id, usemipmaps); + imagep = new LLViewerFetchedTexture(image_id, request_from_host, usemipmaps); break ; case LLViewerTexture::LOD_TEXTURE: - imagep = new LLViewerLODTexture(image_id, usemipmaps); + imagep = new LLViewerLODTexture(image_id, request_from_host, usemipmaps); break ; default: llerrs << "Invalid texture type " << texture_type << llendl ; } - // Might want to request from host other than where the agent is. JC - imagep->setTargetHost(request_from_host); - if (internal_format && primary_format) { imagep->setExplicitFormat(internal_format, primary_format); @@ -517,7 +537,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image) { llwarns << "Image with ID " << image_id << " already in list" << llendl; } - mNumImages++; + sNumImages++; addImageToList(new_image); mUUIDMap[image_id] = new_image; @@ -534,7 +554,7 @@ void LLViewerTextureList::deleteImage(LLViewerFetchedTexture *image) } llverify(mUUIDMap.erase(image->getID()) == 1); - mNumImages--; + sNumImages--; removeImageFromList(image); } } @@ -554,7 +574,9 @@ static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images"); void LLViewerTextureList::updateImages(F32 max_time) { - LLViewerStats::getInstance()->mNumImagesStat.addValue(mNumImages); + LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec()); + + LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages); LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount); LLViewerStats::getInstance()->mGLTexMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sGlobalTextureMemoryInBytes)); LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes)); @@ -562,10 +584,13 @@ void LLViewerTextureList::updateImages(F32 max_time) LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory)); updateImagesDecodePriorities(); + + F32 total_max_time = max_time; max_time -= updateImagesFetchTextures(max_time); - max_time = llmin(llmax(max_time, 0.001f*10.f*gFrameIntervalSeconds), 0.001f); + + max_time = llmax(max_time, total_max_time*.25f); // at least 25% of max_time max_time -= updateImagesCreateTextures(max_time); - max_time = llmin(llmax(max_time, 0.001f*10.f*gFrameIntervalSeconds), 0.001f); + if (!mDirtyTextureList.empty()) { LLFastTimer t(FTM_IMAGE_MARK_DIRTY); @@ -578,7 +603,7 @@ void LLViewerTextureList::updateImages(F32 max_time) { //trigger loaded callbacks on local textures immediately LLViewerFetchedTexture* image = *iter++; - if (!image->getLocalFileName().empty()) + if (!image->getUrl().empty()) { // Do stuff to handle callbacks, update priorities, etc. didone = image->doLoadedCallbacks(); @@ -636,6 +661,14 @@ void LLViewerTextureList::updateImagesDecodePriorities() } else { + if(imagep->hasSavedRawImage()) + { + if(imagep->getElapsedLastReferencedSavedRawImageTime() > MAX_INACTIVE_TIME) + { + imagep->destroySavedRawImage() ; + } + } + if(imagep->isDeleted()) { continue ; @@ -766,74 +799,76 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) const size_t max_update_count = llmin((S32) (1024*10.f*gFrameIntervalSeconds)+1, 256); // 32 high priority entries - std::set<LLViewerFetchedTexture*> entries; + typedef std::vector<LLViewerFetchedTexture*> entries_list_t; + entries_list_t entries; size_t update_counter = llmin(max_priority_count, mImageList.size()); image_priority_list_t::iterator iter1 = mImageList.begin(); while(update_counter > 0) { - // added extra granularity and verbosity for crash logging during 1.19.1 RC. -Brad - if(iter1 == mImageList.end()) - { - llerrs << "DEV-12002: update_counter not calculated correctly!" << llendl; - return 0.f; - } - - LLPointer<LLViewerFetchedTexture> const & ptr = *iter1; - - LLViewerFetchedTexture * img = ptr.get(); - - // added extra granularity and verbosity for crash logging during 1.19.1 RC. -Brad - if(img == NULL) - { - llwarns << "DEV-12002: image is NULL!" << llendl; - } - - entries.insert(img); - + entries.push_back(*iter1); + ++iter1; update_counter--; } // 256 cycled entries - update_counter = llmin(max_update_count, mUUIDMap.size()); - uuid_map_t::iterator iter2 = mUUIDMap.upper_bound(mLastFetchUUID); - while(update_counter > 0) + update_counter = llmin(max_update_count, mUUIDMap.size()); + if(update_counter > 0) { - if (iter2 == mUUIDMap.end()) + uuid_map_t::iterator iter2 = mUUIDMap.upper_bound(mLastFetchUUID); + uuid_map_t::iterator iter2p = iter2; + while(update_counter > 0) { - iter2 = mUUIDMap.begin(); + if (iter2 == mUUIDMap.end()) + { + iter2 = mUUIDMap.begin(); + } + entries.push_back(iter2->second); + iter2p = iter2++; + update_counter--; } - mLastFetchUUID = iter2->first; - entries.insert(iter2->second); - ++iter2; - update_counter--; + + mLastFetchUUID = iter2p->first; } + S32 fetch_count = 0; S32 min_count = max_priority_count + max_update_count/4; - for (std::set<LLViewerFetchedTexture*>::iterator iter3 = entries.begin(); + for (entries_list_t::iterator iter3 = entries.begin(); iter3 != entries.end(); ) { LLPointer<LLViewerFetchedTexture> imagep = *iter3++; - imagep->updateFetch(); + bool fetching = imagep->updateFetch(); + if (fetching) + { + fetch_count++; + } if (min_count <= 0 && image_op_timer.getElapsedTimeF32() > max_time) { break; } min_count--; } + if (fetch_count == 0) + { + gDebugTimers[0].pause(); + } + else + { + gDebugTimers[0].unpause(); + } return image_op_timer.getElapsedTimeF32(); } void LLViewerTextureList::updateImagesUpdateStats() { - if (mUpdateStats) + if (mUpdateStats && mForceResetTextureStats) { for (image_priority_list_t::iterator iter = mImageList.begin(); iter != mImageList.end(); ) { LLViewerFetchedTexture* imagep = *iter++; - imagep->resetTextureStats(mForceResetTextureStats); + imagep->resetTextureStats(); } mUpdateStats = FALSE; mForceResetTextureStats = FALSE; @@ -1019,6 +1054,9 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage return compressedImage; } +const S32 MIN_VIDEO_RAM = 32; +const S32 MAX_VIDEO_RAM = 512; // 512MB max for performance reasons. + // Returns min setting for TextureMemory (in MB) S32 LLViewerTextureList::getMinVideoRamSetting() { @@ -1137,13 +1175,13 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d if (msg->getReceiveCompressedSize()) { - gTextureList.mTextureBits += msg->getReceiveCompressedSize() * 8; + gTextureList.sTextureBits += msg->getReceiveCompressedSize() * 8; } else { - gTextureList.mTextureBits += msg->getReceiveSize() * 8; + gTextureList.sTextureBits += msg->getReceiveSize() * 8; } - gTextureList.mTexturePackets++; + gTextureList.sTexturePackets++; U8 codec; U16 packets; @@ -1171,7 +1209,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d U8 *data = new U8[data_size]; msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size); - LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); if (!image) { delete [] data; @@ -1202,13 +1240,13 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d if (msg->getReceiveCompressedSize()) { - gTextureList.mTextureBits += msg->getReceiveCompressedSize() * 8; + gTextureList.sTextureBits += msg->getReceiveCompressedSize() * 8; } else { - gTextureList.mTextureBits += msg->getReceiveSize() * 8; + gTextureList.sTextureBits += msg->getReceiveSize() * 8; } - gTextureList.mTexturePackets++; + gTextureList.sTexturePackets++; //llprintline("Start decode, image header..."); msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id); @@ -1235,7 +1273,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d U8 *data = new U8[data_size]; msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size); - LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); if (!image) { delete [] data; @@ -1401,7 +1439,7 @@ void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_v // for images grabbed from local files, apply clipping rectangle to restore original dimensions // from power-of-2 gl image - if (success && imagep.notNull() && src_vi && !src_vi->getLocalFileName().empty()) + if (success && imagep.notNull() && src_vi && (src_vi->getUrl().compare(0, 7, "file://")==0)) { F32 clip_x = (F32)src_vi->getOriginalWidth() / (F32)src_vi->getFullWidth(); F32 clip_y = (F32)src_vi->getOriginalHeight() / (F32)src_vi->getFullHeight(); @@ -1458,6 +1496,11 @@ bool LLUIImageList::initFromFile() llwarns << "Unable to parse UI image list file " << base_file_path << llendl; return false; } + if (!root->hasAttribute("version")) + { + llwarns << "No valid version number in UI image list file " << base_file_path << llendl; + return false; + } std::vector<std::string> paths; // path to current selected skin diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index fda57ce981..3c9c81a689 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -53,7 +53,6 @@ const BOOL GL_TEXTURE_NO = FALSE; const BOOL IMMEDIATE_YES = TRUE; const BOOL IMMEDIATE_NO = FALSE; -class LLImageJ2C; class LLMessageSystem; class LLTextureView; @@ -131,7 +130,7 @@ private: LLViewerFetchedTexture * getImage(const LLUUID &image_id, BOOL usemipmap = TRUE, - BOOL level_immediate = FALSE, // Get the requested level immediately upon creation. + S32 boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, @@ -140,6 +139,15 @@ private: LLViewerFetchedTexture * getImageFromFile(const std::string& filename, BOOL usemipmap = TRUE, + S32 boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. + S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, + LLGLint internal_format = 0, + LLGLenum primary_format = 0, + const LLUUID& force_id = LLUUID::null + ); + + LLViewerFetchedTexture* getImageFromUrl(const std::string& url, + BOOL usemipmap = TRUE, BOOL level_immediate = FALSE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, @@ -149,7 +157,7 @@ private: LLViewerFetchedTexture* createImage(const LLUUID &image_id, BOOL usemipmap = TRUE, - BOOL level_immediate = FALSE, // Get the requested level immediately upon creation. + S32 boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, @@ -159,7 +167,7 @@ private: // Request image from a specific host, used for baked avatar textures. // Implemented in header in case someone changes default params above. JC LLViewerFetchedTexture* getImageFromHost(const LLUUID& image_id, LLHost host) - { return getImage(image_id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); } + { return getImage(image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); } public: typedef std::set<LLPointer<LLViewerFetchedTexture> > image_list_t; @@ -190,11 +198,18 @@ private: LLFrameTimer mForceDecodeTimer; public: - U32 mTextureBits; - U32 mTexturePackets; + static U32 sTextureBits; + static U32 sTexturePackets; + + static LLStat sNumImagesStat; + static LLStat sNumRawImagesStat; + static LLStat sGLTexMemStat; + static LLStat sGLBoundMemStat; + static LLStat sRawMemStat; + static LLStat sFormattedMemStat; private: - S32 mNumImages; + static S32 sNumImages; static void (*sUUIDCallback)(void**, const LLUUID &); }; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b574a9c110..fc09c946af 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -121,6 +121,7 @@ #include "llhudview.h" #include "llimagebmp.h" #include "llimagej2c.h" +#include "llimageworker.h" #include "llkeyboard.h" #include "lllineeditor.h" #include "llmenugl.h" @@ -160,7 +161,6 @@ #include "lltoolselectland.h" #include "lltrans.h" #include "lluictrlfactory.h" -#include "lluploaddialog.h" #include "llurldispatcher.h" // SLURL from other app instance #include "llvieweraudio.h" #include "llviewercamera.h" @@ -192,6 +192,7 @@ #include "llbottomtray.h" #include "llnearbychatbar.h" #include "llagentui.h" +#include "llwearablelist.h" #include "llnotificationmanager.h" @@ -330,7 +331,9 @@ public: S32 hours = (S32)(time / (60*60)); S32 mins = (S32)((time - hours*(60*60)) / 60); S32 secs = (S32)((time - hours*(60*60) - mins*60)); - addText(xpos, ypos, llformat(" Debug %d: %d:%02d:%02d", idx, hours,mins,secs)); ypos += y_inc2; + std::string label = gDebugTimerLabel[idx]; + if (label.empty()) label = llformat("Debug: %d", idx); + addText(xpos, ypos, llformat(" %s: %d:%02d:%02d", label.c_str(), hours,mins,secs)); ypos += y_inc2; } F32 time = gFrameTimeSeconds; @@ -1304,6 +1307,7 @@ LLViewerWindow::LLViewerWindow( // Init the image list. Must happen after GL is initialized and before the images that // LLViewerWindow needs are requested. + LLImageGL::initClass(LLViewerTexture::MAX_GL_IMAGE_CATEGORY) ; gTextureList.init(); LLViewerTextureManager::init() ; gBumpImageList.init(); @@ -1670,6 +1674,8 @@ void LLViewerWindow::shutdownGL() gSky.cleanup(); stop_glerror(); + LLWearableList::instance().cleanup() ; + gTextureList.shutdown(); stop_glerror(); @@ -1683,7 +1689,10 @@ void LLViewerWindow::shutdownGL() stop_glerror(); LLViewerTextureManager::cleanup() ; - + LLImageGL::cleanupClass() ; + + llinfos << "All texturs and llimagegl images are destroyed!" << llendl ; + llinfos << "Cleaning up select manager" << llendl; LLSelectMgr::getInstance()->cleanup(); @@ -2113,31 +2122,30 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // arrow keys move avatar while chatting hack if (chat_editor && chat_editor->hasFocus()) { - if (chat_editor->getText().empty() || gSavedSettings.getBOOL("ArrowKeysMoveAvatar")) + // If text field is empty, there's no point in trying to move + // cursor with arrow keys, so allow movement + if (chat_editor->getText().empty() + || gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) { - switch(key) + // let Control-Up and Control-Down through for chat line history, + if (!(key == KEY_UP && mask == MASK_CONTROL) + && !(key == KEY_DOWN && mask == MASK_CONTROL)) { - case KEY_LEFT: - case KEY_RIGHT: - case KEY_UP: - // let CTRL UP through for chat line history - if( MASK_CONTROL == mask ) + switch(key) { + case KEY_LEFT: + case KEY_RIGHT: + case KEY_UP: + case KEY_DOWN: + case KEY_PAGE_UP: + case KEY_PAGE_DOWN: + case KEY_HOME: + // when chatbar is empty or ArrowKeysAlwaysMove set, + // pass arrow keys on to avatar... + return FALSE; + default: break; } - case KEY_DOWN: - // let CTRL DOWN through for chat line history - if( MASK_CONTROL == mask ) - { - break; - } - case KEY_PAGE_UP: - case KEY_PAGE_DOWN: - case KEY_HOME: - // when chatbar is empty or ArrowKeysMoveAvatar set, pass arrow keys on to avatar... - return FALSE; - default: - break; } } } diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index d7c403739e..c2906b1718 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -324,7 +324,7 @@ public: } ESnapshotType; BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR); BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE, - BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_IMAGE_SIZE ); + BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE ); BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, ESnapshotType type) ; BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); } void resetSnapshotLoc() const { sSnapshotDir.clear(); } diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index d124cbcdce..999701ece1 100644 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -279,7 +279,6 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, if (mRawImages[i].isNull()) { // Read back a raw image for this discard level, if it exists - mRawImages[i] = new LLImageRaw; S32 min_dim = llmin(mDetailTextures[i]->getFullWidth(), mDetailTextures[i]->getFullHeight()); S32 ddiscard = 0; while (min_dim > BASE_SIZE && ddiscard < MAX_DISCARD_LEVEL) @@ -287,12 +286,18 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, ddiscard++; min_dim /= 2; } - if (!mDetailTextures[i]->readBackRaw(ddiscard, mRawImages[i], false)) + + mDetailTextures[i]->reloadRawImage(ddiscard) ; + if(mDetailTextures[i]->getRawImageLevel() != ddiscard)//raw iamge is not ready, will enter here again later. { - llwarns << "Unable to read raw data for terrain detail texture: " << mDetailTextures[i]->getID() << llendl; - mRawImages[i] = NULL; + mDetailTextures[i]->destroyRawImage() ; + lldebugs << "cached raw data for terrain detail texture is not ready yet: " << mDetailTextures[i]->getID() << llendl; return FALSE; } + + mRawImages[i] = mDetailTextures[i]->getRawImage() ; + mDetailTextures[i]->destroyRawImage() ; + if (mDetailTextures[i]->getWidth(ddiscard) != BASE_SIZE || mDetailTextures[i]->getHeight(ddiscard) != BASE_SIZE || mDetailTextures[i]->getComponents() != 3) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4bf66ba17e..a6f20922d9 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -689,7 +689,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mBakedTextureDatas[i].mIsUsed = false; mBakedTextureDatas[i].mMaskTexName = 0; mBakedTextureDatas[i].mTextureIndex = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)i); - mBakedTextureDatas[i].mMorphMasksValid = FALSE; } mDirtyMesh = TRUE; // Dirty geometry, need to regenerate. @@ -999,7 +998,7 @@ void LLVOAvatar::resetImpostors() // static void LLVOAvatar::deleteCachedImages(bool clearAll) -{ +{ if (LLTexLayerSet::sHasCaches) { lldebugs << "Deleting layer set caches" << llendl; @@ -2385,7 +2384,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) F32 old_angle = mImpostorAngle.mV[i]; F32 angle_diff = fabsf(cur_angle-old_angle); - if (angle_diff > 3.14159f/512.f*distance*mUpdatePeriod) + if (angle_diff > F_PI/512.f*distance*mUpdatePeriod) { mNeedsImpostorUpdate = TRUE; } @@ -2557,7 +2556,7 @@ void LLVOAvatar::idleUpdateLoadingEffect() particle_parameters.mPartImageID = cloud->getID(); particle_parameters.mMaxAge = 0.f; particle_parameters.mPattern = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE; - particle_parameters.mInnerAngle = 3.14159f; + particle_parameters.mInnerAngle = F_PI; particle_parameters.mOuterAngle = 0.f; particle_parameters.mBurstRate = 0.02f; particle_parameters.mBurstRadius = 0.0f; @@ -3919,7 +3918,7 @@ U32 LLVOAvatar::renderFootShadows() LLGLDepthTest test(GL_TRUE, GL_FALSE); //render foot shadows LLGLEnable blend(GL_BLEND); - gGL.getTexUnit(0)->bind(mShadowImagep.get()); + gGL.getTexUnit(0)->bind(mShadowImagep, TRUE); glColor4fv(mShadow0Facep->getRenderColor().mV); mShadow0Facep->renderIndexed(foot_mask); glColor4fv(mShadow1Facep->getRenderColor().mV); @@ -3967,7 +3966,7 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel) //------------------------------------------------------------------------ // LLVOAvatar::updateTextures() //------------------------------------------------------------------------ -void LLVOAvatar::updateTextures(LLAgent &agent) +void LLVOAvatar::updateTextures() { BOOL render_avatar = TRUE; @@ -6091,28 +6090,6 @@ void LLVOAvatar::addMaskedMorph(EBakedTextureIndex index, LLPolyMorphTarget* mor } } -// invalidates morph masks for a given layer. Don't pass a parameter to invalidate all morph masks. -void LLVOAvatar::invalidateMorphMasks(LLVOAvatarDefines::EBakedTextureIndex index) -{ - setMorphMasksValid(FALSE, index); -} - -// updates morph masks to be a value for a given layer. Don't pass an argument to set value for all morph masks -void LLVOAvatar::setMorphMasksValid(BOOL new_status, LLVOAvatarDefines::EBakedTextureIndex index) -{ - if (index == BAKED_NUM_INDICES) - { - for (U8 tex = 0; tex < (U8)BAKED_NUM_INDICES; tex++) - { - mBakedTextureDatas[tex].mMorphMasksValid = new_status; - } - } - else if (index < BAKED_NUM_INDICES) - { - mBakedTextureDatas[index].mMorphMasksValid = new_status; - } -} - // returns TRUE if morph masks are present and not valid for a given baked texture, FALSE otherwise BOOL LLVOAvatar::morphMaskNeedsUpdate(LLVOAvatarDefines::EBakedTextureIndex index) { @@ -6121,9 +6098,20 @@ BOOL LLVOAvatar::morphMaskNeedsUpdate(LLVOAvatarDefines::EBakedTextureIndex inde return FALSE; } - if (!mBakedTextureDatas[index].mMaskedMorphs.empty() && !mBakedTextureDatas[index].mMorphMasksValid) + if (!mBakedTextureDatas[index].mMaskedMorphs.empty()) { - return TRUE; + if (isSelf()) + { + LLTexLayerSet *layer_set = mBakedTextureDatas[index].mTexLayerSet; + if (layer_set) + { + return !layer_set->isMorphValid(); + } + } + else + { + return FALSE; + } } return FALSE; @@ -6520,7 +6508,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) && baked_index != BAKED_SKIRT) { setTEImage(mBakedTextureDatas[baked_index].mTextureIndex, - LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureIndex, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE)); + LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureIndex, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index f7c794defe..173ad02808 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -125,7 +125,7 @@ public: virtual BOOL updateLOD(); BOOL updateJointLODs(); virtual BOOL isActive() const; // Whether this object needs to do an idleUpdate. - virtual void updateTextures(LLAgent &agent); + virtual void updateTextures(); virtual S32 setTETexture(const U8 te, const LLUUID& uuid); // If setting a baked texture, need to request it from a non-local sim. virtual void onShift(const LLVector3& shift_vector); virtual U32 getPartitionType() const; @@ -355,10 +355,8 @@ private: // Morph masks //-------------------------------------------------------------------- public: - void invalidateMorphMasks(LLVOAvatarDefines::EBakedTextureIndex index = LLVOAvatarDefines::BAKED_NUM_INDICES); BOOL morphMaskNeedsUpdate(LLVOAvatarDefines::EBakedTextureIndex index = LLVOAvatarDefines::BAKED_NUM_INDICES); void addMaskedMorph(LLVOAvatarDefines::EBakedTextureIndex index, LLPolyMorphTarget* morph_target, BOOL invert, std::string layer); - void setMorphMasksValid(BOOL new_status, LLVOAvatarDefines::EBakedTextureIndex index = LLVOAvatarDefines::BAKED_NUM_INDICES); void applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components, LLVOAvatarDefines::EBakedTextureIndex index = LLVOAvatarDefines::BAKED_NUM_INDICES); //-------------------------------------------------------------------- @@ -489,7 +487,6 @@ protected: // Stores pointers to the joint meshes that this baked texture deals with std::vector< LLViewerJointMesh * > mMeshes; // std::vector<LLViewerJointMesh> mJoints[i]->mMeshParts morph_list_t mMaskedMorphs; - BOOL mMorphMasksValid; }; typedef std::vector<BakedTextureData> bakedtexturedata_vec_t; bakedtexturedata_vec_t mBakedTextureDatas; diff --git a/indra/newview/llvoavatardefines.cpp b/indra/newview/llvoavatardefines.cpp index 5624f19c8d..49c4a1a6c8 100644 --- a/indra/newview/llvoavatardefines.cpp +++ b/indra/newview/llvoavatardefines.cpp @@ -84,34 +84,34 @@ LLVOAvatarDictionary::BakedTextures::BakedTextures() { // Baked textures addEntry(BAKED_HEAD, new BakedEntry(TEX_HEAD_BAKED, - "head", "18ded8d6-bcfc-e415-8539-944c0f5ea7a6", + "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)); addEntry(BAKED_UPPER, new BakedEntry(TEX_UPPER_BAKED, - "upper_body", "338c29e3-3024-4dbb-998d-7c04cf4fa88f", + "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)); addEntry(BAKED_LOWER, new BakedEntry(TEX_LOWER_BAKED, - "lower_body", "91b4a2c7-1b1a-ba16-9a16-1f8f8dcc1c3f", + "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)); addEntry(BAKED_EYES, new BakedEntry(TEX_EYES_BAKED, - "eyes", "b2cf28af-b840-1071-3c6a-78085d8128b5", + "eyes", "27b1bc0f-979f-4b13-95fe-b981c2ba9788", 2, TEX_EYES_IRIS, TEX_EYES_ALPHA, 2, WT_EYES, WT_ALPHA)); addEntry(BAKED_SKIRT, new BakedEntry(TEX_SKIRT_BAKED, - "skirt", "ea800387-ea1a-14e0-56cb-24f2022f969a", + "skirt", "03e7e8cb-1368-483b-b6f3-74850838ba63", 1, TEX_SKIRT, 1, WT_SKIRT)); addEntry(BAKED_HAIR, new BakedEntry(TEX_HAIR_BAKED, - "hair", "0af1ef7c-ad24-11dd-8790-001f5bf833e8", + "hair", "a60e85a9-74e8-48d8-8a2d-8129f28d9b61", 2, TEX_HAIR, TEX_HAIR_ALPHA, 2, WT_HAIR, WT_ALPHA)); } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index a964f43171..7a83070770 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -41,53 +41,22 @@ #include "llvoavatarself.h" #include "llvoavatar.h" -#include <stdio.h> -#include <ctype.h> - -#include "llaudioengine.h" -#include "noise.h" +#include "pipeline.h" -// TODO: Seraph - Remove unnecessary headers. These are copied from llvoavatar.h. #include "llagent.h" // Get state values from here #include "llagentwearables.h" -#include "llviewercontrol.h" -#include "lldrawpoolavatar.h" -#include "lldriverparam.h" -#include "lleditingmotion.h" -#include "llemote.h" -#include "llface.h" -#include "llfirstuse.h" -#include "llheadrotmotion.h" #include "llhudeffecttrail.h" #include "llhudmanager.h" -#include "llkeyframefallmotion.h" -#include "llkeyframestandmotion.h" -#include "llkeyframewalkmotion.h" -#include "llmutelist.h" #include "llselectmgr.h" -#include "llsprite.h" -#include "lltargetingmotion.h" -#include "lltexlayer.h" -#include "lltexglobalcolor.h" #include "lltoolgrab.h" // for needsRenderBeam #include "lltoolmgr.h" // for needsRenderBeam #include "lltoolmorph.h" #include "lltrans.h" #include "llviewercamera.h" -#include "llviewertexturelist.h" #include "llviewermenu.h" #include "llviewerobjectlist.h" -#include "llviewerparcelmgr.h" #include "llviewerstats.h" -#include "llvovolume.h" -#include "llworld.h" -#include "pipeline.h" -#include "llviewershadermgr.h" -#include "llsky.h" -#include "llanimstatelabels.h" -#include "llgesturemgr.h" //needed to trigger the voice gesticulations -#include "llvoiceclient.h" -#include "llvoicevisualizer.h" // Ventrella +#include "llviewerregion.h" #include "llappearancemgr.h" #if LL_MSVC @@ -205,7 +174,10 @@ void LLVOAvatarSelf::markDead() param; param = (LLViewerVisualParam*) getNextVisualParam()) { - param->setIsDummy(TRUE); + if (param->getWearableType() != WT_INVALID) + { + param->setIsDummy(TRUE); + } } return success; @@ -1199,26 +1171,6 @@ void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerFetchedTexture *sr } // virtual -/* //unused -BOOL LLVOAvatarSelf::getLocalTextureRaw(ETextureIndex index, LLImageRaw* image_raw) const -{ - if (!isIndexLocalTexture(index)) return FALSE; - if (getLocalTextureID(index) == IMG_DEFAULT_AVATAR) return TRUE; - - const LocalTextureData *local_tex_data = getLocalTextureData(index)[0]; - if (local_tex_data->mImage->readBackRaw(-1, image_raw, false)) - { - - return TRUE; - } - - // No data loaded yet - setLocalTexture((ETextureIndex)index, getTEImage(index), FALSE); // <-- non-const, move this elsewhere - return FALSE; -} -*/ - -// virtual BOOL LLVOAvatarSelf::getLocalTextureGL(ETextureIndex type, LLViewerTexture** tex_pp, U32 index) const { *tex_pp = NULL; @@ -1415,8 +1367,8 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL set_by_u } // llinfos << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegion() << llendl; - invalidateMorphMasks(layerset->getBakedTexIndex()); layerset->requestUpdate(); + layerset->invalidateMorphMasks(); if( set_by_user ) { @@ -1869,12 +1821,13 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe if (!covered_by_baked) { - if (getLocalTextureID(type, index) != IMG_DEFAULT_AVATAR) + if (getLocalTextureID(type, index) != IMG_DEFAULT_AVATAR && imagep->getDiscardLevel() != 0) { F32 desired_pixels; desired_pixels = llmin(mPixelArea, (F32)getTexImageArea()); imagep->setBoostLevel(getAvatarBoostLevel()); imagep->addTextureStats( desired_pixels / texel_area_ratio ); + imagep->forceUpdateBindStats() ; if (imagep->getDiscardLevel() < 0) { mHasGrey = TRUE; // for statistics gathering @@ -2172,6 +2125,49 @@ BOOL LLVOAvatarSelf::needsRenderBeam() // static void LLVOAvatarSelf::deleteScratchTextures() { + if(gAuditTexture) + { + S32 total_tex_size = sScratchTexBytes ; + S32 tex_size = SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT ; + + if( sScratchTexNames.checkData( GL_LUMINANCE ) ) + { + LLImageGL::decTextureCounter(tex_size, 1, LLViewerTexture::AVATAR_SCRATCH_TEX) ; + total_tex_size -= tex_size ; + } + if( sScratchTexNames.checkData( GL_ALPHA ) ) + { + LLImageGL::decTextureCounter(tex_size, 1, LLViewerTexture::AVATAR_SCRATCH_TEX) ; + total_tex_size -= tex_size ; + } + if( sScratchTexNames.checkData( GL_COLOR_INDEX ) ) + { + LLImageGL::decTextureCounter(tex_size, 1, LLViewerTexture::AVATAR_SCRATCH_TEX) ; + total_tex_size -= tex_size ; + } + if( sScratchTexNames.checkData( GL_LUMINANCE_ALPHA ) ) + { + LLImageGL::decTextureCounter(tex_size, 2, LLViewerTexture::AVATAR_SCRATCH_TEX) ; + total_tex_size -= 2 * tex_size ; + } + if( sScratchTexNames.checkData( GL_RGB ) ) + { + LLImageGL::decTextureCounter(tex_size, 3, LLViewerTexture::AVATAR_SCRATCH_TEX) ; + total_tex_size -= 3 * tex_size ; + } + if( sScratchTexNames.checkData( GL_RGBA ) ) + { + LLImageGL::decTextureCounter(tex_size, 4, LLViewerTexture::AVATAR_SCRATCH_TEX) ; + total_tex_size -= 4 * tex_size ; + } + //others + while(total_tex_size > 0) + { + LLImageGL::decTextureCounter(tex_size, 4, LLViewerTexture::AVATAR_SCRATCH_TEX) ; + total_tex_size -= 4 * tex_size ; + } + } + for( LLGLuint* namep = sScratchTexNames.getFirstData(); namep; namep = sScratchTexNames.getNextData() ) @@ -2194,7 +2190,8 @@ void LLVOAvatarSelf::deleteScratchTextures() BOOL LLVOAvatarSelf::bindScratchTexture( LLGLenum format ) { U32 texture_bytes = 0; - GLuint gl_name = getScratchTexName( format, &texture_bytes ); + S32 components = 0; + GLuint gl_name = getScratchTexName( format, components, &texture_bytes ); if( gl_name ) { gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, gl_name); @@ -2206,12 +2203,12 @@ BOOL LLVOAvatarSelf::bindScratchTexture( LLGLenum format ) if( *last_bind_time != LLImageGL::sLastFrameTime ) { *last_bind_time = LLImageGL::sLastFrameTime; - LLImageGL::updateBoundTexMem(texture_bytes); + LLImageGL::updateBoundTexMem(texture_bytes, components, LLViewerTexture::AVATAR_SCRATCH_TEX) ; } } else { - LLImageGL::updateBoundTexMem(texture_bytes); + LLImageGL::updateBoundTexMem(texture_bytes, components, LLViewerTexture::AVATAR_SCRATCH_TEX) ; sScratchTexLastBindTime.addData( format, new F32(LLImageGL::sLastFrameTime) ); } return TRUE; @@ -2219,9 +2216,8 @@ BOOL LLVOAvatarSelf::bindScratchTexture( LLGLenum format ) return FALSE; } -LLGLuint LLVOAvatarSelf::getScratchTexName( LLGLenum format, U32* texture_bytes ) -{ - S32 components; +LLGLuint LLVOAvatarSelf::getScratchTexName( LLGLenum format, S32& components, U32* texture_bytes ) +{ GLenum internal_format; switch( format ) { @@ -2267,6 +2263,11 @@ LLGLuint LLVOAvatarSelf::getScratchTexName( LLGLenum format, U32* texture_bytes sScratchTexBytes += *texture_bytes; LLImageGL::sGlobalTextureMemoryInBytes += *texture_bytes; + + if(gAuditTexture) + { + LLImageGL::incTextureCounter(SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT, components, LLViewerTexture::AVATAR_SCRATCH_TEX) ; + } return name; } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 6e52b33634..8a66422c44 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -241,7 +241,7 @@ public: BOOL bindScratchTexture(LLGLenum format); static void deleteScratchTextures(); protected: - LLGLuint getScratchTexName(LLGLenum format, U32* texture_bytes); + LLGLuint getScratchTexName(LLGLenum format, S32& components, U32* texture_bytes); private: static S32 sScratchTexBytes; static LLMap< LLGLenum, LLGLuint*> sScratchTexNames; diff --git a/indra/newview/llvoclouds.cpp b/indra/newview/llvoclouds.cpp index 8d3c8b6f1a..177cb16c50 100644 --- a/indra/newview/llvoclouds.cpp +++ b/indra/newview/llvoclouds.cpp @@ -101,7 +101,7 @@ void LLVOClouds::setPixelAreaAndAngle(LLAgent &agent) mPixelArea = 1500*100; } -void LLVOClouds::updateTextures(LLAgent &agent) +void LLVOClouds::updateTextures() { getTEImage(0)->addTextureStats(mPixelArea); } diff --git a/indra/newview/llvoclouds.h b/indra/newview/llvoclouds.h index 95e6b96e4e..c4a75f5b5e 100644 --- a/indra/newview/llvoclouds.h +++ b/indra/newview/llvoclouds.h @@ -65,7 +65,7 @@ public: /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. F32 getPartSize(S32 idx); - /*virtual*/ void updateTextures(LLAgent &agent); + /*virtual*/ void updateTextures(); /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area void updateFaceSize(S32 idx) { } diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 570a3334b9..f33a5cc818 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -106,7 +106,7 @@ void LLVOGrass::updateSpecies() SpeciesMap::const_iterator it = sSpeciesTable.begin(); mSpecies = (*it).first; } - setTEImage(0, LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE)); + setTEImage(0, LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } @@ -322,7 +322,7 @@ void LLVOGrass::setPixelAreaAndAngle(LLAgent &agent) // BUG could speed this up by caching the relative_position and range calculations -void LLVOGrass::updateTextures(LLAgent &agent) +void LLVOGrass::updateTextures() { if (getTEImage(0)) { diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h index 124400d356..6a6fcc31c3 100644 --- a/indra/newview/llvograss.h +++ b/indra/newview/llvograss.h @@ -72,7 +72,7 @@ public: LLStrider<U16>& indicesp); void updateFaceSize(S32 idx) { } - /*virtual*/ void updateTextures(LLAgent &agent); + /*virtual*/ void updateTextures(); /*virtual*/ BOOL updateLOD(); /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area diff --git a/indra/newview/llvoground.cpp b/indra/newview/llvoground.cpp index ac2484ddfd..221c6b61ec 100644 --- a/indra/newview/llvoground.cpp +++ b/indra/newview/llvoground.cpp @@ -70,7 +70,7 @@ BOOL LLVOGround::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } -void LLVOGround::updateTextures(LLAgent &agent) +void LLVOGround::updateTextures() { } diff --git a/indra/newview/llvoground.h b/indra/newview/llvoground.h index af3fcd65d4..0ccb0834a2 100644 --- a/indra/newview/llvoground.h +++ b/indra/newview/llvoground.h @@ -51,7 +51,7 @@ public: // Graphical stuff for objects - maybe broken out into render class // later? - /*virtual*/ void updateTextures(LLAgent &agent); + /*virtual*/ void updateTextures(); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 96fcf61e62..cefc88ebee 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -390,7 +390,15 @@ void LLVoiceChannel::setState(EState state) break; } - mState = state; + doSetState(state); +} + +void LLVoiceChannel::doSetState(const EState& new_state) +{ + EState old_state = mState; + mState = new_state; + if (!mStateChangedCallback.empty()) + mStateChangedCallback(old_state, mState); } void LLVoiceChannel::toggleCallWindowIfNeeded(EState state) @@ -620,7 +628,7 @@ void LLVoiceChannelGroup::setState(EState state) gIMMgr->addSystemMessage(mSessionID, "ringing", mNotifyArgs); } - mState = state; + doSetState(state); break; default: LLVoiceChannel::setState(state); @@ -865,7 +873,7 @@ void LLVoiceChannelP2P::setState(EState state) if (mReceivedCall && state == STATE_RINGING) { gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs); - mState = state; + doSetState(state); return; } LLVoiceChannel::setState(state); diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 9966bdd5ab..8f1e9ff02d 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -52,6 +52,8 @@ public: STATE_CONNECTED } EState; + typedef boost::function<void(const EState& old_state, const EState& new_state)> state_changed_callback_t; + LLVoiceChannel(const LLUUID& session_id, const std::string& session_name); virtual ~LLVoiceChannel(); @@ -69,6 +71,8 @@ public: virtual BOOL callStarted(); const std::string& getSessionName() const { return mSessionName; } + void setStateChangedCallback(state_changed_callback_t callback) { mStateChangedCallback = callback; } + const LLUUID getSessionID() { return mSessionID; } EState getState() { return mState; } @@ -85,6 +89,10 @@ public: protected: virtual void setState(EState state); + /** + * Use this method if you want mStateChangedCallback to be executed while state is changed + */ + void doSetState(const EState& state); void toggleCallWindowIfNeeded(EState state); void setURI(std::string uri); @@ -106,6 +114,9 @@ protected: static LLVoiceChannel* sCurrentVoiceChannel; static LLVoiceChannel* sSuspendedVoiceChannel; static BOOL sSuspended; + +private: + state_changed_callback_t mStateChangedCallback; }; class LLVoiceChannelGroup : public LLVoiceChannel diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp index 9bafc03a6d..e777d7362f 100644 --- a/indra/newview/llvoicevisualizer.cpp +++ b/indra/newview/llvoicevisualizer.cpp @@ -142,7 +142,7 @@ LLVoiceVisualizer::LLVoiceVisualizer( const U8 type ) for (int i=0; i<NUM_VOICE_SYMBOL_WAVES; i++) { mSoundSymbol.mWaveFadeOutStartTime [i] = mCurrentTime; - mSoundSymbol.mTexture [i] = LLViewerTextureManager::getFetchedTextureFromFile(sound_level_img[i], FALSE, TRUE); + mSoundSymbol.mTexture [i] = LLViewerTextureManager::getFetchedTextureFromFile(sound_level_img[i], FALSE, LLViewerTexture::BOOST_UI); mSoundSymbol.mWaveActive [i] = false; mSoundSymbol.mWaveOpacity [i] = 1.0f; mSoundSymbol.mWaveExpansion [i] = 1.0f; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 143cd2d9c6..9dd0b598dc 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -108,7 +108,7 @@ void LLVOPartGroup::setPixelAreaAndAngle(LLAgent &agent) } } -void LLVOPartGroup::updateTextures(LLAgent &agent) +void LLVOPartGroup::updateTextures() { // Texture stats for particles need to be updated in a different way... } diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h index 3dc3292992..18583b4be9 100644 --- a/indra/newview/llvopartgroup.h +++ b/indra/newview/llvopartgroup.h @@ -61,7 +61,7 @@ public: virtual U32 getPartitionType() const; /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); - /*virtual*/ void updateTextures(LLAgent &agent); + /*virtual*/ void updateTextures(); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index d44c543266..5ff8f0d267 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -289,7 +289,7 @@ void LLSkyTex::create(const F32 brightness) void LLSkyTex::createGLImage(S32 which) { - mTexture[which]->createGLTexture(0, mImageRaw[which]); + mTexture[which]->createGLTexture(0, mImageRaw[which], 0, TRUE, LLViewerTexture::LOCAL); mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP); } @@ -376,9 +376,9 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) mSun.setIntensity(SUN_INTENSITY); mMoon.setIntensity(0.1f * SUN_INTENSITY); - mSunTexturep = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, TRUE); + mSunTexturep = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, LLViewerTexture::BOOST_UI); mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); - mMoonTexturep = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, TRUE); + mMoonTexturep = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, LLViewerTexture::BOOST_UI); mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mBloomTexturep = LLViewerTextureManager::getFetchedTexture(IMG_BLOOM1); mBloomTexturep->setNoDelete() ; @@ -472,9 +472,9 @@ void LLVOSky::restoreGL() { mSkyTex[i].restoreGL(); } - mSunTexturep = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, TRUE); + mSunTexturep = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, LLViewerTexture::BOOST_UI); mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); - mMoonTexturep = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, TRUE); + mMoonTexturep = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, LLViewerTexture::BOOST_UI); mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mBloomTexturep = LLViewerTextureManager::getFetchedTexture(IMG_BLOOM1); mBloomTexturep->setNoDelete() ; @@ -1180,7 +1180,7 @@ BOOL LLVOSky::updateSky() return TRUE; } -void LLVOSky::updateTextures(LLAgent &agent) +void LLVOSky::updateTextures() { if (mSunTexturep) { diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 62c934fb41..ef74324e58 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -492,7 +492,7 @@ public: // Graphical stuff for objects - maybe broken out into render class // later? - /*virtual*/ void updateTextures(LLAgent &agent); + /*virtual*/ void updateTextures(); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 164f0f0cad..ef7b161003 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -134,7 +134,7 @@ void LLVOSurfacePatch::setPixelAreaAndAngle(LLAgent &agent) } -void LLVOSurfacePatch::updateTextures(LLAgent &agent) +void LLVOSurfacePatch::updateTextures() { } diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h index aaf4d41fa1..10a5888526 100644 --- a/indra/newview/llvosurfacepatch.h +++ b/indra/newview/llvosurfacepatch.h @@ -75,7 +75,7 @@ public: LLStrider<LLVector2> &texCoords1p, LLStrider<U16> &indicesp); - /*virtual*/ void updateTextures(LLAgent &agent); + /*virtual*/ void updateTextures(); /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area /*virtual*/ void updateSpatialExtents(LLVector3& newMin, LLVector3& newMax); diff --git a/indra/newview/llvotextbubble.cpp b/indra/newview/llvotextbubble.cpp index f5094c025e..75beab519e 100644 --- a/indra/newview/llvotextbubble.cpp +++ b/indra/newview/llvotextbubble.cpp @@ -115,7 +115,7 @@ BOOL LLVOTextBubble::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } -void LLVOTextBubble::updateTextures(LLAgent &agent) +void LLVOTextBubble::updateTextures() { // Update the image levels of all textures... diff --git a/indra/newview/llvotextbubble.h b/indra/newview/llvotextbubble.h index 45d4df2a7e..7f84dbf631 100644 --- a/indra/newview/llvotextbubble.h +++ b/indra/newview/llvotextbubble.h @@ -44,7 +44,7 @@ public: /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); - /*virtual*/ void updateTextures(LLAgent &agent); + /*virtual*/ void updateTextures(); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); /*virtual*/ BOOL updateLOD(); diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 615ae13bc2..235e10f716 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -311,7 +311,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys, // // Load Species-Specific data // - mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); mBranchLength = sSpeciesTable[mSpecies]->mBranchLength; mTrunkLength = sSpeciesTable[mSpecies]->mTrunkLength; mLeafScale = sSpeciesTable[mSpecies]->mLeafScale; @@ -463,7 +463,7 @@ void LLVOTree::setPixelAreaAndAngle(LLAgent &agent) #endif } -void LLVOTree::updateTextures(LLAgent &agent) +void LLVOTree::updateTextures() { if (mTreeImagep) { diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h index 13817fa111..feac9e0675 100644 --- a/indra/newview/llvotree.h +++ b/indra/newview/llvotree.h @@ -69,7 +69,7 @@ public: // Graphical stuff for objects - maybe broken out into render class later? /*virtual*/ void render(LLAgent &agent); /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); - /*virtual*/ void updateTextures(LLAgent &agent); + /*virtual*/ void updateTextures(); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); diff --git a/indra/newview/llvotreenew.h b/indra/newview/llvotreenew.h index 3fec5855ef..426470101d 100644 --- a/indra/newview/llvotreenew.h +++ b/indra/newview/llvotreenew.h @@ -156,7 +156,7 @@ public: /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); /*virtual*/ void render(LLAgent &agent); - /*virtual*/ void updateTextures(LLAgent &agent); + /*virtual*/ void updateTextures(); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 7d4bef3f7d..78f534bacd 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -53,12 +53,10 @@ #include "lldrawpoolbump.h" #include "llface.h" #include "llspatialpartition.h" - -// TEMP HACK ventrella #include "llhudmanager.h" #include "llflexibleobject.h" - #include "llsky.h" +#include "lltexturefetch.h" #include "llviewercamera.h" #include "llviewertexturelist.h" #include "llviewerregion.h" @@ -75,7 +73,6 @@ const S32 MIN_QUIET_FRAMES_COALESCE = 30; const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; const F32 MAX_LOD_DISTANCE = 24.f; -const S32 MAX_SCULPT_REZ = 128; BOOL gAnimateTextures = TRUE; @@ -151,7 +148,6 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re mRelativeXformInvTrans.setIdentity(); mLOD = MIN_LOD; - mSculptLevel = -2; mTextureAnimp = NULL; mVObjRadius = LLVector3(1,1,0.5f).length(); mNumFaces = 0; @@ -564,28 +560,32 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) return TRUE; } -void LLVOVolume::updateTextures(LLAgent &agent) +void LLVOVolume::updateTextures() { const F32 TEXTURE_AREA_REFRESH_TIME = 5.f; // seconds - if (mDrawable.notNull() && mTextureUpdateTimer.getElapsedTimeF32() > TEXTURE_AREA_REFRESH_TIME) + if (mTextureUpdateTimer.getElapsedTimeF32() > TEXTURE_AREA_REFRESH_TIME) { - if (mDrawable->isVisible()) - { - updateTextures(); - } + updateTextureVirtualSize(); } } -void LLVOVolume::updateTextures() +void LLVOVolume::updateTextureVirtualSize() { // Update the pixel area of all faces + if(mDrawable.isNull() || !mDrawable->isVisible()) + { + return ; + } + if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SIMPLE)) { return; } - - if (LLViewerTexture::sDontLoadVolumeTextures || mDrawable.isNull()) // || !mDrawable->isVisible()) + + static LLCachedControl<bool> dont_load_textures(gSavedSettings,"TextureDisable"); + + if (dont_load_textures || LLAppViewer::getTextureFetch()->mDebugPause) // || !mDrawable->isVisible()) { return; } @@ -602,14 +602,15 @@ void LLVOVolume::updateTextures() LLFace* face = mDrawable->getFace(i); const LLTextureEntry *te = face->getTextureEntry(); LLViewerTexture *imagep = face->getTexture(); - if (!imagep || !te || + if (!imagep || !te || face->mExtents[0] == face->mExtents[1]) { continue; } F32 vsize; - + F32 old_size = face->getVirtualSize(); + if (isHUDAttachment()) { F32 area = (F32) LLViewerCamera::getInstance()->getScreenPixelArea(); @@ -619,12 +620,10 @@ void LLVOVolume::updateTextures() } else { - vsize = getTextureVirtualSize(face); + vsize = face->getTextureVirtualSize(); } - mPixelArea = llmax(mPixelArea, face->getPixelArea()); - - F32 old_size = face->getVirtualSize(); + mPixelArea = llmax(mPixelArea, face->getPixelArea()); if (face->mTextureMatrix != NULL) { @@ -636,7 +635,6 @@ void LLVOVolume::updateTextures() } face->setVirtualSize(vsize); - imagep->addTextureStats(vsize); if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA)) { if (vsize < min_vsize) min_vsize = vsize; @@ -665,35 +663,47 @@ void LLVOVolume::updateTextures() { LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); LLUUID id = sculpt_params->getSculptTexture(); - mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); if (mSculptTexture.notNull()) { - S32 lod = llmin(mLOD, 3); - F32 lodf = ((F32)(lod + 1.0f)/4.f); - F32 tex_size = lodf * MAX_SCULPT_REZ; - mSculptTexture->addTextureStats(2.f * tex_size * tex_size); mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(), (S32)LLViewerTexture::BOOST_SCULPTED)); mSculptTexture->setForSculpt() ; - } - - S32 texture_discard = mSculptTexture->getDiscardLevel(); //try to match the texture - S32 current_discard = mSculptLevel; + + if(!mSculptTexture->isCachedRawImageReady()) + { + S32 lod = llmin(mLOD, 3); + F32 lodf = ((F32)(lod + 1.0f)/4.f); + F32 tex_size = lodf * LLViewerTexture::sMaxSculptRez ; + mSculptTexture->addTextureStats(2.f * tex_size * tex_size, FALSE); + + //if the sculpty very close to the view point, load first + { + LLVector3 lookAt = getPositionAgent() - LLViewerCamera::getInstance()->getOrigin(); + F32 dist = lookAt.normVec() ; + F32 cos_angle_to_view_dir = lookAt * LLViewerCamera::getInstance()->getXAxis() ; + mSculptTexture->setAdditionalDecodePriority(0.8f * LLFace::calcImportanceToCamera(cos_angle_to_view_dir, dist)) ; + } + } + + S32 texture_discard = mSculptTexture->getDiscardLevel(); //try to match the texture + S32 current_discard = getVolume() ? getVolume()->getSculptLevel() : -2 ; - if (texture_discard >= 0 && //texture has some data available - (texture_discard < current_discard || //texture has more data than last rebuild - current_discard < 0)) //no previous rebuild - { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); - mSculptChanged = TRUE; - } + if (texture_discard >= 0 && //texture has some data available + (texture_discard < current_discard || //texture has more data than last rebuild + current_discard < 0)) //no previous rebuild + { + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); + mSculptChanged = TRUE; + } - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SCULPTED)) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SCULPTED)) { setDebugText(llformat("T%d C%d V%d\n%dx%d", - texture_discard, current_discard, getVolume()->getSculptLevel(), - mSculptTexture->getHeight(), mSculptTexture->getWidth())); + texture_discard, current_discard, getVolume()->getSculptLevel(), + mSculptTexture->getHeight(), mSculptTexture->getWidth())); } + } } if (getLightTextureID().notNull()) @@ -714,10 +724,10 @@ void LLVOVolume::updateTextures() { setDebugText(llformat("%.0f:%.0f", fsqrtf(min_vsize),fsqrtf(max_vsize))); } - else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY)) - { - setDebugText(llformat("%.0f:%.0f", fsqrtf(min_vsize),fsqrtf(max_vsize))); - } + else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY)) + { + setDebugText(llformat("%.0f:%.0f", fsqrtf(min_vsize),fsqrtf(max_vsize))); + } else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_FACE_AREA)) { setDebugText(llformat("%.0f:%.0f", fsqrtf(min_vsize),fsqrtf(max_vsize))); @@ -729,36 +739,6 @@ void LLVOVolume::updateTextures() } } -F32 LLVOVolume::getTextureVirtualSize(LLFace* face) -{ - //get area of circle around face - LLVector3 center = face->getPositionAgent(); - LLVector3 size = (face->mExtents[1] - face->mExtents[0]) * 0.5f; - - F32 face_area = LLPipeline::calcPixelArea(center, size, *LLViewerCamera::getInstance()); - - face->setPixelArea(face_area); - - if (face_area <= 0) - { - return 0.f; - } - - //get area of circle in texture space - LLVector2 tdim = face->mTexExtents[1] - face->mTexExtents[0]; - F32 texel_area = (tdim * 0.5f).lengthSquared()*3.14159f; - if (texel_area <= 0) - { - // Probably animated, use default - 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); - - return face_area; -} - BOOL LLVOVolume::isActive() const { return !mStatic || mTextureAnimp || (mVolumeImpl && mVolumeImpl->isActive()); @@ -835,7 +815,6 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline) return mDrawable; } - BOOL LLVOVolume::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume) { // Check if we need to change implementations @@ -876,7 +855,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &volume_params, const S32 detail if (isSculpted()) { - mSculptTexture = LLViewerTextureManager::getFetchedTexture(volume_params.getSculptID(), TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + mSculptTexture = LLViewerTextureManager::getFetchedTexture(volume_params.getSculptID(), TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); if (mSculptTexture.notNull()) { //ignore sculpt GL usage since bao fixed this in a separate branch @@ -890,7 +869,6 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &volume_params, const S32 detail { sculpt(); } - mSculptLevel = getVolume()->getSculptLevel(); } } else @@ -905,32 +883,22 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &volume_params, const S32 detail // sculpt replaces generate() for sculpted surfaces void LLVOVolume::sculpt() -{ - U16 sculpt_height = 0; - U16 sculpt_width = 0; - S8 sculpt_components = 0; - const U8* sculpt_data = NULL; - +{ if (mSculptTexture.notNull()) - { - S32 discard_level; - S32 desired_discard = 0; // lower discard levels have MUCH less resolution - - discard_level = desired_discard; + { + U16 sculpt_height = 0; + U16 sculpt_width = 0; + S8 sculpt_components = 0; + const U8* sculpt_data = NULL; + + S32 discard_level = mSculptTexture->getDiscardLevel() ; + LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ; S32 max_discard = mSculptTexture->getMaxDiscardLevel(); if (discard_level > max_discard) discard_level = max_discard; // clamp to the best we can do - S32 best_discard = mSculptTexture->getDiscardLevel(); - if (discard_level < best_discard) - discard_level = best_discard; // clamp to what we have - - if (best_discard == -1) - discard_level = -1; // and if we have nothing, set to nothing - - - S32 current_discard = getVolume()->getSculptLevel(); + S32 current_discard = getVolume()->getSculptLevel() ; if(current_discard < -2) { llwarns << "WARNING!!: Current discard of sculpty at " << current_discard @@ -951,18 +919,7 @@ void LLVOVolume::sculpt() if (current_discard == discard_level) // no work to do here return; - LLPointer<LLImageRaw> raw_image = new LLImageRaw(); - BOOL is_valid = mSculptTexture->readBackRaw(discard_level, raw_image, FALSE); - - sculpt_height = raw_image->getHeight(); - sculpt_width = raw_image->getWidth(); - sculpt_components = raw_image->getComponents(); - - if(is_valid) - { - is_valid = mSculptTexture->isValidForSculpt(discard_level, sculpt_width, sculpt_height, sculpt_components) ; - } - if(!is_valid) + if(!raw_image) { sculpt_width = 0; sculpt_height = 0; @@ -974,10 +931,10 @@ void LLVOVolume::sculpt() } } else - { - if (raw_image->getDataSize() < sculpt_height * sculpt_width * sculpt_components) - llerrs << "Sculpt: image data size = " << raw_image->getDataSize() - << " < " << sculpt_height << " x " << sculpt_width << " x " <<sculpt_components << llendl; + { + sculpt_height = raw_image->getHeight(); + sculpt_width = raw_image->getWidth(); + sculpt_components = raw_image->getComponents(); sculpt_data = raw_image->getData(); @@ -1013,12 +970,6 @@ BOOL LLVOVolume::calcLOD() return FALSE; } - //update face texture sizes on lod calculation - //if (mDrawable->isVisible()) - //{ - // updateTextures(); - //} - S32 cur_detail = 0; F32 radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length(); @@ -1036,7 +987,7 @@ BOOL LLVOVolume::calcLOD() } // DON'T Compensate for field of view changing on FOV zoom. - distance *= 3.14159f/3.f; + distance *= F_PI/3.f; cur_detail = computeLODDetail(llround(distance, 0.01f), llround(radius, 0.01f)); @@ -1796,20 +1747,19 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index) bool LLVOVolume::hasMediaPermission(const LLMediaEntry* media_entry, MediaPermType perm_type) { - // NOTE: This logic duplicates the logic in the server (in particular, in llmediaservice.cpp). + // NOTE: This logic ALMOST duplicates the logic in the server (in particular, in llmediaservice.cpp). if (NULL == media_entry ) return false; // XXX should we assert here? - // The agent has permissions to navigate if: - // - agent has edit permissions, or + // The agent has permissions if: // - world permissions are on, or // - group permissions are on, and agent_id is in the group, or // - agent permissions are on, and agent_id is the owner - if (permModify()) - { - return true; - } - + // *NOTE: We *used* to check for modify permissions here (i.e. permissions were + // granted if permModify() was true). However, this doesn't make sense in the + // viewer: we don't want to show controls or allow interaction if the author + // has deemed it so. See DEV-42115. + U8 media_perms = (perm_type == MEDIA_PERM_INTERACT) ? media_entry->getPermsInteract() : media_entry->getPermsControl(); // World permissions @@ -2784,7 +2734,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e if (face == -1) { start_face = 0; - end_face = volume->getNumFaces(); + end_face = volume->getNumVolumeFaces(); } else { @@ -2799,8 +2749,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e if (face_hit >= 0 && mDrawable->getNumFaces() > face_hit) { - LLFace* face = mDrawable->getFace(face_hit); - + LLFace* face = mDrawable->getFace(face_hit); + if (pick_transparent || !face->getTexture() || !face->getTexture()->hasGLTexture() || face->getTexture()->getMask(face->surfaceToTexture(tc, p, n))) { v_end = p; @@ -3047,7 +2997,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) LLVOVolume* vobj = drawablep->getVOVolume(); llassert_always(vobj); - vobj->updateTextures(); + vobj->updateTextureVirtualSize(); vobj->preRebuild(); drawablep->clearState(LLDrawable::HAS_ALPHA); diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 00810b22c4..0574d3e385 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -139,7 +139,7 @@ public: BOOL getVolumeChanged() const { return mVolumeChanged; } - F32 getTextureVirtualSize(LLFace* face); + /*virtual*/ F32 getRadius() const { return mVObjRadius; }; const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const; @@ -187,8 +187,8 @@ public: /*virtual*/ void updateFaceSize(S32 idx); /*virtual*/ BOOL updateLOD(); void updateRadius(); - /*virtual*/ void updateTextures(LLAgent &agent); - void updateTextures(); + /*virtual*/ void updateTextures(); + void updateTextureVirtualSize(); void updateFaceFlags(); void regenFaces(); @@ -284,7 +284,6 @@ private: LLFrameTimer mTextureUpdateTimer; S32 mLOD; BOOL mLODChanged; - S32 mSculptLevel; BOOL mSculptChanged; F32 mSpotLightPriority; LLMatrix4 mRelativeXform; diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index 0c967f9020..e5ff62746e 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -100,7 +100,7 @@ void LLVOWater::setPixelAreaAndAngle(LLAgent &agent) // virtual -void LLVOWater::updateTextures(LLAgent &agent) +void LLVOWater::updateTextures() { } diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h index 28a5633c58..3cc031e589 100644 --- a/indra/newview/llvowater.h +++ b/indra/newview/llvowater.h @@ -68,7 +68,7 @@ public: /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); /*virtual*/ void updateSpatialExtents(LLVector3& newMin, LLVector3& newMax); - /*virtual*/ void updateTextures(LLAgent &agent); + /*virtual*/ void updateTextures(); /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area virtual U32 getPartitionType() const; diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 8621e5e1d9..d3238f16a8 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -49,12 +49,12 @@ const U32 LLVOWLSky::MAX_SKY_DETAIL = 180; inline U32 LLVOWLSky::getNumStacks(void) { - return gSavedSettings.getU32("WLSkyDetail"); + return llmin(MAX_SKY_DETAIL, llmax(MIN_SKY_DETAIL, gSavedSettings.getU32("WLSkyDetail"))); } inline U32 LLVOWLSky::getNumSlices(void) { - return 2 * gSavedSettings.getU32("WLSkyDetail"); + return 2 * llmin(MAX_SKY_DETAIL, llmax(MIN_SKY_DETAIL, gSavedSettings.getU32("WLSkyDetail"))); } inline U32 LLVOWLSky::getFanNumVerts(void) diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 4cd29bb838..2b4861ce4f 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -60,7 +60,7 @@ static std::string asset_id_to_filename(const LLUUID &asset_id); LLWearable::LLWearable(const LLTransactionID& transaction_id) : mDefinitionVersion(LLWearable::sCurrentDefinitionVersion), - mType(WT_SHAPE) + mType(WT_INVALID) { mTransactionID = transaction_id; mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID()); @@ -68,7 +68,7 @@ LLWearable::LLWearable(const LLTransactionID& transaction_id) : LLWearable::LLWearable(const LLAssetID& asset_id) : mDefinitionVersion( LLWearable::sCurrentDefinitionVersion ), - mType(WT_SHAPE) + mType(WT_INVALID) { mAssetID = asset_id; mTransactionID.setNull(); @@ -181,13 +181,7 @@ void LLWearable::createVisualParams() { if (param->getWearableType() == mType) { - if (mVisualParamIndexMap[param->getID()]) - { - delete mVisualParamIndexMap[param->getID()]; - } - LLViewerVisualParam *new_param = param->cloneParam(this); - new_param->setIsDummy(FALSE); - mVisualParamIndexMap[param->getID()] = new_param; + addVisualParam(param->cloneParam(this)); } } @@ -661,7 +655,7 @@ void LLWearable::writeToAvatar( BOOL set_by_user, BOOL update_customize_floater { image_id = LLVOAvatarDictionary::getDefaultTextureImageID((ETextureIndex) te); } - LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE ); + LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE ); // MULTI-WEARABLE: replace hard-coded 0 avatar->setLocalTextureTE(te, image, set_by_user, 0); } @@ -750,7 +744,8 @@ void LLWearable::copyDataFrom(const LLWearable* src) mDescription = src->mDescription; mPermissions = src->mPermissions; mSaleInfo = src->mSaleInfo; - mType = src->mType; + + setType(src->mType); mSavedVisualParamMap.clear(); // Deep copy of mVisualParamMap (copies only those params that are current, filling in defaults where needed) @@ -763,9 +758,6 @@ void LLWearable::copyDataFrom(const LLWearable* src) S32 id = param->getID(); F32 weight = src->getVisualParamWeight(id); mSavedVisualParamMap[id] = weight; - - // Clones a visual param from src and adds it to this wearable. Value of param is taken from current value of source param, not saved. - addVisualParam(param->cloneParam(this)); } } @@ -860,6 +852,7 @@ void LLWearable::addVisualParam(LLVisualParam *param) { delete mVisualParamIndexMap[param->getID()]; } + param->setIsDummy(FALSE); mVisualParamIndexMap[param->getID()] = param; } @@ -1123,7 +1116,7 @@ void LLWearable::saveNewAsset() const { llinfos << "Update Agent Inventory via capability" << llendl; LLSD body; - body["folder_id"] = gInventory.findCategoryUUIDForType(getAssetType()); + body["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::assetToFolderType(getAssetType())); body["asset_type"] = LLAssetType::lookup(getAssetType()); body["inventory_type"] = LLInventoryType::lookup(LLInventoryType::IT_WEARABLE); body["name"] = getName(); diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index da62223aac..9bde85dcaf 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -70,6 +70,11 @@ struct LLWearableArrivedData LLWearableList::~LLWearableList() { + llassert_always(mList.empty()) ; +} + +void LLWearableList::cleanup() +{ for_each(mList.begin(), mList.end(), DeletePairedPointer()); mList.clear(); } diff --git a/indra/newview/llwearablelist.h b/indra/newview/llwearablelist.h index e5155c66a4..cf1a9bddff 100644 --- a/indra/newview/llwearablelist.h +++ b/indra/newview/llwearablelist.h @@ -44,6 +44,7 @@ class LLWearableList : public LLSingleton<LLWearableList> public: LLWearableList() {} ~LLWearableList(); + void cleanup() ; S32 getLength() const { return mList.size(); } diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 3204c2d264..72431bd22f 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -43,8 +43,9 @@ #include "llfloatermediabrowser.h" #include "llfloaterreg.h" #include "llalertdialog.h" +#include "lltoastalertpanel.h" -class URLLoader : public LLAlertDialog::URLLoader +class URLLoader : public LLAlertURLLoader { virtual void load(const std::string& url , bool force_open_externally) { @@ -65,6 +66,7 @@ static URLLoader sAlertURLLoader; void LLWeb::initClass() { LLAlertDialog::setURLLoader(&sAlertURLLoader); + LLToastAlertPanel::setURLLoader(&sAlertURLLoader); } diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index 1581153c19..c6fd35c142 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -196,7 +196,7 @@ void LLWLParamManager::loadPreset(const std::string & name,bool propagate) escaped_filename += ".xml"; std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", escaped_filename)); - llinfos << "Loading WindLight sky setting from " << pathName << llendl; + //llinfos << "Loading WindLight sky setting from " << pathName << llendl; llifstream presetsXML; presetsXML.open(pathName.c_str()); diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index f198f3a0cf..66cb02ce99 100644 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -34,57 +34,81 @@ #include "llworldmap.h" -#include "llregionhandle.h" +#include "llworldmapmessage.h" #include "message.h" - -#include "llagent.h" -#include "llmapresponders.h" -#include "llviewercontrol.h" -#include "llfloaterworldmap.h" #include "lltracker.h" #include "llviewertexturelist.h" -#include "llviewerregion.h" -#include "llregionflags.h" #include "lltrans.h" -const F32 REQUEST_ITEMS_TIMER = 10.f * 60.f; // 10 minutes +// Timers to temporise database requests +const F32 AGENTS_UPDATE_TIMER = 60.0; // Seconds between 2 agent requests for a region +const F32 REQUEST_ITEMS_TIMER = 10.f * 60.f; // Seconds before we consider re-requesting item data for the grid + +//--------------------------------------------------------------------------- +// LLItemInfo +//--------------------------------------------------------------------------- -// For DEV-17507, do lazy image loading in llworldmapview.cpp instead, -// limiting requests to currently visible regions and minimizing the -// number of textures being requested simultaneously. -// -// Uncomment IMMEDIATE_IMAGE_LOAD to restore the old behavior -// -//#define IMMEDIATE_IMAGE_LOAD LLItemInfo::LLItemInfo(F32 global_x, F32 global_y, const std::string& name, - LLUUID id, - S32 extra, S32 extra2) + LLUUID id) : mName(name), mToolTip(""), mPosGlobal(global_x, global_y, 40.0), mID(id), - mSelected(FALSE), - mExtra(extra), - mExtra2(extra2) + mCount(1) +// mSelected(false) +// mColor() { - mRegionHandle = to_region_handle(mPosGlobal); } -LLSimInfo::LLSimInfo() -: mHandle(0), +//--------------------------------------------------------------------------- +// LLSimInfo +//--------------------------------------------------------------------------- + +LLSimInfo::LLSimInfo(U64 handle) +: mHandle(handle), mName(), mAgentsUpdateTime(0), - mShowAgentLocations(FALSE), mAccess(0x0), mRegionFlags(0x0), - mWaterHeight(0.f), - mAlpha(-1.f) + mFirstAgentRequest(true) +// mWaterHeight(0.f) +{ +} + +void LLSimInfo::setLandForSaleImage (LLUUID image_id) { + mMapImageID = image_id; + + // Fetch the image + if (mMapImageID.notNull()) + { + mOverlayImage = LLViewerTextureManager::getFetchedTexture(mMapImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE); + mOverlayImage->setAddressMode(LLTexUnit::TAM_CLAMP); + } + else + { + mOverlayImage = NULL; + } } +LLPointer<LLViewerFetchedTexture> LLSimInfo::getLandForSaleImage () +{ + if (mOverlayImage.isNull() && mMapImageID.notNull()) + { + // Fetch the image if it hasn't been done yet (unlikely but...) + mOverlayImage = LLViewerTextureManager::getFetchedTexture(mMapImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE); + mOverlayImage->setAddressMode(LLTexUnit::TAM_CLAMP); + } + if (!mOverlayImage.isNull()) + { + // Boost the fetch level when we try to access that image + mOverlayImage->setBoostLevel(LLViewerTexture::BOOST_MAP); + } + return mOverlayImage; +} -LLVector3d LLSimInfo::getGlobalPos(LLVector3 local_pos) const +LLVector3d LLSimInfo::getGlobalPos(const LLVector3& local_pos) const { LLVector3d pos = from_region_handle(mHandle); pos.mdV[VX] += local_pos.mV[VX]; @@ -93,128 +117,184 @@ LLVector3d LLSimInfo::getGlobalPos(LLVector3 local_pos) const return pos; } +LLVector3d LLSimInfo::getGlobalOrigin() const +{ + return from_region_handle(mHandle); +} LLVector3 LLSimInfo::getLocalPos(LLVector3d global_pos) const { LLVector3d sim_origin = from_region_handle(mHandle); return LLVector3(global_pos - sim_origin); } +void LLSimInfo::clearImage() +{ + if (!mOverlayImage.isNull()) + { + mOverlayImage->setBoostLevel(0); + mOverlayImage = NULL; + } +} - -//--------------------------------------------------------------------------- -// World Map -//--------------------------------------------------------------------------- - -LLWorldMap::LLWorldMap() : - mIsTrackingUnknownLocation( FALSE ), - mInvalidLocation( FALSE ), - mIsTrackingDoubleClick( FALSE ), - mIsTrackingCommit( FALSE ), - mUnknownLocation( 0, 0, 0 ), - mRequestLandForSale(true), - mCurrentMap(0), - mMinX(U32_MAX), - mMaxX(U32_MIN), - mMinY(U32_MAX), - mMaxY(U32_MIN), - mNeighborMap(NULL), - mTelehubCoverageMap(NULL), - mNeighborMapWidth(0), - mNeighborMapHeight(0), - mSLURLRegionName(), - mSLURLRegionHandle(0), - mSLURL(), - mSLURLCallback(0), - mSLURLTeleport(false) -{ - for (S32 map=0; map<MAP_SIM_IMAGE_TYPES; ++map) +void LLSimInfo::dropImagePriority() +{ + if (!mOverlayImage.isNull()) { - mMapLoaded[map] = FALSE; - mMapBlockLoaded[map] = new BOOL[MAP_BLOCK_RES*MAP_BLOCK_RES]; - for (S32 idx=0; idx<MAP_BLOCK_RES*MAP_BLOCK_RES; ++idx) - { - mMapBlockLoaded[map][idx] = FALSE; - } + mOverlayImage->setBoostLevel(0); } } +// Update the agent count for that region +void LLSimInfo::updateAgentCount(F64 time) +{ + if ((time - mAgentsUpdateTime > AGENTS_UPDATE_TIMER) || mFirstAgentRequest) + { + LLWorldMapMessage::getInstance()->sendItemRequest(MAP_ITEM_AGENT_LOCATIONS, mHandle); + mAgentsUpdateTime = time; + mFirstAgentRequest = false; + } +} -LLWorldMap::~LLWorldMap() +// Get the total agents count +const S32 LLSimInfo::getAgentCount() const { - reset(); - for (S32 map=0; map<MAP_SIM_IMAGE_TYPES; ++map) + S32 total_agent_count = 0; + for (LLSimInfo::item_info_list_t::const_iterator it = mAgentLocations.begin(); it != mAgentLocations.end(); ++it) { - delete[] mMapBlockLoaded[map]; + total_agent_count += it->getCount(); } + return total_agent_count; } +bool LLSimInfo::isName(const std::string& name) const +{ + return (LLStringUtil::compareInsensitive(name, mName) == 0); +} -void LLWorldMap::reset() +void LLSimInfo::dump() const { - for_each(mSimInfoMap.begin(), mSimInfoMap.end(), DeletePairedPointer()); - mSimInfoMap.clear(); + U32 x_pos, y_pos; + from_region_handle(mHandle, &x_pos, &y_pos); + + LL_INFOS("World Map") << x_pos << "," << y_pos + << " " << mName + << " " << (S32)mAccess + << " " << std::hex << mRegionFlags << std::dec +// << " " << mWaterHeight + << LL_ENDL; +} + +void LLSimInfo::clearItems() +{ + mTelehubs.clear(); + mInfohubs.clear(); + mPGEvents.clear(); + mMatureEvents.clear(); + mAdultEvents.clear(); + mLandForSale.clear(); + mLandForSaleAdult.clear(); +// We persist the agent count though as it is updated on a frequent basis +// mAgentLocations.clear(); +} + +void LLSimInfo::insertAgentLocation(const LLItemInfo& item) +{ + std::string name = item.getName(); - for (S32 m=0; m<MAP_SIM_IMAGE_TYPES; ++m) + // Find the last item in the list with a different name and erase them + item_info_list_t::iterator lastiter; + for (lastiter = mAgentLocations.begin(); lastiter != mAgentLocations.end(); ++lastiter) + { + LLItemInfo& info = *lastiter; + if (info.isName(name)) + { + break; + } + } + if (lastiter != mAgentLocations.begin()) { - mMapLoaded[m] = FALSE; + mAgentLocations.erase(mAgentLocations.begin(), lastiter); } + // Now append the new location + mAgentLocations.push_back(item); +} + +//--------------------------------------------------------------------------- +// World Map +//--------------------------------------------------------------------------- + +LLWorldMap::LLWorldMap() : + mIsTrackingLocation( false ), + mIsTrackingFound( false ), + mIsInvalidLocation( false ), + mIsTrackingDoubleClick( false ), + mIsTrackingCommit( false ), + mTrackingLocation( 0, 0, 0 ), + mFirstRequest(true) +{ + //LL_INFOS("World Map") << "Creating the World Map -> LLWorldMap::LLWorldMap()" << LL_ENDL; + mMapBlockLoaded = new bool[MAP_BLOCK_RES*MAP_BLOCK_RES]; clearSimFlags(); - - eraseItems(); +} - mMinX = U32_MAX; - mMaxX = U32_MIN; - mMinY = U32_MAX; - mMaxY = U32_MIN; +LLWorldMap::~LLWorldMap() +{ + //LL_INFOS("World Map") << "Destroying the World Map -> LLWorldMap::~LLWorldMap()" << LL_ENDL; + reset(); + delete[] mMapBlockLoaded; +} - delete [] mNeighborMap; - mNeighborMap = NULL; - delete [] mTelehubCoverageMap; - mTelehubCoverageMap = NULL; - mNeighborMapWidth = 0; - mNeighborMapHeight = 0; +void LLWorldMap::reset() +{ + clearItems(true); // Clear the items lists + clearImageRefs(); // Clear the world mipmap and the land for sale tiles + clearSimFlags(); // Clear the block info flags array - for (S32 i=0; i<MAP_SIM_IMAGE_TYPES; i++) - { - mMapLayers[i].clear(); - } + // Finally, clear the region map itself + for_each(mSimInfoMap.begin(), mSimInfoMap.end(), DeletePairedPointer()); + mSimInfoMap.clear(); } -void LLWorldMap::eraseItems() +// Returns true if the items have been cleared +bool LLWorldMap::clearItems(bool force) { - if (mRequestTimer.getElapsedTimeF32() > REQUEST_ITEMS_TIMER) + bool clear = false; + if ((mRequestTimer.getElapsedTimeF32() > REQUEST_ITEMS_TIMER) || mFirstRequest || force) { mRequestTimer.reset(); - mTelehubs.clear(); - mInfohubs.clear(); - mPGEvents.clear(); - mMatureEvents.clear(); - mAdultEvents.clear(); - mLandForSale.clear(); + LLSimInfo* sim_info = NULL; + for (sim_info_map_t::iterator it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it) + { + sim_info = it->second; + if (sim_info) + { + sim_info->clearItems(); + } + } + clear = true; + mFirstRequest = false; } -// mAgentLocationsMap.clear(); // persists -// mNumAgents.clear(); // persists + return clear; } - void LLWorldMap::clearImageRefs() { + // We clear the reference to the images we're holding. + // Images hold by the world mipmap first + mWorldMipmap.reset(); + + // Images hold by the region map + LLSimInfo* sim_info = NULL; for (sim_info_map_t::iterator it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it) { - LLSimInfo* info = (*it).second; - if (info->mCurrentImage) - { - info->mCurrentImage->setBoostLevel(0); - info->mCurrentImage = NULL; - } - if (info->mOverlayImage) + sim_info = it->second; + if (sim_info) { - info->mOverlayImage->setBoostLevel(0); - info->mOverlayImage = NULL; + sim_info->clearImage(); } } } @@ -222,15 +302,25 @@ void LLWorldMap::clearImageRefs() // Doesn't clear the already-loaded sim infos, just re-requests them void LLWorldMap::clearSimFlags() { - for (S32 map=0; map<MAP_SIM_IMAGE_TYPES; ++map) + for (S32 idx=0; idx<MAP_BLOCK_RES*MAP_BLOCK_RES; ++idx) { - for (S32 idx=0; idx<MAP_BLOCK_RES*MAP_BLOCK_RES; ++idx) - { - mMapBlockLoaded[map][idx] = FALSE; - } + mMapBlockLoaded[idx] = false; } } +LLSimInfo* LLWorldMap::createSimInfoFromHandle(const U64 handle) +{ + LLSimInfo* sim_info = new LLSimInfo(handle); + mSimInfoMap[handle] = sim_info; + return sim_info; +} + +void LLWorldMap::equalizeBoostLevels() +{ + mWorldMipmap.equalizeBoostLevels(); + return; +} + LLSimInfo* LLWorldMap::simInfoFromPosGlobal(const LLVector3d& pos_global) { U64 handle = to_region_handle(pos_global); @@ -242,11 +332,7 @@ LLSimInfo* LLWorldMap::simInfoFromHandle(const U64 handle) sim_info_map_t::iterator it = mSimInfoMap.find(handle); if (it != mSimInfoMap.end()) { - LLSimInfo* sim_info = (*it).second; - if (sim_info) - { - return sim_info; - } + return it->second; } return NULL; } @@ -257,762 +343,273 @@ LLSimInfo* LLWorldMap::simInfoFromName(const std::string& sim_name) LLSimInfo* sim_info = NULL; if (!sim_name.empty()) { - for (sim_info_map_t::iterator it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it) + // Iterate through the entire sim info map and compare the name + sim_info_map_t::iterator it; + for (it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it) { - sim_info = (*it).second; - if (sim_info - && (0 == LLStringUtil::compareInsensitive(sim_name, sim_info->mName)) ) + sim_info = it->second; + if (sim_info && sim_info->isName(sim_name) ) { + // break out of loop if success break; } - sim_info = NULL; } + // If we got to the end, we haven't found the sim. Reset the ouput value to NULL. + if (it == mSimInfoMap.end()) + sim_info = NULL; } return sim_info; } bool LLWorldMap::simNameFromPosGlobal(const LLVector3d& pos_global, std::string & outSimName ) { - bool gotSimName = true; + LLSimInfo* sim_info = simInfoFromPosGlobal(pos_global); - U64 handle = to_region_handle(pos_global); - - sim_info_map_t::iterator it = mSimInfoMap.find(handle); - if (it != mSimInfoMap.end()) + if (sim_info) { - LLSimInfo* info = (*it).second; - outSimName = info->mName; + outSimName = sim_info->getName(); } else { - gotSimName = false; outSimName = "(unknown region)"; } - return gotSimName; + return (sim_info != NULL); } -void LLWorldMap::setCurrentLayer(S32 layer, bool request_layer) +void LLWorldMap::reloadItems(bool force) { - mCurrentMap = layer; - if (!mMapLoaded[layer] || request_layer) + //LL_INFOS("World Map") << "LLWorldMap::reloadItems()" << LL_ENDL; + if (clearItems(force)) { - sendMapLayerRequest(); + LLWorldMapMessage::getInstance()->sendItemRequest(MAP_ITEM_TELEHUB); + LLWorldMapMessage::getInstance()->sendItemRequest(MAP_ITEM_PG_EVENT); + LLWorldMapMessage::getInstance()->sendItemRequest(MAP_ITEM_MATURE_EVENT); + LLWorldMapMessage::getInstance()->sendItemRequest(MAP_ITEM_ADULT_EVENT); + LLWorldMapMessage::getInstance()->sendItemRequest(MAP_ITEM_LAND_FOR_SALE); } - - if (mTelehubs.size() == 0 || - mInfohubs.size() == 0) - { - // Request for telehubs - sendItemRequest(MAP_ITEM_TELEHUB); - } - - if (mPGEvents.size() == 0) - { - // Request for events - sendItemRequest(MAP_ITEM_PG_EVENT); - } - - if (mMatureEvents.size() == 0) - { - // Request for events (mature) - sendItemRequest(MAP_ITEM_MATURE_EVENT); - } - - if (mAdultEvents.size() == 0) - { - // Request for events (adult) - sendItemRequest(MAP_ITEM_ADULT_EVENT); - } - - if (mLandForSale.size() == 0) - { - // Request for Land For Sale - sendItemRequest(MAP_ITEM_LAND_FOR_SALE); - } - - if (mLandForSaleAdult.size() == 0) - { - // Request for Land For Sale - sendItemRequest(MAP_ITEM_LAND_FOR_SALE_ADULT); - } - - clearImageRefs(); - clearSimFlags(); } -void LLWorldMap::sendItemRequest(U32 type, U64 handle) -{ - LLMessageSystem* msg = gMessageSystem; - S32 layer = mCurrentMap; - - msg->newMessageFast(_PREHASH_MapItemRequest); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addU32Fast(_PREHASH_Flags, layer); - msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim - msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim - - msg->nextBlockFast(_PREHASH_RequestData); - msg->addU32Fast(_PREHASH_ItemType, type); - msg->addU64Fast(_PREHASH_RegionHandle, handle); // If zero, filled in on sim - - gAgent.sendReliableMessage(); -} -// public -void LLWorldMap::sendMapLayerRequest() +// static public +// Insert a region in the region map +// returns true if region inserted, false otherwise +bool LLWorldMap::insertRegion(U32 x_world, U32 y_world, std::string& name, LLUUID& image_id, U32 accesscode, U32 region_flags) { - if (!gAgent.getRegion()) return; - - LLSD body; - body["Flags"] = mCurrentMap; - std::string url = gAgent.getRegion()->getCapability( - gAgent.isGodlike() ? "MapLayerGod" : "MapLayer"); - - if (!url.empty()) + // This region doesn't exist + if (accesscode == 255) { - llinfos << "LLWorldMap::sendMapLayerRequest via capability" << llendl; - LLHTTPClient::post(url, body, new LLMapLayerResponder()); + // Checks if the track point is in it and invalidates it if it is + if (LLWorldMap::getInstance()->isTrackingInRectangle( x_world, y_world, x_world + REGION_WIDTH_UNITS, y_world + REGION_WIDTH_UNITS)) + { + LLWorldMap::getInstance()->setTrackingInvalid(); + } + // return failure to insert + return false; } else { - llinfos << "LLWorldMap::sendMapLayerRequest via message system" << llendl; - LLMessageSystem* msg = gMessageSystem; - S32 layer = mCurrentMap; - - // Request for layer - msg->newMessageFast(_PREHASH_MapLayerRequest); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addU32Fast(_PREHASH_Flags, layer); - msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim - msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim - gAgent.sendReliableMessage(); - - if (mRequestLandForSale) + U64 handle = to_region_handle(x_world, y_world); + //LL_INFOS("World Map") << "Map sim : " << name << ", ID : " << image_id.getString() << LL_ENDL; + // Insert the region in the region map of the world map + // Loading the LLSimInfo object with what we got and insert it in the map + LLSimInfo* siminfo = LLWorldMap::getInstance()->simInfoFromHandle(handle); + if (siminfo == NULL) { - msg->newMessageFast(_PREHASH_MapLayerRequest); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addU32Fast(_PREHASH_Flags, 2); - msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim - msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim - gAgent.sendReliableMessage(); + siminfo = LLWorldMap::getInstance()->createSimInfoFromHandle(handle); } + siminfo->setName(name); + siminfo->setAccess(accesscode); + siminfo->setRegionFlags(region_flags); + // siminfo->setWaterHeight((F32) water_height); + siminfo->setLandForSaleImage(image_id); + + // Handle the location tracking (for teleport, UI feedback and info display) + if (LLWorldMap::getInstance()->isTrackingInRectangle( x_world, y_world, x_world + REGION_WIDTH_UNITS, y_world + REGION_WIDTH_UNITS)) + { + if (siminfo->isDown()) + { + // We were tracking this location, but it's no available + LLWorldMap::getInstance()->setTrackingInvalid(); + } + else + { + // We were tracking this location, and it does exist and is available + LLWorldMap::getInstance()->setTrackingValid(); + } + } + // return insert region success + return true; } } -// public -void LLWorldMap::sendNamedRegionRequest(std::string region_name) -{ - LLMessageSystem* msg = gMessageSystem; - S32 layer = mCurrentMap; - - // Request for layer - msg->newMessageFast(_PREHASH_MapNameRequest); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addU32Fast(_PREHASH_Flags, layer); - msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim - msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim - msg->nextBlockFast(_PREHASH_NameData); - msg->addStringFast(_PREHASH_Name, region_name); - gAgent.sendReliableMessage(); -} -// public -void LLWorldMap::sendNamedRegionRequest(std::string region_name, - url_callback_t callback, - const std::string& callback_url, - bool teleport) // immediately teleport when result returned -{ - mSLURLRegionName = region_name; - mSLURLRegionHandle = 0; - mSLURL = callback_url; - mSLURLCallback = callback; - mSLURLTeleport = teleport; - - sendNamedRegionRequest(region_name); -} - -void LLWorldMap::sendHandleRegionRequest(U64 region_handle, - url_callback_t callback, - const std::string& callback_url, - bool teleport) // immediately teleport when result returned -{ - mSLURLRegionName.clear(); - mSLURLRegionHandle = region_handle; - mSLURL = callback_url; - mSLURLCallback = callback; - mSLURLTeleport = teleport; - - U32 global_x; - U32 global_y; - from_region_handle(region_handle, &global_x, &global_y); - U16 grid_x = (U16)(global_x / REGION_WIDTH_UNITS); - U16 grid_y = (U16)(global_y / REGION_WIDTH_UNITS); - - sendMapBlockRequest(grid_x, grid_y, grid_x, grid_y, true); -} - -// public -void LLWorldMap::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent) -{ - S32 layer = mCurrentMap; - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_MapBlockRequest); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - U32 flags = layer; - flags |= (return_nonexistent ? 0x10000 : 0); - msg->addU32Fast(_PREHASH_Flags, flags); - msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim - msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim - msg->nextBlockFast(_PREHASH_PositionData); - msg->addU16Fast(_PREHASH_MinX, min_x); - msg->addU16Fast(_PREHASH_MinY, min_y); - msg->addU16Fast(_PREHASH_MaxX, max_x); - msg->addU16Fast(_PREHASH_MaxY, max_y); - gAgent.sendReliableMessage(); - - if (mRequestLandForSale) - { - msg->newMessageFast(_PREHASH_MapBlockRequest); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addU32Fast(_PREHASH_Flags, 2); - msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim - msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim - msg->nextBlockFast(_PREHASH_PositionData); - msg->addU16Fast(_PREHASH_MinX, min_x); - msg->addU16Fast(_PREHASH_MinY, min_y); - msg->addU16Fast(_PREHASH_MaxX, max_x); - msg->addU16Fast(_PREHASH_MaxY, max_y); - gAgent.sendReliableMessage(); - } -} - -// public static -void LLWorldMap::processMapLayerReply(LLMessageSystem* msg, void**) +// static public +// Insert an item in the relevant region map +// returns true if item inserted, false otherwise +bool LLWorldMap::insertItem(U32 x_world, U32 y_world, std::string& name, LLUUID& uuid, U32 type, S32 extra, S32 extra2) { - llinfos << "LLWorldMap::processMapLayerReply from message system" << llendl; - - U32 agent_flags; - msg->getU32Fast(_PREHASH_AgentData, _PREHASH_Flags, agent_flags); - - if (agent_flags != (U32)LLWorldMap::getInstance()->mCurrentMap) - { - llwarns << "Invalid or out of date map image type returned!" << llendl; - return; - } + // Create an item record for the received object + LLItemInfo new_item((F32)x_world, (F32)y_world, name, uuid); - LLUUID image_id; - //U32 left, right, top, bottom; + // Compute a region handle based on the objects coordinates + LLVector3d pos((F32)x_world, (F32)y_world, 40.0); + U64 handle = to_region_handle(pos); - S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_LayerData); - - LLWorldMap::getInstance()->mMapLayers[agent_flags].clear(); - - BOOL adjust = FALSE; - for (S32 block=0; block<num_blocks; ++block) + // Get the region record for that handle or NULL if we haven't browsed it yet + LLSimInfo* siminfo = LLWorldMap::getInstance()->simInfoFromHandle(handle); + if (siminfo == NULL) { - LLWorldMapLayer new_layer; - new_layer.LayerDefined = TRUE; - msg->getUUIDFast(_PREHASH_LayerData, _PREHASH_ImageID, new_layer.LayerImageID, block); - new_layer.LayerImage = LLViewerTextureManager::getFetchedTexture(new_layer.LayerImageID, MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); - - gGL.getTexUnit(0)->bind(new_layer.LayerImage); - new_layer.LayerImage->setAddressMode(LLTexUnit::TAM_CLAMP); - - U32 left, right, top, bottom; - msg->getU32Fast(_PREHASH_LayerData, _PREHASH_Left, left, block); - msg->getU32Fast(_PREHASH_LayerData, _PREHASH_Right, right, block); - msg->getU32Fast(_PREHASH_LayerData, _PREHASH_Top, top, block); - msg->getU32Fast(_PREHASH_LayerData, _PREHASH_Bottom, bottom, block); - - new_layer.LayerExtents.mLeft = left; - new_layer.LayerExtents.mRight = right; - new_layer.LayerExtents.mBottom = bottom; - new_layer.LayerExtents.mTop = top; - - F32 x_meters = F32(left*REGION_WIDTH_UNITS); - F32 y_meters = F32(bottom*REGION_WIDTH_UNITS); - adjust = LLWorldMap::getInstance()->extendAABB(U32(x_meters), U32(y_meters), - U32(x_meters+REGION_WIDTH_UNITS*new_layer.LayerExtents.getWidth()), - U32(y_meters+REGION_WIDTH_UNITS*new_layer.LayerExtents.getHeight())) || adjust; - - LLWorldMap::getInstance()->mMapLayers[agent_flags].push_back(new_layer); + siminfo = LLWorldMap::getInstance()->createSimInfoFromHandle(handle); } - LLWorldMap::getInstance()->mMapLoaded[agent_flags] = TRUE; - if(adjust) gFloaterWorldMap->adjustZoomSliderBounds(); -} - -// public static -void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**) -{ - U32 agent_flags; - msg->getU32Fast(_PREHASH_AgentData, _PREHASH_Flags, agent_flags); - - if ((S32)agent_flags < 0 || agent_flags >= MAP_SIM_IMAGE_TYPES) + //LL_INFOS("World Map") << "Process item : type = " << type << LL_ENDL; + switch (type) { - llwarns << "Invalid map image type returned! " << agent_flags << llendl; - return; - } - - S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_Data); - - bool found_null_sim = false; - - BOOL adjust = FALSE; - for (S32 block=0; block<num_blocks; ++block) - { - U16 x_regions; - U16 y_regions; - std::string name; - U8 accesscode; - U32 region_flags; - U8 water_height; - U8 agents; - LLUUID image_id; - msg->getU16Fast(_PREHASH_Data, _PREHASH_X, x_regions, block); - msg->getU16Fast(_PREHASH_Data, _PREHASH_Y, y_regions, block); - msg->getStringFast(_PREHASH_Data, _PREHASH_Name, name, block); - msg->getU8Fast(_PREHASH_Data, _PREHASH_Access, accesscode, block); - msg->getU32Fast(_PREHASH_Data, _PREHASH_RegionFlags, region_flags, block); - msg->getU8Fast(_PREHASH_Data, _PREHASH_WaterHeight, water_height, block); - msg->getU8Fast(_PREHASH_Data, _PREHASH_Agents, agents, block); - msg->getUUIDFast(_PREHASH_Data, _PREHASH_MapImageID, image_id, block); - - U32 x_meters = x_regions * REGION_WIDTH_UNITS; - U32 y_meters = y_regions * REGION_WIDTH_UNITS; - - U64 handle = to_region_handle(x_meters, y_meters); - - if (accesscode == 255) - { - // This region doesn't exist - if (LLWorldMap::getInstance()->mIsTrackingUnknownLocation && - LLWorldMap::getInstance()->mUnknownLocation.mdV[0] >= x_meters && - LLWorldMap::getInstance()->mUnknownLocation.mdV[0] < x_meters + 256 && - LLWorldMap::getInstance()->mUnknownLocation.mdV[1] >= y_meters && - LLWorldMap::getInstance()->mUnknownLocation.mdV[1] < y_meters + 256) - { - // We were tracking this location, but it doesn't exist - LLWorldMap::getInstance()->mInvalidLocation = TRUE; - } - - found_null_sim = true; - } - else + case MAP_ITEM_TELEHUB: // telehubs { - adjust = LLWorldMap::getInstance()->extendAABB(x_meters, - y_meters, - x_meters+REGION_WIDTH_UNITS, - y_meters+REGION_WIDTH_UNITS) || adjust; - -// llinfos << "Map sim " << name << " image layer " << agent_flags << " ID " << image_id.getString() << llendl; - - LLSimInfo* siminfo = new LLSimInfo(); - sim_info_map_t::iterator iter = LLWorldMap::getInstance()->mSimInfoMap.find(handle); - if (iter != LLWorldMap::getInstance()->mSimInfoMap.end()) - { - LLSimInfo* oldinfo = iter->second; - for (S32 image=0; image<MAP_SIM_IMAGE_TYPES; ++image) - { - siminfo->mMapImageID[image] = oldinfo->mMapImageID[image]; - } - delete oldinfo; - } - LLWorldMap::getInstance()->mSimInfoMap[handle] = siminfo; - - siminfo->mHandle = handle; - siminfo->mName.assign( name ); - siminfo->mAccess = accesscode; - siminfo->mRegionFlags = region_flags; - siminfo->mWaterHeight = (F32) water_height; - siminfo->mMapImageID[agent_flags] = image_id; - -#ifdef IMMEDIATE_IMAGE_LOAD - siminfo->mCurrentImage = LLViewerTextureManager::getFetchedTexture(siminfo->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); - siminfo->mCurrentImage->setAddressMode(LLTexUnit::TAM_CLAMP); -#endif + /* Merov: we are not using the hub color anymore for display so commenting that out + // Telehub color + U32 X = x_world / REGION_WIDTH_UNITS; + U32 Y = y_world / REGION_WIDTH_UNITS; + F32 red = fmod((F32)X * 0.11f, 1.f) * 0.8f; + F32 green = fmod((F32)Y * 0.11f, 1.f) * 0.8f; + F32 blue = fmod(1.5f * (F32)(X + Y) * 0.11f, 1.f) * 0.8f; + F32 add_amt = (X % 2) ? 0.15f : -0.15f; + add_amt += (Y % 2) ? -0.15f : 0.15f; + LLColor4 color(red + add_amt, green + add_amt, blue + add_amt); + new_item.setColor(color); + */ - if (siminfo->mMapImageID[2].notNull()) + // extra2 specifies whether this is an infohub or a telehub. + if (extra2) { -#ifdef IMMEDIATE_IMAGE_LOAD - siminfo->mOverlayImage = LLViewerTextureManager::getFetchedTexture(siminfo->mMapImageID[2], MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); -#endif + siminfo->insertInfoHub(new_item); } else { - siminfo->mOverlayImage = NULL; - } - - if (LLWorldMap::getInstance()->mIsTrackingUnknownLocation && - LLWorldMap::getInstance()->mUnknownLocation.mdV[0] >= x_meters && - LLWorldMap::getInstance()->mUnknownLocation.mdV[0] < x_meters + 256 && - LLWorldMap::getInstance()->mUnknownLocation.mdV[1] >= y_meters && - LLWorldMap::getInstance()->mUnknownLocation.mdV[1] < y_meters + 256) - { - if (siminfo->mAccess == SIM_ACCESS_DOWN) - { - // We were tracking this location, but it doesn't exist - LLWorldMap::getInstance()->mInvalidLocation = true; - } - else - { - // We were tracking this location, and it does exist - bool is_tracking_dbl = LLWorldMap::getInstance()->mIsTrackingDoubleClick == TRUE; - gFloaterWorldMap->trackLocation(LLWorldMap::getInstance()->mUnknownLocation); - if (is_tracking_dbl) - { - LLVector3d pos_global = LLTracker::getTrackedPositionGlobal(); - gAgent.teleportViaLocation( pos_global ); - } - } + siminfo->insertTeleHub(new_item); } + break; } - - if(LLWorldMap::getInstance()->mSLURLCallback != NULL) + case MAP_ITEM_PG_EVENT: // events + case MAP_ITEM_MATURE_EVENT: + case MAP_ITEM_ADULT_EVENT: { - // Server returns definitive capitalization, SLURL might not have that. - if ((LLStringUtil::compareInsensitive(LLWorldMap::getInstance()->mSLURLRegionName, name)==0) - || (LLWorldMap::getInstance()->mSLURLRegionHandle == handle)) + std::string timeStr = "["+ LLTrans::getString ("TimeHour")+"]:[" + +LLTrans::getString ("TimeMin")+"] [" + +LLTrans::getString ("TimeAMPM")+"]"; + LLSD substitution; + substitution["datetime"] = (S32) extra; + LLStringUtil::format (timeStr, substitution); + new_item.setTooltip(timeStr); + + // HACK: store Z in extra2 + new_item.setElevation((F64)extra2); + if (type == MAP_ITEM_PG_EVENT) { - url_callback_t callback = LLWorldMap::getInstance()->mSLURLCallback; - - LLWorldMap::getInstance()->mSLURLCallback = NULL; - LLWorldMap::getInstance()->mSLURLRegionName.clear(); - LLWorldMap::getInstance()->mSLURLRegionHandle = 0; - - callback(handle, LLWorldMap::getInstance()->mSLURL, image_id, LLWorldMap::getInstance()->mSLURLTeleport); + siminfo->insertPGEvent(new_item); } - } - } - - if(adjust) gFloaterWorldMap->adjustZoomSliderBounds(); - gFloaterWorldMap->updateSims(found_null_sim); -} - -// public static -void LLWorldMap::processMapItemReply(LLMessageSystem* msg, void**) -{ - U32 type; - msg->getU32Fast(_PREHASH_RequestData, _PREHASH_ItemType, type); - - S32 num_blocks = msg->getNumberOfBlocks("Data"); - - for (S32 block=0; block<num_blocks; ++block) - { - U32 X, Y; - std::string name; - S32 extra, extra2; - LLUUID uuid; - msg->getU32Fast(_PREHASH_Data, _PREHASH_X, X, block); - msg->getU32Fast(_PREHASH_Data, _PREHASH_Y, Y, block); - msg->getStringFast(_PREHASH_Data, _PREHASH_Name, name, block); - msg->getUUIDFast(_PREHASH_Data, _PREHASH_ID, uuid, block); - msg->getS32Fast(_PREHASH_Data, _PREHASH_Extra, extra, block); - msg->getS32Fast(_PREHASH_Data, _PREHASH_Extra2, extra2, block); - - F32 world_x = (F32)X; - X /= REGION_WIDTH_UNITS; - F32 world_y = (F32)Y; - Y /= REGION_WIDTH_UNITS; - - LLItemInfo new_item(world_x, world_y, name, uuid, extra, extra2); - LLSimInfo* siminfo = LLWorldMap::getInstance()->simInfoFromHandle(new_item.mRegionHandle); - - switch (type) - { - case MAP_ITEM_TELEHUB: // telehubs + else if (type == MAP_ITEM_MATURE_EVENT) { - // Telehub color, store in extra as 4 U8's - U8 *color = (U8 *)&new_item.mExtra; - - F32 red = fmod((F32)X * 0.11f, 1.f) * 0.8f; - F32 green = fmod((F32)Y * 0.11f, 1.f) * 0.8f; - F32 blue = fmod(1.5f * (F32)(X + Y) * 0.11f, 1.f) * 0.8f; - F32 add_amt = (X % 2) ? 0.15f : -0.15f; - add_amt += (Y % 2) ? -0.15f : 0.15f; - color[0] = U8((red + add_amt) * 255); - color[1] = U8((green + add_amt) * 255); - color[2] = U8((blue + add_amt) * 255); - color[3] = 255; - - // extra2 specifies whether this is an infohub or a telehub. - if (extra2) - { - LLWorldMap::getInstance()->mInfohubs.push_back(new_item); - } - else - { - LLWorldMap::getInstance()->mTelehubs.push_back(new_item); - } - - break; + siminfo->insertMatureEvent(new_item); } - case MAP_ITEM_PG_EVENT: // events - case MAP_ITEM_MATURE_EVENT: - case MAP_ITEM_ADULT_EVENT: + else if (type == MAP_ITEM_ADULT_EVENT) { - std::string timeStr = "["+ LLTrans::getString ("TimeHour")+"]:[" - +LLTrans::getString ("TimeMin")+"] [" - +LLTrans::getString ("TimeAMPM")+"]"; - LLSD substitution; - substitution["datetime"] = (S32) extra; - LLStringUtil::format (timeStr, substitution); - new_item.mToolTip = timeStr; - - // HACK: store Z in extra2 - new_item.mPosGlobal.mdV[VZ] = (F64)extra2; - if (type == MAP_ITEM_PG_EVENT) - { - LLWorldMap::getInstance()->mPGEvents.push_back(new_item); - } - else if (type == MAP_ITEM_MATURE_EVENT) - { - LLWorldMap::getInstance()->mMatureEvents.push_back(new_item); - } - else if (type == MAP_ITEM_ADULT_EVENT) - { - LLWorldMap::getInstance()->mAdultEvents.push_back(new_item); - } - - break; + siminfo->insertAdultEvent(new_item); } - case MAP_ITEM_LAND_FOR_SALE: // land for sale - case MAP_ITEM_LAND_FOR_SALE_ADULT: // adult land for sale + break; + } + case MAP_ITEM_LAND_FOR_SALE: // land for sale + case MAP_ITEM_LAND_FOR_SALE_ADULT: // adult land for sale + { + std::string tooltip = llformat("%d sq. m. L$%d", extra, extra2); + new_item.setTooltip(tooltip); + if (type == MAP_ITEM_LAND_FOR_SALE) { - new_item.mToolTip = llformat("%d sq. m. L$%d", new_item.mExtra, new_item.mExtra2); - if (type == MAP_ITEM_LAND_FOR_SALE) - { - LLWorldMap::getInstance()->mLandForSale.push_back(new_item); - } - else if (type == MAP_ITEM_LAND_FOR_SALE_ADULT) - { - LLWorldMap::getInstance()->mLandForSaleAdult.push_back(new_item); - } - break; + siminfo->insertLandForSale(new_item); } - case MAP_ITEM_CLASSIFIED: // classifieds + else if (type == MAP_ITEM_LAND_FOR_SALE_ADULT) { - //DEPRECATED: no longer used - break; + siminfo->insertLandForSaleAdult(new_item); } - case MAP_ITEM_AGENT_LOCATIONS: // agent locations + break; + } + case MAP_ITEM_CLASSIFIED: // classifieds + { + //DEPRECATED: no longer used + break; + } + case MAP_ITEM_AGENT_LOCATIONS: // agent locations + { +// LL_INFOS("World Map") << "New Location " << new_item.mName << LL_ENDL; + if (extra > 0) { - if (!siminfo) - { - llinfos << "siminfo missing for " << new_item.mPosGlobal.mdV[0] << ", " << new_item.mPosGlobal.mdV[1] << llendl; - break; - } -// llinfos << "New Location " << new_item.mName << llendl; - - item_info_list_t& agentcounts = LLWorldMap::getInstance()->mAgentLocationsMap[new_item.mRegionHandle]; - - // Find the last item in the list with a different name and erase them - item_info_list_t::iterator lastiter; - for (lastiter = agentcounts.begin(); lastiter!=agentcounts.end(); ++lastiter) - { - const LLItemInfo& info = *lastiter; - if (info.mName == new_item.mName) - { - break; - } - } - if (lastiter != agentcounts.begin()) - { - agentcounts.erase(agentcounts.begin(), lastiter); - } - // Now append the new location - if (new_item.mExtra > 0) - { - agentcounts.push_back(new_item); - } - break; + new_item.setCount(extra); + siminfo->insertAgentLocation(new_item); } - default: - break; - }; - } -} - -void LLWorldMap::dump() -{ - for (sim_info_map_t::iterator it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it) - { - U64 handle = (*it).first; - LLSimInfo* info = (*it).second; - - U32 x_pos, y_pos; - from_region_handle(handle, &x_pos, &y_pos); - - llinfos << x_pos << "," << y_pos - << " " << info->mName - << " " << (S32)info->mAccess - << " " << std::hex << info->mRegionFlags << std::dec - << " " << info->mWaterHeight - //<< " " << info->mTelehubName - //<< " " << info->mTelehubPosition - << llendl; - - if (info->mCurrentImage) - { - llinfos << "image discard " << (S32)info->mCurrentImage->getDiscardLevel() - << " fullwidth " << info->mCurrentImage->getFullWidth() - << " fullheight " << info->mCurrentImage->getFullHeight() - << " maxvirt " << info->mCurrentImage->getMaxVirtualSize() - //<< " maxdisc " << (S32)info->mCurrentImage->getMaxDiscardLevel() - << llendl; + break; } + default: + break; } + return true; } - -BOOL LLWorldMap::extendAABB(U32 min_x, U32 min_y, U32 max_x, U32 max_y) +bool LLWorldMap::isTrackingInRectangle(F64 x0, F64 y0, F64 x1, F64 y1) { - BOOL rv = FALSE; - if (min_x < mMinX) - { - rv = TRUE; - mMinX = min_x; - } - if (min_y < mMinY) - { - rv = TRUE; - mMinY = min_y; - } - if (max_x > mMaxX) - { - rv = TRUE; - mMaxX = max_x; - } - if (max_y > mMaxY) - { - rv = TRUE; - mMaxY = max_y; - } - lldebugs << "World map aabb: (" << mMinX << ", " << mMinY << "), (" - << mMaxX << ", " << mMaxY << ")" << llendl; - return rv; + if (!mIsTrackingLocation) + return false; + return ((mTrackingLocation[0] >= x0) && (mTrackingLocation[0] < x1) && (mTrackingLocation[1] >= y0) && (mTrackingLocation[1] < y1)); } - -U32 LLWorldMap::getWorldWidth() const +// Drop priority of all images being fetched by the map +void LLWorldMap::dropImagePriorities() { - return mMaxX - mMinX; -} - - -U32 LLWorldMap::getWorldHeight() const -{ - return mMaxY - mMinY; -} - -BOOL LLWorldMap::coveredByTelehub(LLSimInfo* infop) -{ - /*if (!mTelehubCoverageMap) + // Drop the download of tiles priority to nil + mWorldMipmap.dropBoostLevels(); + // Same for the "land for sale" tiles per region + for (sim_info_map_t::iterator it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it) { - return FALSE; + LLSimInfo* info = it->second; + info->dropImagePriority(); } - U32 x_pos, y_pos; - from_region_handle(infop->mHandle, &x_pos, &y_pos); - x_pos /= REGION_WIDTH_UNITS; - y_pos /= REGION_WIDTH_UNITS; - - S32 index = x_pos - (mMinX / REGION_WIDTH_UNITS - 1) + (mNeighborMapWidth * (y_pos - (mMinY / REGION_WIDTH_UNITS - 1))); - return mTelehubCoverageMap[index] != 0; */ - return FALSE; } -void LLWorldMap::updateTelehubCoverage() +// Load all regions in a given rectangle (in region grid coordinates, i.e. world / 256 meters) +void LLWorldMap::updateRegions(S32 x0, S32 y0, S32 x1, S32 y1) { - /*S32 neighbor_width = getWorldWidth() / REGION_WIDTH_UNITS + 2; - S32 neighbor_height = getWorldHeight() / REGION_WIDTH_UNITS + 2; - if (neighbor_width > mNeighborMapWidth || neighbor_height > mNeighborMapHeight) - { - mNeighborMapWidth = neighbor_width; - mNeighborMapHeight = neighbor_height; - delete mNeighborMap; - delete mTelehubCoverageMap; - - mNeighborMap = new U8[mNeighborMapWidth * mNeighborMapHeight]; - mTelehubCoverageMap = new U8[mNeighborMapWidth * mNeighborMapHeight]; - } - - memset(mNeighborMap, 0, mNeighborMapWidth * mNeighborMapHeight * sizeof(U8)); - memset(mTelehubCoverageMap, 0, mNeighborMapWidth * mNeighborMapHeight * sizeof(U8)); + // Convert those boundaries to the corresponding (MAP_BLOCK_SIZE x MAP_BLOCK_SIZE) block coordinates + x0 = x0 / MAP_BLOCK_SIZE; + x1 = x1 / MAP_BLOCK_SIZE; + y0 = y0 / MAP_BLOCK_SIZE; + y1 = y1 / MAP_BLOCK_SIZE; - // leave 1 sim border - S32 min_x = (mMinX / REGION_WIDTH_UNITS) - 1; - S32 min_y = (mMinY / REGION_WIDTH_UNITS) - 1; - - std::map<U64, LLSimInfo*>::const_iterator it; - for (it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it) + // Load the region info those blocks + for (S32 block_x = llmax(x0, 0); block_x <= llmin(x1, MAP_BLOCK_RES-1); ++block_x) { - U64 handle = (*it).first; - //LLSimInfo* info = (*it).second; - - U32 x_pos, y_pos; - from_region_handle(handle, &x_pos, &y_pos); - x_pos /= REGION_WIDTH_UNITS; - y_pos /= REGION_WIDTH_UNITS; - x_pos -= min_x; - y_pos -= min_y; - - S32 index = x_pos + (mNeighborMapWidth * y_pos); - mNeighborMap[index - 1]++; - mNeighborMap[index + 1]++; - mNeighborMap[index - mNeighborMapWidth]++; - mNeighborMap[index + mNeighborMapWidth]++; - } - - for (it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it) - { - U64 handle = (*it).first; - LLSimInfo* info = (*it).second; - - U32 x_pos, y_pos; - from_region_handle(handle, &x_pos, &y_pos); - x_pos /= REGION_WIDTH_UNITS; - y_pos /= REGION_WIDTH_UNITS; - x_pos -= min_x; - y_pos -= min_y; - - S32 index = x_pos + (mNeighborMapWidth * y_pos); - - if (!info->mTelehubName.empty() && mNeighborMap[index]) + for (S32 block_y = llmax(y0, 0); block_y <= llmin(y1, MAP_BLOCK_RES-1); ++block_y) { - S32 x_start = llmax(0, S32(x_pos - 5)); - S32 x_span = llmin(mNeighborMapWidth - 1, (S32)(x_pos + 5)) - x_start + 1; - S32 y_start = llmax(0, (S32)y_pos - 5); - S32 y_end = llmin(mNeighborMapHeight - 1, (S32)(y_pos + 5)); - for (S32 y_index = y_start; y_index <= y_end; y_index++) + S32 offset = block_x | (block_y * MAP_BLOCK_RES); + if (!mMapBlockLoaded[offset]) { - memset(&mTelehubCoverageMap[x_start + y_index * mNeighborMapWidth], 0xff, sizeof(U8) * x_span); + //LL_INFOS("World Map") << "Loading Block (" << block_x << "," << block_y << ")" << LL_ENDL; + LLWorldMapMessage::getInstance()->sendMapBlockRequest(block_x * MAP_BLOCK_SIZE, block_y * MAP_BLOCK_SIZE, (block_x * MAP_BLOCK_SIZE) + MAP_BLOCK_SIZE - 1, (block_y * MAP_BLOCK_SIZE) + MAP_BLOCK_SIZE - 1); + mMapBlockLoaded[offset] = true; } } } +} - for (it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it) +void LLWorldMap::dump() +{ + LL_INFOS("World Map") << "LLWorldMap::dump()" << LL_ENDL; + for (sim_info_map_t::iterator it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it) { - U64 handle = (*it).first; - //LLSimInfo* info = (*it).second; - - U32 x_pos, y_pos; - from_region_handle(handle, &x_pos, &y_pos); - x_pos /= REGION_WIDTH_UNITS; - y_pos /= REGION_WIDTH_UNITS; - - S32 index = x_pos - min_x + (mNeighborMapWidth * (y_pos - min_y)); - mTelehubCoverageMap[index] *= mNeighborMap[index]; - }*/ + LLSimInfo* info = it->second; + if (info) + { + info->dump(); + } + } } + diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h index 366de8f071..7e37727b86 100644 --- a/indra/newview/llworldmap.h +++ b/indra/newview/llworldmap.h @@ -33,203 +33,243 @@ #ifndef LL_LLWORLDMAP_H #define LL_LLWORLDMAP_H -#include <map> -#include <string> -#include <vector> +#include "llworldmipmap.h" #include <boost/function.hpp> -#include "v3math.h" #include "v3dmath.h" -#include "llframetimer.h" -#include "llmapimagetype.h" #include "lluuid.h" #include "llpointer.h" #include "llsingleton.h" +#include "llviewerregion.h" #include "llviewertexture.h" -#include "lleventinfo.h" -#include "v3color.h" - -class LLMessageSystem; - +// Description of objects like hubs, events, land for sale, people and more (TBD). +// Note: we don't store a "type" in there so we need to store instances of this class in +// well known objects (i.e. list of objects which type is "well known"). class LLItemInfo { public: - LLItemInfo(F32 global_x, F32 global_y, const std::string& name, LLUUID id, S32 extra = 0, S32 extra2 = 0); - - std::string mName; - std::string mToolTip; - LLVector3d mPosGlobal; - LLUUID mID; - BOOL mSelected; - S32 mExtra; - S32 mExtra2; - U64 mRegionHandle; -}; + LLItemInfo(F32 global_x, F32 global_y, const std::string& name, LLUUID id); + + // Setters + void setTooltip(std::string& tooltip) { mToolTip = tooltip; } + void setElevation(F64 z) { mPosGlobal.mdV[VZ] = z; } + void setCount(S32 count) { mCount = count; } +// void setSelected(bool selected) { mSelected = selected; } +// void setColor(LLColor4 color) { mColor = color; } + + // Accessors + const LLVector3d& getGlobalPosition() const { return mPosGlobal; } + const std::string& getName() const { return mName; } + const std::string& getToolTip() const { return mToolTip; } + const LLUUID& getUUID() const { return mID; } + S32 getCount() const { return mCount; } + + U64 getRegionHandle() const { return to_region_handle(mPosGlobal); } // Build the handle on the fly -// Map layers, see indra_constants.h -// 0 - Prim -// 1 - Terrain Only -// 2 - Overlay: Land For Sale + bool isName(const std::string& name) const { return (mName == name); } // True if name same as item's name +// bool isSelected() const { return mSelected; } +private: + std::string mName; // Name of the individual item + std::string mToolTip; // Tooltip : typically, something to be displayed to the user when selecting this item + LLVector3d mPosGlobal; // Global world position + LLUUID mID; // UUID of the item + S32 mCount; // Number of elements in item (e.g. people count) + // Currently not used but might prove useful one day so we comment out +// bool mSelected; // Selected or not: updated by the viewer UI, not the simulator or asset DB +// LLColor4 mColor; // Color of the item +}; + +// Info per region +// Such records are stored in a global map hold by the LLWorldMap and indexed by region handles. +// To avoid creating too many of them, they are requested in "blocks" corresponding to areas covered by the screen. +// Unfortunately, when the screen covers the whole world (zoomed out), that can translate in requesting info for +// every sim on the grid... Not good... +// To avoid this, the code implements a cut-off threshold for overlay graphics and, therefore, all LLSimInfo. +// In other words, when zooming out too much, we simply stop requesting LLSimInfo and +// LLItemInfo and just display the map tiles. +// As they are stored in different structures (LLSimInfo and LLWorldMipmap), this strategy is now workable. class LLSimInfo { public: - LLSimInfo(); + LLSimInfo(U64 handle); - LLVector3d getGlobalPos(LLVector3 local_pos) const; + // Convert local region coordinates into world coordinates + LLVector3d getGlobalPos(const LLVector3& local_pos) const; + // Get the world coordinates of the SW corner of that region + LLVector3d getGlobalOrigin() const; LLVector3 getLocalPos(LLVector3d global_pos) const; -public: - U64 mHandle; - std::string mName; - - F64 mAgentsUpdateTime; - BOOL mShowAgentLocations; // are agents visible? + void clearImage(); // Clears the reference to the Land for sale image for that region + void dropImagePriority(); // Drops the boost level of the Land for sale image for that region + void updateAgentCount(F64 time); // Send an item request for agent count on that region if time's up - U8 mAccess; - U32 mRegionFlags; - F32 mWaterHeight; + // Setters + void setName(std::string& name) { mName = name; } + void setAccess (U32 accesscode) { mAccess = accesscode; } + void setRegionFlags (U32 region_flags) { mRegionFlags = region_flags; } + void setLandForSaleImage (LLUUID image_id); +// void setWaterHeight (F32 water_height) { mWaterHeight = water_height; } - F32 mAlpha; + // Accessors + std::string getName() const { return mName; } + const std::string getFlagsString() const { return LLViewerRegion::regionFlagsToString(mRegionFlags); } + const std::string getAccessString() const { return LLViewerRegion::accessToString((U8)mAccess); } - // Image ID for the current overlay mode. - LLUUID mMapImageID[MAP_SIM_IMAGE_TYPES]; + const S32 getAgentCount() const; // Compute the total agents count + LLPointer<LLViewerFetchedTexture> getLandForSaleImage(); // Get the overlay image, fetch it if necessary - // Hold a reference to the currently displayed image. - LLPointer<LLViewerFetchedTexture> mCurrentImage; - LLPointer<LLViewerFetchedTexture> mOverlayImage; -}; + bool isName(const std::string& name) const; + bool isDown() { return (mAccess == SIM_ACCESS_DOWN); } + bool isPG() { return (mAccess <= SIM_ACCESS_PG); } -#define MAP_BLOCK_RES 256 + // Debug only + void dump() const; // Print the region info to the standard output -struct LLWorldMapLayer -{ - BOOL LayerDefined; - LLPointer<LLViewerFetchedTexture> LayerImage; - LLUUID LayerImageID; - LLRect LayerExtents; + // Items lists handling + typedef std::vector<LLItemInfo> item_info_list_t; + void clearItems(); + + void insertTeleHub(const LLItemInfo& item) { mTelehubs.push_back(item); } + void insertInfoHub(const LLItemInfo& item) { mInfohubs.push_back(item); } + void insertPGEvent(const LLItemInfo& item) { mPGEvents.push_back(item); } + void insertMatureEvent(const LLItemInfo& item) { mMatureEvents.push_back(item); } + void insertAdultEvent(const LLItemInfo& item) { mAdultEvents.push_back(item); } + void insertLandForSale(const LLItemInfo& item) { mLandForSale.push_back(item); } + void insertLandForSaleAdult(const LLItemInfo& item) { mLandForSaleAdult.push_back(item); } + void insertAgentLocation(const LLItemInfo& item); + + const LLSimInfo::item_info_list_t& getTeleHub() const { return mTelehubs; } + const LLSimInfo::item_info_list_t& getInfoHub() const { return mInfohubs; } + const LLSimInfo::item_info_list_t& getPGEvent() const { return mPGEvents; } + const LLSimInfo::item_info_list_t& getMatureEvent() const { return mMatureEvents; } + const LLSimInfo::item_info_list_t& getAdultEvent() const { return mAdultEvents; } + const LLSimInfo::item_info_list_t& getLandForSale() const { return mLandForSale; } + const LLSimInfo::item_info_list_t& getLandForSaleAdult() const { return mLandForSaleAdult; } + const LLSimInfo::item_info_list_t& getAgentLocation() const { return mAgentLocations; } - LLWorldMapLayer() : LayerDefined(FALSE) { } +private: + U64 mHandle; // This is a hash of the X and Y world coordinates of the SW corner of the sim + std::string mName; // Region name + + F64 mAgentsUpdateTime; // Time stamp giving the last time the agents information was requested for that region + bool mFirstAgentRequest; // Init agent request flag + + U32 mAccess; // Down/up and maturity rating of the region + U32 mRegionFlags; // Tell us if the siminfo has been received (if non 0) and what kind of region it is (Sandbox, allow damage) + // Currently not used but might prove useful one day so we comment out +// F32 mWaterHeight; // Water height on the region (not actively used) + + // Handling the "land for sale / land for auction" overlay image + LLUUID mMapImageID; // Image ID of the overlay image + LLPointer<LLViewerFetchedTexture> mOverlayImage; // Reference to the overlay image + + // Items for this region + // Those are data received through item requests (as opposed to block requests for the rest of the data) + item_info_list_t mTelehubs; // List of tele hubs in the region + item_info_list_t mInfohubs; // List of info hubs in the region + item_info_list_t mPGEvents; // List of PG events in the region + item_info_list_t mMatureEvents; // List of Mature events in the region + item_info_list_t mAdultEvents; // List of Adult events in the region (AO) + item_info_list_t mLandForSale; // List of Land for sales in the region + item_info_list_t mLandForSaleAdult; // List of Adult Land for sales in the region (AO) + item_info_list_t mAgentLocations; // List of agents in the region }; +// We request region data on the world by "blocks" of (MAP_BLOCK_SIZE x MAP_BLOCK_SIZE) regions +// This is to reduce the number of requests to the asset DB and get things in big "blocks" +const S32 MAP_MAX_SIZE = 2048; +const S32 MAP_BLOCK_SIZE = 4; +const S32 MAP_BLOCK_RES = (MAP_MAX_SIZE / MAP_BLOCK_SIZE); class LLWorldMap : public LLSingleton<LLWorldMap> { public: - typedef boost::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)> - url_callback_t; - LLWorldMap(); ~LLWorldMap(); - // clears the list + // Clear all: list of region info, tiles, blocks and items void reset(); - // clear the visible items - void eraseItems(); + void clearImageRefs(); // Clears the image references + void dropImagePriorities(); // Drops the priority of the images being fetched + void reloadItems(bool force = false); // Reload the items (people, hub, etc...) - // Removes references to cached images - void clearImageRefs(); + // Region Map access + typedef std::map<U64, LLSimInfo*> sim_info_map_t; + const LLWorldMap::sim_info_map_t& getRegionMap() const { return mSimInfoMap; } + void updateRegions(S32 x0, S32 y0, S32 x1, S32 y1); // Requests region info for a rectangle of regions (in grid coordinates) - // Clears the flags indicating that we've received sim infos - // Causes a re-request of the sim info without erasing extisting info - void clearSimFlags(); + // Insert a region and items in the map global instance + // Note: x_world and y_world in world coordinates (meters) + static bool insertRegion(U32 x_world, U32 y_world, std::string& name, LLUUID& uuid, U32 accesscode, U32 region_flags); + static bool insertItem(U32 x_world, U32 y_world, std::string& name, LLUUID& uuid, U32 type, S32 extra, S32 extra2); - // Returns simulator information, or NULL if out of range + // Get info on sims (region) : note that those methods only search the range of loaded sims (the one that are being browsed) + // *not* the entire world. So a NULL return does not mean a down or unexisting region, just an out of range region. LLSimInfo* simInfoFromHandle(const U64 handle); - - // Returns simulator information, or NULL if out of range LLSimInfo* simInfoFromPosGlobal(const LLVector3d& pos_global); - - // Returns simulator information for named sim, or NULL if non-existent LLSimInfo* simInfoFromName(const std::string& sim_name); - // Gets simulator name for a global position, returns true if it was found + // Gets simulator name from a global position, returns true if found bool simNameFromPosGlobal(const LLVector3d& pos_global, std::string& outSimName ); - // Sets the current layer - void setCurrentLayer(S32 layer, bool request_layer = false); - - void sendMapLayerRequest(); - void sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent = false); - void sendNamedRegionRequest(std::string region_name); - void sendNamedRegionRequest(std::string region_name, - url_callback_t callback, - const std::string& callback_url, - bool teleport); - void sendHandleRegionRequest(U64 region_handle, - url_callback_t callback, - const std::string& callback_url, - bool teleport); - void sendItemRequest(U32 type, U64 handle = 0); - - static void processMapLayerReply(LLMessageSystem*, void**); - static void processMapBlockReply(LLMessageSystem*, void**); - static void processMapItemReply(LLMessageSystem*, void**); - - void dump(); - - // Extend the bounding box of the list of simulators. Returns true - // if the extents changed. - BOOL extendAABB(U32 x_min, U32 y_min, U32 x_max, U32 y_max); - - // build coverage maps for telehub region visualization - void updateTelehubCoverage(); - BOOL coveredByTelehub(LLSimInfo* infop); - - // Bounds of the world, in meters - U32 getWorldWidth() const; - U32 getWorldHeight() const; -public: - // Map from region-handle to simulator info - typedef std::map<U64, LLSimInfo*> sim_info_map_t; - sim_info_map_t mSimInfoMap; + // Debug only + void dump(); // Print the world info to the standard output - BOOL mIsTrackingUnknownLocation, mInvalidLocation, mIsTrackingDoubleClick, mIsTrackingCommit; - LLVector3d mUnknownLocation; + // Track handling + void cancelTracking() { mIsTrackingLocation = false; mIsTrackingFound = false; mIsInvalidLocation = false; mIsTrackingDoubleClick = false; mIsTrackingCommit = false; } - bool mRequestLandForSale; + void setTracking(const LLVector3d& loc) { mIsTrackingLocation = true; mTrackingLocation = loc; mIsTrackingFound = false; mIsInvalidLocation = false; mIsTrackingDoubleClick = false; mIsTrackingCommit = false;} + void setTrackingInvalid() { mIsTrackingFound = true; mIsInvalidLocation = true; } + void setTrackingValid() { mIsTrackingFound = true; mIsInvalidLocation = false; } + void setTrackingDoubleClick() { mIsTrackingDoubleClick = true; } + void setTrackingCommit() { mIsTrackingCommit = true; } - typedef std::vector<LLItemInfo> item_info_list_t; - item_info_list_t mTelehubs; - item_info_list_t mInfohubs; - item_info_list_t mPGEvents; - item_info_list_t mMatureEvents; - item_info_list_t mAdultEvents; - item_info_list_t mLandForSale; - item_info_list_t mLandForSaleAdult; - - std::map<U64,S32> mNumAgents; - - typedef std::map<U64, item_info_list_t> agent_list_map_t; - agent_list_map_t mAgentLocationsMap; - - std::vector<LLWorldMapLayer> mMapLayers[MAP_SIM_IMAGE_TYPES]; - BOOL mMapLoaded[MAP_SIM_IMAGE_TYPES]; - BOOL * mMapBlockLoaded[MAP_SIM_IMAGE_TYPES]; - S32 mCurrentMap; - - // AABB of the list of simulators - U32 mMinX; - U32 mMaxX; - U32 mMinY; - U32 mMaxY; - - U8* mNeighborMap; - U8* mTelehubCoverageMap; - S32 mNeighborMapWidth; - S32 mNeighborMapHeight; + bool isTracking() { return mIsTrackingLocation; } + bool isTrackingValidLocation() { return mIsTrackingFound && !mIsInvalidLocation; } + bool isTrackingInvalidLocation() { return mIsTrackingFound && mIsInvalidLocation; } + bool isTrackingDoubleClick() { return mIsTrackingDoubleClick; } + bool isTrackingCommit() { return mIsTrackingCommit; } + bool isTrackingInRectangle(F64 x0, F64 y0, F64 x1, F64 y1); + + LLVector3d getTrackedPositionGlobal() const { return mTrackingLocation; } + + // World Mipmap delegation: currently used when drawing the mipmap + void equalizeBoostLevels(); + LLPointer<LLViewerFetchedTexture> getObjectsTile(U32 grid_x, U32 grid_y, S32 level, bool load = true) { return mWorldMipmap.getObjectsTile(grid_x, grid_y, level, load); } private: - LLTimer mRequestTimer; - - // search for named region for url processing - std::string mSLURLRegionName; - U64 mSLURLRegionHandle; - std::string mSLURL; - url_callback_t mSLURLCallback; - bool mSLURLTeleport; + bool clearItems(bool force = false); // Clears the item lists + void clearSimFlags(); // Clears the block flags indicating that we've already requested region infos + + // Create a region record corresponding to the handle, insert it in the region map and returns a pointer + LLSimInfo* createSimInfoFromHandle(const U64 handle); + + // Map from region-handle to region info + sim_info_map_t mSimInfoMap; + + // Holds the tiled mipmap of the world. This is the structure that contains the images used for rendering. + LLWorldMipmap mWorldMipmap; + + // The World is divided in "blocks" of (MAP_BLOCK_SIZE x MAP_BLOCK_SIZE) regions that get requested at once. + // This boolean table avoids "blocks" to be requested multiple times. + // Issue: Not sure this scheme is foolproof though as I've seen + // cases where a block is never retrieved and, because of this boolean being set, never re-requested + bool * mMapBlockLoaded; // Telling us if the block of regions has been requested or not + + // Track location data : used while there's nothing tracked yet by LLTracker + bool mIsTrackingLocation; // True when we're tracking a point + bool mIsTrackingFound; // True when the tracking position has been found, valid or not + bool mIsInvalidLocation; // The region is down or the location does not correspond to an existing region + bool mIsTrackingDoubleClick; // User double clicked to set the location (i.e. teleport when found please...) + bool mIsTrackingCommit; // User used the search or landmark fields to set the location + LLVector3d mTrackingLocation; // World global position being tracked + + // General grid items request timing flags (used for events,hubs and land for sale) + LLTimer mRequestTimer; + bool mFirstRequest; }; #endif diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp new file mode 100644 index 0000000000..6a074d9697 --- /dev/null +++ b/indra/newview/llworldmapmessage.cpp @@ -0,0 +1,261 @@ +/** + * @file llworldmapmessage.cpp + * @brief Handling of the messages to the DB made by and for the world map. + * + * $LicenseInfo:firstyear=2003&license=viewergpl$ + * + * Copyright (c) 2003-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 "llworldmapmessage.h" + +#include "llworldmap.h" +#include "llagent.h" +#include "llfloaterworldmap.h" + +const U32 LAYER_FLAG = 2; + +//--------------------------------------------------------------------------- +// World Map Message Handling +//--------------------------------------------------------------------------- + +LLWorldMapMessage::LLWorldMapMessage() : + mSLURLRegionName(), + mSLURLRegionHandle(0), + mSLURL(), + mSLURLCallback(0), + mSLURLTeleport(false) +{ +} + +LLWorldMapMessage::~LLWorldMapMessage() +{ +} + +void LLWorldMapMessage::sendItemRequest(U32 type, U64 handle) +{ + //LL_INFOS("World Map") << "Send item request : type = " << type << LL_ENDL; + LLMessageSystem* msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_MapItemRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->addU32Fast(_PREHASH_Flags, LAYER_FLAG); + msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim + msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim + + msg->nextBlockFast(_PREHASH_RequestData); + msg->addU32Fast(_PREHASH_ItemType, type); + msg->addU64Fast(_PREHASH_RegionHandle, handle); // If zero, filled in on sim + + gAgent.sendReliableMessage(); +} + +void LLWorldMapMessage::sendNamedRegionRequest(std::string region_name) +{ + //LL_INFOS("World Map") << "LLWorldMap::sendNamedRegionRequest()" << LL_ENDL; + LLMessageSystem* msg = gMessageSystem; + + // Request for region data + msg->newMessageFast(_PREHASH_MapNameRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->addU32Fast(_PREHASH_Flags, LAYER_FLAG); + msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim + msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim + msg->nextBlockFast(_PREHASH_NameData); + msg->addStringFast(_PREHASH_Name, region_name); + gAgent.sendReliableMessage(); +} + +void LLWorldMapMessage::sendNamedRegionRequest(std::string region_name, + url_callback_t callback, + const std::string& callback_url, + bool teleport) // immediately teleport when result returned +{ + //LL_INFOS("World Map") << "LLWorldMap::sendNamedRegionRequest()" << LL_ENDL; + mSLURLRegionName = region_name; + mSLURLRegionHandle = 0; + mSLURL = callback_url; + mSLURLCallback = callback; + mSLURLTeleport = teleport; + + sendNamedRegionRequest(region_name); +} + +void LLWorldMapMessage::sendHandleRegionRequest(U64 region_handle, + url_callback_t callback, + const std::string& callback_url, + bool teleport) // immediately teleport when result returned +{ + //LL_INFOS("World Map") << "LLWorldMap::sendHandleRegionRequest()" << LL_ENDL; + mSLURLRegionName.clear(); + mSLURLRegionHandle = region_handle; + mSLURL = callback_url; + mSLURLCallback = callback; + mSLURLTeleport = teleport; + + U32 global_x; + U32 global_y; + from_region_handle(region_handle, &global_x, &global_y); + U16 grid_x = (U16)(global_x / REGION_WIDTH_UNITS); + U16 grid_y = (U16)(global_y / REGION_WIDTH_UNITS); + + sendMapBlockRequest(grid_x, grid_y, grid_x, grid_y, true); +} + +void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent) +{ + //LL_INFOS("World Map") << "LLWorldMap::sendMapBlockRequest()" << ", min = (" << min_x << ", " << min_y << "), max = (" << max_x << ", " << max_y << "), nonexistent = " << return_nonexistent << LL_ENDL; + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_MapBlockRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + U32 flags = LAYER_FLAG; + flags |= (return_nonexistent ? 0x10000 : 0); + msg->addU32Fast(_PREHASH_Flags, flags); + msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim + msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim + msg->nextBlockFast(_PREHASH_PositionData); + msg->addU16Fast(_PREHASH_MinX, min_x); + msg->addU16Fast(_PREHASH_MinY, min_y); + msg->addU16Fast(_PREHASH_MaxX, max_x); + msg->addU16Fast(_PREHASH_MaxY, max_y); + gAgent.sendReliableMessage(); +} + +// public static +void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**) +{ + U32 agent_flags; + msg->getU32Fast(_PREHASH_AgentData, _PREHASH_Flags, agent_flags); + + // There's only one flag that we ever use here + if (agent_flags != LAYER_FLAG) + { + llwarns << "Invalid map image type returned! layer = " << agent_flags << llendl; + return; + } + + S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_Data); + //LL_INFOS("World Map") << "LLWorldMap::processMapBlockReply(), num_blocks = " << num_blocks << LL_ENDL; + + bool found_null_sim = false; + + for (S32 block=0; block<num_blocks; ++block) + { + U16 x_regions; + U16 y_regions; + std::string name; + U8 accesscode; + U32 region_flags; +// U8 water_height; +// U8 agents; + LLUUID image_id; + msg->getU16Fast(_PREHASH_Data, _PREHASH_X, x_regions, block); + msg->getU16Fast(_PREHASH_Data, _PREHASH_Y, y_regions, block); + msg->getStringFast(_PREHASH_Data, _PREHASH_Name, name, block); + msg->getU8Fast(_PREHASH_Data, _PREHASH_Access, accesscode, block); + msg->getU32Fast(_PREHASH_Data, _PREHASH_RegionFlags, region_flags, block); +// msg->getU8Fast(_PREHASH_Data, _PREHASH_WaterHeight, water_height, block); +// msg->getU8Fast(_PREHASH_Data, _PREHASH_Agents, agents, block); + msg->getUUIDFast(_PREHASH_Data, _PREHASH_MapImageID, image_id, block); + + U32 x_world = (U32)(x_regions) * REGION_WIDTH_UNITS; + U32 y_world = (U32)(y_regions) * REGION_WIDTH_UNITS; + + // Insert that region in the world map, if failure, flag it as a "null_sim" + if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags))) + { + found_null_sim = true; + } + + // If we hit a valid tracking location, do what needs to be done app level wise + if (LLWorldMap::getInstance()->isTrackingValidLocation()) + { + LLVector3d pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal(); + if (LLWorldMap::getInstance()->isTrackingDoubleClick()) + { + // Teleport if the user double clicked + gAgent.teleportViaLocation(pos_global); + } + // Update the "real" tracker information + gFloaterWorldMap->trackLocation(pos_global); + } + + // Handle the SLURL callback if any + if(LLWorldMapMessage::getInstance()->mSLURLCallback != NULL) + { + U64 handle = to_region_handle(x_world, y_world); + // Check if we reached the requested region + if ((LLStringUtil::compareInsensitive(LLWorldMapMessage::getInstance()->mSLURLRegionName, name)==0) + || (LLWorldMapMessage::getInstance()->mSLURLRegionHandle == handle)) + { + url_callback_t callback = LLWorldMapMessage::getInstance()->mSLURLCallback; + + LLWorldMapMessage::getInstance()->mSLURLCallback = NULL; + LLWorldMapMessage::getInstance()->mSLURLRegionName.clear(); + LLWorldMapMessage::getInstance()->mSLURLRegionHandle = 0; + + callback(handle, LLWorldMapMessage::getInstance()->mSLURL, image_id, LLWorldMapMessage::getInstance()->mSLURLTeleport); + } + } + } + // Tell the UI to update itself + gFloaterWorldMap->updateSims(found_null_sim); +} + +// public static +void LLWorldMapMessage::processMapItemReply(LLMessageSystem* msg, void**) +{ + //LL_INFOS("World Map") << "LLWorldMap::processMapItemReply()" << LL_ENDL; + U32 type; + msg->getU32Fast(_PREHASH_RequestData, _PREHASH_ItemType, type); + + S32 num_blocks = msg->getNumberOfBlocks("Data"); + + for (S32 block=0; block<num_blocks; ++block) + { + U32 X, Y; + std::string name; + S32 extra, extra2; + LLUUID uuid; + msg->getU32Fast(_PREHASH_Data, _PREHASH_X, X, block); + msg->getU32Fast(_PREHASH_Data, _PREHASH_Y, Y, block); + msg->getStringFast(_PREHASH_Data, _PREHASH_Name, name, block); + msg->getUUIDFast(_PREHASH_Data, _PREHASH_ID, uuid, block); + msg->getS32Fast(_PREHASH_Data, _PREHASH_Extra, extra, block); + msg->getS32Fast(_PREHASH_Data, _PREHASH_Extra2, extra2, block); + + LLWorldMap::getInstance()->insertItem(X, Y, name, uuid, type, extra, extra2); + } +} + diff --git a/indra/newview/llworldmapmessage.h b/indra/newview/llworldmapmessage.h new file mode 100644 index 0000000000..2c8fedcb10 --- /dev/null +++ b/indra/newview/llworldmapmessage.h @@ -0,0 +1,83 @@ +/** + * @file llworldmapmessage.h + * @brief Handling of the messages to the DB made by and for the world map. + * + * $LicenseInfo:firstyear=2003&license=viewergpl$ + * + * Copyright (c) 2003-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_LLWORLDMAPMESSAGE_H +#define LL_LLWORLDMAPMESSAGE_H + +// Handling of messages (send and process) as well as SLURL callback if necessary +class LLMessageSystem; + +class LLWorldMapMessage : public LLSingleton<LLWorldMapMessage> +{ +public: + typedef boost::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)> + url_callback_t; + + LLWorldMapMessage(); + ~LLWorldMapMessage(); + + // Process incoming answers to map stuff requests + static void processMapBlockReply(LLMessageSystem*, void**); + static void processMapItemReply(LLMessageSystem*, void**); + + // Request data for all regions in a rectangular area. Coordinates in grids (i.e. meters / 256). + void sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent = false); + + // Various methods to request LLSimInfo data to the simulator and asset DB + void sendNamedRegionRequest(std::string region_name); + void sendNamedRegionRequest(std::string region_name, + url_callback_t callback, + const std::string& callback_url, + bool teleport); + void sendHandleRegionRequest(U64 region_handle, + url_callback_t callback, + const std::string& callback_url, + bool teleport); + + // Request item data for regions + // Note: the handle works *only* when requesting agent count (type = MAP_ITEM_AGENT_LOCATIONS). In that case, + // the request will actually be transitting through the spaceserver (all that is done on the sim). + // All other values of type do create a global grid request to the asset DB. So no need to try to get, say, + // the events for one particular region. For such a request, the handle is ignored. + void sendItemRequest(U32 type, U64 handle = 0); + +private: + // Search for region (by name or handle) for SLURL processing and teleport + // None of this relies explicitly on the LLWorldMap instance so better handle it here + std::string mSLURLRegionName; + U64 mSLURLRegionHandle; + std::string mSLURL; + url_callback_t mSLURLCallback; + bool mSLURLTeleport; +}; + +#endif // LL_LLWORLDMAPMESSAGE_H diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 823db027ee..60b1e59645 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -46,7 +46,6 @@ #include "llagent.h" #include "llcallingcard.h" #include "llviewercontrol.h" -#include "llcylinder.h" #include "llfloatermap.h" #include "llfloaterworldmap.h" #include "llfocusmgr.h" @@ -57,25 +56,29 @@ #include "llviewercamera.h" #include "llviewertexture.h" #include "llviewertexturelist.h" -#include "llviewermenu.h" -#include "llviewerparceloverlay.h" #include "llviewerregion.h" #include "llviewerwindow.h" -#include "llworldmap.h" -#include "lltexturefetch.h" -#include "llappviewer.h" // Only for constants! #include "lltrans.h" #include "llglheaders.h" +// Basically a C++ implementation of the OCEAN_COLOR defined in mapstitcher.py +// Please ensure consistency between those 2 files (TODO: would be better to get that color from an asset source...) +// # Constants +// OCEAN_COLOR = "#1D475F" +const F32 OCEAN_RED = (F32)(0x1D)/255.f; +const F32 OCEAN_GREEN = (F32)(0x47)/255.f; +const F32 OCEAN_BLUE = (F32)(0x5F)/255.f; + const F32 GODLY_TELEPORT_HEIGHT = 200.f; const S32 SCROLL_HINT_WIDTH = 65; const F32 BIG_DOT_RADIUS = 5.f; BOOL LLWorldMapView::sHandledLastClick = FALSE; -LLUIImagePtr LLWorldMapView::sAvatarYouSmallImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarSmallImage = NULL; -LLUIImagePtr LLWorldMapView::sAvatarLargeImage = NULL; +LLUIImagePtr LLWorldMapView::sAvatarYouImage = NULL; +LLUIImagePtr LLWorldMapView::sAvatarYouLargeImage = NULL; +LLUIImagePtr LLWorldMapView::sAvatarLevelImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarAboveImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarBelowImage = NULL; @@ -93,35 +96,34 @@ LLUIImagePtr LLWorldMapView::sClassifiedsImage = NULL; LLUIImagePtr LLWorldMapView::sForSaleImage = NULL; LLUIImagePtr LLWorldMapView::sForSaleAdultImage = NULL; -F32 LLWorldMapView::sThresholdA = 48.f; -F32 LLWorldMapView::sThresholdB = 96.f; F32 LLWorldMapView::sPanX = 0.f; F32 LLWorldMapView::sPanY = 0.f; F32 LLWorldMapView::sTargetPanX = 0.f; F32 LLWorldMapView::sTargetPanY = 0.f; S32 LLWorldMapView::sTrackingArrowX = 0; S32 LLWorldMapView::sTrackingArrowY = 0; -F32 LLWorldMapView::sPixelsPerMeter = 1.f; -F32 CONE_SIZE = 0.6f; +bool LLWorldMapView::sVisibleTilesLoaded = false; +F32 LLWorldMapView::sMapScale = 128.f; std::map<std::string,std::string> LLWorldMapView::sStringsMap; -#define SIM_NULL_MAP_SCALE 1 // width in pixels, where we start drawing "null" sims -#define SIM_MAP_AGENT_SCALE 2 // width in pixels, where we start drawing agents -#define SIM_MAP_SCALE 1 // width in pixels, where we start drawing sim tiles - -// Updates for agent locations. -#define AGENTS_UPDATE_TIME 60.0 // in seconds +// Fetch and draw info thresholds +const F32 DRAW_TEXT_THRESHOLD = 96.f; // Don't draw text under that resolution value (res = width region in meters) +const S32 DRAW_SIMINFO_THRESHOLD = 3; // Max level for which we load or display sim level information (level in LLWorldMipmap sense) +const S32 DRAW_LANDFORSALE_THRESHOLD = 2; // Max level for which we load or display land for sale picture data (level in LLWorldMipmap sense) +// When on, draw an outline for each mipmap tile gotten from S3 +#define DEBUG_DRAW_TILE 0 void LLWorldMapView::initClass() { - sAvatarYouSmallImage = LLUI::getUIImage("map_avatar_you_8.tga"); - sAvatarSmallImage = LLUI::getUIImage("map_avatar_8.tga"); - sAvatarLargeImage = LLUI::getUIImage("map_avatar_16.tga"); - sAvatarAboveImage = LLUI::getUIImage("map_avatar_above_8.tga"); - sAvatarBelowImage = LLUI::getUIImage("map_avatar_below_8.tga"); + sAvatarSmallImage = LLUI::getUIImage("map_avatar_8.tga"); + sAvatarYouImage = LLUI::getUIImage("map_avatar_16.tga"); + sAvatarYouLargeImage = LLUI::getUIImage("map_avatar_you_32.tga"); + sAvatarLevelImage = LLUI::getUIImage("map_avatar_32.tga"); + sAvatarAboveImage = LLUI::getUIImage("map_avatar_above_32.tga"); + sAvatarBelowImage = LLUI::getUIImage("map_avatar_below_32.tga"); sHomeImage = LLUI::getUIImage("map_home.tga"); sTelehubImage = LLUI::getUIImage("map_telehub.tga"); @@ -145,9 +147,10 @@ void LLWorldMapView::initClass() // static void LLWorldMapView::cleanupClass() { - sAvatarYouSmallImage = NULL; sAvatarSmallImage = NULL; - sAvatarLargeImage = NULL; + sAvatarYouImage = NULL; + sAvatarYouLargeImage = NULL; + sAvatarLevelImage = NULL; sAvatarAboveImage = NULL; sAvatarBelowImage = NULL; @@ -167,7 +170,7 @@ void LLWorldMapView::cleanupClass() LLWorldMapView::LLWorldMapView() : LLPanel(), - mBackgroundColor( LLColor4( 4.f/255.f, 4.f/255.f, 75.f/255.f, 1.f ) ), + mBackgroundColor( LLColor4( OCEAN_RED, OCEAN_GREEN, OCEAN_BLUE, 1.f ) ), mItemPicked(FALSE), mPanning( FALSE ), mMouseDownPanX( 0 ), @@ -176,7 +179,8 @@ LLWorldMapView::LLWorldMapView() mMouseDownY( 0 ), mSelectIDStart(0) { - sPixelsPerMeter = gMapScale / REGION_WIDTH_METERS; + //LL_INFOS("World Map") << "Creating the Map -> LLWorldMapView::LLWorldMapView()" << LL_ENDL; + clearLastClick(); } @@ -215,6 +219,7 @@ BOOL LLWorldMapView::postBuild() LLWorldMapView::~LLWorldMapView() { + //LL_INFOS("World Map") << "Destroying the map -> LLWorldMapView::~LLWorldMapView()" << LL_ENDL; cleanupTextures(); } @@ -228,14 +233,14 @@ void LLWorldMapView::cleanupTextures() // static void LLWorldMapView::setScale( F32 scale ) { - if (scale != gMapScale) + if (scale != sMapScale) { - F32 old_scale = gMapScale; + F32 old_scale = sMapScale; - gMapScale = scale; - if (gMapScale == 0.f) + sMapScale = scale; + if (sMapScale <= 0.f) { - gMapScale = 0.1f; + sMapScale = 0.1f; } F32 ratio = (scale / old_scale); @@ -243,8 +248,7 @@ void LLWorldMapView::setScale( F32 scale ) sPanY *= ratio; sTargetPanX = sPanX; sTargetPanY = sPanY; - - sPixelsPerMeter = gMapScale / REGION_WIDTH_METERS; + sVisibleTilesLoaded = false; } } @@ -256,6 +260,7 @@ void LLWorldMapView::translatePan( S32 delta_x, S32 delta_y ) sPanY += delta_y; sTargetPanX = sPanX; sTargetPanY = sPanY; + sVisibleTilesLoaded = false; } @@ -269,18 +274,22 @@ void LLWorldMapView::setPan( S32 x, S32 y, BOOL snap ) sPanX = sTargetPanX; sPanY = sTargetPanY; } + sVisibleTilesLoaded = false; } +bool LLWorldMapView::showRegionInfo() +{ + return (LLWorldMipmap::scaleToLevel(sMapScale) <= DRAW_SIMINFO_THRESHOLD ? true : false); +} /////////////////////////////////////////////////////////////////////////////////// // HELPERS BOOL is_agent_in_region(LLViewerRegion* region, LLSimInfo* info) { - return ((region && info) && (info->mName == region->getName())); + return (region && info && info->isName(region->getName())); } - /////////////////////////////////////////////////////////////////////////////////// void LLWorldMapView::draw() @@ -292,7 +301,7 @@ void LLWorldMapView::draw() F64 current_time = LLTimer::getElapsedSeconds(); mVisibleRegions.clear(); - + // animate pan if necessary sPanX = lerp(sPanX, sTargetPanX, LLCriticalDamp::getInterpolant(0.1f)); sPanY = lerp(sPanY, sTargetPanY, LLCriticalDamp::getInterpolant(0.1f)); @@ -303,10 +312,12 @@ void LLWorldMapView::draw() const F32 half_height = F32(height) / 2.0f; LLVector3d camera_global = gAgent.getCameraPositionGlobal(); + S32 level = LLWorldMipmap::scaleToLevel(sMapScale); + LLLocalClipRect clip(getLocalRect()); { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - + glMatrixMode(GL_MODELVIEW); // Clear the background alpha to 0 @@ -319,307 +330,59 @@ void LLWorldMapView::draw() } gGL.flush(); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); gGL.setColorMask(true, true); - gGL.setSceneBlendType(LLRender::BT_ALPHA); - - F32 layer_alpha = 1.f; - - // Draw one image per layer - for (U32 layer_idx=0; layer_idx<LLWorldMap::getInstance()->mMapLayers[LLWorldMap::getInstance()->mCurrentMap].size(); ++layer_idx) - { - if (!LLWorldMap::getInstance()->mMapLayers[LLWorldMap::getInstance()->mCurrentMap][layer_idx].LayerDefined) - { - continue; - } - LLWorldMapLayer *layer = &LLWorldMap::getInstance()->mMapLayers[LLWorldMap::getInstance()->mCurrentMap][layer_idx]; - LLViewerFetchedTexture *current_image = layer->LayerImage; - - if (current_image->isMissingAsset()) - { - continue; // better to draw nothing than the missing asset image - } - - LLVector3d origin_global((F64)layer->LayerExtents.mLeft * REGION_WIDTH_METERS, (F64)layer->LayerExtents.mBottom * REGION_WIDTH_METERS, 0.f); - - // Find x and y position relative to camera's center. - LLVector3d rel_region_pos = origin_global - camera_global; - F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * gMapScale; - F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * gMapScale; - - F32 pix_width = gMapScale*(layer->LayerExtents.getWidth() + 1); - F32 pix_height = gMapScale*(layer->LayerExtents.getHeight() + 1); - - // When the view isn't panned, 0,0 = center of rectangle - F32 bottom = sPanY + half_height + relative_y; - F32 left = sPanX + half_width + relative_x; - F32 top = bottom + pix_height; - F32 right = left + pix_width; - F32 pixel_area = pix_width*pix_height; - // discard layers that are outside the rectangle - // and discard small layers - if (top < 0.f || - bottom > height || - right < 0.f || - left > width || - (pixel_area < 4*4)) - { - current_image->setBoostLevel(0); - continue; - } - - current_image->setBoostLevel(LLViewerTexture::BOOST_MAP); - current_image->setKnownDrawSize(llround(pix_width * LLUI::sGLScaleFactor.mV[VX]), llround(pix_height * LLUI::sGLScaleFactor.mV[VY])); - - if (!current_image->hasGLTexture()) - { - continue; // better to draw nothing than the default image - } - -// LLTextureView::addDebugImage(current_image); - - // Draw using the texture. If we don't clamp we get artifact at - // the edge. - gGL.getTexUnit(0)->bind(current_image); - - // Draw map image into RGB - //gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - gGL.flush(); - gGL.setColorMask(true, false); - gGL.color4f(1.f, 1.f, 1.f, layer_alpha); - - gGL.begin(LLRender::QUADS); - gGL.texCoord2f(0.0f, 1.0f); - gGL.vertex3f(left, top, -1.0f); - gGL.texCoord2f(0.0f, 0.0f); - gGL.vertex3f(left, bottom, -1.0f); - gGL.texCoord2f(1.0f, 0.0f); - gGL.vertex3f(right, bottom, -1.0f); - gGL.texCoord2f(1.0f, 1.0f); - gGL.vertex3f(right, top, -1.0f); - gGL.end(); - - // draw an alpha of 1 where the sims are visible - gGL.flush(); - gGL.setColorMask(false, true); - gGL.color4f(1.f, 1.f, 1.f, 1.f); - - gGL.begin(LLRender::QUADS); - gGL.texCoord2f(0.0f, 1.0f); - gGL.vertex2f(left, top); - gGL.texCoord2f(0.0f, 0.0f); - gGL.vertex2f(left, bottom); - gGL.texCoord2f(1.0f, 0.0f); - gGL.vertex2f(right, bottom); - gGL.texCoord2f(1.0f, 1.0f); - gGL.vertex2f(right, top); - gGL.end(); - } +#if 1 + // Draw the image tiles + drawMipmap(width, height); gGL.flush(); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); gGL.setColorMask(true, true); - // there used to be an #if 1 here, but it was uncommented; perhaps marking a block of code? - F32 sim_alpha = 1.f; - - // Draw one image per region, centered on the camera position. - const S32 MAX_SIMULTANEOUS_TEX = 100; - const S32 MAX_REQUEST_PER_TICK = 5; - const S32 MIN_REQUEST_PER_TICK = 1; - S32 textures_requested_this_tick = 0; - - for (LLWorldMap::sim_info_map_t::iterator it = LLWorldMap::getInstance()->mSimInfoMap.begin(); - it != LLWorldMap::getInstance()->mSimInfoMap.end(); ++it) + // Draw per sim overlayed information (names, mature, offline...) + for (LLWorldMap::sim_info_map_t::const_iterator it = LLWorldMap::getInstance()->getRegionMap().begin(); + it != LLWorldMap::getInstance()->getRegionMap().end(); ++it) { - U64 handle = (*it).first; - LLSimInfo* info = (*it).second; + U64 handle = it->first; + LLSimInfo* info = it->second; - LLViewerFetchedTexture* simimage = info->mCurrentImage; - LLViewerFetchedTexture* overlayimage = info->mOverlayImage; - - if (gMapScale < SIM_MAP_SCALE) - { - if (simimage != NULL) simimage->setBoostLevel(0); - if (overlayimage != NULL) overlayimage->setBoostLevel(0); - continue; - } - LLVector3d origin_global = from_region_handle(handle); - LLVector3d camera_global = gAgent.getCameraPositionGlobal(); // Find x and y position relative to camera's center. LLVector3d rel_region_pos = origin_global - camera_global; - F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * gMapScale; - F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * gMapScale; + F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * sMapScale; + F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * sMapScale; + // Coordinates of the sim in pixels in the UI panel // When the view isn't panned, 0,0 = center of rectangle - F32 bottom = sPanY + half_height + relative_y; - F32 left = sPanX + half_width + relative_x; - F32 top = bottom + gMapScale ; - F32 right = left + gMapScale ; - - // Switch to world map texture (if available for this region) if either: - // 1. Tiles are zoomed out small enough, or - // 2. Sim's texture has not been loaded yet - F32 map_scale_cutoff = SIM_MAP_SCALE; - if ((info->mRegionFlags & REGION_FLAGS_NULL_LAYER) > 0) - { - map_scale_cutoff = SIM_NULL_MAP_SCALE; - } - - info->mShowAgentLocations = (gMapScale >= SIM_MAP_AGENT_SCALE); - - bool sim_visible = - (gMapScale >= map_scale_cutoff) && - (simimage != NULL) && - (simimage->hasGLTexture()); - - if (sim_visible) - { - // Fade in - if (info->mAlpha < 0.0f) - info->mAlpha = 1.f; // don't fade initially - else - info->mAlpha = lerp(info->mAlpha, 1.f, LLCriticalDamp::getInterpolant(0.15f)); - } - else - { - // Fade out - if (info->mAlpha < 0.0f) - info->mAlpha = 0.f; // don't fade initially - else - info->mAlpha = lerp(info->mAlpha, 0.f, LLCriticalDamp::getInterpolant(0.15f)); - } - - // discard regions that are outside the rectangle - // and discard small regions - if (top < 0.f || - bottom > height || - right < 0.f || - left > width ) + F32 bottom = sPanY + half_height + relative_y; + F32 left = sPanX + half_width + relative_x; + F32 top = bottom + sMapScale ; + F32 right = left + sMapScale ; + + // Discard if region is outside the screen rectangle (not visible on screen) + if ((top < 0.f) || (bottom > height) || + (right < 0.f) || (left > width) ) { - if (simimage != NULL) simimage->setBoostLevel(0); - if (overlayimage != NULL) overlayimage->setBoostLevel(0); + // Drop the "land for sale" fetching priority since it's outside the view rectangle + info->dropImagePriority(); continue; } - if (info->mCurrentImage.isNull()) - { - if ((textures_requested_this_tick < MIN_REQUEST_PER_TICK) || - ((LLAppViewer::getTextureFetch()->getNumRequests() < MAX_SIMULTANEOUS_TEX) && - (textures_requested_this_tick < MAX_REQUEST_PER_TICK))) - { - textures_requested_this_tick++; - info->mCurrentImage = LLViewerTextureManager::getFetchedTexture(info->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); - info->mCurrentImage->setAddressMode(LLTexUnit::TAM_CLAMP); - simimage = info->mCurrentImage; - gGL.getTexUnit(0)->bind(simimage); - } - } - if (info->mOverlayImage.isNull() && info->mMapImageID[2].notNull()) - { - if ((textures_requested_this_tick < MIN_REQUEST_PER_TICK) || - ((LLAppViewer::getTextureFetch()->getNumRequests() < MAX_SIMULTANEOUS_TEX) && - (textures_requested_this_tick < MAX_REQUEST_PER_TICK))) - { - textures_requested_this_tick++; - info->mOverlayImage = LLViewerTextureManager::getFetchedTexture(info->mMapImageID[2], MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); - info->mOverlayImage->setAddressMode(LLTexUnit::TAM_CLAMP); - overlayimage = info->mOverlayImage; - gGL.getTexUnit(0)->bind(overlayimage); - } - } + // This list is used by other methods to know which regions are indeed displayed on screen mVisibleRegions.push_back(handle); - // See if the agents need updating - if (current_time - info->mAgentsUpdateTime > AGENTS_UPDATE_TIME) - { - LLWorldMap::getInstance()->sendItemRequest(MAP_ITEM_AGENT_LOCATIONS, info->mHandle); - info->mAgentsUpdateTime = current_time; - } - - // Bias the priority escalation for images nearer - LLVector3d center_global = origin_global; - center_global.mdV[VX] += 128.0; - center_global.mdV[VY] += 128.0; - - S32 draw_size = llround(gMapScale); - if (simimage != NULL) - { - simimage->setBoostLevel(LLViewerTexture::BOOST_MAP); - simimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY])); - } - - if (overlayimage != NULL) - { - overlayimage->setBoostLevel(LLViewerTexture::BOOST_MAP); - overlayimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY])); - } - -// LLTextureView::addDebugImage(simimage); - if (sim_visible && info->mAlpha > 0.001f) + // Update the agent count for that region if we're not too zoomed out already + if (level <= DRAW_SIMINFO_THRESHOLD) { - // Draw using the texture. If we don't clamp we get artifact at - // the edge. - LLGLSUIDefault gls_ui; - if (simimage != NULL) - gGL.getTexUnit(0)->bind(simimage); - - gGL.setSceneBlendType(LLRender::BT_ALPHA); - F32 alpha = sim_alpha * info->mAlpha; - gGL.color4f(1.f, 1.0f, 1.0f, alpha); - - gGL.begin(LLRender::QUADS); - gGL.texCoord2f(0.f, 1.f); - gGL.vertex3f(left, top, 0.f); - gGL.texCoord2f(0.f, 0.f); - gGL.vertex3f(left, bottom, 0.f); - gGL.texCoord2f(1.f, 0.f); - gGL.vertex3f(right, bottom, 0.f); - gGL.texCoord2f(1.f, 1.f); - gGL.vertex3f(right, top, 0.f); - gGL.end(); - - if (gSavedSettings.getBOOL("MapShowLandForSale") && overlayimage && overlayimage->hasGLTexture()) - { - gGL.getTexUnit(0)->bind(overlayimage); - gGL.color4f(1.f, 1.f, 1.f, alpha); - gGL.begin(LLRender::QUADS); - gGL.texCoord2f(0.f, 1.f); - gGL.vertex3f(left, top, -0.5f); - gGL.texCoord2f(0.f, 0.f); - gGL.vertex3f(left, bottom, -0.5f); - gGL.texCoord2f(1.f, 0.f); - gGL.vertex3f(right, bottom, -0.5f); - gGL.texCoord2f(1.f, 1.f); - gGL.vertex3f(right, top, -0.5f); - gGL.end(); - } - - if ((info->mRegionFlags & REGION_FLAGS_NULL_LAYER) == 0) - { - // draw an alpha of 1 where the sims are visible (except NULL sims) - gGL.flush(); - gGL.setSceneBlendType(LLRender::BT_REPLACE); - gGL.setColorMask(false, true); - gGL.color4f(1.f, 1.f, 1.f, 1.f); - - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gGL.begin(LLRender::QUADS); - gGL.vertex2f(left, top); - gGL.vertex2f(left, bottom); - gGL.vertex2f(right, bottom); - gGL.vertex2f(right, top); - gGL.end(); - - gGL.flush(); - gGL.setColorMask(true, true); - } + info->updateAgentCount(current_time); } - if (info->mAccess == SIM_ACCESS_DOWN) + if (info->isDown()) { // Draw a transparent red square over down sims gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_SOURCE_ALPHA); @@ -633,18 +396,15 @@ void LLWorldMapView::draw() gGL.vertex2f(right, top); gGL.end(); } - - // As part of the AO project, we no longer want to draw access indicators; - // it's too complicated to get all the rules straight and will only + // As part of the AO project, we no longer want to draw access indicators; + // it's too complicated to get all the rules straight and will only // cause confusion. /********************** - // If this is mature, and you are not, draw a line across it - if (info->mAccess != SIM_ACCESS_DOWN - && info->mAccess > SIM_ACCESS_PG - && gAgent.isTeen()) + else if (!info->isPG() && gAgent.isTeen()) { + // If this is a mature region, and you are not, draw a line across it gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO); - + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.color3f(1.f, 0.f, 0.f); gGL.begin(LLRender::LINES); @@ -655,68 +415,67 @@ void LLWorldMapView::draw() gGL.end(); } **********************/ - - // Draw the region name in the lower left corner - LLFontGL* font = LLFontGL::getFontSansSerifSmall(); - - std::string mesg; - if (gMapScale < sThresholdA) + else if (gSavedSettings.getBOOL("MapShowLandForSale") && (level <= DRAW_LANDFORSALE_THRESHOLD)) { + // Draw the overlay image "Land for Sale / Land for Auction" + LLViewerFetchedTexture* overlayimage = info->getLandForSaleImage(); + if (overlayimage) + { + // Inform the fetch mechanism of the size we need + S32 draw_size = llround(sMapScale); + overlayimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY])); + // Draw something whenever we have enough info + if (overlayimage->hasGLTexture()) + { + gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO); + gGL.getTexUnit(0)->bind(overlayimage); + gGL.color4f(1.f, 1.f, 1.f, 1.f); + gGL.begin(LLRender::QUADS); + gGL.texCoord2f(0.f, 1.f); + gGL.vertex3f(left, top, -0.5f); + gGL.texCoord2f(0.f, 0.f); + gGL.vertex3f(left, bottom, -0.5f); + gGL.texCoord2f(1.f, 0.f); + gGL.vertex3f(right, bottom, -0.5f); + gGL.texCoord2f(1.f, 1.f); + gGL.vertex3f(right, top, -0.5f); + gGL.end(); + } + } } - else if (gMapScale < sThresholdB) + else { - // mesg = llformat( info->mAgents); + // If we're not displaying the "land for sale", drop its fetching priority + info->dropImagePriority(); } - else + + // Draw the region name in the lower left corner + if (sMapScale >= DRAW_TEXT_THRESHOLD) { - //mesg = llformat("%d / %s (%s)", - // info->mAgents, - // info->mName.c_str(), - // LLViewerRegion::accessToShortString(info->mAccess).c_str() ); - if (info->mAccess == SIM_ACCESS_DOWN) + LLFontGL* font = LLFontGL::getFontSansSerifSmall(); + std::string mesg; + if (info->isDown()) { - mesg = llformat( "%s (%s)", info->mName.c_str(), sStringsMap["offline"].c_str()); + mesg = llformat( "%s (%s)", info->getName().c_str(), sStringsMap["offline"].c_str()); } else { - mesg = info->mName; + mesg = info->getName(); } - } - - if (!mesg.empty()) - { - font->renderUTF8( - mesg, 0, - llfloor(left + 3), - llfloor(bottom + 2), - LLColor4::white, - LLFontGL::LEFT, - LLFontGL::BASELINE, - LLFontGL::NORMAL, - LLFontGL::DROP_SHADOW); - - // If map texture is still loading, - // display "Loading" placeholder text. - if ((simimage != NULL) && - simimage->getDiscardLevel() != 1 && - simimage->getDiscardLevel() != 0) + if (!mesg.empty()) { font->renderUTF8( - sStringsMap["loading"], 0, - llfloor(left + 18), - llfloor(top - 25), + mesg, 0, + llfloor(left + 3), llfloor(bottom + 2), LLColor4::white, - LLFontGL::LEFT, - LLFontGL::BASELINE, - LLFontGL::NORMAL, - LLFontGL::DROP_SHADOW); + LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); } } } - // #endif used to be here + #endif - // there used to be an #if 1 here, but it was uncommented; perhaps marking a block of code? + #if 1 // Draw background rectangle LLGLSUIDefault gls_ui; { @@ -726,69 +485,49 @@ void LLWorldMapView::draw() gGL.color4fv( mBackgroundColor.mV ); gl_rect_2d(0, height, width, 0); } - + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); gGL.setSceneBlendType(LLRender::BT_ALPHA); - // Infohubs - if (gSavedSettings.getBOOL("MapShowInfohubs")) //(gMapScale >= sThresholdB) + // Draw item infos if we're not zoomed out too much and there's something to draw + if ((level <= DRAW_SIMINFO_THRESHOLD) && (gSavedSettings.getBOOL("MapShowInfohubs") || + gSavedSettings.getBOOL("MapShowTelehubs") || + gSavedSettings.getBOOL("MapShowLandForSale") || + gSavedSettings.getBOOL("MapShowEvents") || + gSavedSettings.getBOOL("ShowMatureEvents") || + gSavedSettings.getBOOL("ShowAdultEvents"))) { - drawGenericItems(LLWorldMap::getInstance()->mInfohubs, sInfohubImage); + drawItems(); } - // Telehubs - if (gSavedSettings.getBOOL("MapShowTelehubs")) //(gMapScale >= sThresholdB) - { - drawGenericItems(LLWorldMap::getInstance()->mTelehubs, sTelehubImage); - } - - // Home Sweet Home + // Draw the Home location (always) LLVector3d home; if (gAgent.getHomePosGlobal(&home)) { drawImage(home, sHomeImage); } - if (gSavedSettings.getBOOL("MapShowLandForSale")) - { - drawGenericItems(LLWorldMap::getInstance()->mLandForSale, sForSaleImage); - // for 1.23, we're showing normal land and adult land in the same UI; you don't - // get a choice about which ones you want. If you're currently asking for adult - // content and land you'll get the adult land. - if (gAgent.canAccessAdult()) - { - drawGenericItems(LLWorldMap::getInstance()->mLandForSaleAdult, sForSaleAdultImage); - } - } - - if (gSavedSettings.getBOOL("MapShowEvents") || - gSavedSettings.getBOOL("ShowMatureEvents") || - gSavedSettings.getBOOL("ShowAdultEvents") ) - { - drawEvents(); - } - - // Now draw your avatar after all that other stuff. + // Draw the current agent after all that other stuff. LLVector3d pos_global = gAgent.getPositionGlobal(); - drawImage(pos_global, sAvatarLargeImage); + drawImage(pos_global, sAvatarYouImage); LLVector3 pos_map = globalPosToView(pos_global); if (!pointInView(llround(pos_map.mV[VX]), llround(pos_map.mV[VY]))) { - drawTracking(pos_global, - lerp(LLColor4::yellow, LLColor4::orange, 0.4f), - TRUE, - "You are here", - "", - llround(LLFontGL::getFontSansSerifSmall()->getLineHeight())); // offset vertically by one line, to avoid overlap with target tracking + drawTracking(pos_global, + lerp(LLColor4::yellow, LLColor4::orange, 0.4f), + TRUE, + "You are here", + "", + llround(LLFontGL::getFontSansSerifSmall()->getLineHeight())); // offset vertically by one line, to avoid overlap with target tracking } - // Show your viewing angle + // Draw the current agent viewing angle drawFrustum(); // Draw icons for the avatars in each region. - // Drawn after your avatar so you can see nearby people. - if (gSavedSettings.getBOOL("MapShowPeople")) + // Drawn this after the current agent avatar so one can see nearby people + if (gSavedSettings.getBOOL("MapShowPeople") && (level <= DRAW_SIMINFO_THRESHOLD)) { drawAgents(); } @@ -798,9 +537,9 @@ void LLWorldMapView::draw() if ( LLTracker::TRACKING_AVATAR == tracking_status ) { drawTracking( LLAvatarTracker::instance().getGlobalPos(), map_track_color, TRUE, LLTracker::getLabel(), "" ); - } - else if ( LLTracker::TRACKING_LANDMARK == tracking_status - || LLTracker::TRACKING_LOCATION == tracking_status ) + } + else if ( LLTracker::TRACKING_LANDMARK == tracking_status + || LLTracker::TRACKING_LOCATION == tracking_status ) { // While fetching landmarks, will have 0,0,0 location for a while, // so don't draw. JC @@ -810,31 +549,33 @@ void LLWorldMapView::draw() drawTracking( pos_global, map_track_color, TRUE, LLTracker::getLabel(), LLTracker::getToolTip() ); } } - else if (LLWorldMap::getInstance()->mIsTrackingUnknownLocation) + else if (LLWorldMap::getInstance()->isTracking()) { - if (LLWorldMap::getInstance()->mInvalidLocation) + if (LLWorldMap::getInstance()->isTrackingInvalidLocation()) { - // We know this location to be invalid + // We know this location to be invalid, draw a blue circle LLColor4 loading_color(0.0, 0.5, 1.0, 1.0); - drawTracking( LLWorldMap::getInstance()->mUnknownLocation, loading_color, TRUE, getString("InvalidLocation"), ""); + drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, TRUE, getString("InvalidLocation"), ""); } else { + // We don't know yet what that location is, draw a throbing blue circle double value = fmod(current_time, 2); - value = 0.5 + 0.5*cos(value * 3.14159f); + value = 0.5 + 0.5*cos(value * F_PI); LLColor4 loading_color(0.0, F32(value/2), F32(value), 1.0); - drawTracking( LLWorldMap::getInstance()->mUnknownLocation, loading_color, TRUE, getString("Loading"), ""); + drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, TRUE, getString("Loading"), ""); } } - // #endif used to be here - + #endif + // turn off the scissor LLGLDisable no_scissor(GL_SCISSOR_TEST); - + updateDirections(); LLView::draw(); + // Get sim info for all sims in view updateVisibleBlocks(); } // end draw() @@ -845,36 +586,182 @@ void LLWorldMapView::setVisible(BOOL visible) LLPanel::setVisible(visible); if (!visible) { - for (S32 map = 0; map < MAP_SIM_IMAGE_TYPES; map++) + // Drop the download of tiles and images priority to nil if we hide the map + LLWorldMap::getInstance()->dropImagePriorities(); + } +} + +void LLWorldMapView::drawMipmap(S32 width, S32 height) +{ + // Compute the level of the mipmap to use for the current scale level + S32 level = LLWorldMipmap::scaleToLevel(sMapScale); + // Set the tile boost level so that unused tiles get to 0 + LLWorldMap::getInstance()->equalizeBoostLevels(); + + // Render whatever we already have loaded if we haven't the current level + // complete and use it as a background (scaled up or scaled down) + if (!sVisibleTilesLoaded) + { + // Note: the (load = false) parameter avoids missing tiles to be fetched (i.e. we render what we have, no more) + // Check all the lower res levels and render them in reverse order (worse to best) + // We need to traverse all the levels as the user can zoom in very fast + for (S32 l = LLWorldMipmap::MAP_LEVELS; l > level; l--) { - for (U32 layer_idx=0; layer_idx<LLWorldMap::getInstance()->mMapLayers[map].size(); ++layer_idx) - { - if (LLWorldMap::getInstance()->mMapLayers[map][layer_idx].LayerDefined) - { - LLWorldMapLayer *layer = &LLWorldMap::getInstance()->mMapLayers[map][layer_idx]; - layer->LayerImage->setBoostLevel(0); - } - } + drawMipmapLevel(width, height, l, false); } - for (LLWorldMap::sim_info_map_t::iterator it = LLWorldMap::getInstance()->mSimInfoMap.begin(); - it != LLWorldMap::getInstance()->mSimInfoMap.end(); ++it) + // Skip the current level, as we'll do it anyway here under... + + // Just go one level down in res as it can really get too much stuff + // when zooming out and too small to see anyway... + if (level > 1) { - LLSimInfo* info = (*it).second; - if (info->mCurrentImage.notNull()) + drawMipmapLevel(width, height, level - 1, false); + } + } + else + { + //LL_INFOS("World Map") << "Render complete, don't draw background..." << LL_ENDL; + } + + // Render the current level + sVisibleTilesLoaded = drawMipmapLevel(width, height, level); + + return; +} + +// Return true if all the tiles required to render that level have been fetched or are truly missing +bool LLWorldMapView::drawMipmapLevel(S32 width, S32 height, S32 level, bool load) +{ + // Check input level + llassert (level > 0); + if (level <= 0) + return false; + + // Count tiles hit and completed + S32 completed_tiles = 0; + S32 total_tiles = 0; + + // Size in meters (global) of each tile of that level + S32 tile_width = LLWorldMipmap::MAP_TILE_SIZE * (1 << (level - 1)); + // Dimension of the screen in meter at that scale + LLVector3d pos_SW = viewPosToGlobal(0, 0); + LLVector3d pos_NE = viewPosToGlobal(width, height); + // Add external band of tiles on the outskirt so to hit the partially displayed tiles right and top + pos_NE[VX] += tile_width; + pos_NE[VY] += tile_width; + + // Iterate through the tiles on screen: we just need to ask for one tile every tile_width meters + U32 grid_x, grid_y; + for (F64 index_y = pos_SW[VY]; index_y < pos_NE[VY]; index_y += tile_width) + { + for (F64 index_x = pos_SW[VX]; index_x < pos_NE[VX]; index_x += tile_width) + { + // Compute the world coordinates of the current point + LLVector3d pos_global(index_x, index_y, pos_SW[VZ]); + // Convert to the mipmap level coordinates for that point (i.e. which tile to we hit) + LLWorldMipmap::globalToMipmap(pos_global[VX], pos_global[VY], level, &grid_x, &grid_y); + // Get the tile. Note: NULL means that the image does not exist (so it's considered "complete" as far as fetching is concerned) + LLPointer<LLViewerFetchedTexture> simimage = LLWorldMap::getInstance()->getObjectsTile(grid_x, grid_y, level, load); + if (simimage) { - info->mCurrentImage->setBoostLevel(0); + // Checks that the image has a valid texture + if (simimage->hasGLTexture()) + { + // Increment the number of completly fetched tiles + completed_tiles++; + + // Convert those coordinates (SW corner of the mipmap tile) into world (meters) coordinates + pos_global[VX] = grid_x * REGION_WIDTH_METERS; + pos_global[VY] = grid_y * REGION_WIDTH_METERS; + // Now to screen coordinates for SW corner of that tile + LLVector3 pos_screen = globalPosToView (pos_global); + F32 left = pos_screen[VX]; + F32 bottom = pos_screen[VY]; + // Compute the NE corner coordinates of the tile now + pos_global[VX] += tile_width; + pos_global[VY] += tile_width; + pos_screen = globalPosToView (pos_global); + F32 right = pos_screen[VX]; + F32 top = pos_screen[VY]; + + // Draw the tile + LLGLSUIDefault gls_ui; + gGL.getTexUnit(0)->bind(simimage.get()); + simimage->setAddressMode(LLTexUnit::TAM_CLAMP); + + gGL.setSceneBlendType(LLRender::BT_ALPHA); + gGL.color4f(1.f, 1.0f, 1.0f, 1.0f); + + gGL.begin(LLRender::QUADS); + gGL.texCoord2f(0.f, 1.f); + gGL.vertex3f(left, top, 0.f); + gGL.texCoord2f(0.f, 0.f); + gGL.vertex3f(left, bottom, 0.f); + gGL.texCoord2f(1.f, 0.f); + gGL.vertex3f(right, bottom, 0.f); + gGL.texCoord2f(1.f, 1.f); + gGL.vertex3f(right, top, 0.f); + gGL.end(); +#if DEBUG_DRAW_TILE + drawTileOutline(level, top, left, bottom, right); +#endif // DEBUG_DRAW_TILE + } + //else + //{ + // Waiting for a tile -> the level is not complete + // LL_INFOS("World Map") << "Unfetched tile. level = " << level << LL_ENDL; + //} } - if (info->mOverlayImage.notNull()) + else { - info->mOverlayImage->setBoostLevel(0); + // Unexistent tiles are counted as "completed" + completed_tiles++; } + // Increment the number of tiles in that level / screen + total_tiles++; } } + return (completed_tiles == total_tiles); +} + +// Draw lines (rectangle outline and cross) to visualize the position of the tile +// Used for debug only +void LLWorldMapView::drawTileOutline(S32 level, F32 top, F32 left, F32 bottom, F32 right) +{ + gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO); + + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + if (level == 1) + gGL.color3f(1.f, 0.f, 0.f); // red + else if (level == 2) + gGL.color3f(0.f, 1.f, 0.f); // green + else if (level == 3) + gGL.color3f(0.f, 0.f, 1.f); // blue + else if (level == 4) + gGL.color3f(1.f, 1.f, 0.f); // yellow + else if (level == 5) + gGL.color3f(1.f, 0.f, 1.f); // magenta + else if (level == 6) + gGL.color3f(0.f, 1.f, 1.f); // cyan + else if (level == 7) + gGL.color3f(1.f, 1.f, 1.f); // white + else + gGL.color3f(0.f, 0.f, 0.f); // black + gGL.begin(LLRender::LINE_STRIP); + gGL.vertex2f(left, top); + gGL.vertex2f(right, bottom); + gGL.vertex2f(left, bottom); + gGL.vertex2f(right, top); + gGL.vertex2f(left, top); + gGL.vertex2f(left, bottom); + gGL.vertex2f(right, bottom); + gGL.vertex2f(right, top); + gGL.end(); } -void LLWorldMapView::drawGenericItems(const LLWorldMap::item_info_list_t& items, LLUIImagePtr image) +void LLWorldMapView::drawGenericItems(const LLSimInfo::item_info_list_t& items, LLUIImagePtr image) { - LLWorldMap::item_info_list_t::const_iterator e; + LLSimInfo::item_info_list_t::const_iterator e; for (e = items.begin(); e != items.end(); ++e) { drawGenericItem(*e, image); @@ -883,7 +770,7 @@ void LLWorldMapView::drawGenericItems(const LLWorldMap::item_info_list_t& items, void LLWorldMapView::drawGenericItem(const LLItemInfo& item, LLUIImagePtr image) { - drawImage(item.mPosGlobal, image); + drawImage(item.getGlobalPosition(), image); } @@ -906,137 +793,91 @@ void LLWorldMapView::drawImageStack(const LLVector3d& global_pos, LLUIImagePtr i } } - -void LLWorldMapView::drawAgents() +void LLWorldMapView::drawItems() { - static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white); - static LLUIColor map_avatar_friend_color = LLUIColorTable::instance().getColor("MapAvatarFriendColor", LLColor4::white); - - F32 agents_scale = (gMapScale * 0.9f) / 256.f; + bool mature_enabled = gAgent.canAccessMature(); + bool adult_enabled = gAgent.canAccessAdult(); + + BOOL show_mature = mature_enabled && gSavedSettings.getBOOL("ShowMatureEvents"); + BOOL show_adult = adult_enabled && gSavedSettings.getBOOL("ShowAdultEvents"); for (handle_list_t::iterator iter = mVisibleRegions.begin(); iter != mVisibleRegions.end(); ++iter) { U64 handle = *iter; - LLSimInfo* siminfo = LLWorldMap::getInstance()->simInfoFromHandle(handle); - if (siminfo && (siminfo->mAccess == SIM_ACCESS_DOWN)) + LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromHandle(handle); + if ((info == NULL) || (info->isDown())) { continue; } - LLWorldMap::agent_list_map_t::iterator counts_iter = LLWorldMap::getInstance()->mAgentLocationsMap.find(handle); - if (siminfo && siminfo->mShowAgentLocations && counts_iter != LLWorldMap::getInstance()->mAgentLocationsMap.end()) + // Infohubs + if (gSavedSettings.getBOOL("MapShowInfohubs")) { - // Show Individual agents (or little stacks where real agents are) - LLWorldMap::item_info_list_t& agentcounts = counts_iter->second; - S32 sim_agent_count = 0; - for (LLWorldMap::item_info_list_t::iterator iter = agentcounts.begin(); - iter != agentcounts.end(); ++iter) - { - const LLItemInfo& info = *iter; - S32 agent_count = info.mExtra; - sim_agent_count += info.mExtra; - // Here's how we'd choose the color if info.mID were available but it's not being sent: - //LLColor4 color = (agent_count == 1 && is_agent_friend(info.mID)) ? map_avatar_friend_color : map_avatar_color; - drawImageStack(info.mPosGlobal, sAvatarSmallImage, agent_count, 3.f, map_avatar_color); - } - LLWorldMap::getInstance()->mNumAgents[handle] = sim_agent_count; // override mNumAgents for this sim + drawGenericItems(info->getInfoHub(), sInfohubImage); } - else + // Telehubs + if (gSavedSettings.getBOOL("MapShowTelehubs")) + { + drawGenericItems(info->getTeleHub(), sTelehubImage); + } + // Land for sale + if (gSavedSettings.getBOOL("MapShowLandForSale")) { - // Show agent 'stack' at center of sim - S32 num_agents = LLWorldMap::getInstance()->mNumAgents[handle]; - if (num_agents > 0) + drawGenericItems(info->getLandForSale(), sForSaleImage); + // for 1.23, we're showing normal land and adult land in the same UI; you don't + // get a choice about which ones you want. If you're currently asking for adult + // content and land you'll get the adult land. + if (gAgent.canAccessAdult()) { - LLVector3d region_center = from_region_handle(handle); - region_center[VX] += REGION_WIDTH_METERS / 2; - region_center[VY] += REGION_WIDTH_METERS / 2; - // Reduce the stack size as you zoom out - always display at lease one agent where there is one or more - S32 agent_count = (S32)(((num_agents-1) * agents_scale + (num_agents-1) * 0.1f)+.1f) + 1; - drawImageStack(region_center, sAvatarSmallImage, agent_count, 3.f, map_avatar_color); + drawGenericItems(info->getLandForSaleAdult(), sForSaleAdultImage); } } + // PG Events + if (gSavedSettings.getBOOL("MapShowEvents")) + { + drawGenericItems(info->getPGEvent(), sEventImage); + } + // Mature Events + if (show_mature) + { + drawGenericItems(info->getMatureEvent(), sEventMatureImage); + } + // Adult Events + if (show_adult) + { + drawGenericItems(info->getAdultEvent(), sEventAdultImage); + } } } - -void LLWorldMapView::drawEvents() +void LLWorldMapView::drawAgents() { - bool mature_enabled = gAgent.canAccessMature(); - bool adult_enabled = gAgent.canAccessAdult(); - - BOOL show_pg = gSavedSettings.getBOOL("MapShowEvents"); - BOOL show_mature = mature_enabled && gSavedSettings.getBOOL("ShowMatureEvents"); - BOOL show_adult = adult_enabled && gSavedSettings.getBOOL("ShowAdultEvents"); + static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white); - // First the non-selected events - LLWorldMap::item_info_list_t::const_iterator e; - if (show_pg) + for (handle_list_t::iterator iter = mVisibleRegions.begin(); iter != mVisibleRegions.end(); ++iter) { - for (e = LLWorldMap::getInstance()->mPGEvents.begin(); e != LLWorldMap::getInstance()->mPGEvents.end(); ++e) + U64 handle = *iter; + LLSimInfo* siminfo = LLWorldMap::getInstance()->simInfoFromHandle(handle); + if ((siminfo == NULL) || (siminfo->isDown())) { - if (!e->mSelected) - { - drawGenericItem(*e, sEventImage); - } + continue; } - } - if (show_mature) - { - for (e = LLWorldMap::getInstance()->mMatureEvents.begin(); e != LLWorldMap::getInstance()->mMatureEvents.end(); ++e) - { - if (!e->mSelected) - { - drawGenericItem(*e, sEventMatureImage); - } - } - } - if (show_adult) - { - for (e = LLWorldMap::getInstance()->mAdultEvents.begin(); e != LLWorldMap::getInstance()->mAdultEvents.end(); ++e) - { - if (!e->mSelected) - { - drawGenericItem(*e, sEventAdultImage); - } - } - } - // Then the selected events - if (show_pg) - { - for (e = LLWorldMap::getInstance()->mPGEvents.begin(); e != LLWorldMap::getInstance()->mPGEvents.end(); ++e) + LLSimInfo::item_info_list_t::const_iterator it = siminfo->getAgentLocation().begin(); + while (it != siminfo->getAgentLocation().end()) { - if (e->mSelected) - { - drawGenericItem(*e, sEventImage); - } + // Show Individual agents (or little stacks where real agents are) + + // Here's how we'd choose the color if info.mID were available but it's not being sent: + // LLColor4 color = (agent_count == 1 && is_agent_friend(info.mID)) ? friend_color : avatar_color; + drawImageStack(it->getGlobalPosition(), sAvatarSmallImage, it->getCount(), 3.f, map_avatar_color); + ++it; } } - if (show_mature) - { - for (e = LLWorldMap::getInstance()->mMatureEvents.begin(); e != LLWorldMap::getInstance()->mMatureEvents.end(); ++e) - { - if (e->mSelected) - { - drawGenericItem(*e, sEventMatureImage); - } - } - } - if (show_adult) - { - for (e = LLWorldMap::getInstance()->mAdultEvents.begin(); e != LLWorldMap::getInstance()->mAdultEvents.end(); ++e) - { - if (e->mSelected) - { - drawGenericItem(*e, sEventAdultImage); - } - } - } } - void LLWorldMapView::drawFrustum() { // Draw frustum - F32 meters_to_pixels = gMapScale/ REGION_WIDTH_METERS; + F32 meters_to_pixels = sMapScale/ REGION_WIDTH_METERS; F32 horiz_fov = LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect(); F32 far_clip_meters = LLViewerCamera::getInstance()->getFar(); @@ -1077,8 +918,8 @@ LLVector3 LLWorldMapView::globalPosToView( const LLVector3d& global_pos ) LLVector3 pos_local; pos_local.setVec(relative_pos_global); // convert to floats from doubles - pos_local.mV[VX] *= sPixelsPerMeter; - pos_local.mV[VY] *= sPixelsPerMeter; + pos_local.mV[VX] *= sMapScale / REGION_WIDTH_METERS; + pos_local.mV[VY] *= sMapScale / REGION_WIDTH_METERS; // leave Z component in meters @@ -1162,7 +1003,7 @@ LLVector3d LLWorldMapView::viewPosToGlobal( S32 x, S32 y ) LLVector3 pos_local( (F32)x, (F32)y, 0.f ); - pos_local *= ( REGION_WIDTH_METERS / gMapScale ); + pos_local *= ( REGION_WIDTH_METERS / sMapScale ); LLVector3d pos_global; pos_global.setVec( pos_local ); @@ -1183,23 +1024,20 @@ LLVector3d LLWorldMapView::viewPosToGlobal( S32 x, S32 y ) BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, MASK mask ) { LLVector3d pos_global = viewPosToGlobal(x, y); - + U64 handle = to_region_handle(pos_global); std::string tooltip_msg; - LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global); + LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromHandle(handle); if (info) { LLViewerRegion *region = gAgent.getRegion(); - std::string message = - llformat("%s (%s)", - info->mName.c_str(), - LLViewerRegion::accessToString(info->mAccess).c_str()); + std::string message = llformat("%s (%s)", info->getName().c_str(), info->getAccessString().c_str()); - if (info->mAccess != SIM_ACCESS_DOWN) + if (!info->isDown()) { - S32 agent_count = LLWorldMap::getInstance()->mNumAgents[info->mHandle]; - if (region && region->getHandle() == info->mHandle) + S32 agent_count = info->getAgentCount(); + if (region && (region->getHandle() == handle)) { ++agent_count; // Bump by 1 if we're here } @@ -1208,6 +1046,8 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, MASK mask ) // zoomed out, so don't display anything about the count. JC if (agent_count > 0) { + // Merov: i18n horror!!! Even using gettext(), concatenating strings is not localizable. + // The singular/plural switch form here under might make no sense in some languages. Don't do that. message += llformat("\n%d ", agent_count); if (agent_count == 1) @@ -1223,7 +1063,7 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, MASK mask ) tooltip_msg.assign( message ); // Optionally show region flags - std::string region_flags = LLViewerRegion::regionFlagsToString(info->mRegionFlags); + std::string region_flags = info->getFlagsString(); if (!region_flags.empty()) { @@ -1263,6 +1103,9 @@ static void drawDot(F32 x_pixels, F32 y_pixels, } else { + // Draw V indicator for above or below + // *TODO: Replace this vector drawing with icons + F32 left = x_pixels - dot_radius; F32 right = x_pixels + dot_radius; F32 center = (left + right) * 0.5f; @@ -1271,13 +1114,14 @@ static void drawDot(F32 x_pixels, F32 y_pixels, gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.color4fv( color.mV ); - LLUI::setLineWidth(1.5f); - F32 h_bar = relative_z > HEIGHT_THRESHOLD ? top : bottom; // horizontal bar Y + LLUI::setLineWidth(3.0f); + F32 point = relative_z > HEIGHT_THRESHOLD ? top : bottom; // Y pos of the point of the V + F32 back = relative_z > HEIGHT_THRESHOLD ? bottom : top; // Y pos of the ends of the V gGL.begin( LLRender::LINES ); - gGL.vertex2f(center, top); - gGL.vertex2f(left, h_bar); - gGL.vertex2f(right, h_bar); - gGL.vertex2f(right, bottom); + gGL.vertex2f(left, back); + gGL.vertex2f(center, point); + gGL.vertex2f(center, point); + gGL.vertex2f(right, back); gGL.end(); LLUI::setLineWidth(1.0f); } @@ -1292,7 +1136,7 @@ void LLWorldMapView::drawAvatar(F32 x_pixels, F32 dot_radius) { const F32 HEIGHT_THRESHOLD = 7.f; - LLUIImagePtr dot_image = sAvatarSmallImage; + LLUIImagePtr dot_image = sAvatarLevelImage; if(relative_z < -HEIGHT_THRESHOLD) { dot_image = sAvatarBelowImage; @@ -1301,10 +1145,12 @@ void LLWorldMapView::drawAvatar(F32 x_pixels, { dot_image = sAvatarAboveImage; } - dot_image->draw( - llround(x_pixels) - dot_image->getWidth()/2, - llround(y_pixels) - dot_image->getHeight()/2, - color); + S32 dot_width = llround(dot_radius * 2.f); + dot_image->draw(llround(x_pixels - dot_radius), + llround(y_pixels - dot_radius), + dot_width, + dot_width, + color); } // Pass relative Z of 0 to draw at same level. @@ -1565,7 +1411,7 @@ void LLWorldMapView::reshape( S32 width, S32 height, BOOL called_from_parent ) bool LLWorldMapView::checkItemHit(S32 x, S32 y, LLItemInfo& item, LLUUID* id, bool track) { - LLVector3 pos_view = globalPosToView(item.mPosGlobal); + LLVector3 pos_view = globalPosToView(item.getGlobalPosition()); S32 item_x = llround(pos_view.mV[VX]); S32 item_y = llround(pos_view.mV[VY]); @@ -1574,12 +1420,12 @@ bool LLWorldMapView::checkItemHit(S32 x, S32 y, LLItemInfo& item, LLUUID* id, bo if (y < item_y - BIG_DOT_RADIUS) return false; if (y > item_y + BIG_DOT_RADIUS) return false; - LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromHandle(item.mRegionHandle); + LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromHandle(item.getRegionHandle()); if (sim_info) { if (track) { - gFloaterWorldMap->trackLocation(item.mPosGlobal); + gFloaterWorldMap->trackLocation(item.getGlobalPosition()); } } @@ -1588,8 +1434,8 @@ bool LLWorldMapView::checkItemHit(S32 x, S32 y, LLItemInfo& item, LLUUID* id, bo gFloaterWorldMap->trackGenericItem(item); } - item.mSelected = TRUE; - *id = item.mID; +// item.setSelected(true); + *id = item.getUUID(); return true; } @@ -1612,108 +1458,116 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, *hit_type = 0; // hit nothing - LLWorldMap::getInstance()->mIsTrackingUnknownLocation = FALSE; - LLWorldMap::getInstance()->mIsTrackingDoubleClick = FALSE; - LLWorldMap::getInstance()->mIsTrackingCommit = FALSE; + LLWorldMap::getInstance()->cancelTracking(); - LLWorldMap::item_info_list_t::iterator it; - - // clear old selected stuff - for (it = LLWorldMap::getInstance()->mPGEvents.begin(); it != LLWorldMap::getInstance()->mPGEvents.end(); ++it) - { - (*it).mSelected = FALSE; - } - for (it = LLWorldMap::getInstance()->mMatureEvents.begin(); it != LLWorldMap::getInstance()->mMatureEvents.end(); ++it) + S32 level = LLWorldMipmap::scaleToLevel(sMapScale); + // If the zoom level is not too far out already, test hits + if (level <= DRAW_SIMINFO_THRESHOLD) { - (*it).mSelected = FALSE; - } - for (it = LLWorldMap::getInstance()->mAdultEvents.begin(); it != LLWorldMap::getInstance()->mAdultEvents.end(); ++it) - { - (*it).mSelected = FALSE; - } - for (it = LLWorldMap::getInstance()->mLandForSale.begin(); it != LLWorldMap::getInstance()->mLandForSale.end(); ++it) - { - (*it).mSelected = FALSE; - } - - // Select event you clicked on - if (gSavedSettings.getBOOL("MapShowEvents")) - { - for (it = LLWorldMap::getInstance()->mPGEvents.begin(); it != LLWorldMap::getInstance()->mPGEvents.end(); ++it) - { - LLItemInfo& event = *it; - - if (checkItemHit(x, y, event, id, false)) - { - *hit_type = MAP_ITEM_PG_EVENT; - mItemPicked = TRUE; - gFloaterWorldMap->trackEvent(event); - return; - } - } - } - if (gSavedSettings.getBOOL("ShowMatureEvents")) - { - for (it = LLWorldMap::getInstance()->mMatureEvents.begin(); it != LLWorldMap::getInstance()->mMatureEvents.end(); ++it) - { - LLItemInfo& event = *it; - - if (checkItemHit(x, y, event, id, false)) - { - *hit_type = MAP_ITEM_MATURE_EVENT; - mItemPicked = TRUE; - gFloaterWorldMap->trackEvent(event); - return; - } - } - } - if (gSavedSettings.getBOOL("ShowAdultEvents")) - { - for (it = LLWorldMap::getInstance()->mAdultEvents.begin(); it != LLWorldMap::getInstance()->mAdultEvents.end(); ++it) - { - LLItemInfo& event = *it; - - if (checkItemHit(x, y, event, id, false)) - { - *hit_type = MAP_ITEM_ADULT_EVENT; - mItemPicked = TRUE; - gFloaterWorldMap->trackEvent(event); - return; - } - } - } - - if (gSavedSettings.getBOOL("MapShowLandForSale")) - { - for (it = LLWorldMap::getInstance()->mLandForSale.begin(); it != LLWorldMap::getInstance()->mLandForSale.end(); ++it) - { - LLItemInfo& land = *it; + bool show_mature = gAgent.canAccessMature() && gSavedSettings.getBOOL("ShowMatureEvents"); + bool show_adult = gAgent.canAccessAdult() && gSavedSettings.getBOOL("ShowAdultEvents"); - if (checkItemHit(x, y, land, id, true)) - { - *hit_type = MAP_ITEM_LAND_FOR_SALE; - mItemPicked = TRUE; - return; - } - } - - for (it = LLWorldMap::getInstance()->mLandForSaleAdult.begin(); it != LLWorldMap::getInstance()->mLandForSaleAdult.end(); ++it) + // Test hits if trackable data are displayed, otherwise, we don't even bother + if (gSavedSettings.getBOOL("MapShowEvents") || show_mature || show_adult || gSavedSettings.getBOOL("MapShowLandForSale")) { - LLItemInfo& land = *it; - - if (checkItemHit(x, y, land, id, true)) + // Iterate through the visible regions + for (handle_list_t::iterator iter = mVisibleRegions.begin(); iter != mVisibleRegions.end(); ++iter) { - *hit_type = MAP_ITEM_LAND_FOR_SALE_ADULT; - mItemPicked = TRUE; - return; + U64 handle = *iter; + LLSimInfo* siminfo = LLWorldMap::getInstance()->simInfoFromHandle(handle); + if ((siminfo == NULL) || (siminfo->isDown())) + { + continue; + } + // If on screen check hits with the visible item lists + if (gSavedSettings.getBOOL("MapShowEvents")) + { + LLSimInfo::item_info_list_t::const_iterator it = siminfo->getPGEvent().begin(); + while (it != siminfo->getPGEvent().end()) + { + LLItemInfo event = *it; + if (checkItemHit(x, y, event, id, false)) + { + *hit_type = MAP_ITEM_PG_EVENT; + mItemPicked = TRUE; + gFloaterWorldMap->trackEvent(event); + return; + } + ++it; + } + } + if (show_mature) + { + LLSimInfo::item_info_list_t::const_iterator it = siminfo->getMatureEvent().begin(); + while (it != siminfo->getMatureEvent().end()) + { + LLItemInfo event = *it; + if (checkItemHit(x, y, event, id, false)) + { + *hit_type = MAP_ITEM_MATURE_EVENT; + mItemPicked = TRUE; + gFloaterWorldMap->trackEvent(event); + return; + } + ++it; + } + } + if (show_adult) + { + LLSimInfo::item_info_list_t::const_iterator it = siminfo->getAdultEvent().begin(); + while (it != siminfo->getAdultEvent().end()) + { + LLItemInfo event = *it; + if (checkItemHit(x, y, event, id, false)) + { + *hit_type = MAP_ITEM_ADULT_EVENT; + mItemPicked = TRUE; + gFloaterWorldMap->trackEvent(event); + return; + } + ++it; + } + } + if (gSavedSettings.getBOOL("MapShowLandForSale")) + { + LLSimInfo::item_info_list_t::const_iterator it = siminfo->getLandForSale().begin(); + while (it != siminfo->getLandForSale().end()) + { + LLItemInfo event = *it; + if (checkItemHit(x, y, event, id, true)) + { + *hit_type = MAP_ITEM_LAND_FOR_SALE; + mItemPicked = TRUE; + return; + } + ++it; + } + // for 1.23, we're showing normal land and adult land in the same UI; you don't + // get a choice about which ones you want. If you're currently asking for adult + // content and land you'll get the adult land. + if (gAgent.canAccessAdult()) + { + LLSimInfo::item_info_list_t::const_iterator it = siminfo->getLandForSaleAdult().begin(); + while (it != siminfo->getLandForSaleAdult().end()) + { + LLItemInfo event = *it; + if (checkItemHit(x, y, event, id, true)) + { + *hit_type = MAP_ITEM_LAND_FOR_SALE_ADULT; + mItemPicked = TRUE; + return; + } + ++it; + } + } + } } } } - // If we get here, we haven't clicked on an icon + // If we get here, we haven't clicked on anything gFloaterWorldMap->trackLocation(pos_global); mItemPicked = FALSE; - *id = LLUUID::null; return; } @@ -1774,59 +1628,36 @@ BOOL LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask ) return FALSE; } -U32 LLWorldMapView::updateBlock(S32 block_x, S32 block_y) +void LLWorldMapView::updateVisibleBlocks() { - U32 blocks_requested = 0; - S32 offset = block_x | (block_y * MAP_BLOCK_RES); - if (!LLWorldMap::getInstance()->mMapBlockLoaded[LLWorldMap::getInstance()->mCurrentMap][offset]) + if (LLWorldMipmap::scaleToLevel(sMapScale) > DRAW_SIMINFO_THRESHOLD) { -// llinfos << "Loading Block (" << block_x << "," << block_y << ")" << llendl; - LLWorldMap::getInstance()->sendMapBlockRequest(block_x << 3, block_y << 3, (block_x << 3) + 7, (block_y << 3) + 7); - LLWorldMap::getInstance()->mMapBlockLoaded[LLWorldMap::getInstance()->mCurrentMap][offset] = TRUE; - blocks_requested++; + // If we're zoomed out too much, we just don't load all those sim info: too much! + return; } - return blocks_requested; -} -U32 LLWorldMapView::updateVisibleBlocks() -{ - if (gMapScale < SIM_MAP_SCALE) - { - // We don't care what is loaded if we're zoomed out - return 0; - } + // Load the blocks visible in the current World Map view + // Get the World Map view coordinates and boundaries LLVector3d camera_global = gAgent.getCameraPositionGlobal(); - - F32 pixels_per_region = gMapScale; const S32 width = getRect().getWidth(); const S32 height = getRect().getHeight(); - // Convert pan to sim coordinates - S32 world_center_x_lo = S32(((-sPanX - width/2) / pixels_per_region) + (camera_global.mdV[0] / REGION_WIDTH_METERS)); - S32 world_center_x_hi = S32(((-sPanX + width/2) / pixels_per_region) + (camera_global.mdV[0] / REGION_WIDTH_METERS)); - S32 world_center_y_lo = S32(((-sPanY - height/2) / pixels_per_region) + (camera_global.mdV[1] / REGION_WIDTH_METERS)); - S32 world_center_y_hi = S32(((-sPanY + height/2)/ pixels_per_region) + (camera_global.mdV[1] / REGION_WIDTH_METERS)); - - // Find the corresponding 8x8 block - S32 world_block_x_lo = world_center_x_lo >> 3; - S32 world_block_x_hi = world_center_x_hi >> 3; - S32 world_block_y_lo = world_center_y_lo >> 3; - S32 world_block_y_hi = world_center_y_hi >> 3; - - U32 blocks_requested = 0; - const U32 max_blocks_requested = 9; + const F32 half_width = F32(width) / 2.0f; + const F32 half_height = F32(height) / 2.0f; - for (S32 block_x = llmax(world_block_x_lo, 0); block_x <= llmin(world_block_x_hi, MAP_BLOCK_RES-1); ++block_x) - { - for (S32 block_y = llmax(world_block_y_lo, 0); block_y <= llmin(world_block_y_hi, MAP_BLOCK_RES-1); ++block_y) - { - blocks_requested += updateBlock(block_x, block_y); - if (blocks_requested >= max_blocks_requested) - return blocks_requested; - } - } - return blocks_requested; -} + // Compute center into sim grid coordinates + S32 world_center_x = S32((-sPanX / sMapScale) + (camera_global.mdV[0] / REGION_WIDTH_METERS)); + S32 world_center_y = S32((-sPanY / sMapScale) + (camera_global.mdV[1] / REGION_WIDTH_METERS)); + + // Compute the boundaries into sim grid coordinates + S32 world_left = world_center_x - S32(half_width / sMapScale) - 1; + S32 world_right = world_center_x + S32(half_width / sMapScale) + 1; + S32 world_bottom = world_center_y - S32(half_height / sMapScale) - 1; + S32 world_top = world_center_y + S32(half_height / sMapScale) + 1; + + //LL_INFOS("World Map") << "LLWorldMapView::updateVisibleBlocks() : sMapScale = " << sMapScale << ", left = " << world_left << ", right = " << world_right << ", bottom = " << world_bottom << ", top = " << world_top << LL_ENDL; + LLWorldMap::getInstance()->updateRegions(world_left, world_bottom, world_right, world_top); +} BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask ) { @@ -1915,16 +1746,16 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask ) } default: { - if (LLWorldMap::getInstance()->mIsTrackingUnknownLocation) + if (LLWorldMap::getInstance()->isTracking()) { - LLWorldMap::getInstance()->mIsTrackingDoubleClick = TRUE; + LLWorldMap::getInstance()->setTrackingDoubleClick(); } else { // Teleport if we got a valid location LLVector3d pos_global = viewPosToGlobal(x,y); LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global); - if (sim_info && sim_info->mAccess != SIM_ACCESS_DOWN) + if (sim_info && !sim_info->isDown()) { gAgent.teleportViaLocation( pos_global ); } diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h index 66793f0101..9eecacb2d8 100644 --- a/indra/newview/llworldmapview.h +++ b/indra/newview/llworldmapview.h @@ -30,27 +30,23 @@ * $/LicenseInfo$ */ -// Global map of the world. +// View of the global map of the world + +// The data (model) for the global map (a singleton, unique to the application instance) is +// in LLWorldMap and is typically accessed using LLWorldMap::getInstance() #ifndef LL_LLWORLDMAPVIEW_H #define LL_LLWORLDMAPVIEW_H #include "llpanel.h" -#include "v3math.h" -#include "v3dmath.h" -#include "v4color.h" -#include "llviewertexture.h" -#include "llmapimagetype.h" #include "llworldmap.h" - -class LLItemInfo; +#include "v4color.h" const S32 DEFAULT_TRACKING_ARROW_SIZE = 16; -class LLColor4; -class LLColor4U; -class LLCoordGL; -class LLViewerTexture; +class LLUUID; +class LLVector3d; +class LLVector3; class LLTextBox; @@ -77,22 +73,26 @@ public: bool checkItemHit(S32 x, S32 y, LLItemInfo& item, LLUUID* id, bool track); void handleClick(S32 x, S32 y, MASK mask, S32* hit_type, LLUUID* id); - // Scale and pan are shared across all instances. + // Scale and pan are shared across all instances! (i.e. Terrain and Objects maps are always registered) static void setScale( F32 scale ); static void translatePan( S32 delta_x, S32 delta_y ); static void setPan( S32 x, S32 y, BOOL snap = TRUE ); + // Return true if the current scale level is above the threshold for accessing region info + static bool showRegionInfo(); LLVector3 globalPosToView(const LLVector3d& global_pos); LLVector3d viewPosToGlobal(S32 x,S32 y); virtual void draw(); - void drawGenericItems(const LLWorldMap::item_info_list_t& items, LLUIImagePtr image); + void drawGenericItems(const LLSimInfo::item_info_list_t& items, LLUIImagePtr image); void drawGenericItem(const LLItemInfo& item, LLUIImagePtr image); void drawImage(const LLVector3d& global_pos, LLUIImagePtr image, const LLColor4& color = LLColor4::white); void drawImageStack(const LLVector3d& global_pos, LLUIImagePtr image, U32 count, F32 offset, const LLColor4& color); void drawAgents(); - void drawEvents(); + void drawItems(); void drawFrustum(); + void drawMipmap(S32 width, S32 height); + bool drawMipmapLevel(S32 width, S32 height, S32 level, bool load = true); static void cleanupTextures(); @@ -108,7 +108,7 @@ public: F32 y_pixels, const LLColor4& color, F32 relative_z = 0.f, - F32 dot_radius = 3.f); + F32 dot_radius = 5.f); static void drawTrackingCircle( const LLRect& rect, S32 x, S32 y, const LLColor4& color, @@ -129,9 +129,7 @@ public: static void clearLastClick() { sHandledLastClick = FALSE; } // if the view changes, download additional sim info as needed - // return value is number of blocks newly requested. - U32 updateBlock(S32 block_x, S32 block_y); - U32 updateVisibleBlocks(); + void updateVisibleBlocks(); protected: void setDirectionPos( LLTextBox* text_box, F32 rotation ); @@ -140,11 +138,13 @@ protected: public: LLColor4 mBackgroundColor; - static LLUIImagePtr sAvatarYouSmallImage; static LLUIImagePtr sAvatarSmallImage; - static LLUIImagePtr sAvatarLargeImage; + static LLUIImagePtr sAvatarYouImage; + static LLUIImagePtr sAvatarYouLargeImage; + static LLUIImagePtr sAvatarLevelImage; static LLUIImagePtr sAvatarAboveImage; static LLUIImagePtr sAvatarBelowImage; + static LLUIImagePtr sTelehubImage; static LLUIImagePtr sInfohubImage; static LLUIImagePtr sHomeImage; @@ -157,9 +157,7 @@ public: static LLUIImagePtr sForSaleImage; static LLUIImagePtr sForSaleAdultImage; - static F32 sThresholdA; - static F32 sThresholdB; - static F32 sPixelsPerMeter; // world meters to map pixels + static F32 sMapScale; // scale = size of a region in pixels BOOL mItemPicked; @@ -169,6 +167,7 @@ public: static F32 sTargetPanY; // in pixels static S32 sTrackingArrowX; static S32 sTrackingArrowY; + static bool sVisibleTilesLoaded; // Are we mid-pan from a user drag? BOOL mPanning; @@ -191,10 +190,14 @@ public: static BOOL sHandledLastClick; S32 mSelectIDStart; + // Keep the list of regions that are displayed on screen. Avoids iterating through the whole region map after draw(). typedef std::vector<U64> handle_list_t; handle_list_t mVisibleRegions; // set every frame static std::map<std::string,std::string> sStringsMap; + +private: + void drawTileOutline(S32 level, F32 top, F32 left, F32 bottom, F32 right); }; #endif diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp new file mode 100644 index 0000000000..8d3165b98c --- /dev/null +++ b/indra/newview/llworldmipmap.cpp @@ -0,0 +1,275 @@ +/** + * @file llworldmipmap.cpp + * @brief Data storage for the S3 mipmap of the entire world. + * + * $LicenseInfo:firstyear=2003&license=viewergpl$ + * + * Copyright (c) 2003-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 "llworldmipmap.h" + +#include "llviewertexturelist.h" +#include "math.h" // log() + +// Turn this on to output tile stats in the standard output +#define DEBUG_TILES_STAT 0 + +LLWorldMipmap::LLWorldMipmap() : + mCurrentLevel(0) +{ +} + +LLWorldMipmap::~LLWorldMipmap() +{ + reset(); +} + +// Delete all sublevel maps and clean them +void LLWorldMipmap::reset() +{ + for (int level = 0; level < MAP_LEVELS; level++) + { + mWorldObjectsMipMap[level].clear(); + } +} + +// This method should be called before each use of the mipmap (typically, before each draw), so that to let +// the boost level of unused tiles to drop to 0 (BOOST_NONE). +// Tiles that are accessed have had their boost level pushed to BOOST_MAP_VISIBLE so we can identify them. +// The result of this strategy is that if a tile is not used during 2 consecutive loops, its boost level drops to 0. +void LLWorldMipmap::equalizeBoostLevels() +{ +#if DEBUG_TILES_STAT + S32 nb_missing = 0; + S32 nb_tiles = 0; + S32 nb_visible = 0; +#endif // DEBUG_TILES_STAT + // For each level + for (S32 level = 0; level < MAP_LEVELS; level++) + { + sublevel_tiles_t& level_mipmap = mWorldObjectsMipMap[level]; + // For each tile + for (sublevel_tiles_t::iterator iter = level_mipmap.begin(); iter != level_mipmap.end(); iter++) + { + LLPointer<LLViewerFetchedTexture> img = iter->second; + S32 current_boost_level = img->getBoostLevel(); + if (current_boost_level == LLViewerTexture::BOOST_MAP_VISIBLE) + { + // If level was BOOST_MAP_VISIBLE, the tile has been used in the last draw so keep it high + img->setBoostLevel(LLViewerTexture::BOOST_MAP); + } + else + { + // If level was BOOST_MAP only (or anything else...), the tile wasn't used in the last draw + // so we drop its boost level to BOOST_NONE. + img->setBoostLevel(LLViewerTexture::BOOST_NONE); + } +#if DEBUG_TILES_STAT + // Increment some stats if compile option on + nb_tiles++; + if (current_boost_level == LLViewerTexture::BOOST_MAP_VISIBLE) + { + nb_visible++; + } + if (img->isMissingAsset()) + { + nb_missing++; + } +#endif // DEBUG_TILES_STAT + } + } +#if DEBUG_TILES_STAT + LL_INFOS("World Map") << "LLWorldMipmap tile stats : total requested = " << nb_tiles << ", visible = " << nb_visible << ", missing = " << nb_missing << LL_ENDL; +#endif // DEBUG_TILES_STAT +} + +// This method should be used when the mipmap is not actively used for a while, e.g., the map UI is hidden +void LLWorldMipmap::dropBoostLevels() +{ + // For each level + for (S32 level = 0; level < MAP_LEVELS; level++) + { + sublevel_tiles_t& level_mipmap = mWorldObjectsMipMap[level]; + // For each tile + for (sublevel_tiles_t::iterator iter = level_mipmap.begin(); iter != level_mipmap.end(); iter++) + { + LLPointer<LLViewerFetchedTexture> img = iter->second; + img->setBoostLevel(LLViewerTexture::BOOST_NONE); + } + } +} + +LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S32 level, bool load) +{ + // Check the input data + llassert(level <= MAP_LEVELS); + llassert(level >= 1); + + // If the *loading* level changed, cleared the new level from "missed" tiles + // so that we get a chance to reload them + if (load && (level != mCurrentLevel)) + { + cleanMissedTilesFromLevel(level); + mCurrentLevel = level; + } + + // Build the region handle + U64 handle = convertGridToHandle(grid_x, grid_y); + + // Check if the image is around already + sublevel_tiles_t& level_mipmap = mWorldObjectsMipMap[level-1]; + sublevel_tiles_t::iterator found = level_mipmap.find(handle); + + // If not there and load on, go load it + if (found == level_mipmap.end()) + { + if (load) + { + // Load it + LLPointer<LLViewerFetchedTexture> img = loadObjectsTile(grid_x, grid_y, level); + // Insert the image in the map + level_mipmap.insert(sublevel_tiles_t::value_type( handle, img )); + // Find the element again in the map (it's there now...) + found = level_mipmap.find(handle); + } + else + { + // Return with NULL if not found and we're not trying to load + return NULL; + } + } + + // Get the image pointer and check if this asset is missing + LLPointer<LLViewerFetchedTexture> img = found->second; + if (img->isMissingAsset()) + { + // Return NULL if asset missing + return NULL; + } + else + { + // Boost the tile level so to mark it's in use *if* load on + if (load) + { + img->setBoostLevel(LLViewerTexture::BOOST_MAP_VISIBLE); + } + return img; + } +} + +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/%d/%05d/%05d/map-%d-%d-%d-objects.jpg", + std::string imageurl = llformat("http://map.secondlife.com.s3.amazonaws.com/map-%d-%d-%d-objects.jpg", + level, grid_x, grid_y, level, grid_x, grid_y); + + // DO NOT COMMIT!! DEBUG ONLY!!! + // Use a local jpeg for every tile to test map speed without S3 access + //imageurl = "file://C:\\Develop\\mapserver-distribute-3\\indra\\build-vc80\\mapserver\\relwithdebinfo\\regions\\00995\\01001\\region-995-1001-prims.jpg"; + // END DEBUG + //LL_INFOS("World Map") << "LLWorldMipmap::loadObjectsTile(), URL = " << imageurl << LL_ENDL; + + LLPointer<LLViewerFetchedTexture> img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + img->setBoostLevel(LLViewerTexture::BOOST_MAP); + + // Return the smart pointer + return img; +} + +// This method is used to clean up a level from tiles marked as "missing". +// The idea is to allow tiles that have been improperly marked missing to be reloaded when retraversing the level again. +// When zooming in and out rapidly, some tiles are never properly loaded and, eventually marked missing. +// This creates "blue" areas in a subresolution that never got a chance to reload if we don't clean up the level. +void LLWorldMipmap::cleanMissedTilesFromLevel(S32 level) +{ + // Check the input data + llassert(level <= MAP_LEVELS); + llassert(level >= 0); + + // This happens when the object is first initialized + if (level == 0) + { + return; + } + + // Iterate through the subresolution level and suppress the tiles that are marked as missing + // Note: erasing in a map while iterating through it is bug prone. Using a postfix increment is mandatory here. + sublevel_tiles_t& level_mipmap = mWorldObjectsMipMap[level-1]; + sublevel_tiles_t::iterator it = level_mipmap.begin(); + while (it != level_mipmap.end()) + { + LLPointer<LLViewerFetchedTexture> img = it->second; + if (img->isMissingAsset()) + { + level_mipmap.erase(it++); + } + else + { + ++it; + } + } + return; +} + +// static methods +// Compute the level in the world mipmap (between 1 and MAP_LEVELS, as in the URL) given the scale (size of a sim in screen pixels) +S32 LLWorldMipmap::scaleToLevel(F32 scale) +{ + // If scale really small, picks up the higest level there is (lowest resolution) + if (scale <= F32_MIN) + return MAP_LEVELS; + // Compute the power of two resolution level knowing the base level + S32 level = llfloor((log(REGION_WIDTH_METERS/scale)/log(2.0f)) + 1.0f); + // Check bounds and return the value + if (level > MAP_LEVELS) + return MAP_LEVELS; + else if (level < 1) + return 1; + else + return level; +} + +// Convert world coordinates to mipmap grid coordinates at a given level (between 1 and MAP_LEVELS) +void LLWorldMipmap::globalToMipmap(F64 global_x, F64 global_y, S32 level, U32* grid_x, U32* grid_y) +{ + // Check the input data + llassert(level <= MAP_LEVELS); + llassert(level >= 1); + + // Convert world coordinates into grid coordinates + *grid_x = lltrunc(global_x/REGION_WIDTH_METERS); + *grid_y = lltrunc(global_y/REGION_WIDTH_METERS); + // Compute the valid grid coordinates at that level of the mipmap + S32 regions_in_tile = 1 << (level - 1); + *grid_x = *grid_x - (*grid_x % regions_in_tile); + *grid_y = *grid_y - (*grid_y % regions_in_tile); +} + + diff --git a/indra/newview/llworldmipmap.h b/indra/newview/llworldmipmap.h new file mode 100644 index 0000000000..ecf1003468 --- /dev/null +++ b/indra/newview/llworldmipmap.h @@ -0,0 +1,100 @@ +/** + * @file llworldmipmap.h + * @brief Data storage for the S3 mipmap of the entire world. + * + * $LicenseInfo:firstyear=2003&license=viewergpl$ + * + * Copyright (c) 2003-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_LLWORLDMIPMAP_H +#define LL_LLWORLDMIPMAP_H + +#include <map> + +#include "llmemory.h" // LLPointer +#include "indra_constants.h" // REGION_WIDTH_UNITS +#include "llregionhandle.h" // to_region_handle() + +class LLViewerFetchedTexture; + +// LLWorldMipmap : Mipmap handling of all the tiles used to render the world at any resolution. +// This class provides a clean structured access to the hierarchy of tiles stored in the +// Amazon S3 repository and abstracts its directory/file structure. +// The interface of this class though still assumes that the caller knows the general level/tiles +// structure (at least, that it exists...) but doesn't requite the caller to know the details of it. +// IOW, you need to know that rendering levels exists as well as grid coordinates for regions, +// but you can ignore where those tiles are located, how to get them, etc... +// The class API gives you back LLPointer<LLViewerFetchedTexture> per tile. + +// See llworldmipmapview.cpp for the implementation of a class who knows how to render an LLWorldMipmap. + +// Implementation notes: +// - On the S3 servers, the tiles are rendered in 2 flavors: Objects and Terrain. +// - For the moment, LLWorldMipmap implements access only to the Objects tiles. +class LLWorldMipmap +{ +public: + // Parameters of the mipmap + static const S32 MAP_LEVELS = 8; // Number of subresolution levels computed by the mapserver + static const S32 MAP_TILE_SIZE = 256; // Width in pixels of the tiles computed by the mapserver + + LLWorldMipmap(); + ~LLWorldMipmap(); + + // Clear up the maps and release all image handles + void reset(); + // Manage the boost levels between loops (typically draw() loops) + void equalizeBoostLevels(); + // Drop the boost levels to none (used when hiding the map) + void dropBoostLevels(); + // Get the tile smart pointer, does the loading if necessary + LLPointer<LLViewerFetchedTexture> getObjectsTile(U32 grid_x, U32 grid_y, S32 level, bool load = true); + + // Helper functions: those are here as they depend solely on the topology of the mipmap though they don't access it + // Convert sim scale (given in sim width in display pixels) into a mipmap level + static S32 scaleToLevel(F32 scale); + // Convert world coordinates to mipmap grid coordinates at a given level + static void globalToMipmap(F64 global_x, F64 global_y, S32 level, U32* grid_x, U32* grid_y); + +private: + // Get a handle (key) from grid coordinates + U64 convertGridToHandle(U32 grid_x, U32 grid_y) { return to_region_handle(grid_x * REGION_WIDTH_UNITS, grid_y * REGION_WIDTH_UNITS); } + // Load the relevant tile from S3 + LLPointer<LLViewerFetchedTexture> loadObjectsTile(U32 grid_x, U32 grid_y, S32 level); + // Clear a level from its "missing" tiles + void cleanMissedTilesFromLevel(S32 level); + + // The mipmap is organized by resolution level (MAP_LEVELS of them). Each resolution level is an std::map + // using a region_handle as a key and storing a smart pointer to the image as a value. + typedef std::map<U64, LLPointer<LLViewerFetchedTexture> > sublevel_tiles_t; + sublevel_tiles_t mWorldObjectsMipMap[MAP_LEVELS]; +// sublevel_tiles_t mWorldTerrainMipMap[MAP_LEVELS]; + + S32 mCurrentLevel; // The level last accessed by a getObjectsTile() +}; + +#endif // LL_LLWORLDMIPMAP_H diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 0dc1a88ee8..2daaf77772 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1464,6 +1464,7 @@ F32 LLPipeline::calcPixelArea(LLVector3 center, LLVector3 size, LLCamera &camera F32 dist = lookAt.length(); //ramp down distance for nearby objects + //shrink dist by dist/16. if (dist < 16.f) { dist /= 16.f; @@ -1474,7 +1475,7 @@ F32 LLPipeline::calcPixelArea(LLVector3 center, LLVector3 size, LLCamera &camera //get area of circle around node F32 app_angle = atanf(size.length()/dist); F32 radius = app_angle*LLDrawable::sCurPixelAngle; - return radius*radius * 3.14159f; + return radius*radius * F_PI; } void LLPipeline::grabReferences(LLCullResult& result) @@ -3002,15 +3003,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) LLAppViewer::instance()->pingMainloopTimeout("Pipeline:ForceVBO"); - //by bao - //fake vertex buffer updating - //to guaranttee at least updating one VBO buffer every frame - //to walk around the bug caused by ATI card --> DEV-3855 - // - if(forceVBOUpdate) - gSky.mVOSkyp->updateDummyVertexBuffer() ; - - // Initialize lots of GL state to "safe" values glMatrixMode(GL_TEXTURE); glLoadIdentity(); diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 1e0da13162..572a4cf9e9 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -651,7 +651,7 @@ value="0 0 0 .33" /> <color name="TimeTextColor" - reference="LtGray_50" /> + reference="LtGray" /> <color name="TitleBarFocusColor" reference="White_10" /> diff --git a/indra/newview/skins/default/textures/Blank.png b/indra/newview/skins/default/textures/Blank.png Binary files differnew file mode 100644 index 0000000000..f38e9f9100 --- /dev/null +++ b/indra/newview/skins/default/textures/Blank.png diff --git a/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png b/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png Binary files differnew file mode 100644 index 0000000000..98f1f04b9a --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png diff --git a/indra/newview/skins/default/textures/default_profile_picture.j2c b/indra/newview/skins/default/textures/default_profile_picture.j2c Binary files differindex c53a22e816..f21742cf09 100644 --- a/indra/newview/skins/default/textures/default_profile_picture.j2c +++ b/indra/newview/skins/default/textures/default_profile_picture.j2c diff --git a/indra/newview/skins/default/textures/icons/Inv_Alpha.png b/indra/newview/skins/default/textures/icons/Inv_Alpha.png Binary files differnew file mode 100644 index 0000000000..e8d246c6fa --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Inv_Alpha.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Tattoo.png b/indra/newview/skins/default/textures/icons/Inv_Tattoo.png Binary files differnew file mode 100644 index 0000000000..e8d246c6fa --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Inv_Tattoo.png diff --git a/indra/newview/skins/default/textures/inv_folder_inbox.tga b/indra/newview/skins/default/textures/inv_folder_inbox.tga Binary files differnew file mode 100644 index 0000000000..04539c2cc4 --- /dev/null +++ b/indra/newview/skins/default/textures/inv_folder_inbox.tga diff --git a/indra/newview/skins/default/textures/map_avatar_32.tga b/indra/newview/skins/default/textures/map_avatar_32.tga Binary files differnew file mode 100644 index 0000000000..aebeab4093 --- /dev/null +++ b/indra/newview/skins/default/textures/map_avatar_32.tga diff --git a/indra/newview/skins/default/textures/map_avatar_above_32.tga b/indra/newview/skins/default/textures/map_avatar_above_32.tga Binary files differnew file mode 100644 index 0000000000..65bd0561a7 --- /dev/null +++ b/indra/newview/skins/default/textures/map_avatar_above_32.tga diff --git a/indra/newview/skins/default/textures/map_avatar_below_32.tga b/indra/newview/skins/default/textures/map_avatar_below_32.tga Binary files differnew file mode 100644 index 0000000000..496c44b369 --- /dev/null +++ b/indra/newview/skins/default/textures/map_avatar_below_32.tga diff --git a/indra/newview/skins/default/textures/map_avatar_you_32.tga b/indra/newview/skins/default/textures/map_avatar_you_32.tga Binary files differnew file mode 100644 index 0000000000..782207efd6 --- /dev/null +++ b/indra/newview/skins/default/textures/map_avatar_you_32.tga diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Link_Over.png b/indra/newview/skins/default/textures/navbar/Favorite_Link_Over.png Binary files differnew file mode 100644 index 0000000000..d4f126f969 --- /dev/null +++ b/indra/newview/skins/default/textures/navbar/Favorite_Link_Over.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 4aafe462b7..7f33330123 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -27,6 +27,8 @@ <texture name="BackArrow_Off" file_name="icons/BackArrow_Off.png" preload="false" /> <texture name="BackArrow_Press" file_name="icons/BackArrow_Press.png" preload="false" /> + <texture name="Blank" file_name="Blank.png" preload="false" /> + <texture name="BottomTray_BG" file_name="bottomtray/BottomTray_BG.png" preload="false" /> <texture name="BuyArrow_Off" file_name="navbar/BuyArrow_Off.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> @@ -67,7 +69,9 @@ <texture name="ComboButton_Over" file_name="widgets/ComboButton_Over.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_Press" file_name="widgets/ComboButton_Press.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_Selected" file_name="widgets/ComboButton_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="ComboButton_UpSelected" file_name="widgets/ComboButton_UpSelected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_Off" file_name="widgets/ComboButton_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="ComboButton_UpOff" file_name="widgets/ComboButton_UpOff.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="Container" file_name="containers/Container.png" preload="false" /> <texture name="DisclosureArrow_Closed_Off" file_name="widgets/DisclosureArrow_Closed_Off.png" preload="true" /> @@ -89,6 +93,7 @@ <texture name="Favorite_Star_Off" file_name="navbar/Favorite_Star_Off.png" preload="false" /> <texture name="Favorite_Star_Press" file_name="navbar/Favorite_Star_Press.png" preload="false" /> <texture name="Favorite_Star_Over" file_name="navbar/Favorite_Star_Over.png" preload="false" /> + <texture name="Favorite_Link_Over" file_name="navbar/Favorite_Link_Over.png" preload="false" /> <texture name="FileMenu_BarSelect" file_name="navbar/FileMenu_BarSelect.png" preload="false" scale.left="2" scale.top="0" scale.right="2" scale.bottom="0" /> <texture name="FileMenu_BG" file_name="navbar/FileMenu_BG.png" preload="false" /> @@ -233,6 +238,8 @@ <texture name="NearbyVoice_Lvl3" file_name="bottomtray/NearbyVoice_Lvl3.png" preload="false" /> <texture name="NearbyVoice_On" file_name="bottomtray/NearbyVoice_On.png" preload="false" /> + <texture name="Notices_Unread" file_name="bottomtray/Notices_Unread.png" preload="true" /> + <texture name="Object_Cone" file_name="build/Object_Cone.png" preload="false" /> <texture name="Object_Cube" file_name="build/Object_Cube.png" preload="false" /> <texture name="Object_Cylinder" file_name="build/Object_Cylinder.png" preload="false" /> diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png b/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png Binary files differnew file mode 100644 index 0000000000..2330cb420b --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png b/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png Binary files differnew file mode 100644 index 0000000000..b7b5c2e1d4 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml index 81d4d3fdfd..f0c9c45d04 100644 --- a/indra/newview/skins/default/xui/da/floater_about.xml +++ b/indra/newview/skins/default/xui/da/floater_about.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_about" title="Om [APP_NAME]"> +<floater name="floater_about" title="OM [APP_NAME]"> <tab_container name="about_tab"> <panel name="credits_panel"> <text_editor name="credits_editor"> diff --git a/indra/newview/skins/default/xui/da/floater_about_land.xml b/indra/newview/skins/default/xui/da/floater_about_land.xml index c4cf722159..cb5d618dde 100644 --- a/indra/newview/skins/default/xui/da/floater_about_land.xml +++ b/indra/newview/skins/default/xui/da/floater_about_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterland" title="Om land"> +<floater name="floaterland" title="OM LAND"> <tab_container name="landtab"> <panel label="Generelt" name="land_general_panel"> <text name="Name:"> diff --git a/indra/newview/skins/default/xui/da/floater_auction.xml b/indra/newview/skins/default/xui/da/floater_auction.xml index f981242f8a..8f793557be 100644 --- a/indra/newview/skins/default/xui/da/floater_auction.xml +++ b/indra/newview/skins/default/xui/da/floater_auction.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_auction" title="Start Linden land salg"> +<floater name="floater_auction" title="START LINDEN LAND SALG"> <check_box label="Vis også gul aftegning af område" name="fence_check" /> <button label="Foto" label_selected="Foto" name="snapshot_btn" /> <button label="OK" label_selected="OK" name="ok_btn" /> diff --git a/indra/newview/skins/default/xui/da/floater_avatar_picker.xml b/indra/newview/skins/default/xui/da/floater_avatar_picker.xml index f93f0a3525..0ddb6e9dbe 100644 --- a/indra/newview/skins/default/xui/da/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/da/floater_avatar_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatarpicker" title="Vælg beboer"> +<floater name="avatarpicker" title="VÆLG BEBOER"> <tab_container name="ResidentChooserTabs"> <panel label="Søg" name="SearchPanel"> <text name="InstructSearchResidentName"> diff --git a/indra/newview/skins/default/xui/da/floater_avatar_textures.xml b/indra/newview/skins/default/xui/da/floater_avatar_textures.xml index e3a736b200..27bfa367f6 100644 --- a/indra/newview/skins/default/xui/da/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/da/floater_avatar_textures.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="avatar_texture_debug" title="Avatar teksturer"> +<floater name="avatar_texture_debug" title="AVATAR TEKSTURER"> <text name="baked_label"> Faste teksturer </text> diff --git a/indra/newview/skins/default/xui/da/floater_beacons.xml b/indra/newview/skins/default/xui/da/floater_beacons.xml index 318a23df4c..18bc7aeb31 100644 --- a/indra/newview/skins/default/xui/da/floater_beacons.xml +++ b/indra/newview/skins/default/xui/da/floater_beacons.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="beacons" title="Pejlelys"> +<floater name="beacons" title="PEJLELYS"> <panel name="beacons_panel"> <check_box label="Kun scriptede objekter med "rør"" name="touch_only" /> <check_box label="Scriptede objekter" name="scripted" /> diff --git a/indra/newview/skins/default/xui/da/floater_build_options.xml b/indra/newview/skins/default/xui/da/floater_build_options.xml index 3b3e14ad64..7eb0d4c035 100644 --- a/indra/newview/skins/default/xui/da/floater_build_options.xml +++ b/indra/newview/skins/default/xui/da/floater_build_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="build options floater" title="Gitter indstillinger"> +<floater name="build options floater" title="GITTER INDSTILLINGER"> <spinner label="Gitter enhed (meter)" name="GridResolution" width="200" label_width="136"/> <spinner label="Gitter rækkevidde (meter)" name="GridDrawSize" width="200" label_width="136"/> <check_box label="Aktiver låsning til under-enheder" name="GridSubUnit" /> diff --git a/indra/newview/skins/default/xui/da/floater_bulk_perms.xml b/indra/newview/skins/default/xui/da/floater_bulk_perms.xml index 77ae7fe060..9cf44d6479 100644 --- a/indra/newview/skins/default/xui/da/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/da/floater_bulk_perms.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterbulkperms" title="Masse-ændring af rettigheder på indhold"> +<floater name="floaterbulkperms" title="MASSE-ÆNDRING AF RETTIGHEDER PÅ INDHOLD"> <text name="applyto"> Indholdstyper </text> diff --git a/indra/newview/skins/default/xui/da/floater_bumps.xml b/indra/newview/skins/default/xui/da/floater_bumps.xml index 62a1cd9e5c..704e6c3608 100644 --- a/indra/newview/skins/default/xui/da/floater_bumps.xml +++ b/indra/newview/skins/default/xui/da/floater_bumps.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_bumps" title="Bump, skub & slag"> +<floater name="floater_bumps" title="BUMP, SKUB & SLAG"> <string name="none_detected"> Ingen registreret </string> diff --git a/indra/newview/skins/default/xui/da/floater_buy_contents.xml b/indra/newview/skins/default/xui/da/floater_buy_contents.xml index c9df548747..8dccf32304 100644 --- a/indra/newview/skins/default/xui/da/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/da/floater_buy_contents.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_buy_contents" title="Køb indhold"> +<floater name="floater_buy_contents" title="KØB INDHOLD"> <text name="contains_text"> [NAME] indeholder: </text> diff --git a/indra/newview/skins/default/xui/da/floater_buy_currency.xml b/indra/newview/skins/default/xui/da/floater_buy_currency.xml index 1c5876572b..a2b6dec91c 100644 --- a/indra/newview/skins/default/xui/da/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/da/floater_buy_currency.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="buy currency" title="Køb valuta"> +<floater name="buy currency" title="KØB VALUTA"> <text name="info_buying"> Køber valuta: </text> diff --git a/indra/newview/skins/default/xui/da/floater_buy_land.xml b/indra/newview/skins/default/xui/da/floater_buy_land.xml index 1d42ffb45a..71e6eaa7f7 100644 --- a/indra/newview/skins/default/xui/da/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/da/floater_buy_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy land" title="Køb land"> +<floater name="buy land" title="KØB LAND"> <text name="region_name_label"> Region: </text> diff --git a/indra/newview/skins/default/xui/da/floater_buy_object.xml b/indra/newview/skins/default/xui/da/floater_buy_object.xml index f0e22c8eee..266753902b 100644 --- a/indra/newview/skins/default/xui/da/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/da/floater_buy_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="contents" title="Køb kopi af objekt"> +<floater name="contents" title="KØB KOPI AF OBJEKT"> <text name="contents_text"> og dets indhold: </text> diff --git a/indra/newview/skins/default/xui/da/floater_choose_group.xml b/indra/newview/skins/default/xui/da/floater_choose_group.xml index 01c5bf3367..9f02f281db 100644 --- a/indra/newview/skins/default/xui/da/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/da/floater_choose_group.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="groups" title="Grupper"> +<floater name="groups" title="GRUPPER"> <text name="groupdesc"> Vælg en gruppe: </text> diff --git a/indra/newview/skins/default/xui/da/floater_color_picker.xml b/indra/newview/skins/default/xui/da/floater_color_picker.xml index c8e1fc813b..d0a47b76e0 100644 --- a/indra/newview/skins/default/xui/da/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/da/floater_color_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="ColorPicker" title="Farve vælger"> +<floater name="ColorPicker" title="FARVE VÆLGER"> <text name="r_val_text"> Rød: </text> diff --git a/indra/newview/skins/default/xui/da/floater_customize.xml b/indra/newview/skins/default/xui/da/floater_customize.xml index b434bea1ce..b2409f1682 100644 --- a/indra/newview/skins/default/xui/da/floater_customize.xml +++ b/indra/newview/skins/default/xui/da/floater_customize.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="Appearance" width="509"> +<floater name="floater customize" title="APPEARANCE" width="509"> <tab_container name="customize tab container" width="507"> <placeholder label="Krops Dele" name="body_parts_placeholder"/> <panel label="Kropsbygning" name="Shape"> 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 0ca7874c37..94cf4546e3 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,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Day Cycle Floater" title="Dag cyklus opsætning"> +<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" /> diff --git a/indra/newview/skins/default/xui/da/floater_device_settings.xml b/indra/newview/skins/default/xui/da/floater_device_settings.xml index 28afd7c459..5e53a697f2 100644 --- a/indra/newview/skins/default/xui/da/floater_device_settings.xml +++ b/indra/newview/skins/default/xui/da/floater_device_settings.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_device_settings" title="Stemme chat indstillinger" /> +<floater name="floater_device_settings" title="STEMME CHAT INDSTILLINGER" /> diff --git a/indra/newview/skins/default/xui/da/floater_env_settings.xml b/indra/newview/skins/default/xui/da/floater_env_settings.xml index 907771c67a..6c5b6d3b6b 100644 --- a/indra/newview/skins/default/xui/da/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/da/floater_env_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Environment Editor Floater" title="Redigering af omgivelser"> +<floater name="Environment Editor Floater" title="REDIGERING AF OMGIVELSER"> <text name="EnvTimeText"> Tid på dagen </text> diff --git a/indra/newview/skins/default/xui/da/floater_font_test.xml b/indra/newview/skins/default/xui/da/floater_font_test.xml index 7d8ef1b310..591d07188c 100644 --- a/indra/newview/skins/default/xui/da/floater_font_test.xml +++ b/indra/newview/skins/default/xui/da/floater_font_test.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Font test"> +<floater name="contents" title="FONT TEST"> <text name="linea"> OverrideTest, skal vises her som fonten 'Times'. (Fra default/xui/en-us) </text> diff --git a/indra/newview/skins/default/xui/da/floater_gesture.xml b/indra/newview/skins/default/xui/da/floater_gesture.xml index 800693ea8c..11ecc8bd9a 100644 --- a/indra/newview/skins/default/xui/da/floater_gesture.xml +++ b/indra/newview/skins/default/xui/da/floater_gesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="gestures" title="Aktive bevægelser"> +<floater name="gestures" title="AKTIVE BEVÆGELSER"> <text name="help_label"> Dobbelt-klik på en bevægelse for at afspille animation og lyd. </text> diff --git a/indra/newview/skins/default/xui/da/floater_hardware_settings.xml b/indra/newview/skins/default/xui/da/floater_hardware_settings.xml index dcc1b8d2e8..fc1231ceef 100644 --- a/indra/newview/skins/default/xui/da/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/da/floater_hardware_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Hardware Settings Floater" title="Hardware opsætning"> +<floater name="Hardware Settings Floater" title="HARDWARE OPSÆTNING"> <text name="Filtering:"> Filtrering: </text> diff --git a/indra/newview/skins/default/xui/da/floater_hud.xml b/indra/newview/skins/default/xui/da/floater_hud.xml index 0f11e2346d..18584e57ca 100644 --- a/indra/newview/skins/default/xui/da/floater_hud.xml +++ b/indra/newview/skins/default/xui/da/floater_hud.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_hud" title="Tutorial" /> +<floater name="floater_hud" title="TUTORIAL" /> diff --git a/indra/newview/skins/default/xui/da/floater_inspect.xml b/indra/newview/skins/default/xui/da/floater_inspect.xml index 56c3f6f784..0610e9408f 100644 --- a/indra/newview/skins/default/xui/da/floater_inspect.xml +++ b/indra/newview/skins/default/xui/da/floater_inspect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="inspect" title="Inspecér objekter"> +<floater name="inspect" title="INSPECÉR OBJEKTER"> <scroll_list name="object_list" tool_tip="Vælg et objekt fra listen for at markere det"> <column label="Objekt navn" name="object_name"/> <column label="Objekt ejer" name="owner_name"/> diff --git a/indra/newview/skins/default/xui/da/floater_inventory.xml b/indra/newview/skins/default/xui/da/floater_inventory.xml index 0b931bd7f4..8bfe7164d0 100644 --- a/indra/newview/skins/default/xui/da/floater_inventory.xml +++ b/indra/newview/skins/default/xui/da/floater_inventory.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Inventory" title="Beholdning"> +<floater name="Inventory" title="BEHOLDNING"> <search_editor label="Skriv her for at søge" name="inventory search editor" /> <tab_container name="inventory filter tabs"> <inventory_panel label="Alle ting" name="All Items" /> diff --git a/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml index 9f28440fb0..fbcf202c54 100644 --- a/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="item properties" title="Egenskaber for Objekt i Beholdning"> +<floater name="item properties" title="EGENSKABER FOR OBJEKT I BEHOLDNING"> <text name="LabelItemNameTitle"> Navn: </text> diff --git a/indra/newview/skins/default/xui/da/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/da/floater_inventory_view_finder.xml index 60a7d78aea..af2910fe58 100644 --- a/indra/newview/skins/default/xui/da/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/da/floater_inventory_view_finder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Inventory Finder" title="inventory_recent_items"> +<floater name="Inventory Finder" title="INVENTORY_RECENT_ITEMS"> <check_box label="Animation" name="check_animation" /> <check_box label="Visitkort" name="check_calling_card" /> <check_box label="Tøj" name="check_clothing" /> diff --git a/indra/newview/skins/default/xui/da/floater_joystick.xml b/indra/newview/skins/default/xui/da/floater_joystick.xml index 280650a04b..4954b7b619 100644 --- a/indra/newview/skins/default/xui/da/floater_joystick.xml +++ b/indra/newview/skins/default/xui/da/floater_joystick.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" title="Joystick opsætning"> +<floater name="Joystick" title="JOYSTICK OPSÆTNING"> <check_box name="enable_joystick" label="Aktiver Joystick:"/> <spinner label="X akse mapping" name="JoystickAxis1"/> <spinner label="Y akse mapping" name="JoystickAxis2"/> diff --git a/indra/newview/skins/default/xui/da/floater_lagmeter.xml b/indra/newview/skins/default/xui/da/floater_lagmeter.xml index 7e7c2dc0d3..bcf15ea926 100644 --- a/indra/newview/skins/default/xui/da/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/da/floater_lagmeter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_lagmeter" title="Lag måler"> +<floater name="floater_lagmeter" title="LAG MÅLER"> <button label="" label_selected="" name="client_lagmeter" tool_tip="Status for klient lag"/> <text name="client"> Klient: diff --git a/indra/newview/skins/default/xui/da/floater_land_holdings.xml b/indra/newview/skins/default/xui/da/floater_land_holdings.xml index bd623e7b75..39c906eb18 100644 --- a/indra/newview/skins/default/xui/da/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/da/floater_land_holdings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="land holdings floater" title="Mit land"> +<floater name="land holdings floater" title="MIT LAND"> <scroll_list name="parcel list"> <column label="Navn" name="name"/> <column label="Region" name="location"/> diff --git a/indra/newview/skins/default/xui/da/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/da/floater_live_lsleditor.xml index 112dc70e45..cfc5fb8860 100644 --- a/indra/newview/skins/default/xui/da/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/da/floater_live_lsleditor.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script ed float" title="Script: Nyt script"> +<floater name="script ed float" title="SCRIPT: NYT SCRIPT"> <button label="Nulstil" label_selected="Reset" name="Reset" /> <check_box label="Kører" name="running" /> <check_box label="Mono" name="mono" /> diff --git a/indra/newview/skins/default/xui/da/floater_lsl_guide.xml b/indra/newview/skins/default/xui/da/floater_lsl_guide.xml index d345409859..ebc86c5c73 100644 --- a/indra/newview/skins/default/xui/da/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/da/floater_lsl_guide.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script ed float" title="LSL Wiki"> +<floater name="script ed float" title="LSL WIKI"> <check_box label="Følg markøreren" name="lock_check" /> <combo_box label="Lås" name="history_combo" left_delta="114" width="70"/> <button label="Tilbage" name="back_btn" /> diff --git a/indra/newview/skins/default/xui/da/floater_media_browser.xml b/indra/newview/skins/default/xui/da/floater_media_browser.xml index 50004cfa0c..47667973ba 100644 --- a/indra/newview/skins/default/xui/da/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/da/floater_media_browser.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_about" title="Medie vælger"> +<floater name="floater_about" title="MEDIE VÆLGER"> <layout_stack name="stack1"> <layout_panel name="nav_controls"> <button label="Tilbage" name="back" /> diff --git a/indra/newview/skins/default/xui/da/floater_mem_leaking.xml b/indra/newview/skins/default/xui/da/floater_mem_leaking.xml index 6d5b5bc0ce..e7ad821d40 100644 --- a/indra/newview/skins/default/xui/da/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/da/floater_mem_leaking.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="MemLeak" title="Memory Leaking Simulation"> +<floater name="MemLeak" title="MEMORY LEAKING SIMULATION"> <spinner label="Leaking Speed (bytes per frame):" name="leak_speed" /> <spinner label="Max Leaked Memory (MB):" name="max_leak" /> <text name="total_leaked_label"> diff --git a/indra/newview/skins/default/xui/da/floater_mute_object.xml b/indra/newview/skins/default/xui/da/floater_mute_object.xml index e64557b177..4145918b49 100644 --- a/indra/newview/skins/default/xui/da/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/da/floater_mute_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="mute by name" title="Bloker objekt via navn"> +<floater name="mute by name" title="BLOKER OBJEKT VIA NAVN"> <text name="message"> Blokering via navn har ikke betydning for lyde. Du skal skrive det præcise navn på objektet. diff --git a/indra/newview/skins/default/xui/da/floater_my_friends.xml b/indra/newview/skins/default/xui/da/floater_my_friends.xml index 687266a08a..54b401076c 100644 --- a/indra/newview/skins/default/xui/da/floater_my_friends.xml +++ b/indra/newview/skins/default/xui/da/floater_my_friends.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_my_friends" title="Kontakter"> +<floater name="floater_my_friends" title="KONTAKTER"> <tab_container name="friends_and_groups"> <panel label="Venner" name="friends_panel" /> <panel label="Grupper" name="groups_panel" /> diff --git a/indra/newview/skins/default/xui/da/floater_openobject.xml b/indra/newview/skins/default/xui/da/floater_openobject.xml index d37e3177fa..5875b7a967 100644 --- a/indra/newview/skins/default/xui/da/floater_openobject.xml +++ b/indra/newview/skins/default/xui/da/floater_openobject.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="objectcontents" title="Objekt indhold"> +<floater name="objectcontents" title="OBJEKT INDHOLD"> <text name="object_name"> [DESC]: </text> diff --git a/indra/newview/skins/default/xui/da/floater_perm_prefs.xml b/indra/newview/skins/default/xui/da/floater_perm_prefs.xml index f4b9b0a664..69a8d3af94 100644 --- a/indra/newview/skins/default/xui/da/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/da/floater_perm_prefs.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="perm prefs" title="Standard tilladelser ved hentning"> +<floater name="perm prefs" title="STANDARD TILLADELSER VED HENTNING"> <panel label="Tilladelser" name="permissions"> <button label="?" label_selected="?" name="help"/> <check_box label="Del med gruppe" name="share_with_group"/> diff --git a/indra/newview/skins/default/xui/da/floater_postcard.xml b/indra/newview/skins/default/xui/da/floater_postcard.xml index 24d45062ae..cd61e7ac97 100644 --- a/indra/newview/skins/default/xui/da/floater_postcard.xml +++ b/indra/newview/skins/default/xui/da/floater_postcard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Postcard" title="E-mail billede"> +<floater name="Postcard" title="E-MAIL BILLEDE"> <text name="to_label"> Send til: </text> diff --git a/indra/newview/skins/default/xui/da/floater_preferences.xml b/indra/newview/skins/default/xui/da/floater_preferences.xml index 26e932e3cc..e251c9ad2c 100644 --- a/indra/newview/skins/default/xui/da/floater_preferences.xml +++ b/indra/newview/skins/default/xui/da/floater_preferences.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Preferences" title="Indstillinger"> +<floater name="Preferences" title="INDSTILLINGER"> <button label="OK" label_selected="OK" name="OK" /> <button label="Annullér" label_selected="Annullér" name="Cancel" /> <button label="Gem" label_selected="Gem" name="Apply" /> diff --git a/indra/newview/skins/default/xui/da/floater_preview_classified.xml b/indra/newview/skins/default/xui/da/floater_preview_classified.xml index 6cc4c139f1..cf2d14b80a 100644 --- a/indra/newview/skins/default/xui/da/floater_preview_classified.xml +++ b/indra/newview/skins/default/xui/da/floater_preview_classified.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="classified_preview" title="Annonce information" /> +<floater name="classified_preview" title="ANNONCE INFORMATION" /> diff --git a/indra/newview/skins/default/xui/da/floater_preview_event.xml b/indra/newview/skins/default/xui/da/floater_preview_event.xml index f1be35e1c3..584085fea0 100644 --- a/indra/newview/skins/default/xui/da/floater_preview_event.xml +++ b/indra/newview/skins/default/xui/da/floater_preview_event.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="event_preview" title="Event information" /> +<floater name="event_preview" title="EVENT INFORMATION" /> diff --git a/indra/newview/skins/default/xui/da/floater_preview_notecard.xml b/indra/newview/skins/default/xui/da/floater_preview_notecard.xml index 68d04d6f9b..7258824878 100644 --- a/indra/newview/skins/default/xui/da/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/da/floater_preview_notecard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="preview notecard" title="Note:"> +<floater name="preview notecard" title="NOTE:"> <button label="Gem" label_selected="Gem" name="Save"/> <text name="desc txt"> Beskrivelse: diff --git a/indra/newview/skins/default/xui/da/floater_region_info.xml b/indra/newview/skins/default/xui/da/floater_region_info.xml index 9f6e326cf3..5c95c8ed5e 100644 --- a/indra/newview/skins/default/xui/da/floater_region_info.xml +++ b/indra/newview/skins/default/xui/da/floater_region_info.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="regioninfo" title="Region/Estate" /> +<floater name="regioninfo" title="REGION/ESTATE" /> diff --git a/indra/newview/skins/default/xui/da/floater_report_abuse.xml b/indra/newview/skins/default/xui/da/floater_report_abuse.xml index 01f152c43a..6f1e2884eb 100644 --- a/indra/newview/skins/default/xui/da/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/da/floater_report_abuse.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_report_abuse" title="Rapportér misbrug"> +<floater name="floater_report_abuse" title="RAPPORTÉR MISBRUG"> <texture_picker label="" name="screenshot"/> <check_box label="Inkludér billede" name="screen_check"/> <text name="reporter_title"> diff --git a/indra/newview/skins/default/xui/da/floater_script_debug.xml b/indra/newview/skins/default/xui/da/floater_script_debug.xml index 17e14cd9b9..df60a2e23f 100644 --- a/indra/newview/skins/default/xui/da/floater_script_debug.xml +++ b/indra/newview/skins/default/xui/da/floater_script_debug.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <multi_floater name="script debug floater" title="Script advarsel/fejl"> <tab_container name="Preview Tabs"> - <floater label="Script" name="all_scripts" title="[All scripts]" /> + <floater label="Script" name="all_scripts" title="[ALL SCRIPTS]" /> </tab_container> </multi_floater> diff --git a/indra/newview/skins/default/xui/da/floater_script_preview.xml b/indra/newview/skins/default/xui/da/floater_script_preview.xml index 6990e8db0e..ede277bbd2 100644 --- a/indra/newview/skins/default/xui/da/floater_script_preview.xml +++ b/indra/newview/skins/default/xui/da/floater_script_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="preview lsl text" title="Script: Rotation Script"> +<floater name="preview lsl text" title="SCRIPT: ROTATION SCRIPT"> <text name="desc txt"> Beskrivelse: </text> diff --git a/indra/newview/skins/default/xui/da/floater_script_queue.xml b/indra/newview/skins/default/xui/da/floater_script_queue.xml index 47dbf534bd..3f54c92426 100644 --- a/indra/newview/skins/default/xui/da/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/da/floater_script_queue.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="queue" title="Nulstil forløb"> +<floater name="queue" title="NULSTIL FORLØB"> <button label="Luk" label_selected="Luk" name="close" /> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_script_search.xml b/indra/newview/skins/default/xui/da/floater_script_search.xml index d4dae8951f..62f311be6e 100644 --- a/indra/newview/skins/default/xui/da/floater_script_search.xml +++ b/indra/newview/skins/default/xui/da/floater_script_search.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script search" title="Script søgning"> +<floater name="script search" title="SCRIPT SØGNING"> <check_box label="Store/små bogstaver har ingen betydning" name="case_text" /> <button label="Søg" label_selected="Søg" name="search_btn" /> <button label="Erstat" label_selected="Erstat" name="replace_btn" /> diff --git a/indra/newview/skins/default/xui/da/floater_sell_land.xml b/indra/newview/skins/default/xui/da/floater_sell_land.xml index 87023b4f64..fcbe0abe08 100644 --- a/indra/newview/skins/default/xui/da/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/da/floater_sell_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="sell land" title="Sælg land"> +<floater name="sell land" title="SÆLG LAND"> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <text name="info_parcel_label"> diff --git a/indra/newview/skins/default/xui/da/floater_settings_debug.xml b/indra/newview/skins/default/xui/da/floater_settings_debug.xml index 60f99deae2..c1429ed3a3 100644 --- a/indra/newview/skins/default/xui/da/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/da/floater_settings_debug.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="settings_debug" title="Tekniske indstillinger"> +<floater name="settings_debug" title="TEKNISKE INDSTILLINGER"> <combo_box name="boolean_combo"> <combo_box.item name="TRUE" label="TRUE (Valgt)" /> <combo_box.item name="FALSE" label="FALSE (Fravalgt)" /> diff --git a/indra/newview/skins/default/xui/da/floater_snapshot.xml b/indra/newview/skins/default/xui/da/floater_snapshot.xml index d7a5179890..3eed869db4 100644 --- a/indra/newview/skins/default/xui/da/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/da/floater_snapshot.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="Se foto"> +<floater name="Snapshot" title="SE FOTO"> <text name="type_label"> Hvor skal foto hen? </text> diff --git a/indra/newview/skins/default/xui/da/floater_sound_preview.xml b/indra/newview/skins/default/xui/da/floater_sound_preview.xml index 606d290e1d..e54bdf4f42 100644 --- a/indra/newview/skins/default/xui/da/floater_sound_preview.xml +++ b/indra/newview/skins/default/xui/da/floater_sound_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Sound Preview" title="sound.wav"> +<floater name="Sound Preview" title="SOUND.WAV"> <text name="name_label"> Navn: </text> diff --git a/indra/newview/skins/default/xui/da/floater_statistics.xml b/indra/newview/skins/default/xui/da/floater_statistics.xml index 0443553d50..8c33f3ecb3 100644 --- a/indra/newview/skins/default/xui/da/floater_statistics.xml +++ b/indra/newview/skins/default/xui/da/floater_statistics.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="stats floater" title="Statistik"/> +<floater name="stats floater" title="STATISTIK"/> diff --git a/indra/newview/skins/default/xui/da/floater_telehub.xml b/indra/newview/skins/default/xui/da/floater_telehub.xml index cd1fb33831..bf31da9515 100644 --- a/indra/newview/skins/default/xui/da/floater_telehub.xml +++ b/indra/newview/skins/default/xui/da/floater_telehub.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="telehub" title="Telehub"> +<floater name="telehub" title="TELEHUB"> <text name="status_text_connected"> Telehub forbundet til objekt [OBJECT] </text> diff --git a/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml index c35e3aec4c..4167e2938a 100644 --- a/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="texture picker" title="Vælg: Tekstur"> +<floater name="texture picker" title="VÆLG: TEKSTUR"> <string name="choose_picture"> Klik for at vælge et billede </string> diff --git a/indra/newview/skins/default/xui/da/floater_tools.xml b/indra/newview/skins/default/xui/da/floater_tools.xml index e50494ff9e..c3287bac84 100644 --- a/indra/newview/skins/default/xui/da/floater_tools.xml +++ b/indra/newview/skins/default/xui/da/floater_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="toolbox floater" title="" short_title="Byg"> +<floater name="toolbox floater" title="" short_title="BYG"> <button label="" label_selected="" name="button focus" tool_tip="Fokus"/> <button label="" label_selected="" name="button move" tool_tip="Flyt"/> <button label="" label_selected="" name="button edit" tool_tip="Redigér"/> diff --git a/indra/newview/skins/default/xui/da/floater_top_objects.xml b/indra/newview/skins/default/xui/da/floater_top_objects.xml index dc4605cc12..0cfbe77def 100644 --- a/indra/newview/skins/default/xui/da/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/da/floater_top_objects.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="top_objects" title="Indlæser..."> +<floater name="top_objects" title="INDLÆSER..."> <text name="title_text"> Henter... </text> diff --git a/indra/newview/skins/default/xui/da/floater_water.xml b/indra/newview/skins/default/xui/da/floater_water.xml index 33a10579ab..63880b4a69 100644 --- a/indra/newview/skins/default/xui/da/floater_water.xml +++ b/indra/newview/skins/default/xui/da/floater_water.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Water Floater" title="Avanceret opsætning af vand"> +<floater name="Water Floater" title="AVANCERET OPSÆTNING AF VAND"> <text name="KeyFramePresetsText"> Vand opsætninger: </text> diff --git a/indra/newview/skins/default/xui/da/floater_windlight_options.xml b/indra/newview/skins/default/xui/da/floater_windlight_options.xml index 9754b1f074..4786609b53 100644 --- a/indra/newview/skins/default/xui/da/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/da/floater_windlight_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="WindLight floater" title="Avanceret opsætning for himmel"> +<floater name="WindLight floater" title="AVANCERET OPSÆTNING FOR HIMMEL"> <text name="KeyFramePresetsText"> Faste indstillinger: </text> diff --git a/indra/newview/skins/default/xui/da/floater_world_map.xml b/indra/newview/skins/default/xui/da/floater_world_map.xml index d4b58f6232..62930716ce 100644 --- a/indra/newview/skins/default/xui/da/floater_world_map.xml +++ b/indra/newview/skins/default/xui/da/floater_world_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="worldmap" title="Verdenskort"> +<floater name="worldmap" title="VERDENSKORT"> <tab_container name="maptab"> <panel label="Objekter" name="objects_mapview"/> <panel label="Terræn" name="terrain_mapview"/> diff --git a/indra/newview/skins/default/xui/de/floater_about.xml b/indra/newview/skins/default/xui/de/floater_about.xml index d36f5a43f6..6e51fe3e2d 100644 --- a/indra/newview/skins/default/xui/de/floater_about.xml +++ b/indra/newview/skins/default/xui/de/floater_about.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_about" title="Über [APP_NAME]"> +<floater name="floater_about" title="ÜBER [APP_NAME]"> <tab_container name="about_tab"> <panel name="credits_panel"> <text_editor name="credits_editor"> 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 853302d15c..ceb831c12d 100644 --- a/indra/newview/skins/default/xui/de/floater_about_land.xml +++ b/indra/newview/skins/default/xui/de/floater_about_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterland" title="Land-Info"> +<floater name="floaterland" title="LAND-INFO"> <tab_container name="landtab"> <panel label="Allgemein" name="land_general_panel"> <text name="Name:"> diff --git a/indra/newview/skins/default/xui/de/floater_auction.xml b/indra/newview/skins/default/xui/de/floater_auction.xml index 42f6a07dc3..9d0db766c9 100644 --- a/indra/newview/skins/default/xui/de/floater_auction.xml +++ b/indra/newview/skins/default/xui/de/floater_auction.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_auction" title="Linden-Landverkauf starten"> +<floater name="floater_auction" title="LINDEN-LANDVERKAUF STARTEN"> <check_box label="Gelben Auswahlrahmen einschließen" name="fence_check" /> <button label="Foto" label_selected="Foto" name="snapshot_btn" /> <button label="OK" label_selected="OK" name="ok_btn" /> diff --git a/indra/newview/skins/default/xui/de/floater_avatar_picker.xml b/indra/newview/skins/default/xui/de/floater_avatar_picker.xml index c546d91d72..e1ea792694 100644 --- a/indra/newview/skins/default/xui/de/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/de/floater_avatar_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatarpicker" title="Einwohner auswählen"> +<floater name="avatarpicker" title="EINWOHNER AUSWÄHLEN"> <tab_container name="ResidentChooserTabs"> <panel label="Suchen" name="SearchPanel"> <text name="InstructSearchResidentName"> diff --git a/indra/newview/skins/default/xui/de/floater_avatar_textures.xml b/indra/newview/skins/default/xui/de/floater_avatar_textures.xml index 823d6de78b..3072735c66 100644 --- a/indra/newview/skins/default/xui/de/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/de/floater_avatar_textures.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatar_texture_debug" title="Avatar-Texturen"> +<floater name="avatar_texture_debug" title="AVATAR-TEXTUREN"> <text name="label"> Gebackene Texturen </text> diff --git a/indra/newview/skins/default/xui/de/floater_beacons.xml b/indra/newview/skins/default/xui/de/floater_beacons.xml index 0992727e73..58e2e2681f 100644 --- a/indra/newview/skins/default/xui/de/floater_beacons.xml +++ b/indra/newview/skins/default/xui/de/floater_beacons.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="beacons" title="Beacons"> +<floater name="beacons" title="BEACONS"> <panel name="beacons_panel"> <check_box label="Auf Berührung beschränkte Skriptobjekte" name="touch_only"/> <check_box label="Skripting-Objekte" name="scripted"/> diff --git a/indra/newview/skins/default/xui/de/floater_build_options.xml b/indra/newview/skins/default/xui/de/floater_build_options.xml index de3617ed25..58f117f6b1 100644 --- a/indra/newview/skins/default/xui/de/floater_build_options.xml +++ b/indra/newview/skins/default/xui/de/floater_build_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="build options floater" title="Rasteroptionen"> +<floater name="build options floater" title="RASTEROPTIONEN"> <spinner label="Rastereinheit (Meter)" name="GridResolution" /> <spinner label="Rastergröße (Meter)" name="GridDrawSize" /> <check_box label="Einrasten von Untereinheiten aktivieren" name="GridSubUnit" /> diff --git a/indra/newview/skins/default/xui/de/floater_bulk_perms.xml b/indra/newview/skins/default/xui/de/floater_bulk_perms.xml index f058a0ed96..fff6aa4b73 100644 --- a/indra/newview/skins/default/xui/de/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/de/floater_bulk_perms.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterbulkperms" title="Mehrere Inhaltsberechtigungen ändern"> +<floater name="floaterbulkperms" title="MEHRERE INHALTSBERECHTIGUNGEN ÄNDERN"> <text name="applyto"> Inhaltsarten </text> diff --git a/indra/newview/skins/default/xui/de/floater_bumps.xml b/indra/newview/skins/default/xui/de/floater_bumps.xml index 7b21042c2b..b7909bf02d 100644 --- a/indra/newview/skins/default/xui/de/floater_bumps.xml +++ b/indra/newview/skins/default/xui/de/floater_bumps.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_bumps" title="Rempler, Stöße und Schläge"> +<floater name="floater_bumps" title="REMPLER, STÖßE UND SCHLÄGE"> <text name="none_detected"> Nicht erkannt </text> diff --git a/indra/newview/skins/default/xui/de/floater_buy_contents.xml b/indra/newview/skins/default/xui/de/floater_buy_contents.xml index 01858b3c36..47ea6a1bd4 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_contents.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_buy_contents" title="Inhalte kaufen" min_width="300"> +<floater name="floater_buy_contents" title="INHALTE KAUFEN" min_width="300"> <text name="contains_text"> [NAME] enthält: </text> 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 787f469854..05750a1782 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_currency.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="buy currency" title="Geld kaufen"> +<floater name="buy currency" title="GELD KAUFEN"> <text name="info_buying"> Kaufe Geld: </text> diff --git a/indra/newview/skins/default/xui/de/floater_buy_land.xml b/indra/newview/skins/default/xui/de/floater_buy_land.xml index e0abf8fae9..72a35db78c 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy land" title="Land kaufen"> +<floater name="buy land" title="LAND KAUFEN"> <text name="region_name_label"> Region: </text> diff --git a/indra/newview/skins/default/xui/de/floater_buy_object.xml b/indra/newview/skins/default/xui/de/floater_buy_object.xml index 3cfa59ff06..df6bf76240 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="contents" title="Objektkopie kaufen"> +<floater name="contents" title="OBJEKTKOPIE KAUFEN"> <text name="contents_text"> samt Inhalt: </text> diff --git a/indra/newview/skins/default/xui/de/floater_choose_group.xml b/indra/newview/skins/default/xui/de/floater_choose_group.xml index dd29aa7550..398645347b 100644 --- a/indra/newview/skins/default/xui/de/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/de/floater_choose_group.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="groups" title="Gruppen"> +<floater name="groups" title="GRUPPEN"> <text name="groupdesc"> Gruppe wählen: </text> 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 fa2f616249..47f256918a 100644 --- a/indra/newview/skins/default/xui/de/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/de/floater_color_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="ColorPicker" title="Farbauswahl"> +<floater name="ColorPicker" title="FARBAUSWAHL"> <text name="r_val_text"> Rot: </text> diff --git a/indra/newview/skins/default/xui/de/floater_customize.xml b/indra/newview/skins/default/xui/de/floater_customize.xml index 06b53dd8b4..f1ecd21c01 100644 --- a/indra/newview/skins/default/xui/de/floater_customize.xml +++ b/indra/newview/skins/default/xui/de/floater_customize.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="Aussehen"> +<floater name="floater customize" title="AUSSEHEN"> <tab_container name="customize tab container"> <placeholder label="Körperteile" name="body_parts_placeholder"/> <panel label="Form" name="Shape"> diff --git a/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml index d5a216a0b5..7f4dc4a79e 100644 --- a/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Day Cycle Floater" title="Tageszyklus-Editor"> +<floater name="Day Cycle Floater" title="TAGESZYKLUS-EDITOR"> <tab_container name="Day Cycle Tabs"> <panel label="Tageszyklus" name="Day Cycle"> <button label=" ?" name="WLDayCycleHelp" /> diff --git a/indra/newview/skins/default/xui/de/floater_device_settings.xml b/indra/newview/skins/default/xui/de/floater_device_settings.xml index 734f4e942c..9108f3c2e5 100644 --- a/indra/newview/skins/default/xui/de/floater_device_settings.xml +++ b/indra/newview/skins/default/xui/de/floater_device_settings.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_device_settings" title="Geräte-Einstellungen für Voice-Chat" /> +<floater name="floater_device_settings" title="GERÄTE-EINSTELLUNGEN FÜR VOICE-CHAT" /> diff --git a/indra/newview/skins/default/xui/de/floater_env_settings.xml b/indra/newview/skins/default/xui/de/floater_env_settings.xml index 3717ff6a48..c9afcc8471 100644 --- a/indra/newview/skins/default/xui/de/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/de/floater_env_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Environment Editor Floater" title="Umwelt-Editor"> +<floater name="Environment Editor Floater" title="UMWELT-EDITOR"> <text name="EnvTimeText"> Tageszeit </text> diff --git a/indra/newview/skins/default/xui/de/floater_font_test.xml b/indra/newview/skins/default/xui/de/floater_font_test.xml index 54278fc094..522d966431 100644 --- a/indra/newview/skins/default/xui/de/floater_font_test.xml +++ b/indra/newview/skins/default/xui/de/floater_font_test.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Schriftart-Test"> +<floater name="contents" title="SCHRIFTART-TEST"> <text name="linea"> OverrideTest, sollte hier als Times angezeigt werden. (Aus default/xui/en-us) </text> diff --git a/indra/newview/skins/default/xui/de/floater_gesture.xml b/indra/newview/skins/default/xui/de/floater_gesture.xml index bdee3b8664..aff0a9b92d 100644 --- a/indra/newview/skins/default/xui/de/floater_gesture.xml +++ b/indra/newview/skins/default/xui/de/floater_gesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="gestures" title="Aktive Gesten"> +<floater name="gestures" title="AKTIVE GESTEN"> <text name="help_label"> Doppelklicken Sie auf eine Geste, um Animationen und Sound abzuspielen. </text> diff --git a/indra/newview/skins/default/xui/de/floater_god_tools.xml b/indra/newview/skins/default/xui/de/floater_god_tools.xml index c7cfb5d9d3..f93a9b9476 100644 --- a/indra/newview/skins/default/xui/de/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_god_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="godtools floater" title="Gott-Werkzeuge"> +<floater name="godtools floater" title="GOTT-WERKZEUGE"> <tab_container name="GodTools Tabs"> <panel label="Raster" name="grid"> <button label="Alle Benutzer hinauswerfen" label_selected="Alle Benutzer hinauswerfen" 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 4051776b0d..68f7d6872e 100644 --- a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Hardware Settings Floater" title="Hardware-Einstellungen"> +<floater name="Hardware Settings Floater" title="HARDWARE-EINSTELLUNGEN"> <text name="Filtering:"> Filtern: </text> diff --git a/indra/newview/skins/default/xui/de/floater_hud.xml b/indra/newview/skins/default/xui/de/floater_hud.xml index 0f11e2346d..18584e57ca 100644 --- a/indra/newview/skins/default/xui/de/floater_hud.xml +++ b/indra/newview/skins/default/xui/de/floater_hud.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_hud" title="Tutorial" /> +<floater name="floater_hud" title="TUTORIAL" /> diff --git a/indra/newview/skins/default/xui/de/floater_inspect.xml b/indra/newview/skins/default/xui/de/floater_inspect.xml index f8c9b62824..f9421788bd 100644 --- a/indra/newview/skins/default/xui/de/floater_inspect.xml +++ b/indra/newview/skins/default/xui/de/floater_inspect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="inspect" title="Objekt prüfen" min_width="450" > +<floater name="inspect" title="OBJEKT PRÜFEN" min_width="450" > <scroll_list name="object_list" tool_tip="Wählen Sie ein Objekt aus dieser Liste, um es in der Second Life-Welt zu markieren"> <column label="Objektname" name="object_name" /> diff --git a/indra/newview/skins/default/xui/de/floater_inventory.xml b/indra/newview/skins/default/xui/de/floater_inventory.xml index c8c67240d8..6444e87882 100644 --- a/indra/newview/skins/default/xui/de/floater_inventory.xml +++ b/indra/newview/skins/default/xui/de/floater_inventory.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Inventory" title="Inventar"> +<floater name="Inventory" title="INVENTAR"> <search_editor label="Suchanfrage hier eintippen" name="inventory search editor" /> <tab_container name="inventory filter tabs"> <inventory_panel label="Alle Objekte" name="All Items" /> diff --git a/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml index 3e79a31abd..ef85efdae0 100644 --- a/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="item properties" title="Inventarobjekt-Eigenschaften"> +<floater name="item properties" title="INVENTAROBJEKT-EIGENSCHAFTEN"> <text name="LabelItemNameTitle"> Name: </text> diff --git a/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml index 2f2eb5aa8d..8dfffe06d1 100644 --- a/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Inventory Finder" title="inventar_letzte_objekte"> +<floater name="Inventory Finder" title="INVENTAR_LETZTE_OBJEKTE"> <check_box label="Animation" name="check_animation" /> <check_box label="Visitenkarten" name="check_calling_card" /> <check_box label="Kleidung" name="check_clothing" /> diff --git a/indra/newview/skins/default/xui/de/floater_joystick.xml b/indra/newview/skins/default/xui/de/floater_joystick.xml index ccf6f14ead..9507d063d1 100644 --- a/indra/newview/skins/default/xui/de/floater_joystick.xml +++ b/indra/newview/skins/default/xui/de/floater_joystick.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" title="Joystick-Konfiguration"> +<floater name="Joystick" title="JOYSTICK-KONFIGURATION"> <check_box name="enable_joystick" width="80" label="Joystick aktivieren:"/> <text left="140" name="joystick_type" width="360"/> <spinner label="X-Achse" name="JoystickAxis1"/> diff --git a/indra/newview/skins/default/xui/de/floater_lagmeter.xml b/indra/newview/skins/default/xui/de/floater_lagmeter.xml index 4dd9fd6c76..9468557fc4 100644 --- a/indra/newview/skins/default/xui/de/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/de/floater_lagmeter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_lagmeter" title="Lag-Anzeige"> +<floater name="floater_lagmeter" title="LAG-ANZEIGE"> <button name="client_lagmeter" tool_tip="Client-Lag-Status" /> <text name="client"> Client: diff --git a/indra/newview/skins/default/xui/de/floater_land_holdings.xml b/indra/newview/skins/default/xui/de/floater_land_holdings.xml index 6854903382..3975211117 100644 --- a/indra/newview/skins/default/xui/de/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/de/floater_land_holdings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="land holdings floater" title="Mein Land"> +<floater name="land holdings floater" title="MEIN LAND"> <scroll_list name="parcel list"> <column label="Parzellenname" name="name"/> <column label="Region" name="location"/> diff --git a/indra/newview/skins/default/xui/de/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/de/floater_live_lsleditor.xml index 8d499bc300..5afeb03395 100644 --- a/indra/newview/skins/default/xui/de/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/de/floater_live_lsleditor.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script ed float" title="Skript: Neues Skript"> +<floater name="script ed float" title="SKRIPT: NEUES SKRIPT"> <button label="Zurücksetzen" label_selected="Zurücksetzen" name="Reset" /> <check_box label="Läuft" name="running" /> <check_box label="Mono" name="mono" /> diff --git a/indra/newview/skins/default/xui/de/floater_lsl_guide.xml b/indra/newview/skins/default/xui/de/floater_lsl_guide.xml index d7f56b302d..dd6d559c40 100644 --- a/indra/newview/skins/default/xui/de/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/de/floater_lsl_guide.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script ed float" title="LSL-Wiki"> +<floater name="script ed float" title="LSL-WIKI"> <check_box label="Cursor folgen" name="lock_check" /> <combo_box label="Sperren" name="history_combo" /> <button label="Zurück" name="back_btn" /> diff --git a/indra/newview/skins/default/xui/de/floater_media_browser.xml b/indra/newview/skins/default/xui/de/floater_media_browser.xml index ee2532127e..a16c2408fe 100644 --- a/indra/newview/skins/default/xui/de/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/de/floater_media_browser.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_about" title="Medienbrowser"> +<floater name="floater_about" title="MEDIENBROWSER"> <layout_stack name="stack1"> <layout_panel name="nav_controls"> <button label="Zurück" name="back" /> diff --git a/indra/newview/skins/default/xui/de/floater_mem_leaking.xml b/indra/newview/skins/default/xui/de/floater_mem_leaking.xml index 0b77a7fe9d..44249a6075 100644 --- a/indra/newview/skins/default/xui/de/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/de/floater_mem_leaking.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="MemLeak" title="Speicherverlust-Simulation"> +<floater name="MemLeak" title="SPEICHERVERLUST-SIMULATION"> <spinner label="Verlustgeschwindigkeit (Bytes pro Frame):" name="leak_speed" /> <spinner label="Max. Speicherverlust (MB):" name="max_leak" /> <text name="total_leaked_label"> diff --git a/indra/newview/skins/default/xui/de/floater_mute_object.xml b/indra/newview/skins/default/xui/de/floater_mute_object.xml index 60c6ff008c..8cc8a56523 100644 --- a/indra/newview/skins/default/xui/de/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/de/floater_mute_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="mute by name" title="Objekt nach Name stummschalten"> +<floater name="mute by name" title="OBJEKT NACH NAME STUMMSCHALTEN"> <text name="message"> Stummschalten nach Name betrifft nur Chat und IM, keine Sounds. Sie müssen den Objektnamen exakt angeben. diff --git a/indra/newview/skins/default/xui/de/floater_my_friends.xml b/indra/newview/skins/default/xui/de/floater_my_friends.xml index fc24bcece4..30614b7578 100644 --- a/indra/newview/skins/default/xui/de/floater_my_friends.xml +++ b/indra/newview/skins/default/xui/de/floater_my_friends.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_my_friends" title="Kontakte"> +<floater name="floater_my_friends" title="KONTAKTE"> <tab_container name="friends_and_groups"> <panel label="Freunde" name="friends_panel" /> <panel label="Gruppen" name="groups_panel" /> diff --git a/indra/newview/skins/default/xui/de/floater_notification.xml b/indra/newview/skins/default/xui/de/floater_notification.xml index 48ff900d5a..48a26a0e98 100644 --- a/indra/newview/skins/default/xui/de/floater_notification.xml +++ b/indra/newview/skins/default/xui/de/floater_notification.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="notification" title="Konsole: Meldungen"> +<floater name="notification" title="KONSOLE: MELDUNGEN"> <text_editor name="payload"> Wird geladen... </text_editor> diff --git a/indra/newview/skins/default/xui/de/floater_notifications_console.xml b/indra/newview/skins/default/xui/de/floater_notifications_console.xml index a1cd69899c..0c075dd63a 100644 --- a/indra/newview/skins/default/xui/de/floater_notifications_console.xml +++ b/indra/newview/skins/default/xui/de/floater_notifications_console.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="notifications_console" title="Konsole: Meldungen"> +<floater name="notifications_console" title="KONSOLE: MELDUNGEN"> <combo_box label="Meldungsart auswählen" name="notification_types" width="412" /> <button label="Hinzufügen" name="add_notification" left="417" width="78" /> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_openobject.xml b/indra/newview/skins/default/xui/de/floater_openobject.xml index fa465c08c7..d7575876e1 100644 --- a/indra/newview/skins/default/xui/de/floater_openobject.xml +++ b/indra/newview/skins/default/xui/de/floater_openobject.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="objectcontents" title="Objektinhalte"> +<floater name="objectcontents" title="OBJEKTINHALTE"> <text name="object_name"> [DESC]: </text> diff --git a/indra/newview/skins/default/xui/de/floater_perm_prefs.xml b/indra/newview/skins/default/xui/de/floater_perm_prefs.xml index 83ec725487..3641f41b8c 100644 --- a/indra/newview/skins/default/xui/de/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/de/floater_perm_prefs.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="perm prefs" title="Hochlade-Berechtigungen (Standard)"> +<floater name="perm prefs" title="HOCHLADE-BERECHTIGUNGEN (STANDARD)"> <panel label="Berechtigungen" name="permissions"> <button label="?" label_selected="?" name="help"/> <check_box label="Mit Gruppe teilen" name="share_with_group"/> diff --git a/indra/newview/skins/default/xui/de/floater_post_process.xml b/indra/newview/skins/default/xui/de/floater_post_process.xml index e10806d255..a6ed8cc3df 100644 --- a/indra/newview/skins/default/xui/de/floater_post_process.xml +++ b/indra/newview/skins/default/xui/de/floater_post_process.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Post-Process Floater" title="Post-Processing-Einstellungen"> +<floater name="Post-Process Floater" title="POST-PROCESSING-EINSTELLUNGEN"> <tab_container name="Post-Process Tabs"> <panel label="Farbfilter" name="wmiColorFilterPanel"> <check_box label="Ein" name="wmiColorFilterToggle" /> diff --git a/indra/newview/skins/default/xui/de/floater_postcard.xml b/indra/newview/skins/default/xui/de/floater_postcard.xml index 2755704660..fc552339d3 100644 --- a/indra/newview/skins/default/xui/de/floater_postcard.xml +++ b/indra/newview/skins/default/xui/de/floater_postcard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Postcard" title="Foto per E-Mail senden"> +<floater name="Postcard" title="FOTO PER E-MAIL SENDEN"> <text name="to_label"> E-Mail des Empfängers: </text> diff --git a/indra/newview/skins/default/xui/de/floater_preferences.xml b/indra/newview/skins/default/xui/de/floater_preferences.xml index 5f68282b9f..02aa440be7 100644 --- a/indra/newview/skins/default/xui/de/floater_preferences.xml +++ b/indra/newview/skins/default/xui/de/floater_preferences.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Preferences" title="Einstellungen"> +<floater name="Preferences" title="EINSTELLUNGEN"> <button label="OK" label_selected="OK" name="OK" /> <button label="Abbrechen" label_selected="Abbrechen" name="Cancel" /> <button label="Übernehmen" label_selected="Übernehmen" name="Apply" /> diff --git a/indra/newview/skins/default/xui/de/floater_preview_classified.xml b/indra/newview/skins/default/xui/de/floater_preview_classified.xml index 2257785fda..be702145c3 100644 --- a/indra/newview/skins/default/xui/de/floater_preview_classified.xml +++ b/indra/newview/skins/default/xui/de/floater_preview_classified.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="classified_preview" title="Vertrauliche Informationen" /> +<floater name="classified_preview" title="VERTRAULICHE INFORMATIONEN" /> diff --git a/indra/newview/skins/default/xui/de/floater_preview_event.xml b/indra/newview/skins/default/xui/de/floater_preview_event.xml index 75e1113eff..21e8c67787 100644 --- a/indra/newview/skins/default/xui/de/floater_preview_event.xml +++ b/indra/newview/skins/default/xui/de/floater_preview_event.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="event_preview" title="Event-Informationen" /> +<floater name="event_preview" title="EVENT-INFORMATIONEN" /> diff --git a/indra/newview/skins/default/xui/de/floater_preview_notecard.xml b/indra/newview/skins/default/xui/de/floater_preview_notecard.xml index da90d66e4d..2c3258440f 100644 --- a/indra/newview/skins/default/xui/de/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/de/floater_preview_notecard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="preview notecard" title="Hinweis:"> +<floater name="preview notecard" title="HINWEIS:"> <button label="Speichern" label_selected="Speichern" name="Save" /> <text name="desc txt"> Beschreibung: diff --git a/indra/newview/skins/default/xui/de/floater_region_info.xml b/indra/newview/skins/default/xui/de/floater_region_info.xml index 4c28c7f5b0..e7dd09d4da 100644 --- a/indra/newview/skins/default/xui/de/floater_region_info.xml +++ b/indra/newview/skins/default/xui/de/floater_region_info.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="regioninfo" title="Region/Grundstück" /> +<floater name="regioninfo" title="REGION/GRUNDSTÜCK" /> diff --git a/indra/newview/skins/default/xui/de/floater_report_abuse.xml b/indra/newview/skins/default/xui/de/floater_report_abuse.xml index a8df587cfa..a5dd9fa4b1 100644 --- a/indra/newview/skins/default/xui/de/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/de/floater_report_abuse.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_report_abuse" title="Missbrauch melden"> +<floater name="floater_report_abuse" title="MISSBRAUCH MELDEN"> <texture_picker label="" name="screenshot"/> <check_box bottom_delta="-20" label="Screenshot einschließen" name="screen_check"/> <text name="reporter_title"> diff --git a/indra/newview/skins/default/xui/de/floater_script_debug.xml b/indra/newview/skins/default/xui/de/floater_script_debug.xml index f8c1543fdd..585a6c36ea 100644 --- a/indra/newview/skins/default/xui/de/floater_script_debug.xml +++ b/indra/newview/skins/default/xui/de/floater_script_debug.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <multi_floater name="script debug floater" title="Skriptwarnung/Fehler"> <tab_container name="Preview Tabs"> - <floater label="Skript" name="all_scripts" title="[All scripts]" /> + <floater label="Skript" name="all_scripts" title="[ALL SCRIPTS]" /> </tab_container> </multi_floater> diff --git a/indra/newview/skins/default/xui/de/floater_script_preview.xml b/indra/newview/skins/default/xui/de/floater_script_preview.xml index 3ab5732055..be6017cff5 100644 --- a/indra/newview/skins/default/xui/de/floater_script_preview.xml +++ b/indra/newview/skins/default/xui/de/floater_script_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="preview lsl text" title="Skript: Rotationsskript"> +<floater name="preview lsl text" title="SKRIPT: ROTATIONSSKRIPT"> <text name="desc txt"> Beschreibung: </text> diff --git a/indra/newview/skins/default/xui/de/floater_script_queue.xml b/indra/newview/skins/default/xui/de/floater_script_queue.xml index 63d5ef2478..b2011a4dfb 100644 --- a/indra/newview/skins/default/xui/de/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/de/floater_script_queue.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="queue" title="Rückgängig"> +<floater name="queue" title="RÜCKGÄNGIG"> <button label="Schließen" label_selected="Schließen" name="close" left="215" width="72"/> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_script_search.xml b/indra/newview/skins/default/xui/de/floater_script_search.xml index bd93427456..aae302e230 100644 --- a/indra/newview/skins/default/xui/de/floater_script_search.xml +++ b/indra/newview/skins/default/xui/de/floater_script_search.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script search" title="Skriptsuche"> +<floater name="script search" title="SKRIPTSUCHE"> <check_box label="Groß-/Kleinschreibung irrelevant" name="case_text" /> <button label="Suchen" label_selected="Suchen" name="search_btn" /> <button label="Ersetzen" label_selected="Ersetzen" name="replace_btn" /> diff --git a/indra/newview/skins/default/xui/de/floater_sell_land.xml b/indra/newview/skins/default/xui/de/floater_sell_land.xml index 1499bb0152..47ab51d502 100644 --- a/indra/newview/skins/default/xui/de/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/de/floater_sell_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="sell land" title="Land verkaufen"> +<floater name="sell land" title="LAND VERKAUFEN"> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <text name="info_parcel_label"> diff --git a/indra/newview/skins/default/xui/de/floater_settings_debug.xml b/indra/newview/skins/default/xui/de/floater_settings_debug.xml index 034cfca017..ea3295797d 100644 --- a/indra/newview/skins/default/xui/de/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/de/floater_settings_debug.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="settings_debug" title="Debug-Einstellungen"> +<floater name="settings_debug" title="DEBUG-EINSTELLUNGEN"> <combo_box name="boolean_combo"> <combo_box.item name="TRUE" label="WAHR" /> <combo_box.item name="FALSE" label="FALSCH" /> diff --git a/indra/newview/skins/default/xui/de/floater_snapshot.xml b/indra/newview/skins/default/xui/de/floater_snapshot.xml index bc8a1f42f1..64db511aa9 100644 --- a/indra/newview/skins/default/xui/de/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/de/floater_snapshot.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="Foto-Vorschau"> +<floater name="Snapshot" title="FOTO-VORSCHAU"> <text name="type_label"> Zweck des Fotos </text> diff --git a/indra/newview/skins/default/xui/de/floater_sound_preview.xml b/indra/newview/skins/default/xui/de/floater_sound_preview.xml index 1e5ac179b5..14126b6a44 100644 --- a/indra/newview/skins/default/xui/de/floater_sound_preview.xml +++ b/indra/newview/skins/default/xui/de/floater_sound_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Sound Preview" title="sound.wav"> +<floater name="Sound Preview" title="SOUND.WAV"> <text name="name_label"> Name: </text> diff --git a/indra/newview/skins/default/xui/de/floater_statistics.xml b/indra/newview/skins/default/xui/de/floater_statistics.xml index 26e976a59c..506c18bd98 100644 --- a/indra/newview/skins/default/xui/de/floater_statistics.xml +++ b/indra/newview/skins/default/xui/de/floater_statistics.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="stats floater" title="Statistikleiste"/> +<floater name="stats floater" title="STATISTIKLEISTE"/> diff --git a/indra/newview/skins/default/xui/de/floater_telehub.xml b/indra/newview/skins/default/xui/de/floater_telehub.xml index 264411c166..2ba4e575a8 100644 --- a/indra/newview/skins/default/xui/de/floater_telehub.xml +++ b/indra/newview/skins/default/xui/de/floater_telehub.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="telehub" title="Telehub" min_height="310" height="310" > +<floater name="telehub" title="TELEHUB" min_height="310" height="310" > <text name="status_text_connected"> Telehub verbunden mit Objekt [OBJECT] </text> diff --git a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml index fff6ab5c74..7e2fc26fdf 100644 --- a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="texture picker" title="Auswählen: Textur"> +<floater name="texture picker" title="AUSWÄHLEN: TEXTUR"> <string name="choose_picture"> Zum Auswählen eines Bildes hier klicken </string> diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index 2815fd34a2..6bad64324b 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="toolbox floater" title="" short_title="Bauen"> +<floater name="toolbox floater" title="" short_title="BAUEN"> <button label="" label_selected="" name="button focus" tool_tip="Fokus"/> <button label="" label_selected="" name="button move" tool_tip="Verschieben"/> <button label="" label_selected="" name="button edit" tool_tip="Bearbeiten"/> diff --git a/indra/newview/skins/default/xui/de/floater_top_objects.xml b/indra/newview/skins/default/xui/de/floater_top_objects.xml index f9e7becee1..082eb8894d 100644 --- a/indra/newview/skins/default/xui/de/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/de/floater_top_objects.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="top_objects" title="wird geladen..."> +<floater name="top_objects" title="WIRD GELADEN..."> <text name="title_text"> Wird geladen... </text> diff --git a/indra/newview/skins/default/xui/de/floater_water.xml b/indra/newview/skins/default/xui/de/floater_water.xml index 95b469434a..0880470c58 100644 --- a/indra/newview/skins/default/xui/de/floater_water.xml +++ b/indra/newview/skins/default/xui/de/floater_water.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Water Floater" title="Erweiterter Wasser-Editor"> +<floater name="Water Floater" title="ERWEITERTER WASSER-EDITOR"> <text name="KeyFramePresetsText"> Voreinstellungen: </text> diff --git a/indra/newview/skins/default/xui/de/floater_windlight_options.xml b/indra/newview/skins/default/xui/de/floater_windlight_options.xml index 8df412dab6..df0b513a85 100644 --- a/indra/newview/skins/default/xui/de/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/de/floater_windlight_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="WindLight floater" title="Erweiterter Himmel-Editor"> +<floater name="WindLight floater" title="ERWEITERTER HIMMEL-EDITOR"> <text name="KeyFramePresetsText"> Voreinstellungen: </text> diff --git a/indra/newview/skins/default/xui/de/floater_world_map.xml b/indra/newview/skins/default/xui/de/floater_world_map.xml index d3366e5871..665eafe5b8 100644 --- a/indra/newview/skins/default/xui/de/floater_world_map.xml +++ b/indra/newview/skins/default/xui/de/floater_world_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="worldmap" title="Weltkarte"> +<floater name="worldmap" title="WELTKARTE"> <tab_container name="maptab"> <panel label="Objekte" name="objects_mapview"/> <panel label="Terrain" name="terrain_mapview"/> diff --git a/indra/newview/skins/default/xui/en/favorites_bar_button.xml b/indra/newview/skins/default/xui/en/favorites_bar_button.xml index c35cbb1539..361f5a7bc8 100644 --- a/indra/newview/skins/default/xui/en/favorites_bar_button.xml +++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml @@ -9,10 +9,10 @@ image_disabled_selected="transparent.j2c" image_selected="transparent.j2c" image_unselected="transparent.j2c" - image_hover_selected="FileMenu_BarSelect" - image_hover_unselected="FileMenu_BarSelect" - image_pressed="FileMenu_BarSelect" - image_pressed_selected="FileMenu_BarSelect" + image_hover_selected="Favorite_Link_Over" + image_hover_unselected="Favorite_Link_Over" + image_pressed="Favorite_Link_Over" + image_pressed_selected="Favorite_Link_Over" hover_glow_amount="0.15" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml index 3789369e74..4d5268681b 100644 --- a/indra/newview/skins/default/xui/en/floater_aaa.xml +++ b/indra/newview/skins/default/xui/en/floater_aaa.xml @@ -7,7 +7,7 @@ help_topic="floater_aaa" save_rect="true" can_resize="true" - title="About [APP_NAME]" + title="ABOUT [APP_NAME]" width="470"> <text_editor follows="left|top|right|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 3f2636ae52..2ff99dcf5a 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -6,7 +6,7 @@ name="floater_about" help_topic="floater_about" save_rect="true" - title="About [APP_NAME]" + title="ABOUT [APP_NAME]" width="470"> <floater.string name="AboutHeader"> @@ -69,7 +69,7 @@ Packets Lost: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number tab_position="top"> <panel border="true" - label="Support" + label="Info" help_topic="about_support_tab" name="support_panel"> <text_editor 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 1def98d1bb..615d1bf18d 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater can_tear_off="false" height="420" @@ -6,7 +6,7 @@ name="floaterland" help_topic="floaterland" save_rect="true" - title="About Land" + title="ABOUT LAND" width="460"> <floater.string name="Minutes"> diff --git a/indra/newview/skins/default/xui/en/floater_activeim.xml b/indra/newview/skins/default/xui/en/floater_activeim.xml index 1bc9cde044..96fe0aa70c 100644 --- a/indra/newview/skins/default/xui/en/floater_activeim.xml +++ b/indra/newview/skins/default/xui/en/floater_activeim.xml @@ -30,4 +30,4 @@ name="chiclet_row_panel_list" width="318"/> </scroll_container> -</floater>
\ No newline at end of file +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_animation_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_preview.xml index ab3d5722f0..ebce758d3d 100644 --- a/indra/newview/skins/default/xui/en/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_animation_preview.xml @@ -455,7 +455,6 @@ Maximum animation length is [MAX_LENGTH] seconds. layout="topleft" left="10" name="play_btn" - picture_style="true" tool_tip="Play/pause your animation" top_pad="0" width="28" /> @@ -467,7 +466,6 @@ Maximum animation length is [MAX_LENGTH] seconds. layout="topleft" left_pad="4" name="stop_btn" - picture_style="true" tool_tip="Stop animation playback" top_delta="0" width="28" /> diff --git a/indra/newview/skins/default/xui/en/floater_auction.xml b/indra/newview/skins/default/xui/en/floater_auction.xml index aae6508041..9c6d114c4c 100644 --- a/indra/newview/skins/default/xui/en/floater_auction.xml +++ b/indra/newview/skins/default/xui/en/floater_auction.xml @@ -8,7 +8,7 @@ min_width="420" name="floater_auction" help_topic="floater_auction" - title="Start Linden Land Sale" + title="START LINDEN LAND SALE" width="420"> <floater.string name="already for sale"> diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml index 1fd9b95318..a0f9bb59fd 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml @@ -8,7 +8,7 @@ min_width="265" name="avatarpicker" help_topic="avatarpicker" - title="Choose Resident" + title="CHOOSE RESIDENT" width="265"> <floater.string name="not_found"> @@ -116,7 +116,6 @@ height="20" width="20" name="RefreshFriends" - picture_style="true" image_overlay="Refresh_Off"> <button.commit_callback function="Refresh.FriendList"/> @@ -188,7 +187,6 @@ height="28" width="28" name="Refresh" - picture_style="true" image_overlay="Refresh_Off" /> <scroll_list follows="all" 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 4f2a36e518..a0cb94eb69 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml @@ -5,7 +5,7 @@ layout="topleft" name="avatar_texture_debug" help_topic="avatar_texture_debug" - title="Avatar Textures" + title="AVATAR TEXTURES" width="1250"> <floater.string name="InvalidAvatar"> diff --git a/indra/newview/skins/default/xui/en/floater_beacons.xml b/indra/newview/skins/default/xui/en/floater_beacons.xml index 1c83799e72..c8f6c613af 100644 --- a/indra/newview/skins/default/xui/en/floater_beacons.xml +++ b/indra/newview/skins/default/xui/en/floater_beacons.xml @@ -8,7 +8,7 @@ save_rect="true" save_visibility="true" single_instance="true" - title="Beacons" + title="BEACONS" width="240"> <panel follows="left|top|right|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_build_options.xml b/indra/newview/skins/default/xui/en/floater_build_options.xml index bddbbdd3b2..f0e678af00 100644 --- a/indra/newview/skins/default/xui/en/floater_build_options.xml +++ b/indra/newview/skins/default/xui/en/floater_build_options.xml @@ -7,7 +7,7 @@ name="build options floater" help_topic="build_options_floater" save_rect="true" - title="Grid Options" + title="GRID OPTIONS" width="264"> <spinner control_name="GridResolution" diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml index 02958bee74..7ae079f553 100644 --- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml @@ -6,7 +6,7 @@ layout="topleft" name="floaterbulkperms" help_topic="floaterbulkperms" - title="Edit Content Permissions" + title="EDIT CONTENT PERMISSIONS" width="270"> <floater.string name="nothing_to_modify_text"> diff --git a/indra/newview/skins/default/xui/en/floater_bumps.xml b/indra/newview/skins/default/xui/en/floater_bumps.xml index 2917096f3c..303c28d7c8 100644 --- a/indra/newview/skins/default/xui/en/floater_bumps.xml +++ b/indra/newview/skins/default/xui/en/floater_bumps.xml @@ -6,7 +6,7 @@ name="floater_bumps" help_topic="floater_bumps" save_rect="true" - title="Bumps, Pushes & Hits" + title="BUMPS, PUSHES & HITS" width="400"> <floater.string name="none_detected"> diff --git a/indra/newview/skins/default/xui/en/floater_buy_contents.xml b/indra/newview/skins/default/xui/en/floater_buy_contents.xml index aacc3ad8d0..833e8beb8d 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_contents.xml @@ -9,7 +9,7 @@ name="floater_buy_contents" help_topic="floater_buy_contents" save_rect="true" - title="Buy Contents" + title="BUY CONTENTS" width="280"> <floater.string name="no_copy_text"> diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 88712bda5e..75711cdf89 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -4,7 +4,7 @@ can_minimize="false" height="275" layout="topleft" - title="Buy L$" + title="BUY L$" name="buy currency" help_topic="buy_linden_dollars" single_instance="true" diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml index 8314549132..0f710a8047 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml @@ -7,7 +7,7 @@ name="buy land" help_topic="buy_land" single_instance="true" - title="Buy Land" + title="BUY LAND" width="740"> <floater.string name="can_resell"> diff --git a/indra/newview/skins/default/xui/en/floater_buy_object.xml b/indra/newview/skins/default/xui/en/floater_buy_object.xml index 49ea3f5dd1..f0e5e30010 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_object.xml @@ -10,7 +10,7 @@ help_topic="contents" save_rect="true" single_instance="true" - title="Buy Copy of Object" + title="BUY COPY OF OBJECT" width="280"> <floater.string name="title_buy_text"> diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 1b69418013..a569b62e96 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -42,7 +42,6 @@ layout="topleft" left="45" name="cam_track_stick" - picture_style="true" quadrant="left" scale_image="false" sound_flags="3" @@ -59,7 +58,6 @@ left="7" minus_image="ScrollThumb_Vert" name="zoom" - picture_style="true" plus_image="ScrollThumb_Vert" quadrant="left" scale_image="false" @@ -75,7 +73,6 @@ layout="topleft" left="45" name="cam_rotate_stick" - picture_style="true" quadrant="left" scale_image="false" sound_flags="3" @@ -98,7 +95,6 @@ layout="topleft" left="5" name="rear_view" - picture_style="true" tool_tip="Rear View" top="2" width="30"> @@ -113,7 +109,6 @@ layout="topleft" left_pad="5" name="group_view" - picture_style="true" tool_tip="Group View" top="2" width="30"> @@ -128,7 +123,6 @@ layout="topleft" left="5" name="front_view" - picture_style="true" tool_tip="Front View" top_pad="5" width="30"> @@ -143,7 +137,6 @@ layout="topleft" left_pad="5" name="mouselook_view" - picture_style="true" tool_tip="Mouselook View" top_pad="-30" width="30"> diff --git a/indra/newview/skins/default/xui/en/floater_choose_group.xml b/indra/newview/skins/default/xui/en/floater_choose_group.xml index 8b34fda96c..dc1ee5f24e 100644 --- a/indra/newview/skins/default/xui/en/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/en/floater_choose_group.xml @@ -5,7 +5,7 @@ layout="topleft" name="groups" help_topic="groups" - title="Groups" + title="GROUPS" width="280"> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_color_picker.xml b/indra/newview/skins/default/xui/en/floater_color_picker.xml index 686b8dc40f..4380ff8f4b 100644 --- a/indra/newview/skins/default/xui/en/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_color_picker.xml @@ -7,7 +7,7 @@ layout="topleft" name="ColorPicker" help_topic="colorpicker" - title="Color Picker" + title="COLOR PICKER" width="440"> <text type="string" @@ -168,27 +168,29 @@ <check_box follows="left|bottom" height="20" - label="Apply Now" + label="Apply now" layout="topleft" left="12" name="apply_immediate" top_pad="185" width="100" /> - <button - follows="left|top" - height="32" + <button + follows="left|bottom" + height="28" + image_selected="eye_button_active.tga" + image_unselected="eye_button_inactive.tga" layout="topleft" - left_pad="30" - name="color_pipette" - picture_style="true" - width="32" /> + left_pad="50" + name="Pipette" + width="28" /> <button follows="right|bottom" height="20" label="Ok" - label_selected="Select" + label_selected="Ok" layout="topleft" - left_pad="50" + right="-120" + top_delta="9" name="select_btn" width="100" /> <button @@ -198,6 +200,7 @@ label_selected="Cancel" layout="topleft" left_pad="5" + right="-10" name="cancel_btn" width="100" /> <text diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml index 07d76f4810..6c4f10e61e 100644 --- a/indra/newview/skins/default/xui/en/floater_customize.xml +++ b/indra/newview/skins/default/xui/en/floater_customize.xml @@ -9,7 +9,7 @@ name="floater customize" help_topic="floater_customize" save_rect="true" - title="Appearance" + title="APPEARANCE" top_delta="-185" width="494"> <tab_container @@ -193,7 +193,7 @@ font="SansSerif" height="16" layout="topleft" - left="26" + left="8" name="title" top="8" width="355"> @@ -299,7 +299,7 @@ scratch and wear it. left="8" name="Create New" top="104" - width="120" /> + width="140" /> <button follows="right|bottom" height="20" @@ -342,9 +342,10 @@ scratch and wear it. top="4" width="18" /> <icon + follows="left|top" height="16" layout="topleft" - left_delta="-325" + left="8" mouse_opaque="true" top_delta="3" width="16" /> @@ -399,7 +400,7 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left="26" + left="8" name="title" top="8" width="355"> @@ -599,7 +600,7 @@ scratch and wear it. <icon height="16" layout="topleft" - left_delta="-325" + left="8" mouse_opaque="true" top_delta="3" width="16" /> @@ -654,7 +655,7 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left="26" + left="8" name="title" top="8" width="355"> @@ -1015,7 +1016,7 @@ scratch and wear it. <icon height="16" layout="topleft" - left_delta="-325" + left="8" mouse_opaque="true" top_delta="3" width="16" /> @@ -1100,7 +1101,7 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left="26" + left="8" name="title" top="8" width="355"> @@ -1221,7 +1222,7 @@ scratch and wear it. <icon height="16" layout="topleft" - left_delta="-325" + left="8" mouse_opaque="true" top_delta="3" width="16" /> @@ -1306,7 +1307,7 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left="26" + left="8" name="title" top="8" width="355"> diff --git a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml index b0d636445d..35f3e643c3 100644 --- a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml @@ -6,7 +6,7 @@ name="Day Cycle Floater" help_topic="day_cycle_floater" save_rect="true" - title="Day Cycle Editor" + title="DAY CYCLE EDITOR" width="646"> <tab_container follows="left|top" diff --git a/indra/newview/skins/default/xui/en/floater_device_settings.xml b/indra/newview/skins/default/xui/en/floater_device_settings.xml index 2b23980423..91a7a678da 100644 --- a/indra/newview/skins/default/xui/en/floater_device_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_device_settings.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" height="260" layout="topleft" name="floater_device_settings" help_topic="floater_device_settings" - title="Voice Chat Device Settings" + title="VOICE CHAT DEVICE SETTINGS" width="405"> <panel bottom="260" diff --git a/indra/newview/skins/default/xui/en/floater_env_settings.xml b/indra/newview/skins/default/xui/en/floater_env_settings.xml index 7c22311f66..5233cb023d 100644 --- a/indra/newview/skins/default/xui/en/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_env_settings.xml @@ -6,7 +6,7 @@ name="Environment Editor Floater" help_topic="environment_editor_floater" save_rect="true" - title="Environment Editor" + title="ENVIRONMENT EDITOR" width="600"> <floater.string name="timeStr"> diff --git a/indra/newview/skins/default/xui/en/floater_font_test.xml b/indra/newview/skins/default/xui/en/floater_font_test.xml index 8b14f691d6..3ab19ec9d9 100644 --- a/indra/newview/skins/default/xui/en/floater_font_test.xml +++ b/indra/newview/skins/default/xui/en/floater_font_test.xml @@ -8,7 +8,7 @@ min_width="154" name="contents" help_topic="contents" - title="Font Test" + title="FONT TEST" width="500"> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml index 128d518e12..b23482655c 100644 --- a/indra/newview/skins/default/xui/en/floater_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_gesture.xml @@ -5,7 +5,7 @@ height="465" name="gestures" help_topic="gestures" - title="Gestures" + title="GESTURES" background_visible="true" follows="all" label="Places" @@ -68,7 +68,6 @@ layout="topleft" left="10" name="recent_viewsort_btn" - picture_style="true" top="5" width="18" /> <button @@ -81,7 +80,6 @@ layout="topleft" left_pad="5" name="new_gesture_btn" - picture_style="true" tool_tip="Make new gesture" top_delta="0" width="18" /> @@ -95,7 +93,6 @@ layout="topleft" left_pad="230" name="del_btn" - picture_style="true" tool_tip="Delete this gesture" top_delta="0" width="18" /> diff --git a/indra/newview/skins/default/xui/en/floater_god_tools.xml b/indra/newview/skins/default/xui/en/floater_god_tools.xml index 97cb6e259c..79eed52fbf 100644 --- a/indra/newview/skins/default/xui/en/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_god_tools.xml @@ -5,7 +5,7 @@ layout="topleft" name="godtools floater" help_topic="godtools_floater" - title="God Tools" + title="GOD TOOLS" width="400"> <tab_container follows="left|top" diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml index cd98f21918..1e2440580e 100644 --- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml @@ -5,7 +5,7 @@ layout="topleft" name="Hardware Settings Floater" help_topic="hardware_settings_floater" - title="Hardware Settings" + title="HARDWARE SETTINGS" width="500"> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml index d2fe8d0e6d..f50ff01230 100644 --- a/indra/newview/skins/default/xui/en/floater_help_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml @@ -10,7 +10,7 @@ help_topic="floater_help_browser" save_rect="true" single_instance="true" - title="Help Browser" + title="HELP BROWSER" width="620"> <floater.string name="home_page_url"> diff --git a/indra/newview/skins/default/xui/en/floater_hud.xml b/indra/newview/skins/default/xui/en/floater_hud.xml index 6e8950c49a..99a6a95828 100644 --- a/indra/newview/skins/default/xui/en/floater_hud.xml +++ b/indra/newview/skins/default/xui/en/floater_hud.xml @@ -8,7 +8,7 @@ help_topic="floater_hud" save_rect="true" save_visibility="true" - title="Tutorial" + title="TUTORIAL" width="362"> <web_browser border_visible="false" diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 26d2f4e497..70af2f63b6 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -3,7 +3,7 @@ legacy_header_height="18" background_visible="true" follows="left|top|right|bottom" - height="270" + height="369" layout="topleft" left="0" name="panel_im" @@ -12,13 +12,13 @@ can_dock="true" can_minimize="true" visible="true" - width="365" + width="520" can_resize="true" - min_width="200" - min_height="150"> + min_width="350" + min_height="350"> <layout_stack follows="left|top|right|bottom" - height="255" - width="365" + height="354" + width="520" layout="topleft" orientation="horizontal" name="im_panels" @@ -28,13 +28,13 @@ name="panel_im_control_panel" layout="topleft" top_delta="-3" - width="146" - height="255" + height="354" follows="left" label="IM Control Panel" + auto_resize="false" user_resize="false" /> - <layout_panel height="255" - width="200" + <layout_panel height="354" + width="355" left_delta="146" top="0" user_resize="false"> @@ -56,14 +56,20 @@ length="1" follows="left|top|right|bottom" font="SansSerif" - height="205" + height="300" layout="topleft" name="chat_history" parse_highlights="true" allow_html="true" - width="195"> + width="350"> </chat_history> - <line_editor follows="left|right" name="chat_editor" height="20" layout="topleft" width="190"> + <line_editor + follows="left|right" + height="20" + label="To" + layout="topleft" + name="chat_editor" + width="345"> </line_editor> </layout_panel> </layout_stack> diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml index dcb93c6e2f..16873df310 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -8,7 +8,7 @@ layout="topleft" name="incoming call" help_topic="incoming_call" - title="Unknown Person is calling" + title="UNKNOWN PERSON IS CALLING" width="240"> <floater.string name="anonymous"> diff --git a/indra/newview/skins/default/xui/en/floater_inspect.xml b/indra/newview/skins/default/xui/en/floater_inspect.xml index 9f7723c51b..3f7642fafe 100644 --- a/indra/newview/skins/default/xui/en/floater_inspect.xml +++ b/indra/newview/skins/default/xui/en/floater_inspect.xml @@ -9,7 +9,7 @@ name="inspect" help_topic="inspect" save_rect="true" - title="Inspect Objects" + title="INSPECT OBJECTS" width="400"> <floater.string name="timeStamp"> diff --git a/indra/newview/skins/default/xui/en/floater_inventory.xml b/indra/newview/skins/default/xui/en/floater_inventory.xml index 3e19bdee0f..30639f955f 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory.xml @@ -12,7 +12,7 @@ save_rect="true" save_visibility="true" single_instance="true" - title="Inventory" + title="INVENTORY" width="467"> <floater.string name="Title"> diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml index 4f0609c7f8..4ca6002c13 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml @@ -7,7 +7,7 @@ name="item properties" help_topic="item_properties" save_rect="true" - title="Inventory Item Properties" + title="INVENTORY ITEM PROPERTIES" width="350"> <floater.string name="unknown"> diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml index 0042f97a8e..90fee857fb 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml @@ -6,7 +6,7 @@ layout="topleft" name="Inventory Finder" help_topic="inventory_finder" - title="inventory_recent_items" + title="INVENTORY_RECENT_ITEMS" width="280"> <icon height="16" diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml index e2da059ace..4d67e4c343 100644 --- a/indra/newview/skins/default/xui/en/floater_joystick.xml +++ b/indra/newview/skins/default/xui/en/floater_joystick.xml @@ -5,7 +5,7 @@ layout="topleft" name="Joystick" help_topic="joystick" - title="Joystick Configuration" + title="JOYSTICK CONFIGURATION" width="550"> <floater.string name="NoDevice"> diff --git a/indra/newview/skins/default/xui/en/floater_lagmeter.xml b/indra/newview/skins/default/xui/en/floater_lagmeter.xml index 309475098f..19f5155f88 100644 --- a/indra/newview/skins/default/xui/en/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/en/floater_lagmeter.xml @@ -6,7 +6,7 @@ name="floater_lagmeter" help_topic="floater_lagmeter" save_rect="true" - title="Lag Meter" + title="LAG METER" width="350"> <floater.string name="max_title_msg"> @@ -184,7 +184,6 @@ layout="topleft" left="8" name="client_lagmeter" - picture_style="true" tab_stop="false" tool_tip="Client lag status" top="24" @@ -233,7 +232,6 @@ layout="topleft" left="8" name="network_lagmeter" - picture_style="true" tab_stop="false" tool_tip="Network lag status" top="64" @@ -282,7 +280,6 @@ layout="topleft" left="8" name="server_lagmeter" - picture_style="true" tab_stop="false" tool_tip="Server lag status" top="104" 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 85f0e6411b..2c04a94613 100644 --- a/indra/newview/skins/default/xui/en/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/en/floater_land_holdings.xml @@ -166,4 +166,4 @@ width="290"> [AREA] m² </text> -</floater>
\ No newline at end of file +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml index 93bbb0107e..e94717fe32 100644 --- a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" bevel_style="none" @@ -12,7 +12,7 @@ name="script ed float" help_topic="script_ed_float" save_rect="true" - title="Script: New Script" + title="SCRIPT: NEW SCRIPT" width="500"> <floater.string name="not_allowed"> diff --git a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml index 4dcf168605..a5b477313c 100644 --- a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml @@ -10,7 +10,7 @@ name="script ed float" help_topic="script_ed_float" save_rect="true" - title="LSL Wiki" + title="LSL WIKI" width="370"> <check_box follows="top|left" diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml index b11892be74..d6b20c8015 100644 --- a/indra/newview/skins/default/xui/en/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml @@ -10,7 +10,7 @@ help_topic="floater_about" save_rect="true" single_instance="true" - title="Media Browser" + title="MEDIA BROWSER" width="820"> <floater.string name="home_page_url"> @@ -127,7 +127,6 @@ layout="topleft" left_delta="55" name="play" - picture_style="true" top_delta="0" width="55" /> <button @@ -138,7 +137,6 @@ layout="topleft" left_delta="0" name="pause" - picture_style="true" top_delta="0" width="55" /> <button diff --git a/indra/newview/skins/default/xui/en/floater_media_settings.xml b/indra/newview/skins/default/xui/en/floater_media_settings.xml index 4218c15408..68dd2001af 100644 --- a/indra/newview/skins/default/xui/en/floater_media_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_media_settings.xml @@ -15,9 +15,9 @@ min_height="430" min_width="620" mouse_opaque="true" - name="Medis Settings" + name="Media Settings" help_topic = "media_settings" - title="Media Settings"> + title="MEDIA SETTINGS"> <button bottom="-525" enabled="true" diff --git a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml index 560acafd4f..28a29c42aa 100644 --- a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml @@ -7,7 +7,7 @@ layout="topleft" name="MemLeak" help_topic="memleak" - title="Simulate a Memory Leak" + title="SIMULATE A MEMORY LEAK" width="350"> <spinner decimal_digits="0" diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index 02cbef5987..5a8ffcebea 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -56,7 +56,6 @@ layout="topleft" left="17" name="turn left btn" - picture_style="true" scale_image="false" tool_tip="Turn left (press Left Arrow or A)" top="45" @@ -70,7 +69,6 @@ layout="topleft" left_pad="34" name="turn right btn" - picture_style="true" scale_image="false" tool_tip="Turn right (press Right Arrow or D)" top_delta="0" @@ -84,7 +82,6 @@ layout="topleft" left="10" name="move up btn" - picture_style="true" scale_image="false" tool_tip="Fly up, press "E"" top="14" @@ -98,7 +95,6 @@ layout="topleft" left_pad="45" name="move down btn" - picture_style="true" scale_image="false" tool_tip="Fly down, press "C"" top_delta="0" @@ -112,7 +108,6 @@ layout="topleft" left="46" name="forward btn" - picture_style="true" quadrant="up" scale_image="false" tool_tip="Walk forward (press up arrow or W)" @@ -127,7 +122,6 @@ layout="topleft" left_delta="0" name="backward btn" - picture_style="true" quadrant="down" scale_image="false" tool_tip="Walk backward (press down arrow or S)" diff --git a/indra/newview/skins/default/xui/en/floater_mute_object.xml b/indra/newview/skins/default/xui/en/floater_mute_object.xml index 33b1dac8a5..454b1c43b2 100644 --- a/indra/newview/skins/default/xui/en/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/en/floater_mute_object.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" can_minimize="false" @@ -6,7 +6,7 @@ layout="topleft" name="block by name" help_topic="mute_by_name" - title="Block object by name" + title="BLOCK OBJECT BY NAME" width="375"> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_my_friends.xml b/indra/newview/skins/default/xui/en/floater_my_friends.xml index 689221b9c7..e7efcc7844 100644 --- a/indra/newview/skins/default/xui/en/floater_my_friends.xml +++ b/indra/newview/skins/default/xui/en/floater_my_friends.xml @@ -11,7 +11,7 @@ help_topic="floater_my_friends" save_rect="true" single_instance="true" - title="Contacts" + title="CONTACTS" width="395"> <tab_container follows="all" diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index e7c5bf8585..7f58ea132e 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -13,7 +13,7 @@ name="nearby_chat" help_topic="nearby_chat" save_rect="true" - title="Nearby Chat" + title="NEARBY CHAT" save_dock_state="true" save_visibility="true" single_instance="true" diff --git a/indra/newview/skins/default/xui/en/floater_notification.xml b/indra/newview/skins/default/xui/en/floater_notification.xml index f9cb22055a..1f9ddecac2 100644 --- a/indra/newview/skins/default/xui/en/floater_notification.xml +++ b/indra/newview/skins/default/xui/en/floater_notification.xml @@ -6,7 +6,7 @@ layout="topleft" min_height="50" name="notification" - title="Notifications Console" + title="NOTIFICATIONS CONSOLE" width="200"> <text_editor type="string" diff --git a/indra/newview/skins/default/xui/en/floater_notifications_console.xml b/indra/newview/skins/default/xui/en/floater_notifications_console.xml index 03a2aad96d..ca81b9bcf0 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_console.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_console.xml @@ -8,7 +8,7 @@ name="notifications_console" help_topic="notifications_console" single_instance="true" - title="Notifications Console" + title="NOTIFICATIONS CONSOLE" width="500"> <combo_box follows="left|right|top" diff --git a/indra/newview/skins/default/xui/en/floater_openobject.xml b/indra/newview/skins/default/xui/en/floater_openobject.xml index af8aadf0e0..3fd118df1c 100644 --- a/indra/newview/skins/default/xui/en/floater_openobject.xml +++ b/indra/newview/skins/default/xui/en/floater_openobject.xml @@ -10,7 +10,7 @@ name="objectcontents" help_topic="objectcontents" save_rect="true" - title="Object Contents" + title="OBJECT CONTENTS" width="300"> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_pay_object.xml b/indra/newview/skins/default/xui/en/floater_pay_object.xml index 8d230023cc..1946920a9c 100644 --- a/indra/newview/skins/default/xui/en/floater_pay_object.xml +++ b/indra/newview/skins/default/xui/en/floater_pay_object.xml @@ -8,32 +8,14 @@ help_topic="give_money" save_rect="true" width="225"> - <text - type="string" - length="1" - follows="left|top" - font="SansSerifBold" - height="18" - layout="topleft" - left="12" - name="payee_group" - top="7" - width="75"> - Pay group: - </text> - <text - type="string" - length="1" - follows="left|top" - font="SansSerifBold" - height="18" - layout="topleft" - left="12" - name="payee_resident" - top="7" - width="75"> - Pay resident: - </text> + <string + name="payee_group"> + Pay Group + </string> + <string + name="payee_resident"> + Pay Resident + </string> <icon height="16" width="16" @@ -41,7 +23,7 @@ mouse_opaque="true" name="icon_person" tool_tip="Person" - top_pad="0" + top_pad="24" left="10" /> <text diff --git a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml index 0967706cc2..6faab84159 100644 --- a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml @@ -6,7 +6,7 @@ name="perm prefs" help_topic="perm_prefs" save_rect="true" - title="Default Upload Permissions" + title="DEFAULT UPLOAD PERMISSIONS" width="315"> <panel follows="left|top|right|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_post_process.xml b/indra/newview/skins/default/xui/en/floater_post_process.xml index 46554beede..05559adf89 100644 --- a/indra/newview/skins/default/xui/en/floater_post_process.xml +++ b/indra/newview/skins/default/xui/en/floater_post_process.xml @@ -5,7 +5,7 @@ layout="topleft" name="Post-Process Floater" help_topic="post_process_floater" - title="Post-Process Settings" + title="POST-PROCESS SETTINGS" width="400"> <tab_container follows="left|top" diff --git a/indra/newview/skins/default/xui/en/floater_postcard.xml b/indra/newview/skins/default/xui/en/floater_postcard.xml index b13bd1740c..3a7b6cc832 100644 --- a/indra/newview/skins/default/xui/en/floater_postcard.xml +++ b/indra/newview/skins/default/xui/en/floater_postcard.xml @@ -10,7 +10,7 @@ min_width="450" name="Postcard" help_topic="postcard" - title="Email Snapshot" + title="EMAIL SNAPSHOT" width="450"> <floater.string name="default_subject"> diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index d2a2a7ce02..d182cdc6bb 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -9,7 +9,7 @@ name="Preferences" help_topic="preferences" single_instance="true" - title="Preferences" + title="PREFERENCES" width="620"> <button follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_preview_classified.xml b/indra/newview/skins/default/xui/en/floater_preview_classified.xml index 7c8c6d7207..2017cf2bd1 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_classified.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_classified.xml @@ -7,7 +7,7 @@ name="classified_preview" help_topic="classified_preview" save_rect="true" - title="Classified Information" + title="CLASSIFIED INFORMATION" width="440"> <floater.string name="Title"> diff --git a/indra/newview/skins/default/xui/en/floater_preview_event.xml b/indra/newview/skins/default/xui/en/floater_preview_event.xml index f5ab8c95d7..a4066b34c5 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_event.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_event.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" auto_tile="true" @@ -7,7 +7,7 @@ name="event_preview" help_topic="event_preview" save_rect="true" - title="Event Information" + title="EVENT INFORMATION" width="440"> <floater.string name="Title"> diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture_info.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture_info.xml index fc838f27b4..66408a5057 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture_info.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture_info.xml @@ -8,7 +8,7 @@ name="Gesture" help_topic="gesture" save_rect="true" - title="Gesture Shortcut" + title="GESTURE SHORTCUT" width="260"> <scroll_list follows="top|left" @@ -54,4 +54,4 @@ name="save_btn" top_delta="0" width="80" /--> -</floater>
\ No newline at end of file +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture_shortcut.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture_shortcut.xml index b489ae2e77..26252a7a16 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture_shortcut.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture_shortcut.xml @@ -8,7 +8,7 @@ name="Gesture" help_topic="gesture" save_rect="true" - title="Gesture Shortcut" + title="GESTURE SHORTCUT" width="260"> <text type="string" @@ -85,4 +85,4 @@ tool_tip="Replace the trigger word(s) with these words. For example, trigger 'hello' replace with 'howdy' will turn the chat 'I wanted to say hello' into 'I wanted to say howdy' as well as playing the gesture" top_delta="-4" width="135" /> -</floater>
\ No newline at end of file +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture_steps.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture_steps.xml index 8a07f3ad1e..34f707cd2a 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture_steps.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture_steps.xml @@ -8,7 +8,7 @@ name="Gesture" help_topic="gesture" save_rect="true" - title="Gesture Shortcut" + title="GESTURE SHORTCUT" width="260"> <scroll_list follows="top|left" @@ -239,4 +239,4 @@ unless you add wait steps. name="wait_time_editor" top_delta="0" width="50" /--> -</floater>
\ No newline at end of file +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml index b44de8e178..06dbdc9539 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml @@ -11,7 +11,7 @@ min_width="234" name="preview notecard" help_topic="preview_notecard" - title="Note:" + title="NOTE:" width="400"> <floater.string name="no_object"> 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 ae01d0bdf4..9bb30f8e86 100644 --- a/indra/newview/skins/default/xui/en/floater_region_info.xml +++ b/indra/newview/skins/default/xui/en/floater_region_info.xml @@ -6,7 +6,7 @@ layout="topleft" name="regioninfo" save_rect="true" - title="Region/Estate" + title="REGION/ESTATE" width="480"> <tab_container bottom="512" diff --git a/indra/newview/skins/default/xui/en/floater_report_abuse.xml b/indra/newview/skins/default/xui/en/floater_report_abuse.xml index 88f09b521c..696233676c 100644 --- a/indra/newview/skins/default/xui/en/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/en/floater_report_abuse.xml @@ -5,7 +5,7 @@ layout="topleft" name="floater_report_abuse" help_topic="floater_report_abuse" - title="Report Abuse" + title="REPORT ABUSE" width="333"> <floater.string name="Screenshot"> @@ -126,7 +126,6 @@ layout="topleft" left_delta="0" name="pick_btn" - picture_style="true" image_overlay="Inv_Object" tool_tip="Object Picker - Identify an object as the subject of this report" top_pad="0" diff --git a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml index 0029fcb09b..bd9925be1d 100644 --- a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml +++ b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml @@ -7,8 +7,8 @@ layout="topleft" name="script" help_topic="script" - short_title="[All scripts]" - title="[All scripts]" + short_title="[ALL SCRIPTS]" + title="[ALL SCRIPTS]" width="440"> <text_editor bottom="197" diff --git a/indra/newview/skins/default/xui/en/floater_script_preview.xml b/indra/newview/skins/default/xui/en/floater_script_preview.xml index c29a2f4516..bb0702c353 100644 --- a/indra/newview/skins/default/xui/en/floater_script_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_script_preview.xml @@ -11,7 +11,7 @@ name="preview lsl text" help_topic="preview_lsl_text" save_rect="true" - title="Script: Rotation Script" + title="SCRIPT: ROTATION SCRIPT" top_delta="0" width="500"> <floater.string diff --git a/indra/newview/skins/default/xui/en/floater_script_queue.xml b/indra/newview/skins/default/xui/en/floater_script_queue.xml index 8a44252426..60a26fcf1d 100644 --- a/indra/newview/skins/default/xui/en/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/en/floater_script_queue.xml @@ -8,7 +8,7 @@ name="queue" help_topic="queue" save_rect="true" - title="Reset Progress" + title="RESET PROGRESS" width="300"> <floater.string name="Starting"> diff --git a/indra/newview/skins/default/xui/en/floater_script_search.xml b/indra/newview/skins/default/xui/en/floater_script_search.xml index 79c4438dd6..ade0156bc7 100644 --- a/indra/newview/skins/default/xui/en/floater_script_search.xml +++ b/indra/newview/skins/default/xui/en/floater_script_search.xml @@ -6,7 +6,7 @@ layout="topleft" name="script search" help_topic="script_search" - title="Script Search" + title="SCRIPT SEARCH" width="300"> <check_box control_name="LSLFindCaseInsensitivity" diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index 2f4d7c50a1..f7ba719dc2 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -10,7 +10,7 @@ help_topic="floater_search" save_rect="true" single_instance="true" - title="Search [SECOND_LIFE]" + title="SEARCH [SECOND_LIFE]" width="620"> <floater.string name="search_url"> diff --git a/indra/newview/skins/default/xui/en/floater_sell_land.xml b/indra/newview/skins/default/xui/en/floater_sell_land.xml index 8fedd0a89f..2cf800fb15 100644 --- a/indra/newview/skins/default/xui/en/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/en/floater_sell_land.xml @@ -7,13 +7,12 @@ name="sell land" help_topic="sell_land" single_instance="true" - title="Sell Land" + title="SELL LAND" width="313"> <scroll_container color="DkGray2" follows="left|top|right|bottom" height="435" - min_height="300" layout="topleft" name="profile_scroll" reserve_scroll_corner="true" @@ -96,27 +95,16 @@ width="200"> To sell this parcel: </text> - <icon - follows="top|left" - height="64" - image_name="badge_note.j2c" - layout="topleft" - left="0" - name="step_price" - top="206" - width="64" /> <text type="string" length="1" - bottom_delta="-38" follows="top|left" font="SansSerif" height="16" layout="topleft" - left="72" - name="price_label" - right="-20"> - Set a price: + left="30" + name="price_label"> + 1. Set a price: </text> <text type="string" @@ -124,9 +112,8 @@ follows="top|left" height="16" layout="topleft" - left="72" - name="price_text" - right="-20"> + left="40" + name="price_text"> Choose an appropriate price. </text> <text @@ -134,7 +121,7 @@ length="1" height="16" layout="topleft" - left="72" + left="40" name="price_ld" width="20"> L$ @@ -156,32 +143,22 @@ length="1" height="16" layout="topleft" - left="72" + left="40" name="price_per_m" top_delta="25" width="200"> (L$[PER_METER] per m²) </text> - <icon - follows="top|left" - height="64" - image_name="badge_note.j2c" - layout="topleft" - left="0" - name="step_sell_to" - width="64" /> <text type="string" length="1" - bottom_delta="-38" follows="top|left" font="SansSerif" height="16" layout="topleft" - left="72" - name="sell_to_label" - right="-20"> - Sell the land to: + left="30" + name="sell_to_label"> + 2. Sell the land to: </text> <text type="string" @@ -189,7 +166,7 @@ follows="top|left" height="25" layout="topleft" - left="72" + left="40" word_wrap="true" name="sell_to_text" right="-20"> @@ -235,26 +212,16 @@ name="sell_to_select_agent" top_delta="0" width="60" /> - <icon - follows="top|left" - height="64" - image_name="badge_note.j2c" - layout="topleft" - left="0" - name="step_sell_objects" - width="64" /> <text type="string" length="1" - bottom_delta="-38" follows="top|left" font="SansSerif" height="16" layout="topleft" - left="72" - name="sell_objects_label" - right="-20"> - Sell the objects with the land? + left="30" + name="sell_objects_label"> + 3. Sell the objects with the land? </text> <text type="string" @@ -264,7 +231,7 @@ height="25" layout="topleft" word_wrap="true" - left="72" + left="40" name="sell_objects_text"> Land owner's transferable objects on parcel will change ownership. </text> @@ -273,7 +240,7 @@ follows="top|right" height="40" layout="topleft" - left="72" + left="40" name="sell_objects" right="420"> <radio_item @@ -304,7 +271,7 @@ label="Show Objects" layout="topleft" name="show_objects" - left="100" + left="70" top_pad="10" width="110" /> <text diff --git a/indra/newview/skins/default/xui/en/floater_settings_debug.xml b/indra/newview/skins/default/xui/en/floater_settings_debug.xml index 02b3cee97c..ffb11f3f18 100644 --- a/indra/newview/skins/default/xui/en/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/en/floater_settings_debug.xml @@ -6,7 +6,7 @@ layout="topleft" name="settings_debug" help_topic="settings_debug" - title="Debug Settings" + title="DEBUG SETTINGS" width="350"> <combo_box allow_text_entry="true" diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 4f2be37ade..95a40e27f7 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -8,7 +8,7 @@ name="Snapshot" help_topic="snapshot" save_rect="true" - title="Snapshot Preview" + title="SNAPSHOT PREVIEW" width="215"> <floater.string name="unknown"> diff --git a/indra/newview/skins/default/xui/en/floater_sound_preview.xml b/indra/newview/skins/default/xui/en/floater_sound_preview.xml index 6145b722f1..ca54ee6604 100644 --- a/indra/newview/skins/default/xui/en/floater_sound_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_sound_preview.xml @@ -5,7 +5,7 @@ layout="topleft" name="Sound Preview" help_topic="sound_preview" - title="sound.wav" + title="SOUND.WAV" width="300"> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_statistics.xml b/indra/newview/skins/default/xui/en/floater_statistics.xml index ab783b0735..3a4e845141 100644 --- a/indra/newview/skins/default/xui/en/floater_statistics.xml +++ b/indra/newview/skins/default/xui/en/floater_statistics.xml @@ -8,5 +8,5 @@ mouse_opaque="false" name="stats floater" help_topic="stats_floater" - title="Statistics" + title="STATISTICS" width="250" /> diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml index bdc2874281..68a4867167 100644 --- a/indra/newview/skins/default/xui/en/floater_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_stats.xml @@ -9,7 +9,7 @@ help_topic="statistics" save_rect="true" save_visibility="true" - title="Statistics" + title="STATISTICS" width="250"> <scroll_container follows="top|left|bottom|right" diff --git a/indra/newview/skins/default/xui/en/floater_telehub.xml b/indra/newview/skins/default/xui/en/floater_telehub.xml index faf1a378f2..cc0ab8c57e 100644 --- a/indra/newview/skins/default/xui/en/floater_telehub.xml +++ b/indra/newview/skins/default/xui/en/floater_telehub.xml @@ -5,7 +5,7 @@ layout="topleft" name="telehub" help_topic="telehub" - title="Telehub" + title="TELEHUB" width="280"> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_test_button.xml b/indra/newview/skins/default/xui/en/floater_test_button.xml index 89a1ddda99..2bd0d1a0fa 100644 --- a/indra/newview/skins/default/xui/en/floater_test_button.xml +++ b/indra/newview/skins/default/xui/en/floater_test_button.xml @@ -96,7 +96,6 @@ layout="topleft" left="200" name="image_button" - picture_style="true" top="20" width="16" /> <button @@ -107,7 +106,6 @@ layout="topleft" left_delta="0" name="image_color_button" - picture_style="true" top_pad="10" width="16" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_test_inspectors.xml b/indra/newview/skins/default/xui/en/floater_test_inspectors.xml index c954607ffe..9143048aeb 100644 --- a/indra/newview/skins/default/xui/en/floater_test_inspectors.xml +++ b/indra/newview/skins/default/xui/en/floater_test_inspectors.xml @@ -6,7 +6,7 @@ layout="topleft" name="floater_test_inspectors" help_topic="floater_test_inspectors" - title="Test Inspectors" + title="TEST INSPECTORS" width="400"> <text height="20" diff --git a/indra/newview/skins/default/xui/en/floater_test_textbox.xml b/indra/newview/skins/default/xui/en/floater_test_textbox.xml index f39d27761c..8dba05f1ee 100644 --- a/indra/newview/skins/default/xui/en/floater_test_textbox.xml +++ b/indra/newview/skins/default/xui/en/floater_test_textbox.xml @@ -2,11 +2,11 @@ <floater legacy_header_height="18" can_resize="true" - height="400" + height="450" layout="topleft" name="floater_test_textbox" help_topic="floater_test_textbox" - width="400"> + width="600"> <text type="string" length="1" @@ -48,61 +48,80 @@ First line of multiple lines Second line of multiple lines </text> + <text + top_pad="10" + left="10" + right="-10" + follows="top|left" + font.name="SansSerifSmall" + name="test_text10" + tool_tip="text"> + SansSerifSmall. Русский 中文 (简体) The quick brown fox jumped over the lazy dog. + </text> + <text + top_pad="10" + left="10" + right="-10" + follows="top|left" + font.name="SansSerif" + name="test_text11" + tool_tip="text"> + SansSerif. Русский 中文 (简体) The quick brown fox jumped over the lazy dog. + </text> + <text + top_pad="10" + left="10" + right="-10" + follows="top|left" + font.name="SansSerifLarge" + name="test_text12" + tool_tip="text"> + SansSerifLarge. Русский 中文 (简体) The quick brown fox jumped over the lazy dog. + </text> + <text + top_pad="10" + left="10" + right="-10" + follows="top|left" + font.name="SansSerifHuge" + name="test_text13" + tool_tip="text"> + SansSerifHuge. Русский 中文 (简体) The quick brown fox jumped over the lazy dog. + </text> <text type="string" length="1" font="SansSerif" - height="10" - layout="topleft" - left_delta="0" - top_pad="30" - width="300"> - font SansSerif - </text> - <text - type="string" - length="1" - follows="bottom|right" - height="10" - layout="topleft" - left_delta="0" - top_pad="10" - width="300"> - follows bottom right - </text> - <text - type="string" - length="1" - font="SansSerifSmall" font.style="BOLD" height="10" layout="topleft" left_delta="0" - top_pad="10" + top_pad="40" width="300"> - font style BOLD + SansSerif BOLD </text> <text type="string" length="1" - font="SansSerifSmall" + font="SansSerif" font.style="BOLD|UNDERLINE" height="10" layout="topleft" left_delta="0" top_pad="10" width="300"> - font style BOLD UNDERLINE + SansSerif BOLD UNDERLINE </text> <text type="string" length="1" + font="SansSerif" height="10" layout="topleft" left_delta="0" top_pad="10" width="300"> - font style UNDERLINE + SansSerif UNDERLINE </text> <text type="string" @@ -145,11 +164,11 @@ <text type="string" length="1" - bottom="390" + height="60" label="N" layout="topleft" left="10" - name="centered_text" + name="left_aligned_text" width="380" halign="left" text_color="1 1 1 0.7" 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 129fd863dd..44dcb07526 100644 --- a/indra/newview/skins/default/xui/en/floater_test_widgets.xml +++ b/indra/newview/skins/default/xui/en/floater_test_widgets.xml @@ -18,7 +18,7 @@ legacy_header_height="18" can_dock="true" can_resize="true" - title="Test Floater" + title="TEST FLOATER" height="500" min_width="850" min_height="500" @@ -338,13 +338,13 @@ line to actually fit height="400" halign="center" layout="topleft" - left="575" + left="525" name="group_tab_container" tab_position="top" tab_height="20" tool_tip="tab container" top="80" - width="250"> + width="300"> <!-- "panel" is a container for widgets. It is automatically resized to fit the parent tab_container. --> <panel @@ -380,6 +380,46 @@ line to actually fit tool_tip="Color Swatch: Click to open Color Picker" top_delta="0" width="80" /> + <text + top_pad="10" + left="10" + width="250" + follows="top|left" + font.name="SansSerifSmall" + name="test_text10" + tool_tip="text"> + SansSerifSmall. Русский 中文 (简体) + </text> + <text + top_pad="10" + left="10" + width="250" + follows="top|left" + font.name="SansSerif" + name="test_text11" + tool_tip="text"> + SansSerif. Русский 中文 (简体) + </text> + <text + top_pad="10" + left="10" + width="250" + follows="top|left" + font.name="SansSerifLarge" + name="test_text12" + tool_tip="text"> + SansSerifLarge. Русский 中文 (简体) + </text> + <text + top_pad="10" + left="10" + width="250" + follows="top|left" + font.name="SansSerifHuge" + name="test_text13" + tool_tip="text"> + SansSerifHuge. Русский 中文 (简体) + </text> </panel> <!-- panels can also refer to other floaters or panels --> <panel diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml index 0a1f6e0e29..4679ae467d 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml @@ -9,7 +9,7 @@ min_width="410" name="texture picker" help_topic="texture_picker" - title="Pick: Texture" + title="PICK: TEXTURE" width="410"> <floater.string name="choose_picture"> @@ -23,14 +23,16 @@ type="string" length="1" follows="left|top" + text_color="White" + font="SansSerifBig" halign="center" - height="14" + height="17" layout="topleft" left="4" name="Multiple" top="96" width="163"> - Multiple + Multiple textures </text> <text type="string" @@ -42,7 +44,7 @@ name="unknown" top_pad="80" width="163"> - Dimensions: [DIMENSIONS] + Size: [DIMENSIONS] </text> <button enabled="false" @@ -55,7 +57,7 @@ left_delta="0" name="Default" top_pad="4" - width="64" /> + width="80" /> <button enabled="false" follows="left|bottom" @@ -67,7 +69,7 @@ left_pad="4" name="None" top_delta="0" - width="64" /> + width="80" /> <button follows="left|bottom" font="SansSerifSmall" @@ -77,75 +79,75 @@ layout="topleft" left="4" name="Blank" - top="232" - width="64" /> - <check_box - height="24" + top_pad="5" + width="80" /> + <button + follows="left|bottom" + height="28" + image_selected="eye_button_active.tga" + image_unselected="eye_button_inactive.tga" + layout="topleft" + left_pad="50" + top_delta="3" + name="Pipette" + width="28" /> + <check_box + follows="left|bottom" + height="20" initial_value="true" - label="Show Folders" + label="Apply now" layout="topleft" - left="175" - name="show_folders_check" - top="20" - width="201" /> + left="4" + name="apply_immediate_check" + top="262" + width="120" /> <filter_editor follows="left|top|right" - height="16" - label="Type here to search" + height="23" + label="Filter textures" layout="topleft" - left_delta="0" + left="175" name="inventory search editor" - top_delta="0" + top="20" width="231" /> <inventory_panel allow_multi_select="false" - border="true" - follows="left|top|right|bottom" - height="216" + bg_visible="true" + bg_alpha_color="DkGray2" + border="false" + follows="all" + height="200" layout="topleft" left_delta="0" name="inventory panel" top_pad="4" width="231" /> - <check_box - follows="left|bottom" - height="20" - initial_value="true" - label="Apply Immediately" - layout="topleft" - left="4" - name="apply_immediate_check" - top="262" - width="150" /> - <button - follows="left|bottom" - height="32" - image_selected="eye_button_active.tga" - image_unselected="eye_button_inactive.tga" + <check_box + height="14" + initial_value="false" + label="Show folders" layout="topleft" - left="139" - name="Pipette" - picture_style="true" - top="250" - width="32" /> - <button + name="show_folders_check" + top_pad="0" + left_delta="-3" + width="200" /> + <button follows="right|bottom" height="20" - label="Cancel" - label_selected="Cancel" + label="Ok" + label_selected="Ok" layout="topleft" - left="186" - name="Cancel" - top="262" + right="-120" + name="Select" width="100" /> <button follows="right|bottom" height="20" - label="Select" - label_selected="Select" + label="Cancel" + label_selected="Cancel" layout="topleft" - left_pad="4" - name="Select" - top_delta="0" + right="-10" + left_pad="5" + name="Cancel" width="100" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index fc736211de..c33d7cf31d 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -9,7 +9,7 @@ name="toolbox floater" help_topic="toolbox_floater" save_rect="true" - short_title="Build Tools" + short_title="BUILD TOOLS" single_instance="true" sound_flags="0" width="280"> @@ -75,7 +75,6 @@ layout="topleft" left="10" name="button focus" - picture_style="true" tool_tip="Focus" width="20"> <button.commit_callback @@ -92,7 +91,6 @@ layout="topleft" left_pad="20" name="button move" - picture_style="true" tool_tip="Move" width="20"> <button.commit_callback @@ -109,7 +107,6 @@ layout="topleft" left_pad="20" name="button edit" - picture_style="true" tool_tip="Edit" width="20"> <button.commit_callback @@ -126,7 +123,6 @@ layout="topleft" left_pad="20" name="button create" - picture_style="true" tool_tip="Create" width="20"> <button.commit_callback @@ -143,7 +139,6 @@ layout="topleft" left_pad="20" name="button land" - picture_style="true" tool_tip="Land" width="20"> <button.commit_callback @@ -320,8 +315,6 @@ image_disabled="ForwardArrow_Disabled" image_selected="ForwardArrow_Press" image_unselected="ForwardArrow_Off" - picture_style="true" - label_selected="Options" layout="topleft" name="Options..." tool_tip="Grid options" @@ -342,7 +335,6 @@ layout="topleft" left="4" name="ToolCube" - picture_style="true" tool_tip="Cube" top="51" width="20" /> @@ -356,7 +348,6 @@ layout="topleft" left_delta="26" name="ToolPrism" - picture_style="true" tool_tip="Prism" top_delta="0" width="20" /> @@ -370,7 +361,6 @@ layout="topleft" left_delta="26" name="ToolPyramid" - picture_style="true" tool_tip="Pyramid" top_delta="0" width="20" /> @@ -384,7 +374,6 @@ layout="topleft" left_delta="26" name="ToolTetrahedron" - picture_style="true" tool_tip="Tetrahedron" top_delta="0" width="20" /> @@ -398,7 +387,6 @@ layout="topleft" left_delta="26" name="ToolCylinder" - picture_style="true" tool_tip="Cylinder" top_delta="0" width="20" /> @@ -412,7 +400,6 @@ layout="topleft" left_delta="26" name="ToolHemiCylinder" - picture_style="true" tool_tip="Hemicylinder" top_delta="0" width="20" /> @@ -426,7 +413,6 @@ layout="topleft" left_delta="26" name="ToolCone" - picture_style="true" tool_tip="Cone" top_delta="0" width="20" /> @@ -440,7 +426,6 @@ layout="topleft" left_delta="26" name="ToolHemiCone" - picture_style="true" tool_tip="Hemicone" top_delta="0" width="20" /> @@ -454,7 +439,6 @@ layout="topleft" left_delta="26" name="ToolSphere" - picture_style="true" tool_tip="Sphere" top_delta="0" width="20" /> @@ -468,7 +452,6 @@ layout="topleft" left_delta="26" name="ToolHemiSphere" - picture_style="true" tool_tip="Hemisphere" top_delta="0" width="20" /> @@ -482,7 +465,6 @@ layout="topleft" left="4" name="ToolTorus" - picture_style="true" tool_tip="Torus" top="77" width="20" /> @@ -496,7 +478,6 @@ layout="topleft" left_delta="26" name="ToolTube" - picture_style="true" tool_tip="Tube" top_delta="0" width="20" /> @@ -510,7 +491,6 @@ layout="topleft" left_delta="26" name="ToolRing" - picture_style="true" tool_tip="Ring" top_delta="0" width="20" /> @@ -524,7 +504,6 @@ layout="topleft" left_delta="26" name="ToolTree" - picture_style="true" tool_tip="Tree" top_delta="0" width="20" /> @@ -538,7 +517,6 @@ layout="topleft" left_delta="26" name="ToolGrass" - picture_style="true" tool_tip="Grass" top_delta="0" width="20" /> @@ -927,7 +905,6 @@ left_pad="0" top_delta="0" name="button set group" - picture_style="true" tab_stop="false" tool_tip="Choose a group to share this object's permissions" width="10" /> @@ -1034,8 +1011,11 @@ label="Original" value="1" /> </combo_box> -<!-- NEW PRICE SPINNER --> - <spinner +<!-- NEW PRICE SPINNER +Objects are allowed to be for sale for L$0 to invoke buy UI behavior +even though the user gets a free copy. +--> + <spinner follows="left|top" decimal_digits="0" increment="1" @@ -1046,7 +1026,7 @@ label="Price: L$" label_width="65" width="150" - min_val="1" + min_val="0" height="20" max_val="999999999" /> <check_box @@ -2700,7 +2680,6 @@ layout="topleft" left_pad="0" name="add_media" - picture_style="true" tab_stop="false" top_delta="0" tool_tip="Add Media" @@ -2716,7 +2695,6 @@ layout="topleft" left_pad="5" name="delete_media" - picture_style="true" tool_tip="Delete this media texture" top_delta="0" width="18"> @@ -2733,7 +2711,6 @@ layout="topleft" left_pad="10" name="edit_media" - picture_style="true" top_delta="0" width="18"> <button.commit_callback diff --git a/indra/newview/skins/default/xui/en/floater_top_objects.xml b/indra/newview/skins/default/xui/en/floater_top_objects.xml index 2f53422d51..d2db26daec 100644 --- a/indra/newview/skins/default/xui/en/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/en/floater_top_objects.xml @@ -8,7 +8,7 @@ min_width="450" name="top_objects" help_topic="top_objects" - title="loading..." + title="LOADING..." width="550"> <floater.string name="top_scripts_title"> diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml index 380e51977f..8b2136c2dc 100644 --- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml @@ -9,7 +9,7 @@ name="gui_preview_tool" help_topic="gui_preview_tool" single_instance="true" - title="XUI Preview Tool" + title="XUI PREVIEW TOOL" width="750"> <panel bottom="640" diff --git a/indra/newview/skins/default/xui/en/floater_water.xml b/indra/newview/skins/default/xui/en/floater_water.xml index 012b69c3e3..b13a11c05d 100644 --- a/indra/newview/skins/default/xui/en/floater_water.xml +++ b/indra/newview/skins/default/xui/en/floater_water.xml @@ -6,7 +6,7 @@ name="Water Floater" help_topic="water_floater" save_rect="true" - title="Advanced Water Editor" + title="ADVANCED WATER EDITOR" width="700"> <floater.string name="WLDefaultWaterNames"> @@ -16,7 +16,7 @@ type="string" length="1" follows="left|top|right" - font="SansSerif" + font.style="BOLD" height="16" layout="topleft" left="10" @@ -28,7 +28,7 @@ <combo_box height="18" layout="topleft" - left_delta="110" + left_pad="10" name="WaterPresetsCombo" top_delta="-2" width="150" /> @@ -40,7 +40,7 @@ left_pad="20" name="WaterNewPreset" top_delta="1" - width="70" /> + width="90" /> <button height="20" label="Save" @@ -49,7 +49,7 @@ left_pad="10" name="WaterSavePreset" top_delta="0" - width="70" /> + width="90" /> <button height="20" label="Delete" @@ -58,8 +58,9 @@ left_pad="10" name="WaterDeletePreset" top_delta="0" - width="70" /> + width="90" /> <tab_container + border="false" follows="left|top" height="180" halign="center" @@ -67,20 +68,20 @@ left="0" name="Water Tabs" tab_position="top" - tab_height="20" top="60" width="700"> <panel border="true" - follows="left|top|right|bottom" + border_color="EmphasisColor" + follows="all" height="180" label="Settings" layout="topleft" - left="1" + left="0" mouse_opaque="false" help_topic="water_settings_tab" name="Settings" - top="60" + top="0" width="698"> <text type="string" @@ -92,11 +93,10 @@ left="10" name="BHText" top="4" - width="355"> + width="200"> Water Fog Color </text> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" color="0.5 0.5 0.5 1" follows="left|top" @@ -117,7 +117,7 @@ left="10" name="WaterFogDensText" top="74" - width="355"> + width="200"> Fog Density Exponent </text> <slider @@ -142,7 +142,7 @@ left_delta="-14" name="WaterUnderWaterFogModText" top_delta="4" - width="355"> + width="200"> Underwater Fog Modifier </text> <slider @@ -167,83 +167,44 @@ left="245" name="BDensText" top="4" - width="355"> + width="200"> Reflection Wavelet Scale </text> - <text - type="string" - length="1" - follows="left|top|right" - halign="center" - height="16" - layout="topleft" - left="245" - name="BHText2" - top="21" - width="10"> - 1 - </text> - <text - type="string" - length="1" - follows="left|top|right" - halign="center" - height="16" - layout="topleft" - left_delta="0" - name="BHText3" - top_delta="11" - width="10"> - 2 - </text> - <text - type="string" - length="1" - follows="left|top|right" - halign="center" - height="16" - layout="topleft" - left_delta="0" - name="BHText4" - top_delta="11" - width="10"> - 3 - </text> <slider control_name="WaterNormalScaleX" decimal_digits="1" follows="left" - height="10" + height="15" initial_value="0.7" + label="1" layout="topleft" - left_pad="4" max_val="10" name="WaterNormalScaleX" - top_delta="-3" + top_pad="20" width="200" /> <slider control_name="WaterNormalScaleY" decimal_digits="1" follows="left" - height="10" + height="15" initial_value="0.7" + label="2" layout="topleft" - left_delta="0" max_val="10" name="WaterNormalScaleY" - top_pad="1" + top_pad="0" width="200" /> <slider control_name="WaterNormalScaleZ" decimal_digits="1" follows="left" - height="10" + height="15" initial_value="0.7" + label="3" layout="topleft" - left_delta="0" max_val="10" name="WaterNormalScaleZ" - top_pad="1" + top_pad="0" width="200" /> <text type="string" @@ -252,10 +213,9 @@ font="SansSerif" height="16" layout="topleft" - left_delta="-14" name="HDText" - top_delta="2" - width="355"> + top_pad="-10" + width="200"> Fresnel Scale </text> <slider @@ -266,9 +226,8 @@ increment="0.01" initial_value="0.7" layout="topleft" - left="259" name="WaterFresnelScale" - top="100" + top_pad="20" width="200" /> <text type="string" @@ -277,10 +236,9 @@ font="SansSerif" height="16" layout="topleft" - left_delta="-14" name="FresnelOffsetText" - top_delta="-1" - width="355"> + top_pad="-10" + width="200"> Fresnel Offset </text> <slider @@ -291,9 +249,8 @@ increment="0.01" initial_value="0.7" layout="topleft" - left="259" name="WaterFresnelOffset" - top="135" + top_pad="20" width="200" /> <text type="string" @@ -305,7 +262,7 @@ left="480" name="DensMultText" top="4" - width="355"> + width="200"> Refract Scale Above </text> <slider @@ -330,7 +287,7 @@ left_delta="-14" name="WaterScaleBelowText" top_delta="-3" - width="355"> + width="200"> Refract Scale Below </text> <slider @@ -355,7 +312,7 @@ left_delta="-14" name="MaxAltText" top_delta="-2" - width="355"> + width="200"> Blur Multiplier </text> <slider @@ -373,15 +330,15 @@ </panel> <panel border="true" - follows="left|top|right|bottom" + follows="all" height="180" label="Image" layout="topleft" - left_delta="0" + left="0" mouse_opaque="false" help_topic="water_waves_tab" name="Waves" - top_delta="44" + top="0" width="698"> <text type="string" @@ -392,8 +349,8 @@ layout="topleft" left="10" name="BHText" - top="4" - width="355"> + top="10" + width="200"> Big Wave Direction </text> <text @@ -405,7 +362,7 @@ layout="topleft" left="10" name="WaterWave1DirXText" - top="21" + top_pad="4" width="10"> X </text> @@ -418,7 +375,7 @@ layout="topleft" left_delta="0" name="WaterWave1DirYText" - top_delta="11" + top_delta="18" width="10"> Y </text> @@ -434,7 +391,7 @@ max_val="4" min_val="-4" name="WaterWave1DirX" - top="40" + top="55" width="200" /> <slider control_name="WaterWave1DirY" @@ -448,7 +405,7 @@ max_val="4" min_val="-4" name="WaterWave1DirY" - top_pad="1" + top_pad="5" width="200" /> <text type="string" @@ -472,7 +429,7 @@ layout="topleft" left="10" name="WaterWave2DirXText" - top="71" + top="90" width="10"> X </text> @@ -485,7 +442,7 @@ layout="topleft" left_delta="0" name="WaterWave2DirYText" - top_delta="11" + top_delta="20" width="10"> Y </text> @@ -501,7 +458,7 @@ max_val="4" min_val="-4" name="WaterWave2DirX" - top="90" + top="115" width="200" /> <slider control_name="WaterWave2DirY" @@ -515,7 +472,7 @@ max_val="4" min_val="-4" name="WaterWave2DirY" - top_pad="1" + top_pad="10" width="200" /> <text type="string" @@ -527,7 +484,7 @@ left="240" name="BHText3" top="4" - width="355"> + width="200"> Normal Map </text> <texture_picker diff --git a/indra/newview/skins/default/xui/en/floater_windlight_options.xml b/indra/newview/skins/default/xui/en/floater_windlight_options.xml index fd905d7a14..0cb7814c6a 100644 --- a/indra/newview/skins/default/xui/en/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/en/floater_windlight_options.xml @@ -6,7 +6,7 @@ name="WindLight floater" help_topic="windlight_floater" save_rect="true" - title="Advanced Sky Editor" + title="ADVANCED SKY EDITOR" width="700"> <floater.string name="WLDefaultSkyNames"> 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 93755fa253..387ffbd5b3 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -13,40 +13,17 @@ save_rect="true" save_visibility="true" single_instance="true" - title="World Map" + title="WORLD MAP" width="800"> - <tab_container + <panel + filename="panel_world_map.xml" follows="left|top|right|bottom" height="565" layout="topleft" left="15" - name="maptab" - tab_position="top" + name="objects_mapview" top="25" - width="542"> - <panel - filename="panel_world_map.xml" - follows="left|top|right|bottom" - height="550" - label="Objects" - layout="topleft" - left="1" - help_topic="worldmap_objects_tab" - name="objects_mapview" - top="19" - width="540" /> - <panel - filename="panel_world_map.xml" - follows="left|top|right|bottom" - height="550" - label="Terrain" - layout="topleft" - left_delta="0" - help_topic="worldmap_terrain_tab" - name="terrain_mapview" - top_delta="3" - width="540" /> - </tab_container> + width="542" /> <icon follows="top|right" height="16" @@ -210,7 +187,7 @@ label="Telehub" layout="topleft" left_pad="4" - name="telehubchk" + name="telehub_chk" top_delta="0" width="110" /> <icon diff --git a/indra/newview/skins/default/xui/en/fonts.xml b/indra/newview/skins/default/xui/en/fonts.xml index 65dfb13f4a..f3da62a896 100644 --- a/indra/newview/skins/default/xui/en/fonts.xml +++ b/indra/newview/skins/default/xui/en/fonts.xml @@ -150,11 +150,9 @@ comment="Size of large font (points, or 1/72 of an inch)" size="10.0" /> - <!-- Changed Medium size to address menu font size not matching spec. - May want to revert/update after menu font configuration has been enabled. --> <font_size name="Medium" comment="Size of medium font (points, or 1/72 of an inch)" - size="8.0" + size="9.0" /> <font_size name="Small" comment="Size of small font (points, or 1/72 of an inch)" diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml index 6b13e2f1c7..2c1e2b6dc0 100644 --- a/indra/newview/skins/default/xui/en/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml @@ -102,7 +102,6 @@ left_pad="0" top_delta="4" name="mute_btn" - picture_style="true" width="16" /> <avatar_icon follows="all" @@ -122,12 +121,13 @@ image_unselected="ForwardArrow_Off" layout="topleft" name="view_profile_btn" - picture_style="true" right="-8" top="35" left_delta="110" tab_stop="false" width="18" /> + <!-- Overlapping buttons for default actions + llinspectavatar.cpp makes visible the most likely default action --> <button follows="bottom|left" height="23" @@ -136,6 +136,16 @@ top="246" name="add_friend_btn" width="100" /> + <button + follows="bottom|left" + height="23" + label="IM" + left_delta="0" + top_delta="0" + name="im_btn" + width="100" + commit_callback.function="InspectAvatar.IM" + /> <menu_button follows="top|left" height="18" @@ -144,7 +154,6 @@ image_unselected="OptionsMenu_Off" menu_filename="menu_inspect_avatar_gear.xml" name="gear_btn" - picture_style="true" right="-10" top="249" width="18" /> @@ -157,7 +166,6 @@ image_unselected="OptionsMenu_Off" menu_filename="menu_inspect_self_gear.xml" name="gear_self_btn" - picture_style="true" right="-10" top="249" width="18" /> diff --git a/indra/newview/skins/default/xui/en/inspect_group.xml b/indra/newview/skins/default/xui/en/inspect_group.xml index 42a492090d..e5e5007c56 100644 --- a/indra/newview/skins/default/xui/en/inspect_group.xml +++ b/indra/newview/skins/default/xui/en/inspect_group.xml @@ -82,7 +82,6 @@ L$123 to join image_selected="ForwardArrow_Press" image_unselected="ForwardArrow_Off" name="view_profile_btn" - picture_style="true" right="-8" top="35" left_delta="110" diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml index fe492e0ae8..1365a0483f 100644 --- a/indra/newview/skins/default/xui/en/inspect_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_object.xml @@ -151,10 +151,11 @@ This is a really long description for an object being as how it is at least 80 c width="75" /> <icon name="secure_browsing" - image_name="map_infohub.tga" + image_name="Lock" left_delta="80" - width="16" - height="16" + visible="false" + width="18" + height="18" top_delta="2" tool_tip="Secure Browsing" follows="left|top"/> @@ -168,7 +169,6 @@ This is a really long description for an object being as how it is at least 80 c image_unselected="OptionsMenu_Off" menu_filename="menu_inspect_object_gear.xml" name="gear_btn" - picture_style="true" right="-10" top_delta="5" width="18" /> @@ -180,7 +180,6 @@ This is a really long description for an object being as how it is at least 80 c image_unselected="ForwardArrow_Off" layout="topleft" name="more_info_btn" - picture_style="true" right="-5" top="20" left_delta="110" diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml index 6049476a43..8ee67b9a02 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml @@ -7,7 +7,6 @@ name="Gear Menu">
<menu_item_call
label="View Profile"
- layout="topleft"
enabled="true"
name="view_profile">
<menu_item_call.on_click
@@ -15,49 +14,42 @@ </menu_item_call>
<menu_item_call
label="Add Friend"
- layout="topleft"
name="add_friend">
<menu_item_call.on_click
function="InspectAvatar.AddFriend"/>
</menu_item_call>
<menu_item_call
label="IM"
- layout="topleft"
name="im">
<menu_item_call.on_click
function="InspectAvatar.IM"/>
</menu_item_call>
<menu_item_call
label="Call"
- layout="topleft"
enabled="true"
name="call">
</menu_item_call>
<menu_item_call
label="Teleport"
- layout="topleft"
name="teleport">
<menu_item_call.on_click
function="InspectAvatar.Teleport"/>
</menu_item_call>
<menu_item_call
label="Invite to Group"
- layout="topleft"
name="invite_to_group">
<menu_item_call.on_click
function="InspectAvatar.InviteToGroup"/>
</menu_item_call>
- <menu_item_separator layout="topleft" />
+ <menu_item_separator />
<menu_item_call
label="Block"
- layout="topleft"
name="block">
<menu_item_call.on_click
function="InspectAvatar.Block"/>
</menu_item_call>
<menu_item_call
label="Report"
- layout="topleft"
name="report">
<menu_item_call.on_click
function="InspectAvatar.Report"/>
@@ -88,7 +80,6 @@ </menu_item_call>
<menu_item_call
label="Find On Map"
- layout="topleft"
name="find_on_map">
<menu_item_call.on_click
function="InspectAvatar.FindOnMap"/>
@@ -97,16 +88,14 @@ </menu_item_call>
<menu_item_call
label="Zoom In"
- layout="topleft"
name="zoom_in">
<menu_item_call.on_click
function="InspectAvatar.ZoomIn"/>
</menu_item_call>
<menu_item_call
label="Pay"
- layout="topleft"
name="pay">
<menu_item_call.on_click
function="InspectAvatar.Pay"/>
</menu_item_call>
-</menu>
\ No newline at end of file +</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 19c2bf3496..3d65878cf8 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 @@ -7,7 +7,6 @@ name="Gear Menu"> <menu_item_call label="Stand Up" - layout="topleft" enabled="true" name="stand_up"> <menu_item_call.on_click @@ -18,7 +17,6 @@ </menu_item_call> <menu_item_call label="My Appearance" - layout="topleft" name="my_appearance"> <menu_item_call.on_click function="ShowFloater" @@ -28,7 +26,6 @@ </menu_item_call> <menu_item_call label="My Profile" - layout="topleft" enabled="true" name="my_profile"> <menu_item_call.on_click @@ -37,17 +34,16 @@ </menu_item_call> <menu_item_call label="My Friends" - layout="topleft" name="my_friends"> <menu_item_call.on_click - function="Self.Friends" - parameter="" /> + function="SideTray.PanelPeopleTab" + parameter="friends_panel" /> </menu_item_call> <menu_item_call label="My Groups" - layout="topleft" name="my_groups"> <menu_item_call.on_click - function="Self.Groups" /> + function="SideTray.PanelPeopleTab" + parameter="groups_panel" /> </menu_item_call> -</menu>
\ No newline at end of file +</menu> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index c3ee6e250b..5eb0560962 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -10,22 +10,18 @@ <menu create_jump_keys="true" label="Me" - layout="topleft" name="File"> <menu_item_call label="Preferences" - layout="topleft" name="Preferences..." shortcut="control|P"> <menu_item_call.on_click function="ShowFloater" parameter="preferences" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator /> <menu_item_call label="Quit [APP_NAME]" - layout="topleft" name="Quit" shortcut="control|Q"> <menu_item_call.on_click @@ -36,7 +32,6 @@ <menu create_jump_keys="true" label="Edit" - layout="topleft" name="Edit" width="153"> </menu> @@ -44,22 +39,18 @@ <menu create_jump_keys="true" label="Help" - layout="topleft" name="Help"> <menu_item_call label="[SECOND_LIFE] Help" - layout="topleft" name="Second Life Help" shortcut="F1"> <menu_item_call.on_click function="ShowFloater" parameter="help f1" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator /> <menu_item_call label="About [APP_NAME]" - layout="topleft" name="About Second Life"> <menu_item_call.on_click function="ShowFloater" @@ -69,7 +60,6 @@ <menu create_jump_keys="true" label="Debug" - layout="topleft" name="Debug" tear_off="true"> <!-- Need a copy of the edit menu here so keyboard shortcuts like @@ -78,12 +68,10 @@ <menu create_jump_keys="true" label="Edit" - layout="topleft" name="Edit" tear_off="true"> <menu_item_call label="Undo" - layout="topleft" name="Undo" shortcut="control|Z"> <menu_item_call.on_click @@ -93,7 +81,6 @@ </menu_item_call> <menu_item_call label="Redo" - layout="topleft" name="Redo" shortcut="control|Y"> <menu_item_call.on_click @@ -101,11 +88,9 @@ <menu_item_call.on_enable function="Edit.EnableRedo" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator /> <menu_item_call label="Cut" - layout="topleft" name="Cut" shortcut="control|X"> <menu_item_call.on_click @@ -115,7 +100,6 @@ </menu_item_call> <menu_item_call label="Copy" - layout="topleft" name="Copy" shortcut="control|C"> <menu_item_call.on_click @@ -125,7 +109,6 @@ </menu_item_call> <menu_item_call label="Paste" - layout="topleft" name="Paste" shortcut="control|V"> <menu_item_call.on_click @@ -135,7 +118,6 @@ </menu_item_call> <menu_item_call label="Delete" - layout="topleft" name="Delete" shortcut="Del"> <menu_item_call.on_click @@ -145,7 +127,6 @@ </menu_item_call> <menu_item_call label="Duplicate" - layout="topleft" name="Duplicate" shortcut="control|D"> <menu_item_call.on_click @@ -153,11 +134,9 @@ <menu_item_call.on_enable function="Edit.EnableDuplicate" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator /> <menu_item_call label="Select All" - layout="topleft" name="Select All" shortcut="control|A"> <menu_item_call.on_click @@ -167,7 +146,6 @@ </menu_item_call> <menu_item_call label="Deselect" - layout="topleft" name="Deselect" shortcut="control|E"> <menu_item_call.on_click @@ -179,7 +157,6 @@ <menu_item_separator /> <menu_item_call label="Show Debug Settings" - layout="topleft" name="Debug Settings"> <menu_item_call.on_click function="Advanced.ShowDebugSettings" @@ -187,7 +164,6 @@ </menu_item_call> <menu_item_call label="UI/Color Settings" - layout="topleft" name="UI/Color Settings"> <menu_item_call.on_click function="Advanced.ShowDebugSettings" @@ -196,7 +172,6 @@ <menu_item_separator /> <menu_item_call label="XUI Preview Tool" - layout="topleft" name="UI Preview Tool" shortcut="control|T"> <menu_item_call.on_click @@ -205,33 +180,23 @@ </menu_item_call> <menu_item_separator /> <menu_item_call - label="Widget Test" - layout="topleft" - name="Widget Test" - shortcut="control|shift|T"> - <menu_item_call.on_click - function="ShowFloater" - parameter="test_widgets" /> - </menu_item_call> - <menu_item_call - label="Inspectors Test" - name="inspectors_test" - shortcut="control|shift|I" - > - <menu_item_call.on_click - function="ShowFloater" - parameter="test_inspectors" /> - </menu_item_call> - <menu_item_call label="Show Side Tray" name="Show Side Tray"> <menu_item_call.on_click function="Advanced.ShowSideTray" /> </menu_item_call> + <menu_item_check + label="Reg In Client Test (restart)" + name="Reg In Client Test (restart)"> + <menu_item_check.on_check + control="RegInClient" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="RegInClient" /> + </menu_item_check> <menu_item_separator /> <menu_item_call label="Show TOS" - layout="topleft" name="TOS"> <menu_item_call.on_click function="ShowFloater" @@ -239,7 +204,6 @@ </menu_item_call> <menu_item_call label="Show Critical Message" - layout="topleft" name="Critical"> <menu_item_call.on_click function="ShowFloater" diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml index eedb4383bb..f1117d1419 100644 --- a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml @@ -31,9 +31,6 @@ function="CheckControl" parameter="FriendsListShowIcons" /> </menu_item_check> - <menu_item_call name="organize_offline" label="Organize Offline Friends"> - <menu_item_call.on_click function="People.Friends.ViewSort.Action" userdata="organize_offline" /> - </menu_item_call> <menu_item_separator layout="topleft" /> <menu_item_call name="show_blocked_list" label="Show Blocked Residents & Objects"> <menu_item_call.on_click function="SideTray.ShowPanel" parameter="panel_block_list_sidetray" /> diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml index 2bec745410..6dd44255bf 100644 --- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml @@ -13,4 +13,15 @@ function="CheckControl" parameter="GroupListShowIcons" /> </menu_item_check> + <menu_item_check + label="Leave Selected Group" + layout="topleft" + name="Leave Selected Group"> + <menu_item_check.on_click + function="People.Groups.ViewSort.Action" + parameter="show_icons" /> + <menu_item_check.on_check + function="CheckControl" + parameter="GroupListShowIcons" /> + </menu_item_check> </menu> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 3f63f493b1..633c258ecc 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -114,25 +114,22 @@ layout="topleft" name="Communicate" tear_off="true"> - <menu_item_check + <menu_item_call label="My Friends" layout="topleft" name="My Friends" shortcut="control|shift|F"> - <menu_item_check.on_check - function="Floater.Visible" - parameter="contacts.friends" /> - <menu_item_check.on_click - function="Floater.Toggle" - parameter="contacts.friends" /> - </menu_item_check> + <menu_item_call.on_click + function="SideTray.PanelPeopleTab" + parameter="friends_panel" /> + </menu_item_call> <menu_item_call label="My Groups" layout="topleft" name="My Groups"> <menu_item_call.on_click - function="Floater.Show" - parameter="contacts.groups" /> + function="SideTray.PanelPeopleTab" + parameter="groups_panel" /> </menu_item_call> <menu_item_separator layout="topleft" /> @@ -155,18 +152,15 @@ function="Floater.Toggle" parameter="nearby_chat" /> </menu_item_check> - <menu_item_check - label="Nearby Speakers" + <menu_item_call + label="Nearby People" layout="topleft" name="Active Speakers" shortcut="control|shift|A"> - <menu_item_check.on_check - function="Floater.Visible" - parameter="active_speakers" /> - <menu_item_check.on_click - function="Floater.Toggle" - parameter="active_speakers" /> - </menu_item_check> + <menu_item_call.on_click + function="SideTray.PanelPeopleTab" + parameter="nearby_panel" /> + </menu_item_call> <menu_item_check label="Nearby Media" layout="topleft" @@ -1921,6 +1915,42 @@ parameter="debug" /> </menu_item_check> <menu_item_check + label="Notifications Console" + layout="topleft" + name="Notifications" + shortcut="control|shift|5"> + <menu_item_check.on_check + function="Advanced.CheckConsole" + parameter="notifications" /> + <menu_item_check.on_click + function="Floater.Show" + parameter="notifications_console" /> + </menu_item_check> + <menu_item_check + label="Texture Size Console" + layout="topleft" + name="Texture Size" + shortcut="control|shift|6"> + <menu_item_check.on_check + function="Advanced.CheckConsole" + parameter="texture size" /> + <menu_item_check.on_click + function="Advanced.ToggleConsole" + parameter="texture size" /> + </menu_item_check> + <menu_item_check + label="Texture Category Console" + layout="topleft" + name="Texture Category" + shortcut="control|shift|7"> + <menu_item_check.on_check + function="Advanced.CheckConsole" + parameter="texture category" /> + <menu_item_check.on_click + function="Advanced.ToggleConsole" + parameter="texture category" /> + </menu_item_check> + <menu_item_check label="Fast Timers" layout="topleft" name="Fast Timers" @@ -2477,19 +2507,43 @@ label="Disable Textures" name="Disable Textures"> <menu_item_check.on_check - function="Advanced.CheckDisableTextures" - parameter="DisableTextures" /> + function="CheckControl" + parameter="TextureDisable" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="TextureDisable" /> + </menu_item_check> + <menu_item_check + label="Full Res Textures" + layout="topleft" + name="Rull Res Textures"> + <menu_item_check.on_check + function="CheckControl" + parameter="TextureLoadFullRes" /> <menu_item_check.on_click - function="Advanced.ToggleDisableTextures" /> + function="ToggleControl" + parameter="TextureLoadFullRes" /> + </menu_item_check> + <menu_item_check + label="Audit Textures" + layout="topleft" + name="Audit Textures"> + <menu_item_check.on_check + function="CheckControl" + parameter="AuditTexture" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="AuditTexture" /> </menu_item_check> <menu_item_check label="Texture Atlas" name="Texture Atlas"> <menu_item_check.on_check - function="Advanced.CheckTextureAtlas" + function="CheckControl" parameter="TextureAtlas" /> <menu_item_check.on_click - function="Advanced.ToggleTextureAtlas" /> + function="ToggleControl" + parameter="TextureAtlas" /> </menu_item_check> <menu_item_check label="Render Attached Lights" @@ -2512,8 +2566,8 @@ parameter="RenderAttachedParticles" /> </menu_item_check> <menu_item_check - label="Hover Highlight Objects" - name="Hover Highlight Objects"> + label="Hover Glow Objects" + name="Hover Glow Objects"> <menu_item_check.on_check function="CheckControl" parameter="RenderHighlightEnable" /> diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml index 2de9449ea6..76c0d027f3 100644 --- a/indra/newview/skins/default/xui/en/mime_types.xml +++ b/indra/newview/skins/default/xui/en/mime_types.xml @@ -163,8 +163,8 @@ movie </widgettype> <impl> - media_plugin_quicktime - </impl> + media_plugin_quicktime + </impl> </mimetype> <mimetype name="application/javascript"> <label name="application/javascript_label"> @@ -208,7 +208,7 @@ </mimetype> <mimetype name="application/smil"> <label name="application/smil_label"> - Synchronized Multimedia Integration Language (SMIL) + Synchronized Multimedia Integration Language (SMIL) </label> <widgettype> movie @@ -348,8 +348,8 @@ web </widgettype> <impl> - media_plugin_webkit - </impl> + media_plugin_webkit + </impl> </mimetype> <mimetype menu="1" name="text/plain"> <label name="text/plain_label"> @@ -381,8 +381,8 @@ movie </widgettype> <impl> - media_plugin_quicktime - </impl> + media_plugin_quicktime + </impl> </mimetype> <mimetype name="video/mp4"> <label name="video/mp4_label"> @@ -392,8 +392,8 @@ movie </widgettype> <impl> - media_plugin_quicktime - </impl> + media_plugin_quicktime + </impl> </mimetype> <mimetype menu="1" name="video/quicktime"> <label name="video/quicktime_label"> @@ -403,8 +403,8 @@ movie </widgettype> <impl> - media_plugin_quicktime - </impl> + media_plugin_quicktime + </impl> </mimetype> <mimetype name="video/x-ms-asf"> <label name="video/x-ms-asf_label"> @@ -414,8 +414,8 @@ movie </widgettype> <impl> - media_plugin_quicktime - </impl> + media_plugin_quicktime + </impl> </mimetype> <mimetype name="video/x-ms-wmv"> <label name="video/x-ms-wmv_label"> @@ -425,8 +425,8 @@ movie </widgettype> <impl> - media_plugin_quicktime - </impl> + media_plugin_quicktime + </impl> </mimetype> <mimetype menu="1" name="video/x-msvideo"> <label name="video/x-msvideo_label"> @@ -436,7 +436,7 @@ movie </widgettype> <impl> - media_plugin_quicktime - </impl> + media_plugin_quicktime + </impl> </mimetype> </mimetypes> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index babed28f10..989dc88851 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4982,7 +4982,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you a <notification icon="notify.tga" name="UserGiveItem" - type="notify"> + type="offer"> [NAME] has given you a [OBJECTTYPE] named '[OBJECTNAME]'. <form name="form"> <button @@ -5028,7 +5028,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you a <notification icon="notify.tga" name="TeleportOffered" - type="notify"> + type="offer"> [NAME] has offered to teleport you to their location: [MESSAGE] @@ -5065,7 +5065,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you a <notification icon="notify.tga" name="OfferFriendship" - type="notify"> + type="offer"> [NAME] is offering friendship. [MESSAGE] @@ -5105,7 +5105,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you a <notification icon="notify.tga" name="FriendshipAccepted" - type="notify"> + type="offer"> [NAME] accepted your friendship offer. </notification> @@ -5669,7 +5669,7 @@ An error has occurred while trying to connect to voice chat for [VOICE_CHANNEL_N name="ServerVersionChanged" priority="high" type="notifytip"> -You just entered a region using a different server version, which may affect performance. Click to see the release notes. +You just entered a region using a different server version, which may affect performance. [[URL] View the release notes.] </notification> <notification diff --git a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml index f50acc224f..0246e21d25 100644 --- a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - name="panel_im_control_panel" - width="146" + border="false" height="215" - border="false"> + name="panel_im_control_panel" + width="180"> + <avatar_list color="DkGray2" follows="left|top|right|bottom" @@ -15,24 +16,48 @@ opaque="false" show_info_btn="false" show_profile_btn="false" + show_speaking_indicator="false" top="10" - width="140" /> - <button - name="call_btn" - label="Call" - width="125" - height="20" /> - <button - name="end_call_btn" - label="End Call" - width="125" - height="20" - visible="false"/> - <button - enabled="false" - name="voice_ctrls_btn" - label="Open Voice Controls" - width="125" - height="20" - visible="false"/> + width="180"/> + + <panel + background_visible="true" + bg_alpha_color="0.2 0.2 0.2 1" + border="false" + bottom="1" + follows="left|bottom" + height="70" + left="0" + left_pad="0" + name="panel_call_buttons" + top_pad="0" + width="180"> + + <button + bottom="10" + height="20" + label="Call" + left_delta="28" + name="call_btn" + width="125"/> + + <button + bottom="40" + height="20" + label="Leave Call" + name="end_call_btn" + visible="false" + width="125"/> + + <button + enabled="false" + bottom="10" + height="20" + label="Open Voice Controls" + name="voice_ctrls_btn" + visible="false" + width="125"/> + + </panel> + </panel> diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index 18761c3bb9..0c42686531 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -76,7 +76,6 @@ left_pad="3" right="-31" name="info_btn" - picture_style="true" top_delta="-2" width="16" /> <button @@ -87,7 +86,6 @@ left_pad="5" right="-3" name="profile_btn" - picture_style="true" top_delta="-2" width="20" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_avatar_tag.xml b/indra/newview/skins/default/xui/en/panel_avatar_tag.xml index e4f6e7bd44..16c8660781 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_tag.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_tag.xml @@ -55,7 +55,6 @@ top="65" left="10" right="-10" - can_resize="true" height="100" follows="left|top|bottom|right" font="SansSerifSmall" diff --git a/indra/newview/skins/default/xui/en/panel_bars.xml b/indra/newview/skins/default/xui/en/panel_bars.xml index 9c06329eaf..527ec4e007 100644 --- a/indra/newview/skins/default/xui/en/panel_bars.xml +++ b/indra/newview/skins/default/xui/en/panel_bars.xml @@ -5,65 +5,14 @@ layout="topleft" left="0" mouse_opaque="false" - name="bottom_panel" + name="screen" width="1024"> - <panel - follows="left|right|top|bottom" - height="728" - layout="topleft" - left="0" - mouse_opaque="false" - name="status" - top="0" - width="1024" /> - <layout_stack - border_size="0" - follows="left|right|bottom|top" - height="768" - layout="topleft" - left_delta="0" - mouse_opaque="false" - name="bar_stack" - top_delta="0" - use_bounding_rect="true" - width="1024"> - <layout_panel - follows="left|right|top|bottom" - height="768" - layout="topleft" - left="0" - mouse_opaque="false" - name="spacer" - top="0" - user_resize="false" - width="1024" /> - <layout_panel - auto_resize="false" - height="200" - layout="topleft" - min_height="200" - mouse_opaque="false" - name="overlay" - use_bounding_rect="true" - user_resize="false" - width="1024" /> - <layout_panel - auto_resize="false" - filename="panel_toolbar.xml" - layout="topleft" - min_height="28" - name="toolbar" - use_bounding_rect="true" - user_resize="false" - width="1024" /> + <layout_stack name="menu_stack" orientation="vertical" height="768" border_size="0"> + <panel auto_resize="false" width="1024" name="status_bar" filename="panel_status_bar.xml"/> + <panel auto_resize="false" width="1024" height="65" name="navigation bar" filename="panel_navigation_bar.xml"/> + <layout_stack name="hud_stack" orientation="horizontal" auto_resize="true" width="1024" height="500" follows="all"> + <panel auto_resize="true" name="floater_view" height="500"/> + <panel auto_resize="false" filename="panel_side_tray.xml" height="500" width="333"/> </layout_stack> - <panel - follows="left|right|top|bottom" - height="728" - layout="topleft" - left_delta="0" - mouse_opaque="false" - name="hud" - top_delta="-10" - width="1024" /> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 61bd1d186e..f833e0a1cb 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -60,7 +60,7 @@ min_width="96" name="speak_panel" user_resize="false"> - <chiclet_talk + <talk_button follows="right" height="23" speak_button.tab_stop="true" @@ -258,11 +258,11 @@ user_resize="false"> <chiclet_notification follows="right" - height="25" + height="23" layout="topleft" left="0" name="sys_well" - top="3" + top="4" width="34"> <button auto_resize="true" @@ -271,8 +271,9 @@ follows="right" flash_color="EmphasisColor" name="Unread" - picture_style="true" - image_overlay="Widget_UpArrow" /> + image_overlay="Notices_Unread" + width="20" + /> <unread_notifications width="34" height="23" @@ -289,6 +290,6 @@ layout="topleft" right="-1" top="0" - width="10"/> + width="26"/> </layout_stack> -</panel>
\ No newline at end of file +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index a9f622e018..64519b2571 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -1,53 +1,44 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" + bevel_style="in" + bg_alpha_color="black" follows="left|top|right" - height="57" - label="im_header_container" + height="20" + label="im_header" layout="topleft" - left="8" - name="im_header_container"> - <panel - background_visible="true" - bevel_style="in" - bg_alpha_color="black" - follows="left|top|right" - height="30" - label="im_header" + name="im_header" > + <avatar_icon + follows="left" + height="16" + image_name="icon_avatar_online.tga" layout="topleft" - name="im_header" - top_pad="17"> - <avatar_icon - follows="left" - height="20" - image_name="icon_avatar_online.tga" - layout="topleft" - left="5" - mouse_opaque="true" - name="avatar_icon" - top="5" - width="20" /> - <text - follows="left|right" - font="SansSerifBigBold" - height="20" - layout="topleft" - left_pad="10" - right="-50" - name="user_name" - text_color="white" - top="5" - value="Darth Vader" - use_ellipses="true" /> - <text - follows="right" - font="SansSerifBig" - height="20" - layout="topleft" - name="time_box" - right="0" - text_color="white" - top="5" - value="23:30" - width="50" /> - </panel> + left="2" + mouse_opaque="true" + name="avatar_icon" + top="2" + width="16" /> + <text + follows="left|right" + font="SansSerifBigBold" + height="20" + layout="topleft" + left_pad="6" + right="-50" + name="user_name" + text_color="white" + top="3" + value="Darth Vader" + use_ellipses="true" /> + <text + follows="right" + font="SansSerifBig" + height="20" + layout="topleft" + name="time_box" + right="0" + text_color="white" + top="3" + value="23:30" + width="50" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_chat_separator.xml b/indra/newview/skins/default/xui/en/panel_chat_separator.xml index bacc750e86..d0a2ddb289 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_separator.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_separator.xml @@ -1,16 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" + bg_alpha_color="black" follows="left|right|top" - height="9" + height="1" layout="topleft" - left="8" - name="chat_separator_container"> - <panel - background_visible="true" - bg_alpha_color="black" - follows="left|right|top" - height="1" - layout="topleft" - name="chat_separator_panel" - top_pad="3" /> -</panel> + name="chat_separator_panel" /> diff --git a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml index 9789da5796..c514054c41 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml @@ -37,13 +37,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="eyes_main_tab" title="Eyes"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="eyes_main_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml index 517cdd75fb..f9ef038314 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml @@ -49,13 +49,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="gloves_main_tab" title="Gloves"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="gloves_main_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_hair.xml b/indra/newview/skins/default/xui/en/panel_edit_hair.xml index d2ee2ebf2a..e7d1c05301 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_hair.xml @@ -37,13 +37,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="hair_color_tab" title="Color"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="hair_color_param_list" @@ -51,13 +49,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="hair_style_tab" title="Style"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="hair_style_param_list" @@ -65,13 +61,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="hair_eyebrows_tab" title="Eyebrows"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="hair_eyebrows_param_list" @@ -79,13 +73,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="hair_facial_tab" title="Facial"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="hair_facial_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml index 0b54944e29..f4c03399fe 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml @@ -61,13 +61,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="jacket_main_tab" title="Jacket"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="jacket_main_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_pants.xml b/indra/newview/skins/default/xui/en/panel_edit_pants.xml index 939314f9f9..ab105afd88 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml @@ -49,13 +49,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="pants_main_tab" title="Pants"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="pants_main_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml index bac6f6e4d1..f4a212ba0a 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml @@ -17,7 +17,6 @@ image_overlay="BackArrow_Off" layout="topleft" name="back_btn" - picture_style="true" left="10" tab_stop="false" top="2" @@ -65,9 +64,9 @@ top="20" left="10" name="pick_snapshot" /> - <button + <icon height="18" - image_overlay="AddItem_Off" + image_name="AddItem_Off" layout="topleft" right="-5" name="edit_icon" diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml index fedc49ae87..2378ae518b 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml @@ -116,9 +116,9 @@ top_pad="0" width="102" /> </panel> - <button + <icon height="18" - image_overlay="AddItem_Off" + image_name="AddItem_Off" layout="topleft" name="2nd_life_edit_icon" label="" @@ -171,9 +171,9 @@ top_pad="0" width="102" /> </panel> - <button + <icon height="18" - image_overlay="AddItem_Off" + image_name="AddItem_Off" layout="topleft" name="real_world_edit_icon" label="" 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 a9dfcb82d6..45c4b92338 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shape.xml @@ -59,13 +59,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shape_body_tab" title="Body"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shape_body_param_list" @@ -73,13 +71,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shape_head_tab" title="Head"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shape_head_param_list" @@ -87,13 +83,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shape_eyes_tab" title="Eyes"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shape_eyes_param_list" @@ -101,13 +95,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shape_ears_tab" title="Ears"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shape_ears_param_list" @@ -115,13 +107,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shape_nose_tab" title="Nose"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shape_nose_param_list" @@ -129,13 +119,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shape_mouth_tab" title="Mouth"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shape_mouth_param_list" @@ -143,13 +131,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shape_chin_tab" title="Chin"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shape_chin_param_list" @@ -157,13 +143,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shape_torso_tab" title="Torso"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shape_torso_param_list" @@ -171,13 +155,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shape_legs_tab" title="Legs"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shape_legs_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml index 258ee06697..9a13dfa3c4 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml @@ -49,13 +49,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shirt_main_tab" title="Shirt"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shirt_main_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml index 22fced4aac..154b9d959c 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml @@ -49,13 +49,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="shoes_main_tab" title="Shoes"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="shoes_main_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_skin.xml b/indra/newview/skins/default/xui/en/panel_edit_skin.xml index 1a00277f43..918606b54c 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_skin.xml @@ -64,13 +64,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="skin_color_tab" title="Skin Color"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="skin_color_param_list" @@ -78,13 +76,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="skin_face_tab" title="Face Detail"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="skin_face_param_list" @@ -92,13 +88,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="skin_makeup_tab" title="Makeup"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="skin_makeup_param_list" @@ -106,13 +100,11 @@ width="303" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="skin_body_tab" title="Body Detail"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="skin_body_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml index 411d433604..d0f4d75444 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml @@ -49,13 +49,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="skirt_main_tab" title="Skirt"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="skirt_main_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_socks.xml b/indra/newview/skins/default/xui/en/panel_edit_socks.xml index faff67795c..acc6d482a7 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml @@ -49,13 +49,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="socks_main_tab" title="Socks"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="socks_main_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml index bb0b353a01..4f5c1c08b7 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml @@ -49,13 +49,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="underpants_main_tab" title="Underpants"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="underpants_main_param_list" diff --git a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml index 097cb14ee6..715674e88b 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml @@ -49,13 +49,11 @@ top_pad="10" width="303"> <accordion_tab - can_resize="false" layout="topleft" min_height="150" name="undershirt_main_tab" title="Undershirt"> <scrolling_panel_list - draw_heading="false" follows="all" left="0" name="undershirt_main_param_list" 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 77b887de9b..f76a56bda4 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -137,7 +137,6 @@ left="0" image_overlay="BackArrow_Off" layout="topleft" name="back_btn" - picture_style="true" left="10" top="7" /> <text diff --git a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml index 9ed510dff3..763dd7b922 100644 --- a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - name="panel_im_control_panel" - width="146" + border="false" height="238" - border="false"> + name="panel_im_control_panel" + width="180"> + <avatar_list color="DkGray2" follows="left|top|right|bottom" @@ -15,30 +16,56 @@ opaque="false" show_info_btn="false" show_profile_btn="false" + show_speaking_indicator="false" top="10" - width="140" /> - <button - name="group_info_btn" - label="Group Info" - left_delta="3" - width="125" - height="20" /> + width="180"/> + <button - name="call_btn" - label="Call" - width="125" - height="20" /> - <button - name="end_call_btn" - label="End Call" - width="125" - height="20" - visible="false"/> - <button - enabled="false" - name="voice_ctrls_btn" - label="Open Voice Controls" - width="125" + bottom_pad="0" height="20" - visible="false"/> + label="Group Info" + left_delta="28" + name="group_info_btn" + width="125"/> + + <panel + background_visible="true" + bg_alpha_color="0.2 0.2 0.2 1" + border="false" + bottom="1" + follows="left|bottom" + height="70" + left="0" + left_pad="0" + name="panel_call_buttons" + top_pad="0" + width="180"> + + <button + bottom="10" + height="20" + label="Call Group" + left_delta="28" + name="call_btn" + width="125"/> + + <button + bottom="40" + height="20" + label="Leave Call" + name="end_call_btn" + visible="false" + width="125"/> + + <button + enabled="false" + bottom="10" + height="20" + label="Open Voice Controls" + name="voice_ctrls_btn" + visible="false" + width="125"/> + + </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 a85c55f9b2..4f24c7a745 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel follows="all" - height="412" + height="380" label="General" class="panel_group_general" layout="topleft" left="0" top="0" name="general_tab" - width="313"> + width="303"> <panel.string name="help_text"> The General tab contains general information about this group, a list of members, general Group Preferences and member options. @@ -41,7 +41,7 @@ Hover your mouse over the options for more help. draw_heading="true" follows="left|top" heading_height="16" - height="160" + height="130" layout="topleft" left_delta="0" name="visible_members" diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index d8d47c4008..de1323d9cb 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -5,7 +5,7 @@ background_visible="true" height="570" label="Group Info" layout="topleft" - min_height="350" + min_height="425" left="0" top="20" name="GroupInfo" @@ -32,7 +32,6 @@ background_visible="true" image_overlay="BackArrow_Off" layout="topleft" name="back" - picture_style="true" left="10" tab_stop="false" top="2" @@ -47,7 +46,7 @@ background_visible="true" text_color="white" top="0" value="(Loading...)" - use_elipsis="true" + use_ellipses="true" width="300" /> <line_editor follows="left|top" @@ -60,7 +59,7 @@ background_visible="true" top_delta="5" width="250" height="20" - visible="true" /> + visible="false" /> <texture_picker follows="left|top" height="113" @@ -112,114 +111,163 @@ background_visible="true" left_delta="0" top_pad="6" height="23" - label="Join now!" - label_selected="Join now!" + label="JOIN NOW!" name="btn_join" visible="true" width="120" /> <accordion follows="all" - height="405" + height="425" layout="topleft" left="0" name="groups_accordion" - top_pad="20" - width="333"> + top_pad="15" + width="336"> <accordion_tab - can_resize="false" + expanded="true" layout="topleft" - name="tab_general" + name="group_general_tab" title="General"> - <panel - border="false" - filename="panel_group_general.xml" + <scroll_container + color="DkGray2" + opaque="true" + height="323" + follows="all" layout="topleft" left="0" - help_topic="group_general_tab" - name="general_tab" top="0" - width="333" /> + name="general_scroll" + reserve_scroll_corner="false" + width="333"> + <panel + border="false" + class="panel_group_general" + filename="panel_group_general.xml" + layout="topleft" + left="0" + help_topic="group_general_tab" + name="group_general_tab_panel" + top="0" + width="303" /> + </scroll_container> </accordion_tab> <accordion_tab - can_resize="false" expanded="false" layout="topleft" - name="tab_roles" + name="group_roles_tab" title="Roles"> - <panel - border="false" - filename="panel_group_roles.xml" - layout="topleft" - left="0" - help_topic="group_roles_tab" - name="roles_tab" - top="0" - width="333" /> + <scroll_container + color="DkGray2" + opaque="true" + height="323" + follows="all" + layout="topleft" + left="0" + top="0" + name="roles_scroll" + reserve_scroll_corner="false" + width="333"> + <panel + border="false" + class="panel_group_roles" + filename="panel_group_roles.xml" + layout="topleft" + left="0" + help_topic="group_roles_tab" + name="group_roles_tab_panel" + top="0" + width="303" /> + </scroll_container> </accordion_tab> <accordion_tab - can_resize="false" expanded="false" layout="topleft" - name="tab_notices" + name="group_notices_tab" title="Notices"> + <scroll_container + color="DkGray2" + opaque="true" + height="323" + follows="all" + layout="topleft" + left="0" + top="0" + name="notices_scroll" + reserve_scroll_corner="false" + width="333"> <panel + border="false" + class="panel_group_notices" filename="panel_group_notices.xml" layout="topleft" left="0" help_topic="group_notices_tab" - name="notices_tab" + name="group_notices_tab_panel" top="0" - width="333" /> + width="303" /> + </scroll_container> </accordion_tab> - <accordion_tab - can_resize="false" + <accordion_tab expanded="false" layout="topleft" - name="tab_notices" + name="group_land_tab" title="Land/Assets"> + <scroll_container + color="DkGray2" + opaque="true" + height="323" + follows="all" + layout="topleft" + left="0" + top="0" + name="land_scroll" + reserve_scroll_corner="false" + width="333"> <panel border="false" + class="panel_group_land_money" filename="panel_group_land_money.xml" layout="topleft" left="0" help_topic="group_land_money_tab" - name="land_money_tab" + name="group_land_tab_panel" top="0" - width="333" /> + width="313" /> + </scroll_container> </accordion_tab> </accordion> - <button + <button follows="top|left" - height="20" + height="22" image_overlay="Refresh_Off" layout="topleft" - name="btn_refresh" - picture_style="true" left="5" - width="20" /> - <button - height="20" - font="SansSerifSmall" - label="Save" - label_selected="Save" - name="btn_apply" - left_pad="5" - width="65" /> - <button + name="btn_refresh" + top_pad="-15" + width="23" /> + <button height="20" label="Create" - label_selected="Create" + label_selected="New group" name="btn_create" - left_pad="5" + left_pad="10" visible="false" - width="65" /> - <button - left_pad="5" + width="100" /> + <!-- <button + left_pad="10" height="20" label="Cancel" label_selected="Cancel" name="btn_cancel" visible="false" + width="65" />--> + <button + height="20" + font="SansSerifSmall" + label="Save" + label_selected="Save" + name="btn_apply" + left_pad="10" + right="-10" width="65" /> - </panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml index c81c7113ae..0c6f81f8fd 100644 --- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml @@ -1,25 +1,25 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - border="true" + border="false" follows="all" height="510" label="Land & L$" layout="topleft" left="1" name="land_money_tab" - top="490" - width="280"> + top="0" + width="313"> <panel.string name="help_text"> - Parcels owned by the group are listed along with contribution details. A warning appears until the Total Land in Use is less than or equal to the Total Contribution. The Planning, Details, and Sales tabs provide information about the group's finances. + Parcels owned by a group are listed along with contribution details. A warning appears until the Total Land in Use is less than or = to the Total Contribution. </panel.string> <panel.string name="cant_view_group_land_text"> - You do not have permission to view group owned land. + You don't have permission to view group owned land </panel.string> <panel.string name="cant_view_group_accounting_text"> - You do not have permission to view the group's accounting information. + You don't have permission to view the group's accounting information. </panel.string> <panel.string name="loading_txt"> @@ -27,7 +27,7 @@ </panel.string> <panel.string name="land_contrib_error"> - Unable to set your land contribution. + Unable to set your land contribution </panel.string> <!-- <text type="string" @@ -44,29 +44,29 @@ <scroll_list draw_heading="true" follows="top" - heading_height="14" - height="100" + heading_height="20" + height="150" layout="topleft" - left="5" + left="0" name="group_parcel_list" - top_pad="10" - width="265"> + top_pad="0" + width="313"> <scroll_list.columns label="Parcel" name="name" - width="67" /> + width="78" /> <scroll_list.columns label="Region" name="location" - width="72" /> + width="78" /> <scroll_list.columns label="Type" name="type" - width="60" /> + width="70" /> <scroll_list.columns label="Area" name="area" - width="20" /> + width="50" /> <scroll_list.columns label="" name="hidden" @@ -74,14 +74,14 @@ </scroll_list> <button follows="top" - height="20" + height="23" label="Map" label_selected="Map" layout="topleft" - left="150" name="map_button" - top_pad="10" - width="125" + right="-10" + top_pad="5" + width="95" enabled="false" /> <text type="string" @@ -91,11 +91,12 @@ layout="topleft" left="5" name="total_contributed_land_label" - top_pad="10" + top_pad="0" width="130"> Total Contribution: </text> <text + text_color="EmphasisColor" type="string" follows="left|top" height="16" @@ -119,6 +120,7 @@ Total Land In Use: </text> <text + text_color="EmphasisColor" type="string" follows="left|top" height="16" @@ -142,6 +144,7 @@ Land Available: </text> <text + text_color="EmphasisColor" type="string" follows="left|top" height="16" @@ -168,19 +171,19 @@ border_style="line" border_thickness="1" follows="left|top" - height="16" + height="19" layout="topleft" left_pad="5" max_length="10" name="your_contribution_line_editor" - top_delta="-2" + top_delta="0" width="95" /> <text type="string" follows="left|top" height="16" layout="topleft" - left_pad="5" + left_pad="3" name="your_contribution_units" top_delta="2"> m² @@ -193,13 +196,13 @@ layout="topleft" left="140" name="your_contribution_max_value" - top_pad="0" + top_pad="2" width="95"> ([AMOUNT] max) </text> <icon height="16" - image_name="smicon_warn.tga" + image_name="notify_next" layout="topleft" left="9" name="group_over_limit_icon" @@ -211,14 +214,14 @@ type="string" word_wrap="true" font="SansSerifSmall" - height="40" + height="35" layout="topleft" - left_pad="5" + left_pad="0" name="group_over_limit_text" - text_color="GroupOverTierColor" + text_color="EmphasisColor" top_delta="0" - width="250"> - Group members must contribute more land credits to support land in use. + width="290"> + Group members must contribute more land credits to support land in use </text> <text type="string" @@ -242,128 +245,122 @@ name="group_money_tab_container" tab_position="top" tab_height="20" - top_pad="10" - width="265"> + top_pad="2" + tab_min_width="70" + width="300"> <panel - border="true" + border="false" follows="all" height="180" - label="Planning" + label="PLANNING" layout="topleft" - left="1" + left="0" help_topic="group_money_planning_tab" name="group_money_planning_tab" top="5" - width="265"> + width="300"> <text_editor type="string" - bg_readonly_color="0.784314 0.819608 0.8 1" follows="all" - font="Monospace" - height="168" + font="SansSerif" + height="140" layout="topleft" - left="8" + left="0" max_length="4096" name="group_money_planning_text" - top="5" - width="250" + top="0" + width="300" word_wrap="true"> - Computing... + Loading... </text_editor> </panel> <panel - border="true" - follows="left|top|right|bottom" + border="false" + follows="all" height="180" - label="Details" + label="DETAILS" layout="topleft" - left_delta="0" + left="0" help_topic="group_money_details_tab" name="group_money_details_tab" - top_delta="0" - width="265"> + top="5" + width="300"> <text_editor type="string" - bg_readonly_color="0.784314 0.819608 0.8 1" follows="all" - font="Monospace" height="140" layout="topleft" - left="8" + left="0" max_length="4096" name="group_money_details_text" - top="7" - width="250" + top="0" + width="300" word_wrap="true"> - Computing... + Loading... </text_editor> - <button - height="20" - label="< Earlier" - label_selected="< Earlier" - layout="topleft" - left="5" - name="earlier_details_button" - tool_tip="Go back in time" - top_pad="10" - width="125" /> <button - height="20" - label="Later >" - label_selected="Later >" - layout="topleft" - left_pad="5" - name="later_details_button" - tool_tip="Go forward in time" - top_delta="0" - width="125" /> + follows="left|top" + height="23" + image_overlay="Arrow_Left_Off" + layout="topleft" + name="earlier_details_button" + tool_tip="Back" + top_pad="3" + right="-35" + width="31" /> + <button + follows="left|top" + height="23" + image_overlay="Arrow_Right_Off" + layout="topleft" + left_pad="10" + name="later_details_button" + tool_tip="Next" + width="31" /> </panel> <panel - border="true" - follows="left|top|right|bottom" + border="false" + follows="all" height="180" - label="Sales" + label="SALES" layout="topleft" left_delta="0" help_topic="group_money_sales_tab" name="group_money_sales_tab" top_delta="-1" - width="265"> + width="300"> <text_editor type="string" - bg_readonly_color="0.784314 0.819608 0.8 1" follows="all" - font="Monospace" height="140" layout="topleft" - left="8" + left="0" max_length="4096" name="group_money_sales_text" - top="7" - width="250" + top="0" + width="300" word_wrap="true"> - Computing... + Loading... </text_editor> - <button - height="20" - label="< Earlier" - label_selected="< Earlier" - layout="topleft" - left="5" - name="earlier_sales_button" - tool_tip="Go back in time" - top_pad="10" - width="125" /> - <button - height="20" - label="Later >" - label_selected="Later >" - layout="topleft" - left_pad="5" + <button + follows="left|top" + height="23" + image_overlay="Arrow_Left_Off" + layout="topleft" + name="earlier_sales_button" + tool_tip="Back" + top_pad="3" + right="-35" + width="31" /> + <button + follows="left|top" + height="23" + image_overlay="Arrow_Right_Off" + layout="topleft" + left_pad="10" name="later_sales_button" - tool_tip="Go forward in time" - top_delta="0" - width="125" /> + tool_tip="Next" + width="31" /> </panel> </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml index ffa485051c..5f6b911620 100644 --- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml @@ -54,7 +54,6 @@ left_pad="3" right="-31" name="info_btn" - picture_style="true" top_delta="-2" width="16" /> <!--*TODO: Should only appear on rollover--> @@ -66,7 +65,6 @@ left_pad="5" right="-3" name="profile_btn" - picture_style="true" top_delta="-2" width="20" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml index 0e4d490369..24a4005a45 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -1,14 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - border="true" follows="all" height="485" label="Notices" layout="topleft" - left="1" + left="0" name="notices_tab" - top="485" - width="280"> + top="0" + width="313"> <panel.string name="help_text"> Notices are a quick way to communicate across a @@ -20,60 +19,48 @@ the General tab. </panel.string> <panel.string name="no_notices_text"> - There are no past notices. + There are no past notices </panel.string> - <!--<text - follows="left|top" - type="string" - font="SansSerifBig" - height="16" - layout="topleft" - left="10" - name="lbl" - top_pad="10" - width="269"> - Group Notices Archive - </text> --> <text follows="left|top" type="string" word_wrap="true" - height="40" + height="30" layout="topleft" - left_delta="10" + left="10" name="lbl2" - text_color="EmphasisColor" - top_pad="10" - width="270"> - Notices are kept for 14 days. Notice lists are limited to 200 notices per group on a daily basis. + top="5" + width="300"> + Notices are kept for 14 days +Groups are limited to 200 notices/group daily </text> <scroll_list follows="left|top" column_padding="0" draw_heading="true" - heading_height="14" - height="109" + heading_height="16" + height="125" layout="topleft" - left_delta="0" + left="0" name="notice_list" top_pad="0" - width="265"> + width="303"> <scroll_list.columns label="" name="icon" - width="16" /> + width="20" /> <scroll_list.columns label="Subject" name="subject" - width="100" /> + width="125" /> <scroll_list.columns label="From" name="from" - width="83" /> + width="90" /> <scroll_list.columns label="Date" name="date" - width="50" /> + width="30" /> <scroll_list.columns name="sort" width="-1" /> @@ -84,39 +71,40 @@ the General tab. layout="topleft" name="notice_list_none_found" visible="false"> - None found. + None found </text> - <button - follows="left|top" - height="20" - font="SansSerifSmall" - label="New Notice" - label_selected="Create New Notice" - layout="topleft" - left_delta="0" - name="create_new_notice" - top_delta="4" - width="125" /> - <button - follows="left|top" - height="20" - font="SansSerifSmall" - label="Refresh" - label_selected="Refresh List" + <button + follows="bottom|left" + height="18" + image_selected="AddItem_Press" + image_unselected="AddItem_Off" + image_disabled="AddItem_Disabled" + layout="topleft" + label="Create a new notice" + left="15" + name="create_new_notice" + tool_tip="Create a new notice" + top_delta="-5" + width="18" /> + <button + follows="top|left" + height="22" + image_overlay="Refresh_Off" layout="topleft" - left_pad="12" name="refresh_notices" - top_delta="0" - width="125" /> + right="-5" + top_delta="5" + width="23" /> <panel follows="left|top" - height="268" + height="300" label="Create New Notice" layout="topleft" left="0" - name="panel_create_new_notice" top_pad="10" - width="265"> + visible="false" + name="panel_create_new_notice" + width="303"> <text follows="left|top" type="string" @@ -127,30 +115,16 @@ the General tab. mouse_opaque="false" name="lbl" text_color="EmphasisColor" - top_pad="0" - width="265"> + top="0" + width="200"> Create a Notice </text> <text follows="left|top" type="string" - word_wrap="true" - height="90" - layout="topleft" - left_delta="0" - name="lbl2" - text_color="EmphasisColor" - top_pad="4" - width="195"> - You can add a single item to a notice by dragging it from your inventory to this panel. Attached items must be copiable and transferrable, and you can't send a folder. - </text> - <text - follows="left|top" - type="string" halign="left" height="16" layout="topleft" - left_delta="0" name="lbl3" top_pad="10" width="60"> @@ -164,8 +138,7 @@ the General tab. left_pad="3" max_length="63" name="create_subject" - top_delta="-1" - width="200" /> + width="220" /> <text follows="left|top" type="string" @@ -174,106 +147,100 @@ the General tab. layout="topleft" left="10" name="lbl4" - top_pad="10" + top_pad="5" width="60"> Message: </text> <text_editor - height="75" + height="90" layout="topleft" left_pad="3" max_length="511" name="create_message" top_delta="0" - width="200" + width="220" word_wrap="true" /> <text follows="left|top" type="string" halign="left" - height="16" + height="14" layout="topleft" left="10" name="lbl5" - top_pad="10" - width="60"> + width="200"> Attach: </text> <line_editor enabled="false" - height="16" + height="19" layout="topleft" - left_pad="3" - max_length="63" + max_length="90" mouse_opaque="false" name="create_inventory_name" - top_delta="0" - width="200" /> + top_pad="2" + width="285" /> + <text + text_color="EmphasisColor" + follows="left|top" + type="string" + halign="right" + height="34" + layout="topleft" + left="10" + name="string" + top_pad="15" + word_wrap="true" + width="150"> + Drag here to attach something -- > + </text> <icon - height="16" + height="72" + image_name="DropTarget" layout="topleft" - left_delta="0" - name="create_inv_icon" - top_delta="0" - width="16" /> + left_pad="10" + mouse_opaque="true" + name="drop_icon" + top_delta="-10" + width="72" /> <button follows="left|top" - height="20" - font="SansSerifSmall" - label="Remove Attachment" - label_selected="Remove Attachment" + height="23" + label="Remove" layout="topleft" - left="10" + left="70" name="remove_attachment" - top_pad="10" - width="135" /> + top_delta="45" + width="90" /> <button follows="left|top" - height="20" - font="SansSerifSmall" + height="23" label="Send" label_selected="Send Notice" layout="topleft" - left_delta="138" + right="-10" + top_pad="20" name="send_notice" - top_delta="0" - width="125" /> - <panel - bevel_style="in" - border="true" - height="71" - layout="topleft" - left="200" - name="drop_target2" - top="20" - width="71" /> - <icon - height="59" - image_name="icon_groupnoticeinventory.tga" - layout="topleft" - left_delta="6" - mouse_opaque="true" - name="drop_icon" - top="26" - width="59" /> - <group_drop_target + width="100" /> + <group_drop_target height="466" - layout="topleft" + top="0" left="0" + layout="topleft" name="drop_target" tool_tip="Drag an inventory item onto the message box to send it with the notice. You must have permission to copy and transfer the object to send it with the notice." - top="-198" - width="280" /> + width="295" /> </panel> <panel follows="left|top" - height="268" + height="300" label="View Past Notice" layout="topleft" left="0" + visible="true" name="panel_view_past_notice" - top="197" - width="265"> + top="180" + width="303"> <text type="string" font="SansSerifBig" @@ -294,9 +261,9 @@ the General tab. layout="topleft" left_delta="0" name="lbl2" - top_pad="4" + top_pad="2" width="265"> - To send a new notice, click the 'New Notice' button above. + To send a new notice, click the + button </text> <text type="string" @@ -305,7 +272,7 @@ the General tab. layout="topleft" left_delta="0" name="lbl3" - top_pad="24" + top_pad="15" visible="false" width="60"> Subject: @@ -336,13 +303,13 @@ the General tab. </text> <text_editor enabled="false" - height="150" + height="205" layout="topleft" left="10" max_length="511" name="view_message" top_delta="-35" - width="260" + width="285" word_wrap="true" /> <line_editor enabled="false" @@ -353,7 +320,7 @@ the General tab. mouse_opaque="false" name="view_inventory_name" top_pad="10" - width="260" /> + width="285" /> <icon height="16" layout="topleft" @@ -363,14 +330,12 @@ the General tab. width="16" /> <button follows="left|top" - height="20" - font="SansSerifSmall" - label="Open Attachment" - label_selected="Open Attachment" + height="23" + label="Open attachment" layout="topleft" - left_delta="0" + right="-10" name="open_attachment" - top_pad="10" + top_pad="5" width="135" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index e87859f788..5ed464bcec 100644 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel border="false" - height="412" + height="552" label="Members & Roles" layout="topleft" left="0" @@ -18,158 +18,28 @@ </panel.string> <panel.string name="help_text" /> - <!--<panel - follows="left|top" - height="80" - layout="topleft" - left="10" - name="members_header" - top_pad="10" - width="270"> - <text - type="string" - font="SansSerifBig" - height="16" - layout="topleft" - left="0" - name="static" - top="0" - width="270"> - Members & Roles - </text> - <text - type="string" - word_wrap="true" - height="40" - layout="topleft" - left_delta="0" - name="static2" - top_pad="4" - width="270"> - Group Members are assigned Roles with Abilities. These settings can easily be customized, allowing for greater organization and flexibility. - </text> - </panel> - <panel - follows="left|top" - height="24" - layout="topleft" - left_delta="0" - name="roles_header" - top_delta="0" - visible="false" - width="270"> - <text - type="string" - font="SansSerifBig" - height="16" - layout="topleft" - left="0" - name="static" - top="0" - width="270"> - Roles - </text> - <text - type="string" - word_wrap="true" - height="40" - layout="topleft" - left_delta="0" - name="role_properties_modifiable" - top_pad="4" - visible="false" - width="270"> - Select a Role below. You can modify its Name, Description and Member Title. - </text> - <text - type="string" - word_wrap="true" - height="40" - layout="topleft" - left_delta="0" - name="role_properties_not_modifiable" - top_delta="0" - width="270"> - Select a Role below to see its properties, Members and allowed Abilities. - </text> - <text - type="string" - word_wrap="true" - height="16" - layout="topleft" - left_delta="0" - name="role_actions_modifiable" - top_delta="24" - visible="false" - width="270"> - You can also assign Abilities to the Role. - </text> - <text - type="string" - word_wrap="true" - height="16" - layout="topleft" - left_delta="0" - name="role_actions_not_modifiable" - top_delta="0" - width="270"> - You may view, but not modify, assigned Abilities. - </text> - </panel> - <panel - follows="left|top" - height="24" - layout="topleft" - left_delta="0" - name="actions_header" - top_delta="0" - visible="false" - width="270"> - <text - type="string" - font="SansSerifBig" - height="16" - layout="topleft" - left="0" - name="static" - top="0" - width="270"> - Abilities - </text> - <text - type="string" - word_wrap="true" - height="40" - layout="topleft" - left_delta="0" - name="static2" - top_pad="4" - width="270"> - You can view an Ability's Description and which Roles and Members can execute the Ability. - </text> - </panel> --> <tab_container - border="true" + border="false" follows="left|top" - height="260" + height="245" halign="center" layout="topleft" left="5" name="roles_tab_container" tab_position="top" tab_height="20" - top="0" + tab_min_width="96" + top="3" width="303"> <panel border="false" - height="260" - label="Members" + height="220" + label="MEMBERS" layout="topleft" - left="1" + left="0" help_topic="roles_members_tab" name="members_sub_tab" tool_tip="Members" - top="17" class="panel_group_members_subtab" width="300"> <panel.string @@ -187,8 +57,7 @@ clicking on their names. follows="left|top|right" max_length="250" label="Filter Members" - name="filter_input" - font="SansSerif" /> + name="filter_input" /> <!-- <button enabled="false" font="SansSerifSmall" @@ -229,6 +98,7 @@ clicking on their names. font="SansSerifSmall" label="Invite" layout="topleft" + left="5" name="member_invite" top_pad="3" width="100" /> @@ -238,8 +108,10 @@ clicking on their names. label="Eject" layout="topleft" left_pad="5" + right="-5" name="member_eject" width="100" /> + <!--What is this?--> <icon height="16" image_name="Inv_FolderClosed" @@ -250,15 +122,14 @@ clicking on their names. </panel> <panel border="false" - height="164" - label="Roles" + height="220" + label="ROLES" layout="topleft" - left_delta="0" + left="0" help_topic="roles_roles_tab" name="roles_sub_tab" class="panel_group_roles_subtab" - top="17" - width="265"> + width="300"> <panel.string name="help_text"> Roles have a title and an allowed list of Abilities @@ -282,40 +153,19 @@ including the Everyone and Owner Roles. name="power_partial_icon"> checkbox_enabled_false.tga </panel.string> - <filter_editor - layout="topleft" - top="10" - left="4" - width="260" - height="20" - follows="left|top|right" - max_length="250" - label="Filter Roles" - name="filter_input" - font="SansSerif" /> - <!--<line_editor - border_style="line" - border_thickness="1" - follows="left|top" - height="16" - layout="topleft" - left="4" - max_length="63" - name="search_text" - top="10" - width="90" /> - <button - font="SansSerifSmall" - height="20" - label="Search" - layout="topleft" - left_pad="5" - name="search_button" - top_delta="-2" - width="80" /> + <filter_editor + layout="topleft" + top="10" + left="4" + width="280" + height="20" + follows="left|top|right" + max_length="250" + label="Filter Roles" + name="filter_input" /> + <!-- <button enabled="false" - font="SansSerifSmall" height="20" label="Show All" layout="topleft" @@ -326,11 +176,13 @@ including the Everyone and Owner Roles. <scroll_list column_padding="0" draw_heading="true" + draw_stripes="false" follows="left|top" heading_height="20" height="150" layout="topleft" - left="4" + search_column="1" + left="0" name="role_list" top_pad="4" width="300"> @@ -352,7 +204,7 @@ including the Everyone and Owner Roles. font="SansSerifSmall" label="Add Role" layout="topleft" - left_delta="0" + left="5" name="role_create" top_pad="6" width="125" /> @@ -362,20 +214,20 @@ including the Everyone and Owner Roles. label="Delete Role" layout="topleft" left_pad="5" + right="-5" name="role_delete" top_delta="0" width="125" /> </panel> <panel border="false" - height="164" - label="Abilities" + height="220" + label="ABILITIES" layout="topleft" - left_delta="0" + left="0" help_topic="roles_actions_tab" name="actions_sub_tab" class="panel_group_actions_subtab" - top="17" tool_tip="You can view an Ability's Description and which Roles and Members can execute the Ability." width="300"> <panel.string @@ -383,37 +235,17 @@ including the Everyone and Owner Roles. Abilities allow Members in Roles to do specific things in this group. There's a broad variety of Abilities. </panel.string> - <filter_editor - layout="topleft" - top="10" - left="4" - width="255" - height="20" - follows="left|top|right" - max_length="250" - label="Filter Abilities" - name="filter_input" - font="SansSerif" /> - <!--<line_editor - border_style="line" - border_thickness="1" - follows="left|top" - height="16" - layout="topleft" - left="4" - max_length="63" - name="search_text" - top="10" - width="90" /> - <button - font="SansSerifSmall" - height="20" - label="Search" - layout="topleft" - left_pad="5" - name="search_button" - top_delta="-2" - width="80" /> + <filter_editor + layout="topleft" + top="10" + left="4" + width="280" + height="20" + follows="left|top|right" + max_length="250" + label="Filter Abilities" + name="filter_input" /> + <!-- <button enabled="false" font="SansSerifSmall" @@ -428,19 +260,19 @@ things in this group. There's a broad variety of Abilities. column_padding="0" draw_stripes="false" follows="left|top" - height="100" + height="160" layout="topleft" - left="6" + left="0" multi_select="true" name="action_list" search_column="1" tool_tip="Select an Ability to view more details" top_pad="6" - width="255"> + width="300"> <scroll_list.columns label="" name="icon" - width="18" /> + width="16" /> <scroll_list.columns label="" name="action" @@ -448,7 +280,7 @@ things in this group. There's a broad variety of Abilities. </scroll_list> <icon height="16" - image_name="inv_folder_plain_closed.tga" + image_name="Inv_FolderClosed" layout="topleft" name="power_folder_icon" visible="false" @@ -456,105 +288,93 @@ things in this group. There's a broad variety of Abilities. </panel> </tab_container> <panel - height="150" + height="252" layout="topleft" follows="left|top" left="10" name="members_footer" - top_pad="2" + top_pad="10" + top_delta="0" width="300"> <text type="string" - font="SansSerif" height="16" layout="topleft" follows="left|top" left="0" name="static" - top_pad="0" - width="100"> + top_pad="5" + width="295"> Assigned Roles </text> - <text - type="string" - font="SansSerif" - height="16" - layout="topleft" - follows="left|top" - left_pad="35" - name="static2" - top_delta="0" - width="100"> - Allowed Abilities - </text> <scroll_list draw_stripes="false" follows="left|top" - height="150" + height="80" layout="topleft" left="0" name="member_assigned_roles" - top_pad="5" - width="130"> + top_pad="0" + width="295"> <scroll_list.columns label="" name="checkbox" - width="18" /> + width="30" /> <scroll_list.columns label="" name="role" - width="107" /> + width="265" /> </scroll_list> - <scroll_list - draw_stripes="false" - height="150" + <text + type="string" + height="16" layout="topleft" follows="left|top" - left_pad="5" + left="0" + name="static2" + top_pad="5" + width="295"> + Allowed Abilities + </text> + <scroll_list + draw_stripes="false" + height="80" + layout="topleft" + left="0" name="member_allowed_actions" + search_column="2" tool_tip="For details of each allowed ability see the abilities tab" - top_delta="0" - width="130"> + top_pad="0" + width="295"> <scroll_list.columns label="" name="icon" - width="14" /> + width="20" /> <scroll_list.columns label="" name="action" - width="126" /> + width="275" /> </scroll_list> </panel> <panel - height="252" + height="297" layout="topleft" - left_delta="0" + left="10" name="roles_footer" top_delta="0" + top="245" visible="false" - width="270"> + width="300"> <text type="string" - font="SansSerif" height="16" layout="topleft" left="0" name="static" top="0" - width="100"> + width="140"> Name </text> - <text - type="string" - font="SansSerif" - height="16" - layout="topleft" - left_pad="35" - name="static2" - top_delta="0" - width="100"> - Description - </text> <line_editor type="string" border_style="line" @@ -563,21 +383,19 @@ things in this group. There's a broad variety of Abilities. height="20" layout="topleft" left="0" - max_length="20" + max_length="295" name="role_name" top_pad="0" - width="130"> + width="295"> Employees </line_editor> <text type="string" - font="SansSerif" height="16" layout="topleft" - left_delta="0" name="static3" - top_pad="10" - width="100"> + top_pad="5" + width="295"> Title </text> <line_editor @@ -587,158 +405,159 @@ things in this group. There's a broad variety of Abilities. follows="left|top" height="20" layout="topleft" - left_delta="0" - max_length="20" + max_length="295" name="role_title" top_pad="0" - width="130"> - (waiting) + width="295"> + (waiting) </line_editor> + <text + type="string" + height="16" + layout="topleft" + left="0" + name="static2" + top_pad="5" + width="100"> + Description + </text> <text_editor type="string" halign="left" - height="48" + height="35" layout="topleft" - left="135" - max_length="254" + left="0" + max_length="295" name="role_description" - top="16" - width="130" + top_pad="0" + width="295" word_wrap="true"> - (waiting) + (waiting) </text_editor> <text type="string" - font="SansSerif" height="16" layout="topleft" + follows="left|top" left="0" - name="static4" - top="85" - width="120"> - Assigned Members - </text> - <text - type="string" - font="SansSerif" - height="16" - layout="topleft" - left_pad="15" - name="static5" - tool_tip="A list of abilities the currently selected role can perform" - top_delta="0" - width="100"> - Allowed Abilities + name="static" + top_pad="5" + width="295"> + Assigned Roles </text> <name_list draw_stripes="false" - height="150" + height="50" layout="topleft" left="0" name="role_assigned_members" top_pad="0" - width="130" /> + width="295" /> <check_box - height="16" - label="Members are visible" + height="15" + label="Reveal members" layout="topleft" - left_delta="0" name="role_visible_in_list" tool_tip="Sets whether members of this role are visible in the General tab to people outside of the group." - top_pad="10" - width="130" /> + top_pad="3" + width="290" /> + <text + type="string" + height="16" + layout="topleft" + follows="left|top" + left="0" + name="static2" + top_pad="5" + width="295"> + Allowed Abilities + </text> <scroll_list draw_stripes="false" - height="150" + height="50" layout="topleft" - left="135" + left="0" name="role_allowed_actions" search_column="2" tool_tip="For details of each allowed ability see the abilities tab" - top="101" - width="130"> + top_pad="0" + width="295"> <scroll_list.columns label="" name="icon" - width="2" /> + width="20" /> <scroll_list.columns label="" name="checkbox" - width="16" /> + width="20" /> <scroll_list.columns label="" name="action" - width="220" /> + width="250" /> </scroll_list> </panel> <panel - height="215" + height="303" layout="topleft" - left_delta="0" + left="10" name="actions_footer" top_delta="0" + top="245" visible="false" - width="265"> + width="300"> <text type="string" - font="SansSerif" height="16" layout="topleft" - left="0" name="static" - top="0" width="200"> - Description + Ability description </text> <text_editor type="string" enabled="false" halign="left" - height="48" + height="80" layout="topleft" left_delta="0" max_length="512" name="action_description" top_pad="0" - width="265" + width="295" word_wrap="true"> This Ability is 'Eject Members from this Group'. Only an Owner can eject another Owner. </text_editor> <text type="string" - font="SansSerif" height="16" layout="topleft" left_delta="0" name="static2" - top_pad="10" - width="125"> - Roles with Ability + top_pad="5" + width="295"> + Roles with this ability </text> - <text + <scroll_list + height="60" + layout="topleft" + left="0" + name="action_roles" + top_pad="0" + width="295" /> + <text type="string" - font="SansSerif" height="16" layout="topleft" - left_pad="10" name="static3" - top_delta="0" - width="125"> - Members with Ability + top_pad="5" + width="295"> + Members with this ability </text> - <scroll_list - height="150" - layout="topleft" - left="0" - name="action_roles" - top="90" - width="130" /> <name_list - height="150" + height="100" layout="topleft" - left_pad="5" name="action_members" - top_delta="0" - width="130" /> + top_pad="0" + width="295" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index c4cdaa41f9..c8b134cdf0 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -1,47 +1,101 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel name="panel_im_control_panel" - width="125" - height="248" - border="false"> - - <avatar_icon name="avatar_icon" - width="96" - height="96" /> - - <button name="view_profile_btn" - label="View Profile" - left_delta="3" - width="125" - height="20" /> - - <button name="add_friend_btn" - label="Add Friend" - width="125" - height="20" /> - - <button name="call_btn" - label="Call" - width="125" - height="20" /> +<panel + border="false" + height="350" + name="panel_im_control_panel" + width="131"> + + <avatar_icon + follows="left|top" + height="125" + left_delta="3" + name="avatar_icon" + top="-10" + width="125"/> + + <text + follows="left|right" + font="SansSerifBig" + height="16" + layout="topleft" + name="avatar_name" + use_ellipses="true" + value="Unknown" + width="125" /> <button + follows="left|bottom" height="20" - label="End Call" - name="end_call_btn" - visible="false" - width="125" /> + label="View Profile" + name="view_profile_btn" + width="125"/> + + <button + follows="left|bottom" + height="20" + label="Add Friend" + name="add_friend_btn" + width="125"/> + + <button + follows="left|bottom" + height="20" + label="Teleport" + name="teleport_btn" + width="125"/> - <button - enabled="false" - name="voice_ctrls_btn" - label="Open Voice Controls" - width="125" + <button + follows="left|bottom" + height="20" + label="Share" + name="share_btn" + width="125"/> + + <button + follows="left|bottom" height="20" - visible="false"/> + label="Pay" + name="pay_btn" + width="125"/> + + <panel + background_visible="true" + bg_alpha_color="0.2 0.2 0.2 1" + border="false" + bottom="1" + follows="left|bottom" + height="70" + left="0" + left_pad="0" + name="panel_call_buttons" + top_pad="0" + width="131"> + + <button + bottom="10" + height="20" + label="Call" + left_delta="3" + name="call_btn" + width="125"/> + + <button + bottom="40" + height="20" + label="Leave Call" + name="end_call_btn" + visible="false" + width="125"/> + + <button + enabled="false" + bottom="10" + height="20" + label="Open Voice Controls" + name="voice_ctrls_btn" + visible="false" + width="125"/> - <button name="share_btn" - label="Share" - width="125" - height="20" /> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml new file mode 100644 index 0000000000..0c24adfad5 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -0,0 +1,256 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + background_visible="true" + follows="all" + height="570" + layout="topleft" + left="0" + min_height="350" + name="landmark_info" + top="20" + width="330"> + <string + name="title_create_landmark" + value="Create Landmark" /> + <string + name="title_edit_landmark" + value="Edit Landmark" /> + <string + name="title_landmark" + value="Landmark" /> + <string + name="not_available" + value="(N\A)" /> + <string + name="unknown" + value="(unknown)" /> + <string + name="public" + value="(public)" /> + <string + name="server_update_text"> + Place information not available without server update. + </string> + <string + name="server_error_text"> + Information about this location is unavailable at this time, please try again later. + </string> + <string + name="server_forbidden_text"> + Information about this location is unavailable due to access restrictions. Please check your permissions with the parcel owner. + </string> + <string + name="acquired_date"> + [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] + </string> + <button + follows="top|right" + height="23" + image_overlay="BackArrow_Off" + layout="topleft" + left="10" + name="back_btn" + tab_stop="false" + top="0" + width="23" /> + <text + follows="top|left|right" + font="SansSerifHugeBold" + height="26" + layout="topleft" + left_pad="10" + name="title" + text_color="white" + top="0" + use_ellipses="true" + value="Place Profile" + width="275" /> + <scroll_container + color="DkGray2" + follows="all" + height="533" + layout="topleft" + left="10" + name="place_scroll" + opaque="true" + top_pad="5" + width="313"> + <panel + bg_alpha_color="DkGray2" + follows="all" + height="533" + layout="topleft" + left="0" + min_height="300" + name="scrolling_panel" + top="0" + width="313"> + <texture_picker + enabled="false" + follows="top|left" + height="190" + layout="topleft" + left="10" + name="logo" + top="10" + width="290" /> + <text + follows="left|top|right" + font="SansSerifLarge" + height="14" + layout="topleft" + left="10" + name="region_title" + text_color="white" + top_pad="5" + use_ellipses="true" + value="SampleRegion" + width="290" /> + <text + follows="left|top|right" + height="14" + layout="topleft" + left="10" + name="parcel_title" + top_pad="4" + use_ellipses="true" + value="SampleParcel, Name Long (145, 228, 26)" + width="285" /> + <expandable_text + follows="left|top|right" + height="50" + layout="topleft" + left="5" + name="description" + top_pad="10" + value="Du waltz die spritz" + width="300" /> + <panel + follows="left|top|right" + height="55" + layout="topleft" + left="10" + name="landmark_info_panel" + top_pad="10" + width="290"> + <text + follows="left|top" + height="15" + layout="topleft" + left="0" + name="owner_label" + top_pad="10" + value="Owner:" + width="90" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="70" + name="owner" + top_delta="0" + width="200" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="0" + name="creator_label" + value="Creator:" + width="90" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="70" + name="creator" + top_delta="0" + width="200" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="0" + name="created_label" + value="Created:" + width="50" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="70" + name="created" + top_delta="0" + width="200" /> + </panel> + <panel + follows="left|top|right" + height="210" + layout="topleft" + left="10" + name="landmark_edit_panel" + width="290"> + <text + follows="left|top" + height="15" + layout="topleft" + left="0" + name="title_label" + top_pad="10" + value="Title:" + width="290" /> + <line_editor + background_image_disabled="task_panel_background.png" + follows="left|top|right" + height="22" + layout="topleft" + left="0" + max_length="63" + name="title_editor" + prevalidate_callback="ascii" + text_readonly_color="white" + top_pad="5" + width="290" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="0" + name="notes_label" + top_pad="10" + value="My notes:" + width="290" /> + <text_editor + bg_readonly_color="DkGray2" + follows="all" + height="70" + layout="topleft" + left="0" + max_length="127" + name="notes_editor" + read_only="true" + text_readonly_color="white" + top_pad="5" + width="290" + wrap="true" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="0" + name="folder_label" + top_pad="15" + value="Landmark location:" + width="290" /> + <combo_box + follows="bottom|left|right" + height="20" + layout="topleft" + left="0" + name="folder_combo" + top_pad="5" + width="200" /> + </panel> + </panel> + </scroll_container> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml index 5293043ba7..f05684db10 100644 --- a/indra/newview/skins/default/xui/en/panel_landmarks.xml +++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml @@ -31,7 +31,7 @@ left="0" mouse_opaque="true" name="favorites_list" - start_folder="favorite" + start_folder="Favorite" width="380"/> </accordion_tab> <accordion_tab @@ -47,7 +47,7 @@ left="0" mouse_opaque="true" name="landmarks_list" - start_folder="landmark" + start_folder="Landmarks" width="380"/> </accordion_tab> <accordion_tab @@ -63,13 +63,13 @@ left="0" mouse_opaque="true" name="my_inventory_list" - start_folder="inventory" + start_folder="INVENTORY" width="380"/> - </accordion_tab> - <accordion_tab - layout="topleft" - name="tab_library" - title="Library"> + </accordion_tab> + <accordion_tab + layout="topleft" + name="tab_library" + title="Library"> <inventory_subtree_panel allow_multi_select="true" border="true" @@ -79,7 +79,7 @@ left="0" mouse_opaque="true" name="library_list" - start_folder="library" + start_folder="LIBRARY" width="380"/> </accordion_tab> </accordion> @@ -103,7 +103,6 @@ layout="topleft" left="10" name="options_gear_btn" - picture_style="true" top="6" width="18" /> <button @@ -115,7 +114,6 @@ layout="topleft" left_pad="5" name="add_btn" - picture_style="true" tool_tip="Add new landmark" width="18" /> <dnd_button @@ -126,7 +124,6 @@ layout="topleft" right="-5" name="trash_btn" - picture_style="true" tool_tip="Remove selected landmark" top="6" width="18" /> diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 317c79e08f..1646cba0a7 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -15,19 +15,30 @@ name="real_url"> http://secondlife.com/app/login/ </panel.string> + <string name="reg_in_client_url"> + http://secondlife.eniac15.lindenlab.com/reg-in-client/ + </string> <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php </panel.string> + <!-- *NOTE: Custom resize logic for login_html in llpanellogin.cpp --> <web_browser border_visible="false" bottom="600" follows="all" left="0" name="login_html" - right="-1" start_url="" - top="1" /> + top="0" + height="600" + width="800"/> + <panel + follows="left|bottom|right" + name="login_widgets" + layout="topleft" + left="0" + top="0"> <text follows="left|bottom" font="SansSerif" @@ -182,4 +193,5 @@ width="300"> [VERSION] </text> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 4175d21639..44fd44cde5 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -7,11 +7,12 @@ height="65" layout="topleft" name="navigation_bar" + chrome="true" width="600"> <icon follows="all" image_name="NavBar_BG" - mouse_opaque="true" + mouse_opaque="false" name="bg_icon" scale_image="true" visible="true" @@ -22,7 +23,7 @@ <icon follows="all" image_name="NavBar_BG_NoFav" - mouse_opaque="true" + mouse_opaque="false" name="bg_icon_no_fav" scale_image="true" visible="false" @@ -51,7 +52,6 @@ layout="topleft" left="10" name="back_btn" - picture_style="true" tool_tip="Go back to previous location" top="3" width="31" /> @@ -69,7 +69,6 @@ layout="topleft" left_pad="0" name="forward_btn" - picture_style="true" tool_tip="Go forward one location" top_delta="0" width="31" /> @@ -86,7 +85,6 @@ layout="topleft" left_pad="7" name="home_btn" - picture_style="true" tool_tip="Teleport to my home location" top_delta="0" width="32" /> @@ -127,7 +125,6 @@ <!-- left_pad="5" --> <!-- mouse_opaque="false" --> <!-- name="search_bg" --> - <!-- picture_style="true" --> <!-- top_delta="0" --> <!-- width="168" /> --> 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 2182163da5..555fedb1ff 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 @@ -42,13 +42,17 @@ width="20" /> <button follows="right" + is_toggle="true" width="45" top="0" layout="topleft" left_pad="8" label="Log" height="23" + name="show_nearby_chat" tool_tip="Show/hide nearby chat log"> - <button.commit_callback function="Floater.Toggle" parameter="nearby_chat"/> + <button.init_callback + function="Button.SetDockableFloaterToggle" + parameter="nearby_chat" /> </button> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml index 0d34aa0f08..34a185fb44 100644 --- a/indra/newview/skins/default/xui/en/panel_notification.xml +++ b/indra/newview/skins/default/xui/en/panel_notification.xml @@ -2,9 +2,6 @@ <panel background_opaque="false" border_visible="false" - border = "false" - border_drop_shadow_visible = "false" - drop_shadow_visible = "false" background_visible="true" bg_alpha_color="0.3 0.3 0.3 0" bg_opaque_color="0.3 0.3 0.3 0" @@ -18,12 +15,7 @@ <!-- THIS PANEL CONTROLS TOAST HEIGHT? --> <panel border_visible="false" - drop_shadow="false" bevel_style="none" - border_style="none" - border = "false" - border_drop_shadow_visible = "false" - drop_shadow_visible = "false" background_visible="true" bg_alpha_color="0.3 0.3 0.3 0" bg_opaque_color="0.3 0.3 0.3 0" @@ -67,9 +59,6 @@ v_pad="0" bg_readonly_color="0.0 0.0 0.0 0" border_visible="false" - border = "false" - border_drop_shadow_visible = "false" - drop_shadow_visible = "false" embedded_items="false" enabled="false" follows="left|right|top|bottom" 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 c67ae41677..7b6c0f33da 100644 --- a/indra/newview/skins/default/xui/en/panel_notifications_channel.xml +++ b/indra/newview/skins/default/xui/en/panel_notifications_channel.xml @@ -71,7 +71,6 @@ layout="topleft" left_delta="0" name="header" - picture_style="true" top_delta="-20" width="100" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index e234a7b358..d6e2aa64fa 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -75,7 +75,6 @@ background_visible="true" multi_select="true" name="avatar_list" top="0" - volume_column_width="20" width="313" /> <panel follows="left|right|bottom" @@ -95,7 +94,6 @@ background_visible="true" layout="topleft" left="10" name="nearby_view_sort_btn" - picture_style="true" top="5" width="18" /> <button @@ -107,7 +105,6 @@ background_visible="true" layout="topleft" left_pad="5" name="add_friend_btn" - picture_style="true" top_delta="0" tool_tip="Add selected resident to your friends List" width="18" /> @@ -132,7 +129,6 @@ background_visible="true" top="0" width="313"> <accordion_tab - can_resize="false" layout="topleft" height="235" min_height="150" @@ -149,7 +145,6 @@ background_visible="true" width="313" /> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" height="235" name="tab_all" @@ -183,7 +178,6 @@ background_visible="true" layout="topleft" left="10" name="friends_viewsort_btn" - picture_style="true" top="5" width="18" /> <button @@ -195,7 +189,6 @@ background_visible="true" layout="topleft" left_pad="5" name="add_btn" - picture_style="true" tool_tip="Offer friendship to a resident" top_delta="0" width="18" /> @@ -209,7 +202,6 @@ background_visible="true" left_pad="10" right="-10" name="del_btn" - picture_style="true" tool_tip="Remove selected person from your Friends list" top_delta="0" width="18" /> @@ -252,7 +244,6 @@ background_visible="true" layout="topleft" left="10" name="groups_viewsort_btn" - picture_style="true" top="7" width="18" /> <button @@ -264,7 +255,6 @@ background_visible="true" layout="topleft" left_pad="5" name="plus_btn" - picture_style="true" tool_tip="Join group/Create new group" top_delta="0" width="18" /> @@ -277,23 +267,9 @@ background_visible="true" layout="topleft" left_pad="24" name="activate_btn" - picture_style="true" tool_tip="Activate selected group" top_delta="5" width="10" /> - <button - follows="bottom|left" - height="18" - image_selected="TrashItem_Press" - image_unselected="TrashItem_Off" - layout="topleft" - left_pad="10" - right="-10" - name="minus_btn" - picture_style="true" - tool_tip="Leave selected group" - top_delta="-5" - width="18" /> </panel> </panel> <panel @@ -336,7 +312,6 @@ background_visible="true" layout="topleft" left="10" name="recent_viewsort_btn" - picture_style="true" top="7" width="18" /> <button @@ -348,7 +323,6 @@ background_visible="true" layout="topleft" left_pad="5" name="add_friend_btn" - picture_style="true" top_delta="0" tool_tip="Add selected resident to your friends List" width="18" /> diff --git a/indra/newview/skins/default/xui/en/panel_pick_info.xml b/indra/newview/skins/default/xui/en/panel_pick_info.xml index a67ae59b4a..cf18aa2d39 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_info.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_info.xml @@ -15,7 +15,6 @@ image_overlay="BackArrow_Off" layout="topleft" name="back_btn" - picture_style="true" left="10" tab_stop="false" top="2" @@ -30,7 +29,7 @@ text_color="white" top="0" value="Pick Info" - use_elipsis="true" + use_ellipses="true" width="275" /> <scroll_container color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml index 38ea6b6196..7ff227ecb6 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml @@ -75,7 +75,6 @@ image_unselected="BuyArrow_Press" layout="topleft" name="info_chevron" - picture_style="true" right="-7" tab_stop="false" top="27" diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index cbe1f11e3d..ae61852f68 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -41,7 +41,6 @@ layout="topleft" left="0" name="gear_menu_btn" - picture_style="true" top="5" width="18" /> <button @@ -53,7 +52,6 @@ layout="topleft" left_pad="15" name="new_btn" - picture_style="true" tool_tip="Create new pick at current location" top="5" width="18" /> @@ -65,7 +63,6 @@ image_unselected="TrashItem_Off" layout="topleft" name="trash_btn" - picture_style="true" right="-10" top="5" width="18" /> diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml new file mode 100644 index 0000000000..65f150b33c --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -0,0 +1,919 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + background_visible="true" + follows="all" + height="570" + layout="topleft" + left="0" + min_height="350" + name="place_profile" + top="20" + width="330"> + <string + name="on" + value="On" /> + <string + name="off" + value="Off" /> + <string + name="anyone" + value="Anyone" /> + <string + name="available" + value="available" /> + <string + name="allocated" + value="allocated" /> + <string + name="title_place" + value="Place Profile" /> + <string + name="title_teleport_history" + value="Teleport History Location" /> + <string + name="not_available" + value="(N\A)" /> + <string + name="unknown" + value="(unknown)" /> + <string + name="public" + value="(public)" /> + <string + name="none_text" + value="(none)" /> + <string + name="sale_pending_text" + value="(Sale Pending)" /> + <string + name="group_owned_text" + value="(Group Owned)" /> + <string + name="price_text" + value="L$" /> + <string + name="area_text" + value="m²" /> + <string + name="all_residents_text" + value="All Residents" /> + <string + name="group_text" + value="Group" /> + <string + name="can_resell"> + Purchased land in this region may be resold. + </string> + <string + name="can_not_resell"> + Purchased land in this region may not be resold. + </string> + <string + name="can_change"> + Purchased land in this region may be joined or subdivided. + </string> + <string + name="can_not_change"> + Purchased land in this region may not be joined or subdivided. + </string> + <string + name="server_update_text"> + Place information not available without server update. + </string> + <string + name="server_error_text"> + Information about this location is unavailable at this time, please try again later. + </string> + <string + name="server_forbidden_text"> + Information about this location is unavailable due to access restrictions. Please check your permissions with the parcel owner. + </string> + <string + name="acquired_date"> + [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] + </string> + <!-- Texture names for parcel permissions icons --> + <string + name="icon_PG" + value="parcel_drk_PG" /> + <string + name="icon_M" + value="parcel_drk_M" /> + <string + name="icon_R" + value="parcel_drk_R" /> + <string + name="icon_Voice" + value="parcel_drk_Voice" /> + <string + name="icon_VoiceNo" + value="parcel_drk_VoiceNo" /> + <string + name="icon_Fly" + value="parcel_drk_Fly" /> + <string + name="icon_FlyNo" + value="parcel_drk_FlyNo" /> + <string + name="icon_Push" + value="parcel_drk_Push" /> + <string + name="icon_PushNo" + value="parcel_drk_PushNo" /> + <string + name="icon_Build" + value="parcel_drk_Build" /> + <string + name="icon_BuildNo" + value="parcel_drk_BuildNo" /> + <string + name="icon_Scripts" + value="parcel_drk_Scripts" /> + <string + name="icon_ScriptsNo" + value="parcel_drk_ScriptsNo" /> + <string + name="icon_Damage" + value="parcel_drk_Damage" /> + <string + name="icon_DamageNo" + value="parcel_drk_DamageNo" /> + <button + follows="top|right" + height="23" + image_overlay="BackArrow_Off" + layout="topleft" + left="10" + name="back_btn" + tab_stop="false" + top="0" + width="23" /> + <text + follows="top|left|right" + font="SansSerifHugeBold" + height="26" + layout="topleft" + left_pad="10" + name="title" + text_color="white" + top="0" + use_ellipses="true" + value="Place Profile" + width="275" /> + <scroll_container + color="DkGray2" + follows="all" + height="533" + layout="topleft" + left="10" + name="place_scroll" + opaque="true" + top_pad="5" + width="313"> + <panel + bg_alpha_color="DkGray2" + follows="all" + height="533" + layout="topleft" + left="0" + min_height="300" + name="scrolling_panel" + top="0" + value=">" + width="313"> + <texture_picker + enabled="false" + follows="top|left" + height="190" + layout="topleft" + left="10" + name="logo" + top="10" + width="290" /> + <layout_stack + border_size="0" + clip="false" + follows="all" + height="50" + layout="topleft" + mouse_opaque="false" + name="panel_stack" + orientation="horizontal" + top_pad="-65" + width="100"> + <layout_panel + follows="left|right" + height="50" + layout="topleft" + left="0" + min_height="50" + min_width="50" + mouse_opaque="false" + name="here_panel" + top="0" + user_resize="false" + width="60"> + <icon + follows="top|left" + height="50" + image_name="YouAreHere_Badge" + layout="topleft" + left="0" + name="icon_you_are_here" + top="0" + width="50" /> + </layout_panel> + <layout_panel + follows="left|right" + height="60" + layout="topleft" + min_height="50" + min_width="60" + mouse_opaque="false" + name="for_sale_panel" + top="0" + user_resize="false" + width="60"> + <icon + follows="top|left" + height="50" + image_name="ForSale_Badge" + layout="topleft" + left="10" + name="icon_for_sale" + top="0" + width="50" /> + </layout_panel> + </layout_stack> + <text + follows="left|top|right" + font="SansSerifLarge" + height="14" + layout="topleft" + left="10" + name="region_title" + text_color="white" + top_pad="5" + use_ellipses="true" + value="SampleRegion" + width="290" /> + <text + follows="left|top|right" + height="14" + layout="topleft" + left="10" + name="parcel_title" + top_pad="4" + use_ellipses="true" + value="SampleParcel, Name Long (145, 228, 26)" + width="285" /> + <expandable_text + follows="left|top|right" + height="50" + layout="topleft" + left="5" + name="description" + top_pad="10" + value="Du waltz die spritz" + width="300" /> + <text + follows="left|top" + height="14" + layout="topleft" + left="10" + name="owner_label" + text_color="White" + top_pad="0" + value="Owner:" + width="90" /> + <!--TODO: HOOK THIS NAME UP WITH AN INSPECTOR --> + <text + follows="left|top|right" + height="14" + layout="topleft" + left_pad="1" + name="owner_value" + top_delta="0" + value="Alex Superduperlongenamenton" + width="205" /> + <accordion + follows="all" + height="230" + layout="topleft" + left="0" + name="advanced_info_accordion" + top_pad="10" + width="313"> + <accordion_tab + layout="topleft" + name="parcel_characteristics_tab" + title="Parcel"> + <scroll_container + color="DkGray2" + follows="all" + height="132" + layout="topleft" + left="0" + name="parcel_scroll" + opaque="true" + top="0" + width="290"> + <panel + follows="all" + height="165" + layout="topleft" + left="0" + top="0" + width="275"> + <icon + follows="top|left" + height="16" + image_name="parcel_drk_PG" + layout="topleft" + left="20" + name="rating_icon" + top="0" + width="18" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="8" + name="rating_label" + value="Rating:" + width="80" /> + <text + follows="right|top" + height="16" + layout="topleft" + left_pad="0" + name="rating_value" + top_delta="0" + value="unknown" + width="120" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Voice" + layout="topleft" + left="20" + name="voice_icon" + top_pad="5" + width="22" /> + <text + follows="left|top" + height="18" + layout="topleft" + left_pad="8" + name="voice_label" + top_delta="0" + value="Voice:" + width="76" /> + <text + follows="right|top" + height="18" + layout="topleft" + left_pad="0" + name="voice_value" + top_delta="0" + value="On" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Fly" + layout="topleft" + left="20" + name="fly_icon" + top_pad="3" + width="22" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="8" + name="fly_label" + value="Fly:" + width="76" /> + <text + follows="right|top" + height="16" + layout="topleft" + left_pad="0" + name="fly_value" + top_delta="0" + value="On" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Push" + layout="topleft" + left="20" + name="push_icon" + top_pad="3" + width="22" /> + <text + follows="left|top" + height="14" + layout="topleft" + left_pad="8" + name="push_label" + value="Push:" + width="76" /> + <text + follows="right|top" + height="14" + layout="topleft" + left_pad="0" + name="push_value" + top_delta="0" + value="Off" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Build" + layout="topleft" + left="20" + name="build_icon" + top_pad="3" + width="22" /> + <text + follows="left|top" + height="14" + layout="topleft" + left_pad="8" + name="build_label" + value="Build:" + width="76" /> + <text + follows="right|top" + height="15" + layout="topleft" + left_pad="0" + name="build_value" + top_delta="0" + value="On" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Scripts" + layout="topleft" + left="20" + name="scripts_icon" + top_pad="3" + width="22" /> + <text + follows="left|top" + height="14" + layout="topleft" + left_pad="8" + name="scripts_label" + value="Scripts:" + width="76" /> + <text + follows="right|top" + height="14" + layout="topleft" + left_pad="0" + name="scripts_value" + top_delta="0" + value="On" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Damage" + layout="topleft" + left="20" + name="damage_icon" + top_pad="7" + width="22" /> + <text + follows="left|top" + height="14" + layout="topleft" + left_pad="8" + name="damage_label" + value="Damage:" + width="76" /> + <text + follows="right|top" + height="14" + layout="topleft" + left_pad="0" + name="damage_value" + top_delta="0" + value="Off" + width="60" /> + <button + follows="bottom|right" + height="19" + label="About Land" + layout="topleft" + name="about_land_btn" + right="-5" + tab_stop="false" + top="138" + width="90"> + <click_callback + function="ShowFloater" + parameter="about_land" /> + </button> + </panel> + </scroll_container> + </accordion_tab> + <accordion_tab + expanded="false" + layout="topleft" + name="region_information_tab" + title="Region"> + <panel + follows="all" + height="125" + layout="topleft" + left="0" + top="0" + width="290"> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="region_name_label" + top_pad="5" + value="Region:" + width="80" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left_pad="0" + name="region_name" + top_delta="0" + value="Mooseland" + width="195" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="region_type_label" + top_pad="5" + value="Type:" + width="80" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left_pad="0" + name="region_type" + top_delta="0" + value="Moose" + width="195" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="region_rating_label" + top_pad="7" + value="Rating:" + width="80" /> + <icon + follows="top|left" + height="16" + image_name="parcel_drk_PG" + layout="topleft" + left_pad="0" + name="region_rating_icon" + width="18" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left_pad="10" + name="region_rating" + value="Explicit" + width="100" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="region_owner_label" + top_pad="5" + value="Owner:" + width="80" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left_pad="0" + name="region_owner" + top_delta="0" + value="moose Van Moose" + width="195" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="region_group_label" + top_pad="5" + value="Group:" + width="80" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left_pad="0" + name="region_group" + top_delta="0" + use_ellipses="true" + width="195"> + The Mighty Moose of mooseville soundvillemoose + </text> + <button + follows="bottom|right" + height="19" + label="Region/Estate" + layout="topleft" + name="region_info_btn" + right="-5" + tab_stop="false" + width="105"> + <click_callback + function="ShowFloater" + parameter="region_info" /> + </button> + </panel> + </accordion_tab> + <accordion_tab + expanded="false" + layout="topleft" + name="estate_information_tab" + title="Estate"> + <panel + follows="all" + height="189" + layout="topleft" + left="0" + top="0" + width="290"> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="estate_name_label" + top_pad="5" + value="Estate:" + width="80" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="90" + name="estate_name" + top_delta="0" + width="160" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="estate_rating_label" + top_pad="5" + value="Rating:" + width="80" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="90" + name="estate_rating" + top_delta="0" + width="160" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="estate_owner_label" + top_pad="5" + value="Owner:" + width="80" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="90" + name="estate_owner" + top_delta="0" + width="160" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="covenant_label" + top_pad="5" + value="Covenant:" + width="220" /> + <text_editor + bg_focus_color="DkGray2" + bg_readonly_color="DkGray2" + follows="left|top|right" + handle_edit_keys_directly="true" + height="90" + layout="topleft" + left="10" + max_length="65535" + name="covenant" + read_only="true" + top_pad="0" + width="280" /> + </panel> + </accordion_tab> + <accordion_tab + expanded="false" + layout="topleft" + name="sales_tab" + title="For Sale"> + <panel + follows="all" + height="300" + layout="topleft" + left="0" + top="0" + width="290"> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="sales_price_label" + top_pad="5" + value="Price:" + width="100" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="110" + name="sales_price" + top_delta="0" + width="140" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="area_label" + top_pad="5" + value="Area:" + width="100" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="110" + name="area" + top_delta="0" + width="140" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="traffic_label" + top_pad="5" + value="Traffic:" + width="100" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="110" + name="traffic" + top_delta="0" + width="140" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="primitives_label" + top_pad="5" + value="Primitives:" + width="100" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="110" + name="primitives" + top_delta="0" + width="140" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="parcel_scripts_label" + top_pad="5" + value="Scripts:" + width="100" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="110" + name="parcel_scripts" + top_delta="0" + width="140" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="terraform_limits_label" + top_pad="5" + value="Terraform limits:" + width="100" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="110" + name="terraform_limits" + top_delta="0" + width="140" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="subdivide_label" + top_pad="5" + value="Subdivide/Join ability:" + width="220" /> + <text_editor + bg_focus_color="DkGray2" + bg_readonly_color="DkGray2" + follows="left|top|right" + height="45" + layout="topleft" + left="10" + max_length="65535" + name="subdivide" + read_only="true" + top_pad="5" + width="245" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="resale_label" + top_pad="5" + value="ReSale ability:" + width="80" /> + <text_editor + bg_focus_color="DkGray2" + bg_readonly_color="DkGray2" + follows="left|top|right" + height="45" + layout="topleft" + left="10" + max_length="65535" + name="resale" + read_only="true" + top_pad="5" + width="245" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="sale_to_label" + top_pad="5" + value="For sale to:" + width="80" /> + <text + follows="left|top|right" + height="15" + layout="topleft" + left="90" + name="sale_to" + top_delta="0" + width="160" /> + </panel> + </accordion_tab> + </accordion> + </panel> + </scroll_container> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index 5aa53ab46b..cbbcfe5068 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -40,14 +40,26 @@ background_visible="true" top_pad="10" width="313" /> <panel - class="panel_place_info" - filename="panel_place_info.xml" + class="panel_place_profile" + filename="panel_place_profile.xml" follows="all" height="533" layout="topleft" left="0" help_topic="places_info_tab" - name="panel_place_info" + name="panel_place_profile" + top="5" + visible="false" + width="313" /> + <panel + class="panel_landmark_info" + filename="panel_landmark_info.xml" + follows="all" + height="533" + layout="topleft" + left="0" + help_topic="places_info_tab" + name="panel_landmark_info" top="5" visible="false" width="313" /> @@ -67,7 +79,7 @@ background_visible="true" left="5" name="teleport_btn" top="0" - width="77" /> + width="100" /> <button follows="bottom|left" font="SansSerifSmall" @@ -77,18 +89,7 @@ background_visible="true" left_pad="5" name="map_btn" top="0" - width="50" /> - <button - enabled="false" - follows="bottom|left" - font="SansSerifSmall" - height="19" - label="Share" - layout="topleft" - left_pad="5" - name="share_btn" - top="0" - width="60" /> + width="70" /> <button follows="bottom|left" font="SansSerifSmall" @@ -98,7 +99,7 @@ background_visible="true" left_pad="5" name="edit_btn" top="0" - width="50" /> + width="70" /> <button follows="bottom|right" font="SansSerifSmall" @@ -106,7 +107,6 @@ background_visible="true" image_disabled="ForwardArrow_Disabled" image_selected="ForwardArrow_Press" image_unselected="ForwardArrow_Off" - picture_style="true" layout="topleft" name="overflow_btn" right="-10" 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 f98f3a0850..613decad8d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -212,7 +212,7 @@ Avatars: width="256" top_pad="0"/> <check_box - control_name="ArrowKeysMoveAvatar" + control_name="ArrowKeysAlwaysMove" follows="left|top" height="20" label="Arrow keys always move me" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml index 159323538c..a94df4150d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml @@ -73,7 +73,6 @@ layout="topleft" left_delta="137" name="enable_this_popup" - picture_style="true" top_pad="10" width="43"> <button.commit_callback @@ -92,7 +91,6 @@ layout="topleft" left_pad="50" name="disable_this_popup" - picture_style="true" top_delta="0" width="43"> <button.commit_callback 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 832c9775ce..c3e0cb352b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -40,7 +40,6 @@ layout="topleft" left_pad="16" name="mute_audio" - picture_style="true" tab_stop="false" top_delta="-2" width="22" /> @@ -86,7 +85,6 @@ layout="topleft" left_pad="16" name="mute_wind" - picture_style="true" tab_stop="false" top_delta="-2" width="22" /> @@ -122,7 +120,6 @@ layout="topleft" left_pad="16" name="mute_ui" - picture_style="true" tab_stop="false" top_delta="-2" width="22" /> @@ -158,7 +155,6 @@ layout="topleft" left_pad="16" name="mute_media" - picture_style="true" tab_stop="false" top_delta="-2" width="22" /> @@ -194,7 +190,6 @@ layout="topleft" left_pad="16" name="mute_sfx" - picture_style="true" tab_stop="false" top_delta="-2" width="22" /> @@ -230,19 +225,21 @@ layout="topleft" left_pad="16" name="mute_music" - picture_style="true" tab_stop="false" top_delta="-2" width="22" /> - <check_box - height="16" - control_name ="EnableVoiceChat" - disabled_control="CmdLineDisableVoice" - label="Enable Voice" - layout="topleft" - left="22" + <check_box + label_text.halign="left" + follows="right|top" + height="16" + control_name ="EnableVoiceChat" + disabled_control="CmdLineDisableVoice" + label="Voice" + left="50" name="enable_voice_check" - width="100"> + top_pad="5" + width="110" + > </check_box> <slider control_name="AudioLevelVoice" @@ -252,16 +249,15 @@ height="15" increment="0.05" initial_value="0.5" - label="Voice" - label_width="60" + label_width="0" layout="topleft" - left="100" + left="165" + top_delta="0" name="Voice Volume" show_text="false" slider_label.halign="right" - top_pad="-15" volume="true" - width="250"> + width="185"> <slider.commit_callback function="Pref.setControlFalse" parameter="MuteVoice" /> @@ -278,7 +274,6 @@ layout="topleft" left_pad="16" name="mute_voice" - picture_style="true" tab_stop="false" top_delta="-2" width="22" /> @@ -296,7 +291,7 @@ <icon follows="left" height="18" - image_name="CameraView_Off" + image_name="Cam_FreeCam_Off" name="camera_icon" mouse_opaque="false" visible="true" @@ -323,32 +318,33 @@ height="16" label="Camera position" left_pad="1" - follows="topleft" + follows="topleft" name="0" top_delta="-30" width="200" /> <radio_item height="16" - follows="topleft" + follows="topleft" label="Avatar position" left_delta="0" name="1" top_delta="19" width="200" /> </radio_group> - <button - control_name="ShowDeviceSettings" - follows="left|bottom" - height="19" - is_toggle="true" - label="Input / Output Devices" - layout="topleft" - left="165" - top_pad="12" - name="device_settings_btn" - width="190" /> + <button + control_name="ShowDeviceSettings" + follows="left|bottom" + height="19" + is_toggle="true" + label="Input / Output Devices" + layout="topleft" + left="165" + top_pad="12" + name="device_settings_btn" + width="190"> + </button> <panel - background_visible="true" + background_visible="true" bg_alpha_color="DkGray" visiblity_control="ShowDeviceSettings" border="false" @@ -357,8 +353,13 @@ label="DeviceSettings" layout="topleft" left="0" - name="Device Settings" + name="device_settings_panel" + class="panel_voice_device_settings" width="501"> + <panel.string + name="default_text"> + Default + </panel.string> <icon height="18" image_name="Microphone_On" @@ -382,6 +383,7 @@ </text> <combo_box height="19" + control_name="VoiceInputAudioDevice" layout="topleft" left="165" max_chars="128" @@ -400,7 +402,8 @@ width="200"> My volume: </text> - <slider + <slider_bar + control_name="AudioLevelMic" follows="left|top" height="17" increment="0.05" @@ -492,6 +495,7 @@ Output </text> <combo_box + control_name="VoiceOutputAudioDevice" height="19" layout="topleft" left="165" diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index b21fbc1795..3bdd7114ee 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -82,7 +82,6 @@ image_unselected="media_btn_back.png" layout="topleft" tool_tip="Step back" - picture_style="true" width="22" top_delta="4"> <button.commit_callback @@ -103,7 +102,6 @@ image_unselected="media_btn_forward.png" layout="topleft" tool_tip="Step forward" - picture_style="true" top_delta="0" min_width="17" width="17"> @@ -141,7 +139,6 @@ image_unselected="media_btn_home.png" layout="topleft" tool_tip="Home page" - picture_style="true" min_width="22" width="22"> <button.commit_callback @@ -162,7 +159,6 @@ image_unselected="button_anim_stop.tga" layout="topleft" tool_tip="Stop media" - picture_style="true" min_width="22" width="22"> <button.commit_callback @@ -199,7 +195,6 @@ image_unselected="media_btn_reload.png" layout="topleft" tool_tip="Reload" - picture_style="true" min_width="22" width="22"> <button.commit_callback @@ -219,7 +214,6 @@ image_selected="media_btn_stoploading.png" image_unselected="media_btn_stoploading.png" layout="topleft" - picture_style="true" tool_tip = "Stop loading" min_width="22" width="22"> @@ -241,7 +235,6 @@ image_unselected="button_anim_play.tga" layout="topleft" tool_tip = "Play media" - picture_style="true" min_width="22" width="22"> <button.commit_callback @@ -261,8 +254,7 @@ image_selected="button_anim_pause.tga" image_unselected="button_anim_pause.tga" layout="topleft" - tool_tip = "Pause media" - picture_style="true"> + tool_tip = "Pause media"> <button.commit_callback function="MediaCtrl.Pause" /> </button> @@ -367,7 +359,6 @@ function="MediaCtrl.CommitURL" /> is_toggle="true" layout="topleft" scale_image="false" - picture_style="true" tool_tip="Mute This Media" top_delta="22" min_width="24" @@ -391,7 +382,6 @@ function="MediaCtrl.CommitURL" /> image_unselected="media_btn_scrollup.png" layout="topleft" tool_tip="Volume up" - picture_style="true" scale_image="true" min_width="20" width="20" > @@ -414,7 +404,6 @@ function="MediaCtrl.CommitURL" /> image_unselected="media_btn_scrolldown.png" layout="topleft" tool_tip="Volume down" - picture_style="true" scale_image="true" min_width="20" width="20"> @@ -423,6 +412,8 @@ function="MediaCtrl.CommitURL" /> </button> </layout_panel> <!-- Scroll pad --> +<!-- +disabled <layout_panel name="media_panel_scroll" auto_resize="false" @@ -446,7 +437,6 @@ function="MediaCtrl.CommitURL" /> image_unselected="media_btn_scrollup.png" layout="topleft" tool_tip="Scroll up" - picture_style="true" scale_image="false" left="12" top_delta="4" @@ -460,7 +450,6 @@ function="MediaCtrl.CommitURL" /> layout="topleft" left="3" tool_tip="Scroll left" - picture_style="true" scale_image="false" top="12" min_width="8" @@ -473,7 +462,6 @@ function="MediaCtrl.CommitURL" /> layout="topleft" left_pad="9" tool_tip="Scroll right" - picture_style="true" scale_image="false" top_delta="0" min_width="8" @@ -486,12 +474,13 @@ function="MediaCtrl.CommitURL" /> layout="topleft" left="12" tool_tip="Scroll down" - picture_style="true" scale_image="false" top="20" min_width="8" width="8" /> </layout_panel> +disabled +--> <layout_panel name="zoom_frame" auto_resize="false" @@ -505,14 +494,32 @@ function="MediaCtrl.CommitURL" /> image_selected="media_btn_optimalzoom.png" image_unselected="media_btn_optimalzoom.png" layout="topleft" - tool_tip="Zoom" - picture_style="true" + tool_tip="Zoom into media" min_width="22" width="22"> <button.commit_callback function="MediaCtrl.Zoom" /> </button> </layout_panel> + <layout_panel + name="close" + auto_resize="false" + user_resize="false" + layout="topleft" + min_width="21" + width="21" > + <button + height="22" + image_selected="media_btn_done.png" + image_unselected="media_btn_done.png" + layout="topleft" + tool_tip ="Zoom Back" + top_delta="-4" + width="21" > + <button.commit_callback + function="MediaCtrl.Close" /> + </button> + </layout_panel> <!-- <panel height="22" @@ -542,7 +549,6 @@ function="MediaCtrl.CommitURL" /> image_unselected="media_btn_newwindow.png" layout="topleft" tool_tip = "Open URL in browser" - picture_style="true" top_delta="-3" min_width="24" width="24" > @@ -567,26 +573,6 @@ function="MediaCtrl.CommitURL" /> </panel> --> <layout_panel - name="close" - auto_resize="false" - user_resize="false" - layout="topleft" - min_width="21" - width="21" > - <button - height="22" - image_selected="media_btn_done.png" - image_unselected="media_btn_done.png" - layout="topleft" - tool_tip ="Close media control" - picture_style="true" - top_delta="-4" - width="21" > - <button.commit_callback - function="MediaCtrl.Close" /> - </button> - </layout_panel> - <layout_panel width="0" layout="topleft" user_resize="false" /> diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 5af7d7d674..a0055383b1 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -31,7 +31,6 @@ color="DkGray2" follows="all" height="485" - min_height="300" layout="topleft" name="profile_scroll" reserve_scroll_corner="true" @@ -59,7 +58,7 @@ default_image_name="None" enabled="false" follows="top|left" - height="117" + height="102" layout="topleft" left="0" name="2nd_life_pic" @@ -81,7 +80,7 @@ height="95" layout="topleft" left="107" - max_length="512" + textbox.max_length="512" name="sl_description_edit" top_pad="-3" width="173" @@ -103,7 +102,7 @@ default_image_name="None" enabled="false" follows="top|left" - height="117" + height="102" layout="topleft" left="0" name="real_world_pic" @@ -124,7 +123,7 @@ height="95" layout="topleft" left="107" - max_length="512" + textbox.max_length="512" name="fl_description_edit" top_pad="-3" width="173" @@ -157,7 +156,7 @@ value="http://librarianavengers.org" width="280" word_wrap="false" - use_elipsis="true" + use_ellipses="true" /> <text follows="left|top" diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml index 195b731531..b015346a79 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml @@ -21,7 +21,6 @@ image_overlay="BackArrow_Off" layout="topleft" name="back" - picture_style="true" left="10" tab_stop="false" top="2" @@ -36,7 +35,7 @@ text_color="white" top="0" value="(Loading...)" - use_elipsis="true" + use_ellipses="true" width="275" /> <text follows="top|left" diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml index a312e4cf13..18c2228906 100644 --- a/indra/newview/skins/default/xui/en/panel_progress.xml +++ b/indra/newview/skins/default/xui/en/panel_progress.xml @@ -129,7 +129,6 @@ layout="topleft" left="-106" name="cancel_btn" - picture_style="true" top="700" width="90" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml index 21ecd01839..44afadf65a 100644 --- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml +++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml @@ -56,7 +56,6 @@ layout="topleft" left="2" name="less" - picture_style="true" tab_stop="false" top="0" width="132" /> @@ -70,7 +69,6 @@ layout="topleft" left_pad="2" name="more" - picture_style="true" tab_stop="false" top_delta="0" width="132" /> diff --git a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml index 9845a9eb78..0a9c70303e 100644 --- a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml +++ b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml @@ -19,16 +19,17 @@ top="4" value="Side Panel" width="255" /> - <button + <button follows="left|right|top" - font="SansSerif" - height="23" - label="?" + height="16" + image_selected="Icon_Help_Press" + image_unselected="Icon_Help_Foreground" + image_disabled="Icon_Help_Press" layout="topleft" name="show_help" - top="5" - right="-8" - width="28" + top="10" + right="-11" + width="16" tool_tip="Show Help"> <button.commit_callback function="Button.ShowHelp" /> diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml index 4169c6245b..01204ba779 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -10,12 +10,10 @@ name="history_accordion" width="380"> <accordion_tab - can_resize="false" layout="topleft" name="today" title="Today"> <flat_list_view - draw_heading="false" follows="all" height="150" layout="topleft" @@ -26,12 +24,10 @@ </flat_list_view> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" name="yesterday" title="Yesterday"> <flat_list_view - draw_heading="false" follows="all" height="150" layout="topleft" @@ -42,12 +38,10 @@ </flat_list_view> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" name="2_days_ago" title="2 days ago"> <flat_list_view - draw_heading="false" follows="all" height="150" layout="topleft" @@ -58,12 +52,10 @@ </flat_list_view> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" name="3_days_ago" title="3 days ago"> <flat_list_view - draw_heading="false" follows="all" height="150" layout="topleft" @@ -74,12 +66,10 @@ </flat_list_view> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" name="4_days_ago" title="4 days ago"> <flat_list_view - draw_heading="false" follows="all" height="150" layout="topleft" @@ -90,12 +80,10 @@ </flat_list_view> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" name="5_days_ago" title="5 days ago"> <flat_list_view - draw_heading="false" follows="all" height="150" layout="topleft" @@ -106,12 +94,10 @@ </flat_list_view> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" name="6_days_and_older" title="6 days and older"> <flat_list_view - draw_heading="false" follows="all" height="150" layout="topleft" @@ -122,12 +108,10 @@ </flat_list_view> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" name="1_month_and_older" title="1 month and older"> <flat_list_view - draw_heading="false" follows="all" height="150" layout="topleft" @@ -138,12 +122,10 @@ </flat_list_view> </accordion_tab> <accordion_tab - can_resize="false" layout="topleft" name="6_months_and_older" title="6 months and older"> <flat_list_view - draw_heading="false" follows="all" height="150" layout="topleft" @@ -176,7 +158,6 @@ layout="topleft" left="10" name="gear_btn" - picture_style="true" top="5" width="18" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml index f559343b34..1f67a0a732 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml @@ -49,24 +49,13 @@ width="242" /> <button follows="right" - height="16" - image_pressed="Info_Press" - image_unselected="Info_Over" - left_pad="3" - right="-31" - name="info_btn" - picture_style="true" - top_delta="-2" - width="16" /> - <button - follows="right" height="20" image_overlay="ForwardArrow_Off" layout="topleft" left_pad="5" right="-3" name="profile_btn" - picture_style="true" top_delta="-2" + visible="false" width="20" /> </panel> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 0f7e8cb137..ec2673644f 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2047,9 +2047,6 @@ this texture in your inventory <!-- panel contents --> <string name="PanelContentsNewScript">New Script</string> - <!-- panel avatar --> - <!-- <string name="None">None</string> Duplicate--> - <!-- Mute --> <string name="MuteByName">(by name)</string> <string name="MuteAgent">(resident)</string> @@ -2306,9 +2303,6 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="Body Thick">Body Thick</string> <string name="Body Thickness">Body Thickness</string> <string name="Body Thin">Body Thin</string> -<string name="Bottom">Bottom</string> -<string name="Bottom Left">Bottom Left</string> -<string name="Bottom Right">Bottom Right</string> <string name="Bow Legged">Bow Legged</string> <string name="Breast Buoyancy">Breast Buoyancy</string> @@ -2330,13 +2324,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="no bustle">No Bustle</string> <string name="more bustle">More Bustle</string> -<string name="Center">Center</string> -<string name="Center 2">Center 2</string> <string name="Chaplin">Chaplin</string> <string name="Cheek Bones">Cheek Bones</string> -<string name="Chest">Chest</string> <string name="Chest Size">Chest Size</string> -<string name="Chin">Chin</string> <string name="Chin Angle">Chin Angle</string> <string name="Chin Cleft">Chin Cleft</string> <string name="Chin Curtains">Chin Curtains</string> @@ -2500,22 +2490,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="Jowls">Jowls</string> <string name="Knee Angle">Knee Angle</string> <string name="Knock Kneed">Knock Kneed</string> -<string name="L Forearm">L Forearm</string> -<string name="L Lower Leg">L Lower Leg</string> -<string name="L Upper Arm">L Upper Arm</string> -<string name="L Upper Leg">L Upper Leg</string> <string name="Large">Large</string> <string name="Large Hands">Large Hands</string> -<string name="Left">Left</string> -<string name="Left Ear">Left Ear</string> -<string name="Left Eyeball">Left Eyeball</string> -<string name="Left Foot">Left Foot</string> -<string name="Left Hand">Left Hand</string> -<string name="Left Hip">Left Hip</string> <string name="Left Part">Left Part</string> -<string name="Left Pec">Left Pec</string> -<string name="Left Shoulder">Left Shoulder</string> <string name="Leg Length">Leg Length</string> <string name="Leg Muscles">Leg Muscles</string> <string name="Less">Less</string> @@ -2533,7 +2511,6 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="Less Square">Less Square</string> <string name="Less Volume">Less Volume</string> <string name="Less soul">Less soul</string> -<string name="Light">Light</string> <string name="Lighter">Lighter</string> <string name="Lip Cleft">Lip Cleft</string> <string name="Lip Cleft Depth">Lip Cleft Depth</string> @@ -2596,7 +2573,6 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="More soul">More soul</string> <string name="Moustache">Moustache</string> -<string name="Mouth">Mouth</string> <string name="Mouth Corner">Mouth Corner</string> <string name="Mouth Position">Mouth Position</string> <string name="Mowhawk">Mowhawk</string> @@ -2624,10 +2600,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="No Spikes">No Spikes</string> <string name="No White">No White</string> <string name="No Wrinkles">No Wrinkles</string> -<string name="None">None</string> <string name="Normal Lower">Normal Lower</string> <string name="Normal Upper">Normal Upper</string> -<string name="Nose">Nose</string> <string name="Nose Left">Nose Left</string> <string name="Nose Right">Nose Right</string> <string name="Nose Size">Nose Size</string> @@ -2667,7 +2641,6 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="Part">Part</string> <string name="Part Bangs">Part Bangs</string> <string name="Pectorals">Pectorals</string> -<string name="Pelvis">Pelvis</string> <string name="Pigment">Pigment</string> <string name="Pigtails">Pigtails</string> <string name="Pink">Pink</string> @@ -2683,24 +2656,12 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="Pop Right Eye">Pop Right Eye</string> <string name="Puffy">Puffy</string> <string name="Puffy Eyelids">Puffy Eyelids</string> -<string name="R Forearm">R Forearm</string> -<string name="R Lower Leg">R Lower Leg</string> -<string name="R Upper Arm">R Upper Arm</string> -<string name="R Upper Leg">R Upper Leg</string> <string name="Rainbow Color">Rainbow Color</string> <string name="Red Hair">Red Hair</string> <string name="Red Skin">Red Skin</string> <string name="Regular">Regular</string> <string name="Regular Muscles">Regular Muscles</string> -<string name="Right">Right</string> -<string name="Right Ear">Right Ear</string> -<string name="Right Eyeball">Right Eyeball</string> -<string name="Right Foot">Right Foot</string> -<string name="Right Hand">Right Hand</string> -<string name="Right Hip">Right Hip</string> <string name="Right Part">Right Part</string> -<string name="Right Pec">Right Pec</string> -<string name="Right Shoulder">Right Shoulder</string> <string name="Rosy Complexion">Rosy Complexion</string> <string name="Round">Round</string> <string name="Round Forehead">Round Forehead</string> @@ -2757,7 +2718,6 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="Skinny Neck">Skinny Neck</string> <string name="Skirt Fit">Skirt Fit</string> <string name="Skirt Length">Skirt Length</string> -<string name="Skull">Skull</string> <string name="Slanted Forehead">Slanted Forehead</string> <string name="Sleeve Length">Sleeve Length</string> @@ -2780,12 +2740,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="Sparse">Sparse</string> <string name="Spiked Hair">Spiked Hair</string> -<string name="Spine">Spine</string> <string name="Square">Square</string> <string name="Square Toe">Square Toe</string> <string name="Squash Head">Squash Head</string> <string name="Squash/Stretch Head">Squash/Stretch Head</string> -<string name="Stomach">Stomach</string> <string name="Stretch Head">Stretch Head</string> <string name="Sunken">Sunken</string> <string name="Sunken Chest">Sunken Chest</string> @@ -2817,9 +2775,6 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="Tilt Right">Tilt Right</string> <string name="Toe Shape">Toe Shape</string> <string name="Toe Thickness">Toe Thickness</string> -<string name="Top">Top</string> -<string name="Top Left">Top Left</string> -<string name="Top Right">Top Right</string> <string name="Torso Length">Torso Length</string> <string name="Torso Muscles">Torso Muscles</string> <string name="Torso Scrawny">Torso Scrawny</string> diff --git a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml index fcfe89c653..08c337455c 100644 --- a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml +++ b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <accordion_tab + font="SansSerifBold" header_bg_color="DkGray2" - header_txt_color="LtGray" header_collapse_img="Accordion_ArrowClosed_Off" header_collapse_img_pressed="Accordion_ArrowClosed_Press" header_expand_img="Accordion_ArrowOpened_Off" @@ -9,5 +9,6 @@ header_image="Accordion_Off" header_image_over="Accordion_Over" header_image_pressed="Accordion_Press" - header_image_selected="Accordion_Selected" + header_image_expanded="Accordion_Selected" + header_text_color="LtGray" /> diff --git a/indra/newview/skins/default/xui/en/widgets/chat_history.xml b/indra/newview/skins/default/xui/en/widgets/chat_history.xml index ea6997ebd5..32916c0816 100644 --- a/indra/newview/skins/default/xui/en/widgets/chat_history.xml +++ b/indra/newview/skins/default/xui/en/widgets/chat_history.xml @@ -6,6 +6,10 @@ right_text_pad="15" left_widget_pad="0" right_widget_pad="10" + top_separator_pad="5" + bottom_separator_pad="5" + top_header_pad="17" + bottom_header_pad="10" max_length="2147483647" enabled="false" track_bottom="true" diff --git a/indra/newview/skins/default/xui/en/widgets/combo_box.xml b/indra/newview/skins/default/xui/en/widgets/combo_box.xml index 9ed3749308..fa3cb9275e 100644 --- a/indra/newview/skins/default/xui/en/widgets/combo_box.xml +++ b/indra/newview/skins/default/xui/en/widgets/combo_box.xml @@ -4,7 +4,6 @@ max_chars="20" follows="right|top"> <combo_box.combo_button name="Combobox Button" - label="" hover_glow_amount="0.15" font="SansSerifSmall" scale_image="false" @@ -12,7 +11,6 @@ image_selected="ComboButton_Selected" image_disabled="ComboButton_Disabled" /> <combo_box.drop_down_button name="Drop Down Button" - label="" hover_glow_amount="0.15" font="SansSerifSmall" scale_image="true" diff --git a/indra/newview/skins/default/xui/en/widgets/gesture_combo_box.xml b/indra/newview/skins/default/xui/en/widgets/gesture_combo_box.xml index ab4ad94089..6171be034f 100644 --- a/indra/newview/skins/default/xui/en/widgets/gesture_combo_box.xml +++ b/indra/newview/skins/default/xui/en/widgets/gesture_combo_box.xml @@ -15,14 +15,14 @@ image_disabled_selected="ComboButton_Disabled_Selected" /> <gesture_combo_box.drop_down_button name="Drop Down Button" label="" + halign="center" hover_glow_amount="0.15" font="SansSerif" scale_image="true" - pad_right="24" - image_unselected="DropDown_Off" - image_selected="DropDown_Selected" - image_disabled="DropDown_Disabled" - image_disabled_selected="DropDown_Disabled_Selected" /> + image_unselected="PushButton_Off" + image_selected="PushButton_Selected" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Selected_Disabled" /> <gesture_combo_box.combo_list bg_writeable_color="MenuDefaultBgColor" scroll_bar_bg_visible="true" /> <gesture_combo_box.combo_editor name="Combo Text Entry" diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index f2e48c517d..d88bcfab1d 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -20,7 +20,6 @@ allow_new_values="true" > <info_button name="Place Information" - label="" width="16" height="16" follows="left|top" @@ -30,7 +29,6 @@ image_disabled_selected="Info_Off" image_disabled="Info_Off" /> <add_landmark_button name="Add Landmark" - label="" hover_glow_amount="0.15" image_hover_selected="Favorite_Star_Over" image_hover_unselected="Favorite_Star_Over" diff --git a/indra/newview/skins/default/xui/en/widgets/menu_item.xml b/indra/newview/skins/default/xui/en/widgets/menu_item.xml new file mode 100644 index 0000000000..c98e9cb6b8 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/menu_item.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- Use this for the top-level menu styling --> +<menu_item + font="SansSerifSmall" + > +</menu_item> diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml index f482ff3b89..9a79243b03 100644 --- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml @@ -7,14 +7,14 @@ background_image="TextField_Search_Off" background_image_disabled="TextField_Search_Disabled" background_image_focused="TextField_Search_Active" > - <search_button label="" + <search_button top_pad="4" left_pad="4" width="13" height="13" image_unselected="Search" image_selected="Search" /> - <clear_button label="" + <clear_button image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> </search_editor> 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 fe2f1423b7..f1401140de 100644 --- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml +++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml @@ -2,6 +2,7 @@ <tab_container tab_min_width="60" tab_max_width="150" font_halign="center" + font="SansSerif" tab_height="21"> <first_tab tab_top_image_unselected="TabTop_Left_Off" tab_top_image_selected="TabTop_Left_Selected" diff --git a/indra/newview/skins/default/xui/en/widgets/talk_button.xml b/indra/newview/skins/default/xui/en/widgets/talk_button.xml new file mode 100644 index 0000000000..d9f39b6937 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/talk_button.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- Derives from LLUICtrl --> +<talk_button> + <!-- To make speak button look green when selected set: + image_selected="SegmentedBtn_Left_Selected" + image_unselected="SegmentedBtn_Left_Off" + --> + <speak_button + name="left" + label="Speak" + label_selected="Speak" + font="SansSerifSmall" + tab_stop="false" + is_toggle="true" + /> + <show_button + name="right" + label="" + left="0" + top="0" + right="20" + bottom="0" + tab_stop="false" + is_toggle="true" + image_selected="ComboButton_UpSelected" + image_unselected="ComboButton_UpOff" + /> + <monitor + name="monitor" + left="0" + top="18" + right="18" + bottom="0" + /> +</talk_button> diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml index 071d505569..5545ab29e0 100644 --- a/indra/newview/skins/default/xui/es/floater_about.xml +++ b/indra/newview/skins/default/xui/es/floater_about.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_about" title="Acerca de [APP_NAME]"> +<floater name="floater_about" title="ACERCA DE [APP_NAME]"> <tab_container name="about_tab"> <panel name="credits_panel"> <text_editor name="credits_editor"> 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 bc775c1b1c..7575df4b98 100644 --- a/indra/newview/skins/default/xui/es/floater_about_land.xml +++ b/indra/newview/skins/default/xui/es/floater_about_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterland" title="Acerca del terreno"> +<floater name="floaterland" title="ACERCA DEL TERRENO"> <tab_container name="landtab"> <panel label="General" name="land_general_panel"> <text name="Name:"> diff --git a/indra/newview/skins/default/xui/es/floater_auction.xml b/indra/newview/skins/default/xui/es/floater_auction.xml index c6d89891bc..5196ac0b78 100644 --- a/indra/newview/skins/default/xui/es/floater_auction.xml +++ b/indra/newview/skins/default/xui/es/floater_auction.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_auction" title="Empezar venta de terreno Linden"> +<floater name="floater_auction" title="EMPEZAR VENTA DE TERRENO LINDEN"> <check_box label="Incluir la valla amarilla de selección" name="fence_check"/> <button label="Foto" label_selected="Foto" name="snapshot_btn"/> <button label="OK" label_selected="OK" name="ok_btn"/> diff --git a/indra/newview/skins/default/xui/es/floater_avatar_picker.xml b/indra/newview/skins/default/xui/es/floater_avatar_picker.xml index 68a56ac678..df0147b191 100644 --- a/indra/newview/skins/default/xui/es/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/es/floater_avatar_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatarpicker" title="Elegir a un residente"> +<floater name="avatarpicker" title="ELEGIR A UN RESIDENTE"> <tab_container name="ResidentChooserTabs"> <panel label="Buscar" name="SearchPanel"> <text name="InstructSearchResidentName"> 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 6344768c7f..8febe4b0a9 100644 --- a/indra/newview/skins/default/xui/es/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/es/floater_avatar_textures.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatar_texture_debug" title="Texturas del avatar"> +<floater name="avatar_texture_debug" title="TEXTURAS DEL AVATAR"> <text name="baked_label"> Texturas predeterminadas </text> diff --git a/indra/newview/skins/default/xui/es/floater_beacons.xml b/indra/newview/skins/default/xui/es/floater_beacons.xml index 9282cb04a6..2df90bc911 100644 --- a/indra/newview/skins/default/xui/es/floater_beacons.xml +++ b/indra/newview/skins/default/xui/es/floater_beacons.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="beacons" title="Balizas"> +<floater name="beacons" title="BALIZAS"> <panel name="beacons_panel"> <check_box label="Objetos con script sólo al tocarlos" name="touch_only"/> <check_box label="Objetos con script" name="scripted"/> diff --git a/indra/newview/skins/default/xui/es/floater_build_options.xml b/indra/newview/skins/default/xui/es/floater_build_options.xml index c3e4acacf0..3d839bf645 100644 --- a/indra/newview/skins/default/xui/es/floater_build_options.xml +++ b/indra/newview/skins/default/xui/es/floater_build_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="build options floater" title="Opciones de la cuadrícula"> +<floater name="build options floater" title="OPCIONES DE LA CUADRÍCULA"> <spinner label="Unidad de la cuadrícula (metros)" name="GridResolution" width="250" label_width="192"/> <spinner label="Graduación de la cuadrícula (metros)" name="GridDrawSize" width="250" label_width="192"/> <check_box label="Activar subunidades" name="GridSubUnit"/> diff --git a/indra/newview/skins/default/xui/es/floater_bulk_perms.xml b/indra/newview/skins/default/xui/es/floater_bulk_perms.xml index 3251713074..0553f4c672 100644 --- a/indra/newview/skins/default/xui/es/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/es/floater_bulk_perms.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterbulkperms" title="Cambio masivo de los permisos del contenido"> +<floater name="floaterbulkperms" title="CAMBIO MASIVO DE LOS PERMISOS DEL CONTENIDO"> <text name="applyto"> Tipos de contenido </text> diff --git a/indra/newview/skins/default/xui/es/floater_bumps.xml b/indra/newview/skins/default/xui/es/floater_bumps.xml index ed43e93688..0522f788bb 100644 --- a/indra/newview/skins/default/xui/es/floater_bumps.xml +++ b/indra/newview/skins/default/xui/es/floater_bumps.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_bumps" title="Choques, empujones, e impactos"> +<floater name="floater_bumps" title="CHOQUES, EMPUJONES, E IMPACTOS"> <text name="none_detected"> No se han detectado </text> diff --git a/indra/newview/skins/default/xui/es/floater_buy_contents.xml b/indra/newview/skins/default/xui/es/floater_buy_contents.xml index 2346798f94..c4d269ff39 100644 --- a/indra/newview/skins/default/xui/es/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/es/floater_buy_contents.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_buy_contents" title="Comprar el contenido"> +<floater name="floater_buy_contents" title="COMPRAR EL CONTENIDO"> <text name="contains_text"> [NAME] contiene: </text> diff --git a/indra/newview/skins/default/xui/es/floater_buy_currency.xml b/indra/newview/skins/default/xui/es/floater_buy_currency.xml index a01e07e694..af542acbce 100644 --- a/indra/newview/skins/default/xui/es/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/es/floater_buy_currency.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy currency" title="Comprar dinero"> +<floater name="buy currency" title="COMPRAR DINERO"> <text name="info_buying"> Comprando dinero: </text> diff --git a/indra/newview/skins/default/xui/es/floater_buy_land.xml b/indra/newview/skins/default/xui/es/floater_buy_land.xml index 7ee15955eb..7ff45fcf79 100644 --- a/indra/newview/skins/default/xui/es/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/es/floater_buy_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy land" title="Comprar terreno"> +<floater name="buy land" title="COMPRAR TERRENO"> <text name="region_name_label"> Región: </text> diff --git a/indra/newview/skins/default/xui/es/floater_buy_object.xml b/indra/newview/skins/default/xui/es/floater_buy_object.xml index 8e713f362b..26696bc868 100644 --- a/indra/newview/skins/default/xui/es/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/es/floater_buy_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Comprar una copia del objeto"> +<floater name="contents" title="COMPRAR UNA COPIA DEL OBJETO"> <text name="contents_text"> y sus contenidos: </text> diff --git a/indra/newview/skins/default/xui/es/floater_choose_group.xml b/indra/newview/skins/default/xui/es/floater_choose_group.xml index 71331abb65..a5967b814e 100644 --- a/indra/newview/skins/default/xui/es/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/es/floater_choose_group.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="groups" title="Grupos"> +<floater name="groups" title="GRUPOS"> <text name="groupdesc"> Elegir un grupo: </text> diff --git a/indra/newview/skins/default/xui/es/floater_color_picker.xml b/indra/newview/skins/default/xui/es/floater_color_picker.xml index 616c373d18..4395ee6890 100644 --- a/indra/newview/skins/default/xui/es/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/es/floater_color_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="ColorPicker" title="Paleta de colores"> +<floater name="ColorPicker" title="PALETA DE COLORES"> <text name="r_val_text"> Rojo: </text> diff --git a/indra/newview/skins/default/xui/es/floater_customize.xml b/indra/newview/skins/default/xui/es/floater_customize.xml index 1322b9a5cf..94452dae6b 100644 --- a/indra/newview/skins/default/xui/es/floater_customize.xml +++ b/indra/newview/skins/default/xui/es/floater_customize.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="Apariencia" width="527"> +<floater name="floater customize" title="APARIENCIA" width="527"> <tab_container name="customize tab container" width="525"> <placeholder label="Partes del cuerpo" name="body_parts_placeholder"/> <panel label="Forma" name="Shape" width="389"> diff --git a/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml index 9ee7fc3ead..fc2b12d1e4 100644 --- a/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Day Cycle Floater" title="Editor del ciclo de un día"> +<floater name="Day Cycle Floater" title="EDITOR DEL CICLO DE UN DÍA"> <tab_container name="Day Cycle Tabs"> <panel label="Ciclo de un día" name="Day Cycle"> <button label="?" name="WLDayCycleHelp"/> diff --git a/indra/newview/skins/default/xui/es/floater_device_settings.xml b/indra/newview/skins/default/xui/es/floater_device_settings.xml index e8989f44ef..eadf04a417 100644 --- a/indra/newview/skins/default/xui/es/floater_device_settings.xml +++ b/indra/newview/skins/default/xui/es/floater_device_settings.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_device_settings" title="Configuración de los dispositivos del chat de voz"/> +<floater name="floater_device_settings" title="CONFIGURACIÓN DE LOS DISPOSITIVOS DEL CHAT DE VOZ"/> diff --git a/indra/newview/skins/default/xui/es/floater_env_settings.xml b/indra/newview/skins/default/xui/es/floater_env_settings.xml index 65710fc5ed..5d6ba47daf 100644 --- a/indra/newview/skins/default/xui/es/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/es/floater_env_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Environment Editor Floater" title="Editor del entorno"> +<floater name="Environment Editor Floater" title="EDITOR DEL ENTORNO"> <text name="EnvTimeText"> Duración de un día diff --git a/indra/newview/skins/default/xui/es/floater_font_test.xml b/indra/newview/skins/default/xui/es/floater_font_test.xml index e6b8087b60..9a665321a4 100644 --- a/indra/newview/skins/default/xui/es/floater_font_test.xml +++ b/indra/newview/skins/default/xui/es/floater_font_test.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Prueba de fuentes"> +<floater name="contents" title="PRUEBA DE FUENTES"> <text name="linea"> OverrideTest, debería de aparecer aquí en Times. (Desde default/xui/en-us) </text> diff --git a/indra/newview/skins/default/xui/es/floater_gesture.xml b/indra/newview/skins/default/xui/es/floater_gesture.xml index e7f1a7aca2..496881f2d2 100644 --- a/indra/newview/skins/default/xui/es/floater_gesture.xml +++ b/indra/newview/skins/default/xui/es/floater_gesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="gestures" title="Gestos disponibles"> +<floater name="gestures" title="GESTOS DISPONIBLES"> <text name="help_label"> Pulse dos veces en un gesto para reproducir las animaciones y sonidos. diff --git a/indra/newview/skins/default/xui/es/floater_god_tools.xml b/indra/newview/skins/default/xui/es/floater_god_tools.xml index ea2571ecb8..78ec76e32b 100644 --- a/indra/newview/skins/default/xui/es/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/es/floater_god_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="godtools floater" title="Herramientas de Dios"> +<floater name="godtools floater" title="HERRAMIENTAS DE DIOS"> <tab_container name="GodTools Tabs"> <panel label="Red" name="grid"> <button label="Expulsar a todos los usuarios" diff --git a/indra/newview/skins/default/xui/es/floater_hardware_settings.xml b/indra/newview/skins/default/xui/es/floater_hardware_settings.xml index 29750ee737..9418252036 100644 --- a/indra/newview/skins/default/xui/es/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/es/floater_hardware_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Hardware Settings Floater" title="Configuración del hardware"> +<floater name="Hardware Settings Floater" title="CONFIGURACIÓN DEL HARDWARE"> <text name="Filtering:"> Filtrado: </text> diff --git a/indra/newview/skins/default/xui/es/floater_hud.xml b/indra/newview/skins/default/xui/es/floater_hud.xml index d31bcedf05..e458913452 100644 --- a/indra/newview/skins/default/xui/es/floater_hud.xml +++ b/indra/newview/skins/default/xui/es/floater_hud.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_hud" title="Tutorial"/> +<floater name="floater_hud" title="TUTORIAL"/> diff --git a/indra/newview/skins/default/xui/es/floater_inspect.xml b/indra/newview/skins/default/xui/es/floater_inspect.xml index 026081bc04..3c8b38648f 100644 --- a/indra/newview/skins/default/xui/es/floater_inspect.xml +++ b/indra/newview/skins/default/xui/es/floater_inspect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="inspect" title="Examinar objetos" min_width="450"> +<floater name="inspect" title="EXAMINAR OBJETOS" min_width="450"> <scroll_list name="object_list" tool_tip="Seleccione un objeto de esta lista para realzarlo en el mundo"> <column label="Nombre del objeto" name="object_name"/> <column label="Propietario" name="owner_name"/> diff --git a/indra/newview/skins/default/xui/es/floater_inventory.xml b/indra/newview/skins/default/xui/es/floater_inventory.xml index 7da14c0579..8d16d6089e 100644 --- a/indra/newview/skins/default/xui/es/floater_inventory.xml +++ b/indra/newview/skins/default/xui/es/floater_inventory.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="Inventario"> +<floater name="Inventory" title="INVENTARIO"> <search_editor label="Escriba aquí para buscar" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Todos los ítems" name="All Items"/> diff --git a/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml index 4df3ca2cf6..7abdfceb94 100644 --- a/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="item properties" title="Propiedades del ítem del inventario"> +<floater name="item properties" title="PROPIEDADES DEL ÍTEM DEL INVENTARIO"> <text name="LabelItemNameTitle"> Nombre: </text> diff --git a/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml index 7cd787bfb5..0cbee11bfb 100644 --- a/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory Finder" title="ítems_recientes_del_inventario"> +<floater name="Inventory Finder" title="ÍTEMS_RECIENTES_DEL_INVENTARIO"> <check_box label="Animaciones" name="check_animation"/> <check_box label="Tarjetas de visita" name="check_calling_card"/> <check_box label="Ropa" name="check_clothing"/> diff --git a/indra/newview/skins/default/xui/es/floater_joystick.xml b/indra/newview/skins/default/xui/es/floater_joystick.xml index 2e0fb87744..75c53dd646 100644 --- a/indra/newview/skins/default/xui/es/floater_joystick.xml +++ b/indra/newview/skins/default/xui/es/floater_joystick.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" title="Configuración del joystick"> +<floater name="Joystick" title="CONFIGURACIÓN DEL JOYSTICK"> <check_box name="enable_joystick" label="Activar el joystick:"/> <text left="140" name="joystick_type" width="360"/> <spinner label="Mapping: eje X" name="JoystickAxis1" label_width="118" width="161"/> diff --git a/indra/newview/skins/default/xui/es/floater_lagmeter.xml b/indra/newview/skins/default/xui/es/floater_lagmeter.xml index 1af0bb065c..54c4ce8c6a 100644 --- a/indra/newview/skins/default/xui/es/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/es/floater_lagmeter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_lagmeter" title="Medidor del lag"> +<floater name="floater_lagmeter" title="MEDIDOR DEL LAG"> <button label="" label_selected="" name="client_lagmeter" tool_tip="Estado del lag del cliente"/> <text name="client"> Cliente: diff --git a/indra/newview/skins/default/xui/es/floater_land_holdings.xml b/indra/newview/skins/default/xui/es/floater_land_holdings.xml index 5df319905d..bcdebf4588 100644 --- a/indra/newview/skins/default/xui/es/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/es/floater_land_holdings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="land holdings floater" title="Mi terreno"> +<floater name="land holdings floater" title="MI TERRENO"> <scroll_list name="parcel list"> <column label="Nombre de la parcela" name="name"/> <column label="Región" name="location"/> diff --git a/indra/newview/skins/default/xui/es/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/es/floater_live_lsleditor.xml index 226c3482af..02be809319 100644 --- a/indra/newview/skins/default/xui/es/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/es/floater_live_lsleditor.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="script ed float" title="Script: script nuevo"> +<floater name="script ed float" title="SCRIPT: SCRIPT NUEVO"> <button label="Reiniciar" label_selected="Reiniciar" name="Reset"/> <check_box label="Ejecutándose" name="running" left="4"/> <check_box label="Mono" name="mono" left="106"/> diff --git a/indra/newview/skins/default/xui/es/floater_lsl_guide.xml b/indra/newview/skins/default/xui/es/floater_lsl_guide.xml index 859a2d3812..0cde2fe5bc 100644 --- a/indra/newview/skins/default/xui/es/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/es/floater_lsl_guide.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="script ed float" title="Wiki de LSL"> +<floater name="script ed float" title="WIKI DE LSL"> <check_box label="Seguir al cursor" name="lock_check"/> <combo_box label="Bloquear" name="history_combo" left_delta="120" width="70"/> <button label="Atrás" name="back_btn" left_delta="75"/> diff --git a/indra/newview/skins/default/xui/es/floater_media_browser.xml b/indra/newview/skins/default/xui/es/floater_media_browser.xml index 79c8980c02..ff50b56a32 100644 --- a/indra/newview/skins/default/xui/es/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/es/floater_media_browser.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_about" title="Navegador"> +<floater name="floater_about" title="NAVEGADOR"> <layout_stack name="stack1"> <layout_panel name="nav_controls"> <button label="Atrás" name="back" width="75"/> diff --git a/indra/newview/skins/default/xui/es/floater_mem_leaking.xml b/indra/newview/skins/default/xui/es/floater_mem_leaking.xml index a2791d6432..6d5e987409 100644 --- a/indra/newview/skins/default/xui/es/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/es/floater_mem_leaking.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="MemLeak" title="Prueba de la fuga de memoria"> +<floater name="MemLeak" title="PRUEBA DE LA FUGA DE MEMORIA"> <spinner label="Velocidad de la fuga (bites por fotograma):" name="leak_speed"/> <spinner label="Fuga de memoria máx. (MB):" name="max_leak"/> <text name="total_leaked_label"> diff --git a/indra/newview/skins/default/xui/es/floater_mute_object.xml b/indra/newview/skins/default/xui/es/floater_mute_object.xml index 0cf38c09ee..390333cd1d 100644 --- a/indra/newview/skins/default/xui/es/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/es/floater_mute_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="mute by name" title="Ignorar un objeto según su nombre"> +<floater name="mute by name" title="IGNORAR UN OBJETO SEGÚN SU NOMBRE"> <text name="message" bottom_delta="-40"> Ignorar según el nombre sólo afecta al chat y los MI del objeto, no a sus sonidos. diff --git a/indra/newview/skins/default/xui/es/floater_my_friends.xml b/indra/newview/skins/default/xui/es/floater_my_friends.xml index d555eed305..07f362560b 100644 --- a/indra/newview/skins/default/xui/es/floater_my_friends.xml +++ b/indra/newview/skins/default/xui/es/floater_my_friends.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_my_friends" title="Contactos"> +<floater name="floater_my_friends" title="CONTACTOS"> <tab_container name="friends_and_groups"> <panel label="Amigos" name="friends_panel"/> <panel label="Grupos" name="groups_panel"/> diff --git a/indra/newview/skins/default/xui/es/floater_openobject.xml b/indra/newview/skins/default/xui/es/floater_openobject.xml index 60487b829c..89c79e8833 100644 --- a/indra/newview/skins/default/xui/es/floater_openobject.xml +++ b/indra/newview/skins/default/xui/es/floater_openobject.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="objectcontents" title="Contenido del objeto"> +<floater name="objectcontents" title="CONTENIDO DEL OBJETO"> <text name="object_name"> [DESC]: </text> diff --git a/indra/newview/skins/default/xui/es/floater_perm_prefs.xml b/indra/newview/skins/default/xui/es/floater_perm_prefs.xml index 4a3977be3d..7d3c8e62f3 100644 --- a/indra/newview/skins/default/xui/es/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/es/floater_perm_prefs.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="perm prefs" title="Permisos de subida por defecto"> +<floater name="perm prefs" title="PERMISOS DE SUBIDA POR DEFECTO"> <panel label="Permisos" name="permissions"> <button label="?" label_selected="?" name="help"/> <check_box label="Compartir con el grupo" name="share_with_group"/> diff --git a/indra/newview/skins/default/xui/es/floater_post_process.xml b/indra/newview/skins/default/xui/es/floater_post_process.xml index acac2b2bf9..5c62ccde36 100644 --- a/indra/newview/skins/default/xui/es/floater_post_process.xml +++ b/indra/newview/skins/default/xui/es/floater_post_process.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="Configuración del procesamiento"> +<floater name="Post-Process Floater" title="CONFIGURACIÓN DEL PROCESAMIENTO"> <tab_container name="Post-Process Tabs"> <panel label="Color del filtro" name="wmiColorFilterPanel"> <check_box label="Activar" name="wmiColorFilterToggle"/> diff --git a/indra/newview/skins/default/xui/es/floater_postcard.xml b/indra/newview/skins/default/xui/es/floater_postcard.xml index 6a9811c058..ace3204cc7 100644 --- a/indra/newview/skins/default/xui/es/floater_postcard.xml +++ b/indra/newview/skins/default/xui/es/floater_postcard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="Foto por correo electrónico"> +<floater name="Postcard" title="FOTO POR CORREO ELECTRÓNICO"> <text name="to_label"> Correo electrónico del destinatario: diff --git a/indra/newview/skins/default/xui/es/floater_preferences.xml b/indra/newview/skins/default/xui/es/floater_preferences.xml index df7fc93dd9..5fe4ae3b64 100644 --- a/indra/newview/skins/default/xui/es/floater_preferences.xml +++ b/indra/newview/skins/default/xui/es/floater_preferences.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Preferences" title="Preferencias" min_width="350" width="646"> +<floater name="Preferences" title="PREFERENCIAS" min_width="350" width="646"> <button label="OK" label_selected="OK" name="OK"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> <button label="Aplicar" label_selected="Aplicar" name="Apply"/> diff --git a/indra/newview/skins/default/xui/es/floater_preview_classified.xml b/indra/newview/skins/default/xui/es/floater_preview_classified.xml index f2fa38ead8..8114c7f3c2 100644 --- a/indra/newview/skins/default/xui/es/floater_preview_classified.xml +++ b/indra/newview/skins/default/xui/es/floater_preview_classified.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="classified_preview" title="Información clasificada"/> +<floater name="classified_preview" title="INFORMACIÓN CLASIFICADA"/> diff --git a/indra/newview/skins/default/xui/es/floater_preview_event.xml b/indra/newview/skins/default/xui/es/floater_preview_event.xml index 7f727b0502..04cb0de4d4 100644 --- a/indra/newview/skins/default/xui/es/floater_preview_event.xml +++ b/indra/newview/skins/default/xui/es/floater_preview_event.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="event_preview" title="Información de eventos"/> +<floater name="event_preview" title="INFORMACIÓN DE EVENTOS"/> 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 4d11520335..35f795a7ec 100644 --- a/indra/newview/skins/default/xui/es/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/es/floater_preview_notecard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="preview notecard" title="Nota:"> +<floater name="preview notecard" title="NOTA:"> <button label="Guardar" label_selected="Guardar" name="Save"/> <text name="desc txt"> Descripción: diff --git a/indra/newview/skins/default/xui/es/floater_region_info.xml b/indra/newview/skins/default/xui/es/floater_region_info.xml index b5a85378c2..46d0839238 100644 --- a/indra/newview/skins/default/xui/es/floater_region_info.xml +++ b/indra/newview/skins/default/xui/es/floater_region_info.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="regioninfo" title="Región/Estado"/> +<floater name="regioninfo" title="REGIÓN/ESTADO"/> diff --git a/indra/newview/skins/default/xui/es/floater_report_abuse.xml b/indra/newview/skins/default/xui/es/floater_report_abuse.xml index 8ae8c212e6..a075c51247 100644 --- a/indra/newview/skins/default/xui/es/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/es/floater_report_abuse.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_report_abuse" title="Denuncia de Infracción"> +<floater name="floater_report_abuse" title="DENUNCIA DE INFRACCIÓN"> <texture_picker label="" name="screenshot"/> <check_box label="Incluir una captura de pantalla" name="screen_check"/> <text name="reporter_title"> diff --git a/indra/newview/skins/default/xui/es/floater_script_debug.xml b/indra/newview/skins/default/xui/es/floater_script_debug.xml index e33ffb7d96..e7eddfd9f3 100644 --- a/indra/newview/skins/default/xui/es/floater_script_debug.xml +++ b/indra/newview/skins/default/xui/es/floater_script_debug.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <multi_floater name="script debug floater" title="Alerta/Error de los scripts"> <tab_container name="Preview Tabs"> - <floater label="Script" name="all_scripts" title="[Todos los scripts]"/> + <floater label="Script" name="all_scripts" title="[ALL SCRIPTS]"/> </tab_container> </multi_floater> diff --git a/indra/newview/skins/default/xui/es/floater_script_preview.xml b/indra/newview/skins/default/xui/es/floater_script_preview.xml index 0d8cd0b406..79984e7bc1 100644 --- a/indra/newview/skins/default/xui/es/floater_script_preview.xml +++ b/indra/newview/skins/default/xui/es/floater_script_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="preview lsl text" title="Script: script de rotación"> +<floater name="preview lsl text" title="SCRIPT: SCRIPT DE ROTACIÓN"> <text name="desc txt"> Descripción: </text> diff --git a/indra/newview/skins/default/xui/es/floater_script_queue.xml b/indra/newview/skins/default/xui/es/floater_script_queue.xml index dcd2bfe5b0..ace596cd9a 100644 --- a/indra/newview/skins/default/xui/es/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/es/floater_script_queue.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="queue" title="Reinicio"> +<floater name="queue" title="REINICIO"> <button label="Cerrar" label_selected="Cerrar" name="close"/> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_script_search.xml b/indra/newview/skins/default/xui/es/floater_script_search.xml index 3c8dc2fe9c..a59f258a18 100644 --- a/indra/newview/skins/default/xui/es/floater_script_search.xml +++ b/indra/newview/skins/default/xui/es/floater_script_search.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="script search" title="Buscar en el script" width="320"> +<floater name="script search" title="BUSCAR EN EL SCRIPT" width="320"> <check_box label="Indiferente mays./mins." name="case_text" left="75"/> <button label="Buscar" label_selected="Buscar" name="search_btn" width="85"/> <button label="Reemplazar" label_selected="Reemplazar" name="replace_btn" left="100" width="85"/> diff --git a/indra/newview/skins/default/xui/es/floater_sell_land.xml b/indra/newview/skins/default/xui/es/floater_sell_land.xml index bce13c1e33..c6e8746250 100644 --- a/indra/newview/skins/default/xui/es/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/es/floater_sell_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="sell land" title="Vender el terreno"> +<floater name="sell land" title="VENDER EL TERRENO"> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <text name="info_parcel_label"> diff --git a/indra/newview/skins/default/xui/es/floater_settings_debug.xml b/indra/newview/skins/default/xui/es/floater_settings_debug.xml index 1d5ad2f34c..0e8e6bdfd2 100644 --- a/indra/newview/skins/default/xui/es/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/es/floater_settings_debug.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="settings_debug" title="Configuración del depurador"> +<floater name="settings_debug" title="CONFIGURACIÓN DEL DEPURADOR"> <combo_box name="boolean_combo"> <combo_box.item name="TRUE" label="TRUE" /> <combo_box.item name="FALSE" label="FALSE" /> diff --git a/indra/newview/skins/default/xui/es/floater_snapshot.xml b/indra/newview/skins/default/xui/es/floater_snapshot.xml index c1ace23503..afea6c09fe 100644 --- a/indra/newview/skins/default/xui/es/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/es/floater_snapshot.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="Vista previa de la foto"> +<floater name="Snapshot" title="VISTA PREVIA DE LA FOTO"> <text name="type_label"> Destino de la foto </text> diff --git a/indra/newview/skins/default/xui/es/floater_sound_preview.xml b/indra/newview/skins/default/xui/es/floater_sound_preview.xml index e69ac10123..8b8d9f13ce 100644 --- a/indra/newview/skins/default/xui/es/floater_sound_preview.xml +++ b/indra/newview/skins/default/xui/es/floater_sound_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Sound Preview" title="sound.wav"> +<floater name="Sound Preview" title="SOUND.WAV"> <text name="name_label"> Nombre: </text> diff --git a/indra/newview/skins/default/xui/es/floater_statistics.xml b/indra/newview/skins/default/xui/es/floater_statistics.xml index 6e644cacf1..c9b0a76df0 100644 --- a/indra/newview/skins/default/xui/es/floater_statistics.xml +++ b/indra/newview/skins/default/xui/es/floater_statistics.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="stats floater" title="Estadísticas"/> +<floater name="stats floater" title="ESTADÍSTICAS"/> diff --git a/indra/newview/skins/default/xui/es/floater_telehub.xml b/indra/newview/skins/default/xui/es/floater_telehub.xml index 74084e9db9..b2dddfb7f7 100644 --- a/indra/newview/skins/default/xui/es/floater_telehub.xml +++ b/indra/newview/skins/default/xui/es/floater_telehub.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="telehub" title="Punto de Teleporte" min_height="310" height="310"> +<floater name="telehub" title="PUNTO DE TELEPORTE" min_height="310" height="310"> <text name="status_text_connected"> Punto de Teleporte conectado al objeto [OBJECT] </text> diff --git a/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml index 8b661a6041..09d6e7e4aa 100644 --- a/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="texture picker" title="Elegir: Textura"> +<floater name="texture picker" title="ELEGIR: TEXTURA"> <string name="choose_picture"> Pulse para elegir una imagen </string> diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml index da842d22c6..24db352ac4 100644 --- a/indra/newview/skins/default/xui/es/floater_tools.xml +++ b/indra/newview/skins/default/xui/es/floater_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="toolbox floater" title="" short_title="Construir" width="288"> +<floater name="toolbox floater" title="" short_title="CONSTRUIR" width="288"> <button label="" label_selected="" name="button focus" tool_tip="Visión"/> <button label="" label_selected="" name="button move" tool_tip="Mover"/> <button label="" label_selected="" name="button edit" tool_tip="Editar"/> diff --git a/indra/newview/skins/default/xui/es/floater_top_objects.xml b/indra/newview/skins/default/xui/es/floater_top_objects.xml index 95f2c39d42..29ae9991af 100644 --- a/indra/newview/skins/default/xui/es/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/es/floater_top_objects.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="top_objects" title="cargando..."> +<floater name="top_objects" title="CARGANDO..."> <text name="title_text"> Cargando... </text> diff --git a/indra/newview/skins/default/xui/es/floater_water.xml b/indra/newview/skins/default/xui/es/floater_water.xml index 934fc7882b..c86e49a355 100644 --- a/indra/newview/skins/default/xui/es/floater_water.xml +++ b/indra/newview/skins/default/xui/es/floater_water.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Water Floater" title="Editor avanzado del agua"> +<floater name="Water Floater" title="EDITOR AVANZADO DEL AGUA"> <text name="KeyFramePresetsText"> Agua predefinida: </text> diff --git a/indra/newview/skins/default/xui/es/floater_windlight_options.xml b/indra/newview/skins/default/xui/es/floater_windlight_options.xml index e240dea0b5..0697f05553 100644 --- a/indra/newview/skins/default/xui/es/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/es/floater_windlight_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="WindLight floater" title="Editor avanzado del cielo"> +<floater name="WindLight floater" title="EDITOR AVANZADO DEL CIELO"> <text name="KeyFramePresetsText"> Cielos definidos: </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 6521e72d5a..4d7337bef7 100644 --- a/indra/newview/skins/default/xui/es/floater_world_map.xml +++ b/indra/newview/skins/default/xui/es/floater_world_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="worldmap" title="Mapa del Mundo"> +<floater name="worldmap" title="MAPA DEL MUNDO"> <tab_container name="maptab"> <panel label="Objetos" name="objects_mapview"/> <panel label="Terreno" name="terrain_mapview"/> diff --git a/indra/newview/skins/default/xui/fr/floater_about.xml b/indra/newview/skins/default/xui/fr/floater_about.xml index 7b918be075..53e48352f1 100644 --- a/indra/newview/skins/default/xui/fr/floater_about.xml +++ b/indra/newview/skins/default/xui/fr/floater_about.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_about" title="A propos de [APP_NAME]"> +<floater name="floater_about" title="A PROPOS DE [APP_NAME]"> <tab_container name="about_tab"> <panel name="credits_panel"> <text_editor name="credits_editor"> 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 f2d2dbfa07..0729c79cbb 100644 --- a/indra/newview/skins/default/xui/fr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterland" title="À propos du terrain"> +<floater name="floaterland" title="À PROPOS DU TERRAIN"> <tab_container name="landtab"> <panel label="Général" name="land_general_panel"> <text name="Name:"> diff --git a/indra/newview/skins/default/xui/fr/floater_auction.xml b/indra/newview/skins/default/xui/fr/floater_auction.xml index 4bdf9df1be..3ec95a60c5 100644 --- a/indra/newview/skins/default/xui/fr/floater_auction.xml +++ b/indra/newview/skins/default/xui/fr/floater_auction.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_auction" title="Commencer la vente de terrain Linden"> +<floater name="floater_auction" title="COMMENCER LA VENTE DE TERRAIN LINDEN"> <check_box label="Inclure le marquage de sélection jaune" name="fence_check" /> <combo_box name="saletype_combo"> <combo_box.item name="Auction" label="Enchères" /> diff --git a/indra/newview/skins/default/xui/fr/floater_avatar_picker.xml b/indra/newview/skins/default/xui/fr/floater_avatar_picker.xml index 01b4c944f3..c713d3e930 100644 --- a/indra/newview/skins/default/xui/fr/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/fr/floater_avatar_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatarpicker" title="Choisir le résident"> +<floater name="avatarpicker" title="CHOISIR LE RÉSIDENT"> <tab_container name="ResidentChooserTabs"> <panel label="Rechercher" name="SearchPanel"> <text name="InstructSearchResidentName"> 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 f4e3a1615c..569126f3ec 100644 --- a/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatar_texture_debug" title="Textures de l'avatar"> +<floater name="avatar_texture_debug" title="TEXTURES DE L'AVATAR"> <text name="label"> Textures fixées </text> diff --git a/indra/newview/skins/default/xui/fr/floater_beacons.xml b/indra/newview/skins/default/xui/fr/floater_beacons.xml index 0b060983ee..4f5c5d442f 100644 --- a/indra/newview/skins/default/xui/fr/floater_beacons.xml +++ b/indra/newview/skins/default/xui/fr/floater_beacons.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="beacons" title="Balises"> +<floater name="beacons" title="BALISES"> <panel name="beacons_panel"> <check_box label="Objets scriptés avec Toucher uniquement" name="touch_only"/> <check_box label="Objets scriptés" name="scripted"/> diff --git a/indra/newview/skins/default/xui/fr/floater_build_options.xml b/indra/newview/skins/default/xui/fr/floater_build_options.xml index 3451c2de4c..76e8e2f637 100644 --- a/indra/newview/skins/default/xui/fr/floater_build_options.xml +++ b/indra/newview/skins/default/xui/fr/floater_build_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="build options floater" title="Options de la grille"> +<floater name="build options floater" title="OPTIONS DE LA GRILLE"> <spinner label="Unité (mètres)" name="GridResolution" /> <spinner label="Mesures (mètres)" name="GridDrawSize" /> <check_box label="Activer la fixation des sous-unités" name="GridSubUnit" /> diff --git a/indra/newview/skins/default/xui/fr/floater_bulk_perms.xml b/indra/newview/skins/default/xui/fr/floater_bulk_perms.xml index b868aa33ad..98b7faa2cc 100644 --- a/indra/newview/skins/default/xui/fr/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/fr/floater_bulk_perms.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterbulkperms" title="Changement des droits relatifs au contenu"> +<floater name="floaterbulkperms" title="CHANGEMENT DES DROITS RELATIFS AU CONTENU"> <text name="applyto"> Types de contenu </text> diff --git a/indra/newview/skins/default/xui/fr/floater_bumps.xml b/indra/newview/skins/default/xui/fr/floater_bumps.xml index e12c7ed17d..e439c30524 100644 --- a/indra/newview/skins/default/xui/fr/floater_bumps.xml +++ b/indra/newview/skins/default/xui/fr/floater_bumps.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_bumps" title="Collisions, coups et bousculades"> +<floater name="floater_bumps" title="COLLISIONS, COUPS ET BOUSCULADES"> <text name="none_detected"> Aucun détecté </text> diff --git a/indra/newview/skins/default/xui/fr/floater_buy_contents.xml b/indra/newview/skins/default/xui/fr/floater_buy_contents.xml index 916b270500..e8b47f5365 100644 --- a/indra/newview/skins/default/xui/fr/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/fr/floater_buy_contents.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_buy_contents" title="Acheter ce contenu"> +<floater name="floater_buy_contents" title="ACHETER CE CONTENU"> <text name="contains_text"> [NAME] contient : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_buy_currency.xml b/indra/newview/skins/default/xui/fr/floater_buy_currency.xml index 85d67218d3..9112d30be2 100644 --- a/indra/newview/skins/default/xui/fr/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/fr/floater_buy_currency.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy currency" title="Acheter des L$"> +<floater name="buy currency" title="ACHETER DES L$"> <text left="5" name="info_buying"> Achat de L$ : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_buy_land.xml b/indra/newview/skins/default/xui/fr/floater_buy_land.xml index aaf1577114..2b93098847 100644 --- a/indra/newview/skins/default/xui/fr/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_buy_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy land" title="Acheter le terrain"> +<floater name="buy land" title="ACHETER LE TERRAIN"> <text name="region_name_label"> Région : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_buy_object.xml b/indra/newview/skins/default/xui/fr/floater_buy_object.xml index 9e0ce25b97..893d559e6e 100644 --- a/indra/newview/skins/default/xui/fr/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/fr/floater_buy_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Acheter une copie de l'objet"> +<floater name="contents" title="ACHETER UNE COPIE DE L'OBJET"> <text name="contents_text"> et ses contenus : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_choose_group.xml b/indra/newview/skins/default/xui/fr/floater_choose_group.xml index ade440f296..15cdd4d332 100644 --- a/indra/newview/skins/default/xui/fr/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/fr/floater_choose_group.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="groups" title="Groupes"> +<floater name="groups" title="GROUPES"> <text name="groupdesc"> Choisissez un groupe : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_color_picker.xml b/indra/newview/skins/default/xui/fr/floater_color_picker.xml index 94bcad070e..996f3e9b07 100644 --- a/indra/newview/skins/default/xui/fr/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/fr/floater_color_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="ColorPicker" title="Choix de texture et de couleur"> +<floater name="ColorPicker" title="CHOIX DE TEXTURE ET DE COULEUR"> <text name="r_val_text"> Rouge : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_customize.xml b/indra/newview/skins/default/xui/fr/floater_customize.xml index 1250c46933..bf70c5415e 100644 --- a/indra/newview/skins/default/xui/fr/floater_customize.xml +++ b/indra/newview/skins/default/xui/fr/floater_customize.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="Apparence" width="548"> +<floater name="floater customize" title="APPARENCE" width="548"> <tab_container name="customize tab container" tab_min_width="150" width="546"> <placeholder label="Parties du corps" name="body_parts_placeholder"/> <panel label="Silhouette" left="154" name="Shape" width="389"> diff --git a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml index 1103539898..0b36b7b8ca 100644 --- a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Day Cycle Floater" title="Editeur du cycle du jour"> +<floater name="Day Cycle Floater" title="EDITEUR DU CYCLE DU JOUR"> <tab_container name="Day Cycle Tabs"> <panel label="Cycle du jour" name="Day Cycle"> <button label="?" name="WLDayCycleHelp" /> diff --git a/indra/newview/skins/default/xui/fr/floater_device_settings.xml b/indra/newview/skins/default/xui/fr/floater_device_settings.xml index 656f1c4fba..5374b4e593 100644 --- a/indra/newview/skins/default/xui/fr/floater_device_settings.xml +++ b/indra/newview/skins/default/xui/fr/floater_device_settings.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater name="floater_device_settings" - title="Paramètres du matériel utilisé pour le chat vocal" /> + title="PARAMÈTRES DU MATÉRIEL UTILISÉ POUR LE CHAT VOCAL" /> diff --git a/indra/newview/skins/default/xui/fr/floater_env_settings.xml b/indra/newview/skins/default/xui/fr/floater_env_settings.xml index 1d14142dd3..7d6de114be 100644 --- a/indra/newview/skins/default/xui/fr/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/fr/floater_env_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Environment Editor Floater" title="Éditeur d'environnement"> +<floater name="Environment Editor Floater" title="ÉDITEUR D'ENVIRONNEMENT"> <text bottom="-45" name="EnvTimeText"> Heure de la journée diff --git a/indra/newview/skins/default/xui/fr/floater_font_test.xml b/indra/newview/skins/default/xui/fr/floater_font_test.xml index 11eb11a0d7..3a32e8adc5 100644 --- a/indra/newview/skins/default/xui/fr/floater_font_test.xml +++ b/indra/newview/skins/default/xui/fr/floater_font_test.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Test de la police"> +<floater name="contents" title="TEST DE LA POLICE"> <text name="linea"> OverrideTest, Times-BOLD doit être sélectionné ici. (De default/xui/fr) </text> diff --git a/indra/newview/skins/default/xui/fr/floater_gesture.xml b/indra/newview/skins/default/xui/fr/floater_gesture.xml index 4411fee480..b3026478ff 100644 --- a/indra/newview/skins/default/xui/fr/floater_gesture.xml +++ b/indra/newview/skins/default/xui/fr/floater_gesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="gestures" title="Gestes utilisés"> +<floater name="gestures" title="GESTES UTILISÉS"> <text name="help_label"> Double-cliquez sur un geste pour jouer les animations et les sons. diff --git a/indra/newview/skins/default/xui/fr/floater_god_tools.xml b/indra/newview/skins/default/xui/fr/floater_god_tools.xml index 461956ff34..33cb43f7ac 100644 --- a/indra/newview/skins/default/xui/fr/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/fr/floater_god_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="godtools floater" title="Outils divins"> +<floater name="godtools floater" title="OUTILS DIVINS"> <tab_container name="GodTools Tabs"> <panel label="Grille" name="grid"> <button label="Éjecter tous" label_selected="Éjecter tous" name="Kick all users" width="175" /> diff --git a/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml b/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml index 11d7fc28e9..6c1ea09c90 100644 --- a/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Hardware Settings Floater" title="Configuration du matériel"> +<floater name="Hardware Settings Floater" title="CONFIGURATION DU MATÉRIEL"> <text name="Filtering:"> Filtres : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_hud.xml b/indra/newview/skins/default/xui/fr/floater_hud.xml index 55c8b57ae2..13ca0e8770 100644 --- a/indra/newview/skins/default/xui/fr/floater_hud.xml +++ b/indra/newview/skins/default/xui/fr/floater_hud.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_hud" title="Didacticiel" /> +<floater name="floater_hud" title="DIDACTICIEL" /> diff --git a/indra/newview/skins/default/xui/fr/floater_inspect.xml b/indra/newview/skins/default/xui/fr/floater_inspect.xml index f140c66de0..944a157f17 100644 --- a/indra/newview/skins/default/xui/fr/floater_inspect.xml +++ b/indra/newview/skins/default/xui/fr/floater_inspect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="inspect" title="Inspecter les objets"> +<floater name="inspect" title="INSPECTER LES OBJETS"> <scroll_list name="object_list" tool_tip="Sélectionner un objet de la liste pour le mettre en surbrillance dans le Monde."> <column label="Nom" name="object_name" /> diff --git a/indra/newview/skins/default/xui/fr/floater_inventory.xml b/indra/newview/skins/default/xui/fr/floater_inventory.xml index 7173025d18..a83a95fa75 100644 --- a/indra/newview/skins/default/xui/fr/floater_inventory.xml +++ b/indra/newview/skins/default/xui/fr/floater_inventory.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="Inventaire"> +<floater name="Inventory" title="INVENTAIRE"> <search_editor label="Saisissez votre recherche ici" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Tous les objets" name="All Items"/> diff --git a/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml index ec83d5bcaa..2885a7e316 100644 --- a/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="item properties" title="Propriétés de l'objet de l'inventaire"> +<floater name="item properties" title="PROPRIÉTÉS DE L'OBJET DE L'INVENTAIRE"> <text name="LabelItemNameTitle"> Nom : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml index 634bb6e2e9..8fb8d3c6f4 100644 --- a/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory Finder" title="inventory_recent_items"> +<floater name="Inventory Finder" title="INVENTORY_RECENT_ITEMS"> <check_box label="Animations" name="check_animation"/> <check_box label="Cartes de visite" name="check_calling_card"/> <check_box label="Habits" name="check_clothing"/> diff --git a/indra/newview/skins/default/xui/fr/floater_joystick.xml b/indra/newview/skins/default/xui/fr/floater_joystick.xml index 75800847d7..546c95de4c 100644 --- a/indra/newview/skins/default/xui/fr/floater_joystick.xml +++ b/indra/newview/skins/default/xui/fr/floater_joystick.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" title="Configuration du joystick"> +<floater name="Joystick" title="CONFIGURATION DU JOYSTICK"> <check_box name="enable_joystick" label="Activer :"/> <spinner label="Mapping axe des X " name="JoystickAxis1"/> <spinner label="Mapping axe des Y" name="JoystickAxis2"/> diff --git a/indra/newview/skins/default/xui/fr/floater_lagmeter.xml b/indra/newview/skins/default/xui/fr/floater_lagmeter.xml index 54069c9c49..593ad903b9 100644 --- a/indra/newview/skins/default/xui/fr/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/fr/floater_lagmeter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_lagmeter" title="Mesure du lag"> +<floater name="floater_lagmeter" title="MESURE DU LAG"> <button name="client_lagmeter" tool_tip="Statut du lag client"/> <text name="client"> Client : diff --git a/indra/newview/skins/default/xui/fr/floater_land_holdings.xml b/indra/newview/skins/default/xui/fr/floater_land_holdings.xml index 9c4f4ee966..17adafa8d9 100644 --- a/indra/newview/skins/default/xui/fr/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/fr/floater_land_holdings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="land holdings floater" title="Mes terrains"> +<floater name="land holdings floater" title="MES TERRAINS"> <scroll_list name="parcel list"> <column label="Nom de la parcelle" name="name"/> <column label="Région" name="location"/> diff --git a/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml index e2e2a9af9a..76db22cea4 100644 --- a/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script ed float" title="Script : Nouveau script"> +<floater name="script ed float" title="SCRIPT : NOUVEAU SCRIPT"> <button label="Réinitialiser" label_selected="Réinitialiser" name="Reset" width="100" left="390"/> <check_box label="Exécution en cours" name="running" left="4"/> <check_box label="Mono" name="mono" left="130"/> diff --git a/indra/newview/skins/default/xui/fr/floater_lsl_guide.xml b/indra/newview/skins/default/xui/fr/floater_lsl_guide.xml index 5dc0fa76a3..2e3d88264e 100644 --- a/indra/newview/skins/default/xui/fr/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/fr/floater_lsl_guide.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script ed float" title="Wiki LSL"> +<floater name="script ed float" title="WIKI LSL"> <check_box label="Suivre le curseur" name="lock_check" /> <combo_box label="Verrouiller" name="history_combo" left_delta="120" width="70"/> <button label="Précédente" name="back_btn" left_delta="75"/> diff --git a/indra/newview/skins/default/xui/fr/floater_media_browser.xml b/indra/newview/skins/default/xui/fr/floater_media_browser.xml index e75b45c43a..5a787a6bf9 100644 --- a/indra/newview/skins/default/xui/fr/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/fr/floater_media_browser.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_about" title="Navigateur"> +<floater name="floater_about" title="NAVIGATEUR"> <layout_stack name="stack1"> <layout_panel name="nav_controls"> <button label="Précédente" name="back" width="75"/> diff --git a/indra/newview/skins/default/xui/fr/floater_mem_leaking.xml b/indra/newview/skins/default/xui/fr/floater_mem_leaking.xml index 8ee3a23b95..e62aad6cd3 100644 --- a/indra/newview/skins/default/xui/fr/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/fr/floater_mem_leaking.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="MemLeak" title="Simulation fuite mémoire"> +<floater name="MemLeak" title="SIMULATION FUITE MÉMOIRE"> <spinner label="Vitesse de la fuite (octets) :" name="leak_speed" /> <spinner label="Max mémoire perdue (Mo) :" name="max_leak" /> <text name="total_leaked_label"> diff --git a/indra/newview/skins/default/xui/fr/floater_mute_object.xml b/indra/newview/skins/default/xui/fr/floater_mute_object.xml index 23d351f32d..aae5770d51 100644 --- a/indra/newview/skins/default/xui/fr/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/fr/floater_mute_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="mute by name" title="Ignorer les objets par nom"> +<floater name="mute by name" title="IGNORER LES OBJETS PAR NOM"> <text name="message"> Cette fonction ne marche que pour les chats et les IM, pas les sons. Saisissez le nom exact de l'objet. diff --git a/indra/newview/skins/default/xui/fr/floater_my_friends.xml b/indra/newview/skins/default/xui/fr/floater_my_friends.xml index 911647d8be..841a42a0ea 100644 --- a/indra/newview/skins/default/xui/fr/floater_my_friends.xml +++ b/indra/newview/skins/default/xui/fr/floater_my_friends.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_my_friends" title="Contacts"> +<floater name="floater_my_friends" title="CONTACTS"> <tab_container name="friends_and_groups"> <panel label="Amis" name="friends_panel" /> <panel label="Groupes" name="groups_panel" /> diff --git a/indra/newview/skins/default/xui/fr/floater_notification.xml b/indra/newview/skins/default/xui/fr/floater_notification.xml index 7ca2dc3a64..62727da007 100644 --- a/indra/newview/skins/default/xui/fr/floater_notification.xml +++ b/indra/newview/skins/default/xui/fr/floater_notification.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="notification" title="Console de notifications"> +<floater name="notification" title="CONSOLE DE NOTIFICATIONS"> <text_editor name="payload"> Chargement.. </text_editor> diff --git a/indra/newview/skins/default/xui/fr/floater_notifications_console.xml b/indra/newview/skins/default/xui/fr/floater_notifications_console.xml index 7262fe8fe2..fd3782bac2 100644 --- a/indra/newview/skins/default/xui/fr/floater_notifications_console.xml +++ b/indra/newview/skins/default/xui/fr/floater_notifications_console.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="notifications_console" title="Console de notifications"> +<floater name="notifications_console" title="CONSOLE DE NOTIFICATIONS"> <combo_box label="Sélectionner le type de notification" name="notification_types" width="412"/> <button label="Ajouter" name="add_notification" left="417" width="78"/> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_openobject.xml b/indra/newview/skins/default/xui/fr/floater_openobject.xml index 3761200d48..5ffa2f236d 100644 --- a/indra/newview/skins/default/xui/fr/floater_openobject.xml +++ b/indra/newview/skins/default/xui/fr/floater_openobject.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="objectcontents" title="Contenu des objets"> +<floater name="objectcontents" title="CONTENU DES OBJETS"> <text name="object_name"> [DESC]: </text> diff --git a/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml b/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml index 9ea970d89d..4b885f3afb 100644 --- a/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="perm prefs" title="Droits par défaut"> +<floater name="perm prefs" title="DROITS PAR DÉFAUT"> <panel label="Droits" name="permissions"> <button label="?" label_selected="?" name="help"/> <check_box label="Partager avec le groupe" name="share_with_group"/> diff --git a/indra/newview/skins/default/xui/fr/floater_post_process.xml b/indra/newview/skins/default/xui/fr/floater_post_process.xml index 52afb340a6..a22c7512e5 100644 --- a/indra/newview/skins/default/xui/fr/floater_post_process.xml +++ b/indra/newview/skins/default/xui/fr/floater_post_process.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Post-Process Floater" title="Paramètres post-traitement"> +<floater name="Post-Process Floater" title="PARAMÈTRES POST-TRAITEMENT"> <tab_container name="Post-Process Tabs"> <panel label="Filtre couleur" name="wmiColorFilterPanel"> <check_box label="Activer" name="wmiColorFilterToggle" /> diff --git a/indra/newview/skins/default/xui/fr/floater_postcard.xml b/indra/newview/skins/default/xui/fr/floater_postcard.xml index ab21d7423a..9c998c1838 100644 --- a/indra/newview/skins/default/xui/fr/floater_postcard.xml +++ b/indra/newview/skins/default/xui/fr/floater_postcard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Postcard" title="Envoyer la photo par e-mail"> +<floater name="Postcard" title="ENVOYER LA PHOTO PAR E-MAIL"> <text name="to_label" width="135"> E-mail du destinataire : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_preferences.xml b/indra/newview/skins/default/xui/fr/floater_preferences.xml index 9dab4d642c..ccd29a01dc 100644 --- a/indra/newview/skins/default/xui/fr/floater_preferences.xml +++ b/indra/newview/skins/default/xui/fr/floater_preferences.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Preferences" title="Préférences" min_width="330" width="626"> +<floater name="Preferences" title="PRÉFÉRENCES" min_width="330" width="626"> <button label="À propos" label_selected="À propos" name="About..." /> <button label="OK" label_selected="OK" name="OK" /> <button label="Annuler" label_selected="Annuler" name="Cancel" /> diff --git a/indra/newview/skins/default/xui/fr/floater_preview_classified.xml b/indra/newview/skins/default/xui/fr/floater_preview_classified.xml index 1b6f26150d..436a386dc8 100644 --- a/indra/newview/skins/default/xui/fr/floater_preview_classified.xml +++ b/indra/newview/skins/default/xui/fr/floater_preview_classified.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="classified_preview" title="Informations sur la petite annonce" /> +<floater name="classified_preview" title="INFORMATIONS SUR LA PETITE ANNONCE" /> diff --git a/indra/newview/skins/default/xui/fr/floater_preview_event.xml b/indra/newview/skins/default/xui/fr/floater_preview_event.xml index e7fc2aa8dd..30eeeec70d 100644 --- a/indra/newview/skins/default/xui/fr/floater_preview_event.xml +++ b/indra/newview/skins/default/xui/fr/floater_preview_event.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="event_preview" title="Informations sur l'événement" /> +<floater name="event_preview" title="INFORMATIONS SUR L'ÉVÉNEMENT" /> 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 a23b906df6..ea52442236 100644 --- a/indra/newview/skins/default/xui/fr/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/fr/floater_preview_notecard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="preview notecard" title="Remarque :"> +<floater name="preview notecard" title="REMARQUE :"> <button label="Enregistrer" label_selected="Enregistrer" name="Save" /> <text name="desc txt"> Description : diff --git a/indra/newview/skins/default/xui/fr/floater_region_info.xml b/indra/newview/skins/default/xui/fr/floater_region_info.xml index d69f212b86..3ec1ebf7e6 100644 --- a/indra/newview/skins/default/xui/fr/floater_region_info.xml +++ b/indra/newview/skins/default/xui/fr/floater_region_info.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="regioninfo" title="Région et domaine"/> +<floater name="regioninfo" title="RÉGION ET DOMAINE"/> diff --git a/indra/newview/skins/default/xui/fr/floater_report_abuse.xml b/indra/newview/skins/default/xui/fr/floater_report_abuse.xml index 687b3068e6..be97165a3e 100644 --- a/indra/newview/skins/default/xui/fr/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/fr/floater_report_abuse.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_report_abuse" title="Signaler une infraction"> +<floater name="floater_report_abuse" title="SIGNALER UNE INFRACTION"> <texture_picker label="" name="screenshot"/> <check_box label="Inclure une capture d'écran" name="screen_check"/> <text name="reporter_title" width="60"> diff --git a/indra/newview/skins/default/xui/fr/floater_script_debug.xml b/indra/newview/skins/default/xui/fr/floater_script_debug.xml index 3664222fd2..e257aac6c4 100644 --- a/indra/newview/skins/default/xui/fr/floater_script_debug.xml +++ b/indra/newview/skins/default/xui/fr/floater_script_debug.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <multi_floater name="script debug floater" title="Erreurs/alertes de scripts"> <tab_container name="Preview Tabs"> - <floater label="Script" name="all_scripts" title="[All scripts]" /> + <floater label="Script" name="all_scripts" title="[ALL SCRIPTS]" /> </tab_container> </multi_floater> diff --git a/indra/newview/skins/default/xui/fr/floater_script_preview.xml b/indra/newview/skins/default/xui/fr/floater_script_preview.xml index b767081625..43541e8de3 100644 --- a/indra/newview/skins/default/xui/fr/floater_script_preview.xml +++ b/indra/newview/skins/default/xui/fr/floater_script_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="preview lsl text" title="Script : Script de rotation"> +<floater name="preview lsl text" title="SCRIPT : SCRIPT DE ROTATION"> <text name="desc txt"> Description : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_script_queue.xml b/indra/newview/skins/default/xui/fr/floater_script_queue.xml index 55487f75db..d5f39e7ace 100644 --- a/indra/newview/skins/default/xui/fr/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/fr/floater_script_queue.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="queue" title="Réinitialiser progression"> +<floater name="queue" title="RÉINITIALISER PROGRESSION"> <button label="Fermer" label_selected="Fermer" name="close" /> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_script_search.xml b/indra/newview/skins/default/xui/fr/floater_script_search.xml index 6f912026c4..49b0ffe542 100644 --- a/indra/newview/skins/default/xui/fr/floater_script_search.xml +++ b/indra/newview/skins/default/xui/fr/floater_script_search.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script search" title="Recherche de scripts" width="320"> +<floater name="script search" title="RECHERCHE DE SCRIPTS" width="320"> <check_box label="Non sensible à la casse" name="case_text" left="75"/> <button label="Rechercher" label_selected="Rechercher" name="search_btn" width="96"/> <button label="Remplacer" label_selected="Remplacer" name="replace_btn" left="111" width="96"/> diff --git a/indra/newview/skins/default/xui/fr/floater_sell_land.xml b/indra/newview/skins/default/xui/fr/floater_sell_land.xml index 643a9435db..81c3ccc79a 100644 --- a/indra/newview/skins/default/xui/fr/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_sell_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="sell land" title="Vendre terrain"> +<floater name="sell land" title="VENDRE TERRAIN"> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <text name="info_parcel_label"> diff --git a/indra/newview/skins/default/xui/fr/floater_settings_debug.xml b/indra/newview/skins/default/xui/fr/floater_settings_debug.xml index e67b8e2f79..f0781d0b32 100644 --- a/indra/newview/skins/default/xui/fr/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/fr/floater_settings_debug.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="settings_debug" title="Paramétrages du mode Debug"> +<floater name="settings_debug" title="PARAMÉTRAGES DU MODE DEBUG"> <combo_box name="boolean_combo"> <combo_box.item name="TRUE" label="TRUE" /> <combo_box.item name="FALSE" label="FALSE" /> diff --git a/indra/newview/skins/default/xui/fr/floater_snapshot.xml b/indra/newview/skins/default/xui/fr/floater_snapshot.xml index 49c6ff04a6..a28e64f7af 100644 --- a/indra/newview/skins/default/xui/fr/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/fr/floater_snapshot.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="Prévisualiser la photo" width="247"> +<floater name="Snapshot" title="PRÉVISUALISER LA PHOTO" width="247"> <text name="type_label"> Destination de la photo </text> diff --git a/indra/newview/skins/default/xui/fr/floater_sound_preview.xml b/indra/newview/skins/default/xui/fr/floater_sound_preview.xml index 1ab3a4a714..9e2b30b3f6 100644 --- a/indra/newview/skins/default/xui/fr/floater_sound_preview.xml +++ b/indra/newview/skins/default/xui/fr/floater_sound_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Sound Preview" title="sound.wav"> +<floater name="Sound Preview" title="SOUND.WAV"> <text name="name_label"> Nom : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_statistics.xml b/indra/newview/skins/default/xui/fr/floater_statistics.xml index 0768c3ace4..a2e3c199ab 100644 --- a/indra/newview/skins/default/xui/fr/floater_statistics.xml +++ b/indra/newview/skins/default/xui/fr/floater_statistics.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="stats floater" title="Statistiques"/> +<floater name="stats floater" title="STATISTIQUES"/> diff --git a/indra/newview/skins/default/xui/fr/floater_telehub.xml b/indra/newview/skins/default/xui/fr/floater_telehub.xml index e6201785bd..c89eea517e 100644 --- a/indra/newview/skins/default/xui/fr/floater_telehub.xml +++ b/indra/newview/skins/default/xui/fr/floater_telehub.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="telehub" title="Téléhub" min_height="310" height="310" > +<floater name="telehub" title="TÉLÉHUB" min_height="310" height="310" > <text name="status_text_connected"> Téléhub connecté à l'objet [OBJECT] </text> diff --git a/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml index fa8b65d8a5..ff84025a44 100644 --- a/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="texture picker" title="Texture"> +<floater name="texture picker" title="TEXTURE"> <string name="choose_picture"> Cliquez pour sélectionner une image </string> diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml index e8db326e15..3638c3fb42 100644 --- a/indra/newview/skins/default/xui/fr/floater_tools.xml +++ b/indra/newview/skins/default/xui/fr/floater_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="toolbox floater" title="" short_title="Construire"> +<floater name="toolbox floater" title="" short_title="CONSTRUIRE"> <button label="" label_selected="" name="button focus" tool_tip="Mise au point"/> <button label="" label_selected="" name="button move" tool_tip="Déplacer"/> <button label="" label_selected="" name="button edit" tool_tip="Modifier"/> diff --git a/indra/newview/skins/default/xui/fr/floater_top_objects.xml b/indra/newview/skins/default/xui/fr/floater_top_objects.xml index 69a3d0cd18..479559367f 100644 --- a/indra/newview/skins/default/xui/fr/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/fr/floater_top_objects.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="top_objects" title="en cours de chargement..."> +<floater name="top_objects" title="EN COURS DE CHARGEMENT..."> <text name="title_text"> Chargement... </text> diff --git a/indra/newview/skins/default/xui/fr/floater_water.xml b/indra/newview/skins/default/xui/fr/floater_water.xml index 9b77c2450d..3de5fee0ce 100644 --- a/indra/newview/skins/default/xui/fr/floater_water.xml +++ b/indra/newview/skins/default/xui/fr/floater_water.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Water Floater" title="Éditeur d'eau avancé"> +<floater name="Water Floater" title="ÉDITEUR D'EAU AVANCé"> <text name="KeyFramePresetsText"> Préréglages eau : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml index d1a62dc6bc..4ff55d87b6 100644 --- a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="WindLight floater" title="Éditeur de ciel avancé" width="706"> +<floater name="WindLight floater" title="ÉDITEUR DE CIEL AVANCÉ" width="706"> <text name="KeyFramePresetsText"> Préréglages ciel : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_world_map.xml b/indra/newview/skins/default/xui/fr/floater_world_map.xml index ec2db5f163..1f76202dee 100644 --- a/indra/newview/skins/default/xui/fr/floater_world_map.xml +++ b/indra/newview/skins/default/xui/fr/floater_world_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="worldmap" title="Carte du monde"> +<floater name="worldmap" title="CARTE DU MONDE"> <tab_container name="maptab" width="955"> <panel label="Objets" name="objects_mapview" width="953"/> <panel label="Terrain" name="terrain_mapview" width="953"/> diff --git a/indra/newview/skins/default/xui/it/floater_about.xml b/indra/newview/skins/default/xui/it/floater_about.xml index 2c91375930..a5aff9d486 100644 --- a/indra/newview/skins/default/xui/it/floater_about.xml +++ b/indra/newview/skins/default/xui/it/floater_about.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_about" title="Informazioni su [APP_NAME]"> +<floater name="floater_about" title="INFORMAZIONI SU [APP_NAME]"> <tab_container name="about_tab"> <panel name="credits_panel"> <text_editor name="credits_editor"> 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 ede581c5ed..f2bd150ad7 100644 --- a/indra/newview/skins/default/xui/it/floater_about_land.xml +++ b/indra/newview/skins/default/xui/it/floater_about_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterland" title="Informazioni sul terreno"> +<floater name="floaterland" title="INFORMAZIONI SUL TERRENO"> <tab_container name="landtab"> <panel label="Generale" name="land_general_panel"> <text name="Name:"> diff --git a/indra/newview/skins/default/xui/it/floater_auction.xml b/indra/newview/skins/default/xui/it/floater_auction.xml index edbb9ab9a9..bba76a83cc 100644 --- a/indra/newview/skins/default/xui/it/floater_auction.xml +++ b/indra/newview/skins/default/xui/it/floater_auction.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_auction" title="Inizia a vendere terra Linden"> +<floater name="floater_auction" title="INIZIA A VENDERE TERRA LINDEN"> <check_box label="Includi barriere di selezione gialle" name="fence_check"/> <button label="Fotografia" label_selected="Fotografia" name="snapshot_btn"/> <button label="OK" label_selected="OK" name="ok_btn"/> diff --git a/indra/newview/skins/default/xui/it/floater_avatar_picker.xml b/indra/newview/skins/default/xui/it/floater_avatar_picker.xml index a223e30fb5..89a61eeca8 100644 --- a/indra/newview/skins/default/xui/it/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/it/floater_avatar_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatarpicker" title="Scegli residente"> +<floater name="avatarpicker" title="SCEGLI RESIDENTE"> <tab_container name="ResidentChooserTabs"> <panel label="Cerca" name="SearchPanel"> <text name="InstructSearchResidentName"> diff --git a/indra/newview/skins/default/xui/it/floater_avatar_textures.xml b/indra/newview/skins/default/xui/it/floater_avatar_textures.xml index 281f436224..f55b23af35 100644 --- a/indra/newview/skins/default/xui/it/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/it/floater_avatar_textures.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatar_texture_debug" title="Texture dell'Avatar"> +<floater name="avatar_texture_debug" title="TEXTURE DELL'AVATAR"> <text name="baked_label"> Texture Visualizzate </text> diff --git a/indra/newview/skins/default/xui/it/floater_beacons.xml b/indra/newview/skins/default/xui/it/floater_beacons.xml index 035b073729..126c03e855 100644 --- a/indra/newview/skins/default/xui/it/floater_beacons.xml +++ b/indra/newview/skins/default/xui/it/floater_beacons.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="beacons" title="Segnali luminosi"> +<floater name="beacons" title="SEGNALI LUMINOSI"> <panel name="beacons_panel"> <check_box label="Oggetti scriptati con solo 'tocca' abilitato" name="touch_only"/> <check_box label="Oggetti scriptati" name="scripted"/> diff --git a/indra/newview/skins/default/xui/it/floater_build_options.xml b/indra/newview/skins/default/xui/it/floater_build_options.xml index 2c60aeda2b..c6ee0f7917 100644 --- a/indra/newview/skins/default/xui/it/floater_build_options.xml +++ b/indra/newview/skins/default/xui/it/floater_build_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="build options floater" title="Opzioni della griglia"> +<floater name="build options floater" title="OPZIONI DELLA GRIGLIA"> <spinner label="Unità di misura della griglia (metri)" name="GridResolution" width="250" label_width="192"/> <spinner label="Estensione della griglia (metri)" name="GridDrawSize" width="250" label_width="192"/> <check_box label="Abilita sotto-unità di movimento" name="GridSubUnit"/> diff --git a/indra/newview/skins/default/xui/it/floater_bulk_perms.xml b/indra/newview/skins/default/xui/it/floater_bulk_perms.xml index 7ca57f34b3..7f5b68279e 100644 --- a/indra/newview/skins/default/xui/it/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/it/floater_bulk_perms.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterbulkperms" title="Modifica in massa i permessi del contenuto"> +<floater name="floaterbulkperms" title="MODIFICA IN MASSA I PERMESSI DEL CONTENUTO"> <text name="applyto"> Tipi di contenuto </text> diff --git a/indra/newview/skins/default/xui/it/floater_bumps.xml b/indra/newview/skins/default/xui/it/floater_bumps.xml index d9ce29fa08..23fa1a41a6 100644 --- a/indra/newview/skins/default/xui/it/floater_bumps.xml +++ b/indra/newview/skins/default/xui/it/floater_bumps.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_bumps" title="Collisioni, spinte e colpi"> +<floater name="floater_bumps" title="COLLISIONI, SPINTE E COLPI"> <string name="none_detected"> Nessuno rilevato </string> diff --git a/indra/newview/skins/default/xui/it/floater_buy_contents.xml b/indra/newview/skins/default/xui/it/floater_buy_contents.xml index 2836f98970..1a6f64c07e 100644 --- a/indra/newview/skins/default/xui/it/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/it/floater_buy_contents.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_buy_contents" title="Compra i contenuti"> +<floater name="floater_buy_contents" title="COMPRA I CONTENUTI"> <text name="contains_text"> [NAME] contiene: </text> diff --git a/indra/newview/skins/default/xui/it/floater_buy_currency.xml b/indra/newview/skins/default/xui/it/floater_buy_currency.xml index a24f0dbe7a..6b881683f1 100644 --- a/indra/newview/skins/default/xui/it/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/it/floater_buy_currency.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy currency" title="Acquista valuta"> +<floater name="buy currency" title="ACQUISTA VALUTA"> <text name="info_buying"> Acquistando valuta: </text> diff --git a/indra/newview/skins/default/xui/it/floater_buy_land.xml b/indra/newview/skins/default/xui/it/floater_buy_land.xml index d6036c19dd..b5d7ba0763 100644 --- a/indra/newview/skins/default/xui/it/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/it/floater_buy_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy land" title="Compra terra"> +<floater name="buy land" title="COMPRA TERRA"> <text name="region_name_label"> Regione: </text> diff --git a/indra/newview/skins/default/xui/it/floater_buy_object.xml b/indra/newview/skins/default/xui/it/floater_buy_object.xml index 90ff84a89c..e99d432367 100644 --- a/indra/newview/skins/default/xui/it/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/it/floater_buy_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Compra una copia dell'oggetto"> +<floater name="contents" title="COMPRA UNA COPIA DELL'OGGETTO"> <text name="contents_text"> e dei suoi contenuti: </text> diff --git a/indra/newview/skins/default/xui/it/floater_choose_group.xml b/indra/newview/skins/default/xui/it/floater_choose_group.xml index 3b5fc79bd8..00f2692295 100644 --- a/indra/newview/skins/default/xui/it/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/it/floater_choose_group.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="groups" title="Gruppi"> +<floater name="groups" title="GRUPPI"> <text name="groupdesc"> Scegli un gruppo: </text> diff --git a/indra/newview/skins/default/xui/it/floater_color_picker.xml b/indra/newview/skins/default/xui/it/floater_color_picker.xml index 1e6d7bc3f0..297b006e72 100644 --- a/indra/newview/skins/default/xui/it/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/it/floater_color_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="ColorPicker" title="Tavolozza colori"> +<floater name="ColorPicker" title="TAVOLOZZA COLORI"> <text name="r_val_text"> Rosso: </text> diff --git a/indra/newview/skins/default/xui/it/floater_customize.xml b/indra/newview/skins/default/xui/it/floater_customize.xml index eac673e004..ad6111718a 100644 --- a/indra/newview/skins/default/xui/it/floater_customize.xml +++ b/indra/newview/skins/default/xui/it/floater_customize.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="Aspetto fisico" width="551"> +<floater name="floater customize" title="ASPETTO FISICO" width="551"> <tab_container name="customize tab container" tab_min_width="120" width="549"> <placeholder label="Parti del corpo" name="body_parts_placeholder"/> <panel label="Forma del corpo" name="Shape" left="124" width="389"> diff --git a/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml index 4c62d4f5a2..7d50e322c0 100644 --- a/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Day Cycle Floater" title="Editor delle ciclo giorno/notte"> +<floater name="Day Cycle Floater" title="EDITOR DELLE CICLO GIORNO/NOTTE"> <tab_container name="Day Cycle Tabs"> <panel label="Ciclo giorno/notte" name="Day Cycle"> <button label="?" name="WLDayCycleHelp"/> diff --git a/indra/newview/skins/default/xui/it/floater_device_settings.xml b/indra/newview/skins/default/xui/it/floater_device_settings.xml index cbf965bf93..932978809d 100644 --- a/indra/newview/skins/default/xui/it/floater_device_settings.xml +++ b/indra/newview/skins/default/xui/it/floater_device_settings.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_device_settings" title="Impostazioni dispositivi Voice Chat"/> +<floater name="floater_device_settings" title="IMPOSTAZIONI DISPOSITIVI VOICE CHAT"/> diff --git a/indra/newview/skins/default/xui/it/floater_env_settings.xml b/indra/newview/skins/default/xui/it/floater_env_settings.xml index 36f97bda81..32858d18cd 100644 --- a/indra/newview/skins/default/xui/it/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/it/floater_env_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Environment Editor Floater" title="Editor dell'ambiente"> +<floater name="Environment Editor Floater" title="EDITOR DELL'AMBIENTE"> <text name="EnvTimeText"> Ora del giorno diff --git a/indra/newview/skins/default/xui/it/floater_font_test.xml b/indra/newview/skins/default/xui/it/floater_font_test.xml index 27b87a931d..859c068b11 100644 --- a/indra/newview/skins/default/xui/it/floater_font_test.xml +++ b/indra/newview/skins/default/xui/it/floater_font_test.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Tipo di carattere per test"> +<floater name="contents" title="TIPO DI CARATTERE PER TEST"> <text name="linea"> OverrideTest, dovrebbe apparire qui come Times. (Dal default/xui/en-us) </text> diff --git a/indra/newview/skins/default/xui/it/floater_gesture.xml b/indra/newview/skins/default/xui/it/floater_gesture.xml index 997e13ecb5..91b7381d13 100644 --- a/indra/newview/skins/default/xui/it/floater_gesture.xml +++ b/indra/newview/skins/default/xui/it/floater_gesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="gestures" title="Gesture attive"> +<floater name="gestures" title="GESTURE ATTIVE"> <text name="help_label"> Fai doppio click su una gesture per azionare animazioni e suoni. diff --git a/indra/newview/skins/default/xui/it/floater_hardware_settings.xml b/indra/newview/skins/default/xui/it/floater_hardware_settings.xml index 688f9137a2..cdf3e970a6 100644 --- a/indra/newview/skins/default/xui/it/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/it/floater_hardware_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Hardware Settings Floater" title="Impostazioni Hardware"> +<floater name="Hardware Settings Floater" title="IMPOSTAZIONI HARDWARE"> <text name="Filtering:"> Filtraggio: </text> diff --git a/indra/newview/skins/default/xui/it/floater_hud.xml b/indra/newview/skins/default/xui/it/floater_hud.xml index d31bcedf05..e458913452 100644 --- a/indra/newview/skins/default/xui/it/floater_hud.xml +++ b/indra/newview/skins/default/xui/it/floater_hud.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_hud" title="Tutorial"/> +<floater name="floater_hud" title="TUTORIAL"/> diff --git a/indra/newview/skins/default/xui/it/floater_inspect.xml b/indra/newview/skins/default/xui/it/floater_inspect.xml index 6028c40557..1a4e6c3c1b 100644 --- a/indra/newview/skins/default/xui/it/floater_inspect.xml +++ b/indra/newview/skins/default/xui/it/floater_inspect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="inspect" title="Ispeziona oggetti" min_width="450"> +<floater name="inspect" title="ISPEZIONA OGGETTI" min_width="450"> <scroll_list name="object_list" tool_tip="Seleziona un oggetto da questo elenco per evidenziarlo inworld"> <column label="Nome dell'oggetto" name="object_name"/> <column label="Proprietario" name="owner_name"/> diff --git a/indra/newview/skins/default/xui/it/floater_inventory.xml b/indra/newview/skins/default/xui/it/floater_inventory.xml index f21f213497..e3325463d6 100644 --- a/indra/newview/skins/default/xui/it/floater_inventory.xml +++ b/indra/newview/skins/default/xui/it/floater_inventory.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="Inventario"> +<floater name="Inventory" title="INVENTARIO"> <search_editor label="Scrivi qui per cercare" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Tutti gli elementi" name="All Items"/> diff --git a/indra/newview/skins/default/xui/it/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/it/floater_inventory_item_properties.xml index e32f57e9f4..8860fd8207 100644 --- a/indra/newview/skins/default/xui/it/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/it/floater_inventory_item_properties.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="item properties" title="Proprietà dell'oggetto nell'inventario"> +<floater name="item properties" title="PROPRIETÀ DELL'OGGETTO NELL'INVENTARIO"> <text name="LabelItemNameTitle"> Nome: </text> diff --git a/indra/newview/skins/default/xui/it/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/it/floater_inventory_view_finder.xml index c2c05b4023..b5a17b2fc1 100644 --- a/indra/newview/skins/default/xui/it/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/it/floater_inventory_view_finder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory Finder" title="Inventario_Cose_recenti" width="165"> +<floater name="Inventory Finder" title="INVENTARIO_COSE_RECENTI" width="165"> <check_box label="Animazioni" name="check_animation"/> <check_box label="Biglietti da visita" name="check_calling_card"/> <check_box label="Abiti" name="check_clothing"/> diff --git a/indra/newview/skins/default/xui/it/floater_joystick.xml b/indra/newview/skins/default/xui/it/floater_joystick.xml index b7b7663910..d74ff9bfb4 100644 --- a/indra/newview/skins/default/xui/it/floater_joystick.xml +++ b/indra/newview/skins/default/xui/it/floater_joystick.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" title="Configurazione Joystick"> +<floater name="Joystick" title="CONFIGURAZIONE JOYSTICK"> <check_box name="enable_joystick" label="Abilita Joystick:"/> <text left="120" name="joystick_type" width="380"/> <spinner label="Mapping: asse X" name="JoystickAxis1" label_width="140" width="180" left="12"/> diff --git a/indra/newview/skins/default/xui/it/floater_lagmeter.xml b/indra/newview/skins/default/xui/it/floater_lagmeter.xml index af70ad9d31..5ed748da69 100644 --- a/indra/newview/skins/default/xui/it/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/it/floater_lagmeter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_lagmeter" title="Misuratore del lag"> +<floater name="floater_lagmeter" title="MISURATORE DEL LAG"> <button label="" label_selected="" name="client_lagmeter" tool_tip="Stato del lag del programma in locale"/> <text left="30" name="client_lag_cause" right="-10" /> <text left="30" name="network_lag_cause" right="-10" /> diff --git a/indra/newview/skins/default/xui/it/floater_land_holdings.xml b/indra/newview/skins/default/xui/it/floater_land_holdings.xml index 85661c28d7..8a6689f6af 100644 --- a/indra/newview/skins/default/xui/it/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/it/floater_land_holdings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="land holdings floater" title="Il mio terreno"> +<floater name="land holdings floater" title="IL MIO TERRENO"> <scroll_list name="parcel list"> <column label="Nome del terreno" name="name"/> <column label="Regione" name="location"/> diff --git a/indra/newview/skins/default/xui/it/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/it/floater_live_lsleditor.xml index bb1f6116cf..bd50ad3df7 100644 --- a/indra/newview/skins/default/xui/it/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/it/floater_live_lsleditor.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="script ed float" title="Script: Nuovo script"> +<floater name="script ed float" title="SCRIPT: NUOVO SCRIPT"> <button label="Ripristina" label_selected="Ripristina" name="Reset"/> <check_box label="In esecuzione" name="running" left="4"/> <check_box label="Mono" name="mono" left="106"/> diff --git a/indra/newview/skins/default/xui/it/floater_lsl_guide.xml b/indra/newview/skins/default/xui/it/floater_lsl_guide.xml index ec62dd087d..4241a32ec1 100644 --- a/indra/newview/skins/default/xui/it/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/it/floater_lsl_guide.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="script ed float" title="LSL Wiki"> +<floater name="script ed float" title="LSL WIKI"> <check_box label="Segui il cursore" name="lock_check"/> <combo_box label="Blocca" name="history_combo" left_delta="120" width="70"/> <button label="Indietro" name="back_btn" left_delta="75"/> diff --git a/indra/newview/skins/default/xui/it/floater_media_browser.xml b/indra/newview/skins/default/xui/it/floater_media_browser.xml index 4d3462b348..7a5f9c9fcb 100644 --- a/indra/newview/skins/default/xui/it/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/it/floater_media_browser.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_about" title="Browser multimediale"> +<floater name="floater_about" title="BROWSER MULTIMEDIALE"> <layout_stack name="stack1"> <layout_panel name="nav_controls"> <button label="Indietro" name="back" width="75"/> diff --git a/indra/newview/skins/default/xui/it/floater_mem_leaking.xml b/indra/newview/skins/default/xui/it/floater_mem_leaking.xml index 4bd0e6ae6b..d180953157 100644 --- a/indra/newview/skins/default/xui/it/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/it/floater_mem_leaking.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="MemLeak" title="Simulazione di perdità di memoria"> +<floater name="MemLeak" title="SIMULAZIONE DI PERDITÀ DI MEMORIA"> <spinner label="Perdità di velocità (bytes per frame):" name="leak_speed"/> <spinner label="Memoria Persa Max (MB):" name="max_leak"/> <text name="total_leaked_label"> diff --git a/indra/newview/skins/default/xui/it/floater_mute_object.xml b/indra/newview/skins/default/xui/it/floater_mute_object.xml index 6bacdcab41..a72bfe9681 100644 --- a/indra/newview/skins/default/xui/it/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/it/floater_mute_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="mute by name" title="Ignora l'oggetto dal nome"> +<floater name="mute by name" title="IGNORA L'OGGETTO DAL NOME"> <text name="message"> Ignora per nome ha effetti sull'oggetto in chat e IM, non nei suoni. Devi scrivere esattamente il nome dell'oggetto. diff --git a/indra/newview/skins/default/xui/it/floater_my_friends.xml b/indra/newview/skins/default/xui/it/floater_my_friends.xml index a77b8aff80..faeba0a6d9 100644 --- a/indra/newview/skins/default/xui/it/floater_my_friends.xml +++ b/indra/newview/skins/default/xui/it/floater_my_friends.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_my_friends" title="Contatti"> +<floater name="floater_my_friends" title="CONTATTI"> <tab_container name="friends_and_groups"> <panel label="Amici" name="friends_panel"/> <panel label="Gruppi" name="groups_panel"/> diff --git a/indra/newview/skins/default/xui/it/floater_openobject.xml b/indra/newview/skins/default/xui/it/floater_openobject.xml index d04a6f3632..0c2029e18e 100644 --- a/indra/newview/skins/default/xui/it/floater_openobject.xml +++ b/indra/newview/skins/default/xui/it/floater_openobject.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="objectcontents" title="Contenuto dell'oggetto"> +<floater name="objectcontents" title="CONTENUTO DELL'OGGETTO"> <text name="object_name"> [DESC]: </text> diff --git a/indra/newview/skins/default/xui/it/floater_perm_prefs.xml b/indra/newview/skins/default/xui/it/floater_perm_prefs.xml index 8037481f37..46de31455b 100644 --- a/indra/newview/skins/default/xui/it/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/it/floater_perm_prefs.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="perm prefs" title="Permessi di base di importazione"> +<floater name="perm prefs" title="PERMESSI DI BASE DI IMPORTAZIONE"> <panel label="Permessi" name="permissions"> <button label="?" label_selected="?" name="help"/> <check_box label="Condividi con il gruppo" name="share_with_group"/> diff --git a/indra/newview/skins/default/xui/it/floater_post_process.xml b/indra/newview/skins/default/xui/it/floater_post_process.xml index 226970041b..3aa8b29101 100644 --- a/indra/newview/skins/default/xui/it/floater_post_process.xml +++ b/indra/newview/skins/default/xui/it/floater_post_process.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="Impostazioni di post-produzione"> +<floater name="Post-Process Floater" title="IMPOSTAZIONI DI POST-PRODUZIONE"> <tab_container name="Post-Process Tabs"> <panel label="Filtro Colore" name="wmiColorFilterPanel"> <check_box label="Abilita" name="wmiColorFilterToggle"/> diff --git a/indra/newview/skins/default/xui/it/floater_postcard.xml b/indra/newview/skins/default/xui/it/floater_postcard.xml index 5132771acc..5ea3b634d4 100644 --- a/indra/newview/skins/default/xui/it/floater_postcard.xml +++ b/indra/newview/skins/default/xui/it/floater_postcard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="Invia la fotografia via email"> +<floater name="Postcard" title="INVIA LA FOTOGRAFIA VIA EMAIL"> <text name="to_label" width="135"> Email del destinatario: </text> diff --git a/indra/newview/skins/default/xui/it/floater_preferences.xml b/indra/newview/skins/default/xui/it/floater_preferences.xml index 6277300bee..172449554d 100644 --- a/indra/newview/skins/default/xui/it/floater_preferences.xml +++ b/indra/newview/skins/default/xui/it/floater_preferences.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Preferences" title="Preferenze" min_width="350" width="646"> +<floater name="Preferences" title="PREFERENZE" min_width="350" width="646"> <button label="OK" label_selected="OK" name="OK"/> <button label="Annulla" label_selected="Annulla" name="Cancel"/> <button label="Applica" label_selected="Applica" name="Apply"/> diff --git a/indra/newview/skins/default/xui/it/floater_preview_classified.xml b/indra/newview/skins/default/xui/it/floater_preview_classified.xml index f78c70b1fe..5819bd37a5 100644 --- a/indra/newview/skins/default/xui/it/floater_preview_classified.xml +++ b/indra/newview/skins/default/xui/it/floater_preview_classified.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="classified_preview" title="Informazione Riservata"/> +<floater name="classified_preview" title="INFORMAZIONE RISERVATA"/> diff --git a/indra/newview/skins/default/xui/it/floater_preview_event.xml b/indra/newview/skins/default/xui/it/floater_preview_event.xml index 7cc99a9fea..dca38c363f 100644 --- a/indra/newview/skins/default/xui/it/floater_preview_event.xml +++ b/indra/newview/skins/default/xui/it/floater_preview_event.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="event_preview" title="Informazione sull'evento"/> +<floater name="event_preview" title="INFORMAZIONE SULL'EVENTO"/> diff --git a/indra/newview/skins/default/xui/it/floater_preview_notecard.xml b/indra/newview/skins/default/xui/it/floater_preview_notecard.xml index b0608c8546..81a51223b0 100644 --- a/indra/newview/skins/default/xui/it/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/it/floater_preview_notecard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="preview notecard" title="Nota:"> +<floater name="preview notecard" title="NOTA:"> <button label="Salva" label_selected="Salva" name="Save"/> <text name="desc txt"> Descrizione: diff --git a/indra/newview/skins/default/xui/it/floater_region_info.xml b/indra/newview/skins/default/xui/it/floater_region_info.xml index a802550bf4..a715cf1f06 100644 --- a/indra/newview/skins/default/xui/it/floater_region_info.xml +++ b/indra/newview/skins/default/xui/it/floater_region_info.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="regioninfo" title="Regione/Proprietà"/> +<floater name="regioninfo" title="REGIONE/PROPRIETÀ"/> 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 c67fc69db6..4b969354fe 100644 --- a/indra/newview/skins/default/xui/it/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/it/floater_report_abuse.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_report_abuse" title="Denuncia di Abuso"> +<floater name="floater_report_abuse" title="DENUNCIA DI ABUSO"> <check_box label="Includi una fotografia" name="screen_check"/> <text name="reporter_title"> Segnalato da: diff --git a/indra/newview/skins/default/xui/it/floater_script_debug.xml b/indra/newview/skins/default/xui/it/floater_script_debug.xml index 39736dde67..89bf80da5e 100644 --- a/indra/newview/skins/default/xui/it/floater_script_debug.xml +++ b/indra/newview/skins/default/xui/it/floater_script_debug.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <multi_floater name="script debug floater" title="Avvisi/Errori Script"> <tab_container name="Preview Tabs"> - <floater label="Script" name="all_scripts" title="[Tutti gli script]"/> + <floater label="Script" name="all_scripts" title="[ALL SCRIPTS]"/> </tab_container> </multi_floater> diff --git a/indra/newview/skins/default/xui/it/floater_script_preview.xml b/indra/newview/skins/default/xui/it/floater_script_preview.xml index 20af60b2d4..934ffd5395 100644 --- a/indra/newview/skins/default/xui/it/floater_script_preview.xml +++ b/indra/newview/skins/default/xui/it/floater_script_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="preview lsl text" title="Script: Script di rotazione"> +<floater name="preview lsl text" title="SCRIPT: SCRIPT DI ROTAZIONE"> <text name="desc txt"> Descrizione: </text> diff --git a/indra/newview/skins/default/xui/it/floater_script_queue.xml b/indra/newview/skins/default/xui/it/floater_script_queue.xml index e5b38fea62..37eb3e4bbf 100644 --- a/indra/newview/skins/default/xui/it/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/it/floater_script_queue.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="queue" title="Progressione reset"> +<floater name="queue" title="PROGRESSIONE RESET"> <button label="Chiudi" label_selected="Chiudi" name="close"/> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_script_search.xml b/indra/newview/skins/default/xui/it/floater_script_search.xml index 470fb76135..e5f923f7a3 100644 --- a/indra/newview/skins/default/xui/it/floater_script_search.xml +++ b/indra/newview/skins/default/xui/it/floater_script_search.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="script search" title="Cerca Script" width="320"> +<floater name="script search" title="CERCA SCRIPT" width="320"> <check_box label="Senza distinzione tra maiuscole e minuscole" name="case_text" left="65"/> <button label="Cerca" label_selected="Cerca" name="search_btn" width="85"/> <button label="Sostituisci" label_selected="Sostituisci" name="replace_btn" left="100" width="85"/> diff --git a/indra/newview/skins/default/xui/it/floater_sell_land.xml b/indra/newview/skins/default/xui/it/floater_sell_land.xml index 79dd2c5abf..91712a706b 100644 --- a/indra/newview/skins/default/xui/it/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/it/floater_sell_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="sell land" title="Vendi terra"> +<floater name="sell land" title="VENDI TERRA"> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <text name="info_parcel_label"> diff --git a/indra/newview/skins/default/xui/it/floater_settings_debug.xml b/indra/newview/skins/default/xui/it/floater_settings_debug.xml index 6dd1b7978d..aec3c8aa9d 100644 --- a/indra/newview/skins/default/xui/it/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/it/floater_settings_debug.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="settings_debug" title="Configurazioni per il debug"> +<floater name="settings_debug" title="CONFIGURAZIONI PER IL DEBUG"> <combo_box name="boolean_combo"> <combo_box.item name="TRUE" label="VERO"/> <combo_box.item name="FALSE" label="FALSO"/> diff --git a/indra/newview/skins/default/xui/it/floater_snapshot.xml b/indra/newview/skins/default/xui/it/floater_snapshot.xml index 808158ff7e..e226ce6ffe 100644 --- a/indra/newview/skins/default/xui/it/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/it/floater_snapshot.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="Anteprima della fotografia" width="247"> +<floater name="Snapshot" title="ANTEPRIMA DELLA FOTOGRAFIA" width="247"> <text name="type_label"> Destinazione della fotografia </text> diff --git a/indra/newview/skins/default/xui/it/floater_sound_preview.xml b/indra/newview/skins/default/xui/it/floater_sound_preview.xml index 8611732983..221e5e5b53 100644 --- a/indra/newview/skins/default/xui/it/floater_sound_preview.xml +++ b/indra/newview/skins/default/xui/it/floater_sound_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Sound Preview" title="sound.wav"> +<floater name="Sound Preview" title="SOUND.WAV"> <text name="name_label"> Nome: </text> diff --git a/indra/newview/skins/default/xui/it/floater_statistics.xml b/indra/newview/skins/default/xui/it/floater_statistics.xml index 6083949b8c..00df1ff994 100644 --- a/indra/newview/skins/default/xui/it/floater_statistics.xml +++ b/indra/newview/skins/default/xui/it/floater_statistics.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="stats floater" title="Statistiche"/> +<floater name="stats floater" title="STATISTICHE"/> diff --git a/indra/newview/skins/default/xui/it/floater_telehub.xml b/indra/newview/skins/default/xui/it/floater_telehub.xml index 0c5199dbc7..de5c32574f 100644 --- a/indra/newview/skins/default/xui/it/floater_telehub.xml +++ b/indra/newview/skins/default/xui/it/floater_telehub.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="telehub" title="Telehub" min_height="310" height="310" width="286"> +<floater name="telehub" title="TELEHUB" min_height="310" height="310" width="286"> <text name="status_text_connected"> Telehub connesso all'oggetto [OBJECT] </text> diff --git a/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml index 65bc8ba41d..836f85b48c 100644 --- a/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="texture picker" title="Preferiti: Immagine"> +<floater name="texture picker" title="PREFERITI: IMMAGINE"> <string name="choose_picture"> Clicca per scegliere l'immagine </string> diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml index 8fc1818ccc..8e6f27e162 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" title="" short_title="Costruisci" width="288"> +<floater name="toolbox floater" title="" short_title="COSTRUISCI" width="288"> <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 edit" tool_tip="Modifica"/> diff --git a/indra/newview/skins/default/xui/it/floater_top_objects.xml b/indra/newview/skins/default/xui/it/floater_top_objects.xml index 470e21769c..9b406199e9 100644 --- a/indra/newview/skins/default/xui/it/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/it/floater_top_objects.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="top_objects" title="In caricamento..."> +<floater name="top_objects" title="IN CARICAMENTO..."> <text name="title_text"> In caricamento... </text> diff --git a/indra/newview/skins/default/xui/it/floater_water.xml b/indra/newview/skins/default/xui/it/floater_water.xml index 33f91ed1c8..13db1d4589 100644 --- a/indra/newview/skins/default/xui/it/floater_water.xml +++ b/indra/newview/skins/default/xui/it/floater_water.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Water Floater" title="Editor avanzato dell'acqua"> +<floater name="Water Floater" title="EDITOR AVANZATO DELL'ACQUA"> <text name="KeyFramePresetsText" width="224"> Impostazioni predeterminate dell'acqua: </text> diff --git a/indra/newview/skins/default/xui/it/floater_windlight_options.xml b/indra/newview/skins/default/xui/it/floater_windlight_options.xml index 5076c777dc..e86d656e39 100644 --- a/indra/newview/skins/default/xui/it/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/it/floater_windlight_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="WindLight floater" title="Editor avanzato del cielo"> +<floater name="WindLight floater" title="EDITOR AVANZATO DEL CIELO"> <text name="KeyFramePresetsText"> Cieli predefiniti: </text> diff --git a/indra/newview/skins/default/xui/it/floater_world_map.xml b/indra/newview/skins/default/xui/it/floater_world_map.xml index e19335fe07..6fb7b93bc7 100644 --- a/indra/newview/skins/default/xui/it/floater_world_map.xml +++ b/indra/newview/skins/default/xui/it/floater_world_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="worldmap" title="Mappa"> +<floater name="worldmap" title="MAPPA"> <tab_container name="maptab"> <panel label="Oggetti" name="objects_mapview"/> <panel label="Terreno" name="terrain_mapview"/> diff --git a/indra/newview/skins/default/xui/ja/floater_about.xml b/indra/newview/skins/default/xui/ja/floater_about.xml index a9b3d81a3b..834d49e169 100644 --- a/indra/newview/skins/default/xui/ja/floater_about.xml +++ b/indra/newview/skins/default/xui/ja/floater_about.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater name="floater_about" title="[APP_NAME]について"> <tab_container name="about_tab"> <panel name="credits_panel"> diff --git a/indra/newview/skins/default/xui/ja/floater_device_settings.xml b/indra/newview/skins/default/xui/ja/floater_device_settings.xml index 5c258df9fd..f189acf101 100644 --- a/indra/newview/skins/default/xui/ja/floater_device_settings.xml +++ b/indra/newview/skins/default/xui/ja/floater_device_settings.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_device_settings" title="ボイスチャット機器の設定" />
\ No newline at end of file +<floater name="floater_device_settings" title="ボイスチャット機器の設定" /> diff --git a/indra/newview/skins/default/xui/ja/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/ja/floater_inventory_view_finder.xml index d4037487b7..2200809925 100644 --- a/indra/newview/skins/default/xui/ja/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/ja/floater_inventory_view_finder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Inventory Finder" title="inventory_recent_items"> +<floater name="Inventory Finder" title="INVENTORY_RECENT_ITEMS"> <check_box label="アニメーション" name="check_animation" /> <check_box label="コーリング・カード" name="check_calling_card" /> <check_box label="服" name="check_clothing" /> diff --git a/indra/newview/skins/default/xui/ja/floater_lsl_guide.xml b/indra/newview/skins/default/xui/ja/floater_lsl_guide.xml index 55eba966dc..e535fc731f 100644 --- a/indra/newview/skins/default/xui/ja/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/ja/floater_lsl_guide.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script ed float" title="LSL Wiki"> +<floater name="script ed float" title="LSL WIKI"> <check_box label="カーソルを追う" name="lock_check" /> <combo_box label="ロック" name="history_combo" /> <button label="戻る" name="back_btn" /> diff --git a/indra/newview/skins/default/xui/ja/floater_script_debug.xml b/indra/newview/skins/default/xui/ja/floater_script_debug.xml index dd934e3592..0ac7a988e0 100644 --- a/indra/newview/skins/default/xui/ja/floater_script_debug.xml +++ b/indra/newview/skins/default/xui/ja/floater_script_debug.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <multi_floater name="script debug floater" title="スクリプト警告/エラー"> <tab_container name="Preview Tabs"> - <floater label="スクリプト" name="all_scripts" title="[All scripts]" /> + <floater label="スクリプト" name="all_scripts" title="[ALL SCRIPTS]" /> </tab_container> </multi_floater> diff --git a/indra/newview/skins/default/xui/ja/floater_sound_preview.xml b/indra/newview/skins/default/xui/ja/floater_sound_preview.xml index b247914389..d5109fe539 100644 --- a/indra/newview/skins/default/xui/ja/floater_sound_preview.xml +++ b/indra/newview/skins/default/xui/ja/floater_sound_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Sound Preview" title="sound.wav"> +<floater name="Sound Preview" title="SOUND.WAV"> <text name="name_label"> 名前: </text> diff --git a/indra/newview/skins/default/xui/nl/floater_about.xml b/indra/newview/skins/default/xui/nl/floater_about.xml index 9ad947df66..0c57a22be1 100644 --- a/indra/newview/skins/default/xui/nl/floater_about.xml +++ b/indra/newview/skins/default/xui/nl/floater_about.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_about" title="Over [APP_NAME]"> +<floater name="floater_about" title="OVER [APP_NAME]"> <tab_container name="about_tab"> <panel name="credits_panel"> <text_editor name="credits_editor"> diff --git a/indra/newview/skins/default/xui/nl/floater_about_land.xml b/indra/newview/skins/default/xui/nl/floater_about_land.xml index 6aa80c00db..3a77de70d2 100644 --- a/indra/newview/skins/default/xui/nl/floater_about_land.xml +++ b/indra/newview/skins/default/xui/nl/floater_about_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterland" title="Over land"> +<floater name="floaterland" title="OVER LAND"> <tab_container name="landtab"> <panel label="Algemeen" name="land_general_panel"> <text name="Name:"> diff --git a/indra/newview/skins/default/xui/nl/floater_auction.xml b/indra/newview/skins/default/xui/nl/floater_auction.xml index eb061e028d..611024699b 100644 --- a/indra/newview/skins/default/xui/nl/floater_auction.xml +++ b/indra/newview/skins/default/xui/nl/floater_auction.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_auction" title="Start Linden Land Verkoop"> +<floater name="floater_auction" title="START LINDEN LAND VERKOOP"> <check_box label="Voeg geel selectie kader toe" name="fence_check"/> <button label="Foto" label_selected="Foto" name="snapshot_btn"/> <button label="OK" label_selected="OK" name="ok_btn"/> diff --git a/indra/newview/skins/default/xui/nl/floater_beacons.xml b/indra/newview/skins/default/xui/nl/floater_beacons.xml index 84196ac14f..ecc485e354 100644 --- a/indra/newview/skins/default/xui/nl/floater_beacons.xml +++ b/indra/newview/skins/default/xui/nl/floater_beacons.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="beacons" title="Bakens"> +<floater name="beacons" title="BAKENS"> <panel name="beacons_panel"> <check_box label="Gescripte objecten met alleen Aanraken" name="touch_only"/> <check_box label="Gescripte objecten" name="scripted"/> diff --git a/indra/newview/skins/default/xui/nl/floater_bulk_perms.xml b/indra/newview/skins/default/xui/nl/floater_bulk_perms.xml index 7f35ec45a9..5374ffc26a 100644 --- a/indra/newview/skins/default/xui/nl/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/nl/floater_bulk_perms.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterbulkperms" title="Bulk wijzigen inhoud permissies"> +<floater name="floaterbulkperms" title="BULK WIJZIGEN INHOUD PERMISSIES"> <text name="applyto"> Inhoud Typen </text> diff --git a/indra/newview/skins/default/xui/nl/floater_bumps.xml b/indra/newview/skins/default/xui/nl/floater_bumps.xml index 9dbfe405aa..df9a99d62e 100644 --- a/indra/newview/skins/default/xui/nl/floater_bumps.xml +++ b/indra/newview/skins/default/xui/nl/floater_bumps.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_bumps" title="Botsingen, duwen & slaan"> +<floater name="floater_bumps" title="BOTSINGEN, DUWEN & SLAAN"> <string name="none_detected"> Geen gedetecteerd </string> diff --git a/indra/newview/skins/default/xui/nl/floater_buy_contents.xml b/indra/newview/skins/default/xui/nl/floater_buy_contents.xml index df0614b3d2..4c0ff7d04a 100644 --- a/indra/newview/skins/default/xui/nl/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/nl/floater_buy_contents.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_buy_contents" title="Koop inhoud"> +<floater name="floater_buy_contents" title="KOOP INHOUD"> <text name="contains_text"> [NAME] bevat: </text> diff --git a/indra/newview/skins/default/xui/nl/floater_buy_currency.xml b/indra/newview/skins/default/xui/nl/floater_buy_currency.xml index 9f740b86c8..b6fc743abe 100644 --- a/indra/newview/skins/default/xui/nl/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/nl/floater_buy_currency.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy currency" title="Koop valuta"> +<floater name="buy currency" title="KOOP VALUTA"> <text name="info_buying"> Valuta kopen </text> diff --git a/indra/newview/skins/default/xui/nl/floater_buy_land.xml b/indra/newview/skins/default/xui/nl/floater_buy_land.xml index 1bb02cc7d0..04990e78db 100644 --- a/indra/newview/skins/default/xui/nl/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/nl/floater_buy_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy land" title="Koop land"> +<floater name="buy land" title="KOOP LAND"> <text name="region_name_label"> Regio: </text> diff --git a/indra/newview/skins/default/xui/nl/floater_buy_object.xml b/indra/newview/skins/default/xui/nl/floater_buy_object.xml index c83f2008c6..5d2d9dd3d0 100644 --- a/indra/newview/skins/default/xui/nl/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/nl/floater_buy_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Koop een kopie van object"> +<floater name="contents" title="KOOP EEN KOPIE VAN OBJECT"> <text name="contents_text"> en zijn inhoud: </text> diff --git a/indra/newview/skins/default/xui/nl/floater_choose_group.xml b/indra/newview/skins/default/xui/nl/floater_choose_group.xml index 3f6ce44cfd..8d54d62d2d 100644 --- a/indra/newview/skins/default/xui/nl/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/nl/floater_choose_group.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="groups" title="Groepen"> +<floater name="groups" title="GROEPEN"> <text name="groupdesc"> Kies een groep: </text> diff --git a/indra/newview/skins/default/xui/nl/floater_color_picker.xml b/indra/newview/skins/default/xui/nl/floater_color_picker.xml index a357e874f7..9b61af0710 100644 --- a/indra/newview/skins/default/xui/nl/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/nl/floater_color_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="ColorPicker" title="Kleurkiezer"> +<floater name="ColorPicker" title="KLEURKIEZER"> <text name="r_val_text"> Rood: </text> diff --git a/indra/newview/skins/default/xui/nl/floater_customize.xml b/indra/newview/skins/default/xui/nl/floater_customize.xml index 99a109ab78..4de26347e1 100644 --- a/indra/newview/skins/default/xui/nl/floater_customize.xml +++ b/indra/newview/skins/default/xui/nl/floater_customize.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="Uiterlijk" width="551"> +<floater name="floater customize" title="UITERLIJK" width="551"> <tab_container name="customize tab container" tab_min_width="120" width="549"> <placeholder label="Lichaamsdelen" name="body_parts_placeholder"/> <panel label="Postuur" name="Shape" left="124" width="389"> diff --git a/indra/newview/skins/default/xui/nl/floater_env_settings.xml b/indra/newview/skins/default/xui/nl/floater_env_settings.xml index d66c0b2205..3c207040d2 100644 --- a/indra/newview/skins/default/xui/nl/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/nl/floater_env_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Environment Editor Floater" title="Omgeving editor"> +<floater name="Environment Editor Floater" title="OMGEVING EDITOR"> <text bottom="-42" name="EnvTimeText"> Tijd van de dag diff --git a/indra/newview/skins/default/xui/nl/floater_font_test.xml b/indra/newview/skins/default/xui/nl/floater_font_test.xml index 8e8b07ee1a..31e53e7fba 100644 --- a/indra/newview/skins/default/xui/nl/floater_font_test.xml +++ b/indra/newview/skins/default/xui/nl/floater_font_test.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Lettertypetest"> +<floater name="contents" title="LETTERTYPETEST"> <text name="linea"> Overschrijf test, zou hier moeten verschijnen als Times (vanuit default/xui/en-us). </text> diff --git a/indra/newview/skins/default/xui/nl/floater_gesture.xml b/indra/newview/skins/default/xui/nl/floater_gesture.xml index d38972d5fe..4fa994c69e 100644 --- a/indra/newview/skins/default/xui/nl/floater_gesture.xml +++ b/indra/newview/skins/default/xui/nl/floater_gesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="gestures" title="Actieve gebaren"> +<floater name="gestures" title="ACTIEVE GEBAREN"> <text name="help_label"> Dubbelklik een gebaar om animaties en geluiden af te spelen </text> diff --git a/indra/newview/skins/default/xui/nl/floater_hud.xml b/indra/newview/skins/default/xui/nl/floater_hud.xml index 9da732ff2f..8ef7de1b02 100644 --- a/indra/newview/skins/default/xui/nl/floater_hud.xml +++ b/indra/newview/skins/default/xui/nl/floater_hud.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_hud" title="Handleiding"/> +<floater name="floater_hud" title="HANDLEIDING"/> diff --git a/indra/newview/skins/default/xui/nl/floater_inspect.xml b/indra/newview/skins/default/xui/nl/floater_inspect.xml index 96c9d59f90..6a0885b57f 100644 --- a/indra/newview/skins/default/xui/nl/floater_inspect.xml +++ b/indra/newview/skins/default/xui/nl/floater_inspect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="inspect" title="Objecten inspecteren"> +<floater name="inspect" title="OBJECTEN INSPECTEREN"> <scroll_list name="object_list" tool_tip="Selecteer een object van deze lijst om het in-wereld te markeren"> <column label="Objectnaam" name="object_name"/> <column label="Eigenaar" name="owner_name"/> diff --git a/indra/newview/skins/default/xui/nl/floater_inventory.xml b/indra/newview/skins/default/xui/nl/floater_inventory.xml index 272fa3c899..a69039d811 100644 --- a/indra/newview/skins/default/xui/nl/floater_inventory.xml +++ b/indra/newview/skins/default/xui/nl/floater_inventory.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="Inventaris"> +<floater name="Inventory" title="INVENTARIS"> <search_editor label="Typ hier om te zoeken" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Alle items" name="All Items"/> diff --git a/indra/newview/skins/default/xui/nl/floater_joystick.xml b/indra/newview/skins/default/xui/nl/floater_joystick.xml index ccc39034f5..505e3cd719 100644 --- a/indra/newview/skins/default/xui/nl/floater_joystick.xml +++ b/indra/newview/skins/default/xui/nl/floater_joystick.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" title="Joystick configuratie"> +<floater name="Joystick" title="JOYSTICK CONFIGURATIE"> <check_box name="enable_joystick" width="80" label="Joystick inschakelen:"/> <text left="146" name="joystick_type" width="360"/> <spinner label="X-as mapping" name="JoystickAxis1"/> diff --git a/indra/newview/skins/default/xui/nl/floater_lagmeter.xml b/indra/newview/skins/default/xui/nl/floater_lagmeter.xml index e8b1fb14bc..e3943c2470 100644 --- a/indra/newview/skins/default/xui/nl/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/nl/floater_lagmeter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_lagmeter" title="Lag meter"> +<floater name="floater_lagmeter" title="LAG METER"> <button label="" label_selected="" name="client_lagmeter" tool_tip="Client lag status"/> <text name="client"> Client: diff --git a/indra/newview/skins/default/xui/nl/floater_lsl_guide.xml b/indra/newview/skins/default/xui/nl/floater_lsl_guide.xml index 556d151c8c..27b3ff834e 100644 --- a/indra/newview/skins/default/xui/nl/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/nl/floater_lsl_guide.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="script ed float" title="LSL Wiki"> +<floater name="script ed float" title="LSL WIKI"> <check_box label="Volg cursor" name="lock_check"/> <combo_box label="Vergrendelen" name="history_combo"/> <button label="Terug" name="back_btn"/> diff --git a/indra/newview/skins/default/xui/nl/floater_mem_leaking.xml b/indra/newview/skins/default/xui/nl/floater_mem_leaking.xml index 1c7e070e4a..d0b25587b6 100644 --- a/indra/newview/skins/default/xui/nl/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/nl/floater_mem_leaking.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="MemLeak" title="Geheugenlek simulatie"> +<floater name="MemLeak" title="GEHEUGENLEK SIMULATIE"> <spinner label="Leksnelheid (bytes per frame):" name="leak_speed"/> <spinner label="Max gelekt geheugen (MB):" name="max_leak"/> <text name="total_leaked_label"> diff --git a/indra/newview/skins/default/xui/nl/floater_mute_object.xml b/indra/newview/skins/default/xui/nl/floater_mute_object.xml index ca3b34c3a2..7a34be1bd7 100644 --- a/indra/newview/skins/default/xui/nl/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/nl/floater_mute_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="mute by name" title="Negeer object op naam"> +<floater name="mute by name" title="NEGEER OBJECT OP NAAM"> <text name="message" bottom_delta="-40"> Negeer op naam heeft alleen invloed op object chat en IM, niet op geluiden. U dient de naam van het object diff --git a/indra/newview/skins/default/xui/nl/floater_my_friends.xml b/indra/newview/skins/default/xui/nl/floater_my_friends.xml index ed81e6baf9..8d709d3c00 100644 --- a/indra/newview/skins/default/xui/nl/floater_my_friends.xml +++ b/indra/newview/skins/default/xui/nl/floater_my_friends.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_my_friends" title="Contacten"> +<floater name="floater_my_friends" title="CONTACTEN"> <tab_container name="friends_and_groups"> <panel label="Vrienden" name="friends_panel"/> <panel label="Groepen" name="groups_panel"/> diff --git a/indra/newview/skins/default/xui/nl/floater_openobject.xml b/indra/newview/skins/default/xui/nl/floater_openobject.xml index 10b502be1c..832c63403d 100644 --- a/indra/newview/skins/default/xui/nl/floater_openobject.xml +++ b/indra/newview/skins/default/xui/nl/floater_openobject.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="objectcontents" title="Object inhoud"> +<floater name="objectcontents" title="OBJECT INHOUD"> <text name="object_name"> [DESC]: </text> diff --git a/indra/newview/skins/default/xui/nl/floater_perm_prefs.xml b/indra/newview/skins/default/xui/nl/floater_perm_prefs.xml index c1c9492286..f946c42678 100644 --- a/indra/newview/skins/default/xui/nl/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/nl/floater_perm_prefs.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="perm prefs" title="Standaard upload Permissies"> +<floater name="perm prefs" title="STANDAARD UPLOAD PERMISSIES"> <panel label="Permissies" name="permissions"> <button label="?" label_selected="?" name="help"/> <check_box label="Delen met groep" name="share_with_group"/> diff --git a/indra/newview/skins/default/xui/nl/floater_post_process.xml b/indra/newview/skins/default/xui/nl/floater_post_process.xml index 45fc211aeb..e627f81a70 100644 --- a/indra/newview/skins/default/xui/nl/floater_post_process.xml +++ b/indra/newview/skins/default/xui/nl/floater_post_process.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="Nabewerkinginstellingen"> +<floater name="Post-Process Floater" title="NABEWERKINGINSTELLINGEN"> <tab_container name="Post-Process Tabs"> <panel label="Kleurfilter" name="wmiColorFilterPanel"> <check_box label="Inschakelen" name="wmiColorFilterToggle"/> diff --git a/indra/newview/skins/default/xui/nl/floater_postcard.xml b/indra/newview/skins/default/xui/nl/floater_postcard.xml index a6d10f2244..c2d092fdd4 100644 --- a/indra/newview/skins/default/xui/nl/floater_postcard.xml +++ b/indra/newview/skins/default/xui/nl/floater_postcard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="Email foto"> +<floater name="Postcard" title="EMAIL FOTO"> <text name="to_label"> Ontvanger e-mail: </text> diff --git a/indra/newview/skins/default/xui/nl/floater_preferences.xml b/indra/newview/skins/default/xui/nl/floater_preferences.xml index 25984ee65a..6fc8005fd2 100644 --- a/indra/newview/skins/default/xui/nl/floater_preferences.xml +++ b/indra/newview/skins/default/xui/nl/floater_preferences.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Preferences" title="Voorkeuren"> +<floater name="Preferences" title="VOORKEUREN"> <button label="OK" label_selected="OK" name="OK"/> <button label="Annuleren" label_selected="Annuleren" name="Cancel"/> <button label="Toepassen" label_selected="Toepassen" name="Apply"/> diff --git a/indra/newview/skins/default/xui/nl/floater_region_info.xml b/indra/newview/skins/default/xui/nl/floater_region_info.xml index 3d4386bc16..0a98da3b4e 100644 --- a/indra/newview/skins/default/xui/nl/floater_region_info.xml +++ b/indra/newview/skins/default/xui/nl/floater_region_info.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="regioninfo" title="Regio/estate"/> +<floater name="regioninfo" title="REGIO/ESTATE"/> diff --git a/indra/newview/skins/default/xui/nl/floater_report_abuse.xml b/indra/newview/skins/default/xui/nl/floater_report_abuse.xml index 012198d7b6..19b11ede0a 100644 --- a/indra/newview/skins/default/xui/nl/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/nl/floater_report_abuse.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_report_abuse" title="Misbruik rapporteren"> +<floater name="floater_report_abuse" title="MISBRUIK RAPPORTEREN"> <check_box label="Voeg schermafbeelding toe" name="screen_check"/> <text name="reporter_title" width="110"> Rapporteur: diff --git a/indra/newview/skins/default/xui/nl/floater_script_debug.xml b/indra/newview/skins/default/xui/nl/floater_script_debug.xml index 306ad5d1a3..15e57f30d6 100644 --- a/indra/newview/skins/default/xui/nl/floater_script_debug.xml +++ b/indra/newview/skins/default/xui/nl/floater_script_debug.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <multi_floater name="script debug floater" title="Script waarschuwing/fout"> <tab_container name="Preview Tabs"> - <floater label="Script" name="all_scripts" title="[Alle scripts]"/> + <floater label="Script" name="all_scripts" title="[ALL SCRIPTS]"/> </tab_container> </multi_floater> diff --git a/indra/newview/skins/default/xui/nl/floater_script_queue.xml b/indra/newview/skins/default/xui/nl/floater_script_queue.xml index 38c227e53c..f79ad8faf3 100644 --- a/indra/newview/skins/default/xui/nl/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/nl/floater_script_queue.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="queue" title="Voortgang opnieuw instellen"> +<floater name="queue" title="VOORTGANG OPNIEUW INSTELLEN"> <button label="Sluiten" label_selected="Sluiten" name="close"/> </floater> diff --git a/indra/newview/skins/default/xui/nl/floater_sell_land.xml b/indra/newview/skins/default/xui/nl/floater_sell_land.xml index 3981f3ccc2..468a383cfc 100644 --- a/indra/newview/skins/default/xui/nl/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/nl/floater_sell_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="sell land" title="Verkoop land"> +<floater name="sell land" title="VERKOOP LAND"> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <text name="info_parcel_label"> diff --git a/indra/newview/skins/default/xui/nl/floater_snapshot.xml b/indra/newview/skins/default/xui/nl/floater_snapshot.xml index c7174d42f3..251f3690da 100644 --- a/indra/newview/skins/default/xui/nl/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/nl/floater_snapshot.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="Fotovoorbeeld"> +<floater name="Snapshot" title="FOTOVOORBEELD"> <text name="type_label"> Fotobestemming </text> diff --git a/indra/newview/skins/default/xui/nl/floater_statistics.xml b/indra/newview/skins/default/xui/nl/floater_statistics.xml index b899c32a56..7684a73663 100644 --- a/indra/newview/skins/default/xui/nl/floater_statistics.xml +++ b/indra/newview/skins/default/xui/nl/floater_statistics.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="stats floater" title="Statistieken"/> +<floater name="stats floater" title="STATISTIEKEN"/> diff --git a/indra/newview/skins/default/xui/nl/floater_telehub.xml b/indra/newview/skins/default/xui/nl/floater_telehub.xml index 8fe8e06c03..7b745d967c 100644 --- a/indra/newview/skins/default/xui/nl/floater_telehub.xml +++ b/indra/newview/skins/default/xui/nl/floater_telehub.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="telehub" title="Telehub" width="292"> +<floater name="telehub" title="TELEHUB" width="292"> <text name="status_text_connected"> Telehub verbonden met object [OBJECT] </text> diff --git a/indra/newview/skins/default/xui/nl/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/nl/floater_texture_ctrl.xml index 13a68747c6..c8caa8caf4 100644 --- a/indra/newview/skins/default/xui/nl/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/nl/floater_texture_ctrl.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="texture picker" title="Kies: Textuur"> +<floater name="texture picker" title="KIES: TEXTUUR"> <string name="choose_picture"> Klik om een afbeelding te kiezen </string> diff --git a/indra/newview/skins/default/xui/nl/floater_tools.xml b/indra/newview/skins/default/xui/nl/floater_tools.xml index cb0c1ad89a..f79d3dbd6b 100644 --- a/indra/newview/skins/default/xui/nl/floater_tools.xml +++ b/indra/newview/skins/default/xui/nl/floater_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="toolbox floater" title="" short_title="Bouwen" width="288"> +<floater name="toolbox floater" title="" short_title="BOUWEN" width="288"> <button label="" label_selected="" name="button focus" tool_tip="Focus"/> <button label="" label_selected="" name="button move" tool_tip="Verplaats"/> <button label="" label_selected="" name="button edit" tool_tip="Bewerk"/> diff --git a/indra/newview/skins/default/xui/nl/floater_top_objects.xml b/indra/newview/skins/default/xui/nl/floater_top_objects.xml index cc252352eb..2bbb701df8 100644 --- a/indra/newview/skins/default/xui/nl/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/nl/floater_top_objects.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="top_objects" title="laden…"> +<floater name="top_objects" title="LADEN…"> <text name="title_text"> Laden… </text> diff --git a/indra/newview/skins/default/xui/nl/floater_water.xml b/indra/newview/skins/default/xui/nl/floater_water.xml index 2238008fd8..1fb1ca241b 100644 --- a/indra/newview/skins/default/xui/nl/floater_water.xml +++ b/indra/newview/skins/default/xui/nl/floater_water.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Water Floater" title="Geavanceerde water editor"> +<floater name="Water Floater" title="GEAVANCEERDE WATER EDITOR"> <combo_box bottom="-50" height="18" left_delta="116" name="WaterPresetsCombo" width="150" /> <text name="KeyFramePresetsText"> Watervoorinstellingen diff --git a/indra/newview/skins/default/xui/nl/floater_world_map.xml b/indra/newview/skins/default/xui/nl/floater_world_map.xml index e1eebaf92f..bc14f92126 100644 --- a/indra/newview/skins/default/xui/nl/floater_world_map.xml +++ b/indra/newview/skins/default/xui/nl/floater_world_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="worldmap" title="Wereldkaart"> +<floater name="worldmap" title="WERELDKAART"> <tab_container name="maptab"> <panel label="Objecten" name="objects_mapview"/> <panel label="Terrein" name="terrain_mapview"/> diff --git a/indra/newview/skins/default/xui/pl/floater_about_land.xml b/indra/newview/skins/default/xui/pl/floater_about_land.xml index 83d4b717a7..d456ea26b4 100755 --- a/indra/newview/skins/default/xui/pl/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pl/floater_about_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterland" title="O Posiadłości"> +<floater name="floaterland" title="O POSIADŁOŚCI"> <tab_container name="landtab"> <panel label="Ogólne" name="land_general_panel"> <text name="Name:"> diff --git a/indra/newview/skins/default/xui/pl/floater_auction.xml b/indra/newview/skins/default/xui/pl/floater_auction.xml index 65a1bb85ea..37e35ed1e9 100755 --- a/indra/newview/skins/default/xui/pl/floater_auction.xml +++ b/indra/newview/skins/default/xui/pl/floater_auction.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_auction" title="Rozpocznij Sprzedaż Posiadłości"> +<floater name="floater_auction" title="ROZPOCZNIJ SPRZEDAŻ POSIADŁOŚCI"> <check_box label="Zawierając żółte ogrodzenie" name="fence_check" /> <button label="Zdjęce" label_selected="Zdjęce" name="snapshot_btn" /> <button label="OK" label_selected="OK" name="ok_btn" /> diff --git a/indra/newview/skins/default/xui/pl/floater_avatar_picker.xml b/indra/newview/skins/default/xui/pl/floater_avatar_picker.xml index cf4dcb91bf..8c09f7294c 100755 --- a/indra/newview/skins/default/xui/pl/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/pl/floater_avatar_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatarpicker" title="Wybierz Rezydenta"> +<floater name="avatarpicker" title="WYBIERZ REZYDENTA"> <tab_container name="ResidentChooserTabs"> <panel label="Znajdź" name="SearchPanel"> <text name="InstructSearchResidentName"> diff --git a/indra/newview/skins/default/xui/pl/floater_avatar_textures.xml b/indra/newview/skins/default/xui/pl/floater_avatar_textures.xml index b27c90b8f2..dce2330807 100755 --- a/indra/newview/skins/default/xui/pl/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/pl/floater_avatar_textures.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="avatar_texture_debug" title="Tekstury Awatara"> +<floater name="avatar_texture_debug" title="TEKSTURY AWATARA"> <text name="baked_label"> Tekstury Renderowane </text> diff --git a/indra/newview/skins/default/xui/pl/floater_beacons.xml b/indra/newview/skins/default/xui/pl/floater_beacons.xml index fd12d13595..6e7013f2d7 100644 --- a/indra/newview/skins/default/xui/pl/floater_beacons.xml +++ b/indra/newview/skins/default/xui/pl/floater_beacons.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="beacons" title="Emitery"> +<floater name="beacons" title="EMITERY"> <panel name="beacons_panel"> <check_box label="Obiekty Dotykalne" name="touch_only"/> <check_box label="Obiekty Skryptowane" name="scripted"/> diff --git a/indra/newview/skins/default/xui/pl/floater_build_options.xml b/indra/newview/skins/default/xui/pl/floater_build_options.xml index 7cbc410614..f538be218c 100755 --- a/indra/newview/skins/default/xui/pl/floater_build_options.xml +++ b/indra/newview/skins/default/xui/pl/floater_build_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="build options floater" title="Opcje Siatki"> +<floater name="build options floater" title="OPCJE SIATKI"> <spinner label="Jednostka Siatki (metry)" name="GridResolution" /> <spinner label="Rozmiary Siatki (metry)" name="GridDrawSize" /> <check_box label="Udostępnij Podjednostkowe Dopasowywanie" name="GridSubUnit" /> diff --git a/indra/newview/skins/default/xui/pl/floater_bulk_perms.xml b/indra/newview/skins/default/xui/pl/floater_bulk_perms.xml index a99acdb238..f06615642e 100644 --- a/indra/newview/skins/default/xui/pl/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/pl/floater_bulk_perms.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterbulkperms" title="Hurtowa zmiana praw zawartości"> +<floater name="floaterbulkperms" title="HURTOWA ZMIANA PRAW ZAWARTOŚCI"> <text name="applyto"> Rodzaj Zawartości </text> diff --git a/indra/newview/skins/default/xui/pl/floater_bumps.xml b/indra/newview/skins/default/xui/pl/floater_bumps.xml index 365268dbd6..10f9d73284 100755 --- a/indra/newview/skins/default/xui/pl/floater_bumps.xml +++ b/indra/newview/skins/default/xui/pl/floater_bumps.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_bumps" title="Zderzenia, Popchnięcia, Uderzenia"> +<floater name="floater_bumps" title="ZDERZENIA, POPCHNIĘCIA, UDERZENIA"> <string name="none_detected"> Brak </string> diff --git a/indra/newview/skins/default/xui/pl/floater_buy_contents.xml b/indra/newview/skins/default/xui/pl/floater_buy_contents.xml index 395bcb4ea9..ebe1c9dfd8 100755 --- a/indra/newview/skins/default/xui/pl/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/pl/floater_buy_contents.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_buy_contents" title="Kup Zawartość"> +<floater name="floater_buy_contents" title="KUP ZAWARTOŚĆ"> <text name="contains_text"> [NAME] zawiera: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_buy_currency.xml b/indra/newview/skins/default/xui/pl/floater_buy_currency.xml index a5c0a2498a..b0b8935433 100755 --- a/indra/newview/skins/default/xui/pl/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/pl/floater_buy_currency.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="buy currency" title="Kup $L"> +<floater name="buy currency" title="KUP $L"> <text name="info_buying"> Kup L$: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_buy_land.xml b/indra/newview/skins/default/xui/pl/floater_buy_land.xml index ff371b38c0..648888828b 100755 --- a/indra/newview/skins/default/xui/pl/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/pl/floater_buy_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy land" title="Buy Land"> +<floater name="buy land" title="BUY LAND"> <text name="region_name_label"> Region: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_buy_object.xml b/indra/newview/skins/default/xui/pl/floater_buy_object.xml index b0868a46a2..bad7982228 100755 --- a/indra/newview/skins/default/xui/pl/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/pl/floater_buy_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="contents" title="Kup kopię obiektu"> +<floater name="contents" title="KUP KOPIĘ OBIEKTU"> <text name="contents_text"> i jej zawartość: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_choose_group.xml b/indra/newview/skins/default/xui/pl/floater_choose_group.xml index 789c40e48c..72b6617094 100755 --- a/indra/newview/skins/default/xui/pl/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/pl/floater_choose_group.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="groups" title="Grupy"> +<floater name="groups" title="GRUPY"> <text name="groupdesc"> Wybierz grupę: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_color_picker.xml b/indra/newview/skins/default/xui/pl/floater_color_picker.xml index d6ffe1837a..904a2cc270 100755 --- a/indra/newview/skins/default/xui/pl/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/pl/floater_color_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="ColorPicker" title="Wybór Koloru"> +<floater name="ColorPicker" title="WYBÓR KOLORU"> <text name="r_val_text"> Czerwony: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_customize.xml b/indra/newview/skins/default/xui/pl/floater_customize.xml index 64d9300621..0c01d15faf 100755 --- a/indra/newview/skins/default/xui/pl/floater_customize.xml +++ b/indra/newview/skins/default/xui/pl/floater_customize.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="Wygląd"> +<floater name="floater customize" title="WYGLĄD"> <tab_container name="customize tab container"> <placeholder label="Części Ciała" name="body_parts_placeholder"/> <panel label="Kształt" name="Shape"> diff --git a/indra/newview/skins/default/xui/pl/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/pl/floater_day_cycle_options.xml index ea8db99570..6671bb853e 100755 --- a/indra/newview/skins/default/xui/pl/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/pl/floater_day_cycle_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Day Cycle Floater" title="Edytor Cyklu Dnia"> +<floater name="Day Cycle Floater" title="EDYTOR CYKLU DNIA"> <tab_container name="Day Cycle Tabs"> <panel label="Cykl Dnia" name="Day Cycle"> <button label="?" name="WLDayCycleHelp" /> diff --git a/indra/newview/skins/default/xui/pl/floater_device_settings.xml b/indra/newview/skins/default/xui/pl/floater_device_settings.xml index 0122aa819e..e79478731d 100755 --- a/indra/newview/skins/default/xui/pl/floater_device_settings.xml +++ b/indra/newview/skins/default/xui/pl/floater_device_settings.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater name="floater_device_settings" - title="Ustawienia Urządzeń Komunikacji Głosowej" /> + title="USTAWIENIA URZĄDZEŃ KOMUNIKACJI GŁOSOWEJ" /> diff --git a/indra/newview/skins/default/xui/pl/floater_env_settings.xml b/indra/newview/skins/default/xui/pl/floater_env_settings.xml index 3e0809b193..e197d94b27 100755 --- a/indra/newview/skins/default/xui/pl/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/pl/floater_env_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Environment Editor Floater" title="Edytor Środowiska"> +<floater name="Environment Editor Floater" title="EDYTOR ŚRODOWISKA"> <text name="EnvTimeText"> Czas </text> diff --git a/indra/newview/skins/default/xui/pl/floater_font_test.xml b/indra/newview/skins/default/xui/pl/floater_font_test.xml index 586d2690b3..019cee3e1e 100644 --- a/indra/newview/skins/default/xui/pl/floater_font_test.xml +++ b/indra/newview/skins/default/xui/pl/floater_font_test.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Czcionka Tekstu"> +<floater name="contents" title="CZCIONKA TEKSTU"> <text name="linea"> OverrideTest, powinno wyświetlać się jako Times. (From default/xui/en-us) </text> diff --git a/indra/newview/skins/default/xui/pl/floater_gesture.xml b/indra/newview/skins/default/xui/pl/floater_gesture.xml index a05408dfc5..4685eb6afe 100755 --- a/indra/newview/skins/default/xui/pl/floater_gesture.xml +++ b/indra/newview/skins/default/xui/pl/floater_gesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="gestures" title="Aktywne Gesty"> +<floater name="gestures" title="AKTYWNE GESTY"> <text name="help_label"> Kliknij podwójnie by aktywować głos i animację gestu. </text> diff --git a/indra/newview/skins/default/xui/pl/floater_god_tools.xml b/indra/newview/skins/default/xui/pl/floater_god_tools.xml index df821f3b6d..a3ccffac03 100755 --- a/indra/newview/skins/default/xui/pl/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/pl/floater_god_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="godtools floater" title="Boskie Narzędzia"> +<floater name="godtools floater" title="BOSKIE NARZĘDZIA"> <tab_container name="GodTools Tabs"> <panel label="Grid" name="grid"> <button width="205" label="Usuń wszystkich użytkowników" label_selected="Usuń wszystkich użytkowników" name="Kick all users"/> diff --git a/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml b/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml index f1e6e5ea9e..39695a67b6 100755 --- a/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Hardware Settings Floater" title="Ustawienia Sprzętowe"> +<floater name="Hardware Settings Floater" title="USTAWIENIA SPRZĘTOWE"> <text name="Filtering:"> Filtrowanie: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_hud.xml b/indra/newview/skins/default/xui/pl/floater_hud.xml index 916473f063..ff2d702132 100755 --- a/indra/newview/skins/default/xui/pl/floater_hud.xml +++ b/indra/newview/skins/default/xui/pl/floater_hud.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_hud" title="Samouczek" /> +<floater name="floater_hud" title="SAMOUCZEK" /> diff --git a/indra/newview/skins/default/xui/pl/floater_inspect.xml b/indra/newview/skins/default/xui/pl/floater_inspect.xml index 1efdced527..c98e0541d8 100755 --- a/indra/newview/skins/default/xui/pl/floater_inspect.xml +++ b/indra/newview/skins/default/xui/pl/floater_inspect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="inspect" title="Inspekcja Obiektów"> +<floater name="inspect" title="INSPEKCJA OBIEKTÓW"> <scroll_list name="object_list" tool_tip=""> <column label="Nazwa" name="object_name" /> <column label="Właściciel" name="owner_name" /> diff --git a/indra/newview/skins/default/xui/pl/floater_inventory.xml b/indra/newview/skins/default/xui/pl/floater_inventory.xml index 6df978de69..157be76c4d 100755 --- a/indra/newview/skins/default/xui/pl/floater_inventory.xml +++ b/indra/newview/skins/default/xui/pl/floater_inventory.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="Moja Szafa"> +<floater name="Inventory" title="MOJA SZAFA"> <search_editor label="Wyszukiwarka" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Wszystkie Obiekty" name="All Items"/> diff --git a/indra/newview/skins/default/xui/pl/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/pl/floater_inventory_item_properties.xml index c32d1eeabf..665172dd49 100755 --- a/indra/newview/skins/default/xui/pl/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/pl/floater_inventory_item_properties.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="item properties" title="Właściwości Obiektów w Szafie"> +<floater name="item properties" title="WŁAŚCIWOŚCI OBIEKTÓW W SZAFIE"> <text name="LabelItemNameTitle"> Nazwa: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/pl/floater_inventory_view_finder.xml index 2224c026ef..9204262304 100755 --- a/indra/newview/skins/default/xui/pl/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/pl/floater_inventory_view_finder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Inventory Finder" title="Nowe Obiekty"> +<floater name="Inventory Finder" title="NOWE OBIEKTY"> <check_box label="Animacje" name="check_animation" /> <check_box label="Wizytówki" name="check_calling_card" /> <check_box label="Ubrania" name="check_clothing" /> diff --git a/indra/newview/skins/default/xui/pl/floater_joystick.xml b/indra/newview/skins/default/xui/pl/floater_joystick.xml index 2ab92dfbb7..22ac458b85 100755 --- a/indra/newview/skins/default/xui/pl/floater_joystick.xml +++ b/indra/newview/skins/default/xui/pl/floater_joystick.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" width="590" title="Konfiguracja Joysticka"> +<floater name="Joystick" width="590" title="KONFIGURACJA JOYSTICKA"> <check_box name="enable_joystick" label="Aktywuj Joystick:"/> <text left="130" name="joystick_type" width="360"/> <spinner label="Kalibracja Osi X" left="20" width="170" label_width="130" name="JoystickAxis1"/> @@ -116,4 +116,4 @@ <string name="NoDevice"> brak podłącznego urządzenia </string> -</floater>
\ No newline at end of file +</floater> diff --git a/indra/newview/skins/default/xui/pl/floater_lagmeter.xml b/indra/newview/skins/default/xui/pl/floater_lagmeter.xml index 949289594e..69d563bdba 100755 --- a/indra/newview/skins/default/xui/pl/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/pl/floater_lagmeter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_lagmeter" title="Pomiar Lagów"> +<floater name="floater_lagmeter" title="POMIAR LAGÓW"> <button label="" label_selected="" name="client_lagmeter" tool_tip="Status lagów klienta" /> <text name="client"> diff --git a/indra/newview/skins/default/xui/pl/floater_land_holdings.xml b/indra/newview/skins/default/xui/pl/floater_land_holdings.xml index 29268f0e97..13e6a8b16d 100755 --- a/indra/newview/skins/default/xui/pl/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/pl/floater_land_holdings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="land holdings floater" title="Moja posiadłość"> +<floater name="land holdings floater" title="MOJA POSIADŁOŚĆ"> <scroll_list name="parcel list"> <column label="Nazwa posiadłości" name="name"/> <column label="Region" name="location"/> diff --git a/indra/newview/skins/default/xui/pl/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/pl/floater_live_lsleditor.xml index 94efd7afcb..8120ff8c77 100755 --- a/indra/newview/skins/default/xui/pl/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/pl/floater_live_lsleditor.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script ed float" title="Skrypt: Nowy Skrypt"> +<floater name="script ed float" title="SKRYPT: NOWY SKRYPT"> <button label="Zresetuj" label_selected="Zresetuj" name="Reset" /> <check_box label="Włącz" name="running" /> <check_box label="Mono" name="mono" /> diff --git a/indra/newview/skins/default/xui/pl/floater_lsl_guide.xml b/indra/newview/skins/default/xui/pl/floater_lsl_guide.xml index a0fa00dffe..5601aa4464 100755 --- a/indra/newview/skins/default/xui/pl/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/pl/floater_lsl_guide.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script ed float" title="LSL Wiki"> +<floater name="script ed float" title="LSL WIKI"> <check_box label="Idź za kursorem" name="lock_check" /> <combo_box label="Zablokuj" name="history_combo" /> <button label="Wróć" name="back_btn" /> diff --git a/indra/newview/skins/default/xui/pl/floater_media_browser.xml b/indra/newview/skins/default/xui/pl/floater_media_browser.xml index 2fb4287d90..74210c75e5 100755 --- a/indra/newview/skins/default/xui/pl/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/pl/floater_media_browser.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_about" title="Przeglądarka Mediów"> +<floater name="floater_about" title="PRZEGLĄDARKA MEDIÓW"> <layout_stack name="stack1"> <layout_panel name="nav_controls"> <button label="Wróć" name="back" /> diff --git a/indra/newview/skins/default/xui/pl/floater_mem_leaking.xml b/indra/newview/skins/default/xui/pl/floater_mem_leaking.xml index fe977e96c5..88a878af72 100755 --- a/indra/newview/skins/default/xui/pl/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/pl/floater_mem_leaking.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="MemLeak" title="Symulacja Przecieków Alokacji Pamięci"> +<floater name="MemLeak" title="SYMULACJA PRZECIEKÓW ALOKACJI PAMIĘCI"> <spinner label="Prędkość Przecieków (byty na klatkę):" name="leak_speed" /> <spinner label="Max Przecieki (MB):" name="max_leak" /> <text name="total_leaked_label"> diff --git a/indra/newview/skins/default/xui/pl/floater_mute_object.xml b/indra/newview/skins/default/xui/pl/floater_mute_object.xml index 310810db76..dd30f749e3 100755 --- a/indra/newview/skins/default/xui/pl/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/pl/floater_mute_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="mute by name" title="Wycisz Obiekt Według Nazwy" height="160" min_height="160" > +<floater name="mute by name" title="WYCISZ OBIEKT WEDŁUG NAZWY" height="160" min_height="160" > <text name="message"> Wyciszenie obiektu jest skuteczne jedynie na czacie oraz w wiadomościach IM. Nie obejmuje natomiast dźwięków. diff --git a/indra/newview/skins/default/xui/pl/floater_my_friends.xml b/indra/newview/skins/default/xui/pl/floater_my_friends.xml index cc5f1f2a01..0bcf6ba4d5 100755 --- a/indra/newview/skins/default/xui/pl/floater_my_friends.xml +++ b/indra/newview/skins/default/xui/pl/floater_my_friends.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_my_friends" title="Kontakty"> +<floater name="floater_my_friends" title="KONTAKTY"> <tab_container name="friends_and_groups"> <panel label="Znajomi" name="friends_panel" /> <panel label="Grupy" name="groups_panel" /> diff --git a/indra/newview/skins/default/xui/pl/floater_openobject.xml b/indra/newview/skins/default/xui/pl/floater_openobject.xml index 0470f4d6dc..fbbed0f11d 100755 --- a/indra/newview/skins/default/xui/pl/floater_openobject.xml +++ b/indra/newview/skins/default/xui/pl/floater_openobject.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="objectcontents" title="Zawartość Obiektu"> +<floater name="objectcontents" title="ZAWARTOŚĆ OBIEKTU"> <text name="object_name"> [DESC]: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_perm_prefs.xml b/indra/newview/skins/default/xui/pl/floater_perm_prefs.xml index dd7cbe1f79..834552e2b0 100644 --- a/indra/newview/skins/default/xui/pl/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/pl/floater_perm_prefs.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="perm prefs" title="Prawa Domyślne"> +<floater name="perm prefs" title="PRAWA DOMYŚLNE"> <panel label="Prawa" name="permissions"> <button label="?" label_selected="?" name="help"/> <check_box label="Udostępnij grupie" name="share_with_group"/> diff --git a/indra/newview/skins/default/xui/pl/floater_post_process.xml b/indra/newview/skins/default/xui/pl/floater_post_process.xml index 0081d1d3a7..6bd91f97b1 100755 --- a/indra/newview/skins/default/xui/pl/floater_post_process.xml +++ b/indra/newview/skins/default/xui/pl/floater_post_process.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Post-Process Floater" title="Ustawienia Przetwarzania Końcowego"> +<floater name="Post-Process Floater" title="USTAWIENIA PRZETWARZANIA KOŃCOWEGO"> <tab_container name="Post-Process Tabs"> <panel label="Kolor Filtru" name="wmiColorFilterPanel"> <check_box label="Udostępnij" name="wmiColorFilterToggle" /> diff --git a/indra/newview/skins/default/xui/pl/floater_postcard.xml b/indra/newview/skins/default/xui/pl/floater_postcard.xml index e5bdaf2ba9..8f4018924d 100755 --- a/indra/newview/skins/default/xui/pl/floater_postcard.xml +++ b/indra/newview/skins/default/xui/pl/floater_postcard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="Wyślij Pocztówkę"> +<floater name="Postcard" title="WYŚLIJ POCZTÓWKĘ"> <text name="to_label"> Email Odbiorcy: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_preferences.xml b/indra/newview/skins/default/xui/pl/floater_preferences.xml index 380738425e..2be663283f 100755 --- a/indra/newview/skins/default/xui/pl/floater_preferences.xml +++ b/indra/newview/skins/default/xui/pl/floater_preferences.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Preferences" title="Ustawienia"> +<floater name="Preferences" title="USTAWIENIA"> <button label="OK" label_selected="OK" name="OK" /> <button label="Anuluj" label_selected="Anuluj" name="Cancel" /> <button label="Zastosuj" label_selected="Zastosuj" name="Apply" /> diff --git a/indra/newview/skins/default/xui/pl/floater_preview_classified.xml b/indra/newview/skins/default/xui/pl/floater_preview_classified.xml index cc7d276117..eae9ba2690 100755 --- a/indra/newview/skins/default/xui/pl/floater_preview_classified.xml +++ b/indra/newview/skins/default/xui/pl/floater_preview_classified.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="classified_preview" title="Reklama" /> +<floater name="classified_preview" title="REKLAMA" /> diff --git a/indra/newview/skins/default/xui/pl/floater_preview_event.xml b/indra/newview/skins/default/xui/pl/floater_preview_event.xml index 75e17f6fa2..9fc0ff4da6 100755 --- a/indra/newview/skins/default/xui/pl/floater_preview_event.xml +++ b/indra/newview/skins/default/xui/pl/floater_preview_event.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="event_preview" title="Informacje o Imprezie" /> +<floater name="event_preview" title="INFORMACJE O IMPREZIE" /> diff --git a/indra/newview/skins/default/xui/pl/floater_preview_notecard.xml b/indra/newview/skins/default/xui/pl/floater_preview_notecard.xml index 0b3b9063c4..b9f80490ab 100755 --- a/indra/newview/skins/default/xui/pl/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/pl/floater_preview_notecard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="preview notecard" title="Nota:"> +<floater name="preview notecard" title="NOTA:"> <button label="Zapisz" label_selected="Zapisz" name="Save" /> <text name="desc txt"> Opis: diff --git a/indra/newview/skins/default/xui/pl/floater_region_info.xml b/indra/newview/skins/default/xui/pl/floater_region_info.xml index 6e632fd9c3..ca3c1391db 100755 --- a/indra/newview/skins/default/xui/pl/floater_region_info.xml +++ b/indra/newview/skins/default/xui/pl/floater_region_info.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="regioninfo" title="Region/Majątek" /> +<floater name="regioninfo" title="REGION/MAJĄTEK" /> diff --git a/indra/newview/skins/default/xui/pl/floater_report_abuse.xml b/indra/newview/skins/default/xui/pl/floater_report_abuse.xml index 853c669ade..c1efcffb1e 100755 --- a/indra/newview/skins/default/xui/pl/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/pl/floater_report_abuse.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_report_abuse" title="Raport o Nadużyciu"> +<floater name="floater_report_abuse" title="RAPORT O NADUŻYCIU"> <texture_picker label="" name="screenshot"/> <check_box label="Załącz zdjęcie ekranu" name="screen_check"/> <text name="reporter_title"> diff --git a/indra/newview/skins/default/xui/pl/floater_script_debug.xml b/indra/newview/skins/default/xui/pl/floater_script_debug.xml index b41add8246..714a600262 100755 --- a/indra/newview/skins/default/xui/pl/floater_script_debug.xml +++ b/indra/newview/skins/default/xui/pl/floater_script_debug.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <multi_floater name="script debug floater" title="Ostrzeżenie/Błąd Skryptu"> <tab_container name="Preview Tabs"> - <floater label="Skrypt" name="all_scripts" title="[All scripts]" /> + <floater label="Skrypt" name="all_scripts" title="[ALL SCRIPTS]" /> </tab_container> </multi_floater> diff --git a/indra/newview/skins/default/xui/pl/floater_script_preview.xml b/indra/newview/skins/default/xui/pl/floater_script_preview.xml index ca3fde33e7..e3e72e15a3 100755 --- a/indra/newview/skins/default/xui/pl/floater_script_preview.xml +++ b/indra/newview/skins/default/xui/pl/floater_script_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="preview lsl text" title="Skrypt: Skrypt Obrotu"> +<floater name="preview lsl text" title="SKRYPT: SKRYPT OBROTU"> <text name="desc txt"> Opis: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_script_queue.xml b/indra/newview/skins/default/xui/pl/floater_script_queue.xml index 70d4669a07..7655f5fcac 100755 --- a/indra/newview/skins/default/xui/pl/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/pl/floater_script_queue.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="queue" title="Zresetuj Pracę w Toku"> +<floater name="queue" title="ZRESETUJ PRACĘ W TOKU"> <button label="Zamknij" label_selected="Zamknij" name="close" /> </floater> diff --git a/indra/newview/skins/default/xui/pl/floater_script_search.xml b/indra/newview/skins/default/xui/pl/floater_script_search.xml index 50a9de1500..255ab4264c 100755 --- a/indra/newview/skins/default/xui/pl/floater_script_search.xml +++ b/indra/newview/skins/default/xui/pl/floater_script_search.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script search" title="Szukaj Skryptu"> +<floater name="script search" title="SZUKAJ SKRYPTU"> <check_box label="CapsLoock Nieaktywny" name="case_text" /> <button label="Szukaj" label_selected="Szukaj" name="search_btn" /> <button label="Zamień" label_selected="Zamień" name="replace_btn" /> diff --git a/indra/newview/skins/default/xui/pl/floater_sell_land.xml b/indra/newview/skins/default/xui/pl/floater_sell_land.xml index 579dcd6745..a306ec2c34 100755 --- a/indra/newview/skins/default/xui/pl/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/pl/floater_sell_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="sell land" title="Sell Land"> +<floater name="sell land" title="SELL LAND"> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <text name="info_parcel_label"> diff --git a/indra/newview/skins/default/xui/pl/floater_settings_debug.xml b/indra/newview/skins/default/xui/pl/floater_settings_debug.xml index 99fa444a1b..f87e2edecc 100755 --- a/indra/newview/skins/default/xui/pl/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/pl/floater_settings_debug.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="settings_debug" title="Ustawienia Usuwania Błędów"> +<floater name="settings_debug" title="USTAWIENIA USUWANIA BŁĘDÓW"> <combo_box name="boolean_combo"> <combo_box.item name="TRUE" label="PRAWDA" /> <combo_box.item name="FALSE" label="NIEPRAWDA" /> diff --git a/indra/newview/skins/default/xui/pl/floater_snapshot.xml b/indra/newview/skins/default/xui/pl/floater_snapshot.xml index 4945cf6413..c807087170 100755 --- a/indra/newview/skins/default/xui/pl/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/pl/floater_snapshot.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="Wygląd Zdjęcia"> +<floater name="Snapshot" title="WYGLĄD ZDJĘCIA"> <text name="type_label"> Lokacja zapisu </text> diff --git a/indra/newview/skins/default/xui/pl/floater_sound_preview.xml b/indra/newview/skins/default/xui/pl/floater_sound_preview.xml index 2461aebbcf..0826508fd6 100755 --- a/indra/newview/skins/default/xui/pl/floater_sound_preview.xml +++ b/indra/newview/skins/default/xui/pl/floater_sound_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Sound Preview" title="dźwięk.wav"> +<floater name="Sound Preview" title="DŹWIĘK.WAV"> <text name="name_label"> Opis: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_statistics.xml b/indra/newview/skins/default/xui/pl/floater_statistics.xml index 933801bbda..b7025e484d 100644 --- a/indra/newview/skins/default/xui/pl/floater_statistics.xml +++ b/indra/newview/skins/default/xui/pl/floater_statistics.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="stats floater" title="Statystyki"/> +<floater name="stats floater" title="STATYSTYKI"/> diff --git a/indra/newview/skins/default/xui/pl/floater_telehub.xml b/indra/newview/skins/default/xui/pl/floater_telehub.xml index 917ab95ecc..9f564452a9 100755 --- a/indra/newview/skins/default/xui/pl/floater_telehub.xml +++ b/indra/newview/skins/default/xui/pl/floater_telehub.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="telehub" title="Obsługa Teleportera" min_height="300" height="300" > +<floater name="telehub" title="OBSŁUGA TELEPORTERA" min_height="300" height="300" > <text name="status_text_connected" width="250"> Teleporter połączony z obiektem [OBJECT] </text> diff --git a/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml index 6d4df12e4b..48366e2b64 100755 --- a/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="texture picker" title="Wybór Tekstury"> +<floater name="texture picker" title="WYBÓR TEKSTURY"> <string name="choose_picture"> Kliknij by wybrać obraz </string> diff --git a/indra/newview/skins/default/xui/pl/floater_tools.xml b/indra/newview/skins/default/xui/pl/floater_tools.xml index c9e7a7e9eb..e898c283c5 100755 --- a/indra/newview/skins/default/xui/pl/floater_tools.xml +++ b/indra/newview/skins/default/xui/pl/floater_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="toolbox floater" title="" short_title="Buduj"> +<floater name="toolbox floater" title="" short_title="BUDUJ"> <button label="" label_selected="" name="button focus" tool_tip="Zbliżenie"/> <button label="" label_selected="" name="button move" tool_tip="Przesunięcie"/> <button label="" label_selected="" name="button edit" tool_tip="Edycja"/> diff --git a/indra/newview/skins/default/xui/pl/floater_top_objects.xml b/indra/newview/skins/default/xui/pl/floater_top_objects.xml index 44d838035d..e7299b0abb 100755 --- a/indra/newview/skins/default/xui/pl/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/pl/floater_top_objects.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="top_objects" title="Ładowanie..."> +<floater name="top_objects" title="ŁADOWANIE..."> <text name="title_text"> Ładowanie... </text> diff --git a/indra/newview/skins/default/xui/pl/floater_water.xml b/indra/newview/skins/default/xui/pl/floater_water.xml index a22b5809dc..7333633c1d 100755 --- a/indra/newview/skins/default/xui/pl/floater_water.xml +++ b/indra/newview/skins/default/xui/pl/floater_water.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Water Floater" title="Zaawansowany Edytor Wody"> +<floater name="Water Floater" title="ZAAWANSOWANY EDYTOR WODY"> <text name="KeyFramePresetsText"> Ustawienia Wody: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_windlight_options.xml b/indra/newview/skins/default/xui/pl/floater_windlight_options.xml index 94c20c06f7..86ef9300da 100755 --- a/indra/newview/skins/default/xui/pl/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/pl/floater_windlight_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="WindLight floater" title="Zaawansowany Edytor Nieba"> +<floater name="WindLight floater" title="ZAAWANSOWANY EDYTOR NIEBA"> <text name="KeyFramePresetsText"> Ustawienia Nieba: </text> diff --git a/indra/newview/skins/default/xui/pl/floater_world_map.xml b/indra/newview/skins/default/xui/pl/floater_world_map.xml index 65f1c8ae59..36e3b0651b 100755 --- a/indra/newview/skins/default/xui/pl/floater_world_map.xml +++ b/indra/newview/skins/default/xui/pl/floater_world_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="worldmap" title="Mapa Świata"> +<floater name="worldmap" title="MAPA ŚWIATA"> <tab_container name="maptab"> <panel label="Obiekty" name="objects_mapview"/> <panel label="Teren" name="terrain_mapview"/> diff --git a/indra/newview/skins/default/xui/pt/floater_about.xml b/indra/newview/skins/default/xui/pt/floater_about.xml index 12cc879cbc..9c19b12893 100644 --- a/indra/newview/skins/default/xui/pt/floater_about.xml +++ b/indra/newview/skins/default/xui/pt/floater_about.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_about" title="Sobre o [APP_NAME]"> +<floater name="floater_about" title="SOBRE O [APP_NAME]"> <tab_container name="about_tab"> <panel name="credits_panel"> <text_editor name="credits_editor"> 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 417d24608e..19981cf48c 100644 --- a/indra/newview/skins/default/xui/pt/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterland" title="Sobre o Terreno"> +<floater name="floaterland" title="SOBRE O TERRENO"> <tab_container name="landtab"> <panel label="Geral" name="land_general_panel"> <text name="Name:"> diff --git a/indra/newview/skins/default/xui/pt/floater_auction.xml b/indra/newview/skins/default/xui/pt/floater_auction.xml index 48e0b92400..34cd17d781 100644 --- a/indra/newview/skins/default/xui/pt/floater_auction.xml +++ b/indra/newview/skins/default/xui/pt/floater_auction.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_auction" title="Iniciar a venda de terrenos da Linden"> +<floater name="floater_auction" title="INICIAR A VENDA DE TERRENOS DA LINDEN"> <check_box label="Incluir marcador de seleção amarelo" name="fence_check"/> <button label="Foto" label_selected="Foto" name="snapshot_btn"/> <button label="OK" label_selected="OK" name="ok_btn"/> diff --git a/indra/newview/skins/default/xui/pt/floater_avatar_picker.xml b/indra/newview/skins/default/xui/pt/floater_avatar_picker.xml index 4e1598c8fa..186ef30e1b 100644 --- a/indra/newview/skins/default/xui/pt/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/pt/floater_avatar_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatarpicker" title="Escolha o Residente" min_width="285" width="285"> +<floater name="avatarpicker" title="ESCOLHA O RESIDENTE" min_width="285" width="285"> <tab_container name="ResidentChooserTabs" width="275"> <panel label="Buscar" name="SearchPanel"> <text name="InstructSearchResidentName"> diff --git a/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml b/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml index db0023d748..04a78efb12 100644 --- a/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="avatar_texture_debug" title="Texturas do Avatar"> +<floater name="avatar_texture_debug" title="TEXTURAS DO AVATAR"> <text name="baked_label"> Texturas sobrepostas </text> diff --git a/indra/newview/skins/default/xui/pt/floater_beacons.xml b/indra/newview/skins/default/xui/pt/floater_beacons.xml index edd1e08094..82f055745f 100644 --- a/indra/newview/skins/default/xui/pt/floater_beacons.xml +++ b/indra/newview/skins/default/xui/pt/floater_beacons.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="beacons" title="Balizas"> +<floater name="beacons" title="BALIZAS"> <panel name="beacons_panel"> <check_box label="Objetos programados com toque apenas" name="touch_only"/> <check_box label="Objetos programados" name="scripted"/> diff --git a/indra/newview/skins/default/xui/pt/floater_build_options.xml b/indra/newview/skins/default/xui/pt/floater_build_options.xml index ebc9d0f0c8..bce78fad21 100644 --- a/indra/newview/skins/default/xui/pt/floater_build_options.xml +++ b/indra/newview/skins/default/xui/pt/floater_build_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="build options floater" title="Opções de grade"> +<floater name="build options floater" title="OPÇÕES DE GRADE"> <spinner label="Uni. Grade (metros)" name="GridResolution" width="180" label_width="122"/> <spinner label="Ext. da Grade (metros)" name="GridDrawSize" width="180" label_width="122"/> <check_box label="Habilitar ajuste de sub-grade" name="GridSubUnit"/> diff --git a/indra/newview/skins/default/xui/pt/floater_bulk_perms.xml b/indra/newview/skins/default/xui/pt/floater_bulk_perms.xml index c064d24f96..7443e19721 100644 --- a/indra/newview/skins/default/xui/pt/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/pt/floater_bulk_perms.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floaterbulkperms" title="Mudança conjunta das permissões de conteúdo"> +<floater name="floaterbulkperms" title="MUDANÇA CONJUNTA DAS PERMISSÕES DE CONTEÚDO"> <text name="applyto"> Tipos de Conteúdo </text> diff --git a/indra/newview/skins/default/xui/pt/floater_bumps.xml b/indra/newview/skins/default/xui/pt/floater_bumps.xml index 0bc2546275..1833cd4335 100644 --- a/indra/newview/skins/default/xui/pt/floater_bumps.xml +++ b/indra/newview/skins/default/xui/pt/floater_bumps.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_bumps" title="Colisões, impulsos e batidas"> +<floater name="floater_bumps" title="COLISÕES, IMPULSOS E BATIDAS"> <text name="none_detected"> Nada detectado </text> diff --git a/indra/newview/skins/default/xui/pt/floater_buy_contents.xml b/indra/newview/skins/default/xui/pt/floater_buy_contents.xml index 3e8713d59e..322a07575a 100644 --- a/indra/newview/skins/default/xui/pt/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/pt/floater_buy_contents.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_buy_contents" title="Comprar conteúdo"> +<floater name="floater_buy_contents" title="COMPRAR CONTEÚDO"> <text name="contains_text"> [NAME] contém: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_buy_currency.xml b/indra/newview/skins/default/xui/pt/floater_buy_currency.xml index 42ba205475..ceeb070c4e 100644 --- a/indra/newview/skins/default/xui/pt/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/pt/floater_buy_currency.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy currency" title="Comprar Dinheiro"> +<floater name="buy currency" title="COMPRAR DINHEIRO"> <text name="info_buying"> Comprando Dinheiro: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_buy_land.xml b/indra/newview/skins/default/xui/pt/floater_buy_land.xml index 2caf057283..6e502ad6e5 100644 --- a/indra/newview/skins/default/xui/pt/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_buy_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="buy land" title="Comprar terra"> +<floater name="buy land" title="COMPRAR TERRA"> <text name="region_name_label"> Região: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_buy_object.xml b/indra/newview/skins/default/xui/pt/floater_buy_object.xml index b8e1085471..e9968ed8f8 100644 --- a/indra/newview/skins/default/xui/pt/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/pt/floater_buy_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Comprar cópia do objeto"> +<floater name="contents" title="COMPRAR CÓPIA DO OBJETO"> <text name="contents_text"> e seus conteúdos: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_choose_group.xml b/indra/newview/skins/default/xui/pt/floater_choose_group.xml index 449d578716..ae395734e9 100644 --- a/indra/newview/skins/default/xui/pt/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/pt/floater_choose_group.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="groups" title="Grupos"> +<floater name="groups" title="GRUPOS"> <text name="groupdesc"> Escolha um grupo: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_color_picker.xml b/indra/newview/skins/default/xui/pt/floater_color_picker.xml index 76da972b5d..6a4263f4ff 100644 --- a/indra/newview/skins/default/xui/pt/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/pt/floater_color_picker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="ColorPicker" title="Seletor de Cor"> +<floater name="ColorPicker" title="SELETOR DE COR"> <text name="r_val_text"> Vermelho: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_customize.xml b/indra/newview/skins/default/xui/pt/floater_customize.xml index 4bced69664..55946933e7 100644 --- a/indra/newview/skins/default/xui/pt/floater_customize.xml +++ b/indra/newview/skins/default/xui/pt/floater_customize.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="Aparência" width="546"> +<floater name="floater customize" title="APARÊNCIA" width="546"> <tab_container name="customize tab container" tab_min_width="115" width="544"> <placeholder label="Partes de corpo" name="body_parts_placeholder"/> <panel label="Forma" name="Shape"> diff --git a/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml index f02cca9c25..42f34a3d82 100644 --- a/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Day Cycle Floater" title="Editor de ciclo de dia"> +<floater name="Day Cycle Floater" title="EDITOR DE CICLO DE DIA"> <tab_container name="Day Cycle Tabs"> <panel label="Ciclo do dia" name="Day Cycle"> <button label="?" name="WLDayCycleHelp"/> diff --git a/indra/newview/skins/default/xui/pt/floater_device_settings.xml b/indra/newview/skins/default/xui/pt/floater_device_settings.xml index 9ce773116c..fa4da834b8 100644 --- a/indra/newview/skins/default/xui/pt/floater_device_settings.xml +++ b/indra/newview/skins/default/xui/pt/floater_device_settings.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_device_settings" title="Ajustes do Dispositivo de Conversa por Voz"/> +<floater name="floater_device_settings" title="AJUSTES DO DISPOSITIVO DE CONVERSA POR VOZ"/> diff --git a/indra/newview/skins/default/xui/pt/floater_env_settings.xml b/indra/newview/skins/default/xui/pt/floater_env_settings.xml index d3ed760551..4a43801b48 100644 --- a/indra/newview/skins/default/xui/pt/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/pt/floater_env_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Environment Editor Floater" title="Editor do Ambiente"> +<floater name="Environment Editor Floater" title="EDITOR DO AMBIENTE"> <text name="EnvTimeText"> Hora do Dia </text> diff --git a/indra/newview/skins/default/xui/pt/floater_font_test.xml b/indra/newview/skins/default/xui/pt/floater_font_test.xml index eb52d3341d..c506cdb12d 100644 --- a/indra/newview/skins/default/xui/pt/floater_font_test.xml +++ b/indra/newview/skins/default/xui/pt/floater_font_test.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="contents" title="Teste de Fonte"> +<floater name="contents" title="TESTE DE FONTE"> <text name="linea"> OverrideTest, deveria aparecer aqui como Times. (De default/xui/en-us) </text> diff --git a/indra/newview/skins/default/xui/pt/floater_gesture.xml b/indra/newview/skins/default/xui/pt/floater_gesture.xml index ac50f32dd1..b0bc42685d 100644 --- a/indra/newview/skins/default/xui/pt/floater_gesture.xml +++ b/indra/newview/skins/default/xui/pt/floater_gesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="gestures" title="Gestos Ativos"> +<floater name="gestures" title="GESTOS ATIVOS"> <text name="help_label"> Clicar duas vezes no gesto para executar animações e sons. </text> 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 9406658f62..4b7b2eb34e 100644 --- a/indra/newview/skins/default/xui/pt/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_god_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="godtools floater" title="Ferramentas de Deus"> +<floater name="godtools floater" title="FERRAMENTAS DE DEUS"> <tab_container name="GodTools Tabs"> <panel label="Grade" name="grid"> <button label="Desconectar todos os usuários" label_selected="Desconectar todos os usuários" name="Kick all users"/> diff --git a/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml b/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml index 0f9c1fd487..8921e6ea12 100644 --- a/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Hardware Settings Floater" title="Ajustes de Hardware"> +<floater name="Hardware Settings Floater" title="AJUSTES DE HARDWARE"> <text name="Filtering:"> Filtragem: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_hud.xml b/indra/newview/skins/default/xui/pt/floater_hud.xml index d31bcedf05..e458913452 100644 --- a/indra/newview/skins/default/xui/pt/floater_hud.xml +++ b/indra/newview/skins/default/xui/pt/floater_hud.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_hud" title="Tutorial"/> +<floater name="floater_hud" title="TUTORIAL"/> diff --git a/indra/newview/skins/default/xui/pt/floater_inspect.xml b/indra/newview/skins/default/xui/pt/floater_inspect.xml index f3c23f008e..97c2c6eaeb 100644 --- a/indra/newview/skins/default/xui/pt/floater_inspect.xml +++ b/indra/newview/skins/default/xui/pt/floater_inspect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="inspect" title="Inspecionar Objeto" min_width="450"> +<floater name="inspect" title="INSPECIONAR OBJETO" min_width="450"> <scroll_list name="object_list" tool_tip="Selecione um objeto nesta lista para destacá-lo in-world"> <column label="Nome do Objeto" name="object_name"/> <column label="Proprietário" name="owner_name"/> diff --git a/indra/newview/skins/default/xui/pt/floater_inventory.xml b/indra/newview/skins/default/xui/pt/floater_inventory.xml index 8a06fefe3c..1c2a3a9233 100644 --- a/indra/newview/skins/default/xui/pt/floater_inventory.xml +++ b/indra/newview/skins/default/xui/pt/floater_inventory.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory" title="Inventário"> +<floater name="Inventory" title="INVENTÁRIO"> <search_editor label="Escreva aqui para busca" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Todos os Itens" name="All Items"/> diff --git a/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml index 69752253b6..2a6b02f9c2 100644 --- a/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="item properties" title="Propriedades do Item de Inventário"> +<floater name="item properties" title="PROPRIEDADES DO ITEM DE INVENTÁRIO"> <text name="LabelItemNameTitle"> Nome: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml index 83df449ae6..57cdd50dcc 100644 --- a/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory Finder" title="itens_de_inventário_recentes" width="165"> +<floater name="Inventory Finder" title="ITENS_DE_INVENTÁRIO_RECENTES" width="165"> <check_box label="Animação" name="check_animation"/> <check_box label="Cartões de chamadas" name="check_calling_card"/> <check_box label="Roupas" name="check_clothing"/> diff --git a/indra/newview/skins/default/xui/pt/floater_joystick.xml b/indra/newview/skins/default/xui/pt/floater_joystick.xml index ac7b7fd02a..0793a0b161 100644 --- a/indra/newview/skins/default/xui/pt/floater_joystick.xml +++ b/indra/newview/skins/default/xui/pt/floater_joystick.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" title="Configuração do Joystick"> +<floater name="Joystick" title="CONFIGURAÇÃO DO JOYSTICK"> <check_box name="enable_joystick" label="Habilitar Joystick:"/> <text left="135" name="joystick_type" width="360"/> <spinner label="Mapeamento: eixo X" name="JoystickAxis1" label_width="124" width="164"/> diff --git a/indra/newview/skins/default/xui/pt/floater_lagmeter.xml b/indra/newview/skins/default/xui/pt/floater_lagmeter.xml index 6657641992..2728633438 100644 --- a/indra/newview/skins/default/xui/pt/floater_lagmeter.xml +++ b/indra/newview/skins/default/xui/pt/floater_lagmeter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_lagmeter" title="Medidor de Atraso"> +<floater name="floater_lagmeter" title="MEDIDOR DE ATRASO"> <button label="" label_selected="" name="client_lagmeter" tool_tip="Status de atraso no Cliente"/> <text left="30" name="client_lag_cause" right="-10" /> <text left="30" name="network_lag_cause" right="-10" /> diff --git a/indra/newview/skins/default/xui/pt/floater_land_holdings.xml b/indra/newview/skins/default/xui/pt/floater_land_holdings.xml index 4734d665ef..d8588e2f05 100644 --- a/indra/newview/skins/default/xui/pt/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/pt/floater_land_holdings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="land holdings floater" title="Meu terreno"> +<floater name="land holdings floater" title="MEU TERRENO"> <scroll_list name="parcel list"> <column label="Nome do Lote" name="name"/> <column label="Região" name="location"/> diff --git a/indra/newview/skins/default/xui/pt/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/pt/floater_live_lsleditor.xml index d2654de589..c0b726c476 100644 --- a/indra/newview/skins/default/xui/pt/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/pt/floater_live_lsleditor.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="script ed float" title="Script: Novo Script"> +<floater name="script ed float" title="SCRIPT: NOVO SCRIPT"> <button label="Resetar" label_selected="Resetar" name="Reset"/> <check_box label="Correndo" name="running"/> <check_box label="Mono" name="mono" left="86"/> diff --git a/indra/newview/skins/default/xui/pt/floater_lsl_guide.xml b/indra/newview/skins/default/xui/pt/floater_lsl_guide.xml index 4f60ef23a6..49a9e7fcf5 100644 --- a/indra/newview/skins/default/xui/pt/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/pt/floater_lsl_guide.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="script ed float" title="LSL Wiki"> +<floater name="script ed float" title="LSL WIKI"> <check_box label="Seguir o Cursor" name="lock_check" /> <combo_box label="Bloquear" name="history_combo" left_delta="120" width="70"/> <button label="Anterior" name="back_btn" left_delta="75"/> diff --git a/indra/newview/skins/default/xui/pt/floater_media_browser.xml b/indra/newview/skins/default/xui/pt/floater_media_browser.xml index cfaec5b410..3437dfcdba 100644 --- a/indra/newview/skins/default/xui/pt/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/pt/floater_media_browser.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater min_width="477" name="floater_about" title="Navegador de Mídia" width="570"> +<floater min_width="477" name="floater_about" title="NAVEGADOR DE MÍDIA" width="570"> <layout_stack name="stack1" width="550"> <layout_panel name="nav_controls"> <button label="Para trás" name="back" width="75"/> diff --git a/indra/newview/skins/default/xui/pt/floater_mem_leaking.xml b/indra/newview/skins/default/xui/pt/floater_mem_leaking.xml index 374592f0e2..4f93eb90e5 100644 --- a/indra/newview/skins/default/xui/pt/floater_mem_leaking.xml +++ b/indra/newview/skins/default/xui/pt/floater_mem_leaking.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="MemLeak" title="Simulação de Perda de Memória"> +<floater name="MemLeak" title="SIMULAÇÃO DE PERDA DE MEMÓRIA"> <spinner label="Velocidade da Perda (bytes por quadro):" name="leak_speed"/> <spinner label="Máximo de Memória Perdida (MB):" name="max_leak"/> <text name="total_leaked_label"> diff --git a/indra/newview/skins/default/xui/pt/floater_mute_object.xml b/indra/newview/skins/default/xui/pt/floater_mute_object.xml index 7ec0051a7d..cc669951c3 100644 --- a/indra/newview/skins/default/xui/pt/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/pt/floater_mute_object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="mute by name" title="Silenciar objeto pelo nome"> +<floater name="mute by name" title="SILENCIAR OBJETO PELO NOME"> <text name="message"> Silenciar pelo nome afeta apenas conversa de objeto e MI, não sons. Você deve digitar o nome exato do objeto. diff --git a/indra/newview/skins/default/xui/pt/floater_my_friends.xml b/indra/newview/skins/default/xui/pt/floater_my_friends.xml index a78b255f8a..68f2a19998 100644 --- a/indra/newview/skins/default/xui/pt/floater_my_friends.xml +++ b/indra/newview/skins/default/xui/pt/floater_my_friends.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_my_friends" title="Contatos"> +<floater name="floater_my_friends" title="CONTATOS"> <tab_container name="friends_and_groups"> <panel label="Amigos" name="friends_panel"/> <panel label="Grupos" name="groups_panel"/> diff --git a/indra/newview/skins/default/xui/pt/floater_openobject.xml b/indra/newview/skins/default/xui/pt/floater_openobject.xml index d3b72b4b18..0dc2852bac 100644 --- a/indra/newview/skins/default/xui/pt/floater_openobject.xml +++ b/indra/newview/skins/default/xui/pt/floater_openobject.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="objectcontents" title="Conteúdo do objeto"> +<floater name="objectcontents" title="CONTEÚDO DO OBJETO"> <text name="object_name"> [DESC]: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_perm_prefs.xml b/indra/newview/skins/default/xui/pt/floater_perm_prefs.xml index 9bb7f04256..33a0d6a456 100644 --- a/indra/newview/skins/default/xui/pt/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/pt/floater_perm_prefs.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="perm prefs" title="Permissões Padrão de Upload"> +<floater name="perm prefs" title="PERMISSÕES PADRÃO DE UPLOAD"> <panel label="Permissões" name="permissions"> <button label="?" label_selected="?" name="help"/> <check_box label="Compartilhar com o grupo" name="share_with_group"/> diff --git a/indra/newview/skins/default/xui/pt/floater_post_process.xml b/indra/newview/skins/default/xui/pt/floater_post_process.xml index 8f5f5db743..d4f2e96539 100644 --- a/indra/newview/skins/default/xui/pt/floater_post_process.xml +++ b/indra/newview/skins/default/xui/pt/floater_post_process.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="Ajustes de Pós-processamento"> +<floater name="Post-Process Floater" title="AJUSTES DE PÓS-PROCESSAMENTO"> <tab_container name="Post-Process Tabs"> <panel label="Filtro de Cor" name="wmiColorFilterPanel"> <check_box label="Habilitar" name="wmiColorFilterToggle"/> diff --git a/indra/newview/skins/default/xui/pt/floater_postcard.xml b/indra/newview/skins/default/xui/pt/floater_postcard.xml index 62fd050ea4..cf63726df2 100644 --- a/indra/newview/skins/default/xui/pt/floater_postcard.xml +++ b/indra/newview/skins/default/xui/pt/floater_postcard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Postcard" title="Foto por email"> +<floater name="Postcard" title="FOTO POR EMAIL"> <text name="to_label" width="135"> Email do Destinatário: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_preferences.xml b/indra/newview/skins/default/xui/pt/floater_preferences.xml index 0e9ef768b5..d2c3c79160 100644 --- a/indra/newview/skins/default/xui/pt/floater_preferences.xml +++ b/indra/newview/skins/default/xui/pt/floater_preferences.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Preferences" title="Preferências" min_width="332" width="628"> +<floater name="Preferences" title="PREFERÊNCIAS" min_width="332" width="628"> <button label="OK" label_selected="OK" name="OK"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> <button label="Aplicar" label_selected="Aplicar" name="Apply"/> diff --git a/indra/newview/skins/default/xui/pt/floater_preview_classified.xml b/indra/newview/skins/default/xui/pt/floater_preview_classified.xml index 4c583c28fb..0e8814b9f8 100644 --- a/indra/newview/skins/default/xui/pt/floater_preview_classified.xml +++ b/indra/newview/skins/default/xui/pt/floater_preview_classified.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="classified_preview" title="Informação do Anúncio Classificado"/> +<floater name="classified_preview" title="INFORMAÇÃO DO ANÚNCIO CLASSIFICADO"/> diff --git a/indra/newview/skins/default/xui/pt/floater_preview_event.xml b/indra/newview/skins/default/xui/pt/floater_preview_event.xml index 3c8ebcf95a..c03feacf0c 100644 --- a/indra/newview/skins/default/xui/pt/floater_preview_event.xml +++ b/indra/newview/skins/default/xui/pt/floater_preview_event.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="event_preview" title="Informação do Evento"/> +<floater name="event_preview" title="INFORMAÇÃO DO EVENTO"/> diff --git a/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml b/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml index e0a133d8ab..6f8944942a 100644 --- a/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="preview notecard" title="Nota:"> +<floater name="preview notecard" title="NOTA:"> <button label="Salvar" label_selected="Salvar" name="Save"/> <text name="desc txt"> Descrição: diff --git a/indra/newview/skins/default/xui/pt/floater_region_info.xml b/indra/newview/skins/default/xui/pt/floater_region_info.xml index fe228ab405..cc5e0d59d4 100644 --- a/indra/newview/skins/default/xui/pt/floater_region_info.xml +++ b/indra/newview/skins/default/xui/pt/floater_region_info.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="regioninfo" title="Região/Propriedade"/> +<floater name="regioninfo" title="REGIÃO/PROPRIEDADE"/> diff --git a/indra/newview/skins/default/xui/pt/floater_report_abuse.xml b/indra/newview/skins/default/xui/pt/floater_report_abuse.xml index 51d7ef8190..0d226a9502 100644 --- a/indra/newview/skins/default/xui/pt/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/pt/floater_report_abuse.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_report_abuse" title="Reportar abuso"> +<floater name="floater_report_abuse" title="REPORTAR ABUSO"> <check_box label="Incluir cópia da tela" name="screen_check"/> <text name="reporter_title"> Denunciador: diff --git a/indra/newview/skins/default/xui/pt/floater_script_debug.xml b/indra/newview/skins/default/xui/pt/floater_script_debug.xml index 48c73b93a3..6d1d981ca7 100644 --- a/indra/newview/skins/default/xui/pt/floater_script_debug.xml +++ b/indra/newview/skins/default/xui/pt/floater_script_debug.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <multi_floater name="script debug floater" title="Aviso de script/erro"> <tab_container name="Preview Tabs"> - <floater label="Script" name="all_scripts" title="[Todos os scripts]"/> + <floater label="Script" name="all_scripts" title="[ALL SCRIPTS]"/> </tab_container> </multi_floater> diff --git a/indra/newview/skins/default/xui/pt/floater_script_preview.xml b/indra/newview/skins/default/xui/pt/floater_script_preview.xml index 2a7680565f..3c0570791c 100644 --- a/indra/newview/skins/default/xui/pt/floater_script_preview.xml +++ b/indra/newview/skins/default/xui/pt/floater_script_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="preview lsl text" title="Script: Rotation Script"> +<floater name="preview lsl text" title="SCRIPT: ROTATION SCRIPT"> <text name="desc txt"> Descrição: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_script_queue.xml b/indra/newview/skins/default/xui/pt/floater_script_queue.xml index 7b35226bdb..6e0e174c07 100644 --- a/indra/newview/skins/default/xui/pt/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/pt/floater_script_queue.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="queue" title="Resetar Progresso"> +<floater name="queue" title="RESETAR PROGRESSO"> <button label="Fechar" label_selected="Fechar" name="close"/> </floater> diff --git a/indra/newview/skins/default/xui/pt/floater_script_search.xml b/indra/newview/skins/default/xui/pt/floater_script_search.xml index c904c0f816..3a62f1711f 100644 --- a/indra/newview/skins/default/xui/pt/floater_script_search.xml +++ b/indra/newview/skins/default/xui/pt/floater_script_search.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="script search" title="Busca de Script" width="320"> +<floater name="script search" title="BUSCA DE SCRIPT" width="320"> <check_box label="Não diferenciar Maiúsculas de Minúsculas" name="case_text" left="75"/> <button label="Buscar" label_selected="Buscar" name="search_btn" width="85"/> <button label="Substituir" label_selected="Substituir" name="replace_btn" left="100" width="85"/> diff --git a/indra/newview/skins/default/xui/pt/floater_sell_land.xml b/indra/newview/skins/default/xui/pt/floater_sell_land.xml index d3581405ff..f58c4098ef 100644 --- a/indra/newview/skins/default/xui/pt/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_sell_land.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="sell land" title="Vender terreno"> +<floater name="sell land" title="VENDER TERRENO"> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> <text name="info_parcel_label"> diff --git a/indra/newview/skins/default/xui/pt/floater_settings_debug.xml b/indra/newview/skins/default/xui/pt/floater_settings_debug.xml index f7b468bb22..394a9771e0 100644 --- a/indra/newview/skins/default/xui/pt/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/pt/floater_settings_debug.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="settings_debug" title="Configurações de Debug"> +<floater name="settings_debug" title="CONFIGURAÇÕES DE DEBUG"> <combo_box name="boolean_combo"> <combo_box.item name="TRUE" label="VERDADEIRO" /> <combo_box.item name="FALSE" label="FALSO" /> diff --git a/indra/newview/skins/default/xui/pt/floater_snapshot.xml b/indra/newview/skins/default/xui/pt/floater_snapshot.xml index a924706cb9..c3c4c73a89 100644 --- a/indra/newview/skins/default/xui/pt/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/pt/floater_snapshot.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="Prévia da foto"> +<floater name="Snapshot" title="PRÉVIA DA FOTO"> <text name="type_label"> Destino da foto </text> diff --git a/indra/newview/skins/default/xui/pt/floater_sound_preview.xml b/indra/newview/skins/default/xui/pt/floater_sound_preview.xml index df76499f42..d5d252c0dd 100644 --- a/indra/newview/skins/default/xui/pt/floater_sound_preview.xml +++ b/indra/newview/skins/default/xui/pt/floater_sound_preview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Sound Preview" title="sound.wav"> +<floater name="Sound Preview" title="SOUND.WAV"> <text name="name_label"> Nome: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_statistics.xml b/indra/newview/skins/default/xui/pt/floater_statistics.xml index d26c7081cc..c56c9fb2e0 100644 --- a/indra/newview/skins/default/xui/pt/floater_statistics.xml +++ b/indra/newview/skins/default/xui/pt/floater_statistics.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="stats floater" title="Statística"/> +<floater name="stats floater" title="STATÍSTICA"/> diff --git a/indra/newview/skins/default/xui/pt/floater_telehub.xml b/indra/newview/skins/default/xui/pt/floater_telehub.xml index 11886c7cab..5c775ab45d 100644 --- a/indra/newview/skins/default/xui/pt/floater_telehub.xml +++ b/indra/newview/skins/default/xui/pt/floater_telehub.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="telehub" title="Telehub" min_height="310" height="310" width="286"> +<floater name="telehub" title="TELEHUB" min_height="310" height="310" width="286"> <text name="status_text_connected"> Telehub conectado ao objeto [OBJECT] </text> diff --git a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml index 784540a48e..b63c4a9bbf 100644 --- a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="texture picker" title="Pegar: Textura"> +<floater name="texture picker" title="PEGAR: TEXTURA"> <string name="choose_picture"> Clique para escolher uma imagem </string> diff --git a/indra/newview/skins/default/xui/pt/floater_tools.xml b/indra/newview/skins/default/xui/pt/floater_tools.xml index d7227deacc..b9ab018606 100644 --- a/indra/newview/skins/default/xui/pt/floater_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="toolbox floater" title="" short_title="Construir" width="288"> +<floater name="toolbox floater" title="" short_title="CONSTRUIR" width="288"> <button label="" label_selected="" name="button focus" tool_tip="Foco"/> <button label="" label_selected="" name="button move" tool_tip="Mover"/> <button label="" label_selected="" name="button edit" tool_tip="Editar"/> diff --git a/indra/newview/skins/default/xui/pt/floater_top_objects.xml b/indra/newview/skins/default/xui/pt/floater_top_objects.xml index cd94b51b16..15e69c450c 100644 --- a/indra/newview/skins/default/xui/pt/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/pt/floater_top_objects.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="top_objects" title="Carregando..."> +<floater name="top_objects" title="CARREGANDO..."> <text name="title_text"> Carregando... </text> diff --git a/indra/newview/skins/default/xui/pt/floater_water.xml b/indra/newview/skins/default/xui/pt/floater_water.xml index ceb4414058..bad9aa0943 100644 --- a/indra/newview/skins/default/xui/pt/floater_water.xml +++ b/indra/newview/skins/default/xui/pt/floater_water.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Water Floater" title="Editor de Água Avançado"> +<floater name="Water Floater" title="EDITOR DE ÁGUA AVANÇADO"> <text name="KeyFramePresetsText" width="154"> Pré-configurações da Água: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_windlight_options.xml b/indra/newview/skins/default/xui/pt/floater_windlight_options.xml index 0de8bd22f8..951e37a1a6 100644 --- a/indra/newview/skins/default/xui/pt/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/pt/floater_windlight_options.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="WindLight floater" title="Editor de Céu Avançado"> +<floater name="WindLight floater" title="EDITOR DE CÉU AVANÇADO"> <text name="KeyFramePresetsText" width="130"> Pré-definições de Céu: </text> 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 056d121520..034602d6ea 100644 --- a/indra/newview/skins/default/xui/pt/floater_world_map.xml +++ b/indra/newview/skins/default/xui/pt/floater_world_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="worldmap" title="Mapa Mundi"> +<floater name="worldmap" title="MAPA MUNDI"> <tab_container name="maptab"> <panel label="Objetos" name="objects_mapview"/> <panel label="Terreno" name="terrain_mapview"/> diff --git a/indra/newview/tests/lltextureinfo_test.cpp b/indra/newview/tests/lltextureinfo_test.cpp new file mode 100644 index 0000000000..8dfba46262 --- /dev/null +++ b/indra/newview/tests/lltextureinfo_test.cpp @@ -0,0 +1,284 @@ +/** + * @file llwtextureinfo_test.cpp + * @author Si & Gabriel + * @date 2009-03-30 + * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * + * Copyright (c) 2006-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$ + */ + +// Precompiled header: almost always required for newview cpp files +#include "../llviewerprecompiledheaders.h" +// Class to test +#include "../lltextureinfo.h" +// Dependencies +#include "../lltextureinfodetails.cpp" + +// Tut header +#include "../test/lltut.h" + +// ------------------------------------------------------------------------------------------- +// Stubbing: Declarations required to link and run the class being tested +// Notes: +// * Add here stubbed implementation of the few classes and methods used in the class to be tested +// * Add as little as possible (let the link errors guide you) +// * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code) +// * A simulator for a class can be implemented here. Please comment and document thoroughly. + + +// End Stubbing +// ------------------------------------------------------------------------------------------- + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- + +namespace tut +{ + // Test wrapper declarations + struct textureinfo_test + { + // Constructor and destructor of the test wrapper + textureinfo_test() + { + } + ~textureinfo_test() + { + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<textureinfo_test> textureinfo_t; + typedef textureinfo_t::object textureinfo_object_t; + tut::textureinfo_t tut_textureinfo("textureinfo"); + + + // --------------------------------------------------------------------------------------- + // Test functions + // Notes: + // * Test as many as you possibly can without requiring a full blown simulation of everything + // * The tests are executed in sequence so the test instance state may change between calls + // * Remember that you cannot test private methods with tut + // --------------------------------------------------------------------------------------- + + // --------------------------------------------------------------------------------------- + // Test the LLTextureInfo + // --------------------------------------------------------------------------------------- + + + // Test instantiation + template<> template<> + void textureinfo_object_t::test<1>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + ensure("have we crashed?", true); + } + + // Check lltextureinfo does not contain UUIDs we haven't added + template<> template<> + void textureinfo_object_t::test<2>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + LLUUID nonExistant("3a0efa3b-84dc-4e17-9b8c-79ea028850c1"); + ensure(!tex_info.has(nonExistant)); + } + + // Check we can add a request time for a texture + template<> template<> + void textureinfo_object_t::test<3>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + LLUUID id("10e65d70-46fd-429f-841a-bf698e9424d3"); + tex_info.setRequestStartTime(id, 200); + + ensure_equals(tex_info.getRequestStartTime(id), 200); + } + + // Check time for non-existant texture + template<> template<> + void textureinfo_object_t::test<4>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + LLUUID nonExistant("3a0efa3b-84dc-4e17-9b8c-79ea028850c1"); + ensure_equals(tex_info.getRequestStartTime(nonExistant), 0); + } + + // Check download complete time for non existant texture + template<> template<> + void textureinfo_object_t::test<5>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + LLUUID nonExistant("3a0efa3b-84dc-4e17-9b8c-79ea028850c1"); + ensure_equals(tex_info.getRequestCompleteTime(nonExistant), 0); + } + + // requested size is passed in correctly + template<> template<> + void textureinfo_object_t::test<6>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + LLUUID id("10e65d70-46fd-429f-841a-bf698e9424d3"); + tex_info.setRequestSize(id, 600); + + ensure_equals(tex_info.getRequestSize(id), 600); + } + + // transport type is recorded correctly (http) + template<> template<> + void textureinfo_object_t::test<7>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + LLUUID id("10e65d70-46fd-429f-841a-bf698e9424d3"); + tex_info.setRequestType(id, LLTextureInfoDetails::REQUEST_TYPE_HTTP); + + ensure_equals(tex_info.getRequestType(id), LLTextureInfoDetails::REQUEST_TYPE_HTTP); + } + + // transport type is recorded correctly (udp) + template<> template<> + void textureinfo_object_t::test<8>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + LLUUID id("10e65d70-46fd-429f-841a-bf698e9424d3"); + tex_info.setRequestType(id, LLTextureInfoDetails::REQUEST_TYPE_UDP); + + ensure_equals(tex_info.getRequestType(id), LLTextureInfoDetails::REQUEST_TYPE_UDP); + } + + // request offset is recorded correctly + template<> template<> + void textureinfo_object_t::test<9>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + LLUUID id("10e65d70-46fd-429f-841a-bf698e9424d3"); + tex_info.setRequestOffset(id, 1234); + + ensure_equals(tex_info.getRequestOffset(id), 1234); + } + + // ask for averages gives us correct figure + template<> template<> + void textureinfo_object_t::test<10>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + S32 requestStartTimeOne = 200; + S32 requestEndTimeOne = 400; + S32 requestSizeOne = 1024; + S32 requestSizeOneBits = requestSizeOne * 8; + LLUUID id1("10e65d70-46fd-429f-841a-bf698e9424d3"); + tex_info.setRequestStartTime(id1, requestStartTimeOne); + tex_info.setRequestSize(id1, requestSizeOne); + tex_info.setRequestType(id1, LLTextureInfoDetails::REQUEST_TYPE_HTTP); + tex_info.setRequestCompleteTimeAndLog(id1, requestEndTimeOne); + + U32 requestStartTimeTwo = 100; + U32 requestEndTimeTwo = 500; + U32 requestSizeTwo = 2048; + S32 requestSizeTwoBits = requestSizeTwo * 8; + LLUUID id2("10e65d70-46fd-429f-841a-bf698e9424d4"); + tex_info.setRequestStartTime(id2, requestStartTimeTwo); + tex_info.setRequestSize(id2, requestSizeTwo); + tex_info.setRequestType(id2, LLTextureInfoDetails::REQUEST_TYPE_HTTP); + tex_info.setRequestCompleteTimeAndLog(id2, requestEndTimeTwo); + + S32 averageBitRate = ((requestSizeOneBits/(requestEndTimeOne - requestStartTimeOne)) + + (requestSizeTwoBits/(requestEndTimeTwo - requestStartTimeTwo))) / 2; + + S32 totalBytes = requestSizeOne + requestSizeTwo; + + LLSD results = tex_info.getAverages(); + ensure_equals("is average bits per second correct", results["bits_per_second"].asInteger(), averageBitRate); + ensure_equals("is total bytes is correct", results["bytes_downloaded"].asInteger(), totalBytes); + ensure_equals("is transport correct", results["transport"].asString(), std::string("HTTP")); + } + + // make sure averages cleared when reset is called + template<> template<> + void textureinfo_object_t::test<11>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + S32 requestStartTimeOne = 200; + S32 requestEndTimeOne = 400; + S32 requestSizeOne = 1024; + LLUUID id1("10e65d70-46fd-429f-841a-bf698e9424d3"); + tex_info.setRequestStartTime(id1, requestStartTimeOne); + tex_info.setRequestSize(id1, requestSizeOne); + tex_info.setRequestType(id1, LLTextureInfoDetails::REQUEST_TYPE_HTTP); + tex_info.setRequestCompleteTimeAndLog(id1, requestEndTimeOne); + + tex_info.getAverages(); + tex_info.reset(); + LLSD results = tex_info.getAverages(); + ensure_equals("is average bits per second correct", results["bits_per_second"].asInteger(), 0); + ensure_equals("is total bytes is correct", results["bytes_downloaded"].asInteger(), 0); + ensure_equals("is transport correct", results["transport"].asString(), std::string("NONE")); + } + + // make sure map item removed when expired + template<> template<> + void textureinfo_object_t::test<12>() + { + LLTextureInfo tex_info; + tex_info.setUpLogging(true, true); + + S32 requestStartTimeOne = 200; + S32 requestEndTimeOne = 400; + S32 requestSizeOne = 1024; + LLUUID id1("10e65d70-46fd-429f-841a-bf698e9424d3"); + tex_info.setRequestStartTime(id1, requestStartTimeOne); + tex_info.setRequestSize(id1, requestSizeOne); + tex_info.setRequestType(id1, LLTextureInfoDetails::REQUEST_TYPE_HTTP); + + ensure_equals("map item created", tex_info.getTextureInfoMapSize(), 1); + + tex_info.setRequestCompleteTimeAndLog(id1, requestEndTimeOne); + + ensure_equals("map item removed when consumed", tex_info.getTextureInfoMapSize(), 0); + } +} + diff --git a/indra/newview/tests/lltextureinfodetails_test.cpp b/indra/newview/tests/lltextureinfodetails_test.cpp new file mode 100644 index 0000000000..aa2697fb8e --- /dev/null +++ b/indra/newview/tests/lltextureinfodetails_test.cpp @@ -0,0 +1,98 @@ +/** + * @file llwtextureinfodetails_test.cpp + * @author Si & Gabriel + * @date 2009-03-30 + * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * + * Copyright (c) 2006-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$ + */ + +// Precompiled header: almost always required for newview cpp files +#include "../llviewerprecompiledheaders.h" +// Class to test +#include "../lltextureinfodetails.h" +// Dependencies + +// Tut header +#include "../test/lltut.h" + +// ------------------------------------------------------------------------------------------- +// Stubbing: Declarations required to link and run the class being tested +// Notes: +// * Add here stubbed implementation of the few classes and methods used in the class to be tested +// * Add as little as possible (let the link errors guide you) +// * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code) +// * A simulator for a class can be implemented here. Please comment and document thoroughly. + + +// End Stubbing +// ------------------------------------------------------------------------------------------- + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- + +namespace tut +{ + // Test wrapper declarations + struct textureinfodetails_test + { + // Constructor and destructor of the test wrapper + textureinfodetails_test() + { + } + ~textureinfodetails_test() + { + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<textureinfodetails_test> textureinfodetails_t; + typedef textureinfodetails_t::object textureinfodetails_object_t; + tut::textureinfodetails_t tut_textureinfodetails("textureinfodetails"); + + + // --------------------------------------------------------------------------------------- + // Test functions + // Notes: + // * Test as many as you possibly can without requiring a full blown simulation of everything + // * The tests are executed in sequence so the test instance state may change between calls + // * Remember that you cannot test private methods with tut + // --------------------------------------------------------------------------------------- + + // --------------------------------------------------------------------------------------- + // Test the LLTextureInfo + // --------------------------------------------------------------------------------------- + + + // Test instantiation + template<> template<> + void textureinfodetails_object_t::test<1>() + { + ensure("have we crashed?", true); + } +} diff --git a/indra/newview/tests/lltexturestatsuploader_test.cpp b/indra/newview/tests/lltexturestatsuploader_test.cpp new file mode 100644 index 0000000000..77a3e2c3d8 --- /dev/null +++ b/indra/newview/tests/lltexturestatsuploader_test.cpp @@ -0,0 +1,156 @@ +/** + * @file lltexturestatsuploader_test.cpp + * @author Si + * @date 2009-05-27 + * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * + * Copyright (c) 2006-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$ + */ + +// Precompiled header: almost always required for newview cpp files +#include "../llviewerprecompiledheaders.h" +// Class to test +#include "../lltexturestatsuploader.h" +// Dependencies + +// Tut header +#include "../test/lltut.h" + +// ------------------------------------------------------------------------------------------- +// Stubbing: Declarations required to link and run the class being tested +// Notes: +// * Add here stubbed implementation of the few classes and methods used in the class to be tested +// * Add as little as possible (let the link errors guide you) +// * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code) +// * A simulator for a class can be implemented here. Please comment and document thoroughly. + +#include "boost/intrusive_ptr.hpp" +void boost::intrusive_ptr_add_ref(LLCurl::Responder*){} +void boost::intrusive_ptr_release(LLCurl::Responder* p){} +const F32 HTTP_REQUEST_EXPIRY_SECS = 0.0f; + +static std::string most_recent_url; +static LLSD most_recent_body; + +void LLHTTPClient::post( + const std::string& url, + const LLSD& body, + ResponderPtr, + const LLSD& headers, + const F32 timeout) +{ + // set some sensor code + most_recent_url = url; + most_recent_body = body; + return; +} + +// End Stubbing +// ------------------------------------------------------------------------------------------- + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- + +namespace tut +{ + // Test wrapper declarations + struct texturestatsuploader_test + { + // Constructor and destructor of the test wrapper + texturestatsuploader_test() + { + most_recent_url = "some sort of default text that should never match anything the tests are expecting!"; + LLSD blank_llsd; + most_recent_body = blank_llsd; + } + ~texturestatsuploader_test() + { + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<texturestatsuploader_test> texturestatsuploader_t; + typedef texturestatsuploader_t::object texturestatsuploader_object_t; + tut::texturestatsuploader_t tut_texturestatsuploader("texturestatsuploader"); + + + // --------------------------------------------------------------------------------------- + // Test functions + // Notes: + // * Test as many as you possibly can without requiring a full blown simulation of everything + // * The tests are executed in sequence so the test instance state may change between calls + // * Remember that you cannot test private methods with tut + // --------------------------------------------------------------------------------------- + + // --------------------------------------------------------------------------------------- + // Test the LLTextureInfo + // --------------------------------------------------------------------------------------- + + + // Test instantiation + template<> template<> + void texturestatsuploader_object_t::test<1>() + { + LLTextureStatsUploader tsu; + llinfos << &tsu << llendl; + ensure("have we crashed?", true); + } + + // does it call out to the provided url if we ask it to? + template<> template<> + void texturestatsuploader_object_t::test<2>() + { + LLTextureStatsUploader tsu; + std::string url = "http://blahblahblah"; + LLSD texture_stats; + tsu.uploadStatsToSimulator(url, texture_stats); + ensure_equals("did the right url get called?", most_recent_url, url); + ensure_equals("did the right body get sent?", most_recent_body, texture_stats); + } + + // does it not call out to the provided url if we send it an ungranted cap? + template<> template<> + void texturestatsuploader_object_t::test<3>() + { + LLTextureStatsUploader tsu; + + // this url left intentionally blank to mirror + // not getting a cap in the caller. + std::string url_for_ungranted_cap = ""; + + LLSD texture_stats; + std::string most_recent_url_before_test = most_recent_url; + tsu.uploadStatsToSimulator(url_for_ungranted_cap, texture_stats); + + ensure_equals("hopefully no url got called!", most_recent_url, most_recent_url_before_test); + } + + // does it call out if the data is empty? + // should it even do that? +} + diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp new file mode 100644 index 0000000000..56cf86f6df --- /dev/null +++ b/indra/newview/tests/llworldmap_test.cpp @@ -0,0 +1,523 @@ +/** + * @file llworldmap_test.cpp + * @author Merov Linden + * @date 2009-03-09 + * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * + * Copyright (c) 2006-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$ + */ + +// Precompiled header: almost always required for newview cpp files +#include "../llviewerprecompiledheaders.h" +// Class to test +#include "../llworldmap.h" +// Dependencies +#include "../llviewerimagelist.h" +#include "../llworldmapmessage.h" +// Tut header +#include "../test/lltut.h" + +// ------------------------------------------------------------------------------------------- +// Stubbing: Declarations required to link and run the class being tested +// Notes: +// * Add here stubbed implementation of the few classes and methods used in the class to be tested +// * Add as little as possible (let the link errors guide you) +// * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code) +// * A simulator for a class can be implemented here. Please comment and document thoroughly. + +// Stub image calls +LLViewerImageList::LLViewerImageList() { } +LLViewerImageList::~LLViewerImageList() { } +LLViewerImageList gImageList; +LLViewerImage* LLViewerImageList::getImage(const LLUUID &image_id, + BOOL usemipmaps, + BOOL level_immediate, + LLGLint internal_format, + LLGLenum primary_format, + LLHost request_from_host) +{ return NULL; } +void LLViewerImage::setBoostLevel(S32 level) { } +void LLImageGL::setAddressMode(LLTexUnit::eTextureAddressMode mode) { } + +// Stub related map calls +LLWorldMapMessage::LLWorldMapMessage() { } +LLWorldMapMessage::~LLWorldMapMessage() { } +void LLWorldMapMessage::sendItemRequest(U32 type, U64 handle) { } +void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent) { } +LLWorldMipmap::LLWorldMipmap() { } +LLWorldMipmap::~LLWorldMipmap() { } +void LLWorldMipmap::reset() { } +void LLWorldMipmap::dropBoostLevels() { } +void LLWorldMipmap::equalizeBoostLevels() { } +LLPointer<LLViewerImage> LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S32 level, bool load) +{ return NULL; } + +// Stub other stuff +BOOL gPacificDaylightTime; + +// End Stubbing +// ------------------------------------------------------------------------------------------- + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- + +const F32 X_WORLD_TEST = 1000.0f * REGION_WIDTH_METERS; +const F32 Y_WORLD_TEST = 2000.0f * REGION_WIDTH_METERS; +const F32 Z_WORLD_TEST = 240.0f; +const std::string ITEM_NAME_TEST = "Item Foo"; +const std::string TOOLTIP_TEST = "Tooltip Foo"; + +const std::string SIM_NAME_TEST = "Sim Foo"; + +namespace tut +{ + // Test wrapper declarations + struct iteminfo_test + { + // Instance to be tested + LLItemInfo* mItem; + + // Constructor and destructor of the test wrapper + iteminfo_test() + { + LLUUID id; + mItem = new LLItemInfo(X_WORLD_TEST, Y_WORLD_TEST, ITEM_NAME_TEST, id); + } + ~iteminfo_test() + { + delete mItem; + } + }; + + struct siminfo_test + { + // Instance to be tested + LLSimInfo* mSim; + + // Constructor and destructor of the test wrapper + siminfo_test() + { + U64 handle = to_region_handle_global(X_WORLD_TEST, Y_WORLD_TEST); + mSim = new LLSimInfo(handle); + } + ~siminfo_test() + { + delete mSim; + } + }; + + struct worldmap_test + { + // Instance to be tested + LLWorldMap* mWorld; + + // Constructor and destructor of the test wrapper + worldmap_test() + { + mWorld = LLWorldMap::getInstance(); + } + ~worldmap_test() + { + mWorld = NULL; + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<iteminfo_test> iteminfo_t; + typedef iteminfo_t::object iteminfo_object_t; + tut::iteminfo_t tut_iteminfo("iteminfo"); + + typedef test_group<siminfo_test> siminfo_t; + typedef siminfo_t::object siminfo_object_t; + tut::siminfo_t tut_siminfo("siminfo"); + + typedef test_group<worldmap_test> worldmap_t; + typedef worldmap_t::object worldmap_object_t; + tut::worldmap_t tut_worldmap("worldmap"); + + // --------------------------------------------------------------------------------------- + // Test functions + // Notes: + // * Test as many as you possibly can without requiring a full blown simulation of everything + // * The tests are executed in sequence so the test instance state may change between calls + // * Remember that you cannot test private methods with tut + // --------------------------------------------------------------------------------------- + + // --------------------------------------------------------------------------------------- + // Test the LLItemInfo interface + // --------------------------------------------------------------------------------------- + template<> template<> + void iteminfo_object_t::test<1>() + { + // Test 1 : setCount() / getCount() + mItem->setCount(10); + ensure("LLItemInfo::setCount() test failed", mItem->getCount() == 10); + // Test 2 : setTooltip() / getToolTip() + std::string tooltip = TOOLTIP_TEST; + mItem->setTooltip(tooltip); + ensure("LLItemInfo::setTooltip() test failed", mItem->getToolTip() == TOOLTIP_TEST); + // Test 3 : setElevation() / getGlobalPosition() + mItem->setElevation(Z_WORLD_TEST); + LLVector3d pos = mItem->getGlobalPosition(); + LLVector3d ref(X_WORLD_TEST, Y_WORLD_TEST, Z_WORLD_TEST); + ensure("LLItemInfo::getGlobalPosition() test failed", pos == ref); + // Test 4 : getName() + std::string name = mItem->getName(); + ensure("LLItemInfo::getName() test failed", name == ITEM_NAME_TEST); + // Test 5 : isName() + ensure("LLItemInfo::isName() test failed", mItem->isName(name)); + // Test 6 : getUUID() + LLUUID id; + ensure("LLItemInfo::getUUID() test failed", mItem->getUUID() == id); + // Test 7 : getRegionHandle() + U64 handle = to_region_handle_global(X_WORLD_TEST, Y_WORLD_TEST); + ensure("LLItemInfo::getRegionHandle() test failed", mItem->getRegionHandle() == handle); + } + // --------------------------------------------------------------------------------------- + // Test the LLSimInfo interface + // --------------------------------------------------------------------------------------- + // Test Setters and Accessors methods + template<> template<> + void siminfo_object_t::test<1>() + { + // Test 1 : setName() / getName() + std::string name = SIM_NAME_TEST; + mSim->setName(name); + ensure("LLSimInfo::setName() test failed", mSim->getName() == SIM_NAME_TEST); + // Test 2 : isName() + ensure("LLSimInfo::isName() test failed", mSim->isName(name)); + // Test 3 : getGlobalPos() + LLVector3 local; + LLVector3d ref(X_WORLD_TEST, Y_WORLD_TEST, 0.0f); + LLVector3d pos = mSim->getGlobalPos(local); + ensure("LLSimInfo::getGlobalPos() test failed", pos == ref); + // Test 4 : getGlobalOrigin() + pos = mSim->getGlobalOrigin(); + ensure("LLSimInfo::getGlobalOrigin() test failed", pos == ref); + // Test 5 : clearImage() + try { + mSim->clearImage(); + } catch (...) { + fail("LLSimInfo::clearImage() test failed"); + } + // Test 6 : dropImagePriority() + try { + mSim->dropImagePriority(); + } catch (...) { + fail("LLSimInfo::dropImagePriority() test failed"); + } + // Test 7 : updateAgentCount() + try { + mSim->updateAgentCount(0.0f); + } catch (...) { + fail("LLSimInfo::updateAgentCount() test failed"); + } + // Test 8 : getAgentCount() + S32 agents = mSim->getAgentCount(); + ensure("LLSimInfo::getAgentCount() test failed", agents == 0); + // Test 9 : setLandForSaleImage() / getLandForSaleImage() + LLUUID id; + mSim->setLandForSaleImage(id); + LLPointer<LLViewerImage> image = mSim->getLandForSaleImage(); + ensure("LLSimInfo::getLandForSaleImage() test failed", image.isNull()); + // Test 10 : isPG() + mSim->setAccess(SIM_ACCESS_PG); + ensure("LLSimInfo::isPG() test failed", mSim->isPG()); + // Test 11 : isDown() + mSim->setAccess(SIM_ACCESS_DOWN); + ensure("LLSimInfo::isDown() test failed", mSim->isDown()); + // Test 12 : Access strings can't be accessed from unit test... + //ensure("LLSimInfo::getAccessString() test failed", mSim->getAccessString() == "Offline"); + // Test 13 : Region strings can't be accessed from unit test... + //mSim->setRegionFlags(REGION_FLAGS_SANDBOX); + //ensure("LLSimInfo::setRegionFlags() test failed", mSim->getFlagsString() == "Sandbox"); + } + // Test management of LLInfoItem lists + template<> template<> + void siminfo_object_t::test<2>() + { + // Test 14 : clearItems() + try { + mSim->clearItems(); + } catch (...) { + fail("LLSimInfo::clearItems() at init test failed"); + } + + // Test 15 : Verify that all the lists are empty + LLSimInfo::item_info_list_t list; + list = mSim->getTeleHub(); + ensure("LLSimInfo::getTeleHub() empty at init test failed", list.empty()); + list = mSim->getInfoHub(); + ensure("LLSimInfo::getInfoHub() empty at init test failed", list.empty()); + list = mSim->getPGEvent(); + ensure("LLSimInfo::getPGEvent() empty at init test failed", list.empty()); + list = mSim->getMatureEvent(); + ensure("LLSimInfo::getMatureEvent() empty at init test failed", list.empty()); + list = mSim->getLandForSale(); + ensure("LLSimInfo::getLandForSale() empty at init test failed", list.empty()); + list = mSim->getAgentLocation(); + ensure("LLSimInfo::getAgentLocation() empty at init test failed", list.empty()); + + // Create an item to be inserted + LLUUID id; + LLItemInfo item(X_WORLD_TEST, Y_WORLD_TEST, ITEM_NAME_TEST, id); + + // Insert the item in each list + mSim->insertTeleHub(item); + mSim->insertInfoHub(item); + mSim->insertPGEvent(item); + mSim->insertMatureEvent(item); + mSim->insertLandForSale(item); + mSim->insertAgentLocation(item); + + // Test 16 : Verify that the lists contain 1 item each + list = mSim->getTeleHub(); + ensure("LLSimInfo::insertTeleHub() test failed", list.size() == 1); + list = mSim->getInfoHub(); + ensure("LLSimInfo::insertInfoHub() test failed", list.size() == 1); + list = mSim->getPGEvent(); + ensure("LLSimInfo::insertPGEvent() test failed", list.size() == 1); + list = mSim->getMatureEvent(); + ensure("LLSimInfo::insertMatureEvent() test failed", list.size() == 1); + list = mSim->getLandForSale(); + ensure("LLSimInfo::insertLandForSale() test failed", list.size() == 1); + list = mSim->getAgentLocation(); + ensure("LLSimInfo::insertAgentLocation() test failed", list.size() == 1); + + // Test 17 : clearItems() + try { + mSim->clearItems(); + } catch (...) { + fail("LLSimInfo::clearItems() at end test failed"); + } + + // Test 18 : Verify that all the lists are empty again... *except* agent which is persisted!! (on purpose) + list = mSim->getTeleHub(); + ensure("LLSimInfo::getTeleHub() empty after clear test failed", list.empty()); + list = mSim->getInfoHub(); + ensure("LLSimInfo::getInfoHub() empty after clear test failed", list.empty()); + list = mSim->getPGEvent(); + ensure("LLSimInfo::getPGEvent() empty after clear test failed", list.empty()); + list = mSim->getMatureEvent(); + ensure("LLSimInfo::getMatureEvent() empty after clear test failed", list.empty()); + list = mSim->getLandForSale(); + ensure("LLSimInfo::getLandForSale() empty after clear test failed", list.empty()); + list = mSim->getAgentLocation(); + ensure("LLSimInfo::getAgentLocation() empty after clear test failed", list.size() == 1); + } + + // --------------------------------------------------------------------------------------- + // Test the LLWorldMap interface + // --------------------------------------------------------------------------------------- + // Test Setters and Accessors methods + template<> template<> + void worldmap_object_t::test<1>() + { + // Test 1 : reset() + try { + mWorld->reset(); + } catch (...) { + fail("LLWorldMap::reset() at init test failed"); + } + // Test 2 : clearImageRefs() + try { + mWorld->clearImageRefs(); + } catch (...) { + fail("LLWorldMap::clearImageRefs() test failed"); + } + // Test 3 : dropImagePriorities() + try { + mWorld->dropImagePriorities(); + } catch (...) { + fail("LLWorldMap::dropImagePriorities() test failed"); + } + // Test 4 : reloadItems() + try { + mWorld->reloadItems(true); + } catch (...) { + fail("LLWorldMap::reloadItems() test failed"); + } + // Test 5 : updateRegions() + try { + mWorld->updateRegions(1000, 1000, 1004, 1004); + } catch (...) { + fail("LLWorldMap::updateRegions() test failed"); + } + // Test 6 : equalizeBoostLevels() + try { + mWorld->equalizeBoostLevels(); + } catch (...) { + fail("LLWorldMap::equalizeBoostLevels() test failed"); + } + // Test 7 : getObjectsTile() + try { + LLPointer<LLViewerImage> image = mWorld->getObjectsTile((U32)(X_WORLD_TEST/REGION_WIDTH_METERS), (U32)(Y_WORLD_TEST/REGION_WIDTH_METERS), 1); + ensure("LLWorldMap::getObjectsTile() failed", image.isNull()); + } catch (...) { + fail("LLWorldMap::getObjectsTile() test failed with exception"); + } + } + // Test management of LLSimInfo lists + template<> template<> + void worldmap_object_t::test<2>() + { + // Test 8 : reset() + try { + mWorld->reset(); + } catch (...) { + fail("LLWorldMap::reset() at init test failed"); + } + + // Test 9 : Verify that all the region list is empty + LLWorldMap::sim_info_map_t list; + list = mWorld->getRegionMap(); + ensure("LLWorldMap::getRegionMap() empty at init test failed", list.empty()); + + // Test 10 : Insert a region + bool success; + LLUUID id; + std::string name_sim = SIM_NAME_TEST; + success = mWorld->insertRegion( U32(X_WORLD_TEST), + U32(Y_WORLD_TEST), + name_sim, + id, + SIM_ACCESS_PG, + REGION_FLAGS_SANDBOX); + list = mWorld->getRegionMap(); + ensure("LLWorldMap::insertRegion() failed", success && (list.size() == 1)); + + // Test 11 : Insert an item in the same region -> number of regions doesn't increase + std::string name_item = ITEM_NAME_TEST; + success = mWorld->insertItem( U32(X_WORLD_TEST + REGION_WIDTH_METERS/2), + U32(Y_WORLD_TEST + REGION_WIDTH_METERS/2), + name_item, + id, + MAP_ITEM_LAND_FOR_SALE, + 0, 0); + list = mWorld->getRegionMap(); + ensure("LLWorldMap::insertItem() in existing region failed", success && (list.size() == 1)); + + // Test 12 : Insert an item in another region -> number of regions increases + success = mWorld->insertItem( U32(X_WORLD_TEST + REGION_WIDTH_METERS*2), + U32(Y_WORLD_TEST + REGION_WIDTH_METERS*2), + name_item, + id, + MAP_ITEM_LAND_FOR_SALE, + 0, 0); + list = mWorld->getRegionMap(); + ensure("LLWorldMap::insertItem() in unexisting region failed", success && (list.size() == 2)); + + // Test 13 : simInfoFromPosGlobal() in region + LLVector3d pos1( X_WORLD_TEST + REGION_WIDTH_METERS*2 + REGION_WIDTH_METERS/2, + Y_WORLD_TEST + REGION_WIDTH_METERS*2 + REGION_WIDTH_METERS/2, + 0.0f); + LLSimInfo* sim; + sim = mWorld->simInfoFromPosGlobal(pos1); + ensure("LLWorldMap::simInfoFromPosGlobal() test on existing region failed", sim != NULL); + + // Test 14 : simInfoFromPosGlobal() outside region + LLVector3d pos2( X_WORLD_TEST + REGION_WIDTH_METERS*4 + REGION_WIDTH_METERS/2, + Y_WORLD_TEST + REGION_WIDTH_METERS*4 + REGION_WIDTH_METERS/2, + 0.0f); + sim = mWorld->simInfoFromPosGlobal(pos2); + ensure("LLWorldMap::simInfoFromPosGlobal() test outside region failed", sim == NULL); + + // Test 15 : simInfoFromName() + sim = mWorld->simInfoFromName(name_sim); + ensure("LLWorldMap::simInfoFromName() test on existing region failed", sim != NULL); + + // Test 16 : simInfoFromHandle() + U64 handle = to_region_handle_global(X_WORLD_TEST, Y_WORLD_TEST); + sim = mWorld->simInfoFromHandle(handle); + ensure("LLWorldMap::simInfoFromHandle() test on existing region failed", sim != NULL); + + // Test 17 : simNameFromPosGlobal() + LLVector3d pos3( X_WORLD_TEST + REGION_WIDTH_METERS/2, + Y_WORLD_TEST + REGION_WIDTH_METERS/2, + 0.0f); + success = mWorld->simNameFromPosGlobal(pos3, name_sim); + ensure("LLWorldMap::simNameFromPosGlobal() test on existing region failed", success && (name_sim == SIM_NAME_TEST)); + + // Test 18 : reset() + try { + mWorld->reset(); + } catch (...) { + fail("LLWorldMap::reset() at end test failed"); + } + + // Test 19 : Verify that all the region list is empty + list = mWorld->getRegionMap(); + ensure("LLWorldMap::getRegionMap() empty at end test failed", list.empty()); + } + // Test tracking + template<> template<> + void worldmap_object_t::test<3>() + { + // Point to track + LLVector3d pos( X_WORLD_TEST + REGION_WIDTH_METERS/2, Y_WORLD_TEST + REGION_WIDTH_METERS/2, Z_WORLD_TEST); + + // Test 20 : no tracking + mWorld->cancelTracking(); + ensure("LLWorldMap::cancelTracking() at begin test failed", mWorld->isTracking() == false); + + // Test 21 : set tracking + mWorld->setTracking(pos); + ensure("LLWorldMap::setTracking() failed", mWorld->isTracking() && !mWorld->isTrackingValidLocation()); + + // Test 22 : set click and commit flags + mWorld->setTrackingDoubleClick(); + ensure("LLWorldMap::setTrackingDoubleClick() failed", mWorld->isTrackingDoubleClick()); + mWorld->setTrackingCommit(); + ensure("LLWorldMap::setTrackingCommit() failed", mWorld->isTrackingCommit()); + + // Test 23 : in rectangle test + bool inRect = mWorld->isTrackingInRectangle( X_WORLD_TEST, Y_WORLD_TEST, + X_WORLD_TEST + REGION_WIDTH_METERS, + Y_WORLD_TEST + REGION_WIDTH_METERS); + ensure("LLWorldMap::isTrackingInRectangle() in rectangle failed", inRect); + inRect = mWorld->isTrackingInRectangle( X_WORLD_TEST + REGION_WIDTH_METERS, + Y_WORLD_TEST + REGION_WIDTH_METERS, + X_WORLD_TEST + 2 * REGION_WIDTH_METERS, + Y_WORLD_TEST + 2 * REGION_WIDTH_METERS); + ensure("LLWorldMap::isTrackingInRectangle() outside rectangle failed", !inRect); + + // Test 24 : set tracking to valid and invalid + mWorld->setTrackingValid(); + ensure("LLWorldMap::setTrackingValid() failed", mWorld->isTrackingValidLocation() && !mWorld->isTrackingInvalidLocation()); + mWorld->setTrackingInvalid(); + ensure("LLWorldMap::setTrackingInvalid() failed", !mWorld->isTrackingValidLocation() && mWorld->isTrackingInvalidLocation()); + + // Test 25 : getTrackedPositionGlobal() + LLVector3d res = mWorld->getTrackedPositionGlobal(); + ensure("LLWorldMap::getTrackedPositionGlobal() failed", res == pos); + + // Test 26 : reset tracking + mWorld->cancelTracking(); + ensure("LLWorldMap::cancelTracking() at end test failed", mWorld->isTracking() == false); + } +} diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp new file mode 100644 index 0000000000..9938175c55 --- /dev/null +++ b/indra/newview/tests/llworldmipmap_test.cpp @@ -0,0 +1,176 @@ +/** + * @file llworldmipmap_test.cpp + * @author Merov Linden + * @date 2009-02-03 + * + * $LicenseInfo:firstyear=2006&license=viewergpl$ + * + * Copyright (c) 2006-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$ + */ + +// Precompiled header: almost always required for newview cpp files +#include "../llviewerprecompiledheaders.h" +// Class to test +#include "../llworldmipmap.h" +// Dependencies +#include "../llviewerimagelist.h" +// Tut header +#include "../test/lltut.h" + +// ------------------------------------------------------------------------------------------- +// Stubbing: Declarations required to link and run the class being tested +// Notes: +// * Add here stubbed implementation of the few classes and methods used in the class to be tested +// * Add as little as possible (let the link errors guide you) +// * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code) +// * A simulator for a class can be implemented here. Please comment and document thoroughly. + +LLViewerImageList::LLViewerImageList() { } +LLViewerImageList::~LLViewerImageList() { } + +LLViewerImageList gImageList; + +LLViewerImage* LLViewerImageList::getImageFromUrl(const std::string& url, + BOOL usemipmaps, + BOOL level_immediate, + LLGLint internal_format, + LLGLenum primary_format, + const LLUUID& force_id) +{ return NULL; } +void LLViewerImage::setBoostLevel(S32 level) { } + +// End Stubbing +// ------------------------------------------------------------------------------------------- + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- +namespace tut +{ + // Test wrapper declaration + struct worldmipmap_test + { + // Derived test class + class LLTestWorldMipmap : public LLWorldMipmap + { + // Put here stubbs of virtual methods we shouldn't call all the way down + }; + // Instance to be tested + LLTestWorldMipmap* mMap; + + // Constructor and destructor of the test wrapper + worldmipmap_test() + { + mMap = new LLTestWorldMipmap; + } + ~worldmipmap_test() + { + delete mMap; + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<worldmipmap_test> worldmipmap_t; + typedef worldmipmap_t::object worldmipmap_object_t; + tut::worldmipmap_t tut_worldmipmap("worldmipmap"); + + // --------------------------------------------------------------------------------------- + // Test functions + // Notes: + // * Test as many as you possibly can without requiring a full blown simulation of everything + // * The tests are executed in sequence so the test instance state may change between calls + // * Remember that you cannot test private methods with tut + // --------------------------------------------------------------------------------------- + // Test static methods + // Test 1 : scaleToLevel() + template<> template<> + void worldmipmap_object_t::test<1>() + { + S32 level = mMap->scaleToLevel(0.0); + ensure("scaleToLevel() test 1 failed", level == LLWorldMipmap::MAP_LEVELS); + level = mMap->scaleToLevel(LLWorldMipmap::MAP_TILE_SIZE); + ensure("scaleToLevel() test 2 failed", level == 1); + level = mMap->scaleToLevel(10 * LLWorldMipmap::MAP_TILE_SIZE); + ensure("scaleToLevel() test 3 failed", level == 1); + } + // Test 2 : globalToMipmap() + template<> template<> + void worldmipmap_object_t::test<2>() + { + U32 grid_x, grid_y; + mMap->globalToMipmap(1000.f*REGION_WIDTH_METERS, 1000.f*REGION_WIDTH_METERS, 1, &grid_x, &grid_y); + ensure("globalToMipmap() test 1 failed", (grid_x == 1000) && (grid_y == 1000)); + mMap->globalToMipmap(0.0, 0.0, LLWorldMipmap::MAP_LEVELS, &grid_x, &grid_y); + ensure("globalToMipmap() test 2 failed", (grid_x == 0) && (grid_y == 0)); + } + // Test 3 : getObjectsTile() + template<> template<> + void worldmipmap_object_t::test<3>() + { + // Depends on some inline methods in LLViewerImage... Thinking about how to make this work + // LLPointer<LLViewerImage> img = mMap->getObjectsTile(0, 0, 1); + // ensure("getObjectsTile() test failed", img.isNull()); + } + // Test 4 : equalizeBoostLevels() + template<> template<> + void worldmipmap_object_t::test<4>() + { + try + { + mMap->equalizeBoostLevels(); + } + catch (...) + { + fail("equalizeBoostLevels() test failed"); + } + } + // Test 5 : dropBoostLevels() + template<> template<> + void worldmipmap_object_t::test<5>() + { + try + { + mMap->dropBoostLevels(); + } + catch (...) + { + fail("dropBoostLevels() test failed"); + } + } + // Test 6 : reset() + template<> template<> + void worldmipmap_object_t::test<6>() + { + try + { + mMap->reset(); + } + catch (...) + { + fail("reset() test failed"); + } + } +} |