summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-07-29 18:20:05 -0700
committerMerov Linden <merov@lindenlab.com>2014-07-29 18:20:05 -0700
commitc182a8b79737a67794c032a6b60b038c9b905f57 (patch)
tree66c96687107a76097ebfbba47432b356f09d31ca /indra/newview
parent51e4ad0ed0ba07328ec8415742a3f5c60afc7244 (diff)
DD-69 : Fixed! Added an xml parameter to optionally allow the visualization of the root folder on an inventory panel. Used only for marketplace floater so far.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llinventorypanel.cpp12
-rwxr-xr-xindra/newview/llinventorypanel.h4
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_marketplace_listings.xml4
3 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index b386daa77b..4bfac96a11 100755
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -787,6 +787,18 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id)
const LLUUID &parent_id = objectp->getParentUUID();
LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)getItemByID(parent_id);
+ // Force the creation of an extra root level folder item if required by the inventory panel (default is "false")
+ if (mParams.show_root_folder)
+ {
+ LLUUID root_id = getRootFolderID();
+ if (root_id == id)
+ {
+ // We insert an extra level that's seen by the UI but has no influence on the model
+ parent_folder = dynamic_cast<LLFolderViewFolder*>(folder_view_item);
+ folder_view_item = NULL;
+ }
+ }
+
if (!folder_view_item && parent_folder)
{
if (objectp->getType() <= LLAssetType::AT_NONE ||
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 91c3efd8f0..e0b39caa6e 100755
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -96,6 +96,7 @@ public:
Optional<StartFolder> start_folder;
Optional<bool> use_label_suffix;
Optional<bool> show_empty_message;
+ Optional<bool> show_root_folder;
Optional<LLScrollContainer::Params> scroll;
Optional<bool> accepts_drag_and_drop;
Optional<LLFolderView::Params> folder_view;
@@ -110,7 +111,8 @@ public:
filter("filter"),
start_folder("start_folder"),
use_label_suffix("use_label_suffix", true),
- show_empty_message("show_empty_message", true),
+ show_empty_message("show_empty_message", true),
+ show_root_folder("show_root_folder", false),
scroll("scroll"),
accepts_drag_and_drop("accepts_drag_and_drop"),
folder_view("folder_view"),
diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml
index 18baa91acb..3d75ad4488 100755
--- a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml
+++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml
@@ -87,6 +87,7 @@
start_folder.name="Marketplace listings"
show_empty_message="false"
show_load_status="false"
+ show_root_folder="true"
start_folder.type="merchant"
tool_tip="Drag and drop items here to sell them"
bg_opaque_color="DkGray2"
@@ -109,6 +110,7 @@
start_folder.name="Marketplace listings"
show_empty_message="false"
show_load_status="false"
+ show_root_folder="true"
start_folder.type="merchant"
bg_opaque_color="DkGray2"
bg_alpha_color="DkGray2"
@@ -130,6 +132,7 @@
start_folder.name="Marketplace listings"
show_empty_message="false"
show_load_status="false"
+ show_root_folder="true"
start_folder.type="merchant"
bg_opaque_color="DkGray2"
bg_alpha_color="DkGray2"
@@ -151,6 +154,7 @@
start_folder.name="Marketplace listings"
show_empty_message="false"
show_load_status="false"
+ show_root_folder="true"
start_folder.type="merchant"
bg_opaque_color="DkGray2"
bg_alpha_color="DkGray2"