From 427191118e65605e03a5369bdebf2c998e54f851 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Mon, 19 Jan 2015 17:52:06 +0200 Subject: MAINT-4169 ShowGreyQueryInUrls debug setting was removed and the grey part of the link always appears. --- indra/newview/app_settings/settings.xml | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 269b357b80..9f3fc26c90 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15607,17 +15607,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>ShowGreyQueryInUrls</key> - <map> - <key>Comment</key> - <string>Enable(disable) appearance of port, query and fragment parts of url for HTTP and HTTPNoProtocol entries in grey.</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> </map> </llsd> -- cgit v1.2.3 From be5670b5fff0b6c631e31279e085599e663db804 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Mon, 19 Jan 2015 16:20:37 +0200 Subject: MAINT-1977 FIXED 'Open' menu item doesn't work for notecard (with 'anyone can copy' permission) in object's content --- indra/newview/llpanelobjectinventory.cpp | 8 +++++++- indra/newview/llpreview.cpp | 20 ++++++++++++++++++-- indra/newview/llpreview.h | 6 +++++- indra/newview/llpreviewnotecard.cpp | 7 ++----- 4 files changed, 32 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 5fd575ee8b..8b927a0c6b 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1167,7 +1167,13 @@ void LLTaskNotecardBridge::openItem() { return; } - if(object->permModify() || gAgent.isGodlike()) + + // Note: even if we are not allowed to modify copyable notecard, we should be able to view it + LLInventoryItem *item = dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID)); + BOOL item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); + if( item_copy + || object->permModify() + || gAgent.isGodlike()) { LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(mUUID), TAKE_FOCUS_YES); if (preview) diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index bf2652cb49..fb21b980dc 100755 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -49,6 +49,7 @@ #include "llviewerinventory.h" #include "llviewerwindow.h" #include "lltrans.h" +#include "roles_constants.h" // Constants @@ -230,8 +231,23 @@ void LLPreview::refreshFromItem() } getChild<LLUICtrl>("desc")->setValue(item->getDescription()); - BOOL can_agent_manipulate = item->getPermissions().allowModifyBy(gAgent.getID()); - getChildView("desc")->setEnabled(can_agent_manipulate); + getChildView("desc")->setEnabled(canModify(mObjectUUID, item)); +} + +// static +BOOL LLPreview::canModify(const LLUUID taskUUID, const LLInventoryItem* item) +{ + if (taskUUID.notNull()) + { + LLViewerObject* object = gObjectList.findObject(taskUUID); + if(object && !object->permModify()) + { + // No permission to edit in-world inventory + return FALSE; + } + } + + return item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE); } // static diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h index 759430c3a5..49c114720b 100755 --- a/indra/newview/llpreview.h +++ b/indra/newview/llpreview.h @@ -105,7 +105,11 @@ public: // llview /*virtual*/ void draw(); void refreshFromItem(); - + + // We can't modify Item or description in preview if either in-world Object + // or Item itself is unmodifiable + static BOOL canModify(const LLUUID taskUUID, const LLInventoryItem* item); + protected: virtual void onCommit(); diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 1308d1e9a7..9f88b0db5f 100755 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -218,7 +218,7 @@ void LLPreviewNotecard::loadAsset() LLPermissions perm(item->getPermissions()); BOOL is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE); BOOL allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); - BOOL allow_modify = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE); + BOOL allow_modify = canModify(mObjectUUID, item); if (allow_copy || gAgent.isGodlike()) { @@ -338,10 +338,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, } previewEditor->makePristine(); - - const LLInventoryItem* item = preview->getItem(); - BOOL modifiable = item && gAgent.allowOperation(PERM_MODIFY, - item->getPermissions(), GP_OBJECT_MANIPULATE); + BOOL modifiable = preview->canModify(preview->mObjectID, preview->getItem()); preview->setEnabled(modifiable); preview->mAssetStatus = PREVIEW_ASSET_LOADED; } -- cgit v1.2.3 From 65b8b0899dea510ba14378811972e0712b3869c3 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Thu, 22 Jan 2015 12:59:00 +0200 Subject: MAINT-4800 FIXED Grid labels in combobox could be localized now. Combobox is wider and separator (empty line) was removed. --- indra/newview/llpanellogin.cpp | 1 - indra/newview/llviewernetwork.cpp | 4 ++-- indra/newview/skins/default/xui/en/panel_login.xml | 8 +++---- indra/newview/skins/default/xui/en/strings.xml | 5 ++++- indra/newview/tests/llslurl_test.cpp | 16 +++++++++++++- indra/newview/tests/llviewernetwork_test.cpp | 25 ++++++++++++++++++++++ 6 files changed, 50 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 34f3bbf73e..921757ded7 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -237,7 +237,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, } } server_choice_combo->sortByName(); - server_choice_combo->addSeparator(ADD_TOP); LL_DEBUGS("AppInit")<<"adding current "<<current_grid<<LL_ENDL; server_choice_combo->add(LLGridManager::getInstance()->getGridLabel(), current_grid, diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index faa58d423f..6666aecca2 100755 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -119,14 +119,14 @@ void LLGridManager::initialize(const std::string& grid_file) mGridFile = grid_file; // as we don't want an attacker to override our grid list // to point the default grid to an invalid grid - addSystemGrid("Second Life Main Grid (Agni)", + addSystemGrid(LLTrans::getString("AgniGridLabel"), MAINGRID, MAIN_GRID_LOGIN_URI, "https://secondlife.com/helpers/", DEFAULT_LOGIN_PAGE, SL_UPDATE_QUERY_URL, "Agni"); - addSystemGrid("Second Life Beta Test Grid (Aditi)", + addSystemGrid(LLTrans::getString("AditiGridLabel"), "util.aditi.lindenlab.com", "https://login.aditi.lindenlab.com/cgi-bin/login.cgi", "http://aditi-secondlife.webdev.lindenlab.com/helpers/", diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index a258a874b0..a1e0f981dd 100755 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -119,7 +119,7 @@ name="At_My_Last_Location_Label" left_pad="8" bottom_delta="1" - width="120"> + width="110"> at last location </text> <combo_box @@ -157,7 +157,7 @@ follows="left|top" width="170" height="26" - left_pad="40" + left_pad="30" text_pad_left="8" name="location_edit" label="Type a location" @@ -186,12 +186,12 @@ height="26" max_chars="128" label="Select grid" - left_pad="40" + left_pad="30" bottom_delta="0" layout="topleft" top_pad="2" name="server_combo" - width="128" /> + width="148" /> </layout_panel> <layout_panel height="172" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index f77678e5f8..3a8121cc82 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -96,7 +96,10 @@ Voice Server Version: [VOICE_VERSION] <string name="LoginFailed">Login failed.</string> <string name="Quit">Quit</string> <string name="create_account_url">http://join.secondlife.com/?sourceid=[sourceid]</string> - + + <string name="AgniGridLabel">Second Life Main Grid (Agni)</string> + <string name="AditiGridLabel">Second Life Beta Test Grid (Aditi)</string> + <string name="ViewerDownloadURL">http://secondlife.com/download</string> <string name="LoginFailedViewerNotPermitted"> The viewer you are using can no longer access Second Life. Please visit the following page to download a new viewer: diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index 2bc0d5a086..4694f657b6 100755 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -39,7 +39,21 @@ namespace static const char * const TEST_FILENAME("llslurl_test.xml"); } - + +// +// Stub implementation for LLTrans +// +class LLTrans +{ +public: + static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args); +}; + +std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) +{ + return std::string(); +} + //---------------------------------------------------------------------------- // Mock objects for the dependencies of the code we're testing diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp index 0eb0ab6500..e68da14fe9 100755 --- a/indra/newview/tests/llviewernetwork_test.cpp +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -38,6 +38,31 @@ namespace static const char * const TEST_FILENAME("llviewernetwork_test.xml"); } + +// +// Stub implementation for LLTrans +// +class LLTrans +{ +public: + static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args); +}; + +std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) +{ + std::string grid_label = std::string(); + if(xml_desc == "AgniGridLabel") + { + grid_label = "Second Life Main Grid (Agni)"; + } + else if(xml_desc == "AditiGridLabel") + { + grid_label = "Second Life Beta Test Grid (Aditi)"; + } + + return grid_label; +} + //---------------------------------------------------------------------------- // Mock objects for the dependencies of the code we're testing -- cgit v1.2.3 From 00f53244c8dacfb65def11445823761917bf25bc Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Wed, 7 Jan 2015 02:04:03 +0200 Subject: MAINT-4773 FIXED Some transparent textures are rendered as white. This bug fix related also to MAINT-4092. In 4092 sometimes when we don't have information about the texture during the setup the materail (LLVOVolume::setTEMaterialParams()), we should substitute the material with disabled "diffuse alpha mode" (for detail in cases see MAINT-4092 JIRA ticket comment). This bug fix cover the case when after the loading texture we have all information about alpha mode, and in this case we should restore diffuse alpha mode if need. In short: now we always believe that information about the material is valid (LLVOVolume::setTEMaterialParams()). Of course before setup it we check information about texture (if it possible) , if texture is not exist in database or not 32 bit depth (for diffuse) we made changes. But in all other cases (if we can't receive information about texture) we remeber this case in mWaitingTextureInfo multimap. When information about texture will be available we get it in: LLVOVolume::notify AboutCreatingTexture() or Volume::notifyAboutMissingAsset() and again, we recheck it and if need change (substitute) the material parameters. I suppose that this solution is better than was before. If this patch will be accepted , I think that MAINT-4092 should be rechecked again. --- indra/newview/llface.cpp | 42 ++++++-- indra/newview/llface.h | 7 +- indra/newview/llviewertexture.cpp | 37 ++++++- indra/newview/llviewertexture.h | 11 +- indra/newview/llvovolume.cpp | 220 ++++++++++++++++++++++++++++++++++++-- indra/newview/llvovolume.h | 26 ++++- 6 files changed, 313 insertions(+), 30 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index dc74f4a6ef..de349a03d4 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -330,24 +330,52 @@ void LLFace::dirtyTexture() { vobj->mLODChanged = TRUE; - LLVOAvatar* avatar = vobj->getAvatar(); - if (avatar) - { //avatar render cost may have changed - avatar->updateVisualComplexity(); - } + LLVOAvatar* avatar = vobj->getAvatar(); + if (avatar) + { //avatar render cost may have changed + avatar->updateVisualComplexity(); + } } gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE); } } } - + gPipeline.markTextured(drawablep); } +void LLFace::notifyAboutCreatingTexture(LLViewerTexture *texture) +{ + LLDrawable* drawablep = getDrawable(); + if(mVObjp.notNull() && mVObjp->getVolume()) + { + LLVOVolume *vobj = drawablep->getVOVolume(); + if(vobj && vobj->notifyAboutCreatingTexture(texture)) + { + gPipeline.markTextured(drawablep); + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME); + } + } +} + +void LLFace::notifyAboutMissingAsset(LLViewerTexture *texture) +{ + LLDrawable* drawablep = getDrawable(); + if(mVObjp.notNull() && mVObjp->getVolume()) + { + LLVOVolume *vobj = drawablep->getVOVolume(); + if(vobj && vobj->notifyAboutMissingAsset(texture)) + { + gPipeline.markTextured(drawablep); + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME); + } + } +} + void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); - + if(mTexture[ch] == new_texture) { return ; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index d3a561facc..ee545acb94 100755 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -218,7 +218,7 @@ public: void setHasMedia(bool has_media) { mHasMedia = has_media ;} BOOL hasMedia() const ; - BOOL switchTexture() ; + BOOL switchTexture() ; //vertex buffer tracking void setVertexBuffer(LLVertexBuffer* buffer); @@ -230,10 +230,13 @@ public: static U32 getRiggedDataMask(U32 type); + void notifyAboutCreatingTexture(LLViewerTexture *texture); + void notifyAboutMissingAsset(LLViewerTexture *texture); + public: //aligned members LLVector4a mExtents[2]; -private: +private: F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius ); BOOL calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ; public: diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 4e2eef39d6..e684be4361 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -655,12 +655,36 @@ S8 LLViewerTexture::getType() const void LLViewerTexture::cleanup() { + notifyAboutMissingAsset(); + mFaceList[LLRender::DIFFUSE_MAP].clear(); mFaceList[LLRender::NORMAL_MAP].clear(); mFaceList[LLRender::SPECULAR_MAP].clear(); mVolumeList.clear(); } +void LLViewerTexture::notifyAboutCreatingTexture() +{ + for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) + { + for(U32 f = 0; f < mNumFaces[ch]; f++) + { + mFaceList[ch][f]->notifyAboutCreatingTexture(this); + } + } +} + +void LLViewerTexture::notifyAboutMissingAsset() +{ + for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) + { + for(U32 f = 0; f < mNumFaces[ch]; f++) + { + mFaceList[ch][f]->notifyAboutMissingAsset(this); + } + } +} + // virtual void LLViewerTexture::dump() { @@ -1281,7 +1305,7 @@ void LLViewerFetchedTexture::addToCreateTexture() llassert(mNumFaces[j] <= mFaceList[j].size()); for(U32 i = 0; i < mNumFaces[j]; i++) - { + { mFaceList[j][i]->dirtyTexture(); } } @@ -1431,9 +1455,11 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) destroyRawImage(); return FALSE; } - - res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel); - + + res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel); + + notifyAboutCreatingTexture(); + setActive(); if (!needsToSaveRawImage()) @@ -1441,6 +1467,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) mNeedsAux = FALSE; destroyRawImage(); } + return res; } @@ -2132,6 +2159,8 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing) } if (is_missing) { + notifyAboutMissingAsset(); + if (mUrl.empty()) { LL_WARNS() << mID << ": Marking image as missing" << LL_ENDL; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 05912404e4..aed7e94945 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -169,9 +169,13 @@ public: /*virtual*/ void updateBindStatsForTester() ; protected: void cleanup() ; - void init(bool firstinit) ; + void init(bool firstinit) ; void reorganizeFaceList() ; void reorganizeVolumeList() ; + + void notifyAboutMissingAsset(); + void notifyAboutCreatingTexture(); + private: friend class LLBumpImageList; friend class LLUIImageList; @@ -307,10 +311,11 @@ public: void addToCreateTexture(); + // ONLY call from LLViewerTextureList BOOL createTexture(S32 usename = 0); - void destroyTexture() ; - + void destroyTexture() ; + virtual void processTextureStats() ; F32 calcDecodePriority() ; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b49543c158..b483ec283c 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2040,27 +2040,225 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) return res; } +bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture) +{ //Ok, here we have confirmation about texture creation, check our wait-list + //and make changes, or return false + + std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID()); + + typedef std::map<U8, LLMaterialPtr> map_te_material; + map_te_material new_material; + + for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it) + { + LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te); + + //here we just interesting in DIFFUSE_MAP only! + if(LLRender::DIFFUSE_MAP == range_it->second.map && GL_RGBA != texture->getPrimaryFormat()) + { //ok let's check the diffuse mode + switch(cur_material->getDiffuseAlphaMode()) + { + case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND: + case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE: + case LLMaterial::DIFFUSE_ALPHA_MODE_MASK: + { //uups... we have non 32 bit texture with LLMaterial::DIFFUSE_ALPHA_MODE_* => LLMaterial::DIFFUSE_ALPHA_MODE_NONE + + LLMaterialPtr mat = NULL; + map_te_material::iterator it = new_material.find(range_it->second.te); + if(new_material.end() == it) { + mat = new LLMaterial(cur_material->asLLSD()); + new_material.insert(map_te_material::value_type(range_it->second.te, mat)); + } else { + mat = it->second; + } + + mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE); + + } break; + } //switch + } //if + } //for + + //setup new materials + for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it) + { + LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second); + LLViewerObject::setTEMaterialParams(it->first, it->second); + } + + //clear wait-list + mWaitingTextureInfo.erase(range.first, range.second); + + return 0 != new_material.size(); +} + +bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture) +{ //Ok, here if we wait information about texture and it's missing + //then depending from the texture map (diffuse, normal, or specular) + //make changes in material and confirm it. If not return false. + std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID()); + if(range.first == range.second) return false; + + typedef std::map<U8, LLMaterialPtr> map_te_material; + map_te_material new_material; + + for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it) + { + LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te); + + switch(range_it->second.map) + { + case LLRender::DIFFUSE_MAP: + { + if(LLMaterial::DIFFUSE_ALPHA_MODE_NONE != cur_material->getDiffuseAlphaMode()) + { //missing texture + !LLMaterial::DIFFUSE_ALPHA_MODE_NONE => LLMaterial::DIFFUSE_ALPHA_MODE_NONE + LLMaterialPtr mat = NULL; + map_te_material::iterator it = new_material.find(range_it->second.te); + if(new_material.end() == it) { + mat = new LLMaterial(cur_material->asLLSD()); + new_material.insert(map_te_material::value_type(range_it->second.te, mat)); + } else { + mat = it->second; + } + + mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE); + } + } break; + case LLRender::NORMAL_MAP: + { //missing texture => reset material texture id + LLMaterialPtr mat = NULL; + map_te_material::iterator it = new_material.find(range_it->second.te); + if(new_material.end() == it) { + mat = new LLMaterial(cur_material->asLLSD()); + new_material.insert(map_te_material::value_type(range_it->second.te, mat)); + } else { + mat = it->second; + } + + mat->setNormalID(LLUUID::null); + } break; + case LLRender::SPECULAR_MAP: + { //missing texture => reset material texture id + LLMaterialPtr mat = NULL; + map_te_material::iterator it = new_material.find(range_it->second.te); + if(new_material.end() == it) { + mat = new LLMaterial(cur_material->asLLSD()); + new_material.insert(map_te_material::value_type(range_it->second.te, mat)); + } else { + mat = it->second; + } + + mat->setSpecularID(LLUUID::null); + } break; + } //switch + } //for + + //setup new materials + for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it) + { + LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second); + LLViewerObject::setTEMaterialParams(it->first, it->second); + } + + //clear wait-list + mWaitingTextureInfo.erase(range.first, range.second); + + return 0 != new_material.size(); +} + S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams) { LLMaterialPtr pMaterial = const_cast<LLMaterialPtr&>(pMaterialParams); if(pMaterialParams) - { - LLViewerTexture* image = getTEImage(te); - LLGLenum image_format = image ? image->getPrimaryFormat() : GL_RGB; - LLMaterialPtr current_material = getTEMaterialParams(te); + { //check all of them according to material settings + + LLViewerTexture *img_diffuse = getTEImage(te); + LLViewerTexture *img_normal = getTENormalMap(te); + LLViewerTexture *img_specular = getTESpecularMap(te); + + llassert(NULL != img_diffuse); + + LLMaterialPtr new_material = NULL; + + //diffuse + if(NULL != img_diffuse) + { //guard + if(0 == img_diffuse->getPrimaryFormat() && !img_diffuse->isMissingAsset()) + { //ok here we don't have information about texture, let's belief and leave material settings + //but we remember this case + mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(img_diffuse->getID(), material_info(LLRender::DIFFUSE_MAP, te))); + } + else + { + bool bSetDiffuseNone = false; + if(img_diffuse->isMissingAsset()) + { + bSetDiffuseNone = true; + } + else + { + switch(pMaterialParams->getDiffuseAlphaMode()) + { + case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND: + case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE: + case LLMaterial::DIFFUSE_ALPHA_MODE_MASK: + { //all of them modes available only for 32 bit textures + if(GL_RGBA != img_diffuse->getPrimaryFormat()) + { + bSetDiffuseNone = true; + } + } break; + } + } //else - U8 new_diffuse_alpha_mode = pMaterialParams->getDiffuseAlphaMode(); - if(new_diffuse_alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) + if(bSetDiffuseNone) + { //upps... we should substitute this material with LLMaterial::DIFFUSE_ALPHA_MODE_NONE + new_material = new LLMaterial(pMaterialParams->asLLSD()); + new_material->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE); + } + } + } + + //normal + if(LLUUID::null != pMaterialParams->getNormalID()) { - new_diffuse_alpha_mode = (GL_RGB == image_format || 0 == image_format ? LLMaterial::DIFFUSE_ALPHA_MODE_NONE : new_diffuse_alpha_mode); + if(img_normal && img_normal->isMissingAsset() && img_normal->getID() == pMaterialParams->getNormalID()) + { + if(!new_material) { + new_material = new LLMaterial(pMaterialParams->asLLSD()); + } + new_material->setNormalID(LLUUID::null); + } + else if(NULL == img_normal || 0 == img_normal->getPrimaryFormat()) + { //ok here we don't have information about texture, let's belief and leave material settings + //but we remember this case + mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getNormalID(), material_info(LLRender::NORMAL_MAP,te))); + } + + } + + + //specular + if(LLUUID::null != pMaterialParams->getSpecularID()) + { + if(img_specular && img_specular->isMissingAsset() && img_specular->getID() == pMaterialParams->getSpecularID()) + { + if(!new_material) { + new_material = new LLMaterial(pMaterialParams->asLLSD()); + } + new_material->setSpecularID(LLUUID::null); + } + else if(NULL == img_specular || 0 == img_specular->getPrimaryFormat()) + { //ok here we don't have information about texture, let's belief and leave material settings + //but we remember this case + mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getSpecularID(), material_info(LLRender::SPECULAR_MAP, te))); + } } - if(pMaterialParams->getDiffuseAlphaMode() != new_diffuse_alpha_mode) { - //create new material - pMaterial = new LLMaterial(pMaterialParams->asLLSD()); - pMaterial->setDiffuseAlphaMode(new_diffuse_alpha_mode); + if(new_material) { + pMaterial = new_material; LLMaterialMgr::getInstance()->put(getID(),te,*pMaterial); } } diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 7503f8c5aa..bbaca316b0 100755 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -372,17 +372,37 @@ private: // statics public: - static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop + static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop static F32 sLODFactor; // LOD scale factor static F32 sDistanceFactor; // LOD distance factor - + static LLPointer<LLObjectMediaDataClient> sObjectMediaClient; static LLPointer<LLObjectMediaNavigateClient> sObjectMediaNavigateClient; protected: static S32 sNumLODChanges; - + friend class LLVolumeImplFlexible; + +public: + bool notifyAboutCreatingTexture(LLViewerTexture *texture); + bool notifyAboutMissingAsset(LLViewerTexture *texture); + +private: + struct material_info + { + LLRender::eTexIndex map; + U8 te; + + material_info(LLRender::eTexIndex map_, U8 te_) + : map(map_) + , te(te_) + {} + }; + + typedef std::multimap<LLUUID, material_info> mmap_UUID_MAP_t; + mmap_UUID_MAP_t mWaitingTextureInfo; + }; #endif // LL_LLVOVOLUME_H -- cgit v1.2.3 From 8e081ec5a2f33c0eaf3aeee7b925cbfa43996213 Mon Sep 17 00:00:00 2001 From: maksymsproductengine <maksymsproductengine@lindenlab.com> Date: Thu, 22 Jan 2015 20:57:15 +0200 Subject: MAINT-4794 FIXED Present informative dialog if mesh upload fails due to specific reason --- indra/newview/llmeshrepository.cpp | 32 +++++++++++++++++++++- .../newview/skins/default/xui/en/notifications.xml | 5 ++-- indra/newview/skins/default/xui/en/strings.xml | 16 +++++++++-- 3 files changed, 47 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 648056484e..9a0bd9d1bc 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -72,6 +72,7 @@ #include "bufferstream.h" #include "llfasttimer.h" #include "llcorehttputil.h" +#include "lltrans.h" #include "boost/lexical_cast.hpp" @@ -693,12 +694,16 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content, args["MESSAGE"] = message; args["IDENTIFIER"] = identifier; args["LABEL"] = model_name; - gMeshRepo.uploadError(args); // Log details. LL_WARNS(LOG_MESH) << "Error in stage: " << stage << ", Reason: " << status.toString() << " (" << status.toTerseString() << ")" << LL_ENDL; + + std::ostringstream details; + typedef std::set<std::string> mav_errors_set_t; + mav_errors_set_t mav_errors; + if (content.has("error")) { const LLSD& err = content["error"]; @@ -708,8 +713,11 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content, << "', message '" << err["message"].asString() << "', id '" << err["identifier"].asString() << "'" << LL_ENDL; + if (err.has("errors")) { + details << std::endl << std::endl; + S32 error_num = 0; const LLSD& err_list = err["errors"]; for (LLSD::array_const_iterator it = err_list.beginArray(); @@ -717,6 +725,13 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content, ++it) { const LLSD& err_entry = *it; + std::string message = err_entry["message"]; + + if (message.length() > 0) + { + mav_errors.insert(message); + } + LL_WARNS(LOG_MESH) << " error[" << error_num << "]:" << LL_ENDL; for (LLSD::map_const_iterator map_it = err_entry.beginMap(); map_it != err_entry.endMap(); @@ -733,6 +748,21 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content, { LL_WARNS(LOG_MESH) << "Bad response to mesh request, no additional error information available." << LL_ENDL; } + + mav_errors_set_t::iterator mav_errors_it = mav_errors.begin(); + for (; mav_errors_it != mav_errors.end(); ++mav_errors_it) + { + std::string mav_details = "Mav_Details_" + *mav_errors_it; + details << "Message: '" << *mav_errors_it << "': " << LLTrans::getString(mav_details) << std::endl << std::endl; + } + + std::string details_str = details.str(); + if (details_str.length() > 0) + { + args["DETAILS"] = details_str; + } + + gMeshRepo.uploadError(args); } LLMeshRepoThread::LLMeshRepoThread() diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 1f816dc806..4602a41d52 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7772,9 +7772,8 @@ Select residents to share with. name="MeshUploadError" icon="alert.tga" type="alert"> - [LABEL] failed to upload: [MESSAGE] [IDENTIFIER] - -See the log file for details. + [LABEL] failed to upload: [MESSAGE] [IDENTIFIER] +[DETAILS]See SecondLife.log for details </notification> <notification diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 3a8121cc82..309f108ecc 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -4049,5 +4049,17 @@ Try enclosing path to the editor with double quotes. <string name="loading_chat_logs"> Loading... </string> - - </strings> + + <string name="Mav_Details_MAV_FOUND_DEGENERATE_TRIANGLES"> + The physics shape contains triangles which are too small. Try simplifying the physics model. + </string> + + <string name="Mav_Details_MAV_CONFIRMATION_DATA_MISMATCH"> + The physics shape contains bad confirmation data. Try to correct the physics model. + </string> + + <string name="Mav_Details_MAV_UNKNOWN_VERSION"> + The physics shape does not have correct version. Set the correct version for the physics model. + </string> + +</strings> -- cgit v1.2.3 From 3b6e807d195b95b1376f36566e51d1e87dff56cd Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 23 Jan 2015 13:03:22 +0200 Subject: MAINT-4800 FIXED Offset is changed for French localization --- indra/newview/skins/default/xui/fr/panel_login.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/fr/panel_login.xml b/indra/newview/skins/default/xui/fr/panel_login.xml index b39920fe13..1cb6d3c935 100755 --- a/indra/newview/skins/default/xui/fr/panel_login.xml +++ b/indra/newview/skins/default/xui/fr/panel_login.xml @@ -19,9 +19,9 @@ <combo_box.item label="Domicile" name="MyHome"/> </combo_box> <button label="Connexion" name="connect_favorite_btn"/> - <line_editor label="Tapez un emplacement" name="location_edit"/> + <line_editor label="Tapez un emplacement" name="location_edit" left_pad="20"/> <button label="Connexion" name="connect_location_btn"/> - <combo_box label="Sélectionner la grille" name="server_combo"/> + <combo_box label="Sélectionner la grille" name="server_combo" left_pad="20"/> </layout_panel> </layout_stack> </panel> -- cgit v1.2.3 From 96af4b867ff5b09dc2a9125ff40ce4f27254a070 Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Fri, 23 Jan 2015 15:03:04 +0200 Subject: MAINT-4833 Fixed Warning treated as error --- indra/newview/llvovolume.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b483ec283c..fd2e96744a 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2150,6 +2150,9 @@ bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture) mat->setSpecularID(LLUUID::null); } break; + case LLRender::NUM_TEXTURE_CHANNELS: + //nothing to do, make compiler happy + break; } //switch } //for -- cgit v1.2.3 From 3ac017d797695e048f8f7b1fb894fcecbd10ea64 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Wed, 21 Jan 2015 19:56:02 +0200 Subject: MAINT-1722 FIXED Massive slowdown when opening "Place Profile" or "About Land" dialog --- indra/newview/llfloaterland.cpp | 40 ++++++++++++++++++++++++++--------- indra/newview/llfloaterland.h | 5 +++++ indra/newview/llpanelplaceprofile.cpp | 30 ++++++++++++++++++++------ indra/newview/llpanelplaceprofile.h | 1 + 4 files changed, 59 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 3cef7958c2..4165c7addc 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -78,6 +78,8 @@ #include "llgroupactions.h" +const F64 COVENANT_REFRESH_TIME_SEC = 60.0f; + static std::string OWNER_ONLINE = "0"; static std::string OWNER_OFFLINE = "1"; static std::string OWNER_GROUP = "2"; @@ -2883,14 +2885,23 @@ void LLPanelLandAccess::onClickRemoveBanned(void* data) //--------------------------------------------------------------------------- LLPanelLandCovenant::LLPanelLandCovenant(LLParcelSelectionHandle& parcel) : LLPanel(), - mParcel(parcel) -{ + mParcel(parcel), + mNextUpdateTime(0) +{ } LLPanelLandCovenant::~LLPanelLandCovenant() { } +BOOL LLPanelLandCovenant::postBuild() +{ + mLastRegionID = LLUUID::null; + mNextUpdateTime = 0; + + return TRUE; +} + // virtual void LLPanelLandCovenant::refresh() { @@ -2937,14 +2948,23 @@ void LLPanelLandCovenant::refresh() changeable_clause->setText(getString("can_not_change")); } } - - // send EstateCovenantInfo message - LLMessageSystem *msg = gMessageSystem; - msg->newMessage("EstateCovenantRequest"); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); - msg->sendReliable(region->getHost()); + + if (mLastRegionID != region->getRegionID() + || mNextUpdateTime < LLTimer::getElapsedSeconds()) + { + // Request Covenant Info + // Note: LLPanelLandCovenant doesn't change Covenant's content and any + // changes made by Estate floater should be requested by Estate floater + LLMessageSystem *msg = gMessageSystem; + msg->newMessage("EstateCovenantRequest"); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); + msg->sendReliable(region->getHost()); + + mLastRegionID = region->getRegionID(); + mNextUpdateTime = LLTimer::getElapsedSeconds() + COVENANT_REFRESH_TIME_SEC; + } } // static diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index 1d9bd33720..92439b69a0 100755 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -391,6 +391,7 @@ class LLPanelLandCovenant public: LLPanelLandCovenant(LLSafeHandle<LLParcelSelection>& parcelp); virtual ~LLPanelLandCovenant(); + virtual BOOL postBuild(); void refresh(); static void updateCovenantText(const std::string& string); static void updateEstateName(const std::string& name); @@ -399,6 +400,10 @@ public: protected: LLSafeHandle<LLParcelSelection>& mParcel; + +private: + LLUUID mLastRegionID; + F64 mNextUpdateTime; //seconds since client start }; #endif diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index ed91d277dd..31238fdd48 100755 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -53,6 +53,8 @@ #include "llviewerparcelmgr.h" #include "llviewerregion.h" +const F64 COVENANT_REFRESH_TIME_SEC = 60.0f; + static LLPanelInjector<LLPanelPlaceProfile> t_place_profile("panel_place_profile"); // Statics for textures filenames @@ -76,6 +78,7 @@ static std::string icon_see_avs_off; LLPanelPlaceProfile::LLPanelPlaceProfile() : LLPanelPlaceInfo(), + mNextCovenantUpdateTime(0), mForSalePanel(NULL), mYouAreHerePanel(NULL), mSelectedParcelID(-1), @@ -162,6 +165,9 @@ BOOL LLPanelPlaceProfile::postBuild() icon_see_avs_on = getString("icon_SeeAVs_On"); icon_see_avs_off = getString("icon_SeeAVs_Off"); + mLastSelectedRegionID = LLUUID::null; + mNextCovenantUpdateTime = 0; + return TRUE; } @@ -170,6 +176,9 @@ void LLPanelPlaceProfile::resetLocation() { LLPanelPlaceInfo::resetLocation(); + mLastSelectedRegionID = LLUUID::null; + mNextCovenantUpdateTime = 0; + mForSalePanel->setVisible(FALSE); mYouAreHerePanel->setVisible(FALSE); @@ -330,13 +339,20 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, if (!region || !parcel) return; - // send EstateCovenantInfo message - LLMessageSystem *msg = gMessageSystem; - msg->newMessage("EstateCovenantRequest"); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); - msg->sendReliable(region->getHost()); + if (mLastSelectedRegionID != region->getRegionID() + || mNextCovenantUpdateTime < LLTimer::getElapsedSeconds()) + { + // send EstateCovenantInfo message + // Note: LLPanelPlaceProfile doesn't change Covenant's content and any + // changes made by Estate floater should be requested by Estate floater + LLMessageSystem *msg = gMessageSystem; + msg->newMessage("EstateCovenantRequest"); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); + msg->sendReliable(region->getHost()); + mNextCovenantUpdateTime = LLTimer::getElapsedSeconds() + COVENANT_REFRESH_TIME_SEC; + } LLParcelData parcel_data; diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index 4547e14b2e..3d2654fc12 100755 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -71,6 +71,7 @@ private: */ S32 mSelectedParcelID; LLUUID mLastSelectedRegionID; + F64 mNextCovenantUpdateTime; //seconds since client start LLPanel* mForSalePanel; LLPanel* mYouAreHerePanel; -- cgit v1.2.3 From 58788eae32ac18e7cde8d09200a732591c5cd43c Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Mon, 26 Jan 2015 11:18:47 +0200 Subject: MAINT-23 FIXED Don't display icon if user is parcel owner or user is in group which has rights to build/modify objects. --- indra/newview/lllocationinputctrl.cpp | 5 ++++- indra/newview/llpaneltopinfobar.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 8d21fda8f9..cf04c5f7a5 100755 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -862,11 +862,14 @@ void LLLocationInputCtrl::refreshParcelIcons() bool see_avs = current_parcel->getSeeAVs(); bool pathfinding_dynamic_enabled = agent_region->dynamicPathfindingEnabled(); + bool is_parcel_owner = (gAgent.getID() == current_parcel->getOwnerID()); + bool allow_group_modify = (gAgent.isInGroup(current_parcel->getGroupID()) && current_parcel->getAllowGroupModify()); + // Most icons are "block this ability" mParcelIcon[VOICE_ICON]->setVisible( !allow_voice ); mParcelIcon[FLY_ICON]->setVisible( !allow_fly ); mParcelIcon[PUSH_ICON]->setVisible( !allow_push ); - mParcelIcon[BUILD_ICON]->setVisible( !allow_build ); + mParcelIcon[BUILD_ICON]->setVisible( !allow_build && !is_parcel_owner && !allow_group_modify ); mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts ); mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage ); mParcelIcon[PATHFINDING_DIRTY_ICON]->setVisible(mIsNavMeshDirty); diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index 109013498e..ac9a31ce4e 100755 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -313,11 +313,14 @@ void LLPanelTopInfoBar::updateParcelIcons() bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel); bool see_avs = current_parcel->getSeeAVs(); + bool is_parcel_owner = (gAgent.getID() == current_parcel->getOwnerID()); + bool allow_group_modify = (gAgent.isInGroup(current_parcel->getGroupID()) && current_parcel->getAllowGroupModify()); + // Most icons are "block this ability" mParcelIcon[VOICE_ICON]->setVisible( !allow_voice ); mParcelIcon[FLY_ICON]->setVisible( !allow_fly ); mParcelIcon[PUSH_ICON]->setVisible( !allow_push ); - mParcelIcon[BUILD_ICON]->setVisible( !allow_build ); + mParcelIcon[BUILD_ICON]->setVisible( !allow_build && !is_parcel_owner && !allow_group_modify ); mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts ); mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage ); mDamageText->setVisible(allow_damage); -- cgit v1.2.3 From bb479cfb9ab4488d9324fb67644bfb82074a715a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Mon, 26 Jan 2015 11:42:48 +0200 Subject: MAINT-3560 reverted --- indra/newview/app_settings/settings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9f3fc26c90..e20cc77ed3 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14116,6 +14116,17 @@ <key>Value</key> <integer>-1</integer> </map> + <key>MaxFPS</key> + <map> + <key>Comment</key> + <string>Yield some time to the local host if we reach a threshold framerate.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>-1.0</real> + </map> <key>ForcePeriodicRenderingTime</key> <map> <key>Comment</key> -- cgit v1.2.3 From 8f7064a8711d55188bdbb032ba9ee84dbd189f76 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 27 Jan 2015 11:36:54 +0200 Subject: MAINT-4825 FIXED Cancel button is added. Closing floater will discard changes made to the menu now. --- indra/newview/llfloaterhardwaresettings.cpp | 29 +++++++++++++++------- indra/newview/llfloaterhardwaresettings.h | 5 ++++ .../default/xui/en/floater_hardware_settings.xml | 12 ++++++++- 3 files changed, 36 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index 035eb307c2..62d7efc8b2 100755 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -82,6 +82,7 @@ void LLFloaterHardwareSettings::refresh() mVideoCardMem = gSavedSettings.getS32("TextureMemory"); mFogRatio = gSavedSettings.getF32("RenderFogRatio"); mProbeHardwareOnStartup = gSavedSettings.getBOOL("ProbeHardwareOnStartup"); + mCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); getChild<LLUICtrl>("fsaa")->setValue((LLSD::Integer) mFSAASamples); refreshEnabledState(); @@ -149,6 +150,7 @@ void LLFloaterHardwareSettings::refreshEnabledState() BOOL LLFloaterHardwareSettings::postBuild() { childSetAction("OK", onBtnOK, this); + childSetAction("Cancel", onBtnCancel, this); // Don't do this on Mac as their braindead GL versioning // sets this when 8x and 16x are indeed available @@ -179,18 +181,17 @@ void LLFloaterHardwareSettings::apply() void LLFloaterHardwareSettings::cancel() { - gSavedSettings.setBOOL("RenderVBOEnable", mUseVBO); - gSavedSettings.setBOOL("RenderAnisotropic", mUseAniso); - gSavedSettings.setU32("RenderFSAASamples", mFSAASamples); - gSavedSettings.setF32("RenderGamma", mGamma); - gSavedSettings.setS32("TextureMemory", mVideoCardMem); - gSavedSettings.setF32("RenderFogRatio", mFogRatio); - gSavedSettings.setBOOL("ProbeHardwareOnStartup", mProbeHardwareOnStartup ); - closeFloater(); } // static +void LLFloaterHardwareSettings::onBtnCancel( void* userdata ) +{ + LLFloaterHardwareSettings *fp =(LLFloaterHardwareSettings *)userdata; + fp->cancel(); +} + +// static void LLFloaterHardwareSettings::onBtnOK( void* userdata ) { LLFloaterHardwareSettings *fp =(LLFloaterHardwareSettings *)userdata; @@ -198,4 +199,14 @@ void LLFloaterHardwareSettings::onBtnOK( void* userdata ) fp->closeFloater(false); } - +void LLFloaterHardwareSettings::onClose(bool app_quitting) +{ + gSavedSettings.setBOOL("RenderVBOEnable", mUseVBO); + gSavedSettings.setBOOL("RenderAnisotropic", mUseAniso); + gSavedSettings.setU32("RenderFSAASamples", mFSAASamples); + gSavedSettings.setF32("RenderGamma", mGamma); + gSavedSettings.setS32("TextureMemory", mVideoCardMem); + gSavedSettings.setF32("RenderFogRatio", mFogRatio); + gSavedSettings.setBOOL("ProbeHardwareOnStartup", mProbeHardwareOnStartup ); + gSavedSettings.setBOOL("RenderCompressTextures", mCompressTextures ); +} diff --git a/indra/newview/llfloaterhardwaresettings.h b/indra/newview/llfloaterhardwaresettings.h index 626771b1d2..11c27c266d 100755 --- a/indra/newview/llfloaterhardwaresettings.h +++ b/indra/newview/llfloaterhardwaresettings.h @@ -40,6 +40,7 @@ public: /*virtual*/ ~LLFloaterHardwareSettings(); /*virtual*/ BOOL postBuild(); + /*virtual*/ void onClose(bool app_quitting); /// initialize all the callbacks for the menu void initCallbacks(void); @@ -47,6 +48,9 @@ public: /// OK button static void onBtnOK( void* userdata ); + /// Cancel button + static void onBtnCancel( void* userdata ); + //// menu management /// show off our menu @@ -76,6 +80,7 @@ protected: S32 mVideoCardMem; F32 mFogRatio; BOOL mProbeHardwareOnStartup; + BOOL mCompressTextures; private: }; diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml index 9deb0d2030..dcd6d98581 100755 --- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml @@ -191,8 +191,18 @@ label="OK" label_selected="OK" layout="topleft" - left="-102" + right="-105" name="OK" top="192" width="90" /> + <button + follows="right|bottom" + height="22" + label="Cancel" + label_selected="Cancel" + layout="topleft" + left_pad="5" + name="Cancel" + right="-10" + width="90" /> </floater> -- cgit v1.2.3 From 20d70dca947eb4ce9f9d059df5a26811fb61dbbe Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 28 Jan 2015 12:05:01 +0200 Subject: MAINT-4824 FIXED Show remaining time before resident's name --- indra/newview/llfloaterland.cpp | 28 +++++++++++----------- indra/newview/llnamelistctrl.cpp | 9 +++---- indra/newview/llnamelistctrl.h | 5 ++-- .../skins/default/xui/en/floater_about_land.xml | 6 ++--- 4 files changed, 25 insertions(+), 23 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 4165c7addc..3655f1ed3d 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2410,33 +2410,33 @@ void LLPanelLandAccess::refresh() cit != parcel->mAccessList.end(); ++cit) { const LLAccessEntry& entry = (*cit).second; - std::string suffix; + std::string prefix; if (entry.mTime != 0) { LLStringUtil::format_map_t args; S32 now = time(NULL); S32 seconds = entry.mTime - now; if (seconds < 0) seconds = 0; - suffix.assign(" ("); + prefix.assign(" ("); if (seconds >= 120) { args["[MINUTES]"] = llformat("%d", (seconds/60)); std::string buf = parent_floater->getString ("Minutes", args); - suffix.append(buf); + prefix.append(buf); } else if (seconds >= 60) { - suffix.append("1 " + parent_floater->getString("Minute")); + prefix.append("1 " + parent_floater->getString("Minute")); } else { args["[SECONDS]"] = llformat("%d", seconds); std::string buf = parent_floater->getString ("Seconds", args); - suffix.append(buf); + prefix.append(buf); } - suffix.append(" " + parent_floater->getString("Remaining") + ")"); + prefix.append(" " + parent_floater->getString("Remaining") + ") "); } - mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix); + mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, "", prefix); } mListAccess->sortByName(TRUE); } @@ -2456,33 +2456,33 @@ void LLPanelLandAccess::refresh() cit != parcel->mBanList.end(); ++cit) { const LLAccessEntry& entry = (*cit).second; - std::string suffix; + std::string prefix; if (entry.mTime != 0) { LLStringUtil::format_map_t args; S32 now = time(NULL); S32 seconds = entry.mTime - now; if (seconds < 0) seconds = 0; - suffix.assign(" ("); + prefix.assign(" ("); if (seconds >= 120) { args["[MINUTES]"] = llformat("%d", (seconds/60)); std::string buf = parent_floater->getString ("Minutes", args); - suffix.append(buf); + prefix.append(buf); } else if (seconds >= 60) { - suffix.append("1 " + parent_floater->getString("Minute")); + prefix.append("1 " + parent_floater->getString("Minute")); } else { args["[SECONDS]"] = llformat("%d", seconds); std::string buf = parent_floater->getString ("Seconds", args); - suffix.append(buf); + prefix.append(buf); } - suffix.append(" " + parent_floater->getString("Remaining") + ")"); + prefix.append(" " + parent_floater->getString("Remaining") + ") "); } - mListBanned->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix); + mListBanned->addNameItem(entry.mID, ADD_DEFAULT, TRUE, "", prefix); } mListBanned->sortByName(TRUE); } diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 54e4c6c1da..79988a0800 100755 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -70,7 +70,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p) // public LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, - BOOL enabled, const std::string& suffix) + BOOL enabled, const std::string& suffix, const std::string& prefix) { //LL_INFOS() << "LLNameListCtrl::addNameItem " << agent_id << LL_ENDL; @@ -79,7 +79,7 @@ LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPositi item.enabled = enabled; item.target = INDIVIDUAL; - return addNameItemRow(item, pos, suffix); + return addNameItemRow(item, pos, suffix, prefix); } // virtual, public @@ -291,7 +291,8 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition p LLScrollListItem* LLNameListCtrl::addNameItemRow( const LLNameListCtrl::NameItem& name_item, EAddPosition pos, - const std::string& suffix) + const std::string& suffix, + const std::string& prefix) { LLUUID id = name_item.value().asUUID(); LLNameListItem* item = new LLNameListItem(name_item,name_item.target() == GROUP); @@ -365,7 +366,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow( LLScrollListCell* cell = item->getColumn(mNameColumnIndex); if (cell) { - cell->setValue(fullname); + cell->setValue(prefix + fullname); } dirtyColumns(); diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 2c40eeaaca..515962df7d 100755 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -129,11 +129,12 @@ public: // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. LLScrollListItem* addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM, - BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null); + BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null, const std::string& prefix = LLStringUtil::null); LLScrollListItem* addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); /*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); - LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null); + LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null, + const std::string& prefix = LLStringUtil::null); // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index a660e812cc..d72937ac63 100755 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -23,15 +23,15 @@ </floater.string> <floater.string name="Minutes"> - [MINUTES] minutes + [MINUTES] min. </floater.string> <floater.string name="Minute"> - minute + min. </floater.string> <floater.string name="Seconds"> - [SECONDS] seconds + [SECONDS] sec. </floater.string> <floater.string name="Remaining"> -- cgit v1.2.3 From 301714944a7cf6cb4ddd160b66d231bb992d5162 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 30 Jan 2015 11:33:23 +0200 Subject: MAINT-1016 FIXED Don't remove other chat participant from mute list if it's group chat. --- indra/newview/llimview.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 5d3a11e245..b8b6bdaa11 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1295,8 +1295,15 @@ void LLIMModel::sendMessage(const std::string& utf8_text, gAgent.sendReliableMessage(); } + bool is_group_chat = false; + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(im_session_id); + if(session) + { + is_group_chat = session->isGroupSessionType(); + } + // If there is a mute list and this is not a group chat... - if ( LLMuteList::getInstance() ) + if ( LLMuteList::getInstance() && !is_group_chat) { // ... the target should not be in our mute list for some message types. // Auto-remove them if present. @@ -1345,7 +1352,6 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if (is_not_group_id) { - LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(im_session_id); if( session == 0)//??? shouldn't really happen { LLRecentPeople::instance().add(other_participant_id); -- cgit v1.2.3 From 60af7c826caf3b96548988fc9ffbc3a12e227fb4 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 3 Feb 2015 13:16:26 +0200 Subject: MAINT-4812 FIXED Remove sending snapshot as email from the viewer. --- indra/newview/llfloatersnapshot.cpp | 29 +-- indra/newview/llfloatersnapshot.h | 1 - indra/newview/llpanelsnapshotoptions.cpp | 7 - indra/newview/llpanelsnapshotpostcard.cpp | 244 --------------------- indra/newview/llsnapshotlivepreview.cpp | 2 +- indra/newview/llsnapshotlivepreview.h | 2 +- indra/newview/llviewermessage.cpp | 1 - .../default/xui/de/panel_snapshot_postcard.xml | 21 -- .../skins/default/xui/en/floater_snapshot.xml | 6 - .../default/xui/en/panel_snapshot_options.xml | 17 -- .../default/xui/en/panel_snapshot_postcard.xml | 103 --------- .../default/xui/es/panel_snapshot_postcard.xml | 17 -- .../default/xui/fr/panel_snapshot_postcard.xml | 17 -- .../default/xui/it/panel_snapshot_postcard.xml | 17 -- .../default/xui/ja/panel_snapshot_postcard.xml | 17 -- .../default/xui/pt/panel_snapshot_postcard.xml | 17 -- .../default/xui/ru/panel_snapshot_postcard.xml | 17 -- .../default/xui/tr/panel_snapshot_postcard.xml | 17 -- .../default/xui/zh/panel_snapshot_postcard.xml | 17 -- 19 files changed, 4 insertions(+), 565 deletions(-) delete mode 100755 indra/newview/llpanelsnapshotpostcard.cpp delete mode 100755 indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml delete mode 100755 indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml delete mode 100755 indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml delete mode 100755 indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml delete mode 100755 indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml delete mode 100755 indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml delete mode 100755 indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml delete mode 100755 indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml delete mode 100755 indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml delete mode 100755 indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 1d0ddc2ced..08a0b74494 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -169,11 +169,7 @@ LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getActiveSnapshotT name = spanel->getName(); } - if (name == "panel_snapshot_postcard") - { - type = LLSnapshotLivePreview::SNAPSHOT_POSTCARD; - } - else if (name == "panel_snapshot_inventory") + if (name == "panel_snapshot_inventory") { type = LLSnapshotLivePreview::SNAPSHOT_TEXTURE; } @@ -424,7 +420,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) } LLSnapshotLivePreview* previewp = getPreviewView(floater); - BOOL got_bytes = previewp && previewp->getDataSize() > 0; BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); // *TODO: Separate maximum size for Web images from postcards @@ -447,10 +442,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) } floater->getChild<LLUICtrl>("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown")); - floater->getChild<LLUICtrl>("file_size_label")->setColor( - shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD - && got_bytes - && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" )); + floater->getChild<LLUICtrl>("file_size_label")->setColor(LLUIColorTable::instance().getColor( "LabelTextColor" )); // Update the width and height spinners based on the corresponding resolution combos. (?) switch(shot_type) @@ -460,11 +452,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) floater->getChild<LLUICtrl>("layer_types")->setValue("colors"); setResolution(floater, "profile_size_combo"); break; - case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: - layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; - floater->getChild<LLUICtrl>("layer_types")->setValue("colors"); - setResolution(floater, "postcard_size_combo"); - break; case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; floater->getChild<LLUICtrl>("layer_types")->setValue("colors"); @@ -1452,18 +1439,6 @@ const LLVector3d& LLFloaterSnapshot::getPosTakenGlobal() return previewp->getPosTakenGlobal(); } -// static -void LLFloaterSnapshot::setAgentEmail(const std::string& email) -{ - LLFloaterSnapshot* instance = findInstance(); - if (instance) - { - LLSideTrayPanelContainer* panel_container = instance->getChild<LLSideTrayPanelContainer>("panel_container"); - LLPanel* postcard_panel = panel_container->getPanelByName("panel_snapshot_postcard"); - postcard_panel->notify(LLSD().with("agent-email", email)); - } -} - ///---------------------------------------------------------------------------- /// Class LLSnapshotFloaterView ///---------------------------------------------------------------------------- diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 0bb9474bb5..5bcf1d3099 100755 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -63,7 +63,6 @@ public: static void postPanelSwitch(); static LLPointer<LLImageFormatted> getImageData(); static const LLVector3d& getPosTakenGlobal(); - static void setAgentEmail(const std::string& email); static const LLRect& getThumbnailPlaceholderRect() { return sThumbnailPlaceholder->getRect(); } diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 0fc9ceec83..f41bdd8881 100755 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -56,7 +56,6 @@ private: void updateUploadCost(); void openPanel(const std::string& panel_name); void onSaveToProfile(); - void onSaveToEmail(); void onSaveToInventory(); void onSaveToComputer(); void onSendToFacebook(); @@ -69,7 +68,6 @@ static LLPanelInjector<LLPanelSnapshotOptions> panel_class("llpanelsnapshotoptio LLPanelSnapshotOptions::LLPanelSnapshotOptions() { mCommitCallbackRegistrar.add("Snapshot.SaveToProfile", boost::bind(&LLPanelSnapshotOptions::onSaveToProfile, this)); - mCommitCallbackRegistrar.add("Snapshot.SaveToEmail", boost::bind(&LLPanelSnapshotOptions::onSaveToEmail, this)); mCommitCallbackRegistrar.add("Snapshot.SaveToInventory", boost::bind(&LLPanelSnapshotOptions::onSaveToInventory, this)); mCommitCallbackRegistrar.add("Snapshot.SaveToComputer", boost::bind(&LLPanelSnapshotOptions::onSaveToComputer, this)); mCommitCallbackRegistrar.add("Snapshot.SendToFacebook", boost::bind(&LLPanelSnapshotOptions::onSendToFacebook, this)); @@ -120,11 +118,6 @@ void LLPanelSnapshotOptions::onSaveToProfile() openPanel("panel_snapshot_profile"); } -void LLPanelSnapshotOptions::onSaveToEmail() -{ - openPanel("panel_snapshot_postcard"); -} - void LLPanelSnapshotOptions::onSaveToInventory() { openPanel("panel_snapshot_inventory"); diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp deleted file mode 100755 index 8e37b1418c..0000000000 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ /dev/null @@ -1,244 +0,0 @@ -/** - * @file llpanelsnapshotpostcard.cpp - * @brief Postcard sending panel. - * - * $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llcombobox.h" -#include "llnotificationsutil.h" -#include "llsidetraypanelcontainer.h" -#include "llsliderctrl.h" -#include "llspinctrl.h" -#include "lltexteditor.h" - -#include "llagent.h" -#include "llagentui.h" -#include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model -#include "llpanelsnapshot.h" -#include "llpostcard.h" -#include "llviewercontrol.h" // gSavedSettings -#include "llviewerwindow.h" - -#include <boost/regex.hpp> - -/** - * Sends postcard via email. - */ -class LLPanelSnapshotPostcard -: public LLPanelSnapshot -{ - LOG_CLASS(LLPanelSnapshotPostcard); - -public: - LLPanelSnapshotPostcard(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ S32 notify(const LLSD& info); - -private: - /*virtual*/ std::string getWidthSpinnerName() const { return "postcard_snapshot_width"; } - /*virtual*/ std::string getHeightSpinnerName() const { return "postcard_snapshot_height"; } - /*virtual*/ std::string getAspectRatioCBName() const { return "postcard_keep_aspect_check"; } - /*virtual*/ std::string getImageSizeComboName() const { return "postcard_size_combo"; } - /*virtual*/ std::string getImageSizePanelName() const { return "postcard_image_size_lp"; } - /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG; } - /*virtual*/ void updateControls(const LLSD& info); - - bool missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response); - void sendPostcard(); - - void onMsgFormFocusRecieved(); - void onFormatComboCommit(LLUICtrl* ctrl); - void onQualitySliderCommit(LLUICtrl* ctrl); - void onSend(); - - bool mHasFirstMsgFocus; - std::string mAgentEmail; -}; - -static LLPanelInjector<LLPanelSnapshotPostcard> panel_class("llpanelsnapshotpostcard"); - -LLPanelSnapshotPostcard::LLPanelSnapshotPostcard() -: mHasFirstMsgFocus(false) -{ - mCommitCallbackRegistrar.add("Postcard.Send", boost::bind(&LLPanelSnapshotPostcard::onSend, this)); - mCommitCallbackRegistrar.add("Postcard.Cancel", boost::bind(&LLPanelSnapshotPostcard::cancel, this)); - -} - -// virtual -BOOL LLPanelSnapshotPostcard::postBuild() -{ - // pick up the user's up-to-date email address - gAgent.sendAgentUserInfoRequest(); - - std::string name_string; - LLAgentUI::buildFullname(name_string); - getChild<LLUICtrl>("name_form")->setValue(LLSD(name_string)); - - // For the first time a user focuses to .the msg box, all text will be selected. - getChild<LLUICtrl>("msg_form")->setFocusChangedCallback(boost::bind(&LLPanelSnapshotPostcard::onMsgFormFocusRecieved, this)); - - getChild<LLUICtrl>("to_form")->setFocus(TRUE); - - getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1)); - - return LLPanelSnapshot::postBuild(); -} - -// virtual -void LLPanelSnapshotPostcard::onOpen(const LLSD& key) -{ - LLPanelSnapshot::onOpen(key); -} - -// virtual -S32 LLPanelSnapshotPostcard::notify(const LLSD& info) -{ - if (!info.has("agent-email")) - { - llassert(info.has("agent-email")); - return 0; - } - - if (mAgentEmail.empty()) - { - mAgentEmail = info["agent-email"].asString(); - } - - return 1; -} - -// virtual -void LLPanelSnapshotPostcard::updateControls(const LLSD& info) -{ - getChild<LLUICtrl>("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality")); - updateImageQualityLevel(); - - const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true; - getChild<LLUICtrl>("send_btn")->setEnabled(have_snapshot); -} - -bool LLPanelSnapshotPostcard::missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if(0 == option) - { - // User clicked OK - if((getChild<LLUICtrl>("subject_form")->getValue().asString()).empty()) - { - // Stuff the subject back into the form. - getChild<LLUICtrl>("subject_form")->setValue(getString("default_subject")); - } - - if (!mHasFirstMsgFocus) - { - // The user never switched focus to the message window. - // Using the default string. - getChild<LLUICtrl>("msg_form")->setValue(getString("default_message")); - } - - sendPostcard(); - } - return false; -} - - -void LLPanelSnapshotPostcard::sendPostcard() -{ - std::string to(getChild<LLUICtrl>("to_form")->getValue().asString()); - std::string subject(getChild<LLUICtrl>("subject_form")->getValue().asString()); - - LLSD postcard = LLSD::emptyMap(); - postcard["pos-global"] = LLFloaterSnapshot::getPosTakenGlobal().getValue(); - postcard["to"] = to; - postcard["from"] = mAgentEmail; - postcard["name"] = getChild<LLUICtrl>("name_form")->getValue().asString(); - postcard["subject"] = subject; - postcard["msg"] = getChild<LLUICtrl>("msg_form")->getValue().asString(); - LLPostCard::send(LLFloaterSnapshot::getImageData(), postcard); - - // Give user feedback of the event. - gViewerWindow->playSnapshotAnimAndSound(); - - LLFloaterSnapshot::postSave(); -} - -void LLPanelSnapshotPostcard::onMsgFormFocusRecieved() -{ - LLTextEditor* msg_form = getChild<LLTextEditor>("msg_form"); - if (msg_form->hasFocus() && !mHasFirstMsgFocus) - { - mHasFirstMsgFocus = true; - msg_form->setText(LLStringUtil::null); - } -} - -void LLPanelSnapshotPostcard::onFormatComboCommit(LLUICtrl* ctrl) -{ - // will call updateControls() - LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true)); -} - -void LLPanelSnapshotPostcard::onQualitySliderCommit(LLUICtrl* ctrl) -{ - updateImageQualityLevel(); - - LLSliderCtrl* slider = (LLSliderCtrl*)ctrl; - S32 quality_val = llfloor((F32)slider->getValue().asReal()); - LLSD info; - info["image-quality-change"] = quality_val; - LLFloaterSnapshot::getInstance()->notify(info); // updates the "SnapshotQuality" setting -} - -void LLPanelSnapshotPostcard::onSend() -{ - // Validate input. - std::string to(getChild<LLUICtrl>("to_form")->getValue().asString()); - - boost::regex email_format("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*"); - - if (to.empty() || !boost::regex_match(to, email_format)) - { - LLNotificationsUtil::add("PromptRecipientEmail"); - return; - } - - if (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format)) - { - LLNotificationsUtil::add("PromptSelfEmail"); - return; - } - - std::string subject(getChild<LLUICtrl>("subject_form")->getValue().asString()); - if(subject.empty() || !mHasFirstMsgFocus) - { - LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLPanelSnapshotPostcard::missingSubjMsgAlertCallback, this, _1, _2)); - return; - } - - // Send postcard. - sendPostcard(); -} diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 050b88413d..234e922104 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -86,7 +86,7 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mNeedsFlash(TRUE), mSnapshotQuality(gSavedSettings.getS32("SnapshotQuality")), mDataSize(0), - mSnapshotType(SNAPSHOT_POSTCARD), + mSnapshotType(SNAPSHOT_LOCAL), mSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))), mSnapshotUpToDate(FALSE), mCameraPos(LLViewerCamera::getInstance()->getOrigin()), diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index fed33bf37c..f479de59d4 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -42,7 +42,7 @@ class LLSnapshotLivePreview : public LLView public: enum ESnapshotType { - SNAPSHOT_POSTCARD, + SNAPSHOT_POSTCARD_DEPRECIATED, SNAPSHOT_TEXTURE, SNAPSHOT_LOCAL, SNAPSHOT_WEB diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 0fbecd5180..056114cb6b 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7109,7 +7109,6 @@ void process_user_info_reply(LLMessageSystem* msg, void**) msg->getString( "UserData", "DirectoryVisibility", dir_visibility); LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email); - LLFloaterSnapshot::setAgentEmail(email); } diff --git a/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml deleted file mode 100755 index ead56f2885..0000000000 --- a/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_snapshot_postcard"> - <string name="default_subject"> - Postkarte aus [SECOND_LIFE]. - </string> - <string name="default_message"> - Sehen Sie mal! - </string> - <string name="upload_message"> - Senden... - </string> - <text name="title"> - E-Mail - </text> - <tab_container name="postcard_tabs"> - <panel name="panel_postcard_message" label="Nachricht"/> - <panel name="panel_postcard_settings" label="Einstellungen"/> - </tab_container> - <button name="cancel_btn" label="Abbrechen"/> - <button name="send_btn" label="Absenden"/> -</panel> diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 76adaad57c..514fb058b9 100755 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -266,12 +266,6 @@ layout="topleft" name="panel_snapshot_profile" filename="panel_snapshot_profile.xml" /> - <panel - class="llpanelsnapshotpostcard" - follows="all" - layout="topleft" - name="panel_snapshot_postcard" - filename="panel_snapshot_postcard.xml" /> <panel class="llpanelsnapshotinventory" follows="all" diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml index 265217ef60..cb29e6a87a 100755 --- a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml @@ -107,21 +107,4 @@ <button.commit_callback function="Snapshot.SendToFlickr"/> </button> - <button - follows="left|top" - font="SansSerif" - halign="left" - height="22" - image_overlay="Snapshot_Email" - image_overlay_alignment="left" - image_top_pad="0" - imgoverlay_label_space="10" - label="Send via E-mail" - layout="topleft" - left_delta="0" - name="save_to_email_btn" - top_pad="5"> - <button.commit_callback - function="Snapshot.SaveToEmail" /> - </button> </panel> \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml deleted file mode 100755 index 975b08be05..0000000000 --- a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml +++ /dev/null @@ -1,103 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - height="380" - layout="topleft" - name="panel_snapshot_postcard" - width="490"> - <string - name="default_subject"> - Postcard from [SECOND_LIFE]. - </string> - <string - name="default_message"> - Check this out! - </string> - <string - name="upload_message"> - Sending... - </string> - <icon - follows="top|left" - height="18" - image_name="Snapshot_Email" - layout="topleft" - left="12" - mouse_opaque="true" - name="title_icon" - top="7" - width="18" /> - <text - follows="top|left|right" - font="SansSerifBold" - height="14" - layout="topleft" - left_pad="12" - length="1" - name="title" - right="-10" - text_color="white" - type="string" - top_delta="2"> - E-mail - </text> - <view_border - bevel_style="in" - follows="left|top|right" - height="1" - left="9" - layout="topleft" - name="hr" - right="-5" - top_pad="5" - /> - <tab_container - name="postcard_tabs" - tab_group="1" - tab_min_width="97" - tab_height="21" - tab_position="top" - top_pad="7" - left="5" - right="-2" - height="319" - follows="all" - halign="center" - use_highlighting_on_hover="true"> - <panel - follows="all" - layout="topleft" - label="Message" - name="panel_postcard_message" - filename="panel_postcard_message.xml" /> - <panel - follows="all" - layout="topleft" - label="Settings" - name="panel_postcard_settings" - filename="panel_postcard_settings.xml" /> - </tab_container> - <button - follows="right|bottom" - height="23" - label="Cancel" - layout="topleft" - name="cancel_btn" - right="-6" - bottom="-20" - width="97"> - <button.commit_callback - function="Postcard.Cancel" /> - </button> - <button - follows="left|bottom" - height="23" - label="Send" - layout="topleft" - left="10" - name="send_btn" - top_delta="0" - width="97"> - <button.commit_callback - function="Postcard.Send" /> - </button> -</panel> \ No newline at end of file diff --git a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml deleted file mode 100755 index 649d547ba0..0000000000 --- a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_snapshot_postcard"> - <string name="default_subject"> - Postal desde [SECOND_LIFE]. - </string> - <string name="default_message"> - ¡Mira esto! - </string> - <string name="upload_message"> - Enviando... - </string> - <text name="title"> - Correo-e - </text> - <button label="Mensaje" name="message_btn"/> - <button label="Ajustes" name="settings_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml deleted file mode 100755 index 82a4815144..0000000000 --- a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_snapshot_postcard"> - <string name="default_subject"> - Carte postale de [SECOND_LIFE]. - </string> - <string name="default_message"> - Ouvrez-moi ! - </string> - <string name="upload_message"> - Envoi en cours... - </string> - <text name="title"> - E-mail - </text> - <button label="Message" name="message_btn"/> - <button label="Paramètres" name="settings_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml deleted file mode 100755 index 3703b97e6c..0000000000 --- a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_snapshot_postcard"> - <string name="default_subject"> - Cartolina da [SECOND_LIFE]. - </string> - <string name="default_message"> - Dai un'occhiata! - </string> - <string name="upload_message"> - Invio... - </string> - <text name="title"> - E-mail - </text> - <button label="Messaggio" name="message_btn"/> - <button label="Impostazioni" name="settings_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml deleted file mode 100755 index 1ddd723840..0000000000 --- a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_snapshot_postcard"> - <string name="default_subject"> - [SECOND_LIFE] からのポストカードです。 - </string> - <string name="default_message"> - ぜひご覧ください! - </string> - <string name="upload_message"> - 送信中... - </string> - <text name="title"> - メール - </text> - <button label="メッセージ" name="message_btn"/> - <button label="設定" name="settings_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml deleted file mode 100755 index 12a648f600..0000000000 --- a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_snapshot_postcard"> - <string name="default_subject"> - Postal do [SECOND_LIFE]. - </string> - <string name="default_message"> - Confira! - </string> - <string name="upload_message"> - Enviando... - </string> - <text name="title"> - E-mail - </text> - <button label="Mensagem" name="message_btn"/> - <button label="Configurações" name="settings_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml deleted file mode 100755 index 47f4caf8e3..0000000000 --- a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_snapshot_postcard"> - <string name="default_subject"> - Открытка из [SECOND_LIFE]. - </string> - <string name="default_message"> - Побывай здесь! - </string> - <string name="upload_message"> - Отправка... - </string> - <text name="title"> - Электронное письмо - </text> - <button label="Сообщение" name="message_btn"/> - <button label="Настройки" name="settings_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml deleted file mode 100755 index e999678a0d..0000000000 --- a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_snapshot_postcard"> - <string name="default_subject"> - SECOND_LIFE]'dan posta kartı. - </string> - <string name="default_message"> - Buna bakın! - </string> - <string name="upload_message"> - Gönderiyor... - </string> - <text name="title"> - E-posta - </text> - <button label="İleti" name="message_btn"/> - <button label="Ayarlar" name="settings_btn"/> -</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml deleted file mode 100755 index 853a856104..0000000000 --- a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_snapshot_postcard"> - <string name="default_subject"> - 來自 [SECOND_LIFE] 的明信片。 - </string> - <string name="default_message"> - 快來看看這個! - </string> - <string name="upload_message"> - 傳送中... - </string> - <text name="title"> - 電郵 - </text> - <button label="訊息" name="message_btn"/> - <button label="設定" name="settings_btn"/> -</panel> -- cgit v1.2.3 From 90e463775112d5bf255eb83a5684811cf7af4795 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 3 Feb 2015 15:18:59 +0200 Subject: MAINT-4812 FIXED Remove sending snapshot as email from the viewer. --- indra/newview/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 154f3b5726..a7c5dbff82 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -458,7 +458,6 @@ set(viewer_SOURCE_FILES llpanelsnapshotinventory.cpp llpanelsnapshotlocal.cpp llpanelsnapshotoptions.cpp - llpanelsnapshotpostcard.cpp llpanelsnapshotprofile.cpp llpanelteleporthistory.cpp llpaneltiptoast.cpp -- cgit v1.2.3 From 593d6701d9c5ff2d686cd78b10268f59198b21db Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Thu, 5 Feb 2015 11:07:44 +0200 Subject: MAINT-4857 FIXED Reset scene monitor after completing teleport. --- indra/newview/llscenemonitor.cpp | 16 ++++++++++++++++ indra/newview/llscenemonitor.h | 8 ++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 179a73413e..02912f12a9 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -39,6 +39,7 @@ #include "llspatialpartition.h" #include "llagent.h" #include "pipeline.h" +#include "llviewerparcelmgr.h" #include "llviewerpartsim.h" LLSceneMonitorView* gSceneMonitorView = NULL; @@ -702,6 +703,13 @@ LLSceneMonitorView::LLSceneMonitorView(const LLRect& rect) setCanMinimize(false); setCanClose(true); + + sTeleportFinishConnection = LLViewerParcelMgr::getInstance()->setTeleportFinishedCallback(boost::bind(&LLSceneMonitorView::onTeleportFinished, this)); +} + +LLSceneMonitorView::~LLSceneMonitorView() +{ + sTeleportFinishConnection.disconnect(); } void LLSceneMonitorView::onClose(bool app_quitting) @@ -714,6 +722,14 @@ void LLSceneMonitorView::onClickCloseBtn(bool app_quitting) setVisible(false); } +void LLSceneMonitorView::onTeleportFinished() +{ + if(isInVisibleChain()) + { + LLSceneMonitor::getInstance()->reset(); + } +} + void LLSceneMonitorView::onVisibilityChange(BOOL visible) { if (!LLGLSLShader::sNoFixedFunction && visible) diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h index 5bde3b5aab..2b6ea57b96 100644 --- a/indra/newview/llscenemonitor.h +++ b/indra/newview/llscenemonitor.h @@ -64,10 +64,12 @@ public: void dumpToFile(std::string file_name); bool hasResults() const { return mSceneLoadRecording.getResults().getDuration() != S32Seconds(0);} + void reset(); + private: void freezeScene(); void unfreezeScene(); - void reset(); + LLRenderTarget& getCaptureTarget(); void generateDitheringTexture(S32 width, S32 height); @@ -109,7 +111,7 @@ class LLSceneMonitorView : public LLFloater { public: LLSceneMonitorView(const LLRect& rect); - + ~LLSceneMonitorView(); virtual void draw(); virtual void onVisibilityChange(BOOL visible); @@ -117,6 +119,8 @@ public: protected: virtual void onClose(bool app_quitting=false); virtual void onClickCloseBtn(bool app_quitting=false); + void onTeleportFinished(); + boost::signals2::connection sTeleportFinishConnection; }; extern LLSceneMonitorView* gSceneMonitorView; -- cgit v1.2.3 From 1e759a5c00878048d5a6ed1ba7dc641222392afd Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 11 Feb 2015 15:18:25 +0200 Subject: MAINT-4173 FIXED Update member data when opening resident picker floater. --- indra/newview/llpanelgroupbulk.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgroupbulk.cpp b/indra/newview/llpanelgroupbulk.cpp index 76792cc6fd..cffda02aa0 100644 --- a/indra/newview/llpanelgroupbulk.cpp +++ b/indra/newview/llpanelgroupbulk.cpp @@ -97,6 +97,7 @@ void LLPanelGroupBulkImpl::callbackClickAdd(void* userdata) if(picker) { root_floater->addDependentFloater(picker); + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(panelp->mImplementation->mGroupID); } } } -- cgit v1.2.3 From f00e3f41aba03b901c86f7a0eceff72d284c76b9 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 18 Feb 2015 13:07:49 +0200 Subject: MAINT-4866 FIXED Check if subcategories (not only main category) have items which is currently worn. --- indra/newview/llappearancemgr.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index d7ef5fcba7..c6971edf9f 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1730,9 +1730,15 @@ bool LLAppearanceMgr::getCanRemoveFromCOF(const LLUUID& outfit_cat_id) { return false; } - + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false); - return gInventory.hasMatchingDirectDescendent(outfit_cat_id, is_worn); + gInventory.collectDescendentsIf(outfit_cat_id, + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + is_worn); + return items.size() > 0; } // static -- cgit v1.2.3 From 15c613cbc2ba52efa2783e9cf599b7b843c6d383 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 18 Feb 2015 17:58:43 +0200 Subject: MAINT-4242 FIXED Just clear ban list before populating it with new data. --- indra/newview/llgroupmgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 56e671d902..86f9da6318 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -1970,7 +1970,8 @@ void LLGroupMgr::processGroupBanRequest(const LLSD& content) LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!gdatap) return; - + + gdatap->clearBanList(); LLSD::map_const_iterator i = content["ban_list"].beginMap(); LLSD::map_const_iterator iEnd = content["ban_list"].endMap(); for(;i != iEnd; ++i) -- cgit v1.2.3 From 426feae8048167c3bc08314d164265586c0ccaac Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Thu, 19 Feb 2015 12:23:24 +0200 Subject: MAINT-4891 FIXED Restore chosen format when opening Local snapshot panel. --- indra/newview/llpanelsnapshotlocal.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index 43e38b95e2..01dfdc4ece 100755 --- a/indra/newview/llpanelsnapshotlocal.cpp +++ b/indra/newview/llpanelsnapshotlocal.cpp @@ -58,6 +58,8 @@ private: /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const; /*virtual*/ void updateControls(const LLSD& info); + S32 mLocalFormat; + void onFormatComboCommit(LLUICtrl* ctrl); void onQualitySliderCommit(LLUICtrl* ctrl); void onSaveFlyoutCommit(LLUICtrl* ctrl); @@ -67,6 +69,7 @@ static LLPanelInjector<LLPanelSnapshotLocal> panel_class("llpanelsnapshotlocal") LLPanelSnapshotLocal::LLPanelSnapshotLocal() { + mLocalFormat = gSavedSettings.getS32("SnapshotFormat"); mCommitCallbackRegistrar.add("Local.Cancel", boost::bind(&LLPanelSnapshotLocal::cancel, this)); } @@ -83,6 +86,10 @@ BOOL LLPanelSnapshotLocal::postBuild() // virtual void LLPanelSnapshotLocal::onOpen(const LLSD& key) { + if(gSavedSettings.getS32("SnapshotFormat") != mLocalFormat) + { + getChild<LLComboBox>("local_format_combo")->selectNthItem(mLocalFormat); + } LLPanelSnapshot::onOpen(key); } @@ -129,6 +136,7 @@ void LLPanelSnapshotLocal::updateControls(const LLSD& info) void LLPanelSnapshotLocal::onFormatComboCommit(LLUICtrl* ctrl) { + mLocalFormat = getImageFormat(); // will call updateControls() LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true)); } -- cgit v1.2.3 From 2ea45ee2c9924ff7ef8f1153e7f3f669981e70a2 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 24 Feb 2015 19:35:53 +0200 Subject: MAINT-4872 FIXED wearables with same asset id are not swapped --- indra/newview/llagentwearables.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index f06ffb4fb3..010a39a6e7 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -982,6 +982,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it S32 matched = 0, mismatched = 0; const S32 arr_size = LLWearableType::WT_COUNT; S32 type_counts[arr_size]; + BOOL update_inventory = FALSE; std::fill(type_counts,type_counts+arr_size,0); for (S32 i = 0; i < count; i++) { @@ -1009,10 +1010,9 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it continue; } - // Don't care about this case - ordering of wearables with the same asset id has no effect. + // Update only inventory in this case - ordering of wearables with the same asset id has no effect. // Causes the two-alphas error case in MAINT-4158. // We should actually disallow wearing two wearables with the same asset id. -#if 0 if (curr_wearable->getName() != new_item->getName() || curr_wearable->getItemID() != new_item->getUUID()) { @@ -1020,10 +1020,9 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it << curr_wearable->getName() << " vs " << new_item->getName() << " item ids " << curr_wearable->getItemID() << " vs " << new_item->getUUID() << LL_ENDL; - mismatched++; + update_inventory = TRUE; continue; } -#endif // If we got here, everything matches. matched++; } @@ -1037,14 +1036,15 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it mismatched++; } } - if (mismatched == 0) + if (mismatched == 0 && !update_inventory) { LL_DEBUGS("Avatar") << "no changes, bailing out" << LL_ENDL; mCOFChangeInProgress = false; return; } - - + + // updating inventory + // TODO: Removed check for ensuring that teens don't remove undershirt and underwear. Handle later // note: shirt is the first non-body part wearable item. Update if wearable order changes. // This loop should remove all clothing, but not any body parts @@ -1085,6 +1085,15 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it gInventory.notifyObservers(); + if (mismatched == 0) + { + LL_DEBUGS("Avatar") << "inventory updated, wearable assets not changed, bailing out" << LL_ENDL; + mCOFChangeInProgress = false; + return; + } + + // updating agent avatar + if (isAgentAvatarValid()) { gAgentAvatarp->setCompositeUpdatesEnabled(TRUE); -- cgit v1.2.3 From 22ea223ddd2f2f9ed05a447dda2c4169a77d191e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Thu, 26 Feb 2015 12:12:08 +0200 Subject: MAINT-4904 FIXED Show confirmation pop-up before unlinking an object. --- indra/newview/app_settings/settings.xml | 11 ++++++++ indra/newview/llselectmgr.cpp | 31 ++++++++++++++++++++++ indra/newview/llselectmgr.h | 2 ++ .../newview/skins/default/xui/en/notifications.xml | 16 ++++++++++- 4 files changed, 59 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e20cc77ed3..e3ab45c53e 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3444,6 +3444,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>MinObjectsForUnlinkConfirm</key> + <map> + <key>Comment</key> + <string>Minimum amount of objects in linkset for showing confirmation dialog</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>6</integer> + </map> <key>EffectScriptChatParticles</key> <map> <key>Comment</key> diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index b13c30b6d4..2fb26a3a4d 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -622,10 +622,41 @@ bool LLSelectMgr::linkObjects() bool LLSelectMgr::unlinkObjects() { + LLViewerObject *object = mSelectedObjects->getFirstRootObject(); + if (!object) return false; + + S32 min_objects_for_confirm = gSavedSettings.getS32("MinObjectsForUnlinkConfirm"); + for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++) + { + object = (*iter)->getObject(); + if(object) + { + S32 objects_in_linkset = object->numChildren() + 1; + if(objects_in_linkset >= min_objects_for_confirm) + { + LLNotificationsUtil::add("ConfirmUnlink", LLSD(), LLSD(), boost::bind(&LLSelectMgr::confirmUnlinkObjects, this, _1, _2)); + return true; + } + } + } + LLSelectMgr::getInstance()->sendDelink(); return true; } +void LLSelectMgr::confirmUnlinkObjects(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + // if Cancel pressed + if (option == 1) + { + return; + } + + LLSelectMgr::getInstance()->sendDelink(); + return; +} + // in order to link, all objects must have the same owner, and the // agent must have the ability to modify all of the objects. However, // we're not answering that question with this method. The question diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 23c41e4cc1..316e72b11c 100755 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -506,6 +506,8 @@ public: bool unlinkObjects(); + void confirmUnlinkObjects(const LLSD& notification, const LLSD& response); + bool enableLinkObjects(); bool enableUnlinkObjects(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 4602a41d52..df4bf6700b 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5365,7 +5365,21 @@ You cannot undo this action. notext="Cancel" yestext="OK"/> </notification> - + + <notification + icon="alertmodal.tga" + name="ConfirmUnlink" + type="alertmodal"> + <unique/> + This is a large linkset. If you unlink it, you may not be able to link it again. You may wish to take a copy of the linkset into your inventory as a precaution. + <tag>confirm</tag> + <usetemplate + ignoretext="Confirm when unlinking a linkset" + name="okcancelignore" + notext="Cancel" + yestext="Unlink"/> + </notification> + <notification icon="alertmodal.tga" name="HelpReportAbuseEmailLL" -- cgit v1.2.3 From 241b09a0867fffb9ea1a333b144c9d503eba0bbc Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 27 Feb 2015 11:40:04 +0200 Subject: MAINT-4920 FIXED Reset mClickedInMouselook when left click handled by LLToolPie. --- indra/newview/lltoolgrab.h | 2 ++ indra/newview/lltoolpie.cpp | 1 + 2 files changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lltoolgrab.h b/indra/newview/lltoolgrab.h index 4e22732124..5d24c8813e 100755 --- a/indra/newview/lltoolgrab.h +++ b/indra/newview/lltoolgrab.h @@ -78,6 +78,8 @@ public: // Certain grabs should not highlight the "Build" toolbar button BOOL getHideBuildHighlight() { return mHideBuildHighlight; } + void setClickedInMouselook(BOOL is_clickedInMouselook) {mClickedInMouselook = is_clickedInMouselook;} + static void pickCallback(const LLPickInfo& pick_info); private: LLVector3d getGrabPointGlobal(); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index e4353aafaa..2081297717 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -319,6 +319,7 @@ BOOL LLToolPie::handleLeftClickPick() { gGrabTransientTool = this; mMouseButtonDown = false; + LLToolGrab::getInstance()->setClickedInMouselook(gAgentCamera.cameraMouselook()); LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolGrab::getInstance() ); return LLToolGrab::getInstance()->handleObjectHit( mPick ); } -- cgit v1.2.3 From 903d9d123643e0590c4ed6a162271d0736a4f167 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 4 Mar 2015 11:55:18 +0200 Subject: MAINT-1961 FIXED Use "TextureLivePreview" setting by default, if mCanPreview was not set manually. --- indra/newview/lltexturectrl.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 374c18b30d..7667b3b5a2 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -194,6 +194,7 @@ protected: private: bool mCanApply; bool mCanPreview; + bool mPreviewSettingChanged; texture_selected_callback mTextureSelectedCallback; }; @@ -221,7 +222,8 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mContextConeOpacity(0.f), mSelectedItemPinned( FALSE ), mCanApply(true), - mCanPreview(true) + mCanPreview(true), + mPreviewSettingChanged(false) { buildFromFile("floater_texture_ctrl.xml"); mCanApplyImmediately = can_apply_immediately; @@ -829,6 +831,16 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem } setImageID(itemp->getAssetUUID(),false); mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? + + if(!mPreviewSettingChanged) + { + mCanPreview = gSavedSettings.getBOOL("TextureLivePreview"); + } + else + { + mPreviewSettingChanged = false; + } + if (user_action && mCanPreview) { // only commit intentional selections, not implicit ones @@ -985,6 +997,7 @@ void LLFloaterTexturePicker::setCanApply(bool can_preview, bool can_apply) mCanApply = can_apply; mCanPreview = can_preview ? gSavedSettings.getBOOL("TextureLivePreview") : false; + mPreviewSettingChanged = true; } void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string ) -- cgit v1.2.3 From 5220b0903ce82c0365a07a92ae98fd54cc923bf1 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 3 Mar 2015 17:41:34 +0200 Subject: MAINT-4897 FIXED Frequent error when texturing a linkset - "Unable to add texture. Please wait a few seconds and try again." --- indra/newview/lltooldraganddrop.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index b077cad9f8..4e710747c5 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -995,9 +995,15 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, return TRUE; } - // In case the inventory has not been updated (e.g. due to some recent operation - // causing a dirty inventory), stall the user while fetching the inventory. - if (hit_obj->isInventoryDirty()) + // In case the inventory has not been loaded (e.g. due to some recent operation + // causing a dirty inventory) and we can do an update, stall the user + // while fetching the inventory. + // + // Note: fetch only if inventory is both dirty and not present since previously checked faces + // could have requested new fetch for same item (removed inventory and marked as dirty=false). + // Objects without listeners (dirty==true and inventory!=NULL. In this specific case - before + // first fetch) shouldn't be updated either since we won't receive any changes. + if (hit_obj->isInventoryDirty() && hit_obj->getInventoryRoot() == NULL) { hit_obj->fetchInventoryFromServer(); LLSD args; -- cgit v1.2.3 From 04817c499fb1f1fd156b6788b0720d636450b7aa Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Wed, 4 Mar 2015 15:55:23 +0200 Subject: MAINT-4939 FIXED Remove Abuse Report Pop-Up Dialog --- indra/newview/llfloaterreporter.cpp | 18 ------------------ indra/newview/llfloaterreporter.h | 5 +---- indra/newview/llviewerregion.cpp | 1 - indra/newview/skins/default/xui/en/notifications.xml | 11 ----------- 4 files changed, 1 insertion(+), 34 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index a3b9713e3e..3b2f0e6bac 100755 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -108,14 +108,6 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key) { } -// static -void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg) -{ - if ( LLFloaterReg::instanceVisible("reporter") ) - { - LLNotificationsUtil::add("HelpReportAbuseEmailLL"); - }; -} // virtual BOOL LLFloaterReporter::postBuild() { @@ -149,16 +141,6 @@ BOOL LLFloaterReporter::postBuild() mDefaultSummary = getChild<LLUICtrl>("details_edit")->getValue().asString(); - // send a message and ask for information about this region - - // result comes back in processRegionInfo(..) - LLMessageSystem* msg = gMessageSystem; - msg->newMessage("RequestRegionInfo"); - msg->nextBlock("AgentData"); - msg->addUUID("AgentID", gAgent.getID()); - msg->addUUID("SessionID", gAgent.getSessionID()); - gAgent.sendReliableMessage(); - - // abuser name is selected from a list LLUICtrl* le = getChild<LLUICtrl>("abuser_name_edit"); le->setEnabled( false ); diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index d54e7f6ab0..4e0bd14cc2 100755 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -99,10 +99,7 @@ public: static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result, LLExtStat ext_status); static void addDescription(const std::string& description, LLMeanCollisionData *mcd = NULL); static void setDescription(const std::string& description, LLMeanCollisionData *mcd = NULL); - - // static - static void processRegionInfo(LLMessageSystem* msg); - + void setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id); private: diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 7d82ecf565..bac742b0bb 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -829,7 +829,6 @@ void LLViewerRegion::processRegionInfo(LLMessageSystem* msg, void**) LLRegionInfoModel::instance().update(msg); LLFloaterGodTools::processRegionInfo(msg); LLFloaterRegionInfo::processRegionInfo(msg); - LLFloaterReporter::processRegionInfo(msg); } void LLViewerRegion::setCacheID(const LLUUID& id) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index df4bf6700b..30ff90d1fd 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5379,17 +5379,6 @@ You cannot undo this action. notext="Cancel" yestext="Unlink"/> </notification> - - <notification - icon="alertmodal.tga" - name="HelpReportAbuseEmailLL" - type="alert"> - <unique/> - -Use this tool to report violations of the [http://secondlife.com/corporate/tos.php Terms of Service] and [http://secondlife.com/corporate/cs.php Community Standards]. - -All reported abuses are investigated and resolved. - </notification> <notification icon="alertmodal.tga" -- cgit v1.2.3 From 29bdf1a234a70b02050f7774af873a40a1cfd21d Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Sun, 1 Mar 2015 14:10:54 +0200 Subject: MAINT-4839 FIXED Animation of Mesh Dress doesn't work. MAINT-4165 FIXED Crash on skinned, texture animated geometry with deferred rendering enabled. --- indra/newview/lldrawpoolavatar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index ab96201a63..c92c735584 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1799,9 +1799,12 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) if (mat) { - gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture(LLRender::DIFFUSE_MAP)); - gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP)); + //order is important here LLRender::DIFFUSE_MAP should be last, becouse it change + //(gGL).mCurrTextureUnitIndex gGL.getTexUnit(specular_channel)->bind(face->getTexture(LLRender::SPECULAR_MAP)); + gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP)); + gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture(LLRender::DIFFUSE_MAP), false, true); + LLColor4 col = mat->getSpecularLightColor(); F32 spec = mat->getSpecularLightExponent()/255.f; -- cgit v1.2.3 From 9edbf480c66b0510b983b423c8ed3134671afb52 Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Wed, 4 Mar 2015 19:40:29 +0200 Subject: MAINT-4943 FIXED Crash on location --- indra/newview/llvovolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index fd2e96744a..47d4e5565b 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2054,7 +2054,7 @@ bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture) LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te); //here we just interesting in DIFFUSE_MAP only! - if(LLRender::DIFFUSE_MAP == range_it->second.map && GL_RGBA != texture->getPrimaryFormat()) + if(NULL != cur_material.get() && LLRender::DIFFUSE_MAP == range_it->second.map && GL_RGBA != texture->getPrimaryFormat()) { //ok let's check the diffuse mode switch(cur_material->getDiffuseAlphaMode()) { -- cgit v1.2.3 From 07af9656c3ec0dccfc2ebf86f23bd664c19d8395 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Thu, 5 Mar 2015 21:16:30 +0200 Subject: MAINT-4930 FIXED Fix viewer error checking for max-agent-groups in viewer --- indra/newview/llstartup.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 9da7717b74..b3278b2437 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -240,7 +240,8 @@ static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f); static std::string gAgentStartLocation = "safe"; static bool mLoginStatePastUI = false; -const S32 DEFAULT_MAX_AGENT_GROUPS = 25; +const S32 DEFAULT_MAX_AGENT_GROUPS = 42; +const S32 ALLOWED_MAX_AGENT_GROUPS = 500; boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState")); boost::scoped_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener()); @@ -3489,15 +3490,24 @@ bool process_login_success_response() LLViewerMedia::openIDSetup(openid_url, openid_token); } - if(response.has("max-agent-groups")) { - std::string max_agent_groups(response["max-agent-groups"]); - gMaxAgentGroups = atoi(max_agent_groups.c_str()); - LL_INFOS("LLStartup") << "gMaxAgentGroups read from login.cgi: " - << gMaxAgentGroups << LL_ENDL; + gMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS; + if(response.has("max-agent-groups")) + { + S32 agent_groups = atoi(std::string(response["max-agent-groups"]).c_str()); + if (agent_groups > 0 && agent_groups <= ALLOWED_MAX_AGENT_GROUPS) + { + gMaxAgentGroups = agent_groups; + LL_INFOS("LLStartup") << "gMaxAgentGroups read from login.cgi: " + << gMaxAgentGroups << LL_ENDL; + } + else + { + LL_INFOS("LLStartup") << "Invalid value received, using defaults for gMaxAgentGroups: " + << gMaxAgentGroups << LL_ENDL; + } } else { - gMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS; - LL_INFOS("LLStartup") << "using gMaxAgentGroups default: " + LL_INFOS("LLStartup") << "Missing max-agent-groups, using default value for gMaxAgentGroups: " << gMaxAgentGroups << LL_ENDL; } -- cgit v1.2.3 From 71babaf8824a3b73521ac2486a5e3cea191a7305 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 10 Mar 2015 11:29:17 +0200 Subject: MAINT-147 FIXED Allow follow cam scripts after closing Build tools floater. --- indra/newview/llagentcamera.cpp | 6 +++++- indra/newview/llagentcamera.h | 4 +++- indra/newview/llfloatertools.cpp | 7 +++++++ indra/newview/llfloatertools.h | 2 ++ indra/newview/llviewermenu.cpp | 1 + 5 files changed, 18 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index b0b2cfd435..4f064b68f3 100755 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -147,6 +147,7 @@ LLAgentCamera::LLAgentCamera() : mCameraUpVector(LLVector3::z_axis), // default is straight up mFocusOnAvatar(TRUE), + mAllowChangeToFollow(FALSE), mFocusGlobal(), mFocusTargetGlobal(), mFocusObject(NULL), @@ -1154,8 +1155,10 @@ void LLAgentCamera::updateCamera() mCameraUpVector = mCameraUpVector * gAgentAvatarp->getRenderRotation(); } - if (cameraThirdPerson() && mFocusOnAvatar && LLFollowCamMgr::getActiveFollowCamParams()) + if (cameraThirdPerson() && (mFocusOnAvatar || mAllowChangeToFollow) && LLFollowCamMgr::getActiveFollowCamParams()) { + mAllowChangeToFollow = FALSE; + mFocusOnAvatar = TRUE; changeCameraToFollow(); } @@ -2612,6 +2615,7 @@ void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate) { // keep camera focus point consistent, even though it is now unlocked setFocusGlobal(gAgent.getPositionGlobal() + calcThirdPersonFocusOffset(), gAgent.getID()); + mAllowChangeToFollow = FALSE; } mFocusOnAvatar = focus_on_avatar; diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index 4d0f9a80de..ab793ff316 100755 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -206,13 +206,15 @@ public: void setCameraPosAndFocusGlobal(const LLVector3d& pos, const LLVector3d& focus, const LLUUID &object_id); void clearFocusObject(); void setFocusObject(LLViewerObject* object); + void setAllowChangeToFollow(BOOL focus) { mAllowChangeToFollow = focus; } void setObjectTracking(BOOL track) { mTrackFocusObject = track; } const LLVector3d &getFocusGlobal() const { return mFocusGlobal; } const LLVector3d &getFocusTargetGlobal() const { return mFocusTargetGlobal; } private: LLVector3d mCameraFocusOffset; // Offset from focus point in build mode LLVector3d mCameraFocusOffsetTarget; // Target towards which we are lerping the camera's focus offset - BOOL mFocusOnAvatar; + BOOL mFocusOnAvatar; + BOOL mAllowChangeToFollow; LLVector3d mFocusGlobal; LLVector3d mFocusTargetGlobal; LLPointer<LLViewerObject> mFocusObject; diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 7477b02867..6dbb202c9d 100755 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -92,6 +92,7 @@ // Globals LLFloaterTools *gFloaterTools = NULL; bool LLFloaterTools::sShowObjectCost = true; +bool LLFloaterTools::sPreviousFocusOnAvatar = false; const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] = { @@ -891,6 +892,12 @@ void LLFloaterTools::onClose(bool app_quitting) // prepare content for next call mPanelContents->clearContents(); + + if(sPreviousFocusOnAvatar) + { + sPreviousFocusOnAvatar = false; + gAgentCamera.setAllowChangeToFollow(TRUE); + } } void click_popup_info(void*) diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 189bae46c2..df481b8d4c 100755 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -201,11 +201,13 @@ private: std::map<std::string, std::string> mStatusText; + protected: LLSD mMediaSettings; public: static bool sShowObjectCost; + static bool sPreviousFocusOnAvatar; }; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b77d3ca1be..22a032563e 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2695,6 +2695,7 @@ void handle_object_edit() if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) { + LLFloaterTools::sPreviousFocusOnAvatar = true; LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); if (selection->getSelectType() == SELECT_TYPE_HUD || !gSavedSettings.getBOOL("EditCameraMovement")) -- cgit v1.2.3 From ac42b2c3c4d12678984c559fcc2f6019e02536a4 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 11 Mar 2015 11:39:32 +0200 Subject: MAINT-4985 FIXED Update Return All Confirmation Message to Reflect Impact --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 30ff90d1fd..39e09cae79 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -783,7 +783,7 @@ Objects: [N] icon="alertmodal.tga" name="ReturnAllTopObjects" type="alertmodal"> -Are you sure you want to return all listed objects back to their owner's inventory? +Are you sure you want to return all listed objects back to their owner's inventory? This will return ALL scripted objects in the region! <tag>confirm</tag> <usetemplate name="okcancelbuttons" -- cgit v1.2.3 From ad5d8508b48181ef362bbb0288705496b7861298 Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Tue, 17 Mar 2015 12:31:07 +0200 Subject: MAINT-4971 FIXED [MAINT-RC] Own avatar is often totally invisible at login with no way to fix apart from a relog. Other avatars are also often invisible. --- indra/newview/llvoavatar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3686ccb48f..7292af99a4 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -716,7 +716,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mIsEditingAppearance(FALSE), mUseLocalAppearance(FALSE), mLastUpdateRequestCOFVersion(-1), - mLastUpdateReceivedCOFVersion(-1) + mLastUpdateReceivedCOFVersion(-1), + mCachedMuteListUpdateTime(0), + mCachedInMuteList(false) { //VTResume(); // VTune -- cgit v1.2.3 From fc33f396d46d5425ea2737731c6ba23d81b323bd Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 17 Mar 2015 18:26:18 +0200 Subject: MAINT-4987 FIXED After cancelling the search term when using "Find all links" in Recent items tab of inventory, full inventory contents display in Recent items tab. --- indra/newview/llinventoryfilter.cpp | 39 ++++++++++++++++++++++++++++------ indra/newview/llinventoryfilter.h | 4 ++++ indra/newview/llpanelmaininventory.cpp | 8 +++---- 3 files changed, 40 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index dc8b15a5bf..9f6a042e41 100755 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -68,7 +68,8 @@ LLInventoryFilter::LLInventoryFilter(const Params& p) : mName(p.name), mFilterModified(FILTER_NONE), mEmptyLookupMessage("InventoryNoMatchingItems"), - mFilterOps(p.filter_ops), + mFilterOps(p.filter_ops), + mBackupFilterOps(mFilterOps), mFilterSubString(p.substring), mCurrentGeneration(0), mFirstRequiredGeneration(0), @@ -546,6 +547,21 @@ void LLInventoryFilter::setFilterSubString(const std::string& string) setModified(FILTER_RESTART); } + // Cancel out filter links once the search string is modified + if (mFilterOps.mFilterLinks == FILTERLINK_ONLY_LINKS) + { + if (mBackupFilterOps.mFilterLinks == FILTERLINK_ONLY_LINKS) + { + // we started viewer/floater in 'only links' mode + mFilterOps.mFilterLinks = FILTERLINK_INCLUDE_LINKS; + } + else + { + mFilterOps = mBackupFilterOps; + setModified(FILTER_RESTART); + } + } + // Cancel out UUID once the search string is modified if (mFilterOps.mFilterTypes == FILTERTYPE_UUID) { @@ -553,11 +569,6 @@ void LLInventoryFilter::setFilterSubString(const std::string& string) mFilterOps.mFilterUUID == LLUUID::null; setModified(FILTER_RESTART); } - - // Cancel out filter links once the search string is modified - { - mFilterOps.mFilterLinks = FILTERLINK_INCLUDE_LINKS; - } } } @@ -748,6 +759,22 @@ void LLInventoryFilter::setShowFolderState(EFolderShow state) } } +void LLInventoryFilter::setFindAllLinksMode(const std::string &search_name, const LLUUID& search_id) +{ + // Save a copy of settings so that we will be able to restore it later + // but make sure we are not searching for links already + if(mFilterOps.mFilterLinks != FILTERLINK_ONLY_LINKS) + { + mBackupFilterOps = mFilterOps; + } + + // set search options + setFilterSubString(search_name); + setFilterUUID(search_id); + setShowFolderState(SHOW_NON_EMPTY_FOLDERS); + setFilterLinks(FILTERLINK_ONLY_LINKS); +} + void LLInventoryFilter::markDefault() { mDefaultFilterOps = mFilterOps; diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 5e18ad4d20..6e35c48c7b 100755 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -193,6 +193,9 @@ public: void setFilterLinks(U64 filter_link); U64 getFilterLinks() const; + // sets params for Link-only search and backs up search settings for future restoration + void setFindAllLinksMode(const std::string &search_name, const LLUUID& search_id); + // +-------------------------------------------------------------------+ // + Execution And Results // +-------------------------------------------------------------------+ @@ -267,6 +270,7 @@ private: FilterOps mFilterOps; FilterOps mDefaultFilterOps; + FilterOps mBackupFilterOps; // for backup purposes when leaving 'search link' mode std::string mFilterSubString; std::string mFilterSubStringOrig; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index eb037577be..5b5378838d 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1134,14 +1134,12 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) const LLUUID& item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID(); const std::string &item_name = current_item->getViewModelItem()->getName(); mFilterSubString = item_name; + LLInventoryFilter &filter = mActivePanel->getFilter(); - filter.setFilterSubString(item_name); - mFilterEditor->setText(item_name); + filter.setFindAllLinksMode(item_name, item_id); + mFilterEditor->setText(item_name); mFilterEditor->setFocus(TRUE); - filter.setFilterUUID(item_id); - filter.setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - filter.setFilterLinks(LLInventoryFilter::FILTERLINK_ONLY_LINKS); } } -- cgit v1.2.3 From f30b54b64fcb6667571bf2340b396fb700ff6965 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 18 Mar 2015 18:11:09 +0200 Subject: MAINT-4993 FIXED Favorite landmarks randomly reorder between sessions or when adding or removing a landmark from favorites --- indra/newview/llfavoritesbar.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 6c5b5be720..4ee81f4afa 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1653,6 +1653,17 @@ void LLFavoritesOrderStorage::cleanup() mSortIndexes.swap(aTempMap); } +// See also LLInventorySort where landmarks in the Favorites folder are sorted. +class LLViewerInventoryItemSort +{ +public: + bool operator()(const LLPointer<LLViewerInventoryItem>& a, const LLPointer<LLViewerInventoryItem>& b) + { + return LLFavoritesOrderStorage::instance().getSortIndex(a->getUUID()) + < LLFavoritesOrderStorage::instance().getSortIndex(b->getUUID()); + } +}; + void LLFavoritesOrderStorage::saveOrder() { LLInventoryModel::cat_array_t cats; @@ -1660,6 +1671,7 @@ void LLFavoritesOrderStorage::saveOrder() LLIsType is_type(LLAssetType::AT_LANDMARK); LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); gInventory.collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type); + std::sort(items.begin(), items.end(), LLViewerInventoryItemSort()); saveItemsOrder(items); } @@ -1685,16 +1697,7 @@ void LLFavoritesOrderStorage::saveItemsOrder( const LLInventoryModel::item_array gInventory.notifyObservers(); } -// See also LLInventorySort where landmarks in the Favorites folder are sorted. -class LLViewerInventoryItemSort -{ -public: - bool operator()(const LLPointer<LLViewerInventoryItem>& a, const LLPointer<LLViewerInventoryItem>& b) - { - return LLFavoritesOrderStorage::instance().getSortIndex(a->getUUID()) - < LLFavoritesOrderStorage::instance().getSortIndex(b->getUUID()); - } -}; + // * @param source_item_id - LLUUID of the source item to be moved into new position // * @param target_item_id - LLUUID of the target item before which source item should be placed. -- cgit v1.2.3 From 3805808cafd1a78436f1906f5e554855fd3cb3f7 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Wed, 18 Mar 2015 19:24:58 +0200 Subject: MAINT-4872 FIXED Display name for shapes was not updated in certain cases --- indra/newview/llagentwearables.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 010a39a6e7..f6ba879fa7 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1011,7 +1011,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it } // Update only inventory in this case - ordering of wearables with the same asset id has no effect. - // Causes the two-alphas error case in MAINT-4158. + // Updating wearables in this case causes the two-alphas error in MAINT-4158. // We should actually disallow wearing two wearables with the same asset id. if (curr_wearable->getName() != new_item->getName() || curr_wearable->getItemID() != new_item->getUUID()) @@ -1065,7 +1065,8 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it if (new_wearable) { const LLWearableType::EType type = new_wearable->getType(); - + + LLUUID old_wearable_id = new_wearable->getItemID(); new_wearable->setName(new_item->getName()); new_wearable->setItemID(new_item->getUUID()); @@ -1073,11 +1074,18 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it { // exactly one wearable per body part setWearable(type,0,new_wearable); + if (old_wearable_id.notNull()) + { + // we changed id before setting wearable, update old item manually + // to complete the swap. + gInventory.addChangedMask(LLInventoryObserver::LABEL, old_wearable_id); + } } else { pushWearable(type,new_wearable); } + const BOOL removed = FALSE; wearableUpdated(new_wearable, removed); } -- cgit v1.2.3 From 4ec9637299e482cec47762cbbc74bcce7d710639 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 25 Mar 2015 11:29:39 +0200 Subject: MAINT-5016 FIXED Skip messages from muted objects. --- indra/newview/llviewermessage.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 056114cb6b..2704aa2050 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3601,6 +3601,11 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && LLMuteList::getInstance()->isLinden(from_name); + if (is_muted && (chat.mSourceType == CHAT_SOURCE_OBJECT)) + { + return; + } + BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible); chatter = gObjectList.findObject(from_id); if (chatter) -- cgit v1.2.3 From 321a054a7a7ec5e2538cc82d4cf850078ea5640c Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Mon, 30 Mar 2015 20:01:02 +0300 Subject: MAINT-5037 FIXED Viewer is operable under the leaving call confirmation dialog --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 39e09cae79..05b903b4bf 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -8017,7 +8017,7 @@ We cannot display a preview of this texture because it is no-copy and/or no-tran <notification icon="alertmodal.tga" name="ConfirmLeaveCall" - type="alert"> + type="alertmodal"> Are you sure you want to leave this call? <tag>confirm</tag> <tag>voice</tag> -- cgit v1.2.3 From 802302a31c06f2ca98875d73ff424ae3d9df195f Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Thu, 26 Mar 2015 18:05:47 +0200 Subject: MAINT-3818 FIXED Certain dae files that used to display skin weights successfully now crash when ticking skin weights in model preview on ALL viewers --- indra/newview/llfloatermodelpreview.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index e0a998c369..3f62d94dae 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -4860,7 +4860,7 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights) LLModel* base_mdl = *base_iter; base_iter++; - for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i) + for (S32 i = 0, e = mdl->getNumVolumeFaces(); i < e; ++i) { const LLVolumeFace &vf = mdl->getVolumeFace(i); U32 num_vertices = vf.mNumVertices; @@ -5292,7 +5292,7 @@ BOOL LLModelPreview::render() gGL.multMatrix((GLfloat*) mat.mMatrix); - for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i) + for (U32 i = 0, e = mVertexBuffer[mPreviewLOD][model].size(); i < e; ++i) { LLVertexBuffer* buffer = mVertexBuffer[mPreviewLOD][model][i]; @@ -5567,7 +5567,7 @@ BOOL LLModelPreview::render() if (!model->mSkinWeights.empty()) { - for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i) + for (U32 i = 0, e = mVertexBuffer[mPreviewLOD][model].size(); i < e; ++i) { LLVertexBuffer* buffer = mVertexBuffer[mPreviewLOD][model][i]; @@ -5636,6 +5636,7 @@ BOOL LLModelPreview::render() position[j] = v; } + llassert(model->mMaterialList.size() > i); const std::string& binding = instance.mModel->mMaterialList[i]; const LLImportMaterial& material = instance.mMaterial[binding]; -- cgit v1.2.3 From a6ff7db10171132ec2c8f6a3d3c133509bd760f1 Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Mon, 30 Mar 2015 20:11:27 +0300 Subject: MAINT-3585 FIXED (Crashes when attempting to upload image.) --- indra/newview/lllocalbitmaps.cpp | 3 --- indra/newview/llviewerdisplay.cpp | 8 -------- indra/newview/llviewerdisplay.h | 2 -- 3 files changed, 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 4a89fc92b4..619140e922 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -844,9 +844,6 @@ bool LLLocalBitmapMgr::addUnit() LLFilePicker& picker = LLFilePicker::instance(); if (picker.getMultipleOpenFiles(LLFilePicker::FFLOAD_IMAGE)) { - //For fix problem with Core Flow view on OSX - restoreGLContext(); - sTimer.stopTimer(); std::string filename = picker.getFirstFile(); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 9ef911616e..ea9463da04 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1344,14 +1344,6 @@ void swap() gDisplaySwapBuffers = TRUE; } -void restoreGLContext() -{ - if(gViewerWindow && gViewerWindow->getWindow()) - { - gViewerWindow->getWindow()->restoreGLContext(); - } -} - void renderCoordinateAxes() { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); diff --git a/indra/newview/llviewerdisplay.h b/indra/newview/llviewerdisplay.h index dcc78fe42f..f6467d7f93 100755 --- a/indra/newview/llviewerdisplay.h +++ b/indra/newview/llviewerdisplay.h @@ -34,8 +34,6 @@ void display_cleanup(); void display(BOOL rebuild = TRUE, F32 zoom_factor = 1.f, int subfield = 0, BOOL for_snapshot = FALSE); -void restoreGLContext(); - extern BOOL gDisplaySwapBuffers; extern BOOL gDepthDirty; extern BOOL gTeleportDisplay; -- cgit v1.2.3 From 6cf6c4ba574833f094984f0c883b614a4201121f Mon Sep 17 00:00:00 2001 From: Glenn Glazer <coyot@lindenlab.com> Date: Mon, 30 Mar 2015 13:43:31 -0700 Subject: fix for MAINT-5021: landmarks not populating correctly when parcel data is missing --- indra/newview/llpanellandmarkinfo.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 63ddc05037..d4894d4a42 100755 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -128,12 +128,16 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); std::string name = parcel_mgr->getAgentParcelName(); LLVector3 agent_pos = gAgent.getPositionAgent(); + + std::string desc; + LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_FULL, agent_pos); + mNotesEditor->setText(desc); if (name.empty()) { - S32 region_x = llround(agent_pos.mV[VX]); - S32 region_y = llround(agent_pos.mV[VY]); - S32 region_z = llround(agent_pos.mV[VZ]); + S32 region_x = ll_round(agent_pos.mV[VX]); + S32 region_y = ll_round(agent_pos.mV[VY]); + S32 region_z = ll_round(agent_pos.mV[VZ]); std::string region_name; LLViewerRegion* region = parcel_mgr->getSelectionRegion(); @@ -143,7 +147,7 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) } else { - region_name = getString("unknown"); + region_name = desc; } mLandmarkTitleEditor->setText(llformat("%s (%d, %d, %d)", @@ -154,10 +158,6 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) mLandmarkTitleEditor->setText(name); } - std::string desc; - LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_FULL, agent_pos); - mNotesEditor->setText(desc); - // Moved landmark creation here from LLPanelLandmarkInfo::processParcelInfo() // because we use only agent's current coordinates instead of waiting for // remote parcel request to complete. -- cgit v1.2.3 From de767ca0de624ed37fc8dbdfb2dc4b0ac2041eeb Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 31 Mar 2015 12:39:11 +0300 Subject: build fix --- indra/newview/llpanellandmarkinfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index d4894d4a42..154ad4f450 100755 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -135,9 +135,9 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) if (name.empty()) { - S32 region_x = ll_round(agent_pos.mV[VX]); - S32 region_y = ll_round(agent_pos.mV[VY]); - S32 region_z = ll_round(agent_pos.mV[VZ]); + S32 region_x = llround(agent_pos.mV[VX]); + S32 region_y = llround(agent_pos.mV[VY]); + S32 region_z = llround(agent_pos.mV[VZ]); std::string region_name; LLViewerRegion* region = parcel_mgr->getSelectionRegion(); -- cgit v1.2.3 From 3be738dc6cd46bc7666403178f1ae61a26c67f83 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 31 Mar 2015 12:40:43 +0300 Subject: MAINT-5020 FIXED Determine the need to use bracket via chat source. --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index f0bd63ba46..b81b95462e 100755 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -934,7 +934,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL // compact mode: show a timestamp and name if (use_plain_text_chat_history) { - square_brackets = chat.mFromName == SYSTEM_FROM; + square_brackets = chat.mSourceType == CHAT_SOURCE_SYSTEM; LLStyle::Params timestamp_style(body_message_params); -- cgit v1.2.3 From 65e6cc6704bcd19a471f06fb6ab7621f2044dfa4 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 31 Mar 2015 12:51:07 +0300 Subject: MAINT-5039 FIXED Viewer crashes at logout if wearing clothing textured with a local texture --- indra/newview/lllocalbitmaps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 619140e922..2550c10c89 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -129,7 +129,7 @@ LLLocalBitmap::LLLocalBitmap(std::string filename) LLLocalBitmap::~LLLocalBitmap() { // replace IDs with defaults, if set to do so. - if(LL_LOCAL_REPLACE_ON_DEL && mValid) // fix for STORM-1837 + if(LL_LOCAL_REPLACE_ON_DEL && mValid && gAgentAvatarp) // fix for STORM-1837 { replaceIDs(mWorldID, IMG_DEFAULT); LLLocalBitmapMgr::doRebake(); -- cgit v1.2.3 From a3cc40c06efcc0618c69b750e88e326d399f9bd5 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Wed, 1 Apr 2015 16:59:24 +0300 Subject: MAINT-5031 FIXED Attachments aren't highlighted in the inventory after using 'Show original' --- indra/newview/llinventoryfunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 1abc09bf3b..a19eed73db 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -458,7 +458,7 @@ void show_item_original(const LLUUID& item_uuid) { return; } - active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_NO); + active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_YES); if(do_reset_inventory_filter) { -- cgit v1.2.3 From 12d19eec352e82314ac1ff3dfbfd5c9b9aa74a31 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 3 Apr 2015 12:48:20 +0300 Subject: MAINT-5041 FIXED Current Window snapshot option is restored. Hide height/width spinners when selecting this option. --- indra/newview/llpanelsnapshotinventory.cpp | 11 +++++++++++ .../newview/skins/default/xui/en/panel_snapshot_inventory.xml | 4 ++++ 2 files changed, 15 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index c8a201a5c8..c55e230b5e 100755 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -48,6 +48,8 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + void onResolutionCommit(LLUICtrl* ctrl); + private: /*virtual*/ std::string getWidthSpinnerName() const { return "inventory_snapshot_width"; } /*virtual*/ std::string getHeightSpinnerName() const { return "inventory_snapshot_height"; } @@ -72,6 +74,8 @@ BOOL LLPanelSnapshotInventory::postBuild() { getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE); getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE); + + getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionCommit, this, _1)); return LLPanelSnapshot::postBuild(); } @@ -89,6 +93,13 @@ void LLPanelSnapshotInventory::updateControls(const LLSD& info) getChild<LLUICtrl>("save_btn")->setEnabled(have_snapshot); } +void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) +{ + BOOL current_window_selected = (getChild<LLComboBox>(getImageSizeComboName())->getCurrentIndex() == 3); + getChild<LLSpinCtrl>(getWidthSpinnerName())->setVisible(!current_window_selected); + getChild<LLSpinCtrl>(getHeightSpinnerName())->setVisible(!current_window_selected); +} + void LLPanelSnapshotInventory::onSend() { LLFloaterSnapshot::saveTexture(); diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml index ea579c6dae..d019a0a310 100755 --- a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml @@ -59,6 +59,10 @@ label="Large (512x512)" name="Large(512x512)" value="[i512,i512]" /> + <combo_box.item + label="Current Window(512x512)" + name="CurrentWindow" + value="[i0,i0]" /> <combo_box.item label="Custom" name="Custom" -- cgit v1.2.3 From e538853d8d0f8ef06ed2ba7cefc4d09bf2617099 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 3 Apr 2015 13:28:30 +0300 Subject: MAINT-5030 FIXED Right side toolbar is not restores to default parameters --- indra/newview/app_settings/toolbars.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml index d61aee9a14..36e4eb91fd 100755 --- a/indra/newview/app_settings/toolbars.xml +++ b/indra/newview/app_settings/toolbars.xml @@ -23,4 +23,7 @@ <command name="snapshot"/> <command name="facebook"/> </left_toolbar> + <right_toolbar + button_display_mode="icons_only"> + </right_toolbar> </toolbars> -- cgit v1.2.3 From 4d1072a0a8912748bc62d42617cc6d5679a1bf20 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Fri, 3 Apr 2015 18:36:14 +0300 Subject: MAINT-4878 FIXED Outfits worn from library copy the subfolders too --- indra/newview/llaisapi.cpp | 7 ++++++- indra/newview/llaisapi.h | 2 +- indra/newview/llappearancemgr.cpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 9d887a61f1..714b456ae7 100755 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -315,7 +315,8 @@ SlamFolderCommand::SlamFolderCommand(const LLUUID& folder_id, const LLSD& conten CopyLibraryCategoryCommand::CopyLibraryCategoryCommand(const LLUUID& source_id, const LLUUID& dest_id, - LLPointer<LLInventoryCallback> callback): + LLPointer<LLInventoryCallback> callback, + bool copy_subfolders): AISCommand(callback) { std::string cap; @@ -328,6 +329,10 @@ CopyLibraryCategoryCommand::CopyLibraryCategoryCommand(const LLUUID& source_id, LLUUID tid; tid.generate(); std::string url = cap + std::string("/category/") + source_id.asString() + "?tid=" + tid.asString(); + if (!copy_subfolders) + { + url += ",depth=0"; + } LL_INFOS() << url << LL_ENDL; LLCurl::ResponderPtr responder = this; LLSD headers; diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index 5a2ec94af9..bb483fb133 100755 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -124,7 +124,7 @@ private: class CopyLibraryCategoryCommand: public AISCommand { public: - CopyLibraryCategoryCommand(const LLUUID& source_id, const LLUUID& dest_id, LLPointer<LLInventoryCallback> callback); + CopyLibraryCategoryCommand(const LLUUID& source_id, const LLUUID& dest_id, LLPointer<LLInventoryCallback> callback, bool copy_subfolders = true); protected: /* virtual */ bool getResponseUUID(const LLSD& content, LLUUID& id); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c6971edf9f..0ac0dccc4e 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2357,7 +2357,7 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool LLPointer<LLInventoryCallback> copy_cb = new LLWearCategoryAfterCopy(append); LLPointer<LLInventoryCallback> track_cb = new LLTrackPhaseWrapper( std::string("wear_inventory_category_callback"), copy_cb); - LLPointer<AISCommand> cmd_ptr = new CopyLibraryCategoryCommand(category->getUUID(), parent_id, track_cb); + LLPointer<AISCommand> cmd_ptr = new CopyLibraryCategoryCommand(category->getUUID(), parent_id, track_cb, false); ais_ran=cmd_ptr->run_command(); } -- cgit v1.2.3 From 42471d556b6209ad830f11ddb158cd2f9d152850 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 7 Apr 2015 10:45:35 +0300 Subject: MAINT-5059 FIXED Update snapshot as well as thumbnail. --- indra/newview/llfloatersnapshot.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 08a0b74494..f53801b735 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -587,7 +587,11 @@ void LLFloaterSnapshot::Impl::onClickUICheck(LLUICtrl *ctrl, void* data) LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; if (view) { - checkAutoSnapshot(getPreviewView(view), TRUE); + LLSnapshotLivePreview* previewp = getPreviewView(view); + if(previewp) + { + previewp->updateSnapshot(TRUE, TRUE); + } updateControls(view); } } @@ -601,7 +605,11 @@ void LLFloaterSnapshot::Impl::onClickHUDCheck(LLUICtrl *ctrl, void* data) LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; if (view) { - checkAutoSnapshot(getPreviewView(view), TRUE); + LLSnapshotLivePreview* previewp = getPreviewView(view); + if(previewp) + { + previewp->updateSnapshot(TRUE, TRUE); + } updateControls(view); } } -- cgit v1.2.3 From ca446ad0b771fa4380bfdb671b1dc29e70a993bd Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 7 Apr 2015 12:06:23 +0300 Subject: MAINT-5036 FIXED Blocked user can send invites to group --- indra/newview/llmutelist.cpp | 16 ++++++++++++++++ indra/newview/llmutelist.h | 5 ++++- indra/newview/llviewermessage.cpp | 7 +++++++ 3 files changed, 27 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 65ac11092c..d79baf90e7 100755 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -646,6 +646,22 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) c return legacy_it != mLegacyMutes.end(); } +BOOL LLMuteList::isMuted(const std::string& username, U32 flags) const +{ + mute_set_t::const_iterator mute_iter = mMutes.begin(); + while(mute_iter != mMutes.end()) + { + // can't convert "leha.test" into "LeHa TesT" so username comparison is more reliable + if (mute_iter->mType == LLMute::AGENT + && LLCacheName::buildUsername(mute_iter->mName) == username) + { + return TRUE; + } + mute_iter++; + } + return FALSE; +} + //----------------------------------------------------------------------------- // requestFromServer() //----------------------------------------------------------------------------- diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h index 3e998b4f0e..4e7b6ee880 100755 --- a/indra/newview/llmutelist.h +++ b/indra/newview/llmutelist.h @@ -101,7 +101,10 @@ public: // Name is required to test against legacy text-only mutes. BOOL isMuted(const LLUUID& id, const std::string& name = LLStringUtil::null, U32 flags = 0) const; - + + // Workaround for username-based mute search, a lot of string conversions so use cautiously + BOOL isMuted(const std::string& username, U32 flags = 0) const; + // Alternate (convenience) form for places we don't need to pass the name, but do need flags BOOL isMuted(const LLUUID& id, U32 flags) const { return isMuted(id, LLStringUtil::null, flags); }; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2704aa2050..99c7673f85 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2707,6 +2707,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) break; case IM_GROUP_INVITATION: { + if (!is_muted) + { + // group is not blocked, but we still need to check agent that sent the invitation + // and we have no agent's id + // Note: server sends username "first.last". + is_muted |= LLMuteList::getInstance()->isMuted(name); + } if (is_do_not_disturb || is_muted) { send_do_not_disturb_message(msg, from_id); -- cgit v1.2.3 From 00f18efe75cdf5d70b2f7f66ce702fc3bd25dd5d Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Wed, 8 Apr 2015 17:05:47 +0300 Subject: MAINT-5063 FIXED SLurl display text shows name of parcel in adjacent region when mousing over parcel after region crossing --- indra/newview/llviewerparcelmgr.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index d574dec11d..449ac04ae2 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1594,8 +1594,14 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use } else if (local_id == parcel_mgr.mAgentParcel->getLocalID()) { - // updated agent parcel - parcel_mgr.mAgentParcel->unpackMessage(msg); + // Parcels in different regions can have same ids. + LLViewerRegion* parcel_region = LLWorld::getInstance()->getRegion( msg->getSender() ); + LLViewerRegion* agent_region = gAgent.getRegion(); + if (parcel_region && agent_region && parcel_region->getRegionID() == agent_region->getRegionID()) + { + // updated agent parcel + parcel_mgr.mAgentParcel->unpackMessage(msg); + } } } -- cgit v1.2.3 From 749cf1b257267dee5ba7339d5269b1b103f28dc0 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Wed, 15 Apr 2015 14:15:43 +0300 Subject: MAINT-5024 new crash in LLInspectToast --- indra/newview/llinspecttoast.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp index d04378daaf..47560341e7 100755 --- a/indra/newview/llinspecttoast.cpp +++ b/indra/newview/llinspecttoast.cpp @@ -47,6 +47,7 @@ public: /*virtual*/ void onOpen(const LLSD& notification_id); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); + /*virtual*/ void removeChild(LLView* child); private: void onToastDestroy(LLToast * toast); @@ -98,7 +99,7 @@ void LLInspectToast::onOpen(const LLSD& notification_id) panel->setMouseOpaque(FALSE); if(mPanel != NULL && mPanel->getParent() == this) { - removeChild(mPanel); + LLInspect::removeChild(mPanel); } addChild(panel); panel->setFocus(TRUE); @@ -121,6 +122,16 @@ BOOL LLInspectToast::handleToolTip(S32 x, S32 y, MASK mask) return LLFloater::handleToolTip(x, y, mask); } +// virtual +void LLInspectToast::removeChild(LLView* child) +{ + if (mPanel == child) + { + mPanel = NULL; + } + LLInspect::removeChild(child); +} + void LLInspectToast::onToastDestroy(LLToast * toast) { closeFloater(false); -- cgit v1.2.3 From b2200f06dacfde4fe62a8f7f252e941c65d71c72 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Wed, 22 Apr 2015 16:06:48 -0400 Subject: MAINT-5147: correct menu colors for test viewers --- indra/newview/llappviewer.cpp | 4 +-- indra/newview/llversioninfo.cpp | 40 ++++++++++++++++++++++++++++ indra/newview/llversioninfo.h | 9 +++++++ indra/newview/llviewerwindow.cpp | 56 +++++++++++++++++++++------------------- 4 files changed, 80 insertions(+), 29 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 54c5d1b9f4..2150955a32 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3088,8 +3088,8 @@ void LLAppViewer::initUpdater() U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod"); bool willing_to_test; LL_DEBUGS("UpdaterService") << "channel " << channel << LL_ENDL; - static const boost::regex is_test_channel("\\bTest$"); - if (boost::regex_search(channel, is_test_channel)) + + if (LLVersionInfo::TEST_VIEWER == LLVersionInfo::getViewerMaturity()) { LL_INFOS("UpdaterService") << "Test build: overriding willing_to_test by sending testno" << LL_ENDL; willing_to_test = false; diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 6a8fad0134..178ea3d50e 100755 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -133,3 +133,43 @@ void LLVersionInfo::resetChannel(const std::string& channel) sWorkingChannelName = channel; sVersionChannel.clear(); // Reset version and channel string til next use. } + +//static +ViewerMaturity getViewerMaturity() +{ + ViewerMaturity maturity; + + std::string channel = getChannel(); + + static const boost::regex is_test_channel("\\bTest\\b"); + static const boost::regex is_beta_channel("\\bBeta\\b"); + static const boost::regex is_project_channel("\\bProject\\b"); + static const boost::regex is_release_channel("\\bRelease\\b"); + + if (boost::regex_search(channel, is_release_channel)) + { + maturity = RELEASE_VIEWER; + } + else if (boost::regex_search(channel, is_beta_channel)) + { + maturity = BETA_VIEWER; + } + else if (boost::regex_search(channel, is_project_channel)) + { + maturity = PROJECT_VIEWER; + } + else if (boost::regex_search(channel, is_test_channel)) + { + maturity = TEST_VIEWER; + } + else + { + LL_WARNS() << "Channel '" << channel + << "' does not follow naming convention, assuming Test" + << LL_ENDL; + maturity = TEST_VIEWER; + } + return maturity; +} + + diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h index 077105cae8..4e75535ec5 100755 --- a/indra/newview/llversioninfo.h +++ b/indra/newview/llversioninfo.h @@ -68,6 +68,15 @@ public: /// reset the channel name used by the viewer. static void resetChannel(const std::string& channel); + + typedef enum + { + TEST_VIEWER, + PROJECT_VIEWER, + BETA_VIEWER, + RELEASE_VIEWER + } ViewerMaturity; + static ViewerMaturity getViewerMaturity(); }; #endif diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 756248a356..1f08641008 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2336,12 +2336,6 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) LLSD args; LLColor4 new_bg_color; - // no l10n problem because channel is always an english string - std::string channel = LLVersionInfo::getChannel(); - static const boost::regex is_beta_channel("\\bBeta\\b"); - static const boost::regex is_project_channel("\\bProject\\b"); - static const boost::regex is_test_channel("\\bTest$"); - // god more important than project, proj more important than grid if ( god_mode ) { @@ -2354,27 +2348,35 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" ); } } - else if (boost::regex_search(channel, is_beta_channel)) - { - new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBetaBgColor" ); - } - else if (boost::regex_search(channel, is_project_channel)) - { - new_bg_color = LLUIColorTable::instance().getColor( "MenuBarProjectBgColor" ); - } - else if (boost::regex_search(channel, is_test_channel)) - { - new_bg_color = LLUIColorTable::instance().getColor( "MenuBarTestBgColor" ); - } - else if(!LLGridManager::getInstance()->isInProductionGrid()) - { - new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); - } - else - { - new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBgColor" ); - } - + else + { + switch (LLVersionInfo::getViewerMaturity()) + { + case LLVersionInfo::TEST_VIEWER: + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarTestBgColor" ); + break; + + case LLVersionInfo::PROJECT_VIEWER: + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarProjectBgColor" ); + break; + + case LLVersionInfo::BETA_VIEWER: + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBetaBgColor" ); + break; + + case LLVersionInfo::RELEASE_VIEWER: + if(!LLGridManager::getInstance()->isInProductionGrid()) + { + new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); + } + else + { + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBgColor" ); + } + break; + } + } + if(gMenuBarView) { gMenuBarView->setBackgroundColor( new_bg_color ); -- cgit v1.2.3 From a6a428910cccdbf4ef137399c09be185226dd8f5 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 28 Apr 2015 13:54:15 +0300 Subject: build fix --- indra/newview/llversioninfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index ec831738a9..e53de8be32 100755 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -29,6 +29,7 @@ #include <iostream> #include <sstream> #include "llversioninfo.h" +#include <boost/regex.hpp> #if ! defined(LL_VIEWER_CHANNEL) \ || ! defined(LL_VIEWER_VERSION_MAJOR) \ @@ -133,7 +134,7 @@ void LLVersionInfo::resetChannel(const std::string& channel) } //static -ViewerMaturity getViewerMaturity() +LLVersionInfo::ViewerMaturity LLVersionInfo::getViewerMaturity() { ViewerMaturity maturity; -- cgit v1.2.3 From 4647dc6fe7aacccf089d214bf26b47f417bd7ae6 Mon Sep 17 00:00:00 2001 From: pavelkproductengine <none@none> Date: Wed, 6 May 2015 16:55:32 +0300 Subject: Fixed Mac build after tools update - stripped unsused symbols --- indra/newview/llfloatersnapshot.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index bf127102c1..185765e390 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -56,7 +56,6 @@ LLSnapshotFloaterView* gSnapshotFloaterView = NULL; const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; -const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view"); -- cgit v1.2.3 From 064d0fec06b49abeef5ddfaec5abd6fae7e0cf03 Mon Sep 17 00:00:00 2001 From: pavelkproductengine <pavelkproductengine@lindenlab.com> Date: Tue, 9 Jun 2015 20:01:53 +0300 Subject: MAINT-5259 FIXED Login screen displayed on English after installation on other language --- indra/newview/installers/windows/installer_template.nsi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 8c8b4971cf..95cdf90e99 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -298,6 +298,11 @@ CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' +# Create *.bat file to specify lang params on first run from installer - see MAINT-5259 +FileOpen $9 "$INSTDIR\autorun.bat" w +FileWrite $9 'start "$INSTDIR\$INSTEXE" "$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM$\r$\n' +FileClose $9 + # Write registry WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" @@ -682,7 +687,7 @@ Call CheckWindowsServPack # Warn if not on the latest SP before asking to launc Push $R0 # Option value, unused StrCmp $SKIP_AUTORUN "true" +2; # Assumes SetOutPath $INSTDIR - Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTEXE"' + Exec '"$WINDIR\explorer.exe" "$INSTDIR\autorun.bat"' Pop $R0 FunctionEnd -- cgit v1.2.3 From 604914a7bd309de176901b9d14991e525a90d649 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Thu, 7 May 2015 16:22:44 +0300 Subject: MAINT-4812 Restore sending snapshot as email from the viewer. --- indra/newview/CMakeLists.txt | 1 + indra/newview/llfloatersnapshot.cpp | 30 ++- indra/newview/llfloatersnapshot.h | 1 + indra/newview/llpanelsnapshotoptions.cpp | 7 + indra/newview/llpanelsnapshotpostcard.cpp | 244 +++++++++++++++++++++ indra/newview/llsnapshotlivepreview.cpp | 2 +- indra/newview/llsnapshotlivepreview.h | 2 +- indra/newview/llviewermessage.cpp | 1 + .../default/xui/de/panel_snapshot_postcard.xml | 21 ++ .../skins/default/xui/en/floater_snapshot.xml | 6 + .../default/xui/en/panel_snapshot_options.xml | 17 ++ .../default/xui/en/panel_snapshot_postcard.xml | 103 +++++++++ .../default/xui/es/panel_snapshot_postcard.xml | 18 ++ .../default/xui/fr/panel_snapshot_postcard.xml | 18 ++ .../default/xui/it/panel_snapshot_postcard.xml | 18 ++ .../default/xui/ja/panel_snapshot_postcard.xml | 18 ++ .../default/xui/pt/panel_snapshot_postcard.xml | 18 ++ .../default/xui/ru/panel_snapshot_postcard.xml | 18 ++ .../default/xui/tr/panel_snapshot_postcard.xml | 18 ++ .../default/xui/zh/panel_snapshot_postcard.xml | 18 ++ 20 files changed, 575 insertions(+), 4 deletions(-) create mode 100644 indra/newview/llpanelsnapshotpostcard.cpp create mode 100644 indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml create mode 100644 indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml create mode 100644 indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml create mode 100644 indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml create mode 100644 indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml create mode 100644 indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml create mode 100644 indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml create mode 100644 indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml create mode 100644 indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml create mode 100644 indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3d7fd5bc5e..13040ea423 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -464,6 +464,7 @@ set(viewer_SOURCE_FILES llpanelsnapshotinventory.cpp llpanelsnapshotlocal.cpp llpanelsnapshotoptions.cpp + llpanelsnapshotpostcard.cpp llpanelsnapshotprofile.cpp llpanelteleporthistory.cpp llpaneltiptoast.cpp diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 185765e390..16fa4684ab 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -56,6 +56,7 @@ LLSnapshotFloaterView* gSnapshotFloaterView = NULL; const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; +const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view"); @@ -168,7 +169,11 @@ LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getActiveSnapshotT name = spanel->getName(); } - if (name == "panel_snapshot_inventory") + if (name == "panel_snapshot_postcard") + { + type = LLSnapshotLivePreview::SNAPSHOT_POSTCARD; + } + else if (name == "panel_snapshot_inventory") { type = LLSnapshotLivePreview::SNAPSHOT_TEXTURE; } @@ -419,6 +424,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) } LLSnapshotLivePreview* previewp = getPreviewView(floater); + BOOL got_bytes = previewp && previewp->getDataSize() > 0; BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); // *TODO: Separate maximum size for Web images from postcards @@ -441,7 +447,10 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) } floater->getChild<LLUICtrl>("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown")); - floater->getChild<LLUICtrl>("file_size_label")->setColor(LLUIColorTable::instance().getColor( "LabelTextColor" )); + floater->getChild<LLUICtrl>("file_size_label")->setColor( + shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD + && got_bytes + && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" )); // Update the width and height spinners based on the corresponding resolution combos. (?) switch(shot_type) @@ -451,6 +460,11 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) floater->getChild<LLUICtrl>("layer_types")->setValue("colors"); setResolution(floater, "profile_size_combo"); break; + case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: + layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; + floater->getChild<LLUICtrl>("layer_types")->setValue("colors"); + setResolution(floater, "postcard_size_combo"); + break; case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; floater->getChild<LLUICtrl>("layer_types")->setValue("colors"); @@ -1446,6 +1460,18 @@ const LLVector3d& LLFloaterSnapshot::getPosTakenGlobal() return previewp->getPosTakenGlobal(); } +// static +void LLFloaterSnapshot::setAgentEmail(const std::string& email) +{ + LLFloaterSnapshot* instance = findInstance(); + if (instance) + { + LLSideTrayPanelContainer* panel_container = instance->getChild<LLSideTrayPanelContainer>("panel_container"); + LLPanel* postcard_panel = panel_container->getPanelByName("panel_snapshot_postcard"); + postcard_panel->notify(LLSD().with("agent-email", email)); + } +} + ///---------------------------------------------------------------------------- /// Class LLSnapshotFloaterView ///---------------------------------------------------------------------------- diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 5bcf1d3099..0bb9474bb5 100755 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -63,6 +63,7 @@ public: static void postPanelSwitch(); static LLPointer<LLImageFormatted> getImageData(); static const LLVector3d& getPosTakenGlobal(); + static void setAgentEmail(const std::string& email); static const LLRect& getThumbnailPlaceholderRect() { return sThumbnailPlaceholder->getRect(); } diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index f41bdd8881..0fc9ceec83 100755 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -56,6 +56,7 @@ private: void updateUploadCost(); void openPanel(const std::string& panel_name); void onSaveToProfile(); + void onSaveToEmail(); void onSaveToInventory(); void onSaveToComputer(); void onSendToFacebook(); @@ -68,6 +69,7 @@ static LLPanelInjector<LLPanelSnapshotOptions> panel_class("llpanelsnapshotoptio LLPanelSnapshotOptions::LLPanelSnapshotOptions() { mCommitCallbackRegistrar.add("Snapshot.SaveToProfile", boost::bind(&LLPanelSnapshotOptions::onSaveToProfile, this)); + mCommitCallbackRegistrar.add("Snapshot.SaveToEmail", boost::bind(&LLPanelSnapshotOptions::onSaveToEmail, this)); mCommitCallbackRegistrar.add("Snapshot.SaveToInventory", boost::bind(&LLPanelSnapshotOptions::onSaveToInventory, this)); mCommitCallbackRegistrar.add("Snapshot.SaveToComputer", boost::bind(&LLPanelSnapshotOptions::onSaveToComputer, this)); mCommitCallbackRegistrar.add("Snapshot.SendToFacebook", boost::bind(&LLPanelSnapshotOptions::onSendToFacebook, this)); @@ -118,6 +120,11 @@ void LLPanelSnapshotOptions::onSaveToProfile() openPanel("panel_snapshot_profile"); } +void LLPanelSnapshotOptions::onSaveToEmail() +{ + openPanel("panel_snapshot_postcard"); +} + void LLPanelSnapshotOptions::onSaveToInventory() { openPanel("panel_snapshot_inventory"); diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp new file mode 100644 index 0000000000..8e37b1418c --- /dev/null +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -0,0 +1,244 @@ +/** + * @file llpanelsnapshotpostcard.cpp + * @brief Postcard sending panel. + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llcombobox.h" +#include "llnotificationsutil.h" +#include "llsidetraypanelcontainer.h" +#include "llsliderctrl.h" +#include "llspinctrl.h" +#include "lltexteditor.h" + +#include "llagent.h" +#include "llagentui.h" +#include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model +#include "llpanelsnapshot.h" +#include "llpostcard.h" +#include "llviewercontrol.h" // gSavedSettings +#include "llviewerwindow.h" + +#include <boost/regex.hpp> + +/** + * Sends postcard via email. + */ +class LLPanelSnapshotPostcard +: public LLPanelSnapshot +{ + LOG_CLASS(LLPanelSnapshotPostcard); + +public: + LLPanelSnapshotPostcard(); + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ S32 notify(const LLSD& info); + +private: + /*virtual*/ std::string getWidthSpinnerName() const { return "postcard_snapshot_width"; } + /*virtual*/ std::string getHeightSpinnerName() const { return "postcard_snapshot_height"; } + /*virtual*/ std::string getAspectRatioCBName() const { return "postcard_keep_aspect_check"; } + /*virtual*/ std::string getImageSizeComboName() const { return "postcard_size_combo"; } + /*virtual*/ std::string getImageSizePanelName() const { return "postcard_image_size_lp"; } + /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG; } + /*virtual*/ void updateControls(const LLSD& info); + + bool missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response); + void sendPostcard(); + + void onMsgFormFocusRecieved(); + void onFormatComboCommit(LLUICtrl* ctrl); + void onQualitySliderCommit(LLUICtrl* ctrl); + void onSend(); + + bool mHasFirstMsgFocus; + std::string mAgentEmail; +}; + +static LLPanelInjector<LLPanelSnapshotPostcard> panel_class("llpanelsnapshotpostcard"); + +LLPanelSnapshotPostcard::LLPanelSnapshotPostcard() +: mHasFirstMsgFocus(false) +{ + mCommitCallbackRegistrar.add("Postcard.Send", boost::bind(&LLPanelSnapshotPostcard::onSend, this)); + mCommitCallbackRegistrar.add("Postcard.Cancel", boost::bind(&LLPanelSnapshotPostcard::cancel, this)); + +} + +// virtual +BOOL LLPanelSnapshotPostcard::postBuild() +{ + // pick up the user's up-to-date email address + gAgent.sendAgentUserInfoRequest(); + + std::string name_string; + LLAgentUI::buildFullname(name_string); + getChild<LLUICtrl>("name_form")->setValue(LLSD(name_string)); + + // For the first time a user focuses to .the msg box, all text will be selected. + getChild<LLUICtrl>("msg_form")->setFocusChangedCallback(boost::bind(&LLPanelSnapshotPostcard::onMsgFormFocusRecieved, this)); + + getChild<LLUICtrl>("to_form")->setFocus(TRUE); + + getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1)); + + return LLPanelSnapshot::postBuild(); +} + +// virtual +void LLPanelSnapshotPostcard::onOpen(const LLSD& key) +{ + LLPanelSnapshot::onOpen(key); +} + +// virtual +S32 LLPanelSnapshotPostcard::notify(const LLSD& info) +{ + if (!info.has("agent-email")) + { + llassert(info.has("agent-email")); + return 0; + } + + if (mAgentEmail.empty()) + { + mAgentEmail = info["agent-email"].asString(); + } + + return 1; +} + +// virtual +void LLPanelSnapshotPostcard::updateControls(const LLSD& info) +{ + getChild<LLUICtrl>("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality")); + updateImageQualityLevel(); + + const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true; + getChild<LLUICtrl>("send_btn")->setEnabled(have_snapshot); +} + +bool LLPanelSnapshotPostcard::missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if(0 == option) + { + // User clicked OK + if((getChild<LLUICtrl>("subject_form")->getValue().asString()).empty()) + { + // Stuff the subject back into the form. + getChild<LLUICtrl>("subject_form")->setValue(getString("default_subject")); + } + + if (!mHasFirstMsgFocus) + { + // The user never switched focus to the message window. + // Using the default string. + getChild<LLUICtrl>("msg_form")->setValue(getString("default_message")); + } + + sendPostcard(); + } + return false; +} + + +void LLPanelSnapshotPostcard::sendPostcard() +{ + std::string to(getChild<LLUICtrl>("to_form")->getValue().asString()); + std::string subject(getChild<LLUICtrl>("subject_form")->getValue().asString()); + + LLSD postcard = LLSD::emptyMap(); + postcard["pos-global"] = LLFloaterSnapshot::getPosTakenGlobal().getValue(); + postcard["to"] = to; + postcard["from"] = mAgentEmail; + postcard["name"] = getChild<LLUICtrl>("name_form")->getValue().asString(); + postcard["subject"] = subject; + postcard["msg"] = getChild<LLUICtrl>("msg_form")->getValue().asString(); + LLPostCard::send(LLFloaterSnapshot::getImageData(), postcard); + + // Give user feedback of the event. + gViewerWindow->playSnapshotAnimAndSound(); + + LLFloaterSnapshot::postSave(); +} + +void LLPanelSnapshotPostcard::onMsgFormFocusRecieved() +{ + LLTextEditor* msg_form = getChild<LLTextEditor>("msg_form"); + if (msg_form->hasFocus() && !mHasFirstMsgFocus) + { + mHasFirstMsgFocus = true; + msg_form->setText(LLStringUtil::null); + } +} + +void LLPanelSnapshotPostcard::onFormatComboCommit(LLUICtrl* ctrl) +{ + // will call updateControls() + LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true)); +} + +void LLPanelSnapshotPostcard::onQualitySliderCommit(LLUICtrl* ctrl) +{ + updateImageQualityLevel(); + + LLSliderCtrl* slider = (LLSliderCtrl*)ctrl; + S32 quality_val = llfloor((F32)slider->getValue().asReal()); + LLSD info; + info["image-quality-change"] = quality_val; + LLFloaterSnapshot::getInstance()->notify(info); // updates the "SnapshotQuality" setting +} + +void LLPanelSnapshotPostcard::onSend() +{ + // Validate input. + std::string to(getChild<LLUICtrl>("to_form")->getValue().asString()); + + boost::regex email_format("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*"); + + if (to.empty() || !boost::regex_match(to, email_format)) + { + LLNotificationsUtil::add("PromptRecipientEmail"); + return; + } + + if (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format)) + { + LLNotificationsUtil::add("PromptSelfEmail"); + return; + } + + std::string subject(getChild<LLUICtrl>("subject_form")->getValue().asString()); + if(subject.empty() || !mHasFirstMsgFocus) + { + LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLPanelSnapshotPostcard::missingSubjMsgAlertCallback, this, _1, _2)); + return; + } + + // Send postcard. + sendPostcard(); +} diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 0b2831cfa4..0ae8a338e0 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -86,7 +86,7 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mNeedsFlash(TRUE), mSnapshotQuality(gSavedSettings.getS32("SnapshotQuality")), mDataSize(0), - mSnapshotType(SNAPSHOT_LOCAL), + mSnapshotType(SNAPSHOT_POSTCARD), mSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))), mSnapshotUpToDate(FALSE), mCameraPos(LLViewerCamera::getInstance()->getOrigin()), diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index f479de59d4..fed33bf37c 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -42,7 +42,7 @@ class LLSnapshotLivePreview : public LLView public: enum ESnapshotType { - SNAPSHOT_POSTCARD_DEPRECIATED, + SNAPSHOT_POSTCARD, SNAPSHOT_TEXTURE, SNAPSHOT_LOCAL, SNAPSHOT_WEB diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 353dde162b..c5fbdea69c 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7118,6 +7118,7 @@ void process_user_info_reply(LLMessageSystem* msg, void**) msg->getString( "UserData", "DirectoryVisibility", dir_visibility); LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email); + LLFloaterSnapshot::setAgentEmail(email); } diff --git a/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..ead56f2885 --- /dev/null +++ b/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_postcard"> + <string name="default_subject"> + Postkarte aus [SECOND_LIFE]. + </string> + <string name="default_message"> + Sehen Sie mal! + </string> + <string name="upload_message"> + Senden... + </string> + <text name="title"> + E-Mail + </text> + <tab_container name="postcard_tabs"> + <panel name="panel_postcard_message" label="Nachricht"/> + <panel name="panel_postcard_settings" label="Einstellungen"/> + </tab_container> + <button name="cancel_btn" label="Abbrechen"/> + <button name="send_btn" label="Absenden"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 514fb058b9..76adaad57c 100755 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -266,6 +266,12 @@ layout="topleft" name="panel_snapshot_profile" filename="panel_snapshot_profile.xml" /> + <panel + class="llpanelsnapshotpostcard" + follows="all" + layout="topleft" + name="panel_snapshot_postcard" + filename="panel_snapshot_postcard.xml" /> <panel class="llpanelsnapshotinventory" follows="all" diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml index cb29e6a87a..265217ef60 100755 --- a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml @@ -107,4 +107,21 @@ <button.commit_callback function="Snapshot.SendToFlickr"/> </button> + <button + follows="left|top" + font="SansSerif" + halign="left" + height="22" + image_overlay="Snapshot_Email" + image_overlay_alignment="left" + image_top_pad="0" + imgoverlay_label_space="10" + label="Send via E-mail" + layout="topleft" + left_delta="0" + name="save_to_email_btn" + top_pad="5"> + <button.commit_callback + function="Snapshot.SaveToEmail" /> + </button> </panel> \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..975b08be05 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + height="380" + layout="topleft" + name="panel_snapshot_postcard" + width="490"> + <string + name="default_subject"> + Postcard from [SECOND_LIFE]. + </string> + <string + name="default_message"> + Check this out! + </string> + <string + name="upload_message"> + Sending... + </string> + <icon + follows="top|left" + height="18" + image_name="Snapshot_Email" + layout="topleft" + left="12" + mouse_opaque="true" + name="title_icon" + top="7" + width="18" /> + <text + follows="top|left|right" + font="SansSerifBold" + height="14" + layout="topleft" + left_pad="12" + length="1" + name="title" + right="-10" + text_color="white" + type="string" + top_delta="2"> + E-mail + </text> + <view_border + bevel_style="in" + follows="left|top|right" + height="1" + left="9" + layout="topleft" + name="hr" + right="-5" + top_pad="5" + /> + <tab_container + name="postcard_tabs" + tab_group="1" + tab_min_width="97" + tab_height="21" + tab_position="top" + top_pad="7" + left="5" + right="-2" + height="319" + follows="all" + halign="center" + use_highlighting_on_hover="true"> + <panel + follows="all" + layout="topleft" + label="Message" + name="panel_postcard_message" + filename="panel_postcard_message.xml" /> + <panel + follows="all" + layout="topleft" + label="Settings" + name="panel_postcard_settings" + filename="panel_postcard_settings.xml" /> + </tab_container> + <button + follows="right|bottom" + height="23" + label="Cancel" + layout="topleft" + name="cancel_btn" + right="-6" + bottom="-20" + width="97"> + <button.commit_callback + function="Postcard.Cancel" /> + </button> + <button + follows="left|bottom" + height="23" + label="Send" + layout="topleft" + left="10" + name="send_btn" + top_delta="0" + width="97"> + <button.commit_callback + function="Postcard.Send" /> + </button> +</panel> \ No newline at end of file diff --git a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..81a067a81b --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_postcard"> + <string name="default_subject"> + Postal desde [SECOND_LIFE]. + </string> + <string name="default_message"> + ¡Mira esto! + </string> + <string name="upload_message"> + Enviando... + </string> + <text name="title"> + Correo-e + </text> + <tab_container name="postcard_tabs"> + <panel name="panel_postcard_message" label="Mensaje"/> + <panel name="panel_postcard_settings" label="Ajustes"/> +</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..3f5ef04022 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_postcard"> + <string name="default_subject"> + Carte postale de [SECOND_LIFE]. + </string> + <string name="default_message"> + Ouvrez-moi ! + </string> + <string name="upload_message"> + Envoi en cours... + </string> + <text name="title"> + E-mail + </text> + <tab_container name="postcard_tabs"> + <panel name="panel_postcard_message" label="Message"/> + <panel name="panel_postcard_settings" label="Paramètres"/> +</panel> diff --git a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..333ce5c12b --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_postcard"> + <string name="default_subject"> + Cartolina da [SECOND_LIFE]. + </string> + <string name="default_message"> + Dai un'occhiata! + </string> + <string name="upload_message"> + Invio... + </string> + <text name="title"> + E-mail + </text> + <tab_container name="postcard_tabs"> + <panel name="panel_postcard_message" label="Messaggio"/> + <panel name="panel_postcard_settings" label="Impostazioni"/> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..756df9ecc2 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_postcard"> + <string name="default_subject"> + [SECOND_LIFE] からのポストカードです。 + </string> + <string name="default_message"> + ぜひご覧ください! + </string> + <string name="upload_message"> + 送信中... + </string> + <text name="title"> + メール + </text> + <tab_container name="postcard_tabs"> + <panel name="panel_postcard_message" label="メッセージ"/> + <panel name="panel_postcard_settings" label="設定"/> +</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..efcbec66ba --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_postcard"> + <string name="default_subject"> + Postal do [SECOND_LIFE]. + </string> + <string name="default_message"> + Confira! + </string> + <string name="upload_message"> + Enviando... + </string> + <text name="title"> + E-mail + </text> + <tab_container name="postcard_tabs"> + <panel name="panel_postcard_message" label="Mensagem"/> + <panel name="panel_postcard_settings" label="Configurações"/> +</panel> diff --git a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..6e1b3a7516 --- /dev/null +++ b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_postcard"> + <string name="default_subject"> + Открытка из [SECOND_LIFE]. + </string> + <string name="default_message"> + Побывай здесь! + </string> + <string name="upload_message"> + Отправка... + </string> + <text name="title"> + Электронное письмо + </text> + <tab_container name="postcard_tabs"> + <panel name="panel_postcard_message" label="Сообщение"/> + <panel name="panel_postcard_settings" label="Настройки"/> +</panel> diff --git a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..9b9e60d2e0 --- /dev/null +++ b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_postcard"> + <string name="default_subject"> + SECOND_LIFE]'dan posta kartı. + </string> + <string name="default_message"> + Buna bakın! + </string> + <string name="upload_message"> + Gönderiyor... + </string> + <text name="title"> + E-posta + </text> + <tab_container name="postcard_tabs"> + <panel name="panel_postcard_message" label="İleti"/> + <panel name="panel_postcard_settings" label="Ayarlar"/> +</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml new file mode 100644 index 0000000000..6dfeaf2505 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_snapshot_postcard"> + <string name="default_subject"> + 來自 [SECOND_LIFE] 的明信片。 + </string> + <string name="default_message"> + 快來看看這個! + </string> + <string name="upload_message"> + 傳送中... + </string> + <text name="title"> + 電郵 + </text> + <tab_container name="postcard_tabs"> + <panel name="panel_postcard_message" label="訊息"/> + <panel name="panel_postcard_settings" label="設定"/> +</panel> -- cgit v1.2.3 From 5fd8a51f149ba5f05af1e10585c3aee457dc0193 Mon Sep 17 00:00:00 2001 From: MNikolenko ProductEngine <mnikolenko@productengine.com> Date: Thu, 7 May 2015 19:51:52 +0300 Subject: MAINT-4812 Restore sending snapshot as email from the viewer. --- indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml | 1 + 8 files changed, 8 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml index 81a067a81b..3373c29821 100644 --- a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ <tab_container name="postcard_tabs"> <panel name="panel_postcard_message" label="Mensaje"/> <panel name="panel_postcard_settings" label="Ajustes"/> + </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml index 3f5ef04022..19e7b02cf8 100644 --- a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ <tab_container name="postcard_tabs"> <panel name="panel_postcard_message" label="Message"/> <panel name="panel_postcard_settings" label="Paramètres"/> + </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml index 333ce5c12b..e79e7aecbc 100644 --- a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ <tab_container name="postcard_tabs"> <panel name="panel_postcard_message" label="Messaggio"/> <panel name="panel_postcard_settings" label="Impostazioni"/> + </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml index 756df9ecc2..000a59117e 100644 --- a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ <tab_container name="postcard_tabs"> <panel name="panel_postcard_message" label="メッセージ"/> <panel name="panel_postcard_settings" label="設定"/> + </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml index efcbec66ba..08bc60996d 100644 --- a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ <tab_container name="postcard_tabs"> <panel name="panel_postcard_message" label="Mensagem"/> <panel name="panel_postcard_settings" label="Configurações"/> + </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml index 6e1b3a7516..fa8ca1f9b4 100644 --- a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ <tab_container name="postcard_tabs"> <panel name="panel_postcard_message" label="Сообщение"/> <panel name="panel_postcard_settings" label="Настройки"/> + </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml index 9b9e60d2e0..e9b36b70a7 100644 --- a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ <tab_container name="postcard_tabs"> <panel name="panel_postcard_message" label="İleti"/> <panel name="panel_postcard_settings" label="Ayarlar"/> + </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml index 6dfeaf2505..a360822af5 100644 --- a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ <tab_container name="postcard_tabs"> <panel name="panel_postcard_message" label="訊息"/> <panel name="panel_postcard_settings" label="設定"/> + </tab_container> </panel> -- cgit v1.2.3 From 1845816aa2419353ace258b7cfe24bdd08357ebe Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Thu, 25 Jun 2015 16:36:38 +0300 Subject: MAINT-5299 FIXED [MAINT-RC] Unlinking individual prims from a linkset no longer works --- indra/newview/llselectmgr.cpp | 20 ++++++-------------- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 2 files changed, 7 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index cbc00d8b53..47a9353ffa 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -619,22 +619,14 @@ bool LLSelectMgr::linkObjects() bool LLSelectMgr::unlinkObjects() { - LLViewerObject *object = mSelectedObjects->getFirstRootObject(); - if (!object) return false; - S32 min_objects_for_confirm = gSavedSettings.getS32("MinObjectsForUnlinkConfirm"); - for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++) + S32 unlink_object_count = mSelectedObjects->getObjectCount(); // clears out nodes with NULL objects + if (unlink_object_count >= min_objects_for_confirm + && unlink_object_count > mSelectedObjects->getRootObjectCount()) { - object = (*iter)->getObject(); - if(object) - { - S32 objects_in_linkset = object->numChildren() + 1; - if(objects_in_linkset >= min_objects_for_confirm) - { - LLNotificationsUtil::add("ConfirmUnlink", LLSD(), LLSD(), boost::bind(&LLSelectMgr::confirmUnlinkObjects, this, _1, _2)); - return true; - } - } + // total count > root count means that there are childer inside and that there are linksets that will be unlinked + LLNotificationsUtil::add("ConfirmUnlink", LLSD(), LLSD(), boost::bind(&LLSelectMgr::confirmUnlinkObjects, this, _1, _2)); + return true; } LLSelectMgr::getInstance()->sendDelink(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ba8502ba81..93469aa3f4 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5382,7 +5382,7 @@ You cannot undo this action. name="ConfirmUnlink" type="alertmodal"> <unique/> - This is a large linkset. If you unlink it, you may not be able to link it again. You may wish to take a copy of the linkset into your inventory as a precaution. + This is a large selection with linksets. If you unlink it, you may not be able to link it again. You may wish to take copies of linksets into your inventory as a precaution. <tag>confirm</tag> <usetemplate ignoretext="Confirm when unlinking a linkset" -- cgit v1.2.3 From 1256392d01031de7160589775966b758d33a06fe Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Thu, 11 Jun 2015 19:30:02 +0300 Subject: MAINT-5269 FIXED Viewer crashes if you open Help -> About Second Life while a group member list is loading. --- indra/newview/llfloaterabout.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index b342d8fdf3..e71daa6067 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -289,15 +289,11 @@ void LLServerReleaseNotesURLFetcher::httpCompleted() LL_DEBUGS("ServerReleaseNotes") << dumpResponse() << " [headers:" << getResponseHeaders() << "]" << LL_ENDL; - LLFloaterAbout* floater_about = LLFloaterReg::getTypedInstance<LLFloaterAbout>("sl_about"); - if (floater_about) + std::string location = getResponseHeader(HTTP_IN_HEADER_LOCATION); + if (location.empty()) { - std::string location = getResponseHeader(HTTP_IN_HEADER_LOCATION); - if (location.empty()) - { - location = LLTrans::getString("ErrorFetchingServerReleaseNotesURL"); - } - LLAppViewer::instance()->setServerReleaseNotesURL(location); + location = LLTrans::getString("ErrorFetchingServerReleaseNotesURL"); } + LLAppViewer::instance()->setServerReleaseNotesURL(location); } -- cgit v1.2.3 From 2574d1c1fee9b6deffd8d9224d62e91848c1d0e3 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Wed, 1 Jul 2015 20:07:56 +0300 Subject: MAINT-2864 FIXED Viewer crashes when clicking "Ok" on "Delete Selected Item" modal from a non existant object. --- indra/newview/llinventoryfunctions.cpp | 27 ++++++++++++++------------- indra/newview/llinventoryfunctions.h | 2 -- 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 6f6861dc7b..ae799e8b18 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -674,6 +674,19 @@ void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_fold open_outbox(); } +static void items_removal_confirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0 && !root.isDead() && !root.get()->isDead()) + { + LLFolderView* folder_root = root.get(); + //Need to remove item from DND before item is removed from root folder view + //because once removed from root folder view the item is no longer a selected item + LLInventoryAction::removeItemFromDND(folder_root); + folder_root->removeSelectedItems(); + } +} + ///---------------------------------------------------------------------------- /// LLInventoryCollectFunctor implementations ///---------------------------------------------------------------------------- @@ -1100,7 +1113,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root { LLSD args; args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); - LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root)); + LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&items_removal_confirmation, _1, _2, root->getHandle())); return; } if (("copy" == action) || ("cut" == action)) @@ -1205,15 +1218,3 @@ void LLInventoryAction::removeItemFromDND(LLFolderView* root) } } } - -void LLInventoryAction::onItemsRemovalConfirmation( const LLSD& notification, const LLSD& response, LLFolderView* root ) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option == 0) - { - //Need to remove item from DND before item is removed from root folder view - //because once removed from root folder view the item is no longer a selected item - removeItemFromDND(root); - root->removeSelectedItems(); - } -} diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 6b3861aa79..92780eb10f 100755 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -438,8 +438,6 @@ public: struct LLInventoryAction { static void doToSelected(class LLInventoryModel* model, class LLFolderView* root, const std::string& action); - - static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLFolderView* root); static void removeItemFromDND(LLFolderView* root); }; -- cgit v1.2.3 From cfe009cbf6937feaf5baf03e0bf6147b45662cb0 Mon Sep 17 00:00:00 2001 From: vyacheslavsproductengine <vyacheslavsproductengine@lindenlab.com> Date: Mon, 1 Jun 2015 21:02:35 +0400 Subject: MAINT-4761 FIXED viewer crash (Crash after selecting 'Skin weights' checkbox when uploading the second model.) --- indra/newview/llfloatermodelpreview.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index a4dde62056..6804b21b28 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3810,11 +3810,8 @@ void LLModelPreview::loadModelCallback(S32 lod) mFMP->getChild<LLCheckBoxCtrl>("confirm_checkbox")->set(FALSE); if (!mBaseModel.empty()) { - if (mFMP->getChild<LLUICtrl>("description_form")->getValue().asString().empty()) - { - const std::string& model_name = mBaseModel[0]->getName(); - mFMP->getChild<LLUICtrl>("description_form")->setValue(model_name); - } + const std::string& model_name = mBaseModel[0]->getName(); + mFMP->getChild<LLUICtrl>("description_form")->setValue(model_name); } } refresh(); @@ -5138,8 +5135,11 @@ BOOL LLModelPreview::render() mViewOption["show_skin_weight"] = false; fmp->disableViewOption("show_skin_weight"); fmp->disableViewOption("show_joint_positions"); + + skin_weight = false; + mFMP->childSetValue("show_skin_weight", false); + fmp->setViewOptionEnabled("show_skin_weight", skin_weight); } - skin_weight = false; } if (upload_skin && !has_skin_weights) @@ -5243,6 +5243,16 @@ BOOL LLModelPreview::render() const LLVertexBuffer* buff = vb_vec[0]; regen = buff->hasDataType(LLVertexBuffer::TYPE_WEIGHT4) != skin_weight; } + else + { + LL_INFOS(" ") << "Vertex Buffer[" << mPreviewLOD << "]" << " is EMPTY!!!" << LL_ENDL; + regen = TRUE; + } + } + + if (regen) + { + genBuffers(mPreviewLOD, skin_weight); } //make sure material lists all match @@ -5263,11 +5273,6 @@ BOOL LLModelPreview::render() } } - if (regen) - { - genBuffers(mPreviewLOD, skin_weight); - } - if (!skin_weight) { for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter) -- cgit v1.2.3 From 666b9346bac49a43ee92390d2dc6cae3ea91cf22 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 4 Aug 2015 20:26:46 +0300 Subject: merge conflict fix --- indra/newview/llinventoryfunctions.cpp | 32 ++++++++++---------------------- indra/newview/llinventoryfunctions.h | 16 +++++++++------- 2 files changed, 19 insertions(+), 29 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index c05a76d17d..426d9185ef 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -959,19 +959,6 @@ void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_fold open_outbox(); } -static void items_removal_confirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option == 0 && !root.isDead() && !root.get()->isDead()) - { - LLFolderView* folder_root = root.get(); - //Need to remove item from DND before item is removed from root folder view - //because once removed from root folder view the item is no longer a selected item - LLInventoryAction::removeItemFromDND(folder_root); - folder_root->removeSelectedItems(); - } -} - ///---------------------------------------------------------------------------- // Marketplace functions // @@ -2486,7 +2473,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root { LLSD args; args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); - LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&items_removal_confirmation, _1, _2, root->getHandle())); + LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&onItemsRemovalConfirmation, _1, _2, root->getHandle())); // Note: marketplace listings will be updated in the callback if delete confirmed return; } @@ -2596,18 +2583,19 @@ void LLInventoryAction::removeItemFromDND(LLFolderView* root) } } -void LLInventoryAction::onItemsRemovalConfirmation( const LLSD& notification, const LLSD& response, LLFolderView* root ) +void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { - //Need to remove item from DND before item is removed from root folder view - //because once removed from root folder view the item is no longer a selected item - removeItemFromDND(root); - root->removeSelectedItems(); - - // Update the marketplace listings that have been affected by the operation - updateMarketplaceFolders(); + LLFolderView* folder_root = root.get(); + //Need to remove item from DND before item is removed from root folder view + //because once removed from root folder view the item is no longer a selected item + removeItemFromDND(folder_root); + folder_root->removeSelectedItems(); + + // Update the marketplace listings that have been affected by the operation + updateMarketplaceFolders(); } } diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index fe97076020..6ae8fd0f13 100755 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -30,6 +30,7 @@ #include "llinventorymodel.h" #include "llinventory.h" +#include "llhandle.h" #include "llwearabletype.h" // compute_stock_count() return error code @@ -444,7 +445,8 @@ public: *******************************************************************************/ class LLFolderViewItem; class LLFolderViewFolder; - +class LLInventoryModel; +class LLFolderView; class LLInventoryState { @@ -456,12 +458,12 @@ public: struct LLInventoryAction { - static void doToSelected(class LLInventoryModel* model, class LLFolderView* root, const std::string& action, BOOL user_confirm = TRUE); - static void callback_doToSelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); - static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); - static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLFolderView* root); - static void removeItemFromDND(LLFolderView* root); - + static void doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm = TRUE); + static void callback_doToSelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); + static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); + static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root); + static void removeItemFromDND(LLFolderView* root); + private: static void buildMarketplaceFolders(LLFolderView* root); static void updateMarketplaceFolders(); -- cgit v1.2.3 From 3e11b8c9172b6967ee9734de2d0493480d483b76 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 4 Aug 2015 20:44:28 +0300 Subject: merge conflict fix (isDead() check got missed) --- indra/newview/llinventoryfunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 426d9185ef..990343c205 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2586,7 +2586,7 @@ void LLInventoryAction::removeItemFromDND(LLFolderView* root) void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option == 0) + if (option == 0 && !root.isDead() && !root.get()->isDead()) { LLFolderView* folder_root = root.get(); //Need to remove item from DND before item is removed from root folder view -- cgit v1.2.3 From 1be63209331d509396bd7ee79302d511fe83d72e Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Mon, 17 Aug 2015 14:54:41 -0400 Subject: increment viewer version to 3.8.4 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 269aa9c86d..ff313b8c21 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.8.3 +3.8.4 -- cgit v1.2.3