summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorypanel.cpp20
-rw-r--r--indra/newview/llinventorypanel.h1
2 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 81e7f166e1..25dc365467 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -684,8 +684,9 @@ void LLInventoryPanel::initializeViews()
}
else
{
- buildNewViews(gInventory.getRootFolderID());
- buildNewViews(gInventory.getLibraryRootFolderID());
+ // Default case: always add "My Inventory" first, "Library" second
+ buildNewViews(gInventory.getRootFolderID()); // My Inventory
+ buildNewViews(gInventory.getLibraryRootFolderID()); // Library
}
gIdleCallbacks.addFunction(idle, this);
@@ -1354,6 +1355,21 @@ void LLInventoryPanel::doToSelected(const LLSD& userdata)
return;
}
+BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
+{
+ BOOL handled = FALSE;
+ switch (key)
+ {
+ case KEY_RETURN:
+ // Open selected items if enter key hit on the inventory panel
+ if (mask == MASK_NONE)
+ {
+ LLInventoryAction::doToSelected(mInventory, mFolderRoot, "open");
+ handled = TRUE;
+ }
+ }
+ return handled;
+}
/************************************************************************/
/* Recent Inventory Panel related class */
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 9639086c11..6eb85fbad2 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -143,6 +143,7 @@ public:
// LLView methods
void draw();
+ /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask );
BOOL handleHover(S32 x, S32 y, MASK mask);
BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,