From 72c7525e677b8e5391abf5b552aa8d068f0e82d6 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 5 Jul 2011 16:07:09 -0700 Subject: EXP-916 FIX -- Folder in Inbox indicates loading when all items are displayed in folder * Updated inbox inventory to not ever display the loading status like other inventory windows. * show_load_status is now an optional parameter for LLInventoryPanel and LLFolderView. Its default value is true but it is overridden to be false for the LLInboxInventoryPanel. Reviewed by Richard. --- indra/newview/llfolderview.cpp | 5 ++++- indra/newview/llfolderview.h | 1 + indra/newview/llinventorypanel.cpp | 2 ++ indra/newview/llinventorypanel.h | 3 +++ indra/newview/llpanelmarketplaceinboxinventory.cpp | 25 ++++++---------------- .../xui/en/widgets/inbox_inventory_panel.xml | 2 ++ .../default/xui/en/widgets/inventory_panel.xml | 1 + 7 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml (limited to 'indra/newview') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index bfbe8ac96e..b04ab493bf 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -172,6 +172,7 @@ LLFolderView::Params::Params() title("title"), use_label_suffix("use_label_suffix"), allow_multiselect("allow_multiselect", true), + show_load_status("show_load_status", true), use_ellipses("use_ellipses", false) { } @@ -208,6 +209,8 @@ LLFolderView::LLFolderView(const Params& p) mStatusTextBox(NULL) { mRoot = this; + + mShowLoadStatus = p.show_load_status(); LLRect rect = p.rect; LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom); @@ -354,7 +357,7 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder) { recursiveIncrementNumDescendantsSelected(folder->numSelected()); } - folder->setShowLoadStatus(true); + folder->setShowLoadStatus(mShowLoadStatus); folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); folder->setVisible(FALSE); diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 12f6170a7d..96027e55a8 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -91,6 +91,7 @@ public: Optional title; Optional use_label_suffix, allow_multiselect, + show_load_status, use_ellipses; Params(); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 49170caee8..25e43b34a6 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -130,6 +130,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mInventory(p.inventory), mAllowMultiSelect(p.allow_multi_select), mShowItemLinkOverlays(p.show_item_link_overlays), + mShowLoadStatus(p.show_load_status), mViewsInitialized(false), mInvFVBridgeBuilder(NULL) { @@ -617,6 +618,7 @@ LLFolderView * LLInventoryPanel::createFolderView(LLInvFVBridge * bridge, bool u p.listener = bridge; p.use_label_suffix = useLabelSuffix; p.allow_multiselect = mAllowMultiSelect; + p.show_load_status = mShowLoadStatus; return LLUICtrlFactory::create(p); } diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 4d06573ad9..e3fc4b227c 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -84,6 +84,7 @@ public: Optional filter; Optional start_folder; Optional use_label_suffix; + Optional show_load_status; Optional scroll; Params() @@ -94,6 +95,7 @@ public: filter("filter"), start_folder("start_folder"), use_label_suffix("use_label_suffix", true), + show_load_status("show_load_status"), scroll("scroll") {} }; @@ -178,6 +180,7 @@ protected: LLInvPanelComplObserver* mCompletionObserver; BOOL mAllowMultiSelect; BOOL mShowItemLinkOverlays; // Shows link graphic over inventory item icons + BOOL mShowLoadStatus; LLFolderView* mFolderRoot; LLScrollContainer* mScroller; diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 50f3451b6f..b644f0e5cb 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -103,25 +103,14 @@ void LLInboxInventoryPanel::buildFolderView(const LLInventoryPanel::Params& para root_id = LLUUID::generateNewID(); } - LLRect folder_rect(0, 0, getRect().getWidth(), 0); - - LLFolderView::Params p; - - p.name = getName(); - p.title = getLabel(); - p.rect = folder_rect; - p.parent_panel = this; - p.tool_tip = p.name; - p.listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY, - LLAssetType::AT_CATEGORY, - LLInventoryType::IT_CATEGORY, - this, - NULL, - root_id); - p.use_label_suffix = params.use_label_suffix; - p.allow_multiselect = mAllowMultiSelect; + LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY, + LLAssetType::AT_CATEGORY, + LLInventoryType::IT_CATEGORY, + this, + NULL, + root_id); - mFolderRoot = LLUICtrlFactory::create(p); + mFolderRoot = createFolderView(new_listener, params.use_label_suffix()); } LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge) diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml b/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml new file mode 100644 index 0000000000..830c27bdac --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml @@ -0,0 +1,2 @@ + + diff --git a/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml b/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml index 3164cc5eba..00f4c43915 100644 --- a/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml +++ b/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml @@ -3,6 +3,7 @@ bg_opaque_color="InventoryBackgroundColor" background_visible="true" background_opaque="true" + show_load_status="true" >