summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelmaininventory.cpp24
-rw-r--r--indra/newview/llpanelmaininventory.h14
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml12
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_inventory.xml1
5 files changed, 49 insertions, 6 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 15a75cb930..9b33fc1839 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -49,7 +49,7 @@
#include "llviewermenu.h"
#include "llviewertexturelist.h"
-static LLRegisterPanelClassWrapper<LLPanelMainInventory> t_inventory("panel_main_inventory"); // Seraph is this redundant with constructor?
+static LLDefaultChildRegistry::Register<LLPanelMainInventory> r("panel_main_inventory");
void on_file_loaded_for_save(BOOL success,
LLViewerFetchedTexture *src_vi,
@@ -90,8 +90,8 @@ private:
/// LLPanelMainInventory
///----------------------------------------------------------------------------
-LLPanelMainInventory::LLPanelMainInventory()
- : LLPanel(),
+LLPanelMainInventory::LLPanelMainInventory(const LLPanelMainInventory::Params& p)
+ : LLPanel(p),
mActivePanel(NULL),
mSavedFolderState(NULL),
mFilterText(""),
@@ -124,6 +124,24 @@ LLPanelMainInventory::LLPanelMainInventory()
mSavedFolderState = new LLSaveFolderState();
mSavedFolderState->setApply(FALSE);
+
+ if (p.hide_top_menu)
+ {
+ LLInventoryPanel *top_panel = getChild<LLInventoryPanel>("top_panel");
+ if (top_panel)
+ {
+ top_panel->setVisible(FALSE);
+ }
+ }
+
+ if (p.hide_bottom_menu)
+ {
+ LLInventoryPanel *bottom_panel = getChild<LLInventoryPanel>("bottom_panel");
+ if (bottom_panel)
+ {
+ bottom_panel->setVisible(FALSE);
+ }
+ }
}
BOOL LLPanelMainInventory::postBuild()
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 29e9baa6cf..e447d8ce06 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -58,7 +58,19 @@ class LLPanelMainInventory : public LLPanel, LLInventoryObserver
public:
friend class LLFloaterInventoryFinder;
- LLPanelMainInventory();
+ struct Params
+ : public LLInitParam::Block<Params, LLPanel::Params>
+ {
+ Optional<bool> hide_top_menu;
+ Optional<bool> hide_bottom_menu;
+
+ Params() :
+ hide_top_menu("hide_top_menu", false),
+ hide_bottom_menu("hide_bottom_menu", false)
+ {}
+ };
+
+ LLPanelMainInventory(const Params&);
~LLPanelMainInventory();
BOOL postBuild();
diff --git a/indra/newview/skins/default/xui/en/floater_inventory.xml b/indra/newview/skins/default/xui/en/floater_inventory.xml
index 30639f955f..b48c962413 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory.xml
@@ -36,10 +36,10 @@
filename="panel_main_inventory.xml"
follows="all"
layout="topleft"
+ hide_top_panel="true"
left="0"
label="Inventory Panel"
name="Inventory Panel"
top="15"
- width="467">
-</panel>
+ width="467" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index fcee0ef953..6f57d1ca80 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -103,6 +103,17 @@
width="18" />
</panel>
+ <panel
+ background_visible="true"
+ bevel_style="none"
+ bottom="0"
+ follows="left|right|bottom"
+ height="30"
+ layout="bottomleft"
+ left="0"
+ visible="true"
+ name="top_panel"
+ width="330">
<menu_bar
bg_visible="false"
follows="left|top|right"
@@ -464,4 +475,5 @@
</menu_item_check>
</menu>
</menu_bar>
+ </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index cbcc3f10ad..5975bb41fd 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -24,6 +24,7 @@
filename="panel_main_inventory.xml"
follows="all"
layout="topleft"
+ hide_top_panel="true"
left="0"
name="panel_main_inventory"
top="0"