Commit graph

225 commits

Author SHA1 Message Date
Andrey Nekrasov 212ea2de30
common: refactor common library pt2 (#8588)
- remove common lib
- split settings, remove common-md
- move ipc interop/kb_layout to interop
- rename core -> settings, settings -> old_settings
- os-detect header-only; interop -> PowerToysInterop
- split notifications, move single-use headers where they're used
- winstore lib
- rename com utils
- rename Updating and Telemetry projects
- rename core -> settings-ui and remove examples folder
- rename settings-ui folder + consisent common/version include
2020-12-15 15:16:09 +03:00
Andrey Nekrasov 64a864a332
logging: support msvc debug window output (#8478) 2020-12-14 16:10:29 +03:00
Andrey Nekrasov 5fa4ee4942
Cpp build: factor out common project props & prepare for common split (#8509)
* make common include paths format consistent
* build: introduce common Cpp.Build.props
2020-12-14 15:20:45 +03:00
Andrey Nekrasov 84932eb9da
updating: add support for prereleases (#8296) 2020-12-10 19:05:43 +03:00
Seraphima Zykova 8a7824924a
[KBM] Open Remap Shortcuts/Remap Keyboard window on the same monitor as Settings. (#8325) 2020-12-10 18:28:44 +03:00
Eriawan Kusumawardhono 04586c02de
migrate Microsoft.Interop.Tests to target .NET Core 3.1 (#8411)
* migrate Microsoft.Interop.Tests to target .NET Core 3.1

* put the stylecop nuget and stylecop.json

* refactor Microsoft.Interop.Tests.csproj to have x64 platform target

* Update build-powertoys-steps.yml

Getting interop tests actually on CI

Co-authored-by: Clint Rutkas <clint@rutkas.com>
2020-12-10 08:11:14 +01:00
Mykhailo Pylyp f0553c370a
Fix runner warnings (#8211) 2020-11-30 16:16:49 +02:00
Andrey Nekrasov 06984ff317
CI: disable multiple msbuild instances (#8253)
* CI: disable multiple msbuild instances

* make MultiProcessorCompilation option consistent

* KBM: increase compiler limit again
2020-11-27 14:18:23 +03:00
Andrey Nekrasov 9735459552
bootstrapper: use WinAPI progress bar window instead of toast notific… (#8210)
* bootstrapper: use WinAPI progress bar window instead of toast notifications

* remove obsolete msi action
2020-11-27 00:31:00 +03:00
Mykhailo Pylyp eb264537f3
added logs to fancy zones (#8190) 2020-11-25 11:54:10 +02:00
Mykhailo Pylyp 65f8966247
shortcut guide logs (#8191) 2020-11-24 20:36:04 +02:00
yuyoyuppe 289532d7c8 updating: show the reason why the update couldn't be completed
- include nonstd::expected library for modern error-handling
- add localized strings
- refactor updating.cpp
2020-11-23 13:43:23 +03:00
yuyoyuppe eb1712808a FZ: fix keyboard layout mapping for dead characters 2020-11-20 13:45:46 +03:00
yuyoyuppe 9c5f142786 updating: split installer-related and github-related APIs, fix compilation error with latest VS 2020-11-20 12:32:43 +03:00
Mykhailo Pylyp 53bbd08fd3
Adjustments for runner process logging (#8112) 2020-11-18 20:25:20 +02:00
Mykhailo Pylyp 613d1fdf2a
Runner logging (#8068) 2020-11-18 12:15:14 +02:00
Andrey Nekrasov c1b1fe6371
Fix compilation errors for VS 16.8.1 (#8024)
* fix compilation issues for VS 16.8.* release

* - VS 16.8 changed its template instantiation model, so now the compiler checks the syntax used in template even when it's not instantiated. we were relying on that behavior to declare the list of required localized strings from a shared header => replacing that template with a macro.

* - fix 3 C++ `const auto&` bugs the new compiler was able to uncover

* - enabled /Zc:twoPhase- for bootstrapper and PowerToysSetupCustomActions to workaround 10.0.17134.0 headers' issue.

- PowerToysSetupCustomActions.vcxproj now uses 10.0.17134.0 instead of "latest" SDK

* - PowerToysSetupCustomActions project leverages `goto` operator's power extensively, and the new compiler was able to uncover new uninitialized variables behavior, restructured declarations and changed `NULL`s to `nullptr`s.

* - Fix unit FZ unit test compiler error

* - format FZS unit test source file

* fixup fz tests

* use /Zc:twoPhase- for common-md as well
2020-11-13 15:57:01 +03:00
Clint Rutkas 4d92a7e250
Merge pull request #7815 from pi1024e/patch-1
Remove unneeded variable for GetLastError();
2020-11-06 09:00:36 -08:00
Enrico Giordani 50a8884c32
[common, shortcutguide] move d2d files from common to scg (#7844)
Also remove d2d classes from common documentation
2020-11-05 10:38:46 +01:00
pi1024e 9c1ed88e5f
Remove unneeded variable for GetLastError();
No other usage of GetLastError has the result assigned to a variable first in this code, so it is better if we make check_user_is_admin the same in that regard.
2020-11-03 13:39:29 -05:00
yuyoyuppe f33b3c771a common project localization: move out all updating strings
- finish localizing boostrapper/runner/action_runner
2020-11-02 12:03:32 +03:00
Davide Giacometti 146e7866a6
[PT Run] Option for override theme (#7355)
* option for override PT Run theme

* fix startup theme detection and moved strings in resources

* xaml fixed

* fix title spacing

* launcher theme fix

moved theme enum
removed settings direct access

* missing files

* theme manager dispose removed

Co-authored-by: Clint Rutkas <clint@rutkas.com>
2020-10-23 15:05:07 -07:00
yuyoyuppe ec18e31ff1 settings: use actionable toast notifications for file explorer modules warning 2020-10-22 18:24:54 +03:00
yuyoyuppe 5e772340bc updating: remove previous progress toasts
toast notifications:
- add method for removing existing toasts
- add method for updating existing toast contents/title
- refactoring
2020-10-22 16:36:20 +03:00
yuyoyuppe e05146acf9 update Microsoft.Windows.ImplementationLibrary nuget package 2020-10-21 12:31:22 +03:00
yuyoyuppe 7c07bc2717 interop: fix possible crash in keyboardhook
also treat warnings as errors
2020-10-20 17:52:21 +03:00
yuyoyuppe 83872046fa autoupdating: ignore local builds 2020-10-20 17:46:50 +03:00
Divyansh Srivastava 280d1907d8
Non localized module name (#7170)
* Added get_key to powertoysmodule interface

* Replace get_name with get_key

* Implement get_key function in modules

* Make key global constant in each module

* Update settings v1 to use key to load and save files

* Fixed fancyzones and preview pane unit tests

* Removed setings unit test as the case is not covered anymore

* Add constant files for modules and use it to reference module key

* Add constant string files to colorpicker, launcher and shortcut guide

* correct sunction signature in settings helper

* Fix powerpreview merge conflicts

* nit fix with include statement location

* add check for fields in from_json_string

* Updated preview pane tests with correct from_json_string signature

* Correct Image resizer naming

* Roll back changes for adding check for property and version

* Fix image resizer not working
2020-10-19 16:07:02 -07:00
Mykhailo Pylyp 7e0574cba2
Get rid of indexes in dropdowns (#7278) 2020-10-19 12:27:47 +03: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
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
Mykhailo Pylyp 3f25d7ccc8
Keyboard disable (#6874)
Added disable key/shortcut functionality
2020-10-02 15:36:36 +03: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
yuyoyuppe 2bc3480396 common: fix trim functions for wchar_t 2020-09-18 13:33:02 +03: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
Clint Rutkas d409a71000
Getting FxCop online (#6668) 2020-09-16 12:26:58 -07:00
Clint Rutkas b0f0940534
marking all warnings (#6642) 2020-09-16 12:23:50 -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
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
Seraphima Zykova 570065175c
[Settings] Temporary string showing the latest available version (#6254) 2020-09-04 11:56:52 +03:00
Enrico Giordani 64ee0015d1
[chore] fix line endings (#6307) 2020-09-03 11:44:46 +02:00
Seraphima Zykova ce43b10b5b
[FancyZones] HEX to RGB util (#6275) 2020-09-02 18:34:17 +03: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
stefansjfw 48b6654ad2
Introduce ZoneWindowDrawing files and move stuff to better place (#6142) 2020-08-25 18:55:29 +02: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
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
Clint Rutkas 83e8799610
init checkin (#6100) 2020-08-21 12:40:31 -07:00