diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2011-03-28 13:15:49 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2011-03-28 13:15:49 -0700 |
commit | ae086d95fa7545d3acc358e7d3e7485dc29aa066 (patch) | |
tree | deadfc1164de517502070c2317401bea4d05a45e /indra/newview | |
parent | 46297b954386158b183bc56a02904ca14d0c3d3a (diff) | |
parent | 835671f27809ce8e5ab17e6c299be35260239d51 (diff) |
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llchathistory.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llchatitemscontainerctrl.cpp | 13 | ||||
-rwxr-xr-x | indra/newview/llfasttimerview.cpp | 74 | ||||
-rw-r--r-- | indra/newview/llfasttimerview.h | 2 | ||||
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 12 | ||||
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 70 | ||||
-rw-r--r-- | indra/newview/llmeshrepository.h | 6 | ||||
-rw-r--r-- | indra/newview/llnearbychathandler.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewerchat.cpp | 42 | ||||
-rw-r--r-- | indra/newview/llviewerchat.h | 4 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_preview.xml | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_attachment_self.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_avatar_self.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 16 |
16 files changed, 130 insertions, 142 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index d4ec377e03..c0c9ea1451 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -793,21 +793,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull()) { // for object IMs, create a secondlife:///app/objectim SLapp - std::string url = LLSLURL("objectim", chat.mFromID, "").getSLURLString(); - url += "?name=" + chat.mFromName; - url += "&owner=" + chat.mOwnerID.asString(); - - std::string slurl = args["slurl"].asString(); - if (slurl.empty()) - { - LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); - if(region) - { - LLSLURL region_slurl(region->getName(), chat.mPosAgent); - slurl = region_slurl.getLocationString(); - } - } - url += "&slurl=" + LLURI::escape(slurl); + std::string url = LLViewerChat::getSenderSLURL(chat, args); // set the link for the object name to be the objectim SLapp // (don't let object names with hyperlinks override our objectim Url) diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 899e0431e7..8584885bc9 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -213,17 +213,6 @@ void LLNearbyChatToastPanel::init(LLSD& notification) { LLStyle::Params style_params_name; - std::string href; - - if (mSourceType == CHAT_SOURCE_AGENT) - { - href = LLSLURL("agent", mFromID, "about").getSLURLString(); - } - else - { - href = LLSLURL("object", mFromID, "inspect").getSLURLString(); - } - LLColor4 user_name_color = LLUIColorTable::instance().getColor("HTMLLinkColor"); style_params_name.color(user_name_color); @@ -232,7 +221,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification) style_params_name.font.name(font_name); style_params_name.font.size(font_style_size); - style_params_name.link_href = href; + style_params_name.link_href = notification["sender_slurl"].asString(); style_params_name.is_link = true; msg_text->appendText(str_sender, FALSE, style_params_name); diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 2bafb9a4a7..6e78ea6bbe 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -1538,36 +1538,6 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target os.close(); } -//------------------------- -//static -LLSD LLFastTimerView::analyzeMetricPerformanceLog(std::istream& is) -{ - LLSD ret; - LLSD cur; - - while (!is.eof() && LLSDSerialize::fromXML(cur, is)) - { - for (LLSD::map_iterator iter = cur.beginMap(); iter != cur.endMap(); ++iter) - { - std::string label = iter->first; - - LLMetricPerformanceTesterBasic* tester = LLMetricPerformanceTesterBasic::getTester(iter->second["Name"].asString()) ; - if(tester) - { - ret[label]["Name"] = iter->second["Name"] ; - - S32 num_of_metrics = tester->getNumberOfMetrics() ; - for(S32 index = 0 ; index < num_of_metrics ; index++) - { - ret[label][ tester->getMetricName(index) ] = iter->second[ tester->getMetricName(index) ] ; - } - } - } - } - - return ret; -} - //static void LLFastTimerView::outputAllMetrics() { @@ -1583,48 +1553,6 @@ void LLFastTimerView::outputAllMetrics() } //static -void LLFastTimerView::doAnalysisMetrics(std::string baseline, std::string target, std::string output) -{ - if(!LLMetricPerformanceTesterBasic::hasMetricPerformanceTesters()) - { - return ; - } - - // Open baseline and current target, exit if one is inexistent - std::ifstream base_is(baseline.c_str()); - std::ifstream target_is(target.c_str()); - if (!base_is.is_open() || !target_is.is_open()) - { - llwarns << "'-analyzeperformance' error : baseline or current target file inexistent" << llendl; - base_is.close(); - target_is.close(); - return; - } - - //analyze baseline - LLSD base = analyzeMetricPerformanceLog(base_is); - base_is.close(); - - //analyze current - LLSD current = analyzeMetricPerformanceLog(target_is); - target_is.close(); - - //output comparision - std::ofstream os(output.c_str()); - - os << "Label, Metric, Base(B), Target(T), Diff(T-B), Percentage(100*T/B)\n"; - for(LLMetricPerformanceTesterBasic::name_tester_map_t::iterator iter = LLMetricPerformanceTesterBasic::sTesterMap.begin() ; - iter != LLMetricPerformanceTesterBasic::sTesterMap.end() ; ++iter) - { - LLMetricPerformanceTesterBasic* tester = ((LLMetricPerformanceTesterBasic*)iter->second) ; - tester->analyzePerformance(&os, &base, ¤t) ; - } - - os.flush(); - os.close(); -} - -//static void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::string output) { if(LLFastTimer::sLog) @@ -1635,7 +1563,7 @@ void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std:: if(LLFastTimer::sMetricLog) { - doAnalysisMetrics(baseline, target, output) ; + LLMetricPerformanceTesterBasic::doAnalysisMetrics(baseline, target, output) ; return ; } } diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index c409445d86..ea8251191b 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -42,8 +42,6 @@ public: private: static void doAnalysisDefault(std::string baseline, std::string target, std::string output) ; - static void doAnalysisMetrics(std::string baseline, std::string target, std::string output) ; - static LLSD analyzeMetricPerformanceLog(std::istream& is) ; static LLSD analyzePerformanceLogDefault(std::istream& is) ; static void exportCharts(const std::string& base, const std::string& target); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index e6ff25bcff..d7a285c666 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -322,8 +322,6 @@ BOOL LLFloaterModelPreview::postBuild() childDisable("upload_skin"); childDisable("upload_joints"); - childDisable("pelvis_offset"); - childDisable("ok_btn"); mViewOptionMenuButton = getChild<LLMenuButton>("options_gear_btn"); @@ -2493,12 +2491,12 @@ U32 LLModelPreview::calcResourceCost() U32 num_hulls = 0; F32 debug_scale = mFMP ? mFMP->childGetValue("import_scale").asReal() : 1.f; - mPelvisZOffset = mFMP ? mFMP->childGetValue("pelvis_offset").asReal() : 8.0f; + mPelvisZOffset = mFMP ? mFMP->childGetValue("pelvis_offset").asReal() : 3.0f; - //if ( mFMP && mFMP->childGetValue("upload_joints").asBoolean() )
- //{
- // gAgentAvatarp->setPelvisOffset( mPelvisZOffset );
- //}
+ if ( mFMP && mFMP->childGetValue("upload_joints").asBoolean() ) + { + gAgentAvatarp->setPelvisOffset( mPelvisZOffset ); + } F32 streaming_cost = 0.f; F32 physics_cost = 0.f; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 60cbdcc98b..a2792bcdc6 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -28,7 +28,7 @@ #include "apr_pools.h" #include "apr_dso.h" - +#include "llhttpstatuscodes.h" #include "llmeshrepository.h" #include "llagent.h" @@ -291,17 +291,21 @@ public: } else { - llwarns << status << ": " << reason << llendl; - llwarns << "Retrying. (" << ++mData.mRetries << ")" << llendl; + llwarns << status << ": " << reason << llendl; - if (status == 499) + if (status == HTTP_INTERNAL_ERROR) { + llwarns << "Retrying. (" << ++mData.mRetries << ")" << llendl; mThread->uploadModel(mData); } - else if (status == 400) + else if (status == HTTP_BAD_REQUEST) { llwarns << "Status 400 received from server, giving up." << llendl; } + else if (status == HTTP_NOT_FOUND) + { + llwarns <<"Status 404 received, server is disconnected, giving up." << llendl ; + } else { llerrs << "Unhandled status " << status << llendl; @@ -1381,7 +1385,8 @@ bool LLMeshRepoThread::physicsShapeReceived(const LLUUID& mesh_id, U8* data, S32 LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data, LLVector3& scale, bool upload_textures, bool upload_skin, bool upload_joints) -: LLThread("mesh upload") +: LLThread("mesh upload"), + mDiscarded(FALSE) { mInstanceList = data; mUploadTextures = upload_textures; @@ -1475,8 +1480,26 @@ void LLMeshUploadThread::preStart() } } +void LLMeshUploadThread::discard() +{ + LLMutexLock lock(mMutex) ; + mDiscarded = TRUE ; +} + +BOOL LLMeshUploadThread::isDiscarded() +{ + LLMutexLock lock(mMutex) ; + return mDiscarded ; +} + void LLMeshUploadThread::run() { + if(isDiscarded()) + { + mFinished = true; + return ; + } + mCurlRequest = new LLCurlRequest(); std::set<LLViewerTexture* > textures; @@ -1605,7 +1628,7 @@ void LLMeshUploadThread::run() tcount = llmin(count+PUSH_PER_PROCESS, 100); - while (!mInstanceQ.empty() && count < tcount) + while (!mInstanceQ.empty() && count < tcount && !isDiscarded()) { //create any objects waiting for upload count++; object_asset["objects"].append(createObject(mInstanceQ.front())); @@ -1614,7 +1637,7 @@ void LLMeshUploadThread::run() mCurlRequest->process(); - done = mInstanceQ.empty() && mConfirmedQ.empty() && mUploadQ.empty(); + done = isDiscarded() || (mInstanceQ.empty() && mConfirmedQ.empty() && mUploadQ.empty()); } while (!done || mCurlRequest->getQueued() > 0); @@ -1629,7 +1652,10 @@ void LLMeshUploadThread::run() object_asset["permissions"] = object_asset["objects"][0]["permissions"]; } - LLHTTPClient::post(url, object_asset, new LLHTTPClient::Responder()); + if(!isDiscarded()) + { + LLHTTPClient::post(url, object_asset, new LLHTTPClient::Responder()); + } mFinished = true; } @@ -2132,6 +2158,12 @@ void LLMeshRepository::shutdown() { llinfos << "Shutting down mesh repository." << llendl; + for (U32 i = 0; i < mUploads.size(); ++i) + { + llinfos << "Discard the pending mesh uploads " << llendl; + mUploads[i]->discard() ; //discard the uploading requests. + } + mThread->mSignal->signal(); while (!mThread->isStopped()) @@ -2750,6 +2782,11 @@ S32 LLMeshRepository::getMeshSize(const LLUUID& mesh_id, S32 lod) void LLMeshUploadThread::sendCostRequest(LLMeshUploadData& data) { + if(isDiscarded()) + { + return ; + } + //write model file to memory buffer std::stringstream ostr; @@ -2808,6 +2845,11 @@ void LLMeshUploadThread::sendCostRequest(LLMeshUploadData& data) void LLMeshUploadThread::sendCostRequest(LLTextureUploadData& data) { + if(isDiscarded()) + { + return ; + } + if (data.mTexture && data.mTexture->getDiscardLevel() >= 0) { LLSD asset_resources = LLSD::emptyMap(); @@ -2840,6 +2882,11 @@ void LLMeshUploadThread::sendCostRequest(LLTextureUploadData& data) void LLMeshUploadThread::doUploadModel(LLMeshUploadData& data) { + if(isDiscarded()) + { + return ; + } + if (!data.mRSVP.empty()) { std::stringstream ostr; @@ -2872,6 +2919,11 @@ void LLMeshUploadThread::doUploadModel(LLMeshUploadData& data) void LLMeshUploadThread::doUploadTexture(LLTextureUploadData& data) { + if(isDiscarded()) + { + return ; + } + if (!data.mRSVP.empty()) { std::stringstream ostr; diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index f0c0f308d5..4e349a1270 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -405,11 +405,12 @@ public: S32 mPendingConfirmations; S32 mPendingUploads; S32 mPendingCost; - bool mFinished; LLVector3 mOrigin; + bool mFinished; bool mUploadTextures; bool mUploadSkin; bool mUploadJoints; + BOOL mDiscarded ; LLHost mHost; std::string mUploadObjectAssetCapability; @@ -445,7 +446,8 @@ public: bool finished() { return mFinished; } virtual void run(); void preStart(); - + void discard() ; + BOOL isDiscarded(); }; class LLMeshRepository diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index de5439e4e0..0d9daeb44e 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -558,6 +558,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) } */ + // Add a nearby chat toast. LLUUID id; id.generate(); @@ -583,6 +584,10 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) notification["text_color"] = r_color_name; notification["color_alpha"] = r_color_alpha; notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ; + + // Pass sender info so that it can be rendered properly (STORM-1021). + notification["sender_slurl"] = LLViewerChat::getSenderSLURL(chat_msg, args); + channel->addNotification(notification); } diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp index 0af850a46b..286b16bab2 100644 --- a/indra/newview/llviewerchat.cpp +++ b/indra/newview/llviewerchat.cpp @@ -31,6 +31,8 @@ #include "llagent.h" // gAgent #include "lluicolortable.h" #include "llviewercontrol.h" // gSavedSettings +#include "llviewerregion.h" +#include "llworld.h" #include "llinstantmessage.h" //SYSTEM_FROM // LLViewerChat @@ -214,3 +216,43 @@ void LLViewerChat::formatChatMsg(const LLChat& chat, std::string& formated_msg) } +//static +std::string LLViewerChat::getSenderSLURL(const LLChat& chat, const LLSD& args) +{ + switch (chat.mSourceType) + { + case CHAT_SOURCE_AGENT: + return LLSLURL("agent", chat.mFromID, "about").getSLURLString(); + + case CHAT_SOURCE_OBJECT: + return getObjectImSLURL(chat, args); + + default: + llwarns << "Getting SLURL for an unsupported sender type: " << chat.mSourceType << llendl; + } + + return LLStringUtil::null; +} + +//static +std::string LLViewerChat::getObjectImSLURL(const LLChat& chat, const LLSD& args) +{ + std::string url = LLSLURL("objectim", chat.mFromID, "").getSLURLString(); + url += "?name=" + chat.mFromName; + url += "&owner=" + chat.mOwnerID.asString(); + + std::string slurl = args["slurl"].asString(); + if (slurl.empty()) + { + LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); + if(region) + { + LLSLURL region_slurl(region->getName(), chat.mPosAgent); + slurl = region_slurl.getLocationString(); + } + } + + url += "&slurl=" + LLURI::escape(slurl); + + return url; +} diff --git a/indra/newview/llviewerchat.h b/indra/newview/llviewerchat.h index a9f9a98960..0f15d29f04 100644 --- a/indra/newview/llviewerchat.h +++ b/indra/newview/llviewerchat.h @@ -40,6 +40,10 @@ public: static LLFontGL* getChatFont(); static S32 getChatFontSize(); static void formatChatMsg(const LLChat& chat, std::string& formated_msg); + static std::string getSenderSLURL(const LLChat& chat, const LLSD& args); + +private: + static std::string getObjectImSLURL(const LLChat& chat, const LLSD& args); }; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 43d8b9d356..98e5e4c6de 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3941,7 +3941,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if ( bindCnt > 0 )
{
const int jointCnt = pSkinData->mJointNames.size();
- const int pelvisZOffset = pSkinData->mPelvisOffset;
+ const F32 pelvisZOffset = pSkinData->mPelvisOffset;
bool fullRig = (jointCnt>=20) ? true : false;
if ( fullRig )
{
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index 5a726d1821..0053be4f67 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -390,10 +390,10 @@ <check_box top_pad="5" left="20" name="upload_joints" height="15" follows="top|left" label="Joint positions"/> <text left="10" top_pad="4" width="90" bottom="30" follows="top|left" height="15"> - Pelvis Offset: + Pelvis Z Offset: </text> - <spinner left="10" top_pad="4" height="20" follows="top|left" width="80" value="0.0" min_val="0.00" max_val="8.0" name="pelvis_offset"/> + <spinner left="10" top_pad="4" height="20" follows="top|left" width="80" value="0.0" min_val="-3.00" max_val="3.0" name="pelvis_offset"/> </panel> </tab_container> diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index 84e81397be..b8128da358 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -68,7 +68,7 @@ name="Stand Up"> function="Self.EnableStandUp" /> </menu_item_call> <menu_item_call - label="Change Outfit" + label="My Appearance" name="Change Outfit"> <menu_item_call.on_click function="CustomizeAvatar" /> diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml index 2afa29ec10..d727294cc8 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -193,7 +193,7 @@ </menu_item_call> </context_menu> <menu_item_call - label="Change Outfit" + label="My Appearance" layout="topleft" name="Chenge Outfit"> <menu_item_call.on_click diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ea40a08c95..8c783ae218 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -41,7 +41,7 @@ parameter="agent" /> </menu_item_call> <menu_item_call - label="Change Outfit" + label="My Appearance" name="ChangeOutfit"> <menu_item_call.on_click function="CustomizeAvatar" /> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f703acaa66..d9d3fab6d4 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -821,22 +821,6 @@ You need to enter either the Username or both the First and Last name of your av <notification icon="alertmodal.tga" - name="AddClassified" - type="alertmodal"> -Classified ads appear in the 'Classified' section of the Search directory and on [http://secondlife.com/community/classifieds secondlife.com] for one week. -Fill out your ad, then click 'Publish...' to add it to the directory. -You'll be asked for a price to pay when clicking Publish. -Paying more makes your ad appear higher in the list, and also appear higher when people search for keywords. - <tag>confirm</tag> - <usetemplate - ignoretext="How to create a new Classified ad" - name="okcancelignore" - notext="Cancel" - yestext="OK"/> - </notification> - - <notification - icon="alertmodal.tga" name="DeleteClassified" type="alertmodal"> Delete classified '[NAME]'? |