summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-11 12:42:39 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-11 12:42:39 -0500
commit5bb5333964e99448d1e23403fdf31cc202e2fe95 (patch)
treea9d34e90ecdea361d53069cf6bae9ae5b5f62234 /indra/newview/llpanelmaininventory.cpp
parent652c8f6b5e91e1333854ac5e300b0bf650d03fc2 (diff)
EXT-2377 : Add XML switch to showing either menubar or gear menu
First pass attempt at this. This is not debugged, but hg won't let me merge until I commit this change...
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp24
1 files changed, 21 insertions, 3 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()