Commit Graph

251 Commits

Author SHA1 Message Date
Enrico Giordani
6787af413e
Increment version to 0.15.1 (#1428) 2020-03-03 22:31:57 +01:00
stefansjfw
0199b4e212
Handle exception while editor is parsing custom layouts (#1430)
* Fix migrating never applied custom zonesets

* Handle json parsing exception in LoadCustomModels()
2020-03-03 22:31:22 +01:00
stefansjfw
121be772df
Fix migrating never applied custom zonesets (#1427) 2020-03-03 21:48:22 +01:00
Enrico Giordani
f3b3e3eded
Sanity check for imported settings that may have invalid data. (#1426) 2020-03-03 21:45:25 +01:00
vldmr11080
6556e1b4a2
Skip cloning device information from parent virtual desktop if it is deleted. (#1415) 2020-03-02 18:52:38 +01:00
vldmr11080
66892aea60
Secure acces from multiple threads to JSONHelpers (add missing lock) (#1375) 2020-02-27 09:52:14 +01:00
stefansjfw
e2026aedbc
Fix typo in powerrenamer README (#1378) 2020-02-26 16:33:50 -08:00
yuyoyuppe
16b1bfa4d0 increment version to 0.15 🎉 2020-02-26 23:21:17 +03:00
vldmr11080
1f8f9aaf81
Revert "Swallow shift keyboard event when dragging window (#1362)" (#1363)
This reverts commit 2f9b753c5b.
2020-02-26 08:11:39 +01:00
vldmr11080
2f9b753c5b
Swallow shift keyboard event when dragging window (#1362) 2020-02-25 21:03:14 +01:00
Seraphima Zykova
b1ac1859be
Removed FancyZones unit-test (#1360) 2020-02-25 17:14:59 +03:00
vldmr11080
733613ad28
Introduce handling of new/old work areas (#1296)
* Introduce handling of new/old work areas (defined by virtual desktop id and monitor)

* Save data to JSON storage only once after we register all deleted virtual desktops

* Update saving mechanism

* Remove resolution from unique identifier

* Update comments related to new unique identifier

* Don't handle NULL GUID as it is default one

* Revert "Remove resolution from unique identifier"

This reverts commit 5a36651217.

* Revert "Update comments related to new unique identifier"

This reverts commit 8e89802549.

* removed MigrateDeviceInfoFromRegistry

Co-authored-by: Seraphima Zykova <zykovas91@gmail.com>
2020-02-18 11:55:08 +01:00
Seraphima Zykova
604070763d
Add telemetry event for FZ editor (#1294)
* trace zones settings changes
2020-02-17 19:40:02 +03:00
yuyoyuppe
9607888fc5 PowerRename: bring the rename dialog to foreground 2020-02-17 18:38:14 +03:00
Andrey Nekrasov
1e6936a8c3
Thread safety for FanncyZonesData (#1281)
* FancyZones: make FancyZonesData thread-safe

* fixup: format affected sources

* fixup: clang-format case-style and format FancyZones.cpp

* fixup! add missing lock
2020-02-17 18:28:49 +03:00
Andrey Nekrasov
fa3ce8de64
MSIX: add missing dependencies for the FancyZonesEditor (#1298) 2020-02-14 11:57:20 +03:00
Seraphima
59d218d623
Add telemetry event for PowerRename settings (#1279)
* moved MAX_INPUT_STRING_LEN constant
* added settings changed event log
2020-02-13 12:44:03 +03:00
Seraphima
8c86c3dc1b
Update FancyZones telemetry event for settings changed (#1268) 2020-02-12 13:08:11 +03:00
Chris Davis
679b26cde4
Set the rename button to the default button on the dialog. Prior to this change, users would setup the rename inputs and hit return only to discover the cancel button had the key focus and all work would be lost. (#1271) 2020-02-11 11:33:30 -08:00
Seraphima
79c625d737
Persist app zone history in real time (#1257)
* save settings every time changes are performed
* settings are not saved on app exit
2020-02-11 14:34:37 +03:00
Seraphima
a1d277e771
Unit-tests fixes (#1265)
* fixed typecast warnings
* removed unneded tests
2020-02-11 14:33:41 +03:00
vldmr11080
bde0f2f0ba
Fix crash when saving any module settings while module being disabled (#1259) 2020-02-11 07:57:11 +01:00
stefansjfw
53f830bb38
Migrate FancyZones data persisting from Registry to JSON file (#1194)
* Migrate FancyZones data persisting from Registry to JSON file

* Address PR comment: Remove redundant check

* Addres PR comment: Remove unused Dpi and add CmdArgs enum

* Address PR comment: Make methods const and inline

* Address PR comments: Expose GenerateUniqueId function and use const ref instead of passing wstring by value

* Address PR comment: Use lamdba as callback

* Address PR comment: Move GenerateUniqueId to ZoneWindowUtils namespace

* Address PR comment: Use regular comparison instead of std::wstring::compare

* Address PR comment: Use std::wstring_view for tmp file paths

* Address PR comment: Use scoped lock when accessing member data

* Address PR comment: Remove typedefs to increase code readability

* Address PR comment: removed nullptr checks with corresponding tests

* Address PR comment: Move ZoneSet object instead of copying

* Address PR comment: Make FancyZonesData instance const where possible

* Remove unnecessary gutter variable during calculating zone coordinates

* Remove uneeded subclass

* Avoid unnecessary copying and reserve space for vector if possible

* Save FancyZones data after exiting editor

* App zone history (#18)

* added window and zone set ids to app zone history

* Rename JSON file

* Remove AppZoneHistory migration

* Move parsing of ZoneWindow independent temp files outside of it

* Unit tests update (#19)

* check device existence in map
* updated ZoneSet tests
* updated JsonHelpers tests

* Use single zone count information

* Remove uneeded tests

* Remove one more test

* Remove uneeded line

* Address PR comments - Missing whitespace

* Update zoneset data for new virtual desktops (#21)

* update active zone set with actual data

* Introduce Blank zone set (used to indicate that no layout applied yet). Move parsing completely outside of ZoneWindow.

* Fix unit tests to match modifications in implementation

* Fix applying layouts on startup (second monitor)

Co-authored-by: vldmr11080 <57061786+vldmr11080@users.noreply.github.com>
Co-authored-by: Seraphima <zykovas91@gmail.com>
2020-02-10 14:59:51 +01:00
Bartosz Sosnowski
0fdc1d0a1f
ShortcutGuide, FancyZones: split window filtering (#1225)
Splits the code use to filter windows for FancyZones and the
"active window" for the ShortcutGuide. The FancyZones logic is preserved
and merged into a single function. We keep it in common.h, as it might
be also used in other PowerToys, like maximized to new desktop. We do
however change the return type to be more descriptive. It also returns
a separate flag for if the window has a visible owner. This can be used
to implement the approved apps list.

For the ShortcutGuide, the logic is relaxed to include more windows. One
example are Explorer properties windows. Those are (and should) filtered
by the FancyZones, but should appear in the window preview in the SCG.

The new return type also includes information if the window will react
to the default Windows Snap. This is not ideal though. Currently, SCG
can only disable the entire "Windows Controls" group. OTOH windows like
"Save As..." dialogs can be snapped to corners etc., but cannot be
minimized nor maximized. Until SCG can separately disable those buttons
we will display the buttons in the enabled state only if the window
supports all settings. In the future, we should integrate FancyZones
snap override here too.
2020-02-07 15:53:57 +01:00
Andrey Nekrasov
f963d28ba8
MSIX: keep PowerRename local COM server in memory (#1222) 2020-02-07 14:21:10 +03:00
Bartosz Sosnowski
5d8e894802
FancyZones: if window is not interesting, allow Windows snap (#1186)
Do not swallow WinKey+Arrow events for non-interesting windows. This makes apps that are in the "excluded apps" list behave as if "Override windows snap keys" is disabled - they will react to the Windows default snap.
2020-02-06 13:12:59 +01:00
Bartosz Sosnowski
ed35a143ec
FancyZones: allow windows with invisible or zero-sized owner to be zonable (#1216) 2020-02-05 12:27:51 +01:00
Bartosz Sosnowski
25e882eb78
Fancyzones: unify window filtering (#1184)
Makes FancyZone use the same code for filtering windows when windows are
being dragged and when moved by WinKey + arrows.
2020-02-03 09:32:38 +01:00
Betsegaw Tadele
b4f81a0c2a
Import the source code for Window Walker (#1177)
Import the codebase for Window Walker 

- Not loaded into the module list 
- Not added it to the installer list.
2020-01-31 15:14:37 -08:00
yuyoyuppe
f8bcf52741
MSIX: add a dedicated .rc for UWPUI which joins both UI and DLL .rc's (#1139) 2020-01-23 14:42:28 +03:00
vldmr11080
1a10366ab7
Align zone dimensions from layout preview with those from grid editor (#1115) 2020-01-22 20:15:35 +01:00
Alekhya
925b6694ac
Localize C++ Projects of FancyZones (#1130)
* localized dllmain.cpp  of fancyzones project

* localized FancyZones.cpp

* format fancyzones.rc file

* Moved SuperFancyZones back to being a string instead of having it in the resource file as it is the window class name

* reverted changes for window name

* Formatted fancyzones rc file
2020-01-22 10:24:00 -08:00
Alekhya
1ad16ade86
Localize the Shortcut guide PowerToy (#199) (#1126)
* Localized shortcut_guide.cpp

* localized overlay_window.cpp

* formatting changes

* Localize overlay window

* removed the README link from the set of localized resources

* Typo: changed upper to lower
2020-01-22 09:43:49 -08:00
Alekhya
45e3f02832
Localizing C# Project of FancyZones (FancyZonesEditor) (#199) (#1122)
* removed hardcoded strings from CanvasEditorWindow.xaml

* removed hardcoded strings from GridEditorWindow.xaml

* loc

* Localized MainWindow

* reverting MainWindow.xaml as it is not rendering the window as expected

* Changed the resource settings from internal to public

* the culture is set based on the culture of the system UI set in the system settings

* Removed the french resource files used for testing

* Localized canvasWindow and mainwindow

* Removed setting the UI culture explicitly as it would be implicitly set to the culture of system UI

* Removed redundant header file
2020-01-21 12:02:31 -08:00
Alekhya Kommuru
23bba969dd Merge remote-tracking branch 'upstream/master' into locPowerRename 2020-01-20 11:54:20 -08:00
Alekhya Kommuru
9c743acd2d Removed some IDs from resource file. Changed SHIFT to Shift 2020-01-20 11:52:46 -08:00
Bartosz Sosnowski
62da7c7be4
FancyZones: remove dialog boxes filtering (#1076)
* FancyZones: remove dialog boxes filtering

* FancyZones: add the "no owner window" filter to the WinKey + arrow zone snapping
2020-01-20 11:02:12 +01:00
Alekhya Kommuru
653a84d3a9 reverting formatting of files 2020-01-17 14:38:41 -08:00
Alekhya Kommuru
197286c21e moved app name to constructor to init only once 2020-01-17 14:23:07 -08:00
Alekhya Kommuru
bf48729354 rebuilt project PowerRename 2020-01-17 11:57:53 -08:00
Alekhya Kommuru
a504a75166 Removed string resources from the settings.cpp file 2020-01-17 11:25:42 -08:00
Alekhya Kommuru
44ac22c0de Added new lines to the end of the file 2020-01-17 11:12:23 -08:00
Alekhya Kommuru
df1c6b9b0b Removed get_res_string_wchar and used the get_resource_string() function instead which returns a wstring typecast into wchar* 2020-01-17 11:06:57 -08:00
Alekhya Kommuru
bde0e0b86a Merge remote-tracking branch 'upstream/master' into locPowerRename 2020-01-16 13:58:59 -08:00
Arjun Balgovind
c1232a7001 Shifted three functions to common (#1101) 2020-01-15 23:06:22 -08:00
Alekhya Kommuru
12c4dbf0e5 added common as a reference project 2020-01-15 16:44:18 -08:00
Alekhya Kommuru
31a01ab227 Modified resourceIDs for strings in the table 2020-01-15 13:57:05 -08:00
vldmr11080
5dc60b9f35
Fix reversed order of zones in layout (#1071) 2020-01-15 20:20:10 +01:00
vldmr11080
588f134de8
Revert "Fix misaligned display of zones in layout priview and grid editor (#1010)" (#1097)
This reverts commit d03690cffd.
2020-01-15 19:34:23 +01:00
Alekhya Kommuru
d0648d1754 built the proj 2020-01-14 16:40:40 -08:00
Alekhya Kommuru
1e3486af94 localized the settings file 2020-01-14 16:39:03 -08:00
Alekhya Kommuru
8f2b2aba12 localized powerRenameExt 2020-01-14 15:23:21 -08:00
Alekhya Kommuru
0b1232b65d localized dllmain powerrename 2020-01-14 15:17:08 -08:00
Alekhya Kommuru
969abe015c added the helper functions 2020-01-14 15:00:05 -08:00
vldmr11080
d03690cffd
Fix misaligned display of zones in layout priview and grid editor (#1010)
Fix misaligned display of zones in layout preview and grid editor
2020-01-09 22:40:38 +01:00
Yosef Durr
a2a683d31e adding fancy zone opacity setting, enhancement #631 (#1008)
* adding fancy zone opacity setting, enhancement #631

* applying zone opacity setting to all zones during zone selection

* changing opacity setting to percentage
2020-01-06 09:59:18 -08:00
Chris Davis
3ffd007cc0
Ensure previous search and replace texts are evaluated and updated in the UI at startup (#1043)
Ensure stored settings get evaluated after initial enumeration

There was a bug where the list view was not getting updated with the results of the search and replace on launch when we are using a stored search or replace text from a previous session.
2020-01-04 00:39:02 -08:00
Clint Rutkas
b753f920e1 #768 2019-12-26 11:06:59 -08:00
Bartosz Sosnowski
47bcb117b4
FancyZones: do not zone windows on startup (#982) 2019-12-24 15:47:28 +01:00
yuyoyuppe
62c65659cc format changed files 2019-12-24 17:06:10 +03:00
yuyoyuppe
249addebff powerrename: implement shellext support for UWP 2019-12-24 17:06:10 +03:00
Clint Rutkas
b58d4e306a
Merge pull request #1000 from crutkas/crutkas/923
fix for #923
2019-12-23 20:17:17 -08:00
Clint Rutkas
06b1e43492
Update for #980
clearly stating when "Match all" needs to be enabled
2019-12-20 15:49:14 -08:00
Clint Rutkas
2c1ffde3ed fix for #923 2019-12-20 14:53:56 -08:00
vldmr11080
918ebc62a2
When spacing is set to 0 or turned off display 1px border so user can distinguish zone edges. No spacing will be applied in actual layout. (#994) 2019-12-20 19:46:14 +01:00
Bartosz Sosnowski
6ee848b279
FancyZones: handle minimized windows correctly (#986) 2019-12-19 16:36:24 +01:00
Bartosz Sosnowski
db5f1622bd
FancyZones: do not zone invisible windows (#983) 2019-12-19 16:02:24 +01:00
yuyoyuppe
48b89609e2 fancyzones: restrict dpi unaware windows horizontally to the current display to avoid unwanted resize 2019-12-17 15:37:10 +03:00
yuyoyuppe
303d1fef6b
PCH: remove headers which are actually could be changed (#950) 2019-12-17 11:21:46 +03:00
Clint Rutkas
511f71c369
Merge pull request #927 from microsoft/dev/crutkas/codeAnalysis
code analysis / style cop adjustments for .NET
2019-12-13 14:09:19 -08:00
vldmr11080
d284ecdab4 Fix outstanding warning messages (#924) 2019-12-13 18:55:30 +01:00
Clint Rutkas
0ff2e212d5 #817 2019-12-12 17:11:47 -08:00
Clint Rutkas
107595fcb2 last stylecop issue 2019-12-12 15:18:31 -08:00
Clint Rutkas
32fb634a4d few more fixes 2019-12-12 15:07:52 -08:00
Clint Rutkas
51fbcc736e fix for CA0507 2019-12-12 15:02:22 -08:00
Clint Rutkas
360a22c537 fixed rest of info items 2019-12-12 15:00:24 -08:00
Clint Rutkas
63cb5ab883 fixed a bunch of infos 2019-12-12 14:50:25 -08:00
Clint Rutkas
151a937c10 fixed a bunch more 2019-12-12 14:34:25 -08:00
Clint Rutkas
4c88c9b029 adjusting event names 2019-12-12 13:59:58 -08:00
Clint Rutkas
24664cc859 moving converters, fixing spacing issues 2019-12-12 13:51:58 -08:00
Clint Rutkas
a187456ac3 Fixed a lot of line issues, few auto 2019-12-12 13:44:06 -08:00
Clint Rutkas
9e4752b114 fix line issues 2019-12-12 13:34:06 -08:00
Clint Rutkas
de64b33bb8 Fixing blank lines 2019-12-12 13:26:02 -08:00
Clint Rutkas
826858c170 Adding in sytlecop and fixing issues 2019-12-12 12:13:31 -08:00
Clint Rutkas
f2400ee089 Getting analysis up and going 2019-12-12 11:23:36 -08:00
yuyoyuppe
f385e46927
Devdocs reorganisation (#913)
* docs: split usage and dev docs

* # This is a combination of 2 commits.
# This is the 1st commit message:

docs: split usage and dev docs

# The commit message #2 will be skipped:

# fixup add docs

* docs: add runner documentation and move hooks documentation to devdocs

* docs: add stubs for modules technical description

* docs: add paragraph about event thread-safety

* docs: add 'Current modules' section header
2019-12-12 12:25:19 +03:00
vldmr11080
c31262b97e Flash zones only when new virtual desktop is created (#818) 2019-12-12 10:10:55 +01:00
ryanbodrug-microsoft
9fad2d68af
Merge pull request #912 from ryanbodrug-microsoft/user/ryanbod/fix_unit_tests_fancyzones
[FancyZones][UnitTests] Fixing TestDeviceId, and TestUniqueId.
2019-12-11 08:49:45 -08:00
ryanbodrug-microsoft
51180adeb4 Autoformatting document. 2019-12-11 08:34:18 -08:00
vldmr11080
31c4ab8ac0 Make sure FancyZones Editor window is on top of PowerToys settings window (#911) 2019-12-11 09:41:05 +01:00
ryanbodrug-microsoft
4f9d31e832 [FancyZones][UnitTests] Fixing TestDeviceId, and TestUniqueId to unit tests.
1. Creating a mock ZoneWindowHost.   Previously creating a ZoneWindow would throw an exception if the ZoneWindowHost is null.
2. Passing in HWND() instead of null to get rig of SAL annotation warnings.
2019-12-10 17:17:40 -08:00
ryanbodrug-microsoft
7fc168532c
Merge pull request #902 from ryanbodrug-microsoft/user/ryanbod/getexampleprojecttobuild
Getting the example project to compile, and build.
2019-12-10 15:31:31 -08:00
ryanbodrug-microsoft
c6e839271a This test brake was introduced in the following fix:
1efe5bff9f

It looks to me like the test cases just was also wrong and just wasn't updated with the fix.

I've modified some of the test cases to verify the expected behavior:
1) Slight refactor of the tests to pass in the SearchReplaceExpected and flags for the tests.
2) Using Assert::AreEqual instead of Assert::IsTrue for better error meesaging when failed.
3) Verifying that the behavior is the same with or without match all occurances when using *.
4) Verifying that without the `UseRegularExpressionsFlag` the `.*` characters get replaced, including when MatchAllOccurances is set.
2019-12-10 10:11:21 -08:00
yuyoyuppe
1760af50c8
Format unittests (#906) 2019-12-10 10:28:24 +03:00
ryanbodrug-microsoft
73e33d7ba9 Getting the example project to compile, and build.
1) Adding example project to Debug / Release Builds.
2) Including <string> in common.h
3) Using std::optional instead of PowerToysValues::is_[type]_value
4) Fixing warnings generated by unreferenced 'ex' variable in exception handling.
5) Updated relative path of version.h in exeample_powertoy.rc
2019-12-09 15:04:02 -08:00
vldmr11080
014c2c5249 Use same zone set initially for new virtual desktops of same monitor (#815) 2019-12-06 15:09:27 +01:00
Kevin Horecka
add63d2dde FancyZones: Added ability to use mouse only for interactions with zones (#729) 2019-12-06 12:32:43 +01:00
yuyoyuppe
81bed3d3d5 Format shortcut_example_powertoy according to .clang-format 2019-12-06 14:16:24 +03:00
yuyoyuppe
f22a30ca87 Format shortcut_guide according to .clang-format 2019-12-06 14:16:24 +03:00
yuyoyuppe
7357e40d3f
Use WinRT JSON parser instead of custom cpprestsdk solution (#822) 2019-12-06 11:40:23 +03:00