Commit Graph

1956 Commits

Author SHA1 Message Date
csigs
d9d328173b
LEGO: Pull request from lego/hb_2939_20201009230714095 to master (#7210)
* LEGO: check in for master to temporary branch.

* Update pipeline.user.windows.yml

Co-authored-by: Clint Rutkas <clint@rutkas.com>
2020-10-12 15:31:47 -07:00
Ivan Stošić
6161531376
[FancyZones] Responsive drawing (#7125)
* Made drawing zones not clog message processing

* Fixed synchronization bugs

* call BufferedPaintInit

* Some refactoring, the animation is back

* Rename a function

* Align parameters
2020-10-12 11:05:22 +02:00
Seraphima Zykova
3807e98f23
[PT runner] Misplaced 'return' statement fix (#7202) 2020-10-12 11:57:50 +03:00
Luthfi Mawarid
889f20c4a7
[fxcop] Settings UI library (part 1) (#7187)
* Mark methods static and replace Count() with Length

* Use IsNullOrEmpty for null string checks

* Remove redundant initializations to default values

* Use nameof(property name) in place of string literals

* Add NativeMethods class

* Rename property getters in KeysDataModel & AppSpecificKeysDataModel

* Remove underscores from method names

* Mark Helper class static

* Address comments & typo fixes

* Add EncoderGuid property and fix failing build

* Update binding in GeneralPages.xaml
2020-10-09 17:58:52 -07:00
Arjun Balgovind
8643bfc977
Change declaration order of delay thread member in KeyDelay (#7206) 2020-10-09 16:13:48 -07:00
Arjun Balgovind
7fd5e18ef4
[File Explorer] Fix enable/disable for File Explorer PowerToy (#6883)
* Commented out enable/disable for File Explorer

* Revert UI changes

* Disable the toggles if PT is not running elevated

* Fixed compilation errors in tests

* Cleaned up preview pane code to separate thumbnail and preview panes as separate classes

* Fixed broken settings format and added elevation check and registry updated required logic. Preview Handler tested manually working, Thumbnail Enable/Disable needs to be fixed

* Updated Thumbnail enable/disable logic and added warning messages

* Update tests for File Explorer

* Fixed RegGetValue failing in Release config

* Renamed new classes

* Split wrappers for disable to work

* Modified enabled flag check to also check if user is on new settings. Fixed casing issue in powerpreview.h that caused a dialog prompt on first launch after install

* Update fontweight and margin

* Fixed release build not working

* Move UseNewSettings usage to powerpreview.cpp to avoid tests breaking. For new settings the enable check is done in constructor and for old settings it is done in enable

* Update src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw

Co-authored-by: htcfreek <61519853+htcfreek@users.noreply.github.com>

* Update src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw

Co-authored-by: htcfreek <61519853+htcfreek@users.noreply.github.com>

* Update src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw

Co-authored-by: htcfreek <61519853+htcfreek@users.noreply.github.com>

* Moved dup code to method

* Use correct versions of general settings for backwards compat test

Co-authored-by: htcfreek <61519853+htcfreek@users.noreply.github.com>
2020-10-09 14:45:30 -07:00
csigs
d753179d1e
LEGO: check in for master to temporary branch. (#7186)
Co-authored-by: Arjun Balgovind <32061677+arjunbalgovind@users.noreply.github.com>
2020-10-09 14:32:31 -07:00
csigs
bd3c877ca3
LEGO: check in for master to temporary branch. (#7195) 2020-10-09 09:38:36 -07:00
Niels Laute
274c009f20
[PT Run] Updated borderbrush to improve accessibility for dark mode (#7141)
* Updated borderbrush

* Update src/modules/launcher/PowerLauncher/LauncherControl.xaml

Co-authored-by: htcfreek <61519853+htcfreek@users.noreply.github.com>

* Fixed bug

Co-authored-by: htcfreek <61519853+htcfreek@users.noreply.github.com>
2020-10-08 20:14:00 -07:00
Arjun Balgovind
210426a020
Fixed lcl file bad merge (#7189) 2020-10-08 19:38:21 -07:00
Arjun Balgovind
c393db0b65
[KBM] Fix remaps to arrow keys/Home/Ins, etc not working with Windows Terminal (#7143)
* Added MapVirtualKey call to set scancode before calling SendInput

* Updated comment

* Update comment with link

* Added test for dummy key scan code
2020-10-08 17:52:19 -07:00
Nkateko
1390b57d3e
[Settings] Adding Tests to Verify Backward Compatibility (#6161)
* compare config files

* create settings files

* updated path check

* reverted color picker changes

* added test files

* removed settings uralted files

* Modifying directory structure and adding properties for backcompat test.

* Updating Unit test to use mock repositories.
1) BackCompatTestProperties exposes mock repository implementation because SettingsRepository is a singleton, and settings utils isn't typed.
2) BackCompatTestProperties, encapsulates logic to verify that the correct file was read from.
3) Validating each file is read twice.  Once by the original file, and once via the view model.

* Adding 18.2 settings files.

* Fix compiler errors from latest merge

* Adding v0.19.2 test files.

* Adding in 0.20.1 settings.  Removing 0.20.2 (as this was a dev build number)

* Adding settings tests for 22.1

* General Settings should update version when they don't match

* Adding v0.22.0 files

* Removing not settings related files from TestData for PT Run 21.1

* Referencing module name as *Settings.ModuleName in tests.  Except for ImageResizer

* Using ImageResizerSettings to use Settings for the module name.

* Setting AllPlugins to empty list in case PluginManager.Save/Load/ReloadData is called before plugins are loaded

* Fixing fxcop errors

* using named parameters as per review feedback

Co-authored-by: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com>
2020-10-08 16:34:19 -07:00
ryanbodrug-microsoft
4451403c1e
Setting AllPlugins to empty list in case PluginManager.Save/Load/ReloadData is called before plugins are loaded (#7173) 2020-10-08 16:32:31 -07:00
Tony Mitchell
38e03e6bb0
Detect potential errors copying metadata and avoid them (#2447) (#6997) 2020-10-08 16:16:32 -07:00
Arjun Balgovind
42ebc42c98
Changed dummy key event to send key down and key up to improve compatibility with applications (#7166) 2020-10-08 11:28:37 -07:00
Arjun Balgovind
e1d22c74b0
[KBM] Refactor KBM's thread safety logic to avoid mutex re-entrancy bugs and improve performance (#6803)
* Unlock mutex before ResetModifierForLowerLevelKeyHandlers method to avoid crash if two instances of KBM are running

* Added alias for Shortcut DWORD variant to clean up code

* Removed mutex usage in single key remap method and added GetSingleKeyRemap

* Added more alias

* Moved to boolean disable remapping

* Added missing ! in condition

* Remove lock statement from bad auto-merge
2020-10-08 11:28:24 -07:00
Clint Rutkas
9928579364
Adjusting to force all instances to use rounded vs result due to Mage's quirks (#7164) 2020-10-08 08:57:17 -07:00
Alekhya
cfe2bbd75e
Fix Tab Trap in SettingsHotkey Custom Control (#7136)
* basic logic working

* Added a literal for ignore flag which cna be shared by all the files

* Added a condition that the other modifier keys should not be pressed

* Added comments to describe each scenario

* sometimes when multiple modified keys were involved the shift+tab key press was also being invoked, so added an additional check in the IsValid function

* use variable for vk_tab

* remove new line before initializing dwextraInfo

* move flag check if the filterKeyboardevent function

* use windows.system.virtualkey.shift instead of defining a constant for the shift key code

* removed latest settings to use internal settings instead. Removed the validity check while still within the hotkey other than if it's tab or shift+tab

* add a function to send input to the system instead of duplicating the send input code

* remove VKSHIFT declaration

* display all shortcuts/keys except tab and shift+tab

* remove header that is no longer needed
2020-10-08 08:45:09 -07:00
csigs
8a81bea413
LEGO: check in for master to temporary branch. (#7168) 2020-10-08 07:55:56 -07:00
csigs
9216aa465f
LEGO: check in for master to temporary branch. (#7181) 2020-10-08 07:54:53 -07:00
Enrico Giordani
038087e076
[FancyZones] Clone parent data only for new VD (#7116)
* [FancyZones] Clone parent data only for new VD
2020-10-08 16:02:51 +02:00
csigs
de4436ccc0
LEGO: check in for master to temporary branch. (#7153) 2020-10-07 13:30:34 -07:00
csigs
5e30ad176a
LEGO: check in for master to temporary branch. (#7144) 2020-10-07 13:30:12 -07:00
P-Storm
d011843113
Assert was switched in these instances, so I changed it to the "expected, actual" (#7142)
Co-authored-by: p-storm <paul.de.man@gmail.com>
2020-10-07 13:12:59 -07:00
Alekhya
0c0aec0f2a
catch security exception and access denied exception while trying to read a file (#7140) 2020-10-07 12:56:57 -07:00
Divyansh Srivastava
2bd6c5c664
Fix Docker desktop not found in program plugin issue (#6882)
* Fix docker lnk not found issue

* Add common desktop folder location to desktop program

* Add CommonDesktopDirectory to file watchers
2020-10-07 12:27:56 -07:00
Arjun Balgovind
eae0937db0
Add null check in SelectPrevTabItem (#7139) 2020-10-07 12:22:54 -07:00
P-Storm
163a699bff
EnumerateFileSystemInfos uses EnumerationOptions (#6933)
* Changed EnumerateFileSystemInfos to EnumerationOptions we don't have to catch the exceptions ourself.

* Change Matchtype to mimic old search method.

Co-authored-by: p-storm <paul.de.man@gmail.com>
2020-10-07 09:25:29 -07:00
P-Storm
8b66932036
Matching ExactName for known Win32 Programs (#6924)
* Matching explorer.exe also for explorer
Added unit test
Optimized multiple iterations for IProgram

* Fixed linter

Co-authored-by: p-storm <paul.de.man@gmail.com>
2020-10-07 09:23:47 -07:00
Luthfi Mawarid
a2fce22973
[fxcop] Settings UI unit tests (#6987)
* Add FxCop to project

* Remove underscores from method names

* Add message to obsolete test method

* Mark method static

* Method renames and remove unused ToRGBHex method

* Method renames and replace Count() with the List.Count property

* Method renames, rename unused OnSend argument, validate argument for AssertHotkeySettings
2020-10-06 15:00:25 -07:00
P-Storm
206397dc86
Fixed the error that Files were named Folder (#6935)
* Fixed the error that Files were named Folder

* Add and use resources in Results.

* Last item without resources in Plugin.Folder

* Changed to CurrentCulture, added N0 to Folder truncate warning.

Co-authored-by: p-storm <paul.de.man@gmail.com>
2020-10-06 09:08:41 -07:00
Yuhanun Citgez
ac3910580a
Modernized unique pointer construction (#6982) 2020-10-06 18:17:20 +03:00
lai52066
bee1af427b
Fix translate (#7005)
ORG <Val><![CDATA[輕]]></Val>
FIX <Val><![CDATA[淺色]]></Val>
2020-10-05 13:04:54 -07:00
Divyansh Srivastava
ea0de4f831
[Run] Fix for IndexOutOfBounds exception (#6981)
* Fix index out of bounds exception

* Race condition in query telemetry
2020-10-05 09:50:41 -07:00
Divyansh Srivastava
5d095efe90
Add exception handling in win32 program (#6958)
* Add exception handling to prevent program from failing due to error in one program

* Error handling for program path function

* Fix incorrect log value in ProgramLogger
2020-10-05 09:50:07 -07:00
vldmr11080
71765238b1
[FancyZones] Localize strings in FancyZones editor (#6943)
* Localize strings in FancyZones editor

* Move localized strings into resx file
2020-10-05 12:06:35 +02:00
Divyansh Srivastava
4feb0f209f
Fix autocomplete due to error in returned autocomplete text (#6988) 2020-10-02 21:30:14 -07:00
Arjun Balgovind
7c607ad540
Add AppxBundlePlatform to remove warning (#6960) 2020-10-02 13:42:47 -07:00
Mykhailo Pylyp
3f25d7ccc8
Keyboard disable (#6874)
Added disable key/shortcut functionality
2020-10-02 15:36:36 +03:00
Arjun Balgovind
b2e72e1ca4
[KBM] Moved unregistering of key delays to always run on the dispatcher thread to avoid mutex re-entrancy (#6959)
* Moved unregistering of key delays to always run on the dispatcher thread

* Updated comments
2020-10-01 18:19:11 -07:00
Divyansh Srivastava
55fd8749c8
Shift to ControlzEx HC code (#6880)
* Use high contrast detection from controlzex

* Allow multiple theme changes
2020-10-01 16:08:06 -07:00
P-Storm
fd32a6f7d6
Fix throwing when there is no results (#6934)
Co-authored-by: p-storm <paul.de.man@gmail.com>
2020-10-01 13:47:58 -07:00
Arjun Balgovind
b981467f1e
[KBM] Avoid checking reserved/unassigned/oem-specific/undefined key codes during shortcut remaps (#6952)
* Updated list of key codes to be ignored

* Added comments
2020-10-01 12:43:54 -07:00
Clint Rutkas
c219fe0d1d
[fxcop] image resizer ui (#6841)
* adjustments

* Settings fixed

* Getting resizing tests operational again

* fixed default vs loading from settings

* one small tewak
2020-10-01 11:33:23 -07:00
stefansjfw
85f56f4ed8
[FancyZones] Fix stuck chrome tab when merging into existing window (#6931)
* Fix stuck Chrome tab when merging with existing window

* Rename struct fields
2020-10-01 15:38:24 +02:00
P-Storm
5c84de5400
Made Plugin Folder Unit tests & Expanding enviroment search (#6600)
* Made Plugin Folder Unit tests. Fixes '>' not recursive searching (with max). Added that paths with an UnauthorizedAccessException are ignored. Added expanding enviroment search.

* Fixed some merging errors

* Added feedback from review

* Made the change that  ryanbodrug-microsoft suggested

* Stupid merge request... fixed

Co-authored-by: p-storm <paul.de.man@gmail.com>
2020-09-30 20:37:46 -07:00
csigs
67072b99d4
LEGO: check in for master to temporary branch. (#6907) 2020-09-30 10:26:54 -07:00
stefansjfw
39c61b9abd
[FancyZones] Remove WindowMoveHander pImpl pattern (#6894)
* Remove WindowMoveHandlare pImpl pattern

Introduces runtime overhead and makes debugging unecessary more painful

* End file new line
2020-09-30 09:19:20 +02:00
Divyansh Srivastava
24ba7f08cf
Add debugging section in preview pane (#6717)
* Added info on directly registering dll

* Update README.md

* Update README.md

* Update to regasm x64

* Add information related to assembly signing in readme preview pane handler

* Bold warning for taking registry route for installation
2020-09-29 14:36:28 -07:00
Clint Rutkas
fb8e80c09c
FxCop for Preview handler (#6833) 2020-09-29 10:43:18 -07:00
Seraphima Zykova
240f67f15c
Fixed crash with big 'Space around zones' values (#6815) 2020-09-29 13:12:21 +03:00
Enrico Giordani
8d18626659
Now working on 0.23.1 (#6881) 2020-09-29 12:05:36 +02:00
Alekhya
a5b22cffa2
Changed default theme in settings to be consistent with that of shortcut guide (#6832)
* changed default theme to be consistent with that of shortcut guide

* change the test to reflect that the initial settings theme or shortcut guide is 'system' and not 'light'.
2020-09-28 12:44:18 -07:00
Arjun Balgovind
de870c843e
Fix settings UpgradeConfiguration code path (#6839) 2020-09-25 13:59:14 -07:00
Arjun Balgovind
9c32e32097
Updated winUI version (#6840) 2020-09-25 13:52:43 -07:00
Alekhya
f61db8ed3f
Add delay to File System watchers to prevent Calibre installation issue (#6821)
* add a separate task to dequeue and create an app on installation

* Added tests to validate the behavior of the event handler

* release unmanaged memory
2020-09-25 10:36:38 -07:00
Arjun Balgovind
9e1711cbb9
[Settings] Added recursive delete for IOProvider DeleteDirectory to prevent crash on non-empty directory (#6818)
* Added recursive delete flag

* Changed to named parameter
2020-09-24 11:36:26 -07:00
Alekhya
c941b5333c
Fix settings changes that were made in PR #6620 (#6817)
* validated that restart elevated and check for updates work.Removed isettingsUtils and reused settings repository

* reverted the name to ImageResizer instead of using ImageResizerSettings.Modulename to make it backward compatible
2020-09-24 10:50:49 -07:00
csigs
2f0937951a
LEGO: check in for master to temporary branch. (#6802) 2020-09-24 08:01:13 -07:00
Ivan Stošić
a676537e26
[FancyZones editor] Rudimentary crash handler (#6783)
* Handle crashes in the FZ editor

* Removed reference to .NET frameworks, added a message box

* log => txt

* Update text shown
2020-09-24 12:29:53 +02:00
Clint Rutkas
b071220b6c
Improve logging for PT Run (#6800)
* init code pass

* adjusting tabbing for readabilty

* few small adjustments
2020-09-23 16:32:06 -07:00
Alekhya
dafc1e0c7d
Fixed scaling Accessibility issues in Settings (#6774)
* fixed scaling issues in settings

* reduced the size to 375 from 380

* Set scrollviewer visibility to auto so that it is visible only when needed
2020-09-23 13:20:58 -07:00
Alekhya
5a07579b73
Fix for settings crash on toggling enable button for any PowerToy (#6620)
* Removed getSettings from moduleEnabled so that it doesn't have to reopen the file everytime

* To Lower to while checking the theme

* color picker doesn't reopen the file

* use the generalView model config directly for FZ

* Made the same change for all the viewmodels so that they access the general view model value directly instead of opening and reading the value from a file each time

* removed unused variable

* Fix initialization in tests

* should read the file only if general settings does not exist

* Added interfaces for all the powertoys to use the generalSettings singleton class

* Runner is responding to changes in settings, only issue is that every time the general settings page is loaded the information is being read because isInitialized property could not be ignored during serialization

* All tests pass

* Settings and runner are working as expected with the settings cache

* added a null check to read from the file only when the settings process is started

* use converter to deserialize an interface

* Renamed generalSettings within the cache to be called CommonSettingsConfig

* All tests pass, had to initialize the common settings config instance

* Added few comments to newly created classes

* encapsulating load and store of general view model

* reading from file is encapsulated

* settings and runner wotk with generic singleton

* Shortcut guide works as expected

* Fancyzones, shortcutguide and power preview use the settings repository and work as expected

* referencing GeneralSettings instead of the settingsRepository<GeneralSettings> within viewmodels

* unified access to General settings and removed the IGeneralSettingsData interface

* Passing settings to viewmodel as a parameter

* removed ISettingsConfig interface from the viewmodels which are not using the singleton to access settings

* have to use ISettingsConfig to use GetSettings

* refactored tests, all tests pass

* Added test for settingsRepository that a single instance is created

* Added comments and removed unnecessary headers/code

* added settings repository tests

* moq for each settings file

* Img resizer tests pass

* General tests pass

* FancyZones tests pass

* PowerPreview tests pass

* PowerRename tests pass

* shortcut guide tests pass

* Added GetModuleName to ISettingsConfig

* unify the way the Modulename is accessed. It was redeclared in multiple places and this would cause an issue if the name is changed only in one place. All the module names are accessed using the <T>Settings.ModuleName, eg: ShortcutGuideSettings.ModuleName.

* create PTRun settings file if it does not exist

* GetFile is now a private function. Modified the logic of KBM default.json access and PT Run so that we can re-use GetSettings instead of GetFile.

* Added UpgradeSettingsConfiguration to the ISettingsConfig interface so that the settings file can be upgraded based on some condition. Presently, only the GeneralSettings file is utilizing this to change the PT Version number based on the old PT version and the current PT version that it receives from the helper function. Verified that if the PT version is lower in the general settings.json file, settings saves the file with the new version info.

* The naming for the PowerToys was inconsistent and the variables were redeclared in multiple places. To have the settings.ModuleName as the main name, all other places should refer to that name. In the tests file the module name for ImgResizer was 'ImageResizer' and not 'Image Resizer'.

* renamed lock

* Remove unnecessary GetSettingsFileNAme function. It is no longer in use because the code does not use types to create a new BasePTModule object
2020-09-23 13:20:32 -07:00
Clint Rutkas
0148669e98
[fxcop] preview handler common (#6762)
* FxCop adjustments

* initing due to change for abstract
2020-09-23 10:22:17 -07:00
Clint Rutkas
eadab13d1c added in version.prop update and the ps script 2020-09-23 08:10:42 -07:00
Arjun Balgovind
75ace74d37
[Keyboard Manager] Enabled horizontal scroll on scroll viewers and tweaked ScrollViewer layout (#6755)
* Enabled horizontal scroll on scroll viewers and tweaked layout

* Added code to constrain the minimum window sizes
2020-09-22 17:46:57 -07:00
Arjun Balgovind
1ef4c43382
[Keyboard Manager] Fix crash in Keyboard Manager by ignoring MapToSameKey warnings on loading (#6714)
* Add extra argument to ignore MapToSameKey error for Key To Shortcut mapping

* added comment
2020-09-22 13:54:53 -07:00
Clint Rutkas
c1e9f2de6a
FxCop enabled (#6758) 2020-09-22 09:14:42 -07:00
Clint Rutkas
55b36d44fa
adding in frontmatter and latex (#6711) 2020-09-22 09:10:18 -07:00
Enrico Giordani
d2201cbb79
[SG] change suppress key code (#6750) 2020-09-22 13:12:19 +02:00
Clint Rutkas
934949725b
FxCop and StyleCop for SVG thumbnail (#6757)
* FxCop work for SvgThumbnail

* enabling stylecop
2020-09-21 19:44:12 -07:00
ryanbodrug-microsoft
0f6428eed0
User/ryanbod/mock settings disk access (#6188)
* 1) Making Directory Methods private.
2) Removing the CreateDirectory / DeleteDirectory functionality from all Settings Unit Tests.

* Abstracting disk access via IIOProvider to be able to provide mocks for unit tests instead of writing to disk.   This also prevents developers who are running unit tests from interfering with the PowerToys settings on their local dev box.

* Dependency Injecting stub SettingsUtils for all tests

* Removing ISettingsUtils from constructors of objects that need to be deserialized (ColorPickerSettings/PowerLauncherSettings) as this breaks System.Text.Json

* Removing unused namespace reference

* Removing redifined mock

* As per PR feedback.  Stub Settings utils should work with any settings type if the intent is to compile / avoid null ref exceptions.

Strangely when implementing this fix it became apparent that a stub settings isn't enough, and disk access needed to be mocked.  I can't explain why the tests were passing previously.

* Leveraging GetMockIOProviderForSaveLoadExists
2020-09-21 10:14:44 -07:00
Ivan Stošić
6e89ef62e4
[Launcher] Kill the Launcher immediately (#6747)
* Kill the Launcher immediately

* Also rename the shared file
2020-09-21 13:51:30 +02:00
Ivan Stošić
b266e336b5
[Launcher] Use a keyboard hook in the runner to invoke the Launcher (#6660)
* Added a keyboard hook to the runner

* Update RootKeyboardHook

* Enable reading the whole JsonObject property

* Renamed RootKeyboardHook to CentralizedKeyboardHook

* Fixed build break, changed callback return type to bool

* Added Hotkey struct which somehow went missing

+ Cherry-pick fixes

* Reorganized the kb hook

* Basic version works

* Various fixes

* Finishing touches

* Fix potential threading issue

* int -> size_t

* Add default initializers to the Hotkey struct

* Added a suggested comment

* Unified a constant

* Use C# classes instead of native calls for sync

* Added a claryfing comment

* Use std::move

* Renamed a method

* Possible fix for compilation errors

* Fix a regression

* Show a message on failure

* Added DISABLE_LOWLEVEL_HOOK support

* Allow running Launcher as standalone

* Rename string constants
2020-09-21 12:44:16 +02:00
Arjun Balgovind
e135153c45
[Keyboard Manager] Fix focusable elements should have different names accessibility issue (#6672)
* Add listview

* Added row index to accessible names

* Cleanup rowIndex

* Fixed accessibility issue with ComboBox

* Updated comments
2020-09-18 17:12:37 -07:00
Divyansh Srivastava
28cae124d1
Nit fix in logging (#6708) 2020-09-18 13:32:28 -07:00
Clint Rutkas
94d8b4a122
rerouting to Log class vs custom logic (#6688) 2020-09-18 12:58:52 -07:00
vldmr11080
3aa7a52c21
[FancyZones] Initial improvements in FancyZones exception handling (#6063)
* Initial improvements in FancyZones exception handling

* Add callback

* Disable FancyZones if error durign loading data occurrs

* Remove logs

* Add resource strings

* Add 1sec retry when failure during initialization occurs

* Rephrase error descriptions

* Error handling during loading of module in runner

* Pass error handling on the runner

* Remove unneeded string

* Remove unnedeed changes
2020-09-18 15:18:01 +02:00
yuyoyuppe
2bc3480396 common: fix trim functions for wchar_t 2020-09-18 13:33:02 +03:00
Remy Blok
7893f387d5
[FancyZones] Configurable sensitivity radius (#6554)
* Add the setting for the Sensitivity Radius to JSON and the Editor
Use the setting when determining Zones to highligh

* Fix FanzyZones unit tests
Add test for Json upgrade

* Updated texts in FancyZone Editor
More Text to Resources / Use Resources

* Added constant for default of Sensitivity Radius

* When installing from scratch of when a new device is added set the sensitivity radius to the default.
Move all the constant values to a single namespace

* restore correct formatting

Co-authored-by: Remy Blok <remy.blok@prodware.nl>
2020-09-18 09:16:06 +02:00
Divyansh Srivastava
00187269de
handle error in Packaged program loading (#6674) 2020-09-17 16:17:02 -07:00
Roy
b3833fcf1a
[PowerToys Run] Add Suport for Commandline arguments in Program Plugin (#5791)
* Implemented possibility to add commandline arguments in the Program Plugin

* Add missing return statement inc ommandArgumentParser loop

* Fix typos

* Fix Additional Typo

* Changed -c to /c to make it a valid cmd argument

* Added small comment about importance of order in _programArgumentParsers

Co-authored-by: Roy <royvou@hotmailcom>
2020-09-17 15:39:28 -07:00
Arjun Balgovind
f19bad3761
Revert "[FxCop] Telemetry.csproj" (#6690)
* Revert "marking all warnings (#6642)"

This reverts commit b0f0940534.

* Added warning comment
2020-09-17 14:02:25 -07:00
stefansjfw
b5cc24fcff
[FancyZones] Remove migration from registry logic and delete registry data if present (#6657)
* Remove migration from registry logic

* Address PR comments
2020-09-17 20:57:44 +02:00
yuyoyuppe
d414d52156 localization: move localizable strings to .resw for runner/bootstrapper 2020-09-17 20:32:18 +03:00
Clint Rutkas
d409a71000
Getting FxCop online (#6668) 2020-09-16 12:26:58 -07:00
Clint Rutkas
0a716c253b
Upgrade nuget packages (#6641)
* upgrade mahapps

* update nlog

* all launcher packages now updated

* tests and Setting UI

* markdown

* removing unneeded DLL now from nuget update
2020-09-16 12:24:21 -07:00
Clint Rutkas
13fd6bd6e1
[FxCop] Svg preview handler (#6647)
* Adjusting namespace

* Getting FxCop working e2e
2020-09-16 12:24:07 -07:00
Clint Rutkas
b0f0940534
marking all warnings (#6642) 2020-09-16 12:23:50 -07:00
Clint Rutkas
dc284d9cbb
Clean up some unused dependencies, nlog and some newtonsoft (#6650)
* remove nlog

* removing unused referecnes to newtonsoft
2020-09-16 11:36:52 -07:00
Clint Rutkas
0a86360948
Fxcop markdown preview handler (#6646)
* migrating namespace conflict

* Fixing all errors

* removing todo

* tweak wxs
2020-09-16 11:15:34 -07:00
Divyansh Srivastava
e49900f927
Fix sync issue in SelectedItem (#6582) 2020-09-16 09:59:04 -07:00
Arjun Balgovind
5e301133ff
[Settings] Fix settings process not terminating on closing settings while minimized (#6626)
* Added code to set CoreWindow to visible on closing while minimized

* Changed to environment.exit
2020-09-16 09:47:43 -07:00
stefansjfw
3d36779e19
[FancyZones] Do not zone window if it should be maximized (#6619)
* Do not zone window if it should be maximized

* Update comment

* Remove uneeded field

* Address PR comment
2020-09-15 13:03:17 +02:00
Enrico Giordani
eaf54ca525
Fix typo in URL (#6630) 2020-09-15 12:38:34 +02:00
Arjun Balgovind
25f93e8b94
Fix for issue 3886 (#6585) 2020-09-14 13:12:02 -07:00
Arjun Balgovind
7328aa7df5
Fixed Visibility property changed invoked on clicking away from PT Run (#6588) 2020-09-14 13:10:56 -07:00
Divyansh Srivastava
d75dd71848
Fix for null reference exception (#6589) 2020-09-14 11:03:17 -07:00
Ivan Stošić
3d5c790fb6
[FZ Editor] Improved a function in GridData.cs (#6565)
* Improved a function in GridData.cs

* Allocate the extra values proportionally

* Refactor a constant
2020-09-14 10:05:28 +02:00
Clint Rutkas
5af88de27b
tweaking text and adding in headers (#6586) 2020-09-11 17:10:51 -07:00
Clint Rutkas
997a7bc60f
adding in trim (#6584) 2020-09-11 16:15:18 -07:00
Arjun Balgovind
bfbd7b53a1
Unregister key delays on closing KBM windows (#6583) 2020-09-11 15:16:34 -07:00
Alekhya
1dec80902d
unify the name as it is present in the plugin.json file (#6547) 2020-09-11 13:45:32 -07:00
Alekhya
0478d99aac
To catch URI Format Exception in PT Run (#6580)
* add a catch block for uri format exceptions

* Added link to watson crash
2020-09-11 13:04:25 -07:00
stefansjfw
db9677bb4a
[FancyZones] Do not zone window if it merges with other window (#6549)
* Do not zone window if it merges with other window (e.g. merge Chrome tab into other Chrome window

* Small move of func call

* Address PR comment

* remove include

* Address PR comment 2
2020-09-11 12:35:43 +02:00
Ivan Stošić
0e32edb603
[FancyZones] Use Ctrl+Win+Alt+arrows to Expand/shrink windows to adjacent zones (#6446)
* Added an Alt key hook

* Refactor a block of code into a method

* Again refactored existing code

* Apparently Win+Alt does not reach FancyZones

* Using Ctrl+alt instead of Win+alt for now

* It works

* Fixed VD change

* Remove unused member

* Fix compilation error

* Enable shrinking

* Fixed comments in .h files

* Remove newline

* Refactored a function into two

The next task is to simplify their code.

* Updated a comment

* Update a variable name

* Reverted to the old implementation of directional move

* More refactoring

* Remove space

* Fixed windows getting stuck

* Changed function name
2020-09-11 11:32:45 +02:00
Arjun Balgovind
82e1be2839
[Launcher] Categorize Lnk files in program plugin correctly as per the target file type (#6348)
* Updated UnregisteredApps code

* Added file type checking code and Folder and File classifications

* Added more file formats

* Removed run as admin for lnk folders

* Added script files as executable and changed hashset to case insensitive

* Removed runasadmin for generic files

* Removed FileTypes enum

* Extended ApplicationTypes enum

* Fix file format error

* Cleaned use of ApplicationType enum to public and match AppType and used ApplicationType in OnAppRenamed

* Modify tests to use ApplicationType enum

* Added tests for new App types

* Modified dummy appref

* Mock Directory.Exists and add tests for GetAppTypeFromPath

* Combined tests
2020-09-10 15:06:37 -07:00
Arjun Balgovind
ab8bec8866
[KBM] Prevent keyboard manager crash when index is not found (#6488)
* Added Sleep(5000) for repro

* Added check to prevent kbm crash for index not found

* Add more safeguards
2020-09-10 11:31:49 -07:00
Arjun Balgovind
3b8fa8b4ce
Fixed KBM shortcut remapping not working after using Japanese IME (#6450) 2020-09-10 10:46:33 -07:00
ryanbodrug-microsoft
c4cb3df306
Adding FxCop to Microsoft.Plugin.WindowWalker (#6260)
* Adding FxCop to Microsoft.Plugin.WindowWalker

* Delete WindowResult.cs -- Fix for CA1812 WindowResult is an internal class that is apparently never instantiated. If so, remove the code from the assembly. If this class is intended to contain only static members, make it static (Shared in Visual Basic).

* Fix for CA1806 UpdateOpenWindowsList calls EnumWindows but does not use the HRESULT or error code that the method returns. This could lead to unexpected behavior in error conditions or low-resource situations. Use the result in a conditional statement, assign the result to a variable, or pass it as an argument to another method.

* Fix for: CA1066 Type Microsoft.Plugin.WindowWalker.Components.InteropAndHelpers.RECT should implement IEquatable<T> because it overrides Equals

* Fix for:  CA1052 Type 'FuzzyMatching' is a static holder type but is neither static nor NotInheritable

* Suppress for CA1069 - These values are defined in
https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles.

CA1069 The enum member 'WS_EX_LTRREADING' has the same constant value '0' as member 'WS_EX_LEFT'
CA1069 The enum member 'WS_EX_RIGHTSCROLLBAR' has the same constant value '0' as member 'WS_EX_LEFT'

* Supress CA1069

Code Description
CA1069 The enum member 'SWP_NOREPOSITION' has the same constant value '512' as member 'SWP_NOOWNERZORDER'
CA1069 The enum member 'SWP_FRAMECHANGED' has the same constant value '32' as member 'SWP_DRAWFRAME'

* Suprress CA1069 for ShowWindow values.  See

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow

CA1069 The enum member 'ShowMaximized' has the same constant value '3' as member 'Maximize'

* Fix code formatting error

* Fix for CA2235: Making POINT serializable

CA2235 Field MinPosition is a member of type WINDOWPLACEMENT which is serializable but is of type Microsoft.Plugin.WindowWalker.Components.InteropAndHelpers.POINT which is not serializable
CA2235 Field MaxPosition is a member of type WINDOWPLACEMENT which is serializable but is of type Microsoft.Plugin.WindowWalker.Components.InteropAndHelpers.POINT which is not serializable

* Fix CA2235 Making RECT serializable

CA2235 Field NormalPosition is a member of type WINDOWPLACEMENT which is serializable but is of type Microsoft.Plugin.WindowWalker.Components.InteropAndHelpers.RECT which is not serializable

* Fixes for CA2101 Specify marshaling for P/Invoke string arguments.

* Fixes for CA2007 Consider calling ConfigureAwait on the awaited task

* Fixes for the following (CA1822 / CA1801):
CA1822 Member 'OnOpenWindowsUpdate' does not access instance data and can be marked as static
Code Description
CA1801 Parameter value of method add_OnOpenWindowsUpdate is never used. Remove the parameter or use it in the method body.
CA1801 Parameter value of method remove_OnOpenWindowsUpdate is never used. Remove the parameter or use it in the method body.

* Fix: CA1710 Rename OpenWindowsUpdateHandler to end in 'EventHandler'

* Fix CA1822 Member 'GetProcessIDFromWindowHandle' does not access instance data and can be marked as static

* Fix CA1062 In externally visible method 'List<int> FuzzyMatching.FindBestFuzzyMatch(string text, string searchText)', validate parameter 'searchText' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument.

* Fixes for CA1304 The behavior of 'string.ToLower()' could vary based on the current user's locale settings.

CA1304 The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'FuzzyMatching.FindBestFuzzyMatch(string, string)' with a call to 'string.ToLower(CultureInfo)'.

Code Description
CA1304 The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'FuzzyMatching.FindBestFuzzyMatch(string, string)' with a call to 'string.ToLower(CultureInfo)'.

* Supressing warning for CA1814: Prefer jagged arrays over multidimensional however this might be something to consider if needing to optimize the window walker search.

* Fix: CA1062 In externally visible method 'List<List<int>> FuzzyMatching.GetAllMatchIndexes(bool[,] matches)', validate parameter 'matches' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument.

* Fix for CA1062 In externally visible method 'int FuzzyMatching.CalculateScoreForMatches(List<int> matches)', validate parameter 'matches' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument.

* Fixes for CA1806 Calls x...  but does not use the HRESULT or error code that the method returns. This could lead to unexpected behavior in error conditions or low-resource situations. Use the result in a conditional statement, assign the result to a variable, or pass it as an argument to another method.

Using discard for methods that return void, and checking the hresult before returning parameters.

* Fix for CA1820 Test for empty strings using 'string.Length' property or 'string.IsNullOrEmpty' method instead of an Equality check

* Supress CA1031 Modify 'get_WindowIcon' to catch a more specific allowed exception type, or rethrow the exception

* Code Description
CA1062 In externally visible method 'List<Result> Main.Query(Query query)', validate parameter 'query' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument.

* Fixes For CA1304 The behavior of 'string.ToUpper()' could vary based on the current user's locale settings.

CA1304 The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'SearchController.SearchText.set' with a call to 'string.ToLower(CultureInfo)'.
CA1304 The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'Window.ProcessName.get' with a call to 'string.ToLower(CultureInfo)'.
CA1304 The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'Window.SwitchToWindow()' with a call to 'string.ToLower(CultureInfo)'.
CA1304 The behavior of 'string.ToUpper()' could vary based on the current user's locale settings. Replace this call in 'Window.ToString()' with a call to 'string.ToUpper(CultureInfo)'.
CA1307 The behavior of 'string.Equals(string?)' could vary based on the current user's locale settings. Replace this call in 'Microsoft.Plugin.WindowWalker.Components.Window.SwitchToWindow()' with a call to 'string.Equals(string?, System.StringComparison)'.

* Fix: CA1710 Rename SearchResultUpdateHandler to end in 'EventHandler'

* Fix CA1060 Move pinvokes to native methods class

* Fix: CS0067 The event 'OpenWindows.OnOpenWindowsUpdateEventHandler' is never used

1) Remove SearchController::OpenWindowsUpdateHandler(object sender, SearchResultUpdateEventArgs e) as it wasn't being called and was redundant with Update Search Text.
2) In Main.cs calling UpdateOpenWindowsList before UpdateSearchText so that the latest enumerated windows will be called.
3) Removing unused OnOpenWindowsUpdateEventHandler and related code.

* Revert "Fixes for CA2101 Specify marshaling for P/Invoke string arguments."

This reverts commit b3dfe07915.

* Fixing CA2101 by turning off best fit mapping for methods that require ANSI marshalling.

See: https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2101?view=vs-2019

* Previous fix for CA1806 misunderstood int result as hresult.  The actual return value is number of characters written.
NativeMethods.GetWindowText(hwnd, titleBuffer, sizeOfTitle);

* Previous fix for CA1806 misunderstood int result as hresult.  The actual return value is number of characters written.

NativeMethods.GetClassName(Hwnd, windowClassName, windowClassName.MaxCapacity);

* Removing unused window code.  This was done instead of validating fxcop changes in WindowIcon.

* Fixing typos in Window.cs (charachter -> character)
2020-09-10 09:44:22 -07:00
Alekhya
efd5c33a92
set object before using it (#6497) 2020-09-10 09:44:10 -07:00
Niels Laute
f589103f5d
Change searchbox order to make text selectable (#6400)
Co-authored-by: Niels Laute <niels9001@hotmail.com>
2020-09-10 09:42:20 -07:00
vldmr11080
19175e9bde
Introduce several fallback scenarios when obtaining GUID for current virtual desktop (#6534) 2020-09-10 14:42:36 +02:00
P-Storm
3137aaa660
Create unit tests for Calculator plugin (#6356)
* Refactored logic and made it unit testable

* Changes after code review

* Added to build steps, and modified bracket to new class with unittest. Validates complexer cases now.

Co-authored-by: p-storm <paul.de.man@gmail.com>
2020-09-09 20:01:30 -07:00
Clint Rutkas
cfda69a120
FxCop with ColorPicker (#6464)
* fxcop fixes

* more fixes, not done yet

* supressing 1031 and ca2000 since we are expressly disposing this correctly

* catching a possible crash due to null ref if run twice

* addressing feedback
2020-09-09 17:08:37 -07:00
Clint Rutkas
1027b7de72
Enabling FxCop on tests (#6481) 2020-09-09 15:33:18 -07:00
Arjun Balgovind
fb1888f01f
Add in verbose error message and telemetry for SetWindowsHookEx failure (#6454)
* Updated error message when SetWindowsHookEx fails to show correct error message

* Added telemetry for exception in SG, FZ and KBM

* Rename exception to error
2020-09-09 14:27:40 -07:00
Divyansh Srivastava
f61e9d389f
catch unhandled FileNotFoundException exception (#6456) 2020-09-09 11:33:28 -07:00
dependabot[bot]
936b02865f
Bump http-proxy from 1.17.0 to 1.18.1 in /src/settings-web (#6455)
Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.17.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.17.0...1.18.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-09 16:14:58 +02:00
yuyoyuppe
cbd3516fc4 installer: reduce notification spam 2020-09-09 12:50:31 +03:00
yuyoyuppe
c2d6f740a1 bootstrapper: handle the unhandled 2020-09-09 12:50:31 +03:00
Niels Laute
305a04ce69
[Settings] NumberBox headers fixes (#6227)
* Update from master

* Updated Numberbox headers
2020-09-08 15:28:57 -07:00
Arjun Balgovind
fdd7d6afa4
Add in missing telemetry for Keyboard Manager usage (#6393)
* Added key remap invoked telemetry event

* Added queryperformance call

* Added in telemetry for key and shortcut remaps

* Removed redundant if check
2020-09-08 14:40:02 -07:00
Alekhya
1a51f77fce
Fix KBM Accessibility issues (#6379)
* Added an accessible name for the combo box

* Add name for the type shortcut button

* Add accessible name for the add new remapping button in both key remapping as well as shortcut remapping windows

* Set accessible names for the delete button

* Set the accessible name to the remapped to icon

* Fix the font icon issue faced while using narrator

* Fix accessible name for Add shortcut remapping button

* Set the accessible name for the target app text box when it loses focus

* fix comment
2020-09-08 12:24:59 -07:00
Arjun Balgovind
8ea8db7994
[PowerToys Run] Remove unused wox resources and move hardcoded strings to resx file (#6181)
* Removed xaml files, added resx file and removed references for PowerLauncher project

* Added resx file for wox.plugin

* Moved Calculator resources to resx

* Migrated resources for Folder and Indexer plugins

* Migrated resources for Program and Shell plugin

* Migrated resources for URI and Window Walker

* Removed GetTranslation, tests need to be refactored

* Removed internationalization classes

* Removed Wox.Core.Resource references

* Fixed Programs plugin tests

* Fixed tests

* Removed language xaml files from installer

* Added locProject.json files

* Fixed resource not found error

* Remove unused strings from PowerLauncher

* Removed all unused strings

* Reverted addition of resx file for Wox.Plugin

* Added more resources for Folder plugin

* Added resources for Folder and Indexer plugin

* Added resources for Program, Shell, Uri and WW plugins

* Changed string from Wox to PT Run

* managed common files
2020-09-08 11:51:24 -07:00
Divyansh Srivastava
cd906b0a6f
Corrected querytext display on action keyword (#6341)
* Corrected querytexdisplay on action keyword

* Added tests for UpdateResultWithActionKeyword
2020-09-08 10:32:01 -07:00
Alekhya
85fa644aca
Fix KBM Settings page Property related and screen reader Accessibility issues (#6289)
* Add accessible names for the KBM key remapping list and list item

* Add accessible name for the shortcut list item

* Add accessible name for shortcut remapping list

* Added accessible names to all icons

* Add accessible name for image

* Fix font icon narrator issue
2020-09-08 10:25:53 -07:00
Divyansh Srivastava
52a06b5cdc
[PT Run] Mitigate JSON Deserialization exception (#6295)
* Add error reporting window on deserialisation error

* Add message box to show launcher errors

* Change report window to messagebox

* nit fix in error window

* Localized string for error window

* update messagebox interface

* Correct ShowMessageBox argument order
2020-09-08 10:04:17 -07:00
vldmr11080
13426eac50
[FancyZones] Validate zone rect before adding it into layout (#6249)
* Validate zone rect before adding it into layout

* Rename variables for better code readability
2020-09-08 12:06:54 +02:00
Enrico Giordani
c5f90272d1
ImageResizer new icon (#6443) 2020-09-08 11:29:51 +02:00
stefansjfw
3c76942799
[FancyZones] Update 'span zones across monitors' feature description and add message box warning accordingly (#6381)
* Update span accross monitors feature description in Settings App

* Add warning if scalings are different

* Address PR comments

* Address comment
2020-09-07 12:24:13 +02:00
Divyansh Srivastava
a0eaf077de
[Pt Run] Show context menu for first folder plugin result (#6301)
* Added context menu to first folder result

* Added context menu to first folder result

* Add localization for string in folder plugin

* Fixed issue with context menu not showing on first selected item

* Add exception  logging
2020-09-04 15:12:04 -07:00
Arjun Balgovind
726f94e2a2
[Settings] Fix tabbing issues on KBM settings page (#6304)
* Removed listview items from tab ordering

* Removed tabstops on key/shortcut item controls to prevent double tab requirement
2020-09-04 12:42:41 -07:00
stefansjfw
78edaf5edc
[FancyZones] Set 3-zones PriorityGrid as default layout (#6248)
* 3-zones Priority Grid as default layout

* Update tests

* Address PR comments
2020-09-04 16:37:06 +02:00
Seraphima Zykova
570065175c
[Settings] Temporary string showing the latest available version (#6254) 2020-09-04 11:56:52 +03:00
stefansjfw
e84a293642
Fix span accross monitors feature (#6335) 2020-09-04 10:11:05 +02:00
martinchrzan
6e898ae52d
Added pixel reveal effect, increased max zoom level to 4, added rounded corners to main and zoom window (#6242) 2020-09-03 23:31:27 +02:00
Arjun Balgovind
288d929477
[Settings] Changed ImageSize class to parse as double instead of int (#6299)
* Changed ImageSize class to parse as double instead of int

* Tweaked fix to resolve empty ImageResizer box fix
2020-09-03 13:43:55 -07:00
Jeremy Wu
807fbd4d89
fix missing fragment portion of LocalPath (#6257) 2020-09-03 12:46:34 -07:00
ryanbodrug-microsoft
6ce47e5cd9
Adding fxcop to PowerLauncher.TelemetryProject (#6259) 2020-09-03 10:44:51 -07:00
Clint Rutkas
712d5fbfa7
fixing the fody warning (#6164)
* fixing the fody warning

* removing the ignored item from the installer
2020-09-03 09:49:28 -07:00
Seraphima Zykova
c9855a2671
[FancyZones] Fixed type cast warning (#6311) 2020-09-03 17:50:49 +03:00
Enrico Giordani
64ee0015d1
[chore] fix line endings (#6307) 2020-09-03 11:44:46 +02:00
Arjun Balgovind
1b598ad87e
[Localization] Move PowerToys Run string resources from xaml files to resx (#6165)
* Removed xaml files, added resx file and removed references for PowerLauncher project

* Added resx file for wox.plugin

* Moved Calculator resources to resx

* Migrated resources for Folder and Indexer plugins

* Migrated resources for Program and Shell plugin

* Migrated resources for URI and Window Walker

* Removed GetTranslation, tests need to be refactored

* Removed internationalization classes

* Removed Wox.Core.Resource references

* Fixed Programs plugin tests

* Fixed tests

* Removed language xaml files from installer

* Added locProject.json files

* Fixed resource not found error

* Reverted addition of resx file for Wox.Plugin
2020-09-02 15:24:59 -07:00
Alekhya
c9f536c635
fix for argument out of range exception (#6269) 2020-09-02 13:39:57 -07:00
Divyansh Srivastava
742f4fe36d
[Pt Run] Narrator support for result view navigation (#6146)
* Screen reader detecting List view

* Fixed narrator text for listview items and context menu items

* Renamed custom textbox to a more meanigful name

* Renamed custom textbox to a more meanigful name

* Fix formatting of LauncherControl.xaml

* Added support to control multiple elements
2020-09-02 13:34:07 -07:00
Enrico Giordani
06267f5a03
Now working on 0.21.2 (#6286) 2020-09-02 10:18:14 -07:00
Enrico Giordani
824bec2784
Update version to 0.21.1 (#6284) 2020-09-02 09:57:55 -07:00
Seraphima Zykova
cb81f7b057
[FancyZones] Convert ARGB color values to RGB (#6277) 2020-09-02 19:27:35 +03:00
Seraphima Zykova
ce43b10b5b
[FancyZones] HEX to RGB util (#6275) 2020-09-02 18:34:17 +03:00
Arjun Balgovind
0349383d08
[PowerToys Run] Fix error reporting window for exceptions that are not on the dispatcher thread (#6221)
* Possible fix for dispatcher error

* Revert changes on other files
2020-08-31 10:22:00 -07:00
Divyansh Srivastava
777e1dc48c
Fix color issue in search box (#6222) 2020-08-28 17:18:46 -07:00
Divyansh Srivastava
fe8727bd94
Fix issue with autocomplete text remaining on clearing query (#6220) 2020-08-28 14:58:57 -07:00
Enrico Giordani
6a531ca57c
Update version to 0.21.0 (#6219) 2020-08-28 20:57:03 +02:00
yuyoyuppe
fc4ac803aa common: do not accept invalid input in VersionHelper and add negative unit tests 2020-08-28 16:37:12 +03:00
yuyoyuppe
870f1095cd setup: add --help and --no_dotnet commands 2020-08-28 16:37:12 +03:00
yuyoyuppe
4e969a3701 bootstrapper: do not specify patch version of .net core in the notification msgs 2020-08-28 16:37:12 +03:00
stefansjfw
0a603449ad
[FancyZones] Enable to manually zone child windows (#6182)
* Enable to manually zone child windows

* Refactor IsInterestingWindow in 2 separate functions

* Remove enum
2020-08-28 15:00:21 +02:00
Enrico Giordani
d51640c2f0
[PowerRename] fix build warning (#6210)
PowerRenameUWPUI uses the resources from powerrename\dll\Resources.resx
2020-08-28 14:45:24 +02:00
Ivan Stošić
be8695777c
Fixed a stack overflow (#6212)
Credits to @gurnec for proposing the fix.
2020-08-28 13:54:59 +02:00
Enrico Giordani
eb825ae619
[FancyZones] fix warning (#6203) 2020-08-28 11:30:03 +02:00
Arjun Balgovind
07dfa6f296
Fix runner crashing on launching Keyboard Manager UI (#6185)
* Added maxVersionTested back to the manifest

* Updated comment with link to docs
2020-08-26 15:57:25 -07:00
Ivan Stošić
cb52cb2549
Improved the KB Hook in Color Picker (#6175)
* Improved the KB Hook in Color Picker

* Update KeyboardMonitor.cs

* Further simplify a method

* Using var

* Update KeyboardMonitor.cs

Add return;
2020-08-26 18:21:22 +02:00
Enrico Giordani
26b73b0745
[ColorPicker] proper Trace::UnregisterProvider(); (#6155) 2020-08-26 18:15:09 +02:00
Chris Davis
fead0c5ad9
Allow embedded images in SVGs to be displayed (#6163)
* Add DLIMAGES to WebBrowserExt ambient control flags to allow display of img links in SVGs.  We still specify FORCEOFFLINE so we are not actually performing a download.  This is to target SVGs with xlink base64 encoded data.

* Fix unit test
2020-08-26 09:06:42 -07:00
Arjun Balgovind
3bd6c363de
Added missing ! to condition check (#6162) 2020-08-25 12:07:17 -07:00
stefansjfw
48b6654ad2
Introduce ZoneWindowDrawing files and move stuff to better place (#6142) 2020-08-25 18:55:29 +02:00
ryanbodrug-microsoft
2075f9fa71
Comparing exepected vs actual json strings. This fixes two issues. (#6145)
1) the same variables are being compared against each other.
2) BasePTSettingsTest doesn't override equals to Equals compares the objects. This change compares the json strings directly.
2020-08-25 09:07:44 -07:00
Seraphima Zykova
96fdb6169a
Warning fix: __NULL_IMPORT_DESCRIPTOR already defined in Pathcch.lib (#6150) 2020-08-25 12:52:25 +03:00
Seraphima Zykova
6d47a5477a
Warning fix: C++/CLI mode does not support C++ versions newer than C++17 (#5910) 2020-08-25 12:21:30 +03: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
Arjun Balgovind
aebd7657ef
[Localization] Migrate resources to resx for FancyZones (#6106)
* 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
2020-08-24 17:50:41 -07:00
Arjun Balgovind
15938a12be
[Localization] Migrate resources to resx for Shortcut Guide (#6104)
* 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

* Migrated shortcut guide resources to resx

* Added LocProject.json
2020-08-24 17:49:28 -07:00
Arjun Balgovind
f2cfd90c46
[Localization] Move rc files to resx (#6057)
* 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
2020-08-24 15:10:50 -07:00
Divyansh Srivastava
f3a55d96f5
Remove the code for saving/writing program plugin cache (#6107) 2020-08-24 10:50:54 -07:00
Alekhya
392ca87dab
Fix Accessibility issues of the shortcut guide settings page (#6091)
* set the labeled by property of number box to point to the textblock heading so that 'Press duration before showing (ms)' string is read when the number box is highlighted

* Added comments on the accessibility issues that are dependent on the winui radiobuttons control

* Added information to the shortcut guide image on the right, it previously said only the word graphic
2020-08-24 10:48:45 -07:00
Alekhya
ff48421e4f
Add info about the color picker image (#6097) 2020-08-24 10:48:35 -07:00
Alekhya
f6579184a2
Add information about the image (#6099) 2020-08-24 10:48:24 -07:00
Alekhya
c0c68f6acd
Fix Accessibility issues in the PowerRename settings page (#6101)
* add automation property to number box

* Set the automation property for the image
2020-08-24 10:48:12 -07:00
Alekhya
f2fd376363
Fix Accessibility issues of the Image Resizer settings page (#6109)
* Added an automation name to the custom list view

* Added an automation property for the text box

* changed the name to 'Configuration'

* Added an automation property for the combo box

* Add automation property for number box

* added a name for the times symbol

* Added the height name automation property

* Add automation property for image resizer size combo box

* Add name and uid for button

* Add automation name for the grouping of list views

* Add automation property label for number box

* Add name for the filename format edit box

* Added more information to the image
2020-08-24 10:47:59 -07:00
stefansjfw
9999a2b126
Refactor common and fancyzones/utils (#6073)
* Move module-specific functions to module

* Refactor FZ utils

* Remove 'zonable' from FancyZonesWindowInfo

* Address PR comments

* Address PR comments

* Fix stuff after rebasing
2020-08-24 19:38:15 +02:00
Enrico Giordani
2817bf4d62
[FancyZones] fix warnings (#6095)
unified data type to size_t in all methods that process the zone index set
2020-08-24 14:39:34 +02:00
Seraphima Zykova
845bb466c6
[FancyZones] Shift + StickyKeys behavior fix (#6039) 2020-08-24 10:19:39 +03:00
Clint Rutkas
f64df97652
adding in FxCop to Svg tests (#6111) 2020-08-21 17:23:42 -07:00
Divyansh Srivastava
9c6b2c3e81
Display colored icons for packaged apps (#5923)
* Added wox code for tiling

* nit fixes in plating function

* Added feature to plate images based on theme

* Improve code readability

* added altform based paths

* Error handling in fetching logo

* Re add fix sequence empty exception on calling max in program plugin

* Move path and logo setting code to setIcon function

* Add corner radius to packaged apps icon

* Revert "Add corner radius to packaged apps icon"

This reverts commit 9be496e662.
2020-08-21 13:39:08 -07:00
Clint Rutkas
83e8799610
init checkin (#6100) 2020-08-21 12:40:31 -07:00
Alekhya
80f8c0399b
To remove the condition that space is needed after the Action keyword (#6003)
* Returning individual queries for each plugin

* Changed cancellation token from Query type to directly using the rawQuery

* Changed the way we get the plugins for which we execute the query

* updated UpdateResultView to take a string instead of query

* Changed the way we set a query for each plugin

* removed todo comment

* global plugins are added as a part of the query builder

* Fix for plugin.json of Folder plugin being copied into the shell plugin

* >,< and : are not allowed in file paths and indexer creates a query which searches compares if a file name is greater than or lesser than the query

* Reformatted the regex

* catching the exception

* fixed existing tests

* modified it so that it works with action keyword as well as action keywords

* Added unit tests for non global plugins

* fixed test

* add back whitespace that was removed by mistake

* fix regex

* modified the cold start query

* remove extra condition

* terms being modified as expected

* used key value pairs to iterate through the dictionary

* renamed variable

* added check for an empty dictionary

* remove : because it may appear in the file path

* fix some whitespace warnings that were being treated as errors
2020-08-21 12:21:42 -07:00
Alekhya
f6b5840e0e
Fix Accessibility issues of the FancyZones Settings page (#6045)
* Added automation property for the button

* Added an automation property name for the glyph

* added name automation property for the shortcut window

* fixed the name null for zone highlight button

* fixed the name for the inactive color dropdown

* fixed the accessibility issue with the border color downdown button

* fixed the issue with dropdowb buttons

* add description to the image

* Capitalize Z otherwise it reads it in an expected way

* made the naming generic as it the custom window is not only specific to fancyzones but is also used by colorpicker and PTRun to set their shortcut
2020-08-21 12:21:23 -07:00
Alekhya
b5dec2e935
Fix Accessibility Issues of PT Run settings page (#6090)
* label number box

* Added information to the PTRun image on the right
2020-08-21 12:21:15 -07:00
ryanbodrug-microsoft
79bb68d784
User/ryanbod/shell plugin fxcop (#6043)
* Enabling FxCop static analysis.

* Fixes for CA2227 Change 'Count' to be read-only by removing the property setter.
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2227?view=vs-2019

* Fix for:  CA1822: Mark members as static
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1822?view=vs-2019

* Fix for CA1805: Do not initialize unnecessarily.
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1805?view=vs-2019

* Fix for: Error CA1724 The type name Settings conflicts in whole or in part with the namespace name 'Microsoft.PowerToys.Settings'. Change either name to eliminate the conflict. Microsoft.Plugin.Shell C:\repos\powertoys\src\modules\launcher\Plugins\Microsoft.Plugin.Shell\Settings.cs 9 Active

* Severity Code Description Project File Line Suppression State
Error CA1724 The type name Settings conflicts in whole or in part with the namespace name 'Microsoft.PowerToys.Settings'. Change either name to eliminate the conflict. Microsoft.Plugin.Shell C:\repos\powertoys\src\modules\launcher\Plugins\Microsoft.Plugin.Shell\Settings.cs 9 Active

* Fix for CA1307: Specify StringComparison & CA1305: Specify IFormatProvider
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1307?view=vs-2019
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1305?view=vs-2019

* Fix for CA1062: Validate arguments of public methods
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1062?view=vs-2019

* Suppressing CA1031 Modify 'Query' to catch a more specific allowed exception type, or rethrow the exception'
2020-08-21 12:10:41 -07:00
Ivan Stošić
976116a012
Win arrows revisited (#5932)
* Added the setting

* Refactored existing code, the main feature isn't implemented yet

* Renamed a method

* Updated a comment in IZoneWindow

* Added the zone selection algorithm, didn't test it

* Basic features work

* Single monitor cycling works

* Seems that the feature works well

* Polished the settings page

* Rebase fix

* Fixed a null pointer dereference

* Use classic if syntax

* Fixed bad indentation

How did these lines unindent themselves?

* Removed TODO comment

* Rebase fix

* Another rebase fix
2020-08-21 12:53:03 +02:00
Seraphima Zykova
64c51a49a0
[FancyZones] Failing unit tests update (#6065) 2020-08-21 08:56:25 +03:00
Clint Rutkas
cc0b808962
Blurry Text for PT Run improvements (#6049)
* Checking in adjustments based off @anuthadev pr's

* Forcing an improvement on the magnifier glass

* removing whitespace
2020-08-20 21:45:55 -07:00
Seraphima Zykova
9b567f9ba3
[FancyZones] capture strong_this (#6066) 2020-08-20 19:55:41 +03:00
Enrico Giordani
9a36b005a1
[Shortcut Guide] fix Virtual-Key codes range (#6025) 2020-08-20 12:24:06 +02:00
ryanbodrug-microsoft
2390368d03
Fix for Crash due to System.AccessViolationException when calling OleDBSearch from multiple threads. (#6052)
* Removing non thread safe member variables, as well as the check to ensure that they have been disposed.

* Removing 'ExecuteQuery_ShouldDisposeAllConnections_AfterFunctionCall'.

This call previously required the use of member variables that were not thread safe.   There is no reason to share this state across threads.  Arguably this test verifies an internal implementation detail and is not suitable for a unit test anyway.
2020-08-19 17:28:19 -07:00
Mehmet Murat Akburak
64106cba82
[PowerRename] Using File Attributes Update (#5250)
* Use only fff for milliseconds

* Refactor

* Handle double $ signs.
Move isFileAttributes check to Helpers.
Move File Attributes to perform before regex operation

* Fix typo

* Format date/time test

* Disable problematic features. Add comments

* Fix month/day names

* Add tests

* Add line between tests

* Add local month/day names support

* Make sure month/date names are capitalized

* Fix formatting
2020-08-20 02:53:09 +03:00
Divyansh Srivastava
69cb20e1cd
Re add fix sequence empty exception on calling max in program plugin (#6054) 2020-08-19 16:16:45 -07:00
Arjun Balgovind
2a7bf7fb5b
[Localization] Add localization step to pipeline and enable localization on C# projects with resx/resw resource files (#6033)
* 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

* Fixed formatting of json file

* Move loc step to end
2020-08-19 16:10:15 -07:00
Clint Rutkas
dc744f236e
[warningsAsErrors] Getting settings online (#6053)
* getting everything to compile

* fixing json
2020-08-19 15:59:10 -07:00
Divyansh Srivastava
9724afd9ec
Run UI contrast accessibility (#6027)
* Fix contrast ration for SecondaryTextForeground brush

* Improve contrast for context menu button
2020-08-19 11:38:49 -07:00
Alekhya
34e7467d16
Fix accessibility issues related to the General Settings page (#6034)
* grouped radio buttons together

* grouping radio buttons together

* the word version is now read along with the version number

* Information regarding the image is read

* added a comment with the link to the issue in the winui repository
2020-08-19 11:29:13 -07:00
stefansjfw
7eccb6fc7a
Delete custom layout if malformed (#6011) 2020-08-19 18:12:57 +02:00
Nkateko
0445e89747
[Settings] Migrate PT Run Settings (#5768)
* added MSTest project

* Migrated PT Run Tests

* reverted changes to xaml file

* fixed Sttings.UI.csproj file

* added parameter for default key code
2020-08-19 08:12:07 -07:00
Nkateko
953ab958d5
[Settings] Migrate Fancy Zones Settings Tests (#5762)
* added MSTest project

* [Settings] Migrate Fancy Zones Settings Tests

* fixed errors

* reverted changes to xaml file

* updated varibale for test folder

* add ignore case flag

* fixed Sttings.UI.csproj file

* fixed Sttings.UI.csproj file
2020-08-18 14:46:32 -07:00
Nkateko
5e13152c73
[Settings] Migrated Image Resizer Tests (#5765)
* added MSTest project

* Migrated Image Resizer Tests

* fixed links

* removed exception
2020-08-18 13:43:58 -07:00
ryanbodrug-microsoft
8c98c7df29
attempting to run CI unittests for .netcore and .netframework projects (#5886)
* attempting to run CI unittests as seperate passes for .netframework and .netcore, based on assemblies.

* Mocking CSearchManager to avoid the following exception running in CI.

Retrieving the COM class factory for component with CLSID {7D096C5F-AC08-4F1F-BEB7-5C22C517CE39} failed due to the following error: 80070422 The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. (0x80070422).

* Setting proper connection string for unit test.

* Mocking sqlQuery with FilePath vs m*

* Temporarily Ignoring test that is throwing exception in CI.
2020-08-18 13:19:35 -07:00
Divyansh Srivastava
cedc4f710e
Catch exception in save method for json class (#5950)
* Catch exception in save method for json class

* Update error message

* Correct error logging format

* Catch IO exception
2020-08-18 10:50:16 -07:00
Seraphima Zykova
13d61bd866
WinAppDriver tests update (#5882)
* tray button fix
* settings closing changed
* ignore old settings tests
* changed test init
* changed launch
* separated app history file
* select enabled modules on launch
2020-08-18 12:23:43 +03:00
Nkateko
c6c9839208
[Settings] KBM Migrated KBM Settings Tests (#5821)
* added MSTest project

* enabled settings tests run in the build pipeline

* migrated KBM settings

* fixed typo

* moved the callback function initialization to the top

* fixed build
2020-08-17 15:00:19 -07:00
Clint Rutkas
2ff439dc47
fixing warnings, per ryan suggestion, suprressing warning now. we'll revisit the if debug blocks later (#6010) 2020-08-17 14:52:27 -07:00
Niels Laute
dad8cbecc1
[Launcher] ReportWindow redesign and theming support (#5790)
* Updated adaptive trigger behavior

* Fixed wrapping for KBM subtitle textblock

* Fix

* Theme support for ReportWindow

* Fix

* Fix

* Spacing issue fix

* Revert "Fix"

This reverts commit 8b2812e2de.

* Revert "Fixed wrapping for KBM subtitle textblock"

This reverts commit aa9ec54121.

* Revert "Updated adaptive trigger behavior"

This reverts commit e6f4ed27a1.

* Update ReportWindow.xaml.cs

* Update ReportWindow.xaml.cs

* Update ReportWindow.xaml.cs

* Removed redundant code, fixed trailing issue

Co-authored-by: Niels Laute <niels9001@hotmail.com>
2020-08-17 13:48:54 -07:00
Arjun Balgovind
8f8b200f24
Move hardcoded strings in Keyboard Manager projects to rc file (#5921)
* moved all strings in c++ side to rc file

* Fixed formatting
2020-08-17 13:46:50 -07:00
Clint Rutkas
8dec9d5fe9
Fixing color picker warnings and enabling warnings as errors (#6006) 2020-08-17 13:13:45 -07:00
Clint Rutkas
e671c913ab
Removind depercated fields (#6008) 2020-08-17 13:13:11 -07:00
Clint Rutkas
9d46fae865
Enabling warnings as errors and correcting StyleCop issues (#6007) 2020-08-17 13:11:59 -07:00
Clint Rutkas
315caaba1c
[WarningsAsErrors] Getting Most online (#6005)
* Enabling errors as warnings.

* removing plugin since it throws an error for release mode,  WIll fix in other release
2020-08-17 13:11:40 -07:00
Nkateko
7af4ffe341
[Settings] Migrate File Explorer Preview Settings (#5785)
* added MSTest project

* migrate file explorer preview settings

* updated test file

* fixed build
2020-08-17 13:10:56 -07:00
Enrico Giordani
8bf730baae
Remove 'AnyCPU' build configuration (#5999) 2020-08-17 20:17:16 +02:00
Clint Rutkas
d055ba1c3b
whitespace forced changes (#6002) 2020-08-17 10:00:56 -07:00
Aaron Junker
649e7e103d
Update de.xaml (#5227)
* Update de.xaml

* Update de.xaml
2020-08-17 09:25:10 -07:00
Seraphima Zykova
947bf10c2f
Warning fix: calling convention of '__cdecl ' ignored; '__clrcall ' used instead (#5931) 2020-08-17 16:41:11 +03:00
Roy
55dc5dc19d
[Powertoys Run] Implemented "hidden files" flag in native Windows Search (#5500)
* Implemented "hidden files" flag in native Windows Search

* add missing file

* Change InitQueryHelper back to static

* Fix Line Endings

* Add files via github

Co-authored-by: Roy <royvou@hotmailcom>
2020-08-15 14:11:56 -07:00
martinchrzan
04c80915e5
Trying to dispose mouse hook earlier to potentialy fix the lagging mouse bug after selecting the color (#5530) 2020-08-15 17:28:53 +02:00
Clint Rutkas
be36b4aac1
correctin file ending (#5970) 2020-08-14 15:10:06 -07:00
Nkateko
2ce16bcdb7
[Settings] Migrate PowerRename Tests (#5787)
* added MSTest project

* migrated powerrename tests

* updated test

* reverted changes to xaml file
2020-08-14 14:26:41 -07:00
Nkateko
1683f191a9
[Settings] Migrate Shortcut Guide Settings Tests (#5789)
* added MSTest project

* migrated shortcut guide tests

* updated tests

* updated tests

* reverted changes to xaml file
2020-08-14 13:58:48 -07:00
Clint Rutkas
70d93a0bfc
C26819 - Directly stating this fallthrough is correct (#5967)
* Directly stating this fallthrough is correct

* Update MockedInput.cpp

Adjust per Arjun
2020-08-14 13:35:58 -07:00
Clint Rutkas
6514712054
[stylecop] Launcher (#5968)
* Should be last stylecop change!

* two more tweaks
2020-08-14 13:35:06 -07:00
Clint Rutkas
e0a1b478a1
Program plugin fully on stylecop (#5964) 2020-08-14 12:46:23 -07:00
Clint Rutkas
be5d58c849
incorrect override of SA1401 (#5965) 2020-08-14 12:41:55 -07:00
Clint Rutkas
e4f9c02d11
Lots of small tweaks (#5960) 2020-08-14 11:50:14 -07:00
Clint Rutkas
5c1713f274
wrapping up everything minus var renaming (#5952) 2020-08-14 09:22:24 -07:00
Clint Rutkas
913615f1c2
more braces and whitespace style errors (#5951) 2020-08-14 09:22:12 -07:00
Arjun Balgovind
9e8b0d2807
Refactored Keyboard Manager UI code and added unit tests for Keyboard Manager UI (#5718)
* Added tests for loading and saving remappings in the UI

* Added tests for ApplyRemappings methods

* Moved single key remap validation logic to separate method so that it can be tested

* Added tests for single key remap validation in UI

* Refactored shortcut validation code to be testable

* Added some shortcut validation tests

* Refactored code to be cleaner

* Added tests for action key and modifier key selection and formatted file

* Added tests for selecting None

* Added tests for selecting Null

* Added tests for WinL error

* Added CtrlAltDel tests

* Added tests for MapToSameKey

* Added tests for mapping repeated shortcut

* Fixed const correctness

* Clean up type names with type alias

* Clean up ValidateAndUpdateKeyBufferElement tests and tweak ValidateShortcutBufferElement signature

* Fixed bug when None selected

* Refactored one test as per test case framework

* Cleaned up more tests

* Cleaned up buffer validation tests

* Added tests for KBM Common Helpers and Shortcut
2020-08-13 16:32:15 -07:00
Nkateko
0b5749d491
[Settings] Migrate Color Picker Settings Tests (#5759)
* added MSTest project

* migrated color picker settings

* undo changes for the .xaml page
2020-08-13 15:46:51 -07:00
Clint Rutkas
23a9fa40e7
Additional formatting tweaks (#5909) 2020-08-13 15:32:12 -07:00
Clint Rutkas
38b0d427f8
Fix all file naming tweaks (#5945) 2020-08-13 15:31:32 -07:00
Clint Rutkas
e02977edc0
Whitespace and type fixes (#5917) 2020-08-13 15:31:14 -07:00
Nkateko
24d7232559
[Settings Tests] Migrate General Settings tests (#5753)
* added MSTest project

* migrated general settings tests

* enabled settings tests run in the build pipeline

* added tests

* move relay command class to separate file

* added a foldername parameter for general settings view model
2020-08-13 15:02:05 -07:00
Clint Rutkas
e4ea8d2abd
Correcting floating point error (#5949) 2020-08-13 14:02:38 -07:00
Nkateko
ebd1a6406b
[Settings] Unit Tests Migration Feature Branch Merge (#5754)
* added MSTest project

* enabled settings tests run in the build pipeline

* re-added settings test project

* re-added test project and sample test

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* updated settings test output path

* updated output path for release config

* added xunit test project

* removed xunit test project

* fix build

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-ci.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-ci.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml

* Update build-powertoys-steps.yml
2020-08-13 13:51:01 -07:00
Clint Rutkas
5079ee67c3
[stylecop] program plugin unit tests part2 (#5925)
* Another batch

* Commenting out stylecop
2020-08-13 11:10:55 -07:00
Seraphima Zykova
9592fab414
Warning fix: removed additional dependencies in common project (#5930) 2020-08-13 15:25:36 +03:00
Enrico Giordani
f36858d074
update readme for WinAppDriver tests (#5927) 2020-08-13 13:08:36 +02:00
Seraphima Zykova
1b8bb7c445
Warning fix: Variable is uninitialized. Always initialize a member variable (#5928) 2020-08-13 13:48:15 +03:00
Divyansh Srivastava
f499ff81f2
Prevent copying of files from folder to shell plugin (#5893) 2020-08-12 15:16:29 -07:00
Alekhya
e80c7b6b45
Fix for PowerLauncher crash - Type Load Exception (#5906)
* Added the version number for all launcher projects so that they are in sync with the powerToys version number

* Removed internals visible to Wox.dll as we no longer have that library
2020-08-12 14:18:01 -07:00
Arjun Balgovind
f3babcb46e
Fixed exceptions in indexer and delayed execution logic (#5912) 2020-08-12 12:44:55 -07:00
Clint Rutkas
95e82ca359
[stylecop] program plugin/unit test first pass (#5908)
* initial pass

* multiple whitespace fixes
2020-08-12 11:46:11 -07:00
Clint Rutkas
8888739867
fixing all warnings and info for infra (#5891) 2020-08-12 10:44:58 -07:00
ryanbodrug-microsoft
db6e9b6962
Adding FxCop to Program Plugin Unit Tests (#5884)
* Adding FxCop to Microsoft.Plugin.Program.UnitTests

* CA1707: Identifiers should not contain underscores
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1707?view=vs-2019

* CA1307: Specify StringComparison
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1307?view=vs-2019

* CA1812: Avoid uninstantiated internal classes
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1812?view=vs-2019

* More CA1707: Identifiers should not contain underscores fixes now that class is public

* More fixes for https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1812?view=vs-2019

List Repository and Win32ProgramRepository

* More CA1707: Identifiers should not contain underscores fixes now that class is public

ListRepository and Win32ProgramRepository tests

* Adding `ConfigureAwait(false)` and removing Assert.DoesNotThrowAsync as thowing an exception will fail the test anyway, and the DoesNotThrowAsync method can't be awaited.

Fix for CA2007: Do not directly await a Task (Consider calling ConfigureAwait on the task).

CS1998 This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

* Setting treat warning as errors to true for release and debug.
2020-08-12 10:03:34 -07:00
Clint Rutkas
a0832d3fb6
enabling stylecop (#5885) 2020-08-11 16:35:58 -07:00
Divyansh Srivastava
1c77887629
Reduce folder plugin results (#5631)
* Reduce folder plugin results

* Added warning message

* Added UI content for warning message in folder plugin

* nit fixes for folder plugin changes

* Localised warning message

* fix Merge conflicts

* nit fixes and move warning to end of results

* Add IDisposable interface to folder plugin

* Add images to MSI
2020-08-11 15:06:40 -07:00
Arjun Balgovind
dcd0ca8daa
[PT Run] Split indexer plugin's queries into a fast and slow query (#5748)
* Added regex code

* Added regex based method to remove all LIKE queries

* Made regex readonly

* Added plugin interface and code to execute slower plugins after the fast plugins

* Added scoring for indexer and added statement to remove old indexer results

* Refactored from master and added thread sleep for debugging

* Removed lock from indexer plugin and added checks to avoid exceptions

* Remove debug statement

* Removed selected index update and fixed tests not building

* Added tests

* Removed scoring

* Removed lock

* Resolve merge conflicts

* Moved dispatcher code to function and add parallel foreach loop

* Removed DelayedExec metadata and modified QueryForPlugin to run only delayed exec plugins when bool param is true

* Removed metadata from plugin.json
2020-08-11 14:52:03 -07:00
Clint Rutkas
304981fcf2
[stylecop] Wox.Core - last amount needed to fully integrate (#5877)
* Looks like it was done

* StyleCop enabled for WoxCore
2020-08-11 14:12:08 -07:00
Clint Rutkas
f1bb533321
[StyleCop] Wox.Plugin - last amount needed to fully integrate (#5853)
* StyleCop for Plugin

* getting release mode working
2020-08-11 13:41:41 -07:00
Clint Rutkas
2c49df4be3
more fixes for getting styleCop up, this will need one more push to get another 15 that will require renaming of vars (#5875) 2020-08-11 13:40:26 -07:00
Roy
90502f7553
Add Microsoft.Plugin.Uri.UnitTests to CI + Fix Tests (#5878)
Co-authored-by: Roy <royvou@hotmailcom>
2020-08-11 11:49:44 -07:00
Mehmet Murat Akburak
18f5c7f691
[PowerRename] Use the same label size for all options (#5870) 2020-08-11 21:31:16 +03:00
Divyansh Srivastava
2d2cb22806
Stable sorting of ResultCollection (#5850)
* Stable sorting of ResultCollection

* nit fixes for resultsViewModel and ResultCollection
2020-08-11 10:24:56 -07:00
ryanbodrug-microsoft
ac10c988b9
Enable Static Analysis on programs plugin (#5847)
* Removing unused ProgramSettings constructor paramaters.

* Fix for:

Severity Code Description Project File Line Suppression State
Error CA1829 Use the "Count" property instead of Enumerable.Count(). Microsoft.Plugin.Program C:\Repos\PowerToys\src\modules\launcher\Plugins\Microsoft.Plugin.Program\Views\ProgramSetting.xaml.cs 182 Active

Severity Code Description Project File Line Suppression State
Error CA1827 Count() is used where Any() could be used instead to improve performance. Microsoft.Plugin.Program C:\Repos\PowerToys\src\modules\launcher\Plugins\Microsoft.Plugin.Program\Views\ProgramSetting.xaml.cs 287 Active

* Fixes for CA1031:
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1031?view=vs-2019

* More fixes(Suppression) for CA1031 (Catching base exception)
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1031?view=vs-2019

* Fix for nested types being externally visible.  CA1034
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1034?view=vs-2019

* Fix for  CA1028 If possible, make the underlying type of Hresult System.Int32 instead of uint. Microsoft.Plugin.Program C:\Repos\PowerToys\src\modules\launcher\Plugins\Microsoft.Plugin.Program\Programs\UWP.cs 236 Active

* Fix for CA2227 Collection properties should be readonly.
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2227?view=vs-2019

Fix rror CA2211 Non-constant fields should not be visible
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2211?view=vs-2019

* CA2208: Instantiate argument exceptions correctly
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2208?view=vs-2019

* Win32.cs Static analysis fixes:

CA2200: Rethrow to preserve stack details
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2200?view=vs-2019

CA1825: Avoid zero-length array allocations
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1825?view=vs-2019

CA2211: Non-constant fields should not be visible
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2211?view=vs-2019

* More Win32.cs static analysis fixes:

CA1307: Specify StringComparison
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1307?view=vs-2019

Verifying query is not null before using it.
CA1062: Validate arguments of public methods
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1062?view=vs-2019

CA1305: Specify IFormatProvider
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1305?view=vs-2019

* UWPApplication.

CA2007: Do not directly await a Task
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2007?view=vs-2019

* Error CA2010 Consume the hresult returned by method 'Microsoft.Plugin.Program.Programs.AppxPackageHelper.IAppxManifestApplication.GetStringValue(string, out string)' and call Marshal.ThrowExceptionForHR.

Note:  CA2010 has been removed from future FXCop versions as it can provide incorrect advice for methods that don't return hresult (possibly when [PreserveSig] has been incorrectly labeled.)  I've verified the methods in question do still return hresults.

* More fixes for
Error CA2010 Consume the hresult returned by method and call Marshal.ThrowExceptionForHR.

* Fixes for:
Error CA2000 Call System.IDisposable.Dispose on object created before all references to it are out of scope.

* Suppress CA1031:Do not catch general exception types

* Fixes for
Error CA1034 Do not nest type ...

* Fixing Unit tests that were broken as per a previous fix.

* Fix for: CA1034: Nested types should not be visible:
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1034?view=vs-2019

* Suppressing CA1707 for native/com types.
CA1707:Identifiers should not contain underscores

* Fix for Error CA1307 The behavior of 'string.Replace(string, string?)' could vary based on the current user's locale settings.

* Fixes for Error CA1825 Avoid unnecessary zero-length array allocations.  Use Array.Empty<string>() instead.

* Fix for: Error CA1823 Unused field 'IndexLock'.

* Fixes for CA1822: Mark members as static:
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1822?view=vs-2019

* Fix for Error CA1819 Properties should not return arrays

* Fix for Error CA1806 ContextMenus calls Trim but does not use the new string instance that the method returns. Pass the instance as an argument to another method, assign the instance to a variable, or remove the call if it is unnecessary.

* Fix for Error CA1801 Parameter settings of method UpdateSettings is never used. Remove the parameter or use it in the method body.

* Fix for Error CA1724 The type name Settings conflicts in whole or in part with the namespace name 'Microsoft.PowerToys.Settings'.

* Includes FxCop for static analysis

* Fix for Error CA1717 Only FlagsAttribute enums should have plural names

* Suppress Stgm flags: Error CA1714 Flags enums should have plural names Microsoft.Plugin.Program

* Rename Win32 to Win32Program

Fix for: Error CA1724 The type name Win32 conflicts in whole or in part with the namespace name 'Microsoft.Win32' defined in the .NET Framework. Rename the type to eliminate the conflict.

* Fixes for Error CA1507 Use nameof in place of string literal

* Using ordinal instead of invariant culture when not symbolic comparison

* CA1308: Normalize strings to uppercase
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1308?view=vs-2019

* CA1304: Specify CultureInfo
CA1305: Specify IFormatProvider

https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1305?view=vs-2019
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1304?view=vs-2019

* CA1062: Validate arguments of public methods
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1062?view=vs-2019

* CA1056: URI properties should not be strings
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1056?view=vs-2019

Fix:   Making LogoURi private, as it is only used internally and operated on as a string

* Warning CA1052 Type 'AppxPackageHelper' is a static holder type but is neither static nor NotInheritable

* CA1060: Move P/Invokes to NativeMethods class
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1060?view=vs-2019

* Programs Plugin - Treat warnings as errors true

* CA1031:Do not catch general exception types
Missed release only compile issue.  Making debug and release behave the same.

* Renaming 'Create' to 'CreateWin32Program' based on PR feedback.
2020-08-11 09:08:44 -07:00
Ivan Stošić
83de1686c0
Don't wait for ColorPicker.exe to close (#5866) 2020-08-11 17:06:28 +02:00
vldmr11080
145347f7ae
[FancyZones] Clasify strings in FancyZones to localizable and non-localizable (#5315)
* Clasify strings in FancyZones to localizable and non-localizable

* Address PR comments

* Better handling of FirePropertyChanged event

* Address PR comments

* Update properties
2020-08-11 13:51:06 +02:00
Ivan Stošić
b8b6dbe791
Potential fix for a crash in OnThreadExecutor (#5840) 2020-08-11 10:39:18 +02:00
Divyansh Srivastava
d21201e996
Reduce program plugin results (#5743)
* Added minimum score threshold

* nit fix for program plugin
2020-08-10 16:25:34 -07:00
Roy
ba2ef23414
[PowerToys Run] Add Support for Uris (#5160)
* url handler plugin

* updates

* Add seperate interface classes
rename to uri module

* Update path

* Update implementation to remove slow DNS lookup ( and let browser handle it)

* tabs to spaces

* - Update icon/assets
- Finalize Project

* Update wix project

* Implement UpdateBrowserIconPath

* Implemented Microsoft.CodeAnalysis.FxCopAnalyzers

* Add Language component to installer

* Update logic to determine icon

* Update Translation File to "Open in browser"

* Added test for typing http://test.com and which result to expect on each keystoke

* Implement StyleCop

* Added ipv6 tests

* Fix Solution LineBreaks

* Added Microsoft.Plugin.Uri as build Dependency

* Use ArgumentNullException instead of InvalidOperationException

* Fix wrong Directory in wix installer

Co-authored-by: Roy <royvou@hotmailcom>
2020-08-10 15:53:43 -07:00
Divyansh Srivastava
3781d1e06b
Consolidate folder and shell plugin (#5843)
* Added folder plugin functionality to shell plugin

* Added QueryTextDisplay for shell plugin

* Remove QueryTextDisplay change

* Fix merge conflict issues
2020-08-10 15:51:02 -07:00
Clint Rutkas
082a78bd92
Getting remaining Tests on stylecop (#5846) 2020-08-10 15:49:36 -07:00
Clint Rutkas
7bfd0823db
Enabling StyleCop for folder plugin (#5844) 2020-08-10 13:28:22 -07:00
Enrico Giordani
013ffe1626
Now working on 0.20.2 (#5834) 2020-08-10 16:30:25 +02:00
Divyansh Srivastava
b2006f2466
Remove all plugin results on query change (#5796) 2020-08-07 19:27:52 -07:00
Niels Laute
7d8931696d
Localized Image resizer tooltip (#5529)
Co-authored-by: Niels Laute <niels9001@hotmail.com>
2020-08-07 17:54:56 -07:00
Niels Laute
e88812458e
[Settings] Updated adaptive trigger behavior (#5434)
* Updated adaptive trigger behavior

* Fixed wrapping for KBM subtitle textblock

* Fix

Co-authored-by: Niels Laute <niels9001@hotmail.com>
2020-08-07 12:00:48 -07:00
Clint Rutkas
ada42f6e94
in theory this fixes all SA1649 issues now with any project with stylecop enabled (#5786) 2020-08-07 11:56:28 -07:00
Clint Rutkas
34c3b50b48
Incremental fix for StyleCop on Infra (#5729)
* Fixes file names and classes don't match.  All but PluginsSettings

* making it pluginsettings

* fixing due to conflict
2020-08-07 10:45:50 -07:00
Andrey Nekrasov
63c36d0dbf
runner: don't try to restart explorer (#5763) 2020-08-07 15:26:34 +03:00
Andrey Nekrasov
bd80bb6bb3
bootstrapper: add support for silent arg (#5590) 2020-08-07 12:00:14 +03:00
Ivan Stošić
8f98866d71
[FancyZones] Feature to create zone layouts spanning multiple monitors (#5289)
* Added the setting

* Added a property to Editor Settings

This will be used later

* Fixed a bug in the previous commit

* Simplified a method

* Added snapping points to the editor

* Simplified a method in ZoneSet

* Updated ZoneSet testcases

* Add a method to FancyZones / ZoneWindowHost

* Almost works

* The editor now launches, but FZ does not understand the results

* Refactored some code

* Snapping to a zone by dragging seems to work

* Hotkeys seem to work

* Refresh the work area handler after changing settings

* Fixed zones not snapping to monitor edges when moved

* Remove unused method in FancyZones.h

* Fixed an issue with DPI awareness

* Renamed setting to spanZonesAcrossMonitors

* Renamed a function

* Fixed a bug with the magnetic effect

* Fix restoring window positions on layout changes
2020-08-07 10:06:25 +02:00
Clint Rutkas
26bf05dd7e
whitespace changes (#5750) 2020-08-06 20:38:49 -07:00
Clint Rutkas
b815718c26
whitespace only (#5747) 2020-08-06 16:52:25 -07:00
Clint Rutkas
d7994ca67d
style cop wox.core whitespace changes (#5744)
* whitespace changes

* undoing csproj tweak to keep stylecop off
2020-08-06 16:51:47 -07:00
Arjun Balgovind
b95a1fb604
Unlinked the MaxResults value from settings and set to fixed value of 30 (#5742) 2020-08-06 16:44:13 -07:00
martinchrzan
b04bb2ef8d
Color picker respects right monitor side boundaries and does not go outside of the view (#5480) 2020-08-06 20:54:26 +02:00
martinchrzan
066aeec1e6
Fixed jerky zoom animation (#5483) 2020-08-06 20:53:16 +02:00
Clint Rutkas
d6e46d73b5
whitespace stylecop fixes for Wox.Infra (#5689)
* Limited to whitespace

* removing stylecop again
2020-08-06 11:28:13 -07:00
Clint Rutkas
7b767df0b5
getting stylecop undercontrol for UI warnings (#5630) 2020-08-06 11:16:25 -07:00
Clint Rutkas
ed36447bdf
Fixing stylecop violations (#5629) 2020-08-06 10:10:44 -07:00
Clint Rutkas
0f90af3c7d
URL audit (#5685) 2020-08-06 10:09:50 -07:00
stefansjfw
f50a8e5252
Fix difference in editor and applied focus layout zones size and increments (#5601) 2020-08-06 16:41:15 +02:00
vldmr11080
1d8ca28152
Don't restore minimized windows after layout is updated (#5603) 2020-08-06 16:22:47 +02:00
vldmr11080
6c4129d02a
[FancyZones] Do not restore maximized windows (#5597)
* Do not restore maximized windows

* Fix show command comparison

* Move maximized check outside of RestoreWindowSize function
2020-08-06 15:12:49 +02:00
Nkateko
4543b32bef
fix settings path (#5692)
* fix settings path

* Update settings_window.cpp

* rollback commit #5487
2020-08-06 00:49:40 -07:00
Clint Rutkas
ff69f6ed7f
fixing most whitespace issues, reordering namespaces and adding in headers (#5677) 2020-08-05 14:06:55 -07:00
Clint Rutkas
92a2b83bc8
smaller stylecop fixes in Wox.Core and Wox.Infra (#5671)
* Headers
unneeded usings
files need blank line at bottom
Fixed double returns
Returns after braces

* commenting out stylecop
2020-08-05 14:06:42 -07:00
Alekhya
30b65028fe
Fix Code Related PT Run Accessibility issues (#5610)
* set the name automation properties for the result elements

* Added name properties to search box

* removed the name for the grid

* localized the automation property names of the launcher control

* Localized the automation name property for the result list

* Uncommented out the Hide() function which was commented out to run Accessibility Insights

* modified resources from static to dynamic

* reverted access modifier to internal as we are no longer using this

* updated csproj file
2020-08-05 13:43:47 -07:00
Andrey Nekrasov
59ebe30b72
runner: initialize COM security, so toast notifications work in elevated context from non-admin account (#5314) 2020-08-05 19:06:50 +03:00
Alekhya
814f6213fa
Added null check before using unregister hotkey function (#5627) 2020-08-05 08:06:03 -07:00
Andrey Nekrasov
dce3ee440b
bootstrapper: use a dedicated solution (#5318) 2020-08-05 17:20:50 +03:00
Clint Rutkas
b87d14cd61
Proper fix for MSB3052. (#5618)
* fixing MSB3052

* adding back in to unblock build

* More agressive refactor.  Moved the define constant to wixproj and actual version into src file version prop

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-08-05 00:04:18 -07:00
Arjun Balgovind
5c10c78595
Fixed exceptions in dispose not allowing PT Run to terminate (#5615) 2020-08-04 21:06:07 -07:00
Clint Rutkas
a793cf4ac2
onboarding stylecop (#5622) 2020-08-04 16:39:25 -07:00
Roy
010732108c
Add "AssemblyTitle" attribute which is used for the taskbar menu name. (#5487)
Co-authored-by: Roy <royvou@hotmailcom>
2020-08-04 16:36:59 -07:00
Clint Rutkas
296d103f68
Getting Shell on stylecop (#5620) 2020-08-04 16:27:35 -07:00
Clint Rutkas
1f590c45be
Unit tests getting up-to-par for StyleCop (#5364)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-08-04 14:01:37 -07:00
Hector Minaya
d11b5b3e02
Power Launcher | #5062 Moved Start Typing... to resource file (#5408) 2020-08-04 09:53:58 -07:00
Ivan Stošić
8f8787b2e0
Fixed Launcher not exiting when PT is terminated (#5588)
* Fixed Launcher not exiting when PT is terminated

* Added a null check to _hotkeyManager as well
2020-08-04 14:33:07 +02:00
Andrey Nekrasov
7581802498
Fix bootstrapper getting stuck on "installing dotnet" (#5565) 2020-08-04 13:34:09 +03:00
Andrey Nekrasov
371523d756
notifications: provide default app id to fix FZ toast crashes (#5551) 2020-08-04 11:12:49 +03:00
Clint Rutkas
1456be9feb
wrapping agressively the timer. (#5560)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-08-03 16:46:15 -07:00
martinchrzan
62f57b134a
Fixing potentially infinite loop with logs in Color Picker (#5558) 2020-08-03 22:03:00 +02:00
Hector Minaya
8fc3f1ccbd
[Fancy Zones] Add scrollbar to the input field for excluded apps in the settings page (#5410) 2020-08-01 07:48:38 +02:00
Clint Rutkas
c946f10d0c
fixing all warnings and i think i got one larger one that was before stylecop was enabled, OnOpenWindowsUpdate (#5382)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-31 16:42:24 -07:00
Clint Rutkas
e03ef0b739
Remove InputSimulator nuget package (#5388)
* getting app to not use it, now installer

* removed windowinput.dll from inputsimulator nuget package

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-31 15:16:49 -07:00
Clint Rutkas
55b92ab263
supressing warning 8305 as there is nothing we can do about as this is a WinUI (#5393)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-31 15:15:50 -07:00
Divyansh Srivastava
fbc625478b
Improve query cancellation and ResultCollection performance (#5370)
* Added cancellation token to downstream functions in query thread

* Remove initial lag in query

* Re add query delay

* Remove debug flag
2020-07-31 15:09:23 -07:00
ryanbodrug-microsoft
4da8aab44f
Including valid package information when path is invalid. This is needed because the path will be invalid when uninstalling an application, but we still need the other information to remove it from the currently indexed list of uwp/packaged applications. (#5373) 2020-07-31 12:33:05 -07:00
Clint Rutkas
d9fd967c48
Style cop up and running (#5340)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-31 09:49:42 -07:00
Clint Rutkas
ab86fc9a5e
enabling stylecop on ColorPicker (#5336)
* Getting all warnings fixed

* fixed feedback, missed resize for some reason as well.

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-31 09:13:05 -07:00
martinchrzan
2fe84b7510
Fixed an issue of not being able to change settings for ColorPicker (#5351) 2020-07-31 16:10:08 +02:00
Andrey Nekrasov
46ef13dd0f
autoupdate: set app_id in time for download_update to use it (#5346) 2020-07-31 14:22:05 +03:00
Andrey Nekrasov
49b56d9b52
PowerToys interface: remove powertoys events and system_menu_helper functionality (#5323) 2020-07-31 14:06:13 +03:00
Clint Rutkas
7abb4072b5
getting stylecop added and online SvgThumbnailProviderUnitTests (#5335)
* getting stylecop added and online

* shifting out of csproj and into packages.config

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 17:36:39 -07:00
Clint Rutkas
d91fd0027a
stylecop online (#5341)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 17:31:41 -07:00
ryanbodrug-microsoft
8f17f7297d
Enabling static analysis on indexer plugin and fixing errors (#5220)
* Enabling code analysis, and treating warnings as errors

* Error CA1724 The type name Settings conflicts in whole or in part with the namespace name 'Microsoft.PowerToys.Settings'. Change either name to eliminate the conflict. Microsoft.Plugin.Indexer C:\repos\powertoys\src\modules\launcher\Plugins\Microsoft.Plugin.Indexer\Settings.cs 9 Active

* Removing keyword "Interface" from namespace to fix fxcop warnings

* Fixing static analysis warnings on ContextMenuLoader

* Fixing general exception warnings for static analysis

* Fixing public list variables, non static methods, and general exception warning

* Implementing IDisposable on OleDBSearch although in practice these objects were already being disposed.

Also Validated we were not using user input directly for sql strings.

* Removing VS generated comments from dispose methods as per PR feedback.

* Setting translated text to use current culture as per PR feedback.

* Explicity specifying 'internal' access modifier for Indexer 'Main' class, as per PR feedback

* Updating to FxCop 3.0.0
2020-07-30 16:39:47 -07:00
Clint Rutkas
aa8c31e79b
adding in global supressions (#5337)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 16:23:58 -07:00
Clint Rutkas
cfc768caa9
StyleCop rules enforced (#5339)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 16:23:20 -07:00
ryanbodrug-microsoft
c48bd9b840
User/ryanbod/fix unittests (#5191)
* Fixing PowerLauncherViewModelTest.cs.  These OpenConsole functionality was accidentlly removed in a merge conflict, which broke the build.  The build was fixed, but the unit tests didn't work.  034079b441 is the offending change.

* Color picker tests need to remove the ShellPage.DefaultSndMSGCallback on cleanup.

* Fixing casing that was updated in previous change.
2020-07-30 15:58:01 -07:00
Clint Rutkas
c09919055a
StyleCop for SvgThumbnailProvider (#5338)
* adding in global supression

* caught one more, stylecop was included vs linked

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 15:57:10 -07:00
Clint Rutkas
d35f1ea802
last nuget packages and fixed small errors (#5334)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 14:01:02 -07:00
dependabot[bot]
cfbf3cd4b3
Bump elliptic from 6.5.0 to 6.5.3 in /src/settings-web (#5302)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.0 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.0...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-30 12:36:53 -07:00
Clint Rutkas
a46103fc8c
Adjusting interop tests for 5295 (#5296)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 12:22:33 -07:00
Clint Rutkas
d032956124
adding in stylecop goodness (#5301)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 12:17:08 -07:00
Clint Rutkas
ff93b38d23
upgrading all .NET assemblies, #5303 took care of ones where they needed consolidating (#5304)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 12:16:32 -07:00
Clint Rutkas
5b02ee5169
updated to Microsoft.Windows.CppWinRT.2.0.200729.8 (#5306)
* updated to Microsoft.Windows.CppWinRT.2.0.200729.8

* actually adding in packages.config and updating

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 11:37:15 -07:00
Clint Rutkas
aa770689f5
pointing toward linked global (#5297)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-30 11:37:00 -07:00
Andrey Nekrasov
de67fff731
autoupdate: handle exceptions in download_update (#5324) 2020-07-30 18:32:50 +03:00
Anish Asrani
7799783c9a
Updated Administrator mode URL to new wiki page (#5309)
* Updated URL to wiki page

* Updated URL to aka.ms link

Co-authored-by: Anish Asrani <anasrani@microsoft.com>
2020-07-30 07:11:07 -07:00
Andrey Nekrasov
52e9d37b93
chore: move codeAnalysis folder to src (#5311) 2020-07-30 11:59:24 +03:00
martinchrzan
f541e7105e
Generating AssemblyInfo.cs for ColorPicker.exe, added resources and version for ColorPicker.dll (#5299) 2020-07-29 14:45:41 -07:00
Andrey Nekrasov
4060e29c63
runner: make sure that explorer is restarted (#5293) 2020-07-29 12:58:15 -07:00
Niels Laute
d913285523
[Settings] Fix for theming aware titles (#5245)
* Fix for theming aware titles

* Converter fix
2020-07-29 11:38:03 -07:00
ryanbodrug-microsoft
d98d1193fc
Removing hardcoded version numbers from c# telemetry events. (#5283)
* Removing hardcoded version numbers from c# telemetry events.

* Removing dependency on powertoysInterop for getting version string.

* Defensive checks around getting assembly version
2020-07-29 11:18:21 -07:00
Enrico Giordani
e23b406364
Update version to 0.20.0 (#5288) 2020-07-29 13:19:57 +02:00
martinchrzan
0b27fc39e6
Added telemetry for Color Picker module (#5259)
* Added telemetry for Color Picker module

* Closing color picker with Esc and added a telemetry for that

* Missed update of csproj

* updated installer to include telemetry.dll for color picker

* removed telemetry.dll it was alrady there

* after review changes
2020-07-29 09:01:04 +02:00
Niels Laute
8fb446ad47
[Settings] Embed images (#5236)
* Added local images

* Margin fix

* Update Product.wxs

Added images to installer
2020-07-28 15:02:09 -07:00
Andrey Nekrasov
47cb34d26b
chore: enable multiprocessor compilation (#5272) 2020-07-28 17:20:01 +03:00
Andrey Nekrasov
8354797406
CDPx: do not use span header (#5268) 2020-07-28 14:26:30 +03:00
Divyansh Srivastava
87ae1c6a9b
Improving UI performance (#5216)
* Added fast observable collection

* Updated to use 1 collection changed event per query

* Moved result updating to background thread

* Changed collapsed to hidden for virtualization

* Moved all token cancellations inside try catch

* Fixed freeze on deleting first letter

* nit fixes

* Moved update logic to plugin result loop

* Updated doc comment for AddResults function

* fix result clear on empty query
2020-07-27 18:13:47 -07:00
Niels Laute
ba7302a197
[Settings] Adding collapse button to settings navview (#5237)
* Adding collapse button to settings navview

* Custom panewidth
2020-07-27 09:57:28 -07:00
stefansjfw
d15b0a0285
[FancyZonesEditor] Don't load malformed custom layout and show appropriate message (#5248)
* Introduce const strings in LayoutModel.cs

* Don't load malformed custom layout and show apropriate message

* Add more checks

* Address PR comments

* Address PR comments
2020-07-27 18:56:26 +02:00
Andrey Nekrasov
3796a5ef97
Autoupdate: implement updating bootstrapper utility (#5204) 2020-07-27 19:53:29 +03:00
stefansjfw
61669a73d9
[FancyZonesEditor] Introduce const strings in LayoutModel.cs (#5196)
* Introduce const strings in LayoutModel.cs

* Address PR comments - Update FirePropertyChanged
2020-07-27 10:12:35 +02:00
martinchrzan
5a2385c66b
Set default shortcut for activating launcher, creating settings.json … (#5206)
* Set default shortcut for activating launcher, creating settings.json on a start if it does not exists

* After review fixes
2020-07-25 08:50:29 +02:00
Alekhya
d7721065dc
Add theme aware default icons to usage dictionary (#5223)
* Added theme aware default icons to usage dictionary

* they should not be removed while resizing
2020-07-24 18:23:33 -07:00
Alekhya
025f2507f4
Drive Detection Indexer warning refinement (#5221)
* show results always and conditionally show warning

* changed test logic to show warning when expected

* renamed unit test
2020-07-24 17:45:07 -07:00
Alekhya
563fb3ff5c
commenting out the test (#5224) 2020-07-24 17:43:48 -07:00
Clint Rutkas
9646ec5edd
fixed another set of warnings (#5219)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-24 15:46:29 -07:00
Alekhya
cc990a1181
Fix for handling exceptions thrown by dispatcher which were crashing PT Run (#5199)
* fix report window error icon

* fix for launching web page to create new issue

* Made icon theme aware

* removed exception that was added by mistake

* modified the issue reporting link to match that in the settings page

* added comment
2020-07-24 13:58:40 -07:00
Arjun Balgovind
c4ddb7d351
[PT Run] Resolve text alignment issues for RTL input languages (not for mixed strings) (#5170)
* Added logic to switch TextBox/TextBlock flow direction on language change

* Move event handler to separate method

* Moved code to function
2020-07-24 13:34:49 -07:00
Arjun Balgovind
ab0047a9b7
Added additional checks in version info methods (#5173) 2020-07-24 13:34:17 -07:00
Arjun Balgovind
39ec10cbba
Add telemetry event for measuring time taken to display PT Run (#5201)
* Added LauncherHotkeyEvent

* Split into cold state and warm state events
2020-07-24 12:38:16 -07:00
Niels Laute
65b6513207
[Settings] Multiple UX refinements (e.g. OOBE) (#5113)
* Updated FZ page with new resizing logic

* Multiple UX fixes. Added updated resizing logic to other pages

* Added ImageResizer file format example snippets to tooltip

* Added warning icon in hotkeysettingscontrol

* Fixed formatting

* Keys label can now be set

* Replaced custom titleblocks with converter

* Updated strings

* Added correct links to the images. Added PT description on General page as well.

* Colorpicker image updates

* Rounded corners

* Fix

* Added back in correct subtitles
2020-07-24 12:02:56 -07:00
Clint Rutkas
beb4494534
Adding back in key for FZ Json (#5210)
* Adding back in key for FZ Json

* defaulting key to string empty

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-24 11:35:03 -07:00
martinchrzan
983ff901f2
Prevent clicking through when selecting a color using color picker (#5203) 2020-07-24 18:44:46 +02:00
Ivan Stošić
5d66473a4f
[FancyZones] Remove m_workArea from ZoneWindow (#5185)
* Removed m_workArea from ZoneWindow

* Remove another unused variable
2020-07-24 11:17:39 +02:00
Arjun Balgovind
ff1e04b957
[Keyboard Manager] Added in Shortcut to Key and Key to Shortcut remapping (#5070)
* Added union class

* Added key to shortcut backend implementation

* Added tests

* Added tests for CapsLock/modifier workaround for key to shortcut

* Added correct JSON loading step

* Cleaned shortcut remap code to use helper function for modifier keys

* Removed RemapKey class

* Enable Key to Shortcut in UI along with Type Shortcut in Remap key window

* Fixed orphaning and unsuccessful remap dialog

* Fixed column width

* Renamed second type key button

* Fixed Type Shortcut issues

* Fixed shortcut to key backend logic and manually tested most scenarios

* Added s2k in UI, manually verified its working

* Added one more k2s test

* Added tests for s2k

* Added tests for Caps Lock workaround in shortcut remaps

* Fixed formatting

* Fixed formatting

* Removed safety code since it can cause issues with code generated key up events

* Added test for key up scenario

* Tweaked warning text

* Tweaked text

* Tweaked text to fit in two lines

* telemetry additions
2020-07-23 16:43:49 -07:00
ryanbodrug-microsoft
53c4c6cbb8
User/ryanbod/folders enable staticanalysis (#5137)
* Enabling static analysis and settings treat warnings as errors

* Fixing/Supressing static analysis warnings in ContextmenuLoader and removing unused code

* Fixing static analysis errors in Main.cs

* Fixing static analysis warnings for folderpluginSettings.xaml.cs
2020-07-23 16:05:36 -07:00
Arjun Balgovind
47736603af
Fix saving to JSON in PT Settings (#5197)
* Added argument to fix saving to JSON in PT Settings

* Added argument to fix saving to JSON in PT Settings
2020-07-23 16:04:04 -07:00
Clint Rutkas
b6e5a5e655
Color picker tweaks (#5194)
* Adjustments on default keystroke and removing key string whihc really didn't do anything

* moving color picker into alphabetical order

* removing removed property

* adjusting comment based on feedback from martin

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-23 15:53:12 -07:00
Clint Rutkas
84018f5b61
Fixing more warnings (#5189)
* classes need to be in new files

* adding in new lines

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-23 14:56:21 -07:00
Clint Rutkas
592d3afe6d
shifting naming (#5190)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-23 13:08:20 -07:00
Clint Rutkas
2bd2ec7a2e
Renaming properties to C# styling to fix warnings (#5166)
* Renaming properties

* Update PowerLauncherProperties.cs

trying to kick CI

* PowerLauncher is way for naming.

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-23 11:01:49 -07:00
Alekhya
f25d2b3a86
removed incrementalClean for launcher (#5172) 2020-07-23 10:34:32 -07:00
ColdTune
c379cca2e5
[FancyZones Editor] Prevent new zones from being unreachable (#4457)
* stack new zones

* Changed startup location of window editor

* Zones start in upper left

* Changed Focus Zone Initialization

* Zones.Add

* Reset zone position when it goes off screen
2020-07-23 10:53:19 +02:00
Clint Rutkas
efa04b4cd8
Adding in headers (#5163)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-22 16:55:04 -07:00
Mehmet Murat Akburak
35a214603f
[PowerRename] Clear capturing groups with more than 1 digit (#5116)
User has actually signed CLA, see #4722

* Clear capturing groups with more than 1 digit

* Fix issue in regex pattern

* Add unittest

* Fix regex patterns

* Edit unittest

* Fix regex pattern, add some tests
2020-07-22 14:12:46 -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
Clint Rutkas
14247fa75a
Dev/crutkas/fixing warnings (#5161)
* new lines & braces

* Tabs /space auto fix

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-22 13:27:17 -07:00
Alekhya
6efec9d280
Minor text refinement in drive detection (#5132)
* minor text refinement

* removed the word Detected

* Revert "Merge branch 'tweakUIText_DriveDetectionWarning' of https://github.com/alekhyareddy28/PowerToys into tweakUIText_DriveDetectionWarning"

This reverts commit b193905d00, reversing
changes made to 0d0db138f8.

* Revert "Revert "Merge branch 'tweakUIText_DriveDetectionWarning' of https://github.com/alekhyareddy28/PowerToys into tweakUIText_DriveDetectionWarning""

This reverts commit b653814eec.

Co-authored-by: Clint Rutkas <clint@rutkas.com>
2020-07-22 13:10:53 -07:00
Arjun Balgovind
063253d5e7
Updated menu key name, and added missing IME key codes (#5110) 2020-07-22 12:57:13 -07:00
Divyansh Srivastava
f773604dec
Added functionality for left/right key navigation (#5067)
* Added functionality for left/right key navigation

* Update Behviour of left/right navigation

* Code cleanup

* Null check for results VM

* Added tests for results view model

* Update test namings
2020-07-22 12:48:42 -07:00
ryanbodrug-microsoft
25d43354b3
User/ryanbod/enable codeanalysis for calculatorplugin (#5130)
* Turning on static analysis and removing warning for NoMages.

* Fixing static analysis errors in NumberTranslator.cs

* Fix: Severity Code Description Project File Line Suppression State
Error CA1810 Initialize all static fields in 'Main' when those fields are declared and remove the explicit static constructor Microsoft.Plugin.Calculator C:\Repos\PowerToys\src\modules\launcher\Plugins\Microsoft.Plugin.Calculator\Main.cs 30 Active

* Throwing exception if arguments are null to fix static analysis errors.

* Ignoring CA1031

* Logging exceptions for Calculator queries.
2020-07-22 12:42:30 -07:00
Alekhya
b59ec5e78b
Fix for internet shortcut app not showing up on installation (#5131)
* added changed for internet shortcut app

* Added AppChanged event for url files

* Tests added

* refactoring
2020-07-22 10:58:01 -07:00
Clint Rutkas
1a210ae684
updating test related stuff (#5133)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-22 09:46:20 -07:00
Seraphima Zykova
92c666692d
[FancyZones] Dragging a window across monitors transparency fix (#5102) 2020-07-22 19:00:03 +03:00
stefansjfw
0027a0af40
[FancyZones] Split and reorganize FancyZonesData and JSON Helpers (#5028)
* Rename JsonHelpers to FancyZonesData
Add new JsonHelpers.[h|cpp] files

* Introduce FancyZonesDataTypes

* Move first part of JSON related stuff to JsonHelpers files

* Small refactor

* Move all json related stuff to JsonHelpers

* Minor refactoring

* Fix formating

* Remove GetPersistFancyZonesJSONPath() and GetPersistAppZoneHistoryFilePath()
Remove GetActiveZoneSetTmpPath(), GetDeletedCustomZoneSetsTmpPath and GetAppliedZoneSetTmpPath()
Simplify tests

* Address PR comment - Rename FancyZonesDataNS to FancyZonesData

* Address PR comment - Rename local var

* Delete obsolete stuff

* Remove double and uneeded includes
Introduce const non-localizable string variables
Address all othe PR comments

* Add comments to explain hardcoded values

* Remove FancyZonesData namespace

* Introduce const non-localizable string variables in FancyZonesDataTypes

* Add comments to explain FancyZonesData maps

Co-authored-by: Clint Rutkas <clint@rutkas.com>
2020-07-22 10:39:13 +02:00
Clint Rutkas
4f45cf1386
Upgrading CppWinRT and adding in new packages.config (#5134)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-22 00:35:39 -07:00
Clint Rutkas
9dfa685fb1
update WinUI and Xaml Islands (#5135)
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-21 17:41:07 -07:00
Chris Davis
40d2ef4f0a
Add SVG Thumbnail Provider for Windows Explorer (#5048)
* Add SVG Thumbnail Provider

* Some cleanup

* Small settings changes

* Update PowerToys.sln

Remove Any CPU entries

* Fix project configuration issues

* Fix bad merge

* Update output path for SVG thumbnail provider

* Sync with latest
2020-07-21 16:27:12 -07:00
Clint Rutkas
398991f3c1
Adjusting settings to leverage base class (#5127)
* renaming / deleting file

* adding in base class

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-21 14:06:39 -07:00
Arjun Balgovind
d01b93ae5f
Move OS detection to common and PowerToysInterop (#5120)
* Remove os-detection project

* Removed os-detection project from sln

* Added os-detection to PowerToysInterop

* Removed references to os-detection and added PowerToysInterop.dll to the ImageResizer folder
2020-07-21 12:01:59 -07:00
Alekhya
b31d9761fa
Fix for the issue where PT Run was preventing UWP apps from building in VS (#5109)
* We should not deny other processes access to this item

* added a catch block for argument exception

* using memory stream instead of URI

* removed denyNone as it is the default config
2020-07-21 10:26:37 -07:00
Alekhya
96cd135f82
Detect if all Drives are indexed and show a warning if they aren't (#5015)
* opens new settings search options

* Catching file not found exception

* removed unnecessary header files

* Added display strings and cleaned up code

* reduced the number of max results to 30

* added log statement for exception

* Added drive detection to settings ui but still doesn't reflect on toggling it

* added getter setter for DriveDetectionWarning

* Got UI and backend to work as expected

* Reading value from registry working as expected

* Added test for settings

* Added tests for drive detection

* rename drive detection

* Localized indexer string

* formatting

* resolving merge conflict

* Added theme aware warning icon

* changed text for the warning

* Added the warning images to the installer
2020-07-20 17:50:42 -07:00
Divyansh Srivastava
c85cd4ac24
Migrate files from Wox to PowerLauncher (#5014)
* Moved all files from Wox to Powerlauncher

* Removed Wox project

* Changed namespace for imported files

* Resolved errors for VM

* Added build dependency order

* Fixed errors in helper class

* Remove Wox files

* Fixed errors in SingleInstance class

* Fixed wox.tests

* Fixed MSI

* Removed obsolete methods from PublicAPI

* nit fixes

* Throw null exception

* Fix merge conflict
2020-07-20 11:22:03 -07:00
vldmr11080
29e2c982d4
Handle desktop switch and open on active monitor functionality (#5065) 2020-07-20 11:55:19 +02:00
martinchrzan
bc301f269a
New color picker module - integrated from github.com/martinchrzan/Col… (#4778)
* New color picker module - integrated from github.com/martinchrzan/ColorPicker

* Trying to fix build in github

* Replaced icon in the settings to use font icon instead of path icon

* Closing ColorPicker.exe when PowerToys process closed, added color picker project into runner dependencies, restoring cursors on exit, added ManagedCommon as a dependency into installer

* User/ryanbod/fix colorpicker release (#5046)

* Changing configuration to x64 instead of AnyCPU.   The previous configuration was preventing the ManagedCommon binary from being loaded in Release.

* Updating MSI Installer with new icons (#4998)

* Adding missed dll into installer

* Fixed potential exception

* Creating settings.json on the first start when there are none, fixed default keyboard shortcut

* Added ColorPicker.exe.config into installer

* Start filewatcher after default settings file is created

* Fixing build

Co-authored-by: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com>
2020-07-18 21:27:36 +02:00
Alekhya
d09253e532
Functionality to detect Win32 apps which are installed, deleted or renamed while PowerToys is running (#4960)
* Added file system wrapper and interface

* added win32program repository which would load store app and also handle new apps being added/deleted

* Added event handlers to win32 program repo

* added paths to monitor and setting FSWs for each location

* Events firing as expected

* filter extensions added, events fire as expected

* override gethashcode so that duplicates don't show up. OnCreated and OnDeleted events trigger as expected

* implemented setter for filters in FileSystemWatcher

* Rename adds item but does not seem to delete the previous app

* catching an exception when a duplicate item is inserted

* Removed notify filter for directory because we only need to monitor files

* Added exe programs to be indexed in the desktop and startmenu

* created a new class to init FileSystemHelpers instead of main

* Added fix for shortcut applications to work as expected while renaming and deleting them

* Added wrappers for file system operations

* Added some tests

* Added all tests for appref-ms and added a condition to search in sub directories

* Added tests for Exe applications

* Added lnk app tests

* Added tests for shortcut applications

* removed unnecessary wrappers

* override Equals for win32

* removed debug statements

* Fixed exe issue

* Fixed internet shortcut exception

* fixed renaming shortcut apps

* Added a retry block for ReadAllLines

* capitalized method name - RetrieveTargetPath

* made naming consistent, helper variables start with underscore

* Added the exception condition back

* renamed Win32ProgramRepositoryHelper to Win32ProgramFileSystemWatchers

* made win32Program repository variable static

* changed list to ilist

* disposed file system watchers

* make retrieveTargetPath upper case in tests
2020-07-17 22:32:21 -07:00
Nkateko
034079b441
fixed build failure (#5071)
Co-authored-by: Lavius Motileng <laviusntk>
2020-07-17 16:13:13 -07:00
Divyansh Srivastava
45bab578c4
Fix Focus issue on clicking list view (#5045)
* Focus working after right click

* Removed unnecessary focussable setter
2020-07-17 12:29:36 -07:00
Nkateko
e8de6f0ace
[Settings]Change text color for disabled controls (#4837)
* change text color for disabled controls

* added custom textblock controls and updated FZ Xaml

* updated Image Resizer Page

* updated Shotcut Guid

* updated KBM Settings

* reverted unrealted changes

* reverted unrealted changes

* reverted unrealted changes

* reverted unrealted changes

* updated power launcher

* reverted unrealted changes

* Image Resizer: renoved spaces in file format hint text

* Image Resizer: restored file format header

Co-authored-by: Lavius Motileng <laviusntk>
2020-07-17 11:01:46 -07:00
Andrey Nekrasov
13c2ce3f31
autoupdate: wait for the .exe updater to exit before restarting PowerToys (#5004) 2020-07-17 11:51:20 +03:00
Divyansh Srivastava
3bf9a3833a
Fix for result on empty query (#4927)
* Updated last query before clearing results

* Cancel last query expicitly
2020-07-16 16:23:01 -07:00
Enrico Giordani
c035bf2d37
Update version to 0.19.3 (#5033) 2020-07-16 17:15:05 +02: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
dependabot[bot]
ebe70a52d1
Bump lodash from 4.17.15 to 4.17.19 in /src/settings-web (#5024)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-16 12:19:58 +02:00
Seraphima Zykova
2282e72d03
[FZEditor] Grid layout resizers fixes (#4095)
* Swap resizers on drag
* Update resizers on split if existing split is used
* Fix accuracy error
* Zone ids are ordered
* Cancel merge on other actions
* Split if one of the snapped splitters is dragged
2020-07-16 12:54:15 +03:00
C. Augusto Proiete
5a590512bd
Rename MarkDown -> Markdown to resolve differences for non-Windows machines (#3758) 2020-07-15 10:23:59 -07:00
ryanbodrug-microsoft
6131181ea4
Updating MSI Installer with new icons (#4998) 2020-07-15 05:35:08 -07:00
Roy
78946c11ea
[PowerToys Run] Implemented Setting to Clear Search Query when PowerToys Run is Launched (#4995)
* Implemented Clear Input On Launch

* Move logic to seperate command on viewmodel

* Added Settings Sync
Moved logic from OnDeactivated to OnActivated

* Complete after testing

Co-authored-by: Roy <royvou@hotmailcom>
2020-07-14 17:54:21 -07:00
Alekhya
f59abe23c3
Fix for File Not Found exception while indexing invalid Package App (#4971)
* Catching file not found exception

* removed unnecessary header files

* Added a string.empty check for installed location

* reusing package wrapper instead of package installing event args
2020-07-14 11:44:50 -07:00
Divyansh Srivastava
74412766fa
Remove redundant code from Wox project (#4878)
* Removed unnecessary files from wox

Removed themes, images and unused xaml files

* Removed unused functions from settings view model

* Removed update manager

* Cleaned helper class

* Delete SingletonWindowOpener.cs

* nit fixes
2020-07-14 09:05:21 -07:00
Ivan Stošić
39b0401c55
Allow selecting multiple adjacent zones even when they slightly overlap (#4974) 2020-07-14 14:51:24 +02:00
Niels Laute
5f0e8d3d8e
[PowerToys Run] Updated (plugin) icons with MDL2 (#4149)
* Updated (plugin) icons with MDL2

* Image wasn't updating

* Based on feedback, updated app icon and windowwalker icon

* Updated app icon

* Updated Window Walker icon

* Change build action / Copy to output directory to None and Do Not Copy - like it was originally

* Fix

* Fix

* Resized images

* Added theme awereness based on somil55s PR

* Added theming to Shell and WindowWalker

* Revert "Added theming to Shell and WindowWalker"

This reverts commit f492c4efdb.

* Revert "Added theme awereness based on somil55s PR"

This reverts commit 8edd3226be.

* Typo fix

* Added new theming support for the new Calculator, Shell and WindowWalker icons

* Added Unit test reference back in
2020-07-13 22:59:19 -07:00
Arjun Balgovind
6a9badd31b
[Keyboard Manager] Cleanup header file references to improve incremental build time (#4880)
* Remove WinUI include in KeyboardManagerState.h

* Changed include steps

* Clean up headers in KeyboardManagerUI except XamlBridge.h

* Cleaned up headers in KeyboardManager common and test

* Cleaned up headers in KeyboardManager project

* Removed headers from XamlBridge

* Removed some headers from kbm common pch

* Added MP flag to reduce build time

* Added missing include
2020-07-13 11:49:09 -07:00
Arjun Balgovind
7db5d6a307
[Keyboard Manager] Fixed app-specific shortcut causing app to lose focus scenario (#4902)
* Fixed focus issue and added tests

* Changed key names

* Use constant instead of hardcoded empty string
2020-07-10 17:53:41 -07:00
Arjun Balgovind
bb2049411b
[Keyboard Manager] Add JSON support for App Specific shortcuts (#4840)
* Enable app specific shortcut remapping

* Fixed lowercase function call

* Add test file

* Moved GetForegroundProcess to II and added tests

* Fixed runtime error while testing due to heap allocation across dll boundary

* Renamed function

* Changed shortcutBuffer type

* Linked App specific UI to backend

* Added shortcut validation logic on TextBox LostFocus handler

* Moved Validate function and changed default text

* Changed to case insensitive warning check

* Changed to case insensitive warning check at OnClickAccept

* Fixed alignment and spacing issues

* Added app-specific JSON support in backend

* Updated landing page

* Make listview horizontally scrollable

* Added tests

* Consider all case variants of All Apps in textbox to be global shortcuts
2020-07-10 17:07:28 -07:00
Divyansh Srivastava
653ae777d5
Packaged apps test (#4921)
* Added wrapper for PackageManager and Package class

* Added tests for package in development and framework mode

* Renamed UWP test file

* Improved readability of UWP tests
2020-07-10 13:43:02 -07:00
Niels Laute
ec803d63c8
[Run] Updated tooltip styling and fixed casing (#4877)
* Added custom tooltip style (with theming support) that represents the UWP tooltip style.

* Removed unnecessary space in text

* Fixed run as admin casing

* Fixed casing for Indexer plugin
2020-07-10 12:06:57 -07:00
Ivan Stošić
412d80efe3
[FancyZones] Hold Ctrl to select any number of zones (#4850)
* Started work

* Did something, not yet sure that it works

* Sort of works

* Cleari highlighted zones when using Ctrl after leaving a monitor

* Remove unnecessary line

* Enhanced UX. Maybe refactor?

* Changed the logic behind zone selection when dragging

* Various fixups
2020-07-10 11:06:01 +02:00
ryanbodrug-microsoft
b1d662a5b1
Improving performance of Adding and Removing Packaged Apps (#4521) (#4900)
* Merging in Theme changes and moving win32Tests to Microsoft.Plugin.Program.UnitTests

* Fixing message format for exception

* Changing test structure.  Need to add unit tests.

* Updating packagerepository comment based on pr feedback

* Fixing potential race condition in ListRepository.  Now internally implemented as a concurrent dictionary.

* Removing unecessary implementation of IRepository interface as this is implemented by the base class.

* Restoring checks for invalid uwp apps based on PR feedback. This was accidentally removed when moving the initialize outside the constructor.

* Fixing comments

* Adding newline to end of file for IProgramRepository
2020-07-09 13:14:53 -07:00
ryanbodrug-microsoft
12d9d59d85
Revert "Improving performance of Adding and Removing Packaged Apps" (#4898)
* Revert "Adding newline to end of file for IProgramRepository"

This reverts commit d55cac80bf.

* Revert "Fixing comments"

This reverts commit a1ecdc9bfa.

* Revert "Restoring checks for invalid uwp apps based on PR feedback. This was accidentally removed when moving the initialize outside the constructor."

This reverts commit 0e8c1cb0fd.

* Revert "Removing unecessary implementation of IRepository interface as this is implemented by the base class."

This reverts commit 1c724280f5.

* Revert "Fixing potential race condition in ListRepository.  Now internally implemented as a concurrent dictionary."

This reverts commit 9ff8246a9d.

* Revert "Updating packagerepository comment based on pr feedback"

This reverts commit 2c45956030.

* Revert "Changing test structure.  Need to add unit tests."

This reverts commit 1c267a55d5.

* Revert "Fixing message format for exception"

This reverts commit f60bdc3dd4.

* Revert "Merging in Theme changes and moving win32Tests to Microsoft.Plugin.Program.UnitTests"

This reverts commit 030dfc2370.
2020-07-09 12:10:48 -07:00
Enrico Giordani
b13e719ab3
Update version to 0.19.2 (#4896) 2020-07-09 18:17:30 +02:00
Arjun Balgovind
451aea87aa
Added dummy key event to prevent Start Menu from popping up (#4874) 2020-07-09 08:14:47 -07:00
ryanbodrug-microsoft
d55cac80bf Adding newline to end of file for IProgramRepository 2020-07-09 07:02:19 -07:00
ryanbodrug-microsoft
a1ecdc9bfa Fixing comments 2020-07-09 07:02:19 -07:00
ryanbodrug-microsoft
0e8c1cb0fd Restoring checks for invalid uwp apps based on PR feedback. This was accidentally removed when moving the initialize outside the constructor. 2020-07-09 07:02:19 -07:00
ryanbodrug-microsoft
1c724280f5 Removing unecessary implementation of IRepository interface as this is implemented by the base class. 2020-07-09 07:02:19 -07:00
ryanbodrug-microsoft
9ff8246a9d Fixing potential race condition in ListRepository. Now internally implemented as a concurrent dictionary. 2020-07-09 07:02:19 -07:00
ryanbodrug-microsoft
2c45956030 Updating packagerepository comment based on pr feedback 2020-07-09 07:02:19 -07:00
ryanbodrug-microsoft
1c267a55d5 Changing test structure. Need to add unit tests. 2020-07-09 07:02:19 -07:00
ryanbodrug-microsoft
f60bdc3dd4 Fixing message format for exception 2020-07-09 07:02:19 -07:00
ryanbodrug-microsoft
030dfc2370 Merging in Theme changes and moving win32Tests to Microsoft.Plugin.Program.UnitTests 2020-07-09 07:02:19 -07:00
Arjun Balgovind
4634085402
[Keyboard Manager] Add app-specific shortcuts to Remap shortcuts UI (#4804)
* Enable app specific shortcut remapping

* Fixed lowercase function call

* Add test file

* Moved GetForegroundProcess to II and added tests

* Fixed runtime error while testing due to heap allocation across dll boundary

* Renamed function

* Changed shortcutBuffer type

* Linked App specific UI to backend

* Added shortcut validation logic on TextBox LostFocus handler

* Moved Validate function and changed default text

* Changed to case insensitive warning check

* Changed to case insensitive warning check at OnClickAccept

* Fixed alignment and spacing issues
2020-07-08 16:24:30 -07:00
Alekhya
411140c3ea
Add run as admin context menu item for application results returned by the Indexer Plugin (#4807)
* Added run as admin context menu item to apps returned by indexer plugin

* Added a test and localized strings

* localize strings

* Add more tests for folder and other file types

* fixed run as admin -> run as administrator

* resolved merge conflict

* refactored tests

* moved common code to helper and added logs

* moved start process to the helper class

* added more info in a comment

* fixed count in tests as open in console was added

* removed additional code that was added while fixing merge conflicts
2020-07-08 13:05:57 -07:00
Divyansh Srivastava
638cd1dd48
[Run] Open in console functionality (#4739)
* Added open in console for indexer

* Added open in console fpr indexer and folder plugin

* Added open in console to program plugin

* Added string localization for program plugin

* Added test for win32 program

* Added test for win32 programs

* Added test for indexer plugin

* Localization for context menu title

* Added tests for folder plugin

* Added tests for indexer plugin

* Code cleanup

* Improved logging and nit fixes

* Updated tooltip for open in console

* Updates tests

* Removed subtitle property from contextmenuresult class

* Improved logging for context menu loaders
2020-07-08 09:56:26 -07:00
Yevhenii Holovachov
e3e6b23b7c
fixed unit tests (#4865) 2020-07-08 18:00:44 +03:00
vldmr11080
ac5a3e7a65
[FancyZones] Update app zone history on window removal (#4696)
* Update app zone history on every new window assignment to zone

* Compare window positions with already placed windows

* Remove window property only after processing window removal from zone
2020-07-08 16:59:36 +02:00
stefansjfw
106c316442
[FancyZones] Don't create new custom layout when applying Focus layout (#4755)
* Only persist data when applying existing layout if it is scaled

* Fix applying edited Focus layout

* Fix different Focus zone sizes in editor and engine

* Fix codestyle
2020-07-08 15:34:19 +02:00
vldmr11080
db229cf1bf
[FancyZones] Open window on active monitor (#4361)
* Initial design for opening window on active monitor

* Perform entire handling in DPI unaware thread

* Codestyle improvement

* Improve resizing mechanism and optimise code a bit

* Remove unneeded code, make simple helper functions inline

* Make this feature configurable

* Code optimization, improve positioning for some applications

* Retry positioning for certain applications

* Improve readability

* Address PR comments: Minor code style improvements

* Remove retries in custom positioning

* Position new toggle in settings menu
2020-07-08 10:37:42 +02:00
Alekhya
a314106b7e
Set the name(not the description) as the Title of the Result (#4745)
* Added tests to verify that the name is always set as the title and never the description

* removed AppType as an argument

* refactored code

* added comments

* localized strings

* removed empty constructor

* made setsubtitle private

* removed the mock Win32 class used for unit testing

* removed the UWP tests
2020-07-07 15:00:17 -07:00
Divyansh Srivastava
8d72bc0ea4
Tooltip for indexer and program plugin (#4589)
* Fix multiline title issue

* Added code to display tooltip for program and indexer plugin

* Added tests for Result class

* Theme based color for tooltip

* Added colors for tooltip

* Added string tags to tooltip

* Add initial show delay

* Seperated textbox for title and path
2020-07-07 13:02:39 -07:00
Arjun Balgovind
1533c9315f
[Keyboard Manager] Enable App-specific shortcuts in the KBM backend (#4628)
* Enable app specific shortcut remapping

* Fixed lowercase function call

* Add test file

* Moved GetForegroundProcess to II and added tests

* Fixed runtime error while testing due to heap allocation across dll boundary

* Renamed function

* Remove unused code

* Changed process checking step to include substrings

* Changed back to exact match included match without file extension
2020-07-06 16:45:53 -07:00
stefansjfw
70405045d7
[FancyZones] Remove Editor tmp files paths cmd args and make Editor 'debugable' easier (#4279)
* Remove Editor cmd args - tmp files
Add 'Debug mode' startup for Editor

* Remove fixed device info string

* Move if file exist check

* Add enum to improve readability

* Introduce ParseDeviceMode enum

* Organize strings

* Move title to localizable strings
2020-07-06 17:40:25 +02:00
vldmr11080
3d623506a8
[FancyZones] Invalidate cached work areas when display resolution or taskbar position changes (#4800)
* Invalidate cached work areas when display resolution or taskbar position changes

* Update comments in code
2020-07-06 17:34:28 +02:00
stefansjfw
11df74c292
Fix different grid layout shown by editor than the engine (#4758) 2020-07-06 17:04:40 +02:00
Nkateko
a935d69408
added null value handle for image resizer size input (#4721)
* addle null value handle for image resizer size input

* check for negative withd and height

* check for negative withd and height

* Update ImageSize.cs

Co-authored-by: Lavius Motileng <laviusntk>
2020-07-03 15:40:53 -07:00
Arjun
cffe0196e2 Added unit tests 2020-07-03 11:08:21 -07:00
Arjun
ac2a9deb75 Changed flags for newly pressed key after invoking shortcut 2020-07-03 11:08:21 -07:00