diff options
Diffstat (limited to 'indra/newview')
47 files changed, 778 insertions, 276 deletions
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..7254fff664 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5558,6 +5558,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> 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/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index 7b75c77a1e..ed304bdd34 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<LLViewerTexture> 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/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/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/llface.cpp b/indra/newview/llface.cpp index 09b3ce1e86..8ec448e281 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -515,8 +515,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; diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 70a3ad5252..ad2fe34e95 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -789,7 +789,7 @@ 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); + LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::FETCHED_TEXTURE); image_in_list->createGLTexture(0, raw); // the texture picker then uses that texture 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/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/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/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp new file mode 100644 index 0000000000..6f3b0db498 --- /dev/null +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -0,0 +1,437 @@ +/** + * @file llpanellandmarkinfo.cpp + * @brief Displays landmark info in Side Tray. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpanellandmarkinfo.h" + +#include "llinventory.h" + +#include "llcombobox.h" +#include "lllineeditor.h" +#include "lltextbox.h" +#include "lltexteditor.h" +#include "lltrans.h" + +#include "llagent.h" +#include "llagentui.h" +#include "llinventorymodel.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); + + // HACK: Flag 0x2 == adult region, + // Flag 0x1 == mature region, otherwise assume PG + std::string rating = LLViewerRegion::accessToString(SIM_ACCESS_PG); + if (parcel_data.flags & 0x2) + { + rating = LLViewerRegion::accessToString(SIM_ACCESS_ADULT); + } + else if (parcel_data.flags & 0x1) + { + rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE); + } + + mMaturityRatingText->setValue(rating); + + 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/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/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 9c21faa3be..86fa2c4695 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -552,7 +552,7 @@ 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); mAssetStatus = PREVIEW_ASSET_LOADING; updateDimensions(); 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 759c86f3a0..b8ceef0899 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1448,7 +1448,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; } @@ -1604,7 +1604,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)); } } } @@ -4604,7 +4604,7 @@ void LLSelectMgr::updateSilhouettes() if (!mSilhouetteImagep) { - mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", TRUE, TRUE); + mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", TRUE, LLViewerTexture::BOOST_UI); } mHighlightedObjects->cleanupNodes(); diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 9f317803ce..279e143851 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2704,7 +2704,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/llstartup.cpp b/indra/newview/llstartup.cpp index 9aa74e8b9f..9bdea57491 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -738,7 +738,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 +895,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 diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 50ebc205a9..efe8804742 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -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()) @@ -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/lltextureview.cpp b/indra/newview/lltextureview.cpp index ea675c5a6e..dafa4f25ca 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -168,7 +168,7 @@ void LLTextureBar::draw() { color = LLColor4::green4; } - else if (mImagep->getBoostLevel()) + else if (mImagep->getBoostLevel() > LLViewerTexture::BOOST_NONE) { color = LLColor4::magenta; } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 0a9e72506b..24017202cc 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -761,14 +761,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 +1039,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 +1091,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/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 20cd516fa0..26411ce152 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -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/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 758bf8c1aa..6b8c8c01d4 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -198,6 +198,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,6 +211,7 @@ 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) ; } @@ -256,10 +258,10 @@ void LLViewerTextureManager::init() 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::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, TRUE, LLViewerTexture::BOOST_UI); LLViewerFetchedTexture::sSmokeImagep->setNoDelete() ; LLViewerTexture::initClass() ; @@ -1240,7 +1242,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() { ddiscard+=2; } - else if (mGLTexturep.notNull() && !mGLTexturep->getBoundRecently() && mBoostLevel == 0) + else if (mGLTexturep.notNull() && !mGLTexturep->getBoundRecently() && mBoostLevel == LLViewerTexture::BOOST_NONE) { ddiscard-=2; } @@ -1252,11 +1254,11 @@ F32 LLViewerFetchedTexture::calcDecodePriority() pixel_priority = llclamp(pixel_priority, 0.0f, priority-1.f); // priority range = 100000-900000 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); } } return priority; @@ -1436,7 +1438,7 @@ bool LLViewerFetchedTexture::updateFetch() } if (!mDontDiscard) { - if (mBoostLevel == 0) + if (mBoostLevel == LLViewerTexture::BOOST_NONE) { desired_discard = llmax(desired_discard, current_discard-1); } diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 020478beef..ff8f14e879 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 @@ -601,7 +602,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 +611,7 @@ 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, // Get the requested level immediately upon creation. 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..d2be1ac9b5 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -197,7 +197,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); @@ -325,14 +325,14 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& { // Never mind that this ignores image_set_id; // getImage() will handle that later. - return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE); + return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI); } 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); } // generate UUID based on hash of filename @@ -400,7 +400,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); @@ -1171,7 +1171,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; @@ -1235,7 +1235,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; diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index fda57ce981..6948db70f8 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -131,7 +131,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,7 +140,7 @@ private: LLViewerFetchedTexture * getImageFromFile(const std::string& filename, 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, @@ -149,7 +149,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 +159,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; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4bf66ba17e..240f87d104 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6520,7 +6520,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/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..75ca37f661 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -205,7 +205,10 @@ void LLVOAvatarSelf::markDead() param; param = (LLViewerVisualParam*) getNextVisualParam()) { - param->setIsDummy(TRUE); + if (param->getWearableType() != WT_INVALID) + { + param->setIsDummy(TRUE); + } } return success; diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 570a3334b9..110433a27d 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)); } 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/llvosky.cpp b/indra/newview/llvosky.cpp index d44c543266..d37deaf53d 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -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() ; diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 615ae13bc2..ec118d89bc 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; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 7d4bef3f7d..1d94e9118e 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -665,7 +665,7 @@ 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); @@ -876,7 +876,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 diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 4cd29bb838..746214088a 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; } diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index f198f3a0cf..355d4141c3 100644 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -525,7 +525,7 @@ void LLWorldMap::processMapLayerReply(LLMessageSystem* msg, void**) 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); + new_layer.LayerImage = LLViewerTextureManager::getFetchedTexture(new_layer.LayerImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); gGL.getTexUnit(0)->bind(new_layer.LayerImage); new_layer.LayerImage->setAddressMode(LLTexUnit::TAM_CLAMP); @@ -640,14 +640,15 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**) 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 = LLViewerTextureManager::getFetchedTexture(siminfo->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], + MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); siminfo->mCurrentImage->setAddressMode(LLTexUnit::TAM_CLAMP); #endif if (siminfo->mMapImageID[2].notNull()) { #ifdef IMMEDIATE_IMAGE_LOAD - siminfo->mOverlayImage = LLViewerTextureManager::getFetchedTexture(siminfo->mMapImageID[2], MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + siminfo->mOverlayImage = LLViewerTextureManager::getFetchedTexture(siminfo->mMapImageID[2], MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); #endif } else diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 823db027ee..920415873e 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -511,7 +511,8 @@ void LLWorldMapView::draw() (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 = LLViewerTextureManager::getFetchedTexture(info->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], + MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); info->mCurrentImage->setAddressMode(LLTexUnit::TAM_CLAMP); simimage = info->mCurrentImage; gGL.getTexUnit(0)->bind(simimage); @@ -524,7 +525,7 @@ void LLWorldMapView::draw() (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 = LLViewerTextureManager::getFetchedTexture(info->mMapImageID[2], MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); info->mOverlayImage->setAddressMode(LLTexUnit::TAM_CLAMP); overlayimage = info->mOverlayImage; gGL.getTexUnit(0)->bind(overlayimage); diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml index 07d76f4810..c021dd79de 100644 --- a/indra/newview/skins/default/xui/en/floater_customize.xml +++ b/indra/newview/skins/default/xui/en/floater_customize.xml @@ -3378,6 +3378,16 @@ scratch and wear it. layout="topleft" name="panel_list" /> </scroll_container> + <button + bottom="536" + follows="right|bottom" + height="20" + label="Make Outfit" + label_selected="Make Outfit" + layout="topleft" + name="make_outfit_btn" + right="-216" + width="100" /> <button bottom="536" follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index fc736211de..1d87a0f9d2 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -13,58 +13,58 @@ single_instance="true" sound_flags="0" width="280"> - <floater.string + <string name="status_rotate"> Drag colored bands to rotate object - </floater.string> - <floater.string + </string> + <string name="status_scale"> Click and drag to stretch selected side - </floater.string> - <floater.string + </string> + <string name="status_move"> Drag to move, shift-drag to copy - </floater.string> - <floater.string + </string> + <string name="status_modifyland"> Click and hold to modify land - </floater.string> - <floater.string + </string> + <string name="status_camera"> Click and drag to move camera - </floater.string> - <floater.string + </string> + <string name="status_grab"> Drag to move, Ctrl to lift, Ctrl+Shift to rotate - </floater.string> - <floater.string + </string> + <string name="status_place"> Click inworld to build - </floater.string> - <floater.string + </string> + <string name="status_selectland"> Click and drag to select land - </floater.string> - <floater.string + </string> + <string name="grid_screen_text"> Screen - </floater.string> - <floater.string + </string> + <string name="grid_local_text"> Local - </floater.string> - <floater.string + </string> + <string name="grid_world_text"> World - </floater.string> - <floater.string + </string> + <string name="grid_reference_text"> Reference - </floater.string> - <floater.string + </string> + <string name="grid_attachment_text"> Attachment - </floater.string> + </string> <button follows="left|top" height="20" @@ -1034,7 +1034,10 @@ label="Original" value="1" /> </combo_box> -<!-- NEW PRICE 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" @@ -1046,7 +1049,7 @@ label="Price: L$" label_width="65" width="150" - min_val="1" + min_val="0" height="20" max_val="999999999" /> <check_box diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index c3ee6e250b..dfa5adb743 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 @@ -206,7 +181,6 @@ <menu_item_separator /> <menu_item_call label="Widget Test" - layout="topleft" name="Widget Test" shortcut="control|shift|T"> <menu_item_call.on_click @@ -228,10 +202,18 @@ <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 +221,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/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/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> |