From 71cd24b4799f8bc0bed2665cca103c39fec3a965 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 3 Dec 2009 21:32:03 -0500 Subject: EXT-3124 : Add lookup for finding all linked items to an item Added ability to filter by UUID. Work in progress. --HG-- branch : avatar-pipeline --- indra/newview/llpanelmaininventory.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 74c1420cf3..3fd83bd784 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -966,6 +966,17 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) preview_texture->openToSave(); } } + if (command_name == "find_links") + { + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) + { + return; + } + + const LLUUID& item_id = current_item->getListener()->getUUID(); + mActivePanel->getFilter()->setFilterUUID(item_id); + } } BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) @@ -1001,6 +1012,18 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) } return FALSE; } + if (command_name == "find_links") + { + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) return FALSE; + const LLUUID& item_id = current_item->getListener()->getUUID(); + LLInventoryObject *obj = gInventory.getObject(item_id); + if (obj && !obj->getIsLinkType() && LLAssetType::lookupCanLink(obj->getType())) + { + return TRUE; + } + return FALSE; + } return TRUE; } -- cgit v1.2.3 From 9b89325cc9a02c3305eb32148cc8de7dccf8808b Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Dec 2009 11:42:17 -0500 Subject: EXT-3124 : Add lookup for finding all linked items to an item Filter now works correctly. Made some naming changes (e.g. setFilterType -> setFilterObjectType) so that what you choose to filter by is more explicit. --HG-- branch : avatar-pipeline --- indra/newview/llpanelmaininventory.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 3fd83bd784..1f7e0c3a95 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -653,7 +653,7 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() return; // Get data needed for filter display - U32 filter_types = mFilter->getFilterTypes(); + U32 filter_types = mFilter->getFilterObjectTypes(); std::string filter_string = mFilter->getFilterSubString(); LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState(); U32 hours = mFilter->getHoursAgo(); @@ -973,9 +973,13 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { return; } - const LLUUID& item_id = current_item->getListener()->getUUID(); - mActivePanel->getFilter()->setFilterUUID(item_id); + const std::string &item_name = current_item->getListener()->getName(); + LLInventoryFilter *filter = mActivePanel->getFilter(); + filter->setFilterSubString(item_name); + mFilterEditor->setText(item_name); + filter->setFilterUUID(item_id); + filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); } } -- cgit v1.2.3 From 92a1ecd5fdfff2490cb563e83baff88fc6120882 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Dec 2009 13:44:25 -0500 Subject: EXT-3124 : Add lookup for finding all linked items to an item Filter string now highlights when doing this search. --HG-- branch : avatar-pipeline --- indra/newview/llpanelmaininventory.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 1f7e0c3a95..2a56a6011e 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -978,6 +978,7 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) LLInventoryFilter *filter = mActivePanel->getFilter(); filter->setFilterSubString(item_name); mFilterEditor->setText(item_name); + mFilterEditor->setFocus(TRUE); filter->setFilterUUID(item_id); filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); } -- cgit v1.2.3 From add459cfd2245dd116392426f12ba04365b579de Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Dec 2009 20:07:09 -0500 Subject: EXT-3179 : Add ability to recover broken links EXT-3168 : Add "Find Original" to InventoryPanel gear menu Broken link recovery is still work in progress. --HG-- branch : avatar-pipeline --- indra/newview/llpanelmaininventory.cpp | 50 +++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 2a56a6011e..92b4c8383e 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -966,6 +966,27 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) preview_texture->openToSave(); } } + if (command_name == "regenerate_link") + { + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) + { + return; + } + const LLUUID& item_id = current_item->getListener()->getUUID(); + LLViewerInventoryItem *item = gInventory.getItem(item_id); + item->regenerateLink(); + } + if (command_name == "find_original") + { + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) + { + return; + } + current_item->getListener()->performAction(getActivePanel()->getRootFolder(), getActivePanel()->getModel(), "goto"); + } + if (command_name == "find_links") { LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); @@ -1017,18 +1038,45 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) } return FALSE; } + if (command_name == "find_original") + { + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) return FALSE; + const LLUUID& item_id = current_item->getListener()->getUUID(); + const LLViewerInventoryItem *item = gInventory.getItem(item_id); + if (item && item->getIsLinkType() && !item->getIsBrokenLink()) + { + return TRUE; + } + return FALSE; + } + if (command_name == "find_links") { LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); if (!current_item) return FALSE; const LLUUID& item_id = current_item->getListener()->getUUID(); - LLInventoryObject *obj = gInventory.getObject(item_id); + const LLInventoryObject *obj = gInventory.getObject(item_id); if (obj && !obj->getIsLinkType() && LLAssetType::lookupCanLink(obj->getType())) { return TRUE; } return FALSE; } + + if (command_name == "regenerate_link") + { + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) return FALSE; + const LLUUID& item_id = current_item->getListener()->getUUID(); + const LLViewerInventoryItem *item = gInventory.getItem(item_id); + if (item && item->getIsBrokenLink()) + { + return TRUE; + } + return FALSE; + } + return TRUE; } -- cgit v1.2.3 From 13f1ed2740664332d52b15094438aed3e3accc0e Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 7 Dec 2009 11:43:24 -0500 Subject: EXT-3124 : Add lookup for finding all linked items to an item EXT-3195 : Regenerat Links sometimes pairs to library items Excluding library when repairing broken links. Reselecting original selected broken link after repairing. --HG-- branch : avatar-pipeline --- indra/newview/llpanelmaininventory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 92b4c8383e..44d32cdc99 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -968,14 +968,16 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } if (command_name == "regenerate_link") { - LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + LLInventoryPanel *active_panel = getActivePanel(); + LLFolderViewItem* current_item = active_panel->getRootFolder()->getCurSelectedItem(); if (!current_item) { return; } - const LLUUID& item_id = current_item->getListener()->getUUID(); + const LLUUID item_id = current_item->getListener()->getUUID(); LLViewerInventoryItem *item = gInventory.getItem(item_id); item->regenerateLink(); + active_panel->setSelection(item_id, TAKE_FOCUS_NO); } if (command_name == "find_original") { -- cgit v1.2.3 From ff7f3c348d5b08dfa817ebe2c9e1405879a5b8be Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 7 Dec 2009 13:06:24 -0500 Subject: EXT-3124 : Add lookup for finding all linked items to an item Commented this feature out since the viewer can't ask the server to change assetIDs of its inventory items. --HG-- branch : avatar-pipeline --- indra/newview/llpanelmaininventory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 44d32cdc99..9fd92725dc 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -966,6 +966,7 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) preview_texture->openToSave(); } } + // This doesn't currently work, since the viewer can't change an assetID an item. if (command_name == "regenerate_link") { LLInventoryPanel *active_panel = getActivePanel(); @@ -1065,7 +1066,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) } return FALSE; } - + // This doesn't currently work, since the viewer can't change an assetID an item. if (command_name == "regenerate_link") { LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); -- cgit v1.2.3