Commit graph

24 commits

Author SHA1 Message Date
Stefan Markovic 5cfbd72fa8
[PowerRename] Fluent UX (#13678)
* PowerRename new UI

* Add scrollviewer

* Don't deploy PowerRenameUI_new

* Visual updates

* Visual updates

* Updates

* Update Resources.resw

* Added docs button

* Update MainWindow.xaml

* Wire Docs button

* RegEx -> regular expressions

* Update Show only renamed list on search/replace text changed

* Update Show only renamed list on search/replace text changed - proper fix
Set searchTerm to NULL when cleared - fix Show only renamed files on clear searchTerm

* Files/folders input error handling

* Fix renaming with keeping UI window opened

After renaming folder, all of it's children need path update.
Without path update, further renaming of children items would
fail.

* Update only children, not all items with greater depth

* Fix dictionary false positives

* Remove .NET dep

* Rename PowerRenameUI_new to PowerRenameUILib
Rename executable PowerRenameUIHost to PowerRename

Co-authored-by: Laute <Niels.Laute@philips.com>
2021-10-25 14:40:19 +01:00
Andrey Nekrasov 212ea2de30
common: refactor common library pt2 (#8588)
- remove common lib
- split settings, remove common-md
- move ipc interop/kb_layout to interop
- rename core -> settings, settings -> old_settings
- os-detect header-only; interop -> PowerToysInterop
- split notifications, move single-use headers where they're used
- winstore lib
- rename com utils
- rename Updating and Telemetry projects
- rename core -> settings-ui and remove examples folder
- rename settings-ui folder + consisent common/version include
2020-12-15 15:16:09 +03:00
Mehmet Murat Akburak da22e21a0e
[PowerRename] Fix tests inconsistency, improve test performance (#8129)
* Move retrieveing file attibutes to PowerRenameRegex
Move file attributes unit tests to PowerRenameRegexTests
Add file time field to MockPowerRenameItem

* Add file attributes unittests to PowerRenameManagerTests

* Change variable name

* Rearrange function arguments

* Check if file attributes are used only once

* Change variable name LocalTime -> fileTime, date -> time

* Set fileTime as a member of PowerRenameRegEx rather than passing as an argument

* Change function name isFileAttributesUsed() -> isFileTimeUsed()
Check before resetting fileTime

* Fix small bugs

* Fix typos

* Refactor for readability, move free calls to reachable places

* Fix search for area empty bug
searchTerm being empty is not an invalid argument rather it must return OK without any operation
Tests must check if Replace()  returns S_OK becuase later it checks its result

* Check return values of method calls in PowerRenameManager
Remove received argments checks from some methods because argument being null or empty string doesnt mean it is invalid or method fails

* Fix formatting. Remove overlooked comment. Fix error message.

* Change HRESULT declarations according to coding style

* Fix unhandled case. Refactor.
2020-12-14 10:28:12 +01:00
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
Arjun Balgovind 3ede1a0b53
[Localization] Migrate resources to resx for PowerRename (#6112)
* Added localization code to pipeline and created one LocProject json for Settings

* Fixed typo

* Reordered nuget source

* Moved nuget install to restore step

* Added FZ.rc file to LocProj

* Added FZ resx file and modified rc file

* Fixed file names

* Changed to check folder for LocProject files

* Updated folder

* Changed directory

* Changed to src directory

* Changed language set and name format, removed rc file localization

* Added all projects with resx/resw files

* Added newline to end of file

* Removed nuget source as it is not used

* Updated comments

* Updated keyboard manager to use resx file

* Tweaked resources.resx and added it to project files

* Added comments and added in string table to resx script

* Remove change from bad merge

* Fix syntax error in convert stringtable

* Changed file type to None

* Migrated color picker's resources

* Migrated resources for Microsoft.Launcher

* Migrated resources for fancy zones

* Revert fancyzones changes

* Migrated resources for ImageResizer and modified script to add language specific code

* Added try catch and checks for modification to avoid unnecessary file creation

* Changed tab insertion to 4 spaces to avoid mixed file types in rc file

* Migrated resources for power preview project

* Added LocProject.json file for 5 projects

* added resgen exception check

* Moved non-localizable strings out of resx for powerpreview

* Move out hardcoded strings from dialog box and set them at runtime from string table

* Migrated resources for powerrename

* Added locproj

* Added missing ImageBase extern declaration

* Added build script in UWP UI project since PowerRenameExt is not referenced

* Resolved merge conflicts
2020-08-24 17:51:48 -07:00
Chris Davis 3acc96cab1
Check the shell attributes of the items to see if we should show the Power Rename menu item and or perform a rename. Also fix a unit test for the SVG Thumbnail Provider. (#5158) 2020-07-22 13:27:58 -07: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
vldmr11080 c355a2b61e
Use JSON data file for storing PowerRename settings instead of registry (#1909)
* Use JSON data file for storing PowerRename settings instead of registry

* Address PR comments and made several improvements

* Remove WindowsApp.lib dependencies in test app and unit tests

* Revert changes in vcxproj for unit test

* Solve linker warnings generated while linking WindowsApp.lib

* Don't migrate enabled flag. Always read / write from registry.
2020-04-08 19:12:46 +02:00
stefansjfw b835716e36
Set PowerRename context menu hotkey to 'w' (#1673) 2020-03-25 11:12:38 +01:00
Alekhya Kommuru 197286c21e moved app name to constructor to init only once 2020-01-17 14:23:07 -08:00
Alekhya Kommuru 44ac22c0de Added new lines to the end of the file 2020-01-17 11:12:23 -08:00
Alekhya Kommuru df1c6b9b0b Removed get_res_string_wchar and used the get_resource_string() function instead which returns a wstring typecast into wchar* 2020-01-17 11:06:57 -08:00
Alekhya Kommuru bde0e0b86a Merge remote-tracking branch 'upstream/master' into locPowerRename 2020-01-16 13:58:59 -08:00
Arjun Balgovind c1232a7001 Shifted three functions to common (#1101) 2020-01-15 23:06:22 -08:00
Alekhya Kommuru 31a01ab227 Modified resourceIDs for strings in the table 2020-01-15 13:57:05 -08:00
Alekhya Kommuru 8f2b2aba12 localized powerRenameExt 2020-01-14 15:23:21 -08:00
yuyoyuppe 62c65659cc format changed files 2019-12-24 17:06:10 +03:00
yuyoyuppe 249addebff powerrename: implement shellext support for UWP 2019-12-24 17:06:10 +03:00
Chris Davis b490a72c1d
Ensure icon in context menu is not leaked (#709) 2019-11-13 14:13:14 -08: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 997ea3a2f5 A couple minor bug fixes 2019-11-09 00:30:00 -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 b892e731d9
Add new icon as well as telemetry (#563)
* Update icon and add telemetry calls

This change adds the new PowerRename icon and includes telemetry calls

* Ensure string is freed

* Update event naming convention

* Delete PowerRenameDemo.gif

Deleting this gif as I added it with a separate commit with the README.md update for PowerRename
2019-10-28 10:14:59 -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