diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llfolderview.cpp | 86 | ||||
-rw-r--r-- | indra/llui/llfolderview.h | 4 | ||||
-rw-r--r-- | indra/llui/llfolderviewmodel.h | 2 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.h | 1 |
5 files changed, 20 insertions, 93 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 7ae79d94fe..324142f6c3 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -275,17 +275,6 @@ BOOL LLFolderView::canFocusChildren() const void LLFolderView::addFolder( LLFolderViewFolder* folder) { LLFolderViewFolder::addFolder(folder); - - // TODO RN: enforce sort order of My Inventory followed by Library - //mFolders.remove(folder); - //if (((LLFolderViewModelItemInventory*)folder->getViewModelItem())->getUUID() == gInventory.getLibraryRootFolderID()) - //{ - // mFolders.push_back(folder); - //} - //else - //{ - // mFolders.insert(mFolders.begin(), folder); - //} } void LLFolderView::closeAllFolders() @@ -793,76 +782,6 @@ void LLFolderView::removeSelectedItems() } } -// TODO RN: abstract -// open the selected item. -void LLFolderView::openSelectedItems( void ) -{ - //TODO RN: get working again - //if(getVisible() && getEnabled()) - //{ - // if (mSelectedItems.size() == 1) - // { - // mSelectedItems.front()->openItem(); - // } - // else - // { - // LLMultiPreview* multi_previewp = new LLMultiPreview(); - // LLMultiProperties* multi_propertiesp = new LLMultiProperties(); - - // selected_items_t::iterator item_it; - // for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) - // { - // // IT_{OBJECT,ATTACHMENT} creates LLProperties - // // floaters; others create LLPreviews. Put - // // each one in the right type of container. - // LLFolderViewModelItemInventory* listener = static_cast<LLFolderViewModelItemInventory*>((*item_it)->getViewModelItem()); - // bool is_prop = listener && (listener->getInventoryType() == LLInventoryType::IT_OBJECT || listener->getInventoryType() == LLInventoryType::IT_ATTACHMENT); - // if (is_prop) - // LLFloater::setFloaterHost(multi_propertiesp); - // else - // LLFloater::setFloaterHost(multi_previewp); - // listener->openItem(); - // } - - // LLFloater::setFloaterHost(NULL); - // // *NOTE: LLMulti* will safely auto-delete when open'd - // // without any children. - // multi_previewp->openFloater(LLSD()); - // multi_propertiesp->openFloater(LLSD()); - // } - //} - } - -void LLFolderView::propertiesSelectedItems( void ) -{ - //TODO RN: get working again - //if(getVisible() && getEnabled()) - //{ - // if (mSelectedItems.size() == 1) - // { - // LLFolderViewItem* folder_item = mSelectedItems.front(); - // if(!folder_item) return; - // folder_item->getViewModelItem()->showProperties(); - // } - // else - // { - // LLMultiProperties* multi_propertiesp = new LLMultiProperties(); - - // LLFloater::setFloaterHost(multi_propertiesp); - - // selected_items_t::iterator item_it; - // for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) - // { - // (*item_it)->getViewModelItem()->showProperties(); - // } - - // LLFloater::setFloaterHost(NULL); - // multi_propertiesp->openFloater(LLSD()); - // } - //} - } - - void LLFolderView::autoOpenItem( LLFolderViewFolder* item ) { if ((mAutoOpenItems.check() == item) || @@ -1151,11 +1070,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) mSearchString.clear(); handled = TRUE; } - else - { - LLFolderView::openSelectedItems(); - handled = TRUE; - } } break; diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index 2ee7417240..a6e0a3b4c0 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -163,10 +163,6 @@ public: // Deletion functionality void removeSelectedItems(); - // Open the selected item - void openSelectedItems( void ); - void propertiesSelectedItems( void ); - void autoOpenItem(LLFolderViewFolder* item); void closeAutoOpenedFolders(); BOOL autoOpenTest(LLFolderViewFolder* item); diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index 5837052565..1b61212c0e 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -127,7 +127,7 @@ public: virtual bool startDrag(std::vector<LLFolderViewModelItem*>& items) = 0; }; -// This is am abstract base class that users of the folderview classes +// This is an abstract base class that users of the folderview classes // would use to bridge the folder view with the underlying data class LLFolderViewModelItem : public LLRefCount { 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, |