Commit graph

7 commits

Author SHA1 Message Date
Mehmet Murat Akburak d3b80b26e3
[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
2020-08-25 08:22:05 +03:00
Mehmet Murat Akburak a8153dd8db
[PowerRename] Using File Date Time Attributes Feature (#4722)
* Add basic using file attributes functionality

* Correctly return result

* Refactor

* Move retrieving date attribute to get function

* Cover various milliseconds patterns, retrieve file attributes only when needed

* Correctly check if date/time pattern is used. Remove wstring cast

* Use correct flags on CreateFile call to handle directories

* rebase to master

* Perform transform operation at last to make it not mess with date/time variables

* Refactor, remove extra space
2020-07-16 14:24:49 +03:00
Mehmet Murat Akburak 30f442d774
[PowerRename] upper/lower/titlecase transform feature (#4183)
* Add basic transform functionality

* Add basic transform functionality

* Change toupper/tolower/isspace to towupper/towlower/towisspace. For loops omitted if possible.

* Avoid wcslen() in for statement

* Avoid wcslen() in for statement

* Add basic transform functionality

* Change toupper/tolower/isspace to towupper/towlower/towisspace. For loops omitted if possible.

* Avoid wcslen() in for statement

* Avoid wcslen() in for statement

* Add basic transform functionality

* Change toupper/tolower/isspace to towupper/towlower/towisspace. For loops omitted if possible.

* Avoid wcslen() in for statement

* Adjust Powerrename Interface

* Add trimming rename string

* Remove leading and trailing spaces from rename string

* Add support for transforming only item name or extension. Temporarily remove trimming to refactor. Change CAPITALIZED to TITLECASE

* Fix bug when search for area is empty

* Add trimming back with refactor(leading spaces, trailing spaces, trailing dots)

* Now supports transforming when search area is empty

* Add smarter titlecase

Transformation breaks when new filename contains an unusable character (\/?:*?"<>|)
These characters need to be removed from new name anyway.

* minor bugfix

* Add unittests, contains failing tests

* Remove unnecessary/failing tests

* remove generated file

* some code formatting and fix memory leak issues

* Use proper allocation, change int to size_t

* Refactor. Move transforming to Helpers.cpp

* Refactor. Move trimming to Helpers.cpp

* Change StrDup to SHStrDup. Some refactoring.

* Fix memery leak, add proper result controls, use newNameToUse in functon calls becaause it is where the final form of the string is tracked

* Change declarations of strings, add proper result controls

* Slightly widen the labels to cover the whole text

* Add extended characters support

* Rename a variable

* Correctly identify the last word for titlecase

* Add empty line to last line of resource.h
2020-07-02 11:52:01 +03:00
Rafael Rivera d16ebba9e0
Move from sdk-provided cppwinrt-1.x to cppwinrt-2.x nuget package (#2246) 2020-04-29 22:02:18 +02:00
Chris Davis 1e89054897 * Ensure rename dialog is centered
* Ensure children are renamed before parent items
* Add settings handler
* Replace old text referencing smart rename with power rename
2019-11-11 11:00:42 -08:00
Chris Davis c1957272ea
Bug Fixes for PowerRename (#614)
* Bug Fixes

Fixes include:
* Pass parent HWND to UI so dialog is no longer appearing in top corner all the time
* Fix duplicate entries for PowerRename in context menu for shortcuts
* Fix crashing bug due to telemetry not getting unregistered on unload
* Ensure we show the file extension in the UI even if extensions are hidden in Windows Explorer

* Update PowerRenameExt.cpp

Fix missed line to set parent HWND
2019-10-31 06:57:38 -07:00
Chris Davis e1d5dd263a
Initial add of PowerRename from SmartRename repo (#499)
* Initial add of PowerRename from SmartRename repo
2019-10-17 20:57:19 -07:00