From aa96a6a4e8ebd86b8dc8da530b79f6cbb0365b04 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 10 Jun 2010 12:51:25 -0600 Subject: EXT-7760: FIXED: only 10 avatars render non-impostored --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/featuretable.txt | 2 +- indra/newview/featuretable_linux.txt | 2 +- indra/newview/featuretable_mac.txt | 2 +- indra/newview/llappviewer.cpp | 2 +- indra/newview/llviewerdisplay.cpp | 2 +- indra/newview/llvoavatar.cpp | 16 ++++++++-------- indra/newview/llvoavatar.h | 4 ++-- .../default/xui/en/panel_preferences_graphics1.xml | 22 +++++----------------- 9 files changed, 21 insertions(+), 33 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b0211dd85b..d94814d781 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6202,7 +6202,7 @@ Type S32 Value - 35 + 12 RenderAvatarVP diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index de4d787d65..e8591ca086 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -26,7 +26,7 @@ list all RenderAnisotropic 1 0 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 -RenderAvatarMaxVisible 1 35 +RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 1 RenderCubeMap 1 1 RenderDelayVBUpdate 1 0 diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index adda7cec4d..779490c9f7 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -26,7 +26,7 @@ list all RenderAnisotropic 1 0 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 -RenderAvatarMaxVisible 1 35 +RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 1 RenderCubeMap 1 1 RenderDelayVBUpdate 1 0 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 82886d7e2c..47033efc47 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -26,7 +26,7 @@ list all RenderAnisotropic 1 0 RenderAvatarCloth 0 0 RenderAvatarLODFactor 1 1.0 -RenderAvatarMaxVisible 1 35 +RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 0 RenderCubeMap 1 1 RenderDelayVBUpdate 1 0 diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 95084666bb..7f0186575d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -416,7 +416,7 @@ static void settings_to_globals() LLVolumeImplFlexible::sUpdateFactor = gSavedSettings.getF32("RenderFlexTimeFactor"); LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor"); LLVOAvatar::sLODFactor = gSavedSettings.getF32("RenderAvatarLODFactor"); - LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); + LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible"); LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible"); // clamp auto-open time to some minimum usable value LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay")); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 3482ac508e..f7cde9a6cb 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -597,7 +597,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLPipeline::sFastAlpha = gSavedSettings.getBOOL("RenderFastAlpha"); LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip"); - LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); + LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible"); LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate"); S32 occlusion = LLPipeline::sUseOcclusion; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3e93dc1a90..411809d4ba 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -595,7 +595,7 @@ LLVOAvatarSkeletonInfo* LLVOAvatar::sAvatarSkeletonInfo = NULL; LLVOAvatar::LLVOAvatarXmlInfo* LLVOAvatar::sAvatarXmlInfo = NULL; LLVOAvatarDictionary *LLVOAvatar::sAvatarDictionary = NULL; S32 LLVOAvatar::sFreezeCounter = 0; -S32 LLVOAvatar::sMaxVisible = 50; +U32 LLVOAvatar::sMaxVisible = 12; F32 LLVOAvatar::sRenderDistance = 256.f; S32 LLVOAvatar::sNumVisibleAvatars = 0; S32 LLVOAvatar::sNumLODChangesThisFrame = 0; @@ -3173,23 +3173,23 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { // muted avatars update at 16 hz mUpdatePeriod = 16; } - else if (visible && mVisibilityRank <= LLVOAvatar::sMaxVisible * 0.25f) + else if (visible && mVisibilityRank <= LLVOAvatar::sMaxVisible) { //first 25% of max visible avatars are not impostored mUpdatePeriod = 1; } - else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 0.75f) - { //back 25% of max visible avatars are slow updating impostors - mUpdatePeriod = 8; - } - else if (visible && mVisibilityRank > (U32) LLVOAvatar::sMaxVisible) + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 4) { //background avatars are REALLY slow updating impostors mUpdatePeriod = 16; } + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 3) + { //back 25% of max visible avatars are slow updating impostors + mUpdatePeriod = 8; + } else if (visible && mImpostorPixelArea <= impostor_area) { // stuff in between gets an update period based on pixel area mUpdatePeriod = llclamp((S32) sqrtf(impostor_area*4.f/mImpostorPixelArea), 2, 8); } - else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 0.25f) + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible) { // force nearby impostors in ultra crowded areas mUpdatePeriod = 2; } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index b30cce09f6..4259bb8e73 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -223,8 +223,8 @@ public: public: static S32 sRenderName; static BOOL sRenderGroupTitles; - static S32 sMaxVisible; - static F32 sRenderDistance; //distance at which avatars will render (affected by control "RenderAvatarMaxVisible") + static U32 sMaxVisible; //(affected by control "RenderAvatarMaxVisible") + static F32 sRenderDistance; //distance at which avatars will render. static BOOL sShowAnimationDebug; // show animation debug info static BOOL sUseImpostors; //use impostors for far away avatars static BOOL sShowFootPlane; // show foot collision plane reported by server diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 266fd6cb5e..ccd99c6fb5 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -372,30 +372,18 @@ decimal_digits="0" follows="left|top" height="16" - increment="2" - initial_value="35" - label="Max. avatar draw distance:" + increment="1" + initial_value="12" + label="Max. # of non-impostor avatars:" label_width="185" layout="topleft" left_delta="0" max_val="65" min_val="1" - name="MaxAvatarDrawDistance" + name="MaxNumberAvatarDrawn" top_pad="4" width="290" /> - - m - - Date: Wed, 16 Jun 2010 11:42:05 -0600 Subject: EXT-6567: POSSIBLE FIXED: crash at LLImageBase::allocateData [secondlife-bin llimage.cpp:170]; also removed the debug code for this bug. --- indra/llimage/llimage.cpp | 8 ++------ indra/newview/lltexturefetch.cpp | 11 +++++++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index aa7c8c789a..0fc5ca1ad6 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -168,8 +168,8 @@ U8* LLImageBase::allocateData(S32 size) } else { - llerrs << "LLImageBase::allocateData: bad size: " << size << llendl; - } + llerrs << "LLImageBase::allocateData: bad size: " << size << llendl; + } } if (!mData || size != mDataSize) { @@ -267,10 +267,6 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components) { mMemType = LLMemType::MTYPE_IMAGERAW; //llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE ); - if(S32(width) * S32(height) * S32(components) > MAX_IMAGE_DATA_SIZE) - { - llwarns << "over size: width: " << (S32)width << " height: " << (S32)height << " components: " << (S32)components << llendl ; - } allocateDataSize(width, height, components); ++sRawImageCount; } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 52d227f827..ffd0330ace 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -582,14 +582,21 @@ bool LLTextureFetchWorker::doWork(S32 param) { LLMutexLock lock(&mWorkMutex); - if ((mFetcher->isQuitting() || mImagePriority < 1.0f || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) + if ((mFetcher->isQuitting() || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) { if (mState < DECODE_IMAGE) { return true; // abort } } - + if(mImagePriority < 1.0f) + { + if (mState == INIT || mState == LOAD_FROM_NETWORK || mState == LOAD_FROM_SIMULATOR) + { + return true; // abort + } + } + if (mFetcher->mDebugPause) { return false; // debug: don't do any work -- cgit v1.2.3 From 5c7911f1e2cb060e5e2353cec01a7ecc09f05126 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 16 Jun 2010 14:03:56 -0600 Subject: EXT-7032: POSSIBLE FIXED: [crashhunters] crash in libcurl background thread on windows --- indra/newview/lltexturefetch.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index ffd0330ace..ceed90e210 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -596,6 +596,11 @@ bool LLTextureFetchWorker::doWork(S32 param) return true; // abort } } + if(mState > CACHE_POST && !mCanUseNET && !mCanUseHTTP) + { + //nowhere to get data, abort. + return true ; + } if (mFetcher->mDebugPause) { @@ -784,7 +789,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } // don't return, fall through to next state } - else if (mSentRequest == UNSENT) + else if (mSentRequest == UNSENT && mCanUseNET) { // Add this to the network queue and sit here. // LLTextureFetch::update() will send off a request which will change our state @@ -837,6 +842,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mState == SEND_HTTP_REQ) { + if(mCanUseHTTP) { const S32 HTTP_QUEUE_MAX_SIZE = 8; // *TODO: Integrate this with llviewerthrottle @@ -902,6 +908,10 @@ bool LLTextureFetchWorker::doWork(S32 param) } // fall through } + else //can not use http fetch. + { + return true ; //abort + } } if (mState == WAIT_HTTP_REQ) -- cgit v1.2.3 From 641ec3da61221ffd13cb7d1777c28505a54e2d58 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 10 Jun 2010 14:50:48 -0700 Subject: EXT-7701 language change --- indra/newview/skins/default/xui/en/widgets/flat_list_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml b/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml index a71b293f31..e05ddf9815 100644 --- a/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml +++ b/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml @@ -11,6 +11,6 @@ name="no_items_msg" v_pad="10" h_pad="10" - value="There are no any items in the list" + value="No matches found" wrap="true" /> \ No newline at end of file -- cgit v1.2.3 From 9669923a7c370d43136cfc04b34247689aad1d3a Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 10 Jun 2010 14:59:24 -0700 Subject: EXT-7239 - Double-click on outfit title should wear outfit, Double-click on item should wear item decision was to remove double click behavior --- indra/newview/lloutfitslist.cpp | 15 --------------- indra/newview/lloutfitslist.h | 1 - indra/newview/llwearableitemslist.h | 7 ------- 3 files changed, 23 deletions(-) diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index e20b2e26be..caa29db9d3 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -266,9 +266,6 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) tab->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onAccordionTabRightClick, this, _1, _2, _3, cat_id)); - tab->setDoubleClickCallback(boost::bind(&LLOutfitsList::onAccordionTabDoubleClick, this, - _1, _2, _3, cat_id)); - // Setting tab focus callback to monitor currently selected outfit. tab->setFocusReceivedCallback(boost::bind(&LLOutfitsList::changeOutfitSelection, this, list, cat_id)); @@ -610,18 +607,6 @@ void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const } } -void LLOutfitsList::onAccordionTabDoubleClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id) -{ - LLAccordionCtrlTab* tab = dynamic_cast(ctrl); - if(is_tab_header_clicked(tab, y) && cat_id.notNull()) - { - LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); - if (!cat) return; - - LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, FALSE ); - } -} - void LLOutfitsList::onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y) { LLWearableItemsList* list = dynamic_cast(ctrl); diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index bb516446d2..3f4a65a6e6 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -121,7 +121,6 @@ private: void applyFilter(const std::string& new_filter_substring); void onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id); - void onAccordionTabDoubleClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id); void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y); void onSelectionChange(LLUICtrl* ctrl); diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index f03336186c..73a176d061 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -83,14 +83,7 @@ class LLPanelWearableOutfitItem : public LLPanelInventoryListItemBase public: static LLPanelWearableOutfitItem* create(LLViewerInventoryItem* item); - /** - * Puts item on if it is not worn by agent - * otherwise takes it off on double click. - */ - /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); - protected: - LLPanelWearableOutfitItem(LLViewerInventoryItem* item); }; -- cgit v1.2.3 From 512cd85e09db1b7103458bd5828c6f21b3e5bf83 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 10 Jun 2010 15:22:37 -0700 Subject: EXT-7239 FIX Double-click on outfit title should wear outfit, Double-click on item should wear item decision was to remove double click behavior --- indra/newview/llwearableitemslist.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index d56a331000..58a0ea8ef5 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -107,26 +107,6 @@ LLPanelWearableOutfitItem* LLPanelWearableOutfitItem::create(LLViewerInventoryIt return list_item; } -BOOL LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask) -{ - LLViewerInventoryItem* item = getItem(); - if (item) - { - LLUUID id = item->getUUID(); - - if (get_is_item_worn(id)) - { - LLAppearanceMgr::getInstance()->removeItemFromAvatar(id); - } - else - { - LLAppearanceMgr::getInstance()->wearItemOnAvatar(id, true, false); - } - } - - return LLUICtrl::handleDoubleClick(x, y, mask); -} - LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item) : LLPanelInventoryListItemBase(item) { -- cgit v1.2.3 From 92768103af4e90dd3e0017cf2048c4a8641391b7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 10 Jun 2010 15:30:32 -0700 Subject: EXT-7781 WIP Editing Shape: Labels on the previews are unreadable --- indra/newview/skins/default/xui/en/panel_scrolling_param.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml index 19eb4bb0d6..9aa0ff1ea1 100644 --- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml +++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml @@ -12,6 +12,7 @@ layout="topleft" left="12" name="min param text" + text_color="EmphasisColor" top="120" width="120" /> Date: Thu, 10 Jun 2010 17:07:45 -0700 Subject: EXT-7750 - Wearing list does not need to be bold or show link or worn --- indra/newview/llfolderview.cpp | 1 + indra/newview/llfolderview.h | 3 +++ indra/newview/llfolderviewitem.cpp | 7 +++++-- indra/newview/llinventorypanel.cpp | 5 ++--- indra/newview/llinventorypanel.h | 7 ++++--- indra/newview/skins/default/xui/en/panel_outfits_inventory.xml | 1 + 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index a87f7288fa..5682e691cd 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -181,6 +181,7 @@ LLFolderView::LLFolderView(const Params& p) mRenameItem( NULL ), mNeedsScroll( FALSE ), mEnableScroll( true ), + mUseLabelSuffix(p.use_label_suffix), mPinningSelectedItem(FALSE), mNeedsAutoSelect( FALSE ), mAutoSelectOverride(FALSE), diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 0dfdbd364b..55eb543f5f 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -96,6 +96,7 @@ public: Mandatory parent_panel; Optional task_id; Optional title; + Optional use_label_suffix; }; LLFolderView(const Params&); virtual ~LLFolderView( void ); @@ -273,6 +274,7 @@ public: virtual S32 notify(const LLSD& info) ; void setEnableScroll(bool enable_scroll) { mEnableScroll = enable_scroll; } + bool useLabelSuffix() { return mUseLabelSuffix; } private: void updateRenamerPosition(); @@ -309,6 +311,7 @@ protected: BOOL mNeedsAutoSelect; BOOL mAutoSelectOverride; BOOL mNeedsAutoRename; + bool mUseLabelSuffix; BOOL mDebugFilters; U32 mSortOrder; diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 0c437cf035..50b35bfc69 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -289,8 +289,11 @@ void LLFolderViewItem::refreshFromListener() mCreationDate = mListener->getCreationDate(); dirtyFilter(); } - mLabelStyle = mListener->getLabelStyle(); - mLabelSuffix = mListener->getLabelSuffix(); + if (mRoot->useLabelSuffix()) + { + mLabelStyle = mListener->getLabelStyle(); + mLabelSuffix = mListener->getLabelSuffix(); + } } } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 7d81cf18aa..a20bf366c5 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -110,7 +110,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : } } -BOOL LLInventoryPanel::postBuild() +void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) { LLMemType mt(LLMemType::MTYPE_INVENTORY_POST_BUILD); @@ -128,6 +128,7 @@ BOOL LLInventoryPanel::postBuild() p.rect = folder_rect; p.parent_panel = this; p.tool_tip = p.name; + p.use_label_suffix = params.use_label_suffix; mFolderRoot = LLUICtrlFactory::create(p); mFolderRoot->setAllowMultiSelect(mAllowMultiSelect); } @@ -174,8 +175,6 @@ BOOL LLInventoryPanel::postBuild() setSortOrder(gSavedSettings.getU32(DEFAULT_SORT_ORDER)); } mFolderRoot->setSortOrder(getFilter()->getSortOrder()); - - return TRUE; } LLInventoryPanel::~LLInventoryPanel() diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 67c8904868..ad17227d56 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -87,6 +87,7 @@ public: Optional show_item_link_overlays; Optional filter; Optional start_folder; + Optional use_label_suffix; Params() : sort_order_setting("sort_order_setting"), @@ -94,7 +95,8 @@ public: allow_multi_select("allow_multi_select", true), show_item_link_overlays("show_item_link_overlays", false), filter("filter"), - start_folder("start_folder") + start_folder("start_folder"), + use_label_suffix("use_label_suffix", true) {} }; @@ -103,6 +105,7 @@ public: //-------------------------------------------------------------------- protected: LLInventoryPanel(const Params&); + void initFromParams(const Params&); friend class LLUICtrlFactory; public: virtual ~LLInventoryPanel(); @@ -110,8 +113,6 @@ public: public: LLInventoryModel* getModel() { return mInventory; } - BOOL postBuild(); - // LLView methods void draw(); BOOL handleHover(S32 x, S32 y, MASK mask); diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index de1f2cf31b..7a7f910171 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -48,6 +48,7 @@ mouse_opaque="true" name="cof_tab" start_folder="Current Outfit" + use_label_suffix="false" width="315" /> Date: Thu, 10 Jun 2010 17:08:45 -0700 Subject: EXT-7781 FIX Editing Shape: Labels on the previews are unreadable --- indra/newview/skins/default/xui/en/panel_scrolling_param.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml index 9aa0ff1ea1..78d64620a5 100644 --- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml +++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml @@ -12,7 +12,8 @@ layout="topleft" left="12" name="min param text" - text_color="EmphasisColor" + text_color="EmphasisColor" + font_shadow="hard" top="120" width="120" /> Date: Fri, 11 Jun 2010 08:26:18 -0400 Subject: EXT-6571 WIP - adding ability to handle late-arriving assets --- indra/newview/app_settings/settings.xml | 22 ++++++ indra/newview/llappearancemgr.cpp | 131 +++++++++++++++++++++++++------- 2 files changed, 127 insertions(+), 26 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 864a79c38a..eb443e0e70 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3534,6 +3534,28 @@ Value 9.0 + ForceAssetFail + + Comment + Force wearable fetches to fail for this asset type. + Persist + 1 + Type + U32 + Value + 255 + + MaxWearableWaitTime + + Comment + Max seconds to wait for wearable assets to fetch. + Persist + 1 + Type + F32 + Value + 60.0 + ForceShowGrid Comment diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a899926938..28a0ba8817 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -223,8 +223,16 @@ public: void onWearableAssetFetch(LLWearable *wearable); void onAllComplete(); - + typedef std::list found_list_t; + found_list_t& getFoundList(); + void eraseTypeToLink(LLWearableType::EType type); + void eraseTypeToRecover(LLWearableType::EType type); + void setObjItems(const LLInventoryModel::item_array_t& items); + void setGestItems(const LLInventoryModel::item_array_t& items); + bool isValid(); + +private: found_list_t mFoundList; LLInventoryModel::item_array_t mObjItems; LLInventoryModel::item_array_t mGestItems; @@ -234,34 +242,89 @@ public: S32 mResolved; LLTimer mWaitTime; bool mFired; + typedef std::set type_set_hp; + static type_set_hp sActiveHoldingPatterns; + bool mIsValid; }; +LLWearableHoldingPattern::type_set_hp LLWearableHoldingPattern::sActiveHoldingPatterns; + LLWearableHoldingPattern::LLWearableHoldingPattern(): mResolved(0), - mFired(false) + mFired(false), + mIsValid(true) { + if (sActiveHoldingPatterns.size()>0) + { + llinfos << "Creating LLWearableHoldingPattern when " + << sActiveHoldingPatterns.size() + << " other attempts are active." + << " Flagging others as invalid." + << llendl; + for (type_set_hp::iterator it = sActiveHoldingPatterns.begin(); + it != sActiveHoldingPatterns.end(); + ++it) + { + (*it)->mIsValid = false; + } + + } + sActiveHoldingPatterns.insert(this); } LLWearableHoldingPattern::~LLWearableHoldingPattern() { + sActiveHoldingPatterns.erase(this); +} + +bool LLWearableHoldingPattern::isValid() +{ + return mIsValid; +} + +LLWearableHoldingPattern::found_list_t& LLWearableHoldingPattern::getFoundList() +{ + return mFoundList; +} + +void LLWearableHoldingPattern::eraseTypeToLink(LLWearableType::EType type) +{ + mTypesToLink.erase(type); +} + +void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) +{ + mTypesToRecover.erase(type); +} + +void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) +{ + mObjItems = items; +} + +void LLWearableHoldingPattern::setGestItems(const LLInventoryModel::item_array_t& items) +{ + mGestItems = items; } bool LLWearableHoldingPattern::isFetchCompleted() { - return (mResolved >= (S32)mFoundList.size()); // have everything we were waiting for? + return (mResolved >= (S32)getFoundList().size()); // have everything we were waiting for? } bool LLWearableHoldingPattern::isTimedOut() { - static F32 max_wait_time = 60.0; // give up if wearable fetches haven't completed in max_wait_time seconds. + F32 max_wait_time = gSavedSettings.getF32("MaxWearableWaitTime"); // give up if wearable fetches haven't completed in max_wait_time seconds. return mWaitTime.getElapsedTimeF32() > max_wait_time; } void LLWearableHoldingPattern::checkMissingWearables() { + llassert(isValid()); // TODO: handle not valid case + std::vector found_by_type(LLWearableType::WT_COUNT,0); std::vector requested_by_type(LLWearableType::WT_COUNT,0); - for (found_list_t::iterator it = mFoundList.begin(); it != mFoundList.end(); ++it) + for (found_list_t::iterator it = getFoundList().begin(); it != getFoundList().end(); ++it) { LLFoundData &data = *it; if (data.mWearableType < LLWearableType::WT_COUNT) @@ -301,6 +364,8 @@ void LLWearableHoldingPattern::checkMissingWearables() void LLWearableHoldingPattern::onAllComplete() { + llassert(isValid()); // TODO: handle not valid case + // Activate all gestures in this folder if (mGestItems.count() > 0) { @@ -340,12 +405,16 @@ void LLWearableHoldingPattern::onAllComplete() void LLWearableHoldingPattern::onFetchCompletion() { + llassert(isValid()); // TODO: handle not valid case + checkMissingWearables(); } // Runs as an idle callback until all wearables are fetched (or we time out). bool LLWearableHoldingPattern::pollFetchCompletion() { + llassert(isValid()); // TODO: handle not valid case + bool completed = isFetchCompleted(); bool timed_out = isTimedOut(); bool done = completed || timed_out; @@ -378,8 +447,10 @@ public: } void fire(const LLUUID& item_id) { + llassert(mHolder->isValid()); // TODO: handle not valid case + llinfos << "Recovered item link for type " << mType << llendl; - mHolder->mTypesToLink.erase(mType); + mHolder->eraseTypeToLink(mType); // Add wearable to FoundData for actual wearing LLViewerInventoryItem *item = gInventory.getItem(item_id); LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL; @@ -397,7 +468,7 @@ public: linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); found.mWearable = mWearable; - mHolder->mFoundList.push_front(found); + mHolder->getFoundList().push_front(found); } else { @@ -426,11 +497,13 @@ public: } void fire(const LLUUID& item_id) { + llassert(mHolder->isValid()); // TODO: handle not valid case + llinfos << "Recovered item for type " << mType << llendl; LLViewerInventoryItem *itemp = gInventory.getItem(item_id); mWearable->setItemID(item_id); LLPointer cb = new RecoveredItemLinkCB(mType,mWearable,mHolder); - mHolder->mTypesToRecover.erase(mType); + mHolder->eraseTypeToRecover(mType); llassert(itemp); if (itemp) { @@ -451,6 +524,8 @@ private: void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type) { + llassert(isValid()); // TODO: handle not valid case + // Try to recover by replacing missing wearable with a new one. LLNotificationsUtil::add("ReplacedMissingWearable"); lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) @@ -481,7 +556,7 @@ bool LLWearableHoldingPattern::isMissingCompleted() void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() { - for (found_list_t::iterator it = mFoundList.begin(); it != mFoundList.end(); ++it) + for (found_list_t::iterator it = getFoundList().begin(); it != getFoundList().end(); ++it) { LLFoundData &data = *it; if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable)) @@ -495,6 +570,8 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() bool LLWearableHoldingPattern::pollMissingWearables() { + llassert(isValid()); // TODO: handle not valid case + bool timed_out = isTimedOut(); bool missing_completed = isMissingCompleted(); bool done = timed_out || missing_completed; @@ -516,8 +593,10 @@ bool LLWearableHoldingPattern::pollMissingWearables() void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) { + llassert(isValid()); // TODO: handle not valid case + mResolved += 1; // just counting callbacks, not successes. - llinfos << "onWearableAssetFetch, resolved count " << mResolved << " of requested " << mFoundList.size() << llendl; + llinfos << "onWearableAssetFetch, resolved count " << mResolved << " of requested " << getFoundList().size() << llendl; if (wearable) { llinfos << "wearable found, type " << wearable->getType() << " asset " << wearable->getAssetID() << llendl; @@ -538,8 +617,8 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) return; } - for (LLWearableHoldingPattern::found_list_t::iterator iter = mFoundList.begin(); - iter != mFoundList.end(); ++iter) + for (LLWearableHoldingPattern::found_list_t::iterator iter = getFoundList().begin(); + iter != getFoundList().end(); ++iter) { LLFoundData& data = *iter; if(wearable->getAssetID() == data.mAssetID) @@ -1143,8 +1222,8 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo // that we recursed through. for( S32 i = 0; i < LLWearableType::WT_COUNT; i++ ) { - for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin(); - iter != holder->mFoundList.end(); ++iter) + for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->getFoundList().begin(); + iter != holder->getFoundList().end(); ++iter) { LLFoundData& data = *iter; LLWearable* wearable = data.mWearable; @@ -1236,8 +1315,8 @@ void LLAppearanceMgr::updateAppearanceFromCOF() LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; - holder->mObjItems = obj_items; - holder->mGestItems = gest_items; + holder->setObjItems(obj_items); + holder->setGestItems(gest_items); // Note: can't do normal iteration, because if all the // wearables can be resolved immediately, then the @@ -1248,6 +1327,12 @@ void LLAppearanceMgr::updateAppearanceFromCOF() { LLViewerInventoryItem *item = wear_items.get(i); LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL; + + // Fault injection: use debug setting to test asset + // fetch failures (should be replaced by new defaults in + // lost&found). + U32 skip_type = gSavedSettings.getU32("ForceAssetFail"); + if (item && item->getIsLinkType() && linked_item) { LLFoundData found(linked_item->getUUID(), @@ -1257,18 +1342,12 @@ void LLAppearanceMgr::updateAppearanceFromCOF() linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); -#if 0 - // Fault injection: uncomment this block to test asset - // fetch failures (should be replaced by new defaults in - // lost&found). - if (found.mWearableType == LLWearableType::WT_SHAPE || found.mWearableType == LLWearableType::WT_JACKET) + if (skip_type != LLWearableType::WT_INVALID && found.mWearableType == skip_type) { found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB - } -#endif //pushing back, not front, to preserve order of wearables for LLAgentWearables - holder->mFoundList.push_back(found); + holder->getFoundList().push_back(found); } else { @@ -1283,8 +1362,8 @@ void LLAppearanceMgr::updateAppearanceFromCOF() } } - for (LLWearableHoldingPattern::found_list_t::iterator it = holder->mFoundList.begin(); - it != holder->mFoundList.end(); ++it) + for (LLWearableHoldingPattern::found_list_t::iterator it = holder->getFoundList().begin(); + it != holder->getFoundList().end(); ++it) { LLFoundData& found = *it; -- cgit v1.2.3 From 5777824df41956fbb1c4592c08ce693f28182fdc Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 11 Jun 2010 18:08:59 -0400 Subject: EXT-6571 WIP - partial handling of late arriving assets --- indra/newview/llappearancemgr.cpp | 128 +++++++++++++++++++++++++++++++++----- 1 file changed, 111 insertions(+), 17 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 1c2bdf07df..c19b3b50c1 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -261,6 +261,7 @@ public: void setObjItems(const LLInventoryModel::item_array_t& items); void setGestItems(const LLInventoryModel::item_array_t& items); bool isValid(); + void handleLateArrivals(); private: found_list_t mFoundList; @@ -275,6 +276,8 @@ private: typedef std::set type_set_hp; static type_set_hp sActiveHoldingPatterns; bool mIsValid; + std::set mLateArrivals; + bool mIsAllComplete; }; LLWearableHoldingPattern::type_set_hp LLWearableHoldingPattern::sActiveHoldingPatterns; @@ -282,7 +285,8 @@ LLWearableHoldingPattern::type_set_hp LLWearableHoldingPattern::sActiveHoldingPa LLWearableHoldingPattern::LLWearableHoldingPattern(): mResolved(0), mFired(false), - mIsValid(true) + mIsValid(true), + mIsAllComplete(false) { if (sActiveHoldingPatterns.size()>0) { @@ -350,7 +354,10 @@ bool LLWearableHoldingPattern::isTimedOut() void LLWearableHoldingPattern::checkMissingWearables() { - llassert(isValid()); // TODO: handle not valid case + if (!isValid()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } std::vector found_by_type(LLWearableType::WT_COUNT,0); std::vector requested_by_type(LLWearableType::WT_COUNT,0); @@ -394,7 +401,10 @@ void LLWearableHoldingPattern::checkMissingWearables() void LLWearableHoldingPattern::onAllComplete() { - llassert(isValid()); // TODO: handle not valid case + if (!isValid()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } // Activate all gestures in this folder if (mGestItems.count() > 0) @@ -431,11 +441,19 @@ void LLWearableHoldingPattern::onAllComplete() // Only safe to delete if all wearable callbacks and all missing wearables completed. delete this; } + else + { + mIsAllComplete = true; + handleLateArrivals(); + } } void LLWearableHoldingPattern::onFetchCompletion() { - llassert(isValid()); // TODO: handle not valid case + if (!isValid()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } checkMissingWearables(); } @@ -443,7 +461,10 @@ void LLWearableHoldingPattern::onFetchCompletion() // Runs as an idle callback until all wearables are fetched (or we time out). bool LLWearableHoldingPattern::pollFetchCompletion() { - llassert(isValid()); // TODO: handle not valid case + if (!isValid()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } bool completed = isFetchCompleted(); bool timed_out = isTimedOut(); @@ -477,7 +498,10 @@ public: } void fire(const LLUUID& item_id) { - llassert(mHolder->isValid()); // TODO: handle not valid case + if (!mHolder->isValid()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } llinfos << "Recovered item link for type " << mType << llendl; mHolder->eraseTypeToLink(mType); @@ -492,11 +516,11 @@ public: if (item) { LLFoundData found(linked_item->getUUID(), - linked_item->getAssetUUID(), - linked_item->getName(), - linked_item->getType(), - linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID - ); + linked_item->getAssetUUID(), + linked_item->getName(), + linked_item->getType(), + linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID + ); found.mWearable = mWearable; mHolder->getFoundList().push_front(found); } @@ -527,7 +551,10 @@ public: } void fire(const LLUUID& item_id) { - llassert(mHolder->isValid()); // TODO: handle not valid case + if (!mHolder->isValid()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } llinfos << "Recovered item for type " << mType << llendl; LLViewerInventoryItem *itemp = gInventory.getItem(item_id); @@ -554,7 +581,10 @@ private: void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type) { - llassert(isValid()); // TODO: handle not valid case + if (!isValid()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } // Try to recover by replacing missing wearable with a new one. LLNotificationsUtil::add("ReplacedMissingWearable"); @@ -600,7 +630,10 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() bool LLWearableHoldingPattern::pollMissingWearables() { - llassert(isValid()); // TODO: handle not valid case + if (!isValid()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } bool timed_out = isTimedOut(); bool missing_completed = isMissingCompleted(); @@ -621,9 +654,63 @@ bool LLWearableHoldingPattern::pollMissingWearables() return done; } +// Handle wearables that arrived after the timeout period expired. +void LLWearableHoldingPattern::handleLateArrivals() +{ + // Only safe to run if we have previously finished the missing + // wearables and other processing - otherwise we could be in some + // intermediate state - but have not been superceded by a later + // outfit change request. + if (mLateArrivals.size() == 0) + { + // Nothing to process. + return; + } + if (!isValid()) + { + llwarns << "Late arrivals not handled - outfit change no longer valid" << llendl; + } + if (!mIsAllComplete) + { + llwarns << "Late arrivals not handled - in middle of missing wearables processing" << llendl; + } + + llinfos << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << llendl; + + // Update mFoundList using late-arriving wearables. + for (LLWearableHoldingPattern::found_list_t::iterator iter = getFoundList().begin(); + iter != getFoundList().end(); ++iter) + { + LLFoundData& data = *iter; + for (std::set::iterator wear_it = mLateArrivals.begin(); + wear_it != mLateArrivals.end(); + ++wear_it) + { + LLWearable *wearable = *wear_it; + + if(wearable->getAssetID() == data.mAssetID) + { + data.mWearable = wearable; + // BAP failing this means inventory or asset server + // are corrupted in a way we don't handle. + llassert((data.mWearableType < LLWearableType::WT_COUNT) && (wearable->getType() == data.mWearableType)); + break; + } + } + } + + // TODO: handle corresponding default wearable links? + + // Update appearance based on mFoundList + LLAppearanceMgr::instance().updateAgentWearables(this, false); +} + void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) { - llassert(isValid()); // TODO: handle not valid case + if (!isValid()) + { + llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + } mResolved += 1; // just counting callbacks, not successes. llinfos << "onWearableAssetFetch, resolved count " << mResolved << " of requested " << getFoundList().size() << llendl; @@ -639,6 +726,14 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) if (mFired) { llwarns << "called after holder fired" << llendl; + if (wearable) + { + mLateArrivals.insert(wearable); + if (mIsAllComplete) + { + handleLateArrivals(); + } + } return; } @@ -1269,8 +1364,7 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo LLInventoryItem::item_array_t items; LLDynamicArray< LLWearable* > wearables; - // For each wearable type, find the first instance in the category - // that we recursed through. + // For each wearable type, find the wearables of that type. for( S32 i = 0; i < LLWearableType::WT_COUNT; i++ ) { for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->getFoundList().begin(); -- cgit v1.2.3 From 664a07dd8d034a729992994ae1c29f47ad32d8f1 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 14 Jun 2010 14:59:56 +0300 Subject: EXT-7727 FIX reset sidetray tab to home_tab when login is complete. Aslo add parameter to callback to prevent showing appearance panel when creating initial outfit - _sometimes_ this callback was called _after_ login was finished. rewieved by Mike Antipov at https://codereview.productengine.com/secondlife/r/574/ --HG-- branch : product-engine --- indra/newview/llappearancemgr.cpp | 15 +++++++++++---- indra/newview/llappearancemgr.h | 2 +- indra/newview/llsidetray.cpp | 10 ++++++++++ indra/newview/llsidetray.h | 2 ++ indra/newview/llstartup.cpp | 3 +-- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 3691d731ed..dba8707423 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1992,13 +1992,19 @@ void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id) class LLShowCreatedOutfit: public LLInventoryCallback { public: - LLShowCreatedOutfit(LLUUID& folder_id): mFolderID(folder_id) + LLShowCreatedOutfit(LLUUID& folder_id, bool show_panel = true): mFolderID(folder_id), mShowPanel(show_panel) {} virtual ~LLShowCreatedOutfit() { LLSD key; - LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); + + //EXT-7727. For new accounts LLShowCreatedOutfit is created during login process + // add may be processed after login process is finished + if (mShowPanel) + { + LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); + } LLPanelOutfitsInventory *outfit_panel = dynamic_cast(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); if (outfit_panel) @@ -2022,9 +2028,10 @@ public: private: LLUUID mFolderID; + bool mShowPanel; }; -LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name) +LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, bool show_panel) { if (!isAgentAvatarValid()) return LLUUID::null; @@ -2037,7 +2044,7 @@ LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name) updateClothingOrderingInfo(); - LLPointer cb = new LLShowCreatedOutfit(folder_id); + LLPointer cb = new LLShowCreatedOutfit(folder_id,show_panel); shallowCopyCategoryContents(getCOF(),folder_id, cb); createBaseOutfitLink(folder_id, cb); diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 2227a43cd8..e42f9f7d6f 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -151,7 +151,7 @@ public: void removeItemFromAvatar(const LLUUID& item_id); - LLUUID makeNewOutfitLinks(const std::string& new_folder_name); + LLUUID makeNewOutfitLinks(const std::string& new_folder_name,bool show_panel = true); bool moveWearable(LLViewerInventoryItem* item, bool closer_to_body); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 9406f80b75..fed39c362e 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -35,6 +35,7 @@ #include "lltextbox.h" #include "llagentcamera.h" +#include "llappviewer.h" #include "llbottomtray.h" #include "llsidetray.h" #include "llviewerwindow.h" @@ -272,9 +273,18 @@ BOOL LLSideTray::postBuild() collapseSideBar(); setMouseOpaque(false); + + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSideTray::handleLoginComplete, this)); + return true; } +void LLSideTray::handleLoginComplete() +{ + //reset tab to "home" tab if it was changesd during login process + selectTabByName("sidebar_home"); +} + LLSideTrayTab* LLSideTray::getTab(const std::string& name) { return getChild(name,false); diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index e176ff5aff..3a8d308425 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -161,6 +161,8 @@ public: commit_signal_t& getCollapseSignal() { return mCollapseSignal; } + void handleLoginComplete(); + protected: LLSideTrayTab* getTab (const std::string& name); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index fff80e57dc..ecf73635cf 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2495,8 +2495,7 @@ void LLStartUp::saveInitialOutfit() { sWearablesLoadedCon.disconnect(); } - - LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit); + LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false); } std::string& LLStartUp::getInitialOutfitName() -- cgit v1.2.3 From fdeb1a5c76e532ad8035963094a7fe98c998b176 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 14 Jun 2010 15:02:15 +0300 Subject: EXT-7800 FIX add scroll wheel handle to accordion tab reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/577/ --HG-- branch : product-engine --- indra/llui/llaccordionctrltab.cpp | 13 +++++++++++++ indra/llui/llaccordionctrltab.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 1bc8086a27..be231fd8cf 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -968,3 +968,16 @@ BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask) } return LLUICtrl::handleToolTip(x, y, mask); } +BOOL LLAccordionCtrlTab::handleScrollWheel ( S32 x, S32 y, S32 clicks ) +{ + if( LLUICtrl::handleScrollWheel(x,y,clicks)) + { + return TRUE; + } + if( mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) ) + { + return TRUE; + } + return FALSE; +} + diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 480b26e130..19d4ec0a1c 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -166,6 +166,8 @@ public: virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); virtual BOOL handleToolTip(S32 x, S32 y, MASK mask); + virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); + virtual bool addChild(LLView* child, S32 tab_group); -- cgit v1.2.3 From 5626e1b8afb31158803414117e58cecf82aab339 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 14 Jun 2010 15:43:07 +0300 Subject: EXT-7831 FIX Reset mHasRoleChange flag when setting group id. reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/581/ --HG-- branch : product-engine --- indra/newview/llpanelgrouproles.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index b356fe6bfd..26e8a932aa 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -815,6 +815,8 @@ void LLPanelGroupRolesSubTab::setGroupID(const LLUUID& id) if(mRoleDescription) mRoleDescription->clear(); if(mRoleTitle) mRoleTitle->clear(); + mHasRoleChange = FALSE; + setFooterEnabled(FALSE); LLPanelGroupSubTab::setGroupID(id); -- cgit v1.2.3 From 0ec92fb1c8a90d619d0102d0807a32abedc916f1 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Mon, 14 Jun 2010 16:12:20 +0300 Subject: EXT-7783 FIXED Provided updating outfit label in My outfits and Edit outfit panels. 1 Corrected LLAppearanceMgr::getBaseOutfitLink() method to avoid returning link in case base outfit moved to trash. 2 Hooked up LLSidepanelAppearance::refreshCurrentOutfitName() method on BOFReplaced signal. reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/571/ --HG-- branch : product-engine --- indra/newview/llappearancemgr.cpp | 7 +++++++ indra/newview/llsidepanelappearance.cpp | 1 + 2 files changed, 8 insertions(+) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index dba8707423..bc17605202 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -644,6 +644,13 @@ const LLViewerInventoryItem* LLAppearanceMgr::getBaseOutfitLink() const LLViewerInventoryCategory *cat = item->getLinkedCategory(); if (cat && cat->getPreferredType() == LLFolderType::FT_OUTFIT) { + const LLUUID parent_id = cat->getParentUUID(); + LLViewerInventoryCategory* parent_cat = gInventory.getCategory(parent_id); + // if base outfit moved to trash it means that we don't have base outfit + if (parent_cat != NULL && parent_cat->getPreferredType() == LLFolderType::FT_TRASH) + { + return NULL; + } return item; } } diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index e23643da0b..67e79cb54a 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -83,6 +83,7 @@ LLSidepanelAppearance::LLSidepanelAppearance() : mOpened(false) { LLOutfitObserver& outfit_observer = LLOutfitObserver::instance(); + outfit_observer.addBOFReplacedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); outfit_observer.addBOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); outfit_observer.addCOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); } -- cgit v1.2.3 From 8364708595a87e426bf348826698e674976b9e00 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 14 Jun 2010 13:15:58 -0400 Subject: EXT-6571 WIP - basic handling of late arriving assets --- indra/newview/llappearancemgr.cpp | 43 +++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c19b3b50c1..a164cfeaa1 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -216,13 +216,15 @@ struct LLFoundData const LLUUID& asset_id, const std::string& name, const LLAssetType::EType& asset_type, - const LLWearableType::EType& wearable_type + const LLWearableType::EType& wearable_type, + const bool is_replacement = false ) : mItemID(item_id), mAssetID(asset_id), mName(name), mAssetType(asset_type), mWearableType(wearable_type), + mIsReplacement(is_replacement), mWearable( NULL ) {} LLUUID mItemID; @@ -231,6 +233,7 @@ struct LLFoundData LLAssetType::EType mAssetType; LLWearableType::EType mWearableType; LLWearable* mWearable; + bool mIsReplacement; }; @@ -519,7 +522,8 @@ public: linked_item->getAssetUUID(), linked_item->getName(), linked_item->getType(), - linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID + linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID, + true // is replacement ); found.mWearable = mWearable; mHolder->getFoundList().push_front(found); @@ -678,6 +682,7 @@ void LLWearableHoldingPattern::handleLateArrivals() llinfos << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << llendl; // Update mFoundList using late-arriving wearables. + std::set replaced_types; for (LLWearableHoldingPattern::found_list_t::iterator iter = getFoundList().begin(); iter != getFoundList().end(); ++iter) { @@ -687,10 +692,15 @@ void LLWearableHoldingPattern::handleLateArrivals() ++wear_it) { LLWearable *wearable = *wear_it; - + if(wearable->getAssetID() == data.mAssetID) { data.mWearable = wearable; + + replaced_types.insert(data.mWearableType); + + LLAppearanceMgr::instance().addCOFItemLink(data.mItemID,false); + // BAP failing this means inventory or asset server // are corrupted in a way we don't handle. llassert((data.mWearableType < LLWearableType::WT_COUNT) && (wearable->getType() == data.mWearableType)); @@ -699,7 +709,32 @@ void LLWearableHoldingPattern::handleLateArrivals() } } - // TODO: handle corresponding default wearable links? + // Remove COF links for any default wearables previously used to replace the late arrivals. + // All this pussyfooting around with a while loop and explicit + // iterator incrementing is to allow removing items from the list + // without clobbering the iterator we're using to navigate. + LLWearableHoldingPattern::found_list_t::iterator iter = getFoundList().begin(); + while (iter != getFoundList().end()) + { + LLFoundData& data = *iter; + + // If an item of this type has recently shown up, removed the corresponding replacement wearable from COF. + if (data.mWearable && data.mIsReplacement && + replaced_types.find(data.mWearableType) != replaced_types.end()) + { + LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID); + std::list::iterator clobber_ator = iter; + ++iter; + getFoundList().erase(clobber_ator); + } + else + { + ++iter; + } + } + + // Clear contents of late arrivals. + mLateArrivals.clear(); // Update appearance based on mFoundList LLAppearanceMgr::instance().updateAgentWearables(this, false); -- cgit v1.2.3 From 961656863a5e50e5f80e1e316811b884dd8a949f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 14 Jun 2010 17:19:40 -0400 Subject: EXT-6571 WIP - fixes for handling of late arriving assets --- indra/newview/app_settings/settings.xml | 22 +++++++++++----------- indra/newview/llappearancemgr.cpp | 17 ++++++++++++----- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f5e3656dc6..97d9e9f43a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3556,17 +3556,6 @@ Value 255 - MaxWearableWaitTime - - Comment - Max seconds to wait for wearable assets to fetch. - Persist - 1 - Type - F32 - Value - 60.0 - ForceShowGrid Comment @@ -4712,6 +4701,17 @@ Value 64.0 + MaxWearableWaitTime + + Comment + Max seconds to wait for wearable assets to fetch. + Persist + 1 + Type + F32 + Value + 60.0 + MeanCollisionBump Comment diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a164cfeaa1..e54b9fe2ea 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -265,6 +265,7 @@ public: void setGestItems(const LLInventoryModel::item_array_t& items); bool isValid(); void handleLateArrivals(); + void resetTime(F32 timeout); private: found_list_t mFoundList; @@ -351,8 +352,7 @@ bool LLWearableHoldingPattern::isFetchCompleted() bool LLWearableHoldingPattern::isTimedOut() { - F32 max_wait_time = gSavedSettings.getF32("MaxWearableWaitTime"); // give up if wearable fetches haven't completed in max_wait_time seconds. - return mWaitTime.getElapsedTimeF32() > max_wait_time; + return mWaitTime.hasExpired(); } void LLWearableHoldingPattern::checkMissingWearables() @@ -395,7 +395,7 @@ void LLWearableHoldingPattern::checkMissingWearables() } } - mWaitTime.reset(); + resetTime(60.0F); if (!pollMissingWearables()) { doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollMissingWearables,this)); @@ -722,7 +722,7 @@ void LLWearableHoldingPattern::handleLateArrivals() if (data.mWearable && data.mIsReplacement && replaced_types.find(data.mWearableType) != replaced_types.end()) { - LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID); + LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID,false); std::list::iterator clobber_ator = iter; ++iter; getFoundList().erase(clobber_ator); @@ -740,6 +740,12 @@ void LLWearableHoldingPattern::handleLateArrivals() LLAppearanceMgr::instance().updateAgentWearables(this, false); } +void LLWearableHoldingPattern::resetTime(F32 timeout) +{ + mWaitTime.reset(); + mWaitTime.setTimerExpirySec(timeout); +} + void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) { if (!isValid()) @@ -1522,7 +1528,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF() linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); - if (skip_type != LLWearableType::WT_INVALID && found.mWearableType == skip_type) + if (skip_type != LLWearableType::WT_INVALID && skip_type == found.mWearableType) { found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB } @@ -1558,6 +1564,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF() } + holder->resetTime(gSavedSettings.getF32("MaxWearableWaitTime")); if (!holder->pollFetchCompletion()) { doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollFetchCompletion,holder)); -- cgit v1.2.3 From 380f472308e3be7af3b3efb57098cc30aee2c901 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 14 Jun 2010 15:37:39 -0700 Subject: EXT-7833 FIX [crashhunters] Crash in LLTextBase::reflow() --- indra/llui/lltextbase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 1a4b804ce4..3c6c7d3e82 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2803,13 +2803,13 @@ S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin { LLUIImagePtr image = mStyle->getImage(); S32 image_width = image->getWidth(); - if(num_pixels>image_width + IMAGE_HPAD) + if(line_offset == 0 || num_pixels>image_width + IMAGE_HPAD) { return 1; } - return 0; } + F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { if ( (start >= 0) && (end <= mEnd - mStart)) -- cgit v1.2.3 From e97cef4de92f446bb51b4137ce64605f74d7f48e Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 14 Jun 2010 15:38:02 -0700 Subject: EXT-7664 FIX Titles of all floaters are shifted down --- indra/llui/llfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 341debc9a8..9a56372e68 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -347,7 +347,7 @@ void LLFloater::layoutDragHandle() { rect = getLocalRect(); } - mDragHandle->setRect(rect); + mDragHandle->setShape(rect); updateTitleButtons(); } -- cgit v1.2.3 From 3894b745c545b7b124b845fd60583c3e21592738 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Mon, 14 Jun 2010 16:05:39 -0700 Subject: Fix EXT-7583: changed message to something more reasonable. --- indra/newview/skins/default/xui/en/notifications.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index aca3b750c8..cf3097cb06 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1397,8 +1397,7 @@ Unable to encode file: [FILE] icon="alertmodal.tga" name="CorruptedProtectedDataStore" type="alertmodal"> - We are unable to read your protected data so it is being reset. - This may happen when you change network setup. + We can't fill in your username and password. This may happen when you change network setup Date: Mon, 14 Jun 2010 16:58:49 -0700 Subject: Fix mac dev build error. --- indra/newview/CMakeLists.txt | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 53c6369534..24811db3cb 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1773,40 +1773,19 @@ if (DARWIN) COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - --grid=${GRID} - --buildtype=${CMAKE_BUILD_TYPE} - --configuration=${CMAKE_CFG_INTDIR} - --channel=${VIEWER_CHANNEL} - --login_channel=${VIEWER_LOGIN_CHANNEL} - --source=${CMAKE_CURRENT_SOURCE_DIR} --artwork=${ARTWORK_DIR} --build=${CMAKE_CURRENT_BINARY_DIR} - --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app - --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - ) - - - add_custom_command( - TARGET package POST_BUILD - COMMAND ${PYTHON_EXECUTABLE} - ARGS - ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - --grid=${GRID} --buildtype=${CMAKE_BUILD_TYPE} - --configuration=${CMAKE_CFG_INTDIR} --channel=${VIEWER_CHANNEL} + --configuration=${CMAKE_CFG_INTDIR} + --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app + --grid=${GRID} --login_channel=${VIEWER_LOGIN_CHANNEL} --source=${CMAKE_CURRENT_SOURCE_DIR} - --artwork=${ARTWORK_DIR} - --build=${CMAKE_CURRENT_BINARY_DIR} - --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) - endif (PACKAGE) endif (DARWIN) -- cgit v1.2.3 From 8f592d0ecdaa2a43b313a6a9f192eb2f4d999a92 Mon Sep 17 00:00:00 2001 From: palange Date: Mon, 14 Jun 2010 17:03:15 -0700 Subject: Fix mac dev build error, mac always package. --- indra/newview/viewer_manifest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 8d2525dd26..c2d86b91c6 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -559,6 +559,10 @@ class WindowsManifest(ViewerManifest): class DarwinManifest(ViewerManifest): + def is_packaging_viewer(self): + # darwin requires full app bundle packaging even for debugging. + return true + def construct(self): # copy over the build result (this is a no-op if run within the xcode script) self.path(self.args['configuration'] + "/Second Life.app", dst="") -- cgit v1.2.3 From e0c404a866f72bc070ea5560983315752e9c446b Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 14 Jun 2010 17:26:32 -0700 Subject: EXT-7742 WIP "Add to Outfit" type filter should contain items for each wearable type and for each category added ability to filter inventory folder view by wearable type --- indra/newview/llfoldervieweventlistener.h | 2 ++ indra/newview/llinventorybridge.h | 2 ++ indra/newview/llinventoryfilter.cpp | 53 ++++++++++++++++++++++++++----- indra/newview/llinventoryfilter.h | 11 ++++--- indra/newview/llinventorypanel.cpp | 5 +++ indra/newview/llinventorypanel.h | 1 + 6 files changed, 62 insertions(+), 12 deletions(-) diff --git a/indra/newview/llfoldervieweventlistener.h b/indra/newview/llfoldervieweventlistener.h index a2ef8c1d12..82f8a10cf3 100644 --- a/indra/newview/llfoldervieweventlistener.h +++ b/indra/newview/llfoldervieweventlistener.h @@ -37,6 +37,7 @@ #include "llinventorytype.h" #include "llpermissionsflags.h" #include "llpointer.h" +#include "llwearabletype.h" class LLFolderViewItem; @@ -89,6 +90,7 @@ public: virtual BOOL hasChildren() const = 0; virtual LLInventoryType::EType getInventoryType() const = 0; virtual void performAction(LLInventoryModel* model, std::string action) = 0; + virtual LLWearableType::EType getWearableType() const = 0; // This method should be called when a drag begins. returns TRUE // if the drag can begin, otherwise FALSE. diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index d97dfd535e..757808eb93 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -123,6 +123,7 @@ public: EDragAndDropType cargo_type, void* cargo_data) { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return mInvType; } + virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } //-------------------------------------------------------------------- // Convenience functions for adding various common menu options. @@ -471,6 +472,7 @@ public: virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual std::string getLabelSuffix() const; virtual BOOL renameItem(const std::string& new_name); + virtual LLWearableType::EType getWearableType() const { return mWearableType; } static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu static BOOL canWearOnAvatar( void* userdata ); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index c90919e8fd..6e829f2dc2 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -49,6 +49,7 @@ LLInventoryFilter::FilterOps::FilterOps() : mFilterObjectTypes(0xffffffffffffffffULL), mFilterCategoryTypes(0xffffffffffffffffULL), + mFilterWearableTypes(0xffffffffffffffffULL), mMinDate(time_min()), mMaxDate(time_max()), mHoursAgo(0), @@ -139,8 +140,6 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con return FALSE; } } - // - //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// @@ -164,8 +163,6 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con if ((1LL << cat->getPreferredType() & mFilterOps.mFilterCategoryTypes) == U64(0)) return FALSE; } - // - //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// @@ -178,8 +175,6 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con if (object->getLinkedUUID() != mFilterOps.mFilterUUID) return FALSE; } - // - //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// @@ -201,8 +196,18 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con listener->getCreationDate() > mFilterOps.mMaxDate) return FALSE; } - // + //////////////////////////////////////////////////////////////////////////////// + // FILTERTYPE_WEARABLE + // Pass if this item is a wearable of the appropriate type + if (filterTypes & FILTERTYPE_WEARABLE) + { + LLWearableType::EType type = listener->getWearableType(); + if ((0x1LL << type & mFilterOps.mFilterWearableTypes) == 0) + { + return FALSE; + } + } return TRUE; } @@ -238,6 +243,8 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset() const BOOL LLInventoryFilter::isNotDefault() const { return mFilterOps.mFilterObjectTypes != mDefaultFilterOps.mFilterObjectTypes + || mFilterOps.mFilterCategoryTypes != mDefaultFilterOps.mFilterCategoryTypes + || mFilterOps.mFilterWearableTypes != mDefaultFilterOps.mFilterWearableTypes || mFilterOps.mFilterTypes != FILTERTYPE_OBJECT || mFilterSubString.size() || mFilterOps.mPermissions != mDefaultFilterOps.mPermissions @@ -249,6 +256,8 @@ BOOL LLInventoryFilter::isNotDefault() const BOOL LLInventoryFilter::isActive() const { return mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL + || mFilterOps.mFilterCategoryTypes != 0xffffffffffffffffULL + || mFilterOps.mFilterWearableTypes != 0xffffffffffffffffULL || mFilterOps.mFilterTypes != FILTERTYPE_OBJECT || mFilterSubString.size() || mFilterOps.mPermissions != PERM_NONE @@ -322,7 +331,35 @@ void LLInventoryFilter::setFilterCategoryTypes(U64 types) setModified(FILTER_MORE_RESTRICTIVE); } } - mFilterOps.mFilterTypes |= FILTERTYPE_CATEGORY; + mFilterOps.mFilterTypes |= FILTERTYPE_OBJECT; +} + +void LLInventoryFilter::setFilterWearableTypes(U64 types) +{ + if (mFilterOps.mFilterWearableTypes != types) + { + // keep current items only if no type bits getting turned off + BOOL fewer_bits_set = (mFilterOps.mFilterWearableTypes & ~types); + BOOL more_bits_set = (~mFilterOps.mFilterWearableTypes & types); + + mFilterOps.mFilterWearableTypes = types; + if (more_bits_set && fewer_bits_set) + { + // neither less or more restrive, both simultaneously + // so we need to filter from scratch + setModified(FILTER_RESTART); + } + else if (more_bits_set) + { + // target is only one of all requested types so more type bits == less restrictive + setModified(FILTER_LESS_RESTRICTIVE); + } + else if (fewer_bits_set) + { + setModified(FILTER_MORE_RESTRICTIVE); + } + } + mFilterOps.mFilterTypes |= FILTERTYPE_WEARABLE; } void LLInventoryFilter::setFilterUUID(const LLUUID& object_id) diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 3ef51baefc..f740a6b333 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -59,10 +59,11 @@ public: enum EFilterType { FILTERTYPE_NONE = 0, - FILTERTYPE_OBJECT = 1, // normal default search-by-object-type - FILTERTYPE_CATEGORY = 2, // search by folder type - FILTERTYPE_UUID = 4, // find the object with UUID and any links to it - FILTERTYPE_DATE = 8 // search by date range + FILTERTYPE_OBJECT = 0x1 << 0, // normal default search-by-object-type + FILTERTYPE_CATEGORY = 0x1 << 1, // search by folder type + FILTERTYPE_UUID = 0x1 << 2, // find the object with UUID and any links to it + FILTERTYPE_DATE = 0x1 << 3, // search by date range + FILTERTYPE_WEARABLE = 0x1 << 4 // search by wearable type }; // REFACTOR: Change this to an enum. @@ -81,6 +82,7 @@ public: BOOL isFilterObjectTypesWith(LLInventoryType::EType t) const; void setFilterCategoryTypes(U64 types); void setFilterUUID(const LLUUID &object_id); + void setFilterWearableTypes(U64 types); void setFilterSubString(const std::string& string); const std::string& getFilterSubString(BOOL trim = FALSE) const; @@ -168,6 +170,7 @@ private: U32 mFilterTypes; U64 mFilterObjectTypes; // For _OBJECT + U64 mFilterWearableTypes; U64 mFilterCategoryTypes; // For _CATEGORY LLUUID mFilterUUID; // for UUID diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 6b0103e0de..83c57d5bb2 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -226,6 +226,11 @@ void LLInventoryPanel::setFilterPermMask(PermissionMask filter_perm_mask) getFilter()->setFilterPermissions(filter_perm_mask); } +void LLInventoryPanel::setFilterWearableTypes(U64 types) +{ + getFilter()->setFilterWearableTypes(types); +} + void LLInventoryPanel::setFilterSubString(const std::string& string) { getFilter()->setFilterSubString(string); diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 67c8904868..52e9ef799e 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -138,6 +138,7 @@ public: U32 getFilterObjectTypes() const { return mFolderRoot->getFilterObjectTypes(); } void setFilterPermMask(PermissionMask filter_perm_mask); U32 getFilterPermMask() const { return mFolderRoot->getFilterPermissions(); } + void setFilterWearableTypes(U64 filter); void setFilterSubString(const std::string& string); const std::string getFilterSubString() { return mFolderRoot->getFilterSubString(); } void setSinceLogoff(BOOL sl); -- cgit v1.2.3 From 5e5c1a6ff94f2d93a9958646c18b331d906470db Mon Sep 17 00:00:00 2001 From: Palmer Truelson Date: Mon, 14 Jun 2010 17:42:57 -0700 Subject: Fixing viewer_manifest.py. upper case True needed. Reviewed by Mani --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c2d86b91c6..0fd3cf5b3b 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -561,7 +561,7 @@ class WindowsManifest(ViewerManifest): class DarwinManifest(ViewerManifest): def is_packaging_viewer(self): # darwin requires full app bundle packaging even for debugging. - return true + return True def construct(self): # copy over the build result (this is a no-op if run within the xcode script) -- cgit v1.2.3 From bdbd896cff69e30b34898f831d273f3e3c3109b7 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 14 Jun 2010 17:52:04 -0700 Subject: EXT-7742 WIP "Add to Outfit" type filter should contain items for each wearable type and for each category added ability to filter inventory folder view by wearable type --- indra/newview/llpanelobjectinventory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index ad3a5c2380..1d726ba06c 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -135,6 +135,8 @@ public: virtual BOOL isUpToDate() const { return TRUE; } virtual BOOL hasChildren() const { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; } + virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } + // LLDragAndDropBridge functionality virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, @@ -177,13 +179,13 @@ void LLTaskInvFVBridge::showProperties() show_item_profile(mUUID); // Disable old properties floater; this is replaced by the sidepanel. - /* + LLFloaterProperties* floater = LLFloaterReg::showTypedInstance("properties", mUUID); if (floater) { floater->setObjectID(mPanel->getTaskUUID()); } - */ + } struct LLBuyInvItemData -- cgit v1.2.3 From a43c997d0a7209da7e1b3d42b3e3998498741764 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 14 Jun 2010 17:55:50 -0700 Subject: re-disabled old style properties floater --- indra/newview/llpanelobjectinventory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 1d726ba06c..da809b7baa 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -179,12 +179,13 @@ void LLTaskInvFVBridge::showProperties() show_item_profile(mUUID); // Disable old properties floater; this is replaced by the sidepanel. - + /* LLFloaterProperties* floater = LLFloaterReg::showTypedInstance("properties", mUUID); if (floater) { floater->setObjectID(mPanel->getTaskUUID()); } + */ } -- cgit v1.2.3 From 300cb342919b2bfa62e9c90af5cdb99afa9c962e Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 15 Jun 2010 12:38:30 +0300 Subject: EXT-7794 FIXED Implemented a common-used notification about wearing outfit to display loading indicator. Details: * Added signal "Wearable Loading Started" in AgentWearables (in parallel with "Wearables Loaded") * Now it is raised from the LLAppearanceMgr::wearInventoryCategory. Reviewed by Vadim Savchuk and Neal Orman at https://codereview.productengine.com/secondlife/r/583/ --HG-- branch : product-engine --- indra/newview/llagentwearables.cpp | 12 ++++++++++++ indra/newview/llagentwearables.h | 7 +++++++ indra/newview/llappearancemgr.cpp | 1 + indra/newview/llpaneloutfitsinventory.cpp | 7 ++++++- indra/newview/llpaneloutfitsinventory.h | 1 + 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 342f9a5d80..557b3b0a77 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -2099,7 +2099,19 @@ void LLAgentWearables::populateMyOutfitsFolder(void) } } +boost::signals2::connection LLAgentWearables::addLoadingStartedCallback(loading_started_callback_t cb) +{ + return mLoadingStartedSignal.connect(cb); +} + boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_t cb) { return mLoadedSignal.connect(cb); } + +void LLAgentWearables::notifyLoadingStarted() +{ + mLoadingStartedSignal(); +} + +// EOF diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index a41b949be6..3295544e04 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -224,11 +224,18 @@ public: // Signals //-------------------------------------------------------------------- public: + typedef boost::function loading_started_callback_t; + typedef boost::signals2::signal loading_started_signal_t; + boost::signals2::connection addLoadingStartedCallback(loading_started_callback_t cb); + typedef boost::function loaded_callback_t; typedef boost::signals2::signal loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); + void notifyLoadingStarted(); + private: + loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded //-------------------------------------------------------------------- diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index bc17605202..a7206095d3 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1407,6 +1407,7 @@ void LLAppearanceMgr::getUserDescendents(const LLUUID& category, void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append) { + gAgentWearables.notifyLoadingStarted(); if(!category) return; llinfos << "wearInventoryCategory( " << category->getName() diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 1157c40b39..5563214407 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -245,6 +245,7 @@ LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoaded, this)); + gAgentWearables.addLoadingStartedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoading, this)); LLOutfitObserver& observer = LLOutfitObserver::instance(); observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this)); @@ -382,7 +383,6 @@ void LLPanelOutfitsInventory::onWearButtonClick() if (!isCOFPanelActive()) { mMyOutfitsPanel->performAction("replaceoutfit"); - setWearablesLoading(true); } else { @@ -854,6 +854,11 @@ void LLPanelOutfitsInventory::onWearablesLoaded() setWearablesLoading(false); } +void LLPanelOutfitsInventory::onWearablesLoading() +{ + setWearablesLoading(true); +} + // static LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP() { diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index d58ae554b0..863dc9dd7c 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -127,6 +127,7 @@ protected: bool hasItemsSelected(); void setWearablesLoading(bool val); void onWearablesLoaded(); + void onWearablesLoading(); private: LLPanel* mListCommands; LLOutfitListGearMenu* mGearMenu; -- cgit v1.2.3 From 11903fab735d3eb3464bdec5cf11a1027fd2ac3f Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 15 Jun 2010 12:51:13 +0300 Subject: EXT-7783 ADDITIONAL FIX Corerected emitting BOF changed/replaced signals in LLOutfitObserver. Emitting COF changed shouldn't block emitting BOF changed/replaced signals. reviewed by Mike Antipov --HG-- branch : product-engine --- indra/newview/lloutfitobserver.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/indra/newview/lloutfitobserver.cpp b/indra/newview/lloutfitobserver.cpp index efa01bade9..03414b9964 100644 --- a/indra/newview/lloutfitobserver.cpp +++ b/indra/newview/lloutfitobserver.cpp @@ -56,12 +56,9 @@ void LLOutfitObserver::changed(U32 mask) if (!gInventory.isInventoryUsable()) return; - bool COF_changed = checkCOF(); + checkCOF(); - if (!COF_changed) - { - checkBaseOutfit(); - } + checkBaseOutfit(); } // static -- cgit v1.2.3 From c21c192d0c65e0e9b506e08a918d700a1e400725 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 15 Jun 2010 13:01:11 +0100 Subject: EXT-7348 Can't open Advanced Menu in Linux Client Added a new, preferred shortcut for Show Advanced Menu, that isn't eaten by the desktop on Linux. The old shortcut also works. --- indra/newview/skins/default/xui/en/menu_viewer.xml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 2641ce4ee4..3557318705 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -927,7 +927,7 @@ + shortcut="control|alt|shift|D"> @@ -1477,6 +1477,18 @@ + + + + + - - \ No newline at end of file + -- cgit v1.2.3 From 2fc77b8ee8184fe10c9f4da6ad79d80e89dc8a6b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 15 Jun 2010 13:13:24 +0100 Subject: VWR-19683 llmediaimplgstreamervidplug gcc 4.4 build errors --- doc/contributions.txt | 2 ++ indra/media_plugins/gstreamer010/CMakeLists.txt | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index a74cf32afa..8c6bd5e0fe 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -185,6 +185,8 @@ Dale Glass VWR-2502 VWR-1358 VWR-2041 +Drew Dri + VWR-19683 Drewan Keats VWR-28 VWR-248 diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt index 3b73e04786..9f0ff654fc 100644 --- a/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/indra/media_plugins/gstreamer010/CMakeLists.txt @@ -42,12 +42,12 @@ set(media_plugin_gstreamer010_HEADER_FILES llmediaimplgstreamertriviallogging.h ) -if (${CXX_VERSION_NUMBER} MATCHES "4[23].") +if (${CXX_VERSION_NUMBER} MATCHES "4[23456789].") # Work around a bad interaction between broken gstreamer headers and - # g++ 4.3's increased strictness. + # g++ >= 4.2's increased strictness. set_source_files_properties(llmediaimplgstreamervidplug.cpp PROPERTIES COMPILE_FLAGS -Wno-write-strings) -endif (${CXX_VERSION_NUMBER} MATCHES "4[23].") +endif (${CXX_VERSION_NUMBER} MATCHES "4[23456789].") add_library(media_plugin_gstreamer010 SHARED -- cgit v1.2.3 From fce2653f6b5e8ca3509d13e3449b1fdd2f5ff826 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 15 Jun 2010 13:26:40 +0100 Subject: SNOW-620 PARTIAL Infinite loop in LLSphere::getBoundingSphere Neither the test nor the code being tested are good - the unit test can hang. Skipping test for now, passing over to the sim maint backlog. --- indra/llmath/tests/mathmisc_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/llmath/tests/mathmisc_test.cpp b/indra/llmath/tests/mathmisc_test.cpp index ea42f6e001..68d9ddc0fe 100644 --- a/indra/llmath/tests/mathmisc_test.cpp +++ b/indra/llmath/tests/mathmisc_test.cpp @@ -334,6 +334,8 @@ namespace tut template<> template<> void sphere_object::test<2>() { + skip("See SNOW-620. Neither the test nor the code being tested seem good. Also sim-only."); + // test LLSphere::getBoundingSphere() S32 number_of_tests = 100; S32 number_of_spheres = 10; -- cgit v1.2.3 From c773e01fbf795d8d40b19f8d9163898712509770 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 15 Jun 2010 15:48:52 +0300 Subject: EXT-7789 FIXED Removed "Rename Outfit" option from My Outfits gear menu Reviewed by Nyx at https://codereview.productengine.com/secondlife/r/584/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitsinventory.cpp | 16 +--------------- indra/newview/skins/default/xui/en/menu_outfit_gear.xml | 13 ------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 5563214407..7e1bff0961 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -86,7 +86,6 @@ public: registrar.add("Gear.Wear", boost::bind(&LLOutfitListGearMenu::onWear, this)); registrar.add("Gear.TakeOff", boost::bind(&LLOutfitListGearMenu::onTakeOff, this)); - registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this)); registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); @@ -159,15 +158,6 @@ private: } } - void onRename() - { - const LLUUID& selected_outfit_id = getSelectedOutfitID(); - if (selected_outfit_id.notNull()) - { - LLAppearanceMgr::instance().renameOutfit(selected_outfit_id); - } - } - void onDelete() { const LLUUID& selected_outfit_id = getSelectedOutfitID(); @@ -197,11 +187,7 @@ private: return false; } - if ("rename" == param) - { - return get_is_category_renameable(&gInventory, selected_outfit_id); - } - else if ("delete" == param) + if ("delete" == param) { return LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit_id); } diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml index 8e7ef7f0b5..16b33eff89 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml @@ -175,19 +175,6 @@ - - - - - Date: Tue, 15 Jun 2010 16:02:45 +0300 Subject: EXT-7860 FIXED added check against NULL for member pointer. Reviewed by Vadim Savchuk. --HG-- branch : product-engine --- indra/llui/llaccordionctrltab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index be231fd8cf..54bb328a18 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -974,7 +974,7 @@ BOOL LLAccordionCtrlTab::handleScrollWheel ( S32 x, S32 y, S32 clicks ) { return TRUE; } - if( mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) ) + if( mScrollbar && mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) ) { return TRUE; } -- cgit v1.2.3 From 10c722604a0c52f5dc23b9d8c52703aad024daa2 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 15 Jun 2010 14:35:21 +0100 Subject: Backed out changeset 6d51a12cb2d8 --- indra/llcommon/lldate.cpp | 23 +---------- indra/newview/llfloatersnapshot.cpp | 79 ++++++++++++++++++------------------- 2 files changed, 41 insertions(+), 61 deletions(-) diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index a7ef28b431..de7f2ead74 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -248,27 +248,8 @@ bool LLDate::fromStream(std::istream& s) s >> fractional; seconds_since_epoch += fractional; } - - c = s.peek(); // check for offset - if (c == '+' || c == '-') - { - S32 offset_sign = (c == '+') ? 1 : -1; - S32 offset_hours = 0; - S32 offset_minutes = 0; - S32 offset_in_seconds = 0; - - s >> offset_hours; - - c = s.get(); // skip the colon a get the minutes if there are any - if (c == ':') - { - s >> offset_minutes; - } - - offset_in_seconds = (offset_hours * 60 + offset_sign * offset_minutes) * 60; - seconds_since_epoch -= offset_in_seconds; - } - else if (c != 'Z') { return false; } // skip the Z + c = s.get(); // skip the Z + if (c != 'Z') { return false; } mSecondsSinceEpoch = seconds_since_epoch; return true; diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 129dd55e48..00981d3c25 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -164,6 +164,8 @@ public: void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; } void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f); LLFloaterPostcard* savePostcard(); + void confirmSavingTexture(bool set_as_profile_pic = false); + bool onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic); void saveTexture(bool set_as_profile_pic = false); BOOL saveLocal(); void saveWeb(std::string url); @@ -979,6 +981,27 @@ void profile_pic_upload_callback(const LLUUID& uuid) floater->setAsProfilePic(uuid); } +void LLSnapshotLivePreview::confirmSavingTexture(bool set_as_profile_pic) +{ + LLSD args; + args["AMOUNT"] = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + LLNotificationsUtil::add("UploadConfirmation", args, LLSD(), + boost::bind(&LLSnapshotLivePreview::onSavingTextureConfirmed, this, _1, _2, set_as_profile_pic)); +} + +bool LLSnapshotLivePreview::onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (option == 0) + { + saveTexture(set_as_profile_pic); + } + + return false; +} + + void LLSnapshotLivePreview::saveTexture(bool set_as_profile_pic) { // gen a new uuid for this asset @@ -1157,9 +1180,6 @@ public: static void onCommitSnapshotFormat(LLUICtrl* ctrl, void* data); static void onCommitCustomResolution(LLUICtrl *ctrl, void* data); static void onCommitSnapshot(LLFloaterSnapshot* view, LLSnapshotLivePreview::ESnapshotType type); - static void confirmSavingTexture(LLFloaterSnapshot* view, bool set_as_profile_pic = false); - static void onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, LLFloaterSnapshot* view, bool set_as_profile_pic); - static void checkCloseOnKeep(LLFloaterSnapshot* view); static void onCommitProfilePic(LLFloaterSnapshot* view); static void showAdvanced(LLFloaterSnapshot* view, const BOOL visible); static void resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height) ; @@ -1699,7 +1719,13 @@ public: void LLFloaterSnapshot::Impl::onCommitProfilePic(LLFloaterSnapshot* view) { - confirmSavingTexture(view, true); + //first save to harddrive + LLSnapshotLivePreview* previewp = getPreviewView(view); + + if(previewp) + { + previewp->confirmSavingTexture(true); + } } void LLFloaterSnapshot::Impl::onCommitSnapshot(LLFloaterSnapshot* view, LLSnapshotLivePreview::ESnapshotType type) @@ -1713,17 +1739,14 @@ void LLFloaterSnapshot::Impl::onCommitSnapshot(LLFloaterSnapshot* view, LLSnapsh if (type == LLSnapshotLivePreview::SNAPSHOT_WEB) { previewp->saveWeb(view->getString("share_to_web_url")); - checkCloseOnKeep(view); } else if (type == LLSnapshotLivePreview::SNAPSHOT_LOCAL) { previewp->saveLocal(); - checkCloseOnKeep(view); } else if (type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) { - // uploads and then calls checkCloseOnKeep() on confirmation from user - confirmSavingTexture(view); + previewp->confirmSavingTexture(); } else if (type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD) { @@ -1736,40 +1759,16 @@ void LLFloaterSnapshot::Impl::onCommitSnapshot(LLFloaterSnapshot* view, LLSnapsh gSnapshotFloaterView->addChild(floater); view->addDependentFloater(floater, FALSE); } - checkCloseOnKeep(view); } - } -} - -void LLFloaterSnapshot::Impl::confirmSavingTexture(LLFloaterSnapshot* view, bool set_as_profile_pic) -{ - LLSD args; - args["AMOUNT"] = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - LLNotificationsUtil::add("UploadConfirmation", args, LLSD(), - boost::bind(&onSavingTextureConfirmed, _1, _2, view, set_as_profile_pic)); -} - -void LLFloaterSnapshot::Impl::onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, LLFloaterSnapshot* view, bool set_as_profile_pic) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - - if (option == 0) - { - LLSnapshotLivePreview* previewp = getPreviewView(view); - previewp->saveTexture(set_as_profile_pic); - checkCloseOnKeep(view); - } -} -void LLFloaterSnapshot::Impl::checkCloseOnKeep(LLFloaterSnapshot* view) -{ - if (gSavedSettings.getBOOL("CloseSnapshotOnKeep")) - { - view->closeFloater(); - } - else - { - checkAutoSnapshot(getPreviewView(view)); + if (gSavedSettings.getBOOL("CloseSnapshotOnKeep")) + { + view->closeFloater(); + } + else + { + checkAutoSnapshot(previewp); + } } } -- cgit v1.2.3 From c8dea8b6e5db483b9f72dfeaa566b43560bfd349 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 15 Jun 2010 14:39:10 +0100 Subject: Backed out changeset 2f4b18cc2bbf --- indra/newview/llfloatersnapshot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 00981d3c25..fa2a9873fc 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1181,7 +1181,7 @@ public: static void onCommitCustomResolution(LLUICtrl *ctrl, void* data); static void onCommitSnapshot(LLFloaterSnapshot* view, LLSnapshotLivePreview::ESnapshotType type); static void onCommitProfilePic(LLFloaterSnapshot* view); - static void showAdvanced(LLFloaterSnapshot* view, const BOOL visible); + static void showAdvanced(LLFloaterSnapshot* view, const bool visible); static void resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height) ; static BOOL checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value); @@ -1649,7 +1649,7 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data) } //static -void LLFloaterSnapshot::Impl::showAdvanced(LLFloaterSnapshot* view, const BOOL visible) +void LLFloaterSnapshot::Impl::showAdvanced(LLFloaterSnapshot* view, const bool visible) { LLPanel* advanced_panel = view->getChild("snapshot_advanced"); -- cgit v1.2.3 From 0effcd8a9f0a6ab3dd84506e0aa3333d5ebee8c2 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 15 Jun 2010 14:39:37 +0100 Subject: Backed out changeset fb6c9a1cebfc --- indra/newview/llfloatersnapshot.cpp | 118 +++++++++---- indra/newview/llfloatersnapshot.h | 9 +- .../skins/default/xui/en/floater_snapshot.xml | 192 +++++++++------------ 3 files changed, 169 insertions(+), 150 deletions(-) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index fa2a9873fc..5bea3325a8 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -91,6 +91,10 @@ ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- +S32 LLFloaterSnapshot::sUIWinHeightLong = 526 ; +S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 230 ; +S32 LLFloaterSnapshot::sUIWinWidth = 215 ; + LLSnapshotFloaterView* gSnapshotFloaterView = NULL; const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; @@ -1168,6 +1172,9 @@ public: } static void onClickNewSnapshot(void* data); static void onClickAutoSnap(LLUICtrl *ctrl, void* data); + //static void onClickAdvanceSnap(LLUICtrl *ctrl, void* data); + static void onClickLess(void* data) ; + static void onClickMore(void* data) ; static void onClickUICheck(LLUICtrl *ctrl, void* data); static void onClickHUDCheck(LLUICtrl *ctrl, void* data); static void onClickKeepOpenCheck(LLUICtrl *ctrl, void* data); @@ -1181,7 +1188,7 @@ public: static void onCommitCustomResolution(LLUICtrl *ctrl, void* data); static void onCommitSnapshot(LLFloaterSnapshot* view, LLSnapshotLivePreview::ESnapshotType type); static void onCommitProfilePic(LLFloaterSnapshot* view); - static void showAdvanced(LLFloaterSnapshot* view, const bool visible); + static void onToggleAdvanced(LLUICtrl *ctrl, void* data); static void resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height) ; static BOOL checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value); @@ -1392,6 +1399,41 @@ void LLFloaterSnapshot::Impl::onClickAutoSnap(LLUICtrl *ctrl, void* data) } } +void LLFloaterSnapshot::Impl::onClickMore(void* data) +{ + gSavedSettings.setBOOL( "AdvanceSnapshot", TRUE ); + + LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; + if (view) + { + view->translate( 0, view->getUIWinHeightShort() - view->getUIWinHeightLong() ); + view->reshape(view->getRect().getWidth(), view->getUIWinHeightLong()); + updateControls(view) ; + updateLayout(view) ; + if(getPreviewView(view)) + { + getPreviewView(view)->setThumbnailImageSize() ; + } + } +} +void LLFloaterSnapshot::Impl::onClickLess(void* data) +{ + gSavedSettings.setBOOL( "AdvanceSnapshot", FALSE ); + + LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; + if (view) + { + view->translate( 0, view->getUIWinHeightLong() - view->getUIWinHeightShort() ); + view->reshape(view->getRect().getWidth(), view->getUIWinHeightShort()); + updateControls(view) ; + updateLayout(view) ; + if(getPreviewView(view)) + { + getPreviewView(view)->setThumbnailImageSize() ; + } + } +} + // static void LLFloaterSnapshot::Impl::onClickUICheck(LLUICtrl *ctrl, void* data) { @@ -1649,28 +1691,30 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data) } //static -void LLFloaterSnapshot::Impl::showAdvanced(LLFloaterSnapshot* view, const bool visible) +void LLFloaterSnapshot::Impl::onToggleAdvanced(LLUICtrl* ctrl, void* data) { + LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; + LLPanel* advanced_panel = view->getChild("snapshot_advanced"); - if (advanced_panel->getVisible() != visible) + if (advanced_panel->getVisible()) { - gSavedSettings.setBOOL("AdvanceSnapshot", visible); + advanced_panel->setVisible(false); - advanced_panel->setVisible(visible); - view->getChild("hide_advanced")->setVisible(visible); - view->getChild("show_advanced")->setVisible(!visible); + // shrink floater back to original size + view->reshape(view->getRect().getWidth() - advanced_panel->getRect().getWidth(), view->getRect().getHeight()); - if (visible) - { - // stretch the floater so it can accommodate the advanced panel - view->reshape(view->getRect().getWidth() + advanced_panel->getRect().getWidth(), view->getRect().getHeight()); - } - else - { - // shrink floater back to original size - view->reshape(view->getRect().getWidth() - advanced_panel->getRect().getWidth(), view->getRect().getHeight()); - } + view->getChild("hide_advanced")->setVisible(false); + view->getChild("show_advanced")->setVisible(true); + } + else + { + advanced_panel->setVisible(true); + // stretch the floater so it can accommodate the advanced panel + view->reshape(view->getRect().getWidth() + advanced_panel->getRect().getWidth(), view->getRect().getHeight()); + + view->getChild("hide_advanced")->setVisible(true); + view->getChild("show_advanced")->setVisible(false); } } @@ -1958,11 +2002,6 @@ LLFloaterSnapshot::LLFloaterSnapshot(const LLSD& key) impl (*(new Impl)) { //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_snapshot.xml", FALSE); - - mCommitCallbackRegistrar.add("Snapshot.ShowButtons", boost::bind(&LLFloaterSnapshot::updateButtons, this, _2)); - mCommitCallbackRegistrar.add("Snapshot.ShowAdvanced", boost::bind(&Impl::showAdvanced, this, true)); - mCommitCallbackRegistrar.add("Snapshot.HideAdvanced", boost::bind(&Impl::showAdvanced, this, false)); - mCommitCallbackRegistrar.add("Snapshot.Refresh", boost::bind(&Impl::onClickNewSnapshot, this)); } // Destroys the object @@ -1984,14 +2023,27 @@ LLFloaterSnapshot::~LLFloaterSnapshot() BOOL LLFloaterSnapshot::postBuild() { + + getChild("share")->setCommitCallback(boost::bind(&LLFloaterSnapshot::updateButtons, this, SNAPSHOT_SHARE)); + getChild("save")->setCommitCallback(boost::bind(&LLFloaterSnapshot::updateButtons, this, SNAPSHOT_SAVE)); + getChild("cancel")->setCommitCallback(boost::bind(&LLFloaterSnapshot::updateButtons, this, SNAPSHOT_MAIN)); + getChild("share_to_web")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_WEB)); getChild("share_to_email")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_POSTCARD)); getChild("save_to_inventory")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_TEXTURE)); getChild("save_to_computer")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_LOCAL)); getChild("set_profile_pic")->setCommitCallback(boost::bind(&Impl::onCommitProfilePic, this)); + childSetCommitCallback("show_advanced", Impl::onToggleAdvanced, this); + childSetCommitCallback("hide_advanced", Impl::onToggleAdvanced, this); + childSetCommitCallback("local_format_combo", Impl::onCommitSnapshotFormat, this); + childSetAction("new_snapshot_btn", Impl::onClickNewSnapshot, this); + + childSetAction("more_btn", Impl::onClickMore, this); + childSetAction("less_btn", Impl::onClickLess, this); + childSetCommitCallback("image_quality_slider", Impl::onCommitQuality, this); childSetValue("image_quality_slider", gSavedSettings.getS32("SnapshotQuality")); @@ -2043,13 +2095,12 @@ BOOL LLFloaterSnapshot::postBuild() impl.mPreviewHandle = previewp->getHandle(); impl.updateControls(this); impl.updateLayout(this); - impl.showAdvanced(this, gSavedSettings.getBOOL("AdvanceSnapshot")); //save off the refresh button's rectangle so we can apply offsets with thumbnail resize mRefreshBtnRect = getChild("new_snapshot_btn")->getRect(); // make sure we share/hide the general buttons - updateButtons(LLSD("main")); + updateButtons(SNAPSHOT_MAIN); return LLDockableFloater::postBuild(); } @@ -2139,20 +2190,19 @@ void LLFloaterSnapshot::update() } } -bool LLFloaterSnapshot::updateButtons(const LLSD& mode) +bool LLFloaterSnapshot::updateButtons(ESnapshotMode mode) { - std::string button_mode = mode.asString(); + childSetVisible("share", mode == SNAPSHOT_MAIN); + childSetVisible("save", mode == SNAPSHOT_MAIN); + childSetVisible("set_profile_pic", mode == SNAPSHOT_MAIN); - bool mode_main("main" == button_mode); - bool mode_share("share" == button_mode); - bool mode_save("save" == button_mode); +// childSetVisible("share_to_web", mode == SNAPSHOT_SHARE); + childSetVisible("share_to_email", mode == SNAPSHOT_SHARE); - // Default to a known state if mode is invalid. - if (!mode_main && !mode_share && !mode_save) mode_main = true; + childSetVisible("save_to_inventory", mode == SNAPSHOT_SAVE); + childSetVisible("save_to_computer", mode == SNAPSHOT_SAVE); - childSetVisible("panel_snapshot_main", mode_main); - childSetVisible("panel_snapshot_share", mode_share); - childSetVisible("panel_snapshot_save", mode_save); + childSetVisible("cancel", mode != SNAPSHOT_MAIN); return true; } diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 8c4373c35c..931d355748 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -47,6 +47,13 @@ public: SNAPSHOT_FORMAT_BMP } ESnapshotFormat; + enum ESnapshotMode + { + SNAPSHOT_SHARE, + SNAPSHOT_SAVE, + SNAPSHOT_MAIN + }; + LLFloaterSnapshot(const LLSD& key); virtual ~LLFloaterSnapshot(); @@ -59,7 +66,7 @@ public: void setAsProfilePic(const LLUUID& image_id); - bool updateButtons(const LLSD& mode); + bool updateButtons(ESnapshotMode mode); static S32 getUIWinHeightLong() {return sUIWinHeightLong ;} static S32 getUIWinHeightShort() {return sUIWinHeightShort ;} diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 7d81c3e551..f3d297c303 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -38,129 +38,91 @@ left="20" top_pad="-30" name="new_snapshot_btn" - width="23" - commit_callback.function="Snapshot.Refresh"/> + width="23" /> - -