Commit Graph

1458 Commits

Author SHA1 Message Date
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