mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[PowerRename] Add Filtering Feature (#6017)
* Implement basic functionality * Change approach. move filter controls to manager edit redrawing to always work with new GetVisibleItemCount() and GetVisibleItemByIndex() calls * Fix performance issues. Some refactoring. * Handle toggleAll correctly * Handle dangling elements when filter is on Make an item visible if it has at least one visible subitem * Support filtering for selected and shouldRename * Refactor for readability, remove useless member from PowerRenameUI * Change variable names in PowerRenameUI for clarity Use wrapper function RedrawItems() and SetItemCount() for consistency * Handle result value properly in getVisibleItemByIndex() * Add FlagsApplicable filter * Add visual indication of filters * Improve performance Check if no filter is selected Call SetItemCount() only when necessary * Refactor for readability * Get lock in setVisible() * Change function names to camel case * Change function names to start with uppercase * Change filter behaviour when search area is empty Show all elements when search area is empty and ShouldRename filter is selected Avoid warnings * Resolve conflicts
This commit is contained in:
committed by
GitHub
parent
3ede1a0b53
commit
d3b80b26e3
@@ -307,21 +307,21 @@ HRESULT _ParseEnumItems(_In_ IEnumShellItems* pesi, _In_ IPowerRenameManager* ps
|
||||
while ((S_OK == pesi->Next(1, &spsi, &celtFetched)) && (SUCCEEDED(hr)))
|
||||
{
|
||||
CComPtr<IPowerRenameItemFactory> spsrif;
|
||||
hr = psrm->get_renameItemFactory(&spsrif);
|
||||
hr = psrm->GetRenameItemFactory(&spsrif);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
CComPtr<IPowerRenameItem> spNewItem;
|
||||
hr = spsrif->Create(spsi, &spNewItem);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
spNewItem->put_depth(depth);
|
||||
spNewItem->PutDepth(depth);
|
||||
hr = psrm->AddItem(spNewItem);
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
bool isFolder = false;
|
||||
if (SUCCEEDED(spNewItem->get_isFolder(&isFolder)) && isFolder)
|
||||
if (SUCCEEDED(spNewItem->GetIsFolder(&isFolder)) && isFolder)
|
||||
{
|
||||
// Bind to the IShellItem for the IEnumShellItems interface
|
||||
CComPtr<IEnumShellItems> spesiNext;
|
||||
|
||||
Reference in New Issue
Block a user