Commit Graph

162 Commits

Author SHA1 Message Date
Stefan Markovic
133aa85f2b
[General]Add an option for telemetry opt-in and visualization(#34078)
* Data diagnostics opt-in

* [c++] Drop DROP_PII flag

* Bump telemtry package to 2.0.2

* Drop DropPii from custom actions

* Cleanup

* Do not start manually C# EtwTrace. FZ engine exit event.

* ImageResizer, PowerRename, FileLocksmith prev handlers

* Revert C# handlers exe logging

* Revert "Revert C# handlers exe logging"

This reverts commit 4c75a3953b.

* Do not recreate EtwTrace

* consume package

* xaml formatting

* Fix deps.json audit

* Update telem package paths

* Address PR comments

* Fix AdvancedPaste close on PT close

* Override etl file name for explorer loaded dlls
Start/stop tracer when needed for explorer loaded dlls to prevent explorer overload

* Fix setting desc

* Fix missing events

* Add infobar to restart when enable data viewing

* Flush on timer every 30s

* [Settings] Update View Data diagnostic description text
[New+] Add tracer

* Show Restart info bar for both enable/disable data viewer

* Fix newplus

* Fix stuck on restart and terminate AdvPaste exe on destroy()

* [Installer] Add tracer

* Address PR comment

* Add missing tracers

* Exclude etw dir from BugReport

* Fix bad merge

* [Hosts] Proper exit on initial dialog

* [OOBE] Make Data diagnostic setting visible without scroll

* [OOBE] Add hiperlynk to open general settings

* Disable data view on disabling data diagnostics

* Don't disable View data button

* Fix disabling data viewing

* Add missing dot

* Revert formatting
2024-10-24 21:04:32 +01:00
Seraphima Zykova
1e18e83af6
[Workspaces] Handle admin windows repositioning. (#34965) 2024-09-25 11:13:38 +02:00
Heiko
734b0f8a54
[New+, Enterprise]Policy for showing filename extension (#35000)
* add gpo: admx, gpo utils

* todo note

* BugReport tool

* implement policy in utility

* settings ui

* remove todo comment

* code fixes

* code fixes 2

* spell fix
2024-09-24 16:33:01 +01:00
Heiko
7e4baa14bb
[BugReport] Add new policy for enabled state of New+ utility (#35006)
Update ReportGPOValues.cpp
2024-09-23 13:37:40 +01:00
Christian Gaarden Gaardmark
3f44ad186d
New Utility: New+ (#33136)
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
2024-09-19 17:12:24 +01:00
Stefan Markovic
2fac6ed582
[BugReportTool] Omit custom actions data (#34539) 2024-09-02 16:21:57 +02:00
Seraphima Zykova
579619952d
[New Module] Workspaces (#34324)
* spell checker

* Adding OOBE Projects page

* changed the default hotkey

* module interface

* rename projects editor

* bug report tool

* installer

* gpo

* exit event constant

* extend search for projects by search over the containing apps' names

* [Projects] fix grammatical issue #43 (1 app - many apps)

* [Projects] Editor: Main page: fix layout if there are many apps, launch button not disappearing on the right side

* dsc

* github

* pipeline

* guid prefix

* [Projects] fixing general settings gpo handling in runner + minor changes

* arm build fix

* Do not allow saving project if name or applist is empty. Also minor UI changes

* version

* editor version

* spellcheck

* editor dll signing

* update projects names to filter them out

* shortcut saving fix

* [Projects] Editor: brining the highlighted app's icon into the foreground. + minor UI fixes

* spell checker

* spellcheck

* [Projects] re-implementing icon size calculation to have similar sized icons for every app.

* [projects] Adding info message for cases: there are no projects or no results for the search

* [Projects] Adding Edit button to the popup. + minor changes

* [Projects] Making popup having rounded corners

* changed "no projects" text color and position

* remove opening the first proj

* fix placing windows of the same app in the project

* [Projects] bringing back the breadcrumb on the editor page. Make it clickable.

* [Projects] optimizing click handlers

* [Projects] Removing not selected apps on save

* moved on thread executor to common

* moved display utils

* added convert rect

* unsigned monitor number

* set awareness

* app placement

* [Projects] Re-implementing preview drawing - one common image

* [Projects] fix boundary calculation, use DPI aware values

* fix launching with command line args

* Fix ARM64 CI build

* launch packaged apps using names when possible

* spell-check

* update packaged apps path

* projects editor single instance

* [Projects] Add Select all checkbox, Delete selected button

* Add Checkbox for per monitor selection

* modifying highlight in preview

* spell checker

* logs

* exclude help windows

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/49

* Add intermediate step to project creation

* minor bugfix

* mutex fix

* modifying highlight for minimized apps

* Fixing bug: re-draw the preview on app deletion in the editor

* Adding helper class for getting the right bounds for screens

* spell checker

* spell checker

* Minor fixes in the capture dialog

* get dpi unaware screen bounds

* refactoring: added utils

* changed window filter

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/2

* clean up

* refactoring

* projects common lib

* localizable default project prefix

* launcher resources

* clean up

* change snapshot project saving

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14

* changed project data

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14

* changed project creation save-cancel handles

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14

* spell-check

* Remove checkboxes, delete feature

* remove unused from the project

* get command line args in the snapshot

* minimized settings snap fix

* set window property after launching

* FZ: ignore projects launched windows

* Implementing major new features: remove button, position manipulation, arguments, admin, minimized, maximized

* modifying colors

* launcher project filters

* clean up

* Hide Admin checkbox

* hide WIP

* spell-check

* Revert "Hide Admin checkbox"

This reverts commit 3036df9d7f.

* get app elevated property

* Implementing Launch and Edit feature

* fixing: update of listed projects on the main page after hitting save in editor

* Fix for packaged app's icons

* fixing scroll speed issue

* change scroll speed to 15

* launch elevated apps

* minor fixes

* minor fix

* enhancing shortcut handling

* can-launch-elevated check

* projects module interface telemetry

* Implementing store of setting "order by".

* minor string correction

* moved projects data parsing

* telemetry

* add move apps checkbox

* notification about elevated apps

* restart unelevated

* move existing windows

* keep opened windows at the same positions

* handle powertoys settings

* use common theme

* fix corrupted data: project id and monitor id

* project launch on "launch and edit"

* clean up

* show screen numbers instead of monitor names

* launcher error messages

* fix default shortcut

* Adding launch button to projects settings, dashboard and flyout

* Adding new app which is launched when launching a project. It shows the status of the launch process

* spell checker

* Renaming Projects to App Layouts. Replacing only string values, not the variable names

* Re-ordering modules after Renaming Projects + spell checker

* setting window size according to the screen (making it bigger)

* commenting out feature "move apps if exist"

* spell checker

* Add ProjectsLauncherUI to signing

* opening apps in minimized state which are placed on a monitor, which is not found at the moment of launching

* consistent file name

* removed unused sln

* telemetry: create event

* WindowPosition comparison

* telemetry: edit event

* fix muted Launch as admin checkbox

* telemetry: delete event

* updated Edit telemetry event

* added invoke point to launcher args

* added utils

* parse invoke point

* replaced tuple with struct

* telemetry: launch event

* MonitorRect comparison

* resources

* rename: folders

* remove outdated

* rename: window property

* rename: files and folders

* rename: common data structures

* rename: telemetry namespace

* rename: workspaces data

* rename ProjectsLib -> WorkspacesLib

* rename: gpo

* rename: settings

* rename: launcher UI

* rename: other

* rename: pt run

* rename: fz

* rename: module interface

* rename: icon

* rename: snapshot tool

* rename: editor

* rename: common files

* rename: launcher

* rename: editor resources

* fix empty file crash

* rename: json

* rename: module interface

* fix custom actions build

* added launch editor event constant

* xaml formatting

* Add missing method defition to interop::Constants idl
Remove Any CPU config

* more .sln cleanup

* [Run][PowerToys] Fix Workspaces utility (#34336)

polished workspaces utility

* build fix - align CppWinRT version

* address PR comment: fix isdigit

* indentation

* address PR comment: rename function

* address PR comment: changed version for workspaces and revision

* added supported version definition

* addressPR comment: use BringToForeground

* address PR comments: updated projects

* address PR comment: uncomment gpo in settings

* address PR comment: rename oobe view

* update OOBE image with current module name

* moved AppUtils

* launching with AppUserModel.ID

* fixed module order in settings

* fix xaml formatting

* [Workspaces] Close launcher if there are failed launches. Plus adding new spinner gif

* fix topmost LauncherUI

* clean up

* UI closing

* BugReportTool - omit cmd arg data

* Delete icon on workspace removal

* Adding cancellation to launcher UI.

* reordered launching

* fix terminating UI

* Removing old shortcut on workspace renaming

* Sentence case labels

* get process path without waiting

* comment out unused

* remove unused argument

* logs

* New icon

* fix launch and edit for the new project

* fix launch and edit: save new project

* Update exe icons

---------

Co-authored-by: donlaci <laszlo@janeasystems.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Davide Giacometti <davide.giacometti@outlook.it>
Co-authored-by: Niels Laute <niels.laute@live.nl>
2024-08-23 09:28:13 +02:00
Heiko
16a1fb7981
[MWB][Enterprise] Add new policies and improve settings UI for the Transfer File setting (#33571)
## Summary of the Pull Request

### Improve settings page for TransferFile setting
The TransferFile setting depends on ShareClipboard setting. This is now
visually shown.

**Before the change:**

![image](https://github.com/microsoft/PowerToys/assets/61519853/735ad7bd-4f45-4914-8bbc-bc47170a9b47)
**After the change**

![image](https://github.com/microsoft/PowerToys/assets/61519853/78fb74c3-29a0-4779-8f0c-9df6c4161be1)


### New policies are added for MWB
Name | Supported states | Id | Behavior
------------ | ------------- | ------------ | -------------
Clipboard sharing enabled | disabled | MwbClipboardSharingEnabled |
Disables the feature if set to disabled.
File transfer enabled | disabled | MwbFileTransferEnabled | Disables the
feature if set to disabled.
Original user interface enabled | disabled | MwbUseOriginalUserInterface
| Disables the feature if set to disabled. |
Disallow blocking screensaver on other machines | enabled |
MwbDisallowBlockingScreensaver | Disables the feature if set to enabled.
|
Connect only in same subnet | enabled & disabled | MwbSameSubnetOnly |
Enables the feature if set to enabled.<br />Disables the feature if set
to disabled. |
Validate remote machine IP Address | enabled & disabled |
MwbValidateRemoteIp | Enables the feature if set to enabled.<br
/>Disables the feature if set to disabled.
Disable user defined IP Address mapping rules | enabled |
MwbDisableUserDefinedIpMappingRules | If enabled the user can't define
IP Address mapping rules.
Predefined IP Address mappings | enabled with multi-line text value |
MwbPolicyDefinedIpMappingRules | Allows admins to force define IP
Address mapping rules.

#### User Interface screenshots

![image](https://github.com/microsoft/PowerToys/assets/61519853/3d8a46c5-13f3-4a47-80a1-c0d242d8541c)

![image](https://github.com/microsoft/PowerToys/assets/61519853/44f4dc60-5106-45bf-9bb4-aa0bde9ef6fa)

![image](https://github.com/microsoft/PowerToys/assets/61519853/569be956-e889-442c-bdc9-e319ad3c19e3)
2024-07-22 15:49:45 +01:00
Stefan Markovic
d0d2f3cd9c
[GPO][AdvPaste]Online AI models GPO (#33045)
* [Advanced Paste] AI gpo

* address PR comments

* XAML format

* Fix showing Enable Paste with AI with module disabled

* Rename variable in ViewModel for clarity

* Update adml revision

* Move policy registry key around

* Update src/modules/AdvancedPaste/AdvancedPaste/Strings/en-us/Resources.resw

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

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
2024-05-26 12:22:50 +01:00
Craig Loewen
483f7aa464 [NewUtility]Advanced Paste (#23)
Advanced Paste V1 implementation

---------

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Jordi Adoumie <98557455+joadoumie@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2024-05-17 23:43:59 +01:00
David Federman
c39e306784
[Build]Unify PCH usage (#31055)
* Unify PCH usage

* Add back CIBuild property

* Add back CIBuild property
2024-03-22 10:29:14 +00:00
Jeff Lord
725c8e8c19
[KBM]Launch apps / URI with keyboard shortcuts, support chords (#30121)
* Working UI update with just runProgram Path and isRunProgram

* First working, basic. no args or path, or setting change detections.

* Revert and fixed.

* Some clean up, working with config file monitor

* Args and Start-in should be working.

* File monitor, quotes, xaml screens one

* Fixed enable/disable toogle from XAML

* Code cleanup.

* Betting logging.

* Cleanup, start of RunProgramDescriptor and usage of run_non_elevated/run_elevated

* Code moved to KeyboardEventHandlers, but not enabled since it won't build as is, needs elevation.h. Other testing..

* Key chords working, pretty much

* Added gui for elevation level, need to refresh on change...

* f: include shellapi.h and reference wil in KBMEL

* run_elevated/run_non_elevated sorted out. Working!

* Removed lots of old temp code.

* Fix some speling errors.

* Cleanup before trying to add a UI for the chord

* Added "DifferentUser" option

* Closer on UI for chords.

* Better UI, lots working.

* Clean up

* Text for “Allow chords” – needs to look better…

* Bugs and clean-up

* Cleanup

* Refactor and clean up.

* More clean up

* Some localization.

* Don’t show “Allow chords“ to the “to” shortcut

* Maybe better foreground after opening new app

* Better chord matching.

* Runprogram fix for stealing existing shortcut.

* Better runProgram stuff

* Temp commit

* Working well

* Toast test

* More toast

* Added File and Folder picker UI

* Pre-check on run program file exists.

* Refactor to SetupRunProgramControls

* Open URI UI is going.

* Open URI working well

* Open URI stuff working well

* Allowed AppSpecific shortcut and fixed backup/restore shortcut dups

* Fixed settings screen

* Start of code to find by name...

* UI fixed

* Small fixes

* Some single edit code working.

* UI getting better.

* Fixes

* Fixed and merge from main

* UI updates

* UI updates.

* UI stuff

* Fixed crash from move ui item locations.

* Fixed crash from move ui item locations.

* Added delete confirm

* Basic sound working.

* Localized some stuff

* Added sounds

* Better experiance when shortcut is in use.

* UI tweaks

* Fixed KBM ui for unicode shortcut not having ","

* Some clean up

* Cleanup

* Cleanup

* Fixed applyXamlStyling

* Added back stuff lost in merge

* applyXamlStyling, again

* Fixed crash on change from non shortcut to shortcut

* Update src/modules/keyboardmanager/KeyboardManagerEngineTest/KeyboardManagerEngineTest.vcxproj

* Fixed some spelling type issues.

* ImplementationLibrary 231216

* Comment bump to see if the Microsoft.Windows.ImplementationLibrary version thing gets picked up

* Correct, Microsoft.Windows.ImplementationLibrary, finally?

* Fixed two test that failed because we now allow key-chords.

* Removed shortcut sounds.

* use original behavior when "allow chords" is off in shortcut window

* fix crash when editing a shortcut that has apps specified for it

* split KBM chords with comma on dashboard page

* Fix some spelling items.

* More "spelling"

* Fix XAML styling

* align TextBlock and ToggleSwitch

* fix cutoff issue at the top

* increase ComboBox width

* Added *Unsupported* for backwards compat on config of KBM

* fix spellcheck

* Fix crash on Remap key screen

* Fixed Remap Keys ComboBox width too short.

* Removed KBM Single Edit mode, fixed crash.

* Fix Xaml with xaml cops

* Fix crash on setting "target app" for some types of shortcuts.

* Space to toggle chord, combobox back

* fix spellcheck

* fix some code nits

* Code review updates.

* Add exclusions to the bug report tool

* Code review and kill CloseAndEndTask

* Fix alignment / 3 comboboxes per row

* Fix daily telemetry events to exclude start app and open URI

* Add chords and remove app start and open uri from config telemetry

* comma instead of plus in human readable shortcut telemetry data

* Code review, restore default-old state when new row added in KBM

* Code review, restore default-old state when new row added in KBM, part 2

* Still show target app on Settings

* Only allow enabling chords for origin shortcuts

---------

Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2024-02-27 23:12:05 +00:00
Jaime Bernardo
5b692438b7
[Deps]Upgrade CppWinRT to 2.0.240111.5 (#31396)
* [Deps]Update CppWinRT to 2.0.240111.5

* Apply fix for robmikh.common incompatibility with cppwinrt

* Add CppWinRT to projects that were missing it

* Fix spellcheck
2024-02-13 13:55:14 +00:00
Heiko
43aa80fb1e
[BugReport]Add new update GPO policies to the report (#31066) 2024-01-24 15:37:46 +00:00
Heiko
94ee951917
[Dev]Remove prepared code for "Auto update" policy (#31064)
* Update PowerToys.admx

* Update PowerToys.adml

* Update UpdateUtils.cpp

* Update gpo.h

* Update ReportGPOValues.cpp
2024-01-22 16:50:01 +00:00
Clint Rutkas
1b2c971847
[Deps]Upgrade SDK Build Tools and Implementation library (#30819)
* Upgrading SDK Tools and Impliementation library

* updating implementation

* found a few more straglers

* fixing notice

* update wil version

* Remove unused file

---------

Co-authored-by: Davide Giacometti <davide.giacometti@outlook.it>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2024-01-16 10:51:45 +00:00
Andrey Nekrasov
f742d3c1c3
[KBM]Allow remapping keys and shortcuts to arbitrary unicode sequences (#29399)
* [KBM] Allow remapping keys and shortcuts to arbitrary unicode sequences

* f: spelling

* f: tests

* f: split shortcut configuration

* f: address ui layout comments

* [BugReport]Don't report personal info

* f: fix crash in KBME

* f: add missed type button

* f: fix shortcut line UI elements alignment

* f: align elements size

* f: add warning about non-mapped keys
2023-11-23 10:46:07 +00:00
Pedro Lamas
0990724e44
[FileExplorer]Add QoiThumbnailProvider and QoiPreviewHandler (#29735)
* [FileExplorer]QoiThumbnailProvider

* Corrects code documentation

* Adds QoiPreviewHandler

* Corrects GUIDs

* Ensure returned thumbnail image is 32bit ARGB

* Updates following review comments

* More updates following review comments

* Updates following PR comments

* Fix dark theme background in QoiPreviewHandler

* Updates attribution text
2023-11-14 15:41:09 +00:00
Stefan Markovic
812b343776
🚧 [new module] Environment variables editor (#28722)
* Init EnvironmentVariables UI project

* Models
TitleBar
MainPage init
Icon

* User and system variables

* Profiles init

* XAML cleanup

* Missing ItemTemplate

* EditDialog

* ModuleInterface

* Signing and processes lists

* Installer

* spellcheck

* Fix ARM64 build and consolidate packages

* spellcheck2

* Fix installer

* Single instance. C# telemetry. Wait on PT pid

* ElevationHelper

* Add profile wip

* Init EnvironmentVariables UI project

* Models
TitleBar
MainPage init
Icon

* User and system variables

* Profiles init

* XAML cleanup

* Missing ItemTemplate

* EditDialog

* ModuleInterface

* Signing and processes lists

* Installer

* spellcheck

* Fix ARM64 build and consolidate packages

* spellcheck2

* Fix installer

* Single instance. C# telemetry. Wait on PT pid

* ElevationHelper

* Add profile wip

* show run as administrator in title (#28516)

* Environment Variables added to Run plugin (#28466)

* UI tweaks

* Remove style

* Add profile - init working

* Applied variables

* Read/Write profiles

* Fixes

* Add separator and fix loading profiles

* Only allow to edit System vars if running elevated

* Add tmp progress ring to show applying changes progress
Ignore not needed json fields

* Remove variable and profile logic

* Do not read data async
Update System and User variables on change

* Add isCorrectlyApplied()

* Sort variables in Applied variables

* WIP WndProc

* spellcheck

* Revert "WIP WndProc"

This reverts commit 0c0b6c67de.

* WHY CRASH???

* UI tweaks

* WIP modified state warning

* Add cancel button in dialogs

* Add buttons validations

* Set variables - fire and forget notify

* Revert "Revert "WIP WndProc""

This reverts commit 1b2306eeb7.

* Listen to WM_SETTINGSCHANGED
Add Infobar reload button

* spellcheck

* spellcheck again

* Fix build

* InfoBar runAsAdmin visibility

* Fix comment

* Confirm dialog when deleting variable
Fix add variable button when creating profile

* Edit profile

* Sort variables on Load

* Select existing variables on edit

* Add default variable

* Fix adding existing vars to profile

* update notice.md

* Handle PATH properly

* Add tooltips and fix dialogs text wrapping

* Fix applied values for duplicates
Fix add/eddit variable txt box validation

* Add horizontal scroll bar for applied values

* Fix duplicate variables handling
Fix user variable handling and preview

* spellcheck

* Try fix spellcheck

* Revert "spellcheck"

This reverts commit ee76231974.

* Revert "Try fix spellcheck"

This reverts commit dc8f04afb9.

* Fix path and duplicates conflict

* Fix PATH handling
Fix unapply on delete active variable
Fix ordering in applied variables

* Show variables as lists and add drag-to-reorder feature

* Only show specific variables as list
Update list in edit dialog on editing the value

* spellcheck

* Update GPO policy

* Add Edit and Remove variable buttons
Remove context menu

* Remove drag&drop when editing list variable and add buttons to move up/down

* Fix Edit profile dialog title

* Fix backup and restore variables when editing variable from applied profile

* Apply var to system WIP

* Tweaks

* Simplify edit variable logic

* Minor fixes

* Spellcheck

* Update src/modules/EnvironmentVariables/EnvironmentVariables/app.manifest

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>

* spellcheck 2

* Remove unneeded string

* Add more telemetry

* Do not allow adding existing variables with the same name into the profile

* Adding icon

* Fix the crash when opening existing variables dialog

* Update Settings and OOBE screenshots

* Fix crash when malformed profiles.json and jsonignore not needed properties

* Fix selecting duplicates in existing variables dialog

* Add user variable name limit (<255 chars)
Check if profile is applicable on apply
Show message if profile is not applicable

* XamlStyling

* Better Flyout positioning
Add Cancel button to the flyout

* Fix UI glitches by using ItemsControl (no virtualization)

* Fix spellcheck

* Fix XAML style

* Add horizontal scrollbar to applied variables

* Revert to ItemsRepeater

* Fix UI glitches by adding a decent minimum cache

* Fixing UI bugs

* Fix spellcheck

* Fix crash while trying to edit a User variable when there's no Parent
profile

* Fix issue overwriting backup var when you edit var on applied profile

* Fix nuking of variables when adding to applied profile

* Fix profile not being saved when deleting a variable

* Fix ValuesList empty crash, issues and no serialization

* fix spellcheck

* Allow in-line edit of list variables

* Fix xaml style

* Fix add profile variable cancel button logic

* Fix add profile variable cancel button logic - clean the list

* Bump VerticalCacheLength to 10

as in some cases UI glitch on expanding System variables was still present

* Fix profile Add variable button enable/disable logic

* Remove unneeded using

* Add to Dashboard

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Davide Giacometti <davide.giacometti@outlook.it>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-10-20 16:28:07 +02:00
Davide Giacometti
b8a83fba1b
[BugReport]Fix hang when bug report is launched (#28506)
* fix hang when bug report is launched from flyout

* Normalize output dir for release
2023-09-15 07:34:17 +01:00
Dongle
937e7b0c00
[Deps]Upgrade to WinAppSDK 1.4 (#28310)
* Update to WASDK 1.4

* Remove redundant title bar styles.

* Update notice

* Update C++ projects as well

* Upgrade CppWinRT too

* Add exception to WASDK file version set to 1.0.0.0

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-09-07 09:36:47 +01:00
Jaime Bernardo
7ecfc58caa
[New Utility]Crop And Lock (#27832)
* [CropAndLock]Original POC code dump

* Project rename and delete solution

* Remove unused architectures

* Update cppwinrt to be in line with the solution

* Add to PowerToys solution and fix build errors

* Initial module interface empty project

* Module skeleton based on AlwaysOnTop

* Add loggers to module interface

* Add crop and lock to the runner

* Enable starts and disable kills the process

* Events reacting to hotkeys

* Main application reacting to events

* Initialize unhandled exception handling

* Singleton in line with other projects

* Also exit when PowerToys exit is detected

* Create Settings page

* React to shortcut changes in Settings

* Disable Crop and Lock through an Event

* Disable running Crop and Lock standalone

* Remove Crop and Lock tray icon

* Module Interface dll version

* Fix main app resource file to include version

* Make pch conditional on CI build

* Add to signing

* Remove settings screen opened by removed tray icon

* Fix spellcheck

* Yet another fix for spellcheck

* Fix disabling utility

* Fix solution build configurations

* Fix C++ analyzer errors

* Try to fix pre-compiled header CI errors

* Fix crash while exiting with an active reparent window

* Fix missing reference when building in release CI

* Add OOBE page

* GPO: Add admx and adml file changes

* GPO: react to changes in GPO

* Add quick access flyout menu entry

* Use Crop And Lock icon

* Use actual images for Settings and OOBE

* Module and app telemetry

* Add entry to README.md

* Add to process lists

* Additional logging

* Attribution in Settings page

* Add attribution to Community.md

* Fix spellcheck

* Fix typo in strings

* Fix crash when window handle is no longer valid

* Update COMMUNITY.md

* Fix supportedOS in manifest

* Don't show msgbox if detecting second instance

* Remove unused hotkey

* Tweak attribution

* Fix attribution spellcheck
2023-08-10 10:46:33 +01:00
Jaime Bernardo
864b862952
[General]Reduce installer size by flattening application paths (#27451)
* Flatten everything and succeed build

* Figure out Settings assets

* Remove UseCommonOutputDirectory tag

* Proper settings app path

* [VCM] Fix assets location

* Fix some runtime paths

* [RegistryPreview]Use MRTCore specific pri file

* [Hosts]Use MRTCore specific pri file

* [Settings]Use MRTCore specific pri file

* [Peek]Use MRTCore specific pri file

* [FileLocksmith]Use MRTCore specific pri file

* [ScreenRuler]Use MRTCore specific pri file

* [PowerRename]Use MRTCore specific pri file

* [Peek]Move assets to own folder

* [FileLocksmith] Use own Assets path

* [Hosts]Use own assets folder

* [PowerRename]Use own assets dir

* [MeasureTool] Use its own assets folder

* [ImageResizer]Use its own assets path

* Fix spellcheck

* Fix tab instead of space in project files

* Normalize target frameworks and platforms

* Remove WINRT_NO_MAKE_DETECTION flag. No longer needed?

* Fix AOT and Hosts locations

* Fix Dll version differences on dependency

* Add Common.UI.csproj as refernce to fix dll versions

* Update ControlzEx to normalize dll versions

* Update System.Management version to 7.0.2

* Add GPOWrapper to Registry Preview to fix dll versions

* [PTRun]Reference Microsoft.Extensions.Hosting to fix dll versions

* Fix remaining output paths / dll version conflicts

* [KeyboardManager]Executables still on their own directories

* Fix Monaco paths

* WinAppSDK apps get to play outside again

* Enable VCM settings again

* Fix KBM Editor path again

* [Monaco]Set to own Assets dir

* Fix installer preamble; Fix publish. remove unneeded publishes

* Remove Hardlink functions

* Installer builds again (still needs work to work)

* Readd Monaco to spellcheck excludes

* Fix spellcheck and call publish.cmd again

* [Installer] Remove components that don't need own dirs

* [Installer] Refactor Power Launcher

* [Installer] Refactor Color Picker

* [Installer] Refactor Monaco assets

* [Installer]Generate File script no longer needs to remove files

* [Installer]Refactor FileLocksmith

* [Installer] Refactor Hosts

* [Installer]Refactor Image Resizer

* [Installer]Refactor MouseUtils

* [Installer]Refactor MWB

* [Installer]Refactor MeasureTool

* [Installer]Refactor Peek

* [Installer]Refactor PowerRename and registry fixes

* [Installer]Refactor RegistryPreview

* [Installer]Refactor ShortcutGuide

* [Installer]Refactor Settings

* [Installer]Clean up some unused stuff

* [Installer]Clean up stuff for user install

* [Installer]Fix WinUi3Apps wxs

* [Installer]Fix misplaced folders

* [Installer]Move x86 VCM dll to right path

* Fix monaco language list location

* [Installer]Fix VCM directory reference

* [CI]Fix signing

* [Installer] Fix resources folder for release CI

* [ci]Looks like we still ship NLog on PowerToys Run

* [Settings]Add dependency to avoid dll collision with Experimentation

* [RegistryPreview]Move XAML files to own path

* [RegistryPreview]Fix app icon

* [Hosts]Move XAML files to their own path

* [FileLocksmith]Move XAML files to their own path

* [Peek]Move XAML files to own path

* [ScreenRuler]Move XAML files to its own path

* [Settings]Move XAML to its own path

* [ColorPicker]Move Resources to Assets

* [ShortcutGuide]Move svgs to own Assets path

* [Awake]Move images to assets path

* [Runner]Remove debug checks for PowerToys Run assets

* [PTRun]Move images to its own assets path

* [ImageResizer]Icon for context menu on own assets path

* [PowerRename]Move ico to its own path

* Remove unneeded intermediary directories

* Remove further int dirs

* Move tests to its own output path

* Fix spellcheck

* spellcheck: remove warnings

* [CppAnalyzers]Ignore rule in a tool

* [CI]Check if all deps.json files reference same versions

* fix spellcheck

* [ci]Fix task identation

* [ci]Add script to guard against asset conflicts

* [ci]Add more deps.json audit steps in the release build

* Add xbf to spellcheck expects

* Fix typo in asset conflict check scripts

* Fix some more dependency conflicts

* Downgrade CsWinRT to have the same dll version as sdk

* [ci]Do a recursive check for every deps.json

* Fix spellcheck error inside comment

* [ci]Fix asset script error

* [ci]Name deps.json verify tasks a bit better

* [ci]Improve deps json verify script output

* [ci]Update WinRT version to the same running in CI

* Also upgrade CsWinRT in NOTICE.MD

* [PowerRename]Move XAML files to own path

* [Common]Fix Settings executable path

* [ci]Verify there's no xbf files in app directories

* [installer]Fix firewall path

* [Monaco]Move new files to their proper assets path

* [Monaco]Fix paths for new files after merge

* [Feedback]Removed unneeded build conditions

* [Feedback]Clear vcxproj direct reference to frameworks

* [Feedback]RunPlugins name to hold PTRun plugins

* [Feedback]Remove unneeded foreach

* [Feedback]Shortcut Guide svgs with ** in project file

* [Feedback]Fix spellcheck
2023-07-20 00:12:46 +01:00
Jaime Bernardo
b8a253fda6
[PTRun]Remove unneeded registry key from installer (#27011) 2023-06-23 21:49:01 +02:00
Jaime Bernardo
6a4a5c59d7
[BugReport][Install]Fix process lists for Peek and MWB (#26235) 2023-05-25 10:26:52 +01:00
Andrey Nekrasov
29eebe16a4 [New Utility]Mouse Without Borders
* Integrate Mouse Without Borders into PowerToys

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-05-18 21:48:03 +01:00
Samuel Chapleau
648f30d1ab
[Peek] Powertoys Peek MVP (#25922)
* Peek (#22498)

* Add peek dll project

* add spacebar preview and launch on hotkey press

* add todo

* add process handle to handle continuous press of hotkey

* add tool to stop all powertoys processes

* Add a blank Peek page and update nav menu

* Add some initial content to Peek page including a toggle

* refactor settings parsing

* rename spacebar peek to peek viewer

* rename script to stop powertoys processes

* remove tool

* Adding FileUtils for retrieving selected file in File Explorer

* Remove unnecessary SndPeekSettings

* Add shortcut setting

* Set the shortcut to ctrl+space

* Launching viewer with selected FE file

* Add PeekUI WinUI3 project with interop events

* Moving FileTypeUtils into PeekFileUtils project

* execute winui3 app on hotkey

* Fix paths with spaces

* remove winui3 project

* Resolve comment

* add wpf app with toggle visibility on hotkey

* fix visibility on startup

* remove window properties and add todos

* Fixed hidden extension and system file handling

* wip

* Add working WPF app with FileExplorer querying

* remove c++ projects

* Move native awaiter

* Working Image control with image files

* Resize and move window based on explorer monitor

* Image render, window positioning and sizing clean up

* add window management logic and selection logic

* add extension methods to add circular iterating capability to linkedlistnode

* Add OnArrowKeyPresshandler

* Added titlebar with file name and scaling with titlebar height

* fix flashing window on startup and process kept alive when powertoys exits

* remove wait for debugger loop in ui

* Add KeyIsDown method

* Fix KeyDown issue with Key handled and check for repeat

* Add thumbnail logic

* Add all folder items if only one item is selected

* File type helper

* Using hresult

* Add cancellation and rotation handling

* Use extension instead of path

* fIX CONFLICTS

* Fixing some file type checks

* Add new icon for Peek

* Update page with the new Peek icon

* Initialize IsEnabled and hook ActivationShortcut to dllmain

* add icon to taskbar and titlebar

* Add theme sensitive backgrounds

* rename event handlers

* add settings image

* Move window data into obserable object

* Refactor viewmodel, interop and helpers

* Clean up

* Add loading spinner

* Add todos

* Fix conflicts

* Move native code into its own folder

* Add peek to installer

* Fix building peek and peekui projects

* Replace UWP namespaces to WinAppSDK

* Working WASDK placeholder project

* Add exit when powertoys runner exit

* Working winui3 with image display

* Add WIC project with <TreatWarningAsErros> false for now

* Fit content to window

* Use Size from Windows.Foundation

* Change order

* Add some todos

* Refactored native/interop code and added helpers to imagepreviewer

* Rename projects

* Move some code

* Remove using

Co-authored-by: Michael Salmon <miksalmon@users.noreply.github.com>
Co-authored-by: Michael Salmon 🐟 <michaelpsalmon@outlook.com>
Co-authored-by: Alireza Ebadi Ghajari <alirezae@microsoft.com>
Co-authored-by: Jessie Su <Jessie.Su@microsoft.com>
Co-authored-by: sujessie <102062556+sujessie@users.noreply.github.com>

* Bump Microsoft.Windows.SDK.BuildTools version

* [Peek] Plugin pattern to enable any file type previewing (#22475)

* [Peek] Fetching image size through PropertyStore (#22530)

* Fetching metadata from PropertySTore

* Releasing objects to fix crash

* Creating new PropertyHelper

Co-authored-by: Daniel Chau <dancha@microsoft.com>

* Juliata/filetypes (#22538)

* Using the same list of file extensions as Lightbox's AppxManifest, and ensuring we convert file extension to lowercase

* Add IsFileTypeSupported to IPreviewer

* respond to PR comments

* Add scale awareness to window centering (#22541)

* [Peek] Fix installer builds, project configs and update assets (#22540)

* Update installer

* Fix installer errors

* Fix peek vcxproj

* Add package signing

* Add peek to arm64

* Add back ARM64 toMeasureToolUI

* Add versions to project

* Update assets and icons

* Add correct icon

* [Peek] Enable PropertyStore for offline files (#22567)

* Enabling PropertyStore for offline files

Co-authored-by: Daniel Chau <dancha@microsoft.com>

* [Peek] Adding unsupported file previewer (#22598)

* Unsupported file previewer

* Fix file display info

* Fix property store calls

* Update TODO

* [Peek] Add WebView2 integration (#22506)

* First commit with WIP logic to support WV2 in Peek module

* Minor code cleanup and try/catch block

* Added control to wrap WebView2 logic

* Cleanup

* Added logic to handle HTML previewing
Properly update FilePreview according to file type

* Code cleanup
Updated comments

* Updated comment

* Removed comment

* Code cleanup

* Improved opening of web browser preview to avoid "blank" or "seeing previous page" issue
Removed unused method
Added xaml fallback to guarantee default/starting state

* Removed folder

* Updated factory logic to match master

* address code review

* addressed PR review

* address PR review

* Address PR review

* address PR review

* Address PR review

* [Peek] Add basic file querying and navigation (#22589)

* Refactor to facilitate file data initialization

* Extract file-related code to new FileManager class

* Add temp basic version

* Clean + add todo for cancellations

* Fix various nav-related issues

* Temp - start moving iteration-related code to bg thread

* Minor tweaks

* Add FEHelper todo

* Rename FileManager + various tweaks

* Add basic throttling

* Improve bg thread synchronization

* Clean

* Clean

* Rename based on feedback

* Rename FileQuery

* Rename properties

* Rename remaining fields

* Add todos for nav success/failures

Co-authored-by: Esteban Margaron <emargaron@microsoft.com>

* [Peek] Add customized title bar  (#22600)

* Add basic button UI

* Add function to get default app name and to open file in default app

* Correct error output

* Add filename to titlebar

* Remove titlebar text from Resw

* Add basic button UI

* Add function to get default app name and to open file in default app

* Add filename to titlebar

* Correct error output

* Remove titlebar text from Resw

* Add SetDragRectangles

* Correct logic, update function name

* Add localization

* Cleanup and adaptive width

* Add fileIndex/NumberOfFiles for multiple files activation

* Refine titlebar styles

* Update error message; Return HResult from native methods; Update variable initialisation and string null testing

* Titlebar height and adaptive width refinement

* Add fallback to launch app picker if fail to open default app

* Temp change to hide AppTitle_FileCount

* Update launch button to command; Add keyboard accelerator

* Update titlebar inactive background color

* Update tooltip to add keyboard accelerator

* Add comments to resw file

* Fix accidental deletion from previous merge

Co-authored-by: Jojo Zhou <yizzho@microsoft.com>
Co-authored-by: Yawen Hou <yawenhou@microsoft.com>

* Fix crash

* Fix wrong thread exception

* Make CurrentItemIndex setter private

* Update titlebar filecount text

* Fix titlebar draggable region and interactive region (bump WinAppSdk to latest)

* [Peek] Unsupported File Previewer - Formatting string from resources (#22609)

* Moving to string resource usage

* Moving ReadableStringHelper to common project

* Fix comments

* [Peek] Fix foregrounding (#22633)

* Fixing foregrounding

* Get window handle inside BringToForeground extension method

Co-authored-by: Daniel Chau <dancha@microsoft.com>
Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>

* [Peek] ImagePreviewer - Handle error states (#22637)

* add better preview state handling

* add error handling in imagepreviewer and better state handling

* fix error handling so exception is not bubbled up

* improve performance and hook up unsupported previewer on error

* remove commented code

* address pr comments

* [Peek] add PDF viewing support (#22636)

* [Peek] add PDF viewing support

* Fixed issue which would redirect some HTML and PDF files to external browser

* Fixed refactored interface name

* [Peek] Refine titlebar adaptive width (#22642)

* Adjust adaptive width of titlebar

* Remove visualstate setters for AppTitle_FileCount

Co-authored-by: Jojo Zhou <yizzho@microsoft.com>

* [Peek] New File Explorer tabs break Shell API to get selected files (#22641)

* fix FE tab bug

* remove unnecessary unsafe keyword

* [Peek] add extra logic to properly render PNG files with transparency (#22613)

* [Peek] added extra logic to render PNG files with proper transparency

* Moved logic to ThumbnailHelper
Cleanup

* Created a separated previewer for PNG to only load the preview image with thumbnail logic

* removed unused code

* Updated state loading change

* [Peek] Unsupported File Previewer - Setting Window Size (#22645)

* Adding setting for unsupported file window

* Fix

* [Peek] Add tooltip to File (#22640)

* Add tooltip to File

* Add placeholder text for no tooltip

* Address comments

* Use StringBuilder

Co-authored-by: Jojo Zhou <yizzho@microsoft.com>

* Add full image quality support (#22654)

* [Peek] Window foregrounding simplification and fixes + keep window visible if FE single selection changed (#22657)

* Use different apis to bring to foreground removing remote thread wait and work as well as library loading

* Keep window open if single selected file in FE is different

* Removed unused methods

* [Peek] Add cancellation token OnFilePropertyChanged (#22643)

* Cancel file loading before opening another file

* Add omitted cancellation checks

* Catch task cancelled exception; Add more cancellation checkpoints

* Add cancellation checkpoint beofre GetBitmapFromHBitmapAsync

* Correct typo

* Update to pass cancellation token individually to each async methods

* Add lost cancellationToken source

* Add cancellation token to PngPreviewer

Co-authored-by: Yawen Hou <yawenhou@microsoft.com>

* [Peek] Unsupported File Previewer - Preserve Transparency For File Icons (#22650)

* Preserving transparency or icons

* Remove TODO

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>

* [Peek] Update some installer build steps + assets update (#22683)

* Fix settings & peek.ui.wpf

* Add back missing icon

* Add missing files and actions to installer

* Keep window open if the selected file in explorer is different (only works for single file selection)

* Undo last

* [Peek] Add copy keyboard accelerator (#22647)

* add copy keyboard accelerator

* Fix comments

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>

* [Peek] add WV2 improvements (behavior and UX) (#22685)

* [Peek] added logic to get max monitor size for opening WebView2

* Removed ununsed dependency property

* Added workaround for cases where the web page would not finish navigating in a quick timing, for example google.com.

* Remove window extensions from common and use nullable size argument instead

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>

* [Peek] Merge main, self-contained .NET and fix WebView2 user data dir issue (#22899)

* Merge remote-tracking branch 'origin/main' into peek

* Test sc

* Set WebView2 user data dir

* spellcheck

* Fix comment

* Move check if higher quality image is already loaded to the exact line where we change the Preview bitmap (#23083)

* Fix opening Peek when FE window is set to full name path (#23082)

* Move check for png thubmnail loading priority

* Remove Peek.UI.WPF project

* Remove duplicated method in powertoys setup

* [Peek] Fix selecting files from the correct focused opened File Explorer tab & from Desktop (#23489)

* Get file based on active tab handle instead of window title

* Refactor code to get active tab

* Getting all items from the shell API working again, except for desktop

* Refactor and cleanup com & native code

* Add back removed peek xaml assets in Product.wxs

* Remove some dependencies that do not seem necessary in Product.wxs

* [Peek] Small images (#23554)

* change stretch value

* compare with actual window size

* consider scaling factor

* set max size

* clean up

* clean up

* clean up previewers

* scaling factor in bitmap previewer

* max image size property

* [Peek]Handle errors for HEIC/HEIF and fall back to default previewer if there is no thumbnail (#22684)

* Handle errors when getting filesize by falling back to default previewer

* Bringing back other file types that are fixed with these code changes

---------

Co-authored-by: Samuel Chapleau <sachaple@microsoft.com>

* [Peek] Add unsupported file icon fallback (#23735)

* Refactor icon retrieval, refactor hbitmap to bitmap conversion, add icon fallback

* Add svg to assets in installer

* [Peek] Refactoring of file system models, removal of PngPreviewer, retrieving of folder size via Scripting com reference and other fixes (#23955)

* Refactor icon retrieval, refactor hbitmap to bitmap conversion, add icon fallback

* Add svg to assets in installer

* - Refactor File class into IFileSystemItem, FileItem & FolderItem
- Display size for folders using Scripting namespace
- Remove default app buttons for files or folders not supporting it

* Add better content type via storage apis

* Add check for storagefile in PngPreviewer

* Fix png stretching

* Remove png previewer

* Rename ThumbnailOptions.None to ThumbnailOptions.ResizeToFit

* [Peek] Removed monitor percentage evaluation for the UnsupportedFilePreview control (#24002)

* Remove settings for percentage of windows and keep default min size.

* Fix margin on unsupported control

* Use nullable Size for image size & open file on background thread (#24004)

* [Peek] SVG support (#24237)

* svg previewer

* svg size

* set scaling factor

* set image size

* changed image source type

* non nullable image size

* notify svg previewer changed

* uncomment

* rename BitmapPreviewer

* move svg support

* remove svg previewer

* [Peek] Implementation of a performant and reliable Neighboring Files Query (#24943)

* Use IShellItemArray as the backing array of item

* Finalize and cleanup NFQ implementation

* Cleanup remainder of the code

* Remove unused using

* [Peek] Pin the window position  (#24927)

* [Peek] Telemetry and logging (#25231)

* text preview

* scrolling

* changed size

* webview2 preview

* common preview project

* previewpane: use common project

* peek: use common

* previewpane: moved md

* peek: md

* previewpane: clean up

* clean up

* moved monaco files

* moved formatters

* rename

* moved common monaco helper

* dev files support

* installer

* removed versions

* warnings: culture info

* warnings: names

* clean up

* warnings: dispose

* warnings: default values

* warnings

* warnings: charset

* warnings: exceptions

* suppress warning

* installer: added peek

* changed peek guid

* monaco folders

* peek deps

* peek files

* peek resources

* removed additional monaco folder

* set host name

* Update installer

* hardcode monaco path

* leave single webview control

* moved path to common

* project

* more meaningful todos

* moved temp folder cleanup

* todo

* extension check

* spell: monaco

* spellcheck

* spellcheck

* fix id

* fix spelling

* key to spelling

* id fix

* Fix monaco resolution at install time

* Fix user install. Add needed files

* installer: remove peek localization files. It's a WinUI app

* installer:fix signing

* removed unused

* settings: flyout enable/disable for Peek

* simplify string

* property changed handle

* [Peek][Settings] Peek OOBE page (#25895)

* [Peek] GPO (#25918)

* Add Native methods file to exception

* Fix merge issue on solution file

* Adjust spellcheck

* Remove boilerplate code

* Add module interface telemetry

* Remove change to README.md

* Add entry to README

* Clean up some non-changes

* Fix order of Peek in Settings menu

* [Settings] Make peek descriptions more descriptive

---------

Co-authored-by: Michael Salmon <miksalmon@users.noreply.github.com>
Co-authored-by: Michael Salmon 🐟 <michaelpsalmon@outlook.com>
Co-authored-by: Alireza Ebadi Ghajari <alirezae@microsoft.com>
Co-authored-by: Jessie Su <Jessie.Su@microsoft.com>
Co-authored-by: sujessie <102062556+sujessie@users.noreply.github.com>
Co-authored-by: Daniel Chau <d.chau@alumni.ubc.ca>
Co-authored-by: Daniel Chau <dancha@microsoft.com>
Co-authored-by: jth-ms <73617023+jth-ms@users.noreply.github.com>
Co-authored-by: Robson <rp.pontin@gmail.com>
Co-authored-by: estebanm123 <49930791+estebanm123@users.noreply.github.com>
Co-authored-by: Esteban Margaron <emargaron@microsoft.com>
Co-authored-by: Yawen Hou <Sytta@users.noreply.github.com>
Co-authored-by: Jojo Zhou <yizzho@microsoft.com>
Co-authored-by: Yawen Hou <yawenhou@microsoft.com>
Co-authored-by: Jojo Zhou <39350350+Joanna-Zhou@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Co-authored-by: Seraphima Zykova <zykovas91@gmail.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2023-05-10 10:43:03 -07:00
Orion
c136dbd52c
[tools]Fix typo for CleanUp tool powershell script (#25748) 2023-05-08 12:31:06 +01:00
Randy
81c09685e9
Registry Preview: complete feature with integration with Settings and the Launcher UX (#23709)
* Initial src for Registry Preview

Initial collection of files

* Update MainWindow.Utilities.cs

fixing a few spelling items

* Update expect.txt

* Update App.xaml.cs

* Update MainWindow.Events.cs

* Update MainWindow.Utilities.cs

* Update MainWindow.xaml.cs

* Update expect.txt

* Update MainWindow.Events.cs

* Rename AddPreviewtoRegfile.reg to AddPreviewToRegfile.reg

* Rename RemovePreviewtoRegfile.reg to RemovePreviewToRegfile.reg

* Update Resources.resw

* Update MainWindow.xaml

* Turns on self-contained mode

Updates the csproj file to compile the app as self-contained .
Includes fixes for code that expected the app to be in an ApplicationContainer.
Updates WindowsAppSDK from 1.1.5 to 1.2.230118.102.

* Updated to align with StyleCop errors

Multiple changes across the codebase that now aligns with StyleCop guidelines.

Tested again after the changes, to make sure no new bugs crept in.

* Added comments for spell-checker

Unclear if this side step should be done or not, but the kxz comes from a GUID and the other three names are constants.

* Adding code-custom.dic

Comments didn't work; trying a dic file

* Added four new terms to expects.txt file

Cleaning up attempt to update the spell-checker with dic file and moved it to expects.txt file

* Adding one more string

Adding one more string for Spell-Check

* Adding back egfile

Seems this is needed.

* Correcting a variable name

Seems one of the variable names that changed globally got missed in a XAML file.

* Update project to be more PowerToys friendly

Tweaking names and output file name to fit better with PowerToys.

* First pass at integration into Settings and Launcher

This PR is not as large as it seems:
- RegistryPreview's source moved around to a "better" directory that makes it look like the whole app changed.  It didn't.  In fact, I opened it in Beyond Compare and there's not much difference in the RegistryPreview app.
- Added RegistryPreviewExt that produces a DLL that the Launcher can run the EXE
- Changes to Runner calls the Ext DLL rather than the app
- Settings UI got a bunch of changes to enable the Settings page for enable/disable across ViewModels, Views, and string tables.

Still todo:
- Add "Preview" to .REG files, when the app is enable (and remove it when disabled)
- Update the thumbnail-screenshot in the Settings page
- Add support for OOBE

* Update expect.txt

Added REGISTRYPREVIEWEXT for recent changes and corrected an alphabetic sorting error.

* Updating project file for Release mode

Build failed due to a bad Includes path in Release mode.

* Adds REG registration but breaks settings

This update will update the HKCU branch of the Registry for REG files: if the app in PowerToys is enabled, it adds a Preview item to the context menu of REG files and disabling in PowerToys removes the menu item.

While working on this, I noticed that the application settings were broken, after moving to a self-contained EXE: there must have been old settings from past builds, when it was still using containers and family names.

Added TODO's to add a new way to save settings, likely as JSON.

* Re-enabled app settings

Moved from using ApplicationDataContainer for app settings and now use simple JSON.

Also cleaned up handling the scenario where the Launcher send in the PID from PowerToys' main thread.

Fixed past spelling errors as well.

* Update RegistryPreview.png

Captured new screenshot.

* Integration into OOBE

Integrates new page for Registry Preview into OOBE process.

* Removing old comment and unneeded calls

Two bits of source removed as they aren't needed any longer

Removing a chunk of old commented out code that doesn't make sense anymore.

* Merging file from upstream

Updating some files due to three merge conflicts from upstream changes and a couple of other changes to keep up.

* Update .gitignore

Adding two vcxproj files that have local updates for atls.lib locations.

* Update Resources.resw

Fixing a typo that involved a missing closing tag.

* Fix analyzer warnings

* Fix CI build

* Fix ARM64 build
Project file cleanup

* Add to installer

* expect.txt

* Remove unneeded dll

* Update MainWindow.xaml.cs

Added check for current Theme and adjust TextBox Foreground accordingly.

* Update expect.txt

Cleaning up merge cruft.

* Revert wrong .gitignore changes

* Fix ARM installer

* Update Brushes for textBox to use Theme based versions

Finally figured out how to use the built-in, Theme-aware Brushes for the font colors in the onscreen textBox.  Also have it aligning the font color for the hover state.

* Align configuration in PowerToys.sln

* [installer] Add missing files

* Fix bad merge

* Fixes for stefansjfw's review

Includes:
- two new strings for UX localization
- adds compatibility section for Windows 10
- fix to only track successful activations
- Removes two REG files that were there for examples

* Fixes from review from htcfreek

Updates:
- Fixed an issue where TextBox_TextChanged was firing when you simply opened a file.
- Added clamp to prevent files larger than 10MB from being opened.
- Added support in the UX to show Keys and Values that are deleted via the file
- Added support to specially handle Keys that start with - and Values that have =- in them (delete scenario)
- Changed AppBarButton icon for Edit from Rename to NewWindow

* Create deleted-folder32.png

* Added Registry Preview to GPO

* Update expect.txt

Updating spellchecker works

* Updating Size/Move code for better results

- Moved the size/move to the MainWindow layer
- Cleaned up the JSON settings handling to avoid an access denied on first run

* Improving text handling

Changed how special characters are parse, which helps with live entry.

* Updates to parsing and other fixes

- Renamed the value PNG for parity
- Added new error image
- Added check that values have " at start and finish.
- Added support for a new "ERROR" type for Values
- Fixed support for @ versus "@" in values
- Fixed bug where Save wasn't activating in all scernarios

* Fix signing and versioning

* Update src/settings-ui/Settings.UI/ViewModels/RegistryPreviewViewModel.cs

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

* Apply suggestions from code review

Adds Launch button to the settings page.

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

* Update Resources.resw

Adding strings for new launch button

* Adding new version for GPO

Moving to 0.69.0

* More parsing bug fixes

- Changes to look for [- instead of -[ for syntax deleting keys (fix for developer's mental hiccup)
- Moved [- to top of the decision making stack, as it needs to come before [
- Added new StripEscapedCharacters function for both sides of a Value line
- Fixed crashing bug for scenario where no Keys are parsed before a Value

* Bug fixes from most recent review.

- Dictionary will now be case insensitive when searching for keys
- Added tool tips (and strings) to the images of the Keys and Values
- Updated delete handling for Keys, so that only the leaf-most node gets marked as deleted; also stops the top most roots from being marked deleted.

* Tweaking for @=-

Forces the UX to take @=- and treat it as @="" since that's what Registry Editor would do.

* Removing unused usings

* Updates app description

* Update src/gpo/assets/PowerToys.admx

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

* cleanup proj file
launch process only if module is enabled
add process to bugreport process list

* Add context menu icon

* Update src/modules/registrypreview/RegistryPreviewUI/MainWindow.Utilities.cs

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

* Use modulesRegistry.h to apply/unapply registry changes

* Tweaked window settings

Moved the loading of the settings a little later in the initialization code, which gives more time for things to initialize.

* Update registry.h

Moving the definition out of the detail namespace to the registry name space to fix a compilation issue in RegistryPreviewExt.

* Unapply on creation

If module is disabled in settings.json, on startup reg entries should be unnaplied.
TODO: read m_enabled from settings file on creation

* Removing size/move main window

Added a TODO comment that responds to the size/position settings that are being saved out in the JSON blob on close as it doesn't always work on every PC, as the MainWindow initializes at different times.

* Change to always keep Save As active

No reason for this to be disabled, honestly.

---------

Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
2023-03-27 15:21:46 +02:00
Aaron Junker
95865bfd24
Add devdocs for tools (#24903)
* first push (associated issues: #17951 #761)

* More docs

* Fix spelling

* More docs

* Fix spelling

* Push

* Fix link

* Fix spelling

* Update bug-report-tool.md

* Update verification-scripts.md

* Update doc/devdocs/tools/bug-report-tool.md

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

* Update doc/devdocs/tools/bug-report-tool.md

* Update doc/devdocs/tools/styles-report-tool.md

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

* Update doc/devdocs/tools/build-tools.md

* Update doc/devdocs/tools/clean-up-tool.md

---------

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
2023-03-24 11:38:42 +01:00
Aaron Junker
7d6a7744a8
Fix FancyZones tools build (#24901)
* Fix FancyZones Hit test build

* Fix DrawLayoutTest

* Fix Zonable tester

* Adress PR comments
2023-03-20 19:18:20 +01:00
Jaime Bernardo
eeca3014e7
[BugReport]Add new gpo rules to the reporting (#24307) 2023-02-24 15:47:49 +00:00
Michael Clayton
0524a4bddd
[New Utility]Mouse Jump(#23566)
* #23216 - initial MouseJump commit

* #23216 - Mouse Jump - fix spelling, removing Interop folder

* #23216 - Mouse Jump - removed orphaned project guids from PowerToys.sln

* #23216 - Mouse Jump - removed orphaned project guids from PowerToys.sln

* #23216 - Mouse Jump - switch MS Logger to NLog for nuget package allow-listing

* #23216 added MouseJumpUI.UnitTests.dll to "MS Tests" step in build-powertoys-steps.yml

* [MouseJump] fixed screenshot coords (x & y were transposed) (#23216)

* [MouseJump] close form rather than hide on deactivate (#23216)

* [MouseJump] added UI dll for signing (#23216)

* [MouseJump] close form rather than hide on deactivate (#23216)

* [MouseJump] removed redundant line

* [MouseJump] configure dpi awareness, add NLog.config (microsoft#23216)

* [MouseJump] fix spellchecker errors (microsoft#23216)

* [MouseJump] fixing comment style warning (microsoft#23216)

* [MouseJump] simplified dpi config (microsoft#23216)

* [MouseJump] fixed edge case issue with moving cursor (microsoft#23216)

* [MouseJump] fixed typo (microsoft#23216)

* [MouseJump] added attribution (microsoft#23216)

* [Mouse Jump] fix attribution link and spelling (microsoft#23216)

* Add MouseJump to installer

* Fix centralized version control

* Add Quick Access enable/disable entry

* Fix analyzer error in GPO

* Fix botched merge

* Disabled by default and remove boilerplate code

* Add GPO definitions

* Add GPO implications when starting standalone

* Update hotkey when it's changed in Settings

* Use standard Logger

* Add OOBE strings for Mouse Jump

* Add telemetry

* Update installer

* Add signing

* Add to bug report tool

* Address PR feedback
2023-02-24 13:30:30 +00:00
Stefan Markovic
47999199e9
[installer] Log installer to separate file (#24045)
* [installer] Log installer to separate file

* Spellcheck and minor fix

* Delete interop hardlinks before creating them
2023-02-22 10:06:59 +01:00
sosssego
f82babb76a
[Analyzers][CPP] Turn on warning 26493 (#23990)
and change the remaining files
2023-02-13 16:37:26 +00:00
sosssego
10252c3c1e
[Analyzers][CPP]Changes to fix warning 26493 on PowerToys/tools (#23674) 2023-02-08 14:01:40 +00:00
sosssego
17475ec705
[Analyzers][CPP] Turn on warning 26492 (#23492) 2023-02-08 11:54:16 +00:00
sosssego
956eb98125
[Analyzers][CPP] Turn on rule 26497 (#23119)
* Turn on warning 26497
This function function-name could be marked constexpr if compile-time evaluation is desired.

* C++20 has constexpr swap

* as constexpr is not only for compile time,
make all functions that can be constexpr constexpr

* constexpr functions are implicity inline
2023-02-08 10:59:34 +00:00
sosssego
d84a13bb7e
[Analyzers][CPP]Turn on warning 26471 (#23103)
Don't use reinterpret_cast. A cast from void* can use static_cast
2023-01-16 11:18:55 +00:00
Stefan Markovic
6ac508fb93
Self-contained .NET (#22217)
* dotnet sc

* MD preview - C# app

 - working self-contained

* Gcode preview - C# app

* DevFiles preview - C# app

* Fix passing path with spaces as cmd arg and monacocpp proj file

* Pdf preview - C# app

* Svg preview - C# app

* Fix comment

* Gcode thumbnail - C# app

TODO:
	- installer
	- why IThumbnailProvider and IIntializeWithFile doesn't work?

* Pdf thumbnail - C# app

TODO:
        - installer
        - why IThumbnailProvider and IIntializeWithFile doesn't work?

* Pdf thumbnail - C# app

TODO:
        - installer
        - why IThumbnailProvider and IIntializeWithFile doesn't work?

* Fix GcodeThumbnailProviderCpp.vcxproj

* Svg thumbnail - C# app

TODO:
        - installer
        - why IThumbnailProvider and IIntializeWithFile doesn't work?

* Fix Svg tests

* Thumbnail providers - installer

* Self-contained Hosts and FileLocksmith

* Fix hardcoded <RuntimeIdentifier>

* Remove unneeded files

* Try to fix Nuget in PR CI

* Prefix new dlls with PowerToys.
Sign new dlls and exes

* Add new .exe files to ProcessList

* ci: debug by listing all env vars

* ci: try setting variable in the right ci file

* Bring back hardcoded RuntimeIdentifier

* ci: Add comment and remove debug action

* Remove unneeded lib

* [WIP] Platform conditional dotnet files & hardlinks

* Cleanup

* Update expect.txt

* Test fix - ARM installer

* Fix uninstall bug

* Update docs

* Fix failing test

* Add dll details

* Minor cleanup

* Improve resizing

* Add some logs

* Test fix - release build

* Remove InvokeOnControlThread

* Test fix: logger initialization

* Fix arm64 installer

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
2022-12-14 13:37:23 +01:00
Josh Soref
150e7d40dd
Check spelling 0 0 21 (#22335) 2022-11-29 11:41:22 -08:00
sosssego
6a6c45189e
[Analyzers][CPP] Turn on warning 4458 (#22265)
* Turn on warning 4458

Fix the errors by changing variable names and
supressing the warning on winRT GDI headers

* explaining the warning disables
2022-11-29 14:10:48 +00:00
sosssego
2074d32cb1
[Analyzers][CPP]Turn on warning 4701 (#22151) 2022-11-22 20:02:40 +00:00
sosssego
e5f171c836
[Analyzers][CPP]Turn on warning 4456 (#22087) 2022-11-22 18:20:32 +00:00
sosssego
f408c34aca
[CPP][Analyzers] turn on warning 4189 (#21522)
* Turn on 4189 and fix code

* changes from PR comments
2022-11-14 22:15:58 +00:00
sosssego
78f5b4c3a4
[Analyzers][CPP] turn on Warning 4100 (#21449)
* Analyzers CPP

Changing the warning level from 3 to 4.
change some project files to make them use the warning config in cpp props file.

* Analyzers C++ turn on warning 4706

Change Cpp.Build.props file to enable 4706
fix BugReportTool code to get rid of 4706

* Turn on warning 4100 and fix the code

* Follow c++ core guidelines

* Adapting to PR comments
2022-11-09 14:41:14 +00:00
sosssego
c51103404f
[Analyzers][CPP] turn on Warning 4706 (#21434)
* Analyzers CPP

Changing the warning level from 3 to 4.
change some project files to make them use the warning config in cpp props file.

* Analyzers C++ turn on warning 4706

Change Cpp.Build.props file to enable 4706
fix BugReportTool code to get rid of 4706

* disable 4706 for external code
2022-11-08 17:34:21 +00:00
ivanstosic-janea
db191b8b75
[New PowerToy] File Locksmith (#20930)
* Imported offline solution

* Make solution compile

* Add Windows sample, doesn't work?

* Added new project to implement the dll

* Remove unneeded header

* Implemented IUnknown part of ExplorerCommand

* Implemented IExplorerCommand methods

* Implemented ClassFactory

* Implemented DLL register/unregister

* Implemented other DLL exports, not working?

* Implemented IShellExtInit inferface

* Implemented IContextMenu, it works!

* Implement command data fetching

* Make sample project compile on VS 2022

* Add plan

* Implement Lib as separate project

* Implemented IPC, not tested

* Console UI project skeleton

* Implemented basic console UI

* Implemented piping, there are bugs

* Prototype works

* Remove old project

* Added GUI project skeleton

* Mitigate issue with WinUI3

* Added a control for displaying results

* Add button

* Implement core functions in lib project

* Call new library function from console main

* Implement showing results

* Improve UI

* Implemented subdirectory search

* Remove useless code

* Set window size

* UI adjustments

* Implement killing process

* Rename variable

* Add lib project to main solution

* Add Ext and GUI projects to solution

* Tweak packages for GUI project

* Add a settings page

* Add a few resource strings

* Add one more resources string

* VS keeps trying to correct this

* Add references to File Locksmith in /,github

* Implement some parts of FileLocksmithModule

* Change output directory

* Change target name and add to runner

* Add logger

* Started implementing settings backend

* Fix log folder

* Settings work

* Add some basic tracing

* Attempt at adding resources

* Remove junk files

* Added missing defines

* Replaced some constants with resources

Something's not working

* Move resources to the Ext project

* Remove experiment

* Add binaries for signing

* Improve tracing

* Remove old Settings calls

* Show something when there are no results

* Change window title

* Move computation to another thread, improve UX

* Increase font size for default text

* Remove entries for killed processes

* Show user name

* Remove nonrecursive implementation

* Implement back end for getting file names

* Show list of files, UI tweaks

* Remove useless includes

* Implement back end for getting full process path

* Dark title bar on dark themes

* Using Expander, other UI adjustments

* Show "No results" after killing all processes

* Show progress ring

* Update configuration mapping

* Revert "Update configuration mapping"

This reverts commit d8e13206f3c7de3c6dbf880299bfff3bf9f27a37.

* Fixed solution configuration, ARM64 should build

* Backend for refreshing

* Variable window size

* Add refresh button

* New WinUI3 C# project for FL

* Started porting functionality

* Add Interop project

* Move IPC to Ext project

* Ported native functions to Interop

* Ported finding processes

* Ported most of Main Window functionality

* Display paths of files

* Implement killing processes

* Use resource string for "End Task"

* Remove entries for terminated processes

* Show User name

* Set default window size

* Make the new UI the default

* Reading paths from stdin, completed port to C#

* Fix small bug

* Moving to MVVM

* Adding Labs

* Merge branch 'ivan/file-locksmith' of https://github.com/microsoft/PowerToys into ivan/file-locksmith

Removing one parent commit for cleaner history

Co-Authored-By: Niels Laute <niels.laute@live.nl>

* Reintroducing features

* Moving UI strings to resources file

* Restored functionality

* Add missing dlls

* Add FIle Locksmith to publish.cmd

* Rebase fixes

* Try updating nuget.config

* Fix copy-paste blunder

* Add File Locksmith UI for publishing

* Add .pubxml file in FileLocksmith

* Change build output folder

* Fix installer build issues

Remove old projects from solution so MSBuild doesn't build them.
Downgrade target framework to what most other projects are using.
Fix publishing profile and project runtimes.
Remove unused CsWinRT references.

* [CI] Add clear to nuget packages

* Fix module reference counting

* Fix nuget for release CI

* Fix version and signing

* Fix path for resources

* Fix incorrect results when running 2 instances

* Fix default nuget source

* Windows 10 icon and fallback for UI

* Code clean-up and spaces instead of tabs

* Add gif showcasing FL

* Add screenshot of File Locksmith for Settings

* Add new files to the installer

* Add OOBE page

* Showing selected paths in the header

* Tweak path list

* Added new, wider gif

* Add GPO

* Add some logs

* [CI]Get CommunityToolkit.Labs from BigPark feed

* [CI]Use azure package feed for Nuget in release

* [CI]Another try for the labs source

* Revert changes to feed

* Use RestoreAdditionalProjectSources

* Add tooltip to file list

* Change tooltip to not trim the lines

* Add Tips and tricks section mentioning elevated

* Add some more logs messages.

* Grammar fix

* Add to bug report tool

* Fix UI virtualization not working

* Disable virtualization to avoid crashes

* Get better virtualization

* Add dialog instead of tooltip to show list of items

* No results refresh icon is now a button too

* Use managed methods for handling processes

* Remove registry code from Ext.

* Support drives too

Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2022-10-28 14:51:21 +01:00
Jaime Bernardo
a63288009a
[GPO] Add policies for configuring utilities enabled states (#21411)
* Add GPOWrapper headers and C++/WinRT library

* Check GPO before starting utilities

* Show message on GPO having disabled preview panes.

* Don't generate thumbnails if GPO disabled

* Fix FancyZonesEditor unable to recognize GPOWrapper

* Move settings view models to the settings project

* Use GPO to block enabling utilities in Settings

* Hide context menu entries when gpo disables utilities

* Apply gpo policies when enabling PowerToys on runner

* Add version and metadata to dll

* Add GPOWrapper to the installer

* Fix MSBuild errors on WPF apps by using Projection

* Signing

* Add gpo files and publish them

* Add GPO policies to the bug report tool

* Add some documentation for using GPO

* Mention support to actual lowest supported version of Windows

* Move PowerToys to the root of administrative templates tree

* Save policies on Software\Policies\PowerToys

* Support both machine and user scopes

* Fix documentation to reference computer and user scopes

* Mention incompatibility with outlook in gpo

* Set a better folder structure for gpo assets

* Move PDF Handler warning to the description

* Update doc/gpo/README.md

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

* Add actual minimum version of PowerToys to gpo files

* Fix identation

* Remove GPOWrapper Readme

* Add Active Directory instructions to doc

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
2022-10-26 14:02:31 +01:00
sosssego
19c4255c7d
[Analyzers][CPP]Turn on C26451 and fix code (#21230)
* Turn on rule as error and fixing code

* Add packages to external include paths

* Disable warrnings on external code.
2022-10-25 17:33:23 +01:00