[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:
Mehmet Murat Akburak
2020-08-25 08:22:05 +03:00
committed by GitHub
parent 3ede1a0b53
commit d3b80b26e3
14 changed files with 460 additions and 199 deletions

View File

@@ -166,7 +166,7 @@ DWORD WINAPI CPowerRenameMenu::s_PowerRenameUIThreadProc(_In_ void* pData)
if (SUCCEEDED(hr))
{
// Pass the factory to the manager
hr = spsrm->put_renameItemFactory(spsrif);
hr = spsrm->PutRenameItemFactory(spsrif);
if (SUCCEEDED(hr))
{
// Create the rename UI instance and pass the rename manager