Commit Graph

1350 Commits

Author SHA1 Message Date
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
09d1af9c46
Common: remove hwnd_data_cache (#1223)
The cache was introduced to improve performance by not querying the
OS for the window process path every time we need to check if the window
is interesting to FancyZones. Since then other changes were made to the
the way we check the windows. Right now, the IsInterestingWindow function is
called when:

  1) WinKey + arrows are used
  2) window is started to be dragged
  3) window is created

1) and 2) are initiated by the user, happen only once per interaction so
their performance impact can be dismissed. The 3) happens all the time
but for the most part the check for WS_CHILD or
GetAncestor(window, GA_ROOT) == window will filter those out. In the
end, only top-level windows will be queried for their path.

Removing the cache improves code readability and will make code
maintenance easier.
2020-02-06 18:04:10 +01: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
0ecfbfad53
FancyZones: filter out WM_POPUP windows if they dont have maximize/minimize button or a sizable frame (#1212)
This filters out TaskView and Win32 menus.
2020-02-05 12:31:35 +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
yuyoyuppe
5089729b18
MSIX: implement initial version of notifications library (#1178) 2020-02-04 19:41:00 +03: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
aa714f7d80
Runner: fix startup task state setting for MSIX (#1181) 2020-01-31 20:35:21 +03:00
yuyoyuppe
ca203435d1 MSIX: hide the "Run at Startup" option if running as packaged 2020-01-29 16:15:18 +03:00
yuyoyuppe
360f7cf9c3 Telemetry: add WebView init failure errors 2020-01-27 20:01:36 +03:00
yuyoyuppe
482ad0e5ee Settings: initialize COM security to allow communication between elevated Settings and WebView 2020-01-27 18:49:35 +03:00
yuyoyuppe
cd6ac4f8c2 Common: implement on_scope_exit helper and typed_storage 2020-01-27 18:49:35 +03:00
Clint Rutkas
79ac2be617
Changes for #1140 and #569 (#1152) 2020-01-27 07:00:41 -08:00
Bartosz Sosnowski
cc99abcd14
Runner: fix restarting with same elevation (#1133) 2020-01-23 15:12:02 +01: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
8132bbac2e updated formatting of common.cpp 2020-01-17 14:32:02 -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
Clint Rutkas
2ae867a7e0
adding in privacy statement, removing About in dialog (#1087)
* adding in privacy statement, removing About in dialog

* added Preview
2020-01-15 10:16:22 -08: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
Bartosz Sosnowski
dad732b7e6
runner: show message box when restarting with different elevation fails (#1061)
Also make the message box appear on top of the settings window.
2020-01-09 18:17:42 +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
Enrico Giordani
c894d72b52
Remove unwanted files (#1037)
Add temp build files to gitignore
2020-01-03 16:10:32 +01:00
Clint Rutkas
25f1dc325d slight bump for fabric ui 2019-12-27 13:35:34 -08:00
Clint Rutkas
38feeee464 npm audit fix to update stuff 2019-12-27 13:19:51 -08:00
Clint Rutkas
d41962f9d1 adjusting elevated permission verbiage to match Windows 2019-12-27 12:28:27 -08:00
Clint Rutkas
03ddadc1ed tweaking language 2019-12-27 10:26:00 -08:00
Bartosz Sosnowski
3e55b61ac0
Runner: fix run as elevated wording (#1023) 2019-12-27 16:20:36 +01:00
Bartosz Sosnowski
5a7f022e40
settings-web: use Windows build-in commands (#1019) 2019-12-27 13:25:34 +01:00
Clint Rutkas
b753f920e1 #768 2019-12-26 11:06:59 -08:00
Enrico Giordani
415a0cdf28
Coding style (runner) (#1013) 2019-12-26 17:26:11 +01:00
Enrico Giordani
9708961654
Coding style (settings) (#1012) 2019-12-26 17:25:56 +01:00
Bartosz Sosnowski
47bcb117b4
FancyZones: do not zone windows on startup (#982) 2019-12-24 15:47:28 +01:00
yuyoyuppe
a321eb8737 MSIX: minor cleanup, add certificate generation script 2019-12-24 17:06:10 +03: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
yuyoyuppe
860087d291 MSIX: implement initial msix installer 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
0fd0a8b7cc format dpi_aware 2019-12-17 15:37:10 +03:00
yuyoyuppe
2e922019d7 DPIAware: implement GetAwarenessLevel and cleanup 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
Bartosz Sosnowski
619ed234a9
Do not run elevated by default (#884)
Make the runner not run as elevated by default. Add a setting for
"run PowerToys as elevated" and buttons to restart the process
with the different elevation levels.
2019-12-16 18:36:52 +01:00
Enrico Giordani
fd8fc679be Run the Settings process un-elevated when possible
and if not possible run it elevated and let the Settings
process deal with it.
Add wrappers for GetModuleFileNameW.
2019-12-16 18:03:37 +01:00
Enrico Giordani
5a3c852b32 format 2019-12-16 18:03:37 +01: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
Seraphima
6e3587dd43 Settings unit tests (#921) 2019-12-12 18:24:00 +01: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
Enrico Giordani
e714cb9e8b
Now working on 0.14.2 (#871) 2019-12-05 19:09:32 +01:00
Bartosz Sosnowski
fed81c8e22
Improve FancyZones window filtering (#856)
Improve FancyZones window filtering and filter out dialog windows
2019-12-04 17:53:54 +01:00
vldmr11080
3a65d5ce23 Revert: Keep window in their zone after layout changes (#852) 2019-12-04 01:55:12 +01:00
Bartosz Sosnowski
0e2d93c630 Make FancyZones not zone invisible, child and tool windows
Fixes "Move newly created windows to their last known zone"
2019-12-03 19:45:03 +01:00
Enrico Giordani
cbe6d19c79
Update FancyZone README for v0.14.0 (#806) 2019-12-02 18:00:14 +01:00
vldmr11080
57845a2739 Don't flash current zone setup when focused window is in full screen (#796) 2019-11-30 14:38:27 +01:00
vldmr11080
9a8ab29330 Reverse logic for keep windows in their zones when fancyzone layout changes (#812) 2019-11-30 12:15:16 +01:00
Enrico Giordani
3095ade94c
Now working on 0.14.1 (#797) 2019-11-28 11:06:23 +01:00
yuyoyuppe
221df3d26d
Fix lack of tray icon #268 by handling initial Shell_NotifyIcon failure (#789)
* Fix lack of tray icon #268 by handling initial Shell_NotifyIcon failure
2019-11-27 17:19:10 +03:00
Bartosz Sosnowski
ee1a1fd614
Prevent number being swallow while dragging. (#788) 2019-11-27 10:32:09 +01:00
Chris Davis
8e8be502fd
Handle DPI change gracefully (#786)
* Ensure icon in context menu is not leaked

* Hande theme/dpi size change gracefully
2019-11-26 19:45:18 -08:00
Bartosz Sosnowski
ae4413d0aa
Improve key code to key name mapping. (#784)
Use the key detected by WebUI and our mapping only for from_settings call.
Replace the old Win + ~ with the correct value
2019-11-26 16:14:34 +01:00
Enrico Giordani
51b791f9c0
Version 0.14.0 (#782) 2019-11-26 11:46:22 +01:00
Mike Harsh
4c600f5748
Updated shortcut key information 2019-11-25 06:06:29 -08:00
Bartosz Sosnowski
d84342733d Prevent ShortcutGuide from crashing when it is being disabled while shown. 2019-11-25 15:06:06 +01:00
Bartosz Sosnowski
d6f0f9ec0e FancyZones settings: show proper hotkey even when wrong key was saved before
This makes the Hotkey settings object ignore the key value stored in
json. Instead it will be deduced from the current keyboard layout and
the vk_code.
2019-11-25 11:54:10 +01:00
Bartosz Sosnowski
fbc922fe97 Add some margins to settings icons 2019-11-22 16:19:36 +01:00
Enrico Giordani
4be84e035f
revert overrideSnapHotkeys logic after regression (#756) 2019-11-22 10:56:11 +01:00
Bartosz Sosnowski
254474d12d Make the hotkey control display correct key
Credit to @doterik for the idea in https://github.com/microsoft/PowerToys/issues/700#issuecomment-554329895

RApplies to https://github.com/microsoft/PowerToys/issues/700
2019-11-20 10:00:53 +01:00
Bartosz Sosnowski
5615987ea2 Make some settings descriptions wrap correctly
Applies to https://github.com/microsoft/PowerToys/issues/712
2019-11-20 10:00:53 +01:00
Bartosz Sosnowski
3a93246f08 More padding after PowerToy description
Applies to https://github.com/microsoft/PowerToys/issues/716
2019-11-20 10:00:53 +01:00
Bartosz Sosnowski
633784fae2 Use dynamic version in settings
Applies to https://github.com/microsoft/PowerToys/issues/736
2019-11-20 10:00:53 +01:00
Bret
28d7835327
User/bretan/fz remove legacy editor (#1)
* Removed and runs
Still needs some extra cleanup and addressing open issues

* Removed and runs
Still needs some extra cleanup and addressing open issues

* Clean

* Update
2019-11-18 15:29:42 -08:00
Bartosz Sosnowski
03438f9192
FancyZones: improve windows and apps filtering (#673)
Unifies the way windows are considered "interesting" by FancyZone.
Berfore the change WinKey + arrows would use different method than
dragging. This PR makes both use the WinKey + arrows method.

Cleans up FancyZones Settings.cpp by removing m_configStrings variable.
Contrary to its name it was used to create color picker control.

Adds a multiline option to the text input to settings. Uses this to
provide the user with a way to exclude certain apps from snapping to
zones.
2019-11-18 10:29:56 +01:00
yuyoyuppe
cb13cfdda7
FancyZonesEditor: open a tab with the selected layout on startup (#715) 2019-11-15 10:40:10 +03:00
Chris Davis
b490a72c1d
Ensure icon in context menu is not leaked (#709) 2019-11-13 14:13:14 -08:00
Chris Davis
3c0b479669
Merge pull request #697 from chrdavis/master
Update to PowerRename
2019-11-12 14:16:10 -08:00
Chris Davis
c9ad09226b Remove call to save_to_settings_file 2019-11-12 13:56:12 -08:00
yuyoyuppe
4e771ecfb7
initialize all OnThreadExecutor fields and clarify intent further (#701) 2019-11-12 18:29:54 +03:00
vldmr11080
be86cd4028 Customize system menu items through dedicated API (#677)
Document new interface changes.
2019-11-12 11:48:14 +01:00
Chris Davis
3ddbe92f37 Fix incorrect setting type in set_config handler 2019-11-11 23:28:31 -08:00
Chris Davis
e328c5d505 * Fix crashing bug in event vector cleanup
* Fix warnings in settings.cpp
* Add settings to ui of powertoys
2019-11-11 20:58:39 -08:00
Chris Davis
1e89054897 * Ensure rename dialog is centered
* Ensure children are renamed before parent items
* Add settings handler
* Replace old text referencing smart rename with power rename
2019-11-11 11:00:42 -08:00
Chris Davis
997ea3a2f5 A couple minor bug fixes 2019-11-09 00:30:00 -08:00
yuyoyuppe
e8edbd5394
clear FancyZones::m_zoneWindowMap on Destroy, since it stores 'this', causing a leak (#664) 2019-11-07 22:05:12 +03:00
yuyoyuppe
f3e25ae3e6
Fix for different per-monitor scaling (#657)
* Use DPIAware::DEFAULT_DPI

* Make runner DPI-unaware, since it doesn't need to use a Per Monitor V2 DPI.

* Programmatically enable "Per Monitor V2 DPI" for the runner proccess and use a separate DPI-unaware thread for the corresponding API calls

* Increase PCH memory limit for settings project

* Address review issues

* Draw zoneWindows properly scaled
2019-11-07 21:56:32 +03:00
yuyoyuppe
a9518c2e55 Wrap around colorIndex in a colors array (#669) 2019-11-07 17:50:04 +01:00
yuyoyuppe
c4fc67301c Add switch to turn off keyboard hooks while debugging, since they could mess system-wide input 2019-11-07 09:52:34 +01:00
Bartosz Sosnowski
96aa6ae3ef
Fix Chrome tab move leaving zone highlighted (#656)
Fixes: https://github.com/microsoft/PowerToys/issues/534
2019-11-05 14:29:42 +01:00
Chris Davis
389590e45d Ensure columns are resized when the dialog is resized. Also switch to a modeless experience instead of modal for the dialog. We no longer disable the parent window. 2019-11-03 22:22:35 -08:00
Chris Davis
1efe5bff9f Fix single regex search replace
Fix an issue where regular expression search and replace was not being done correctly when MatchAllOccurences is not specified.
2019-11-01 23:56:29 -07:00
Chris Davis
cc7a706f52 Fix painting issue with buttons after resize 2019-11-01 08:52:54 -07:00
Chris Davis
d4256dad30 Allow resizing of PowerRename dialog 2019-10-31 23:57:42 -07:00
Chris Davis
d9320b7c05
Update README.md
Add example for appending an extension to files that do not have an extension
2019-10-31 11:20:50 -07:00
Chris Davis
27c9a4a6a9
Update README.md
Add example to append an extension for files that do not have an extension
2019-10-31 11:05:23 -07:00
Hyeonwoo Kang
18d4dc7321 Update README.md (#626)
Fix broken links in src/modules/README.md
2019-10-31 18:25:45 +01:00
Bartosz Sosnowski
6f241ef001
Now working on 0.13.0 (#617) 2019-10-31 17:51:20 +01:00
Chris Davis
296be2fbd5
Update README.md
Added more info about regular expression usage
2019-10-31 09:14:30 -07:00
Chris Davis
c1957272ea
Bug Fixes for PowerRename (#614)
* Bug Fixes

Fixes include:
* Pass parent HWND to UI so dialog is no longer appearing in top corner all the time
* Fix duplicate entries for PowerRename in context menu for shortcuts
* Fix crashing bug due to telemetry not getting unregistered on unload
* Ensure we show the file extension in the UI even if extensions are hidden in Windows Explorer

* Update PowerRenameExt.cpp

Fix missed line to set parent HWND
2019-10-31 06:57:38 -07:00
Bartosz Sosnowski
e6afd33621
Hide Shortcut Guide when screenshots are taken (#605) 2019-10-31 10:26:24 +01:00
Bartosz Sosnowski
b767773742 ShortcutGuide: change vk_code to suppress Start
Use reserved 0xCF virtual key-code to suppress the Start menu from
appearing instead of 0x07 which is used by the Xbox Controller for the
Xbox Guide button.

Fixes: https://github.com/microsoft/PowerToys/issues/595
2019-10-31 10:26:01 +01:00
Enrico Giordani
3e9a0ea925
version 0.12.0 (#573) 2019-10-28 22:24:25 +01:00
Enrico Giordani
78a2c325c3
Remove whitespace in "Power Rename" (#570)
Use PT version number
2019-10-28 21:48:52 +01:00
Bartosz Sosnowski
ad1f1afed0
Settings: fix default theme selected option (#571)
The call to load_general_settings will throw an exception if the
settings.json file for the general settings is not present. This leaves
settings_theme variable uninitialized, resulting in no value selected in
the general settings screen for users that did not make any changes to
the general settings. This fixes this issue by initializing the value
with a "system" default value.

Fixes: https://github.com/microsoft/PowerToys/issues/560
2019-10-28 21:04:37 +01:00
Enrico Giordani
dc34379344 Fix telemetry event names
add setting changed event for ShortcutGuide
2019-10-28 19:07:32 +01:00
Chris Davis
b892e731d9
Add new icon as well as telemetry (#563)
* Update icon and add telemetry calls

This change adds the new PowerRename icon and includes telemetry calls

* Ensure string is freed

* Update event naming convention

* Delete PowerRenameDemo.gif

Deleting this gif as I added it with a separate commit with the README.md update for PowerRename
2019-10-28 10:14:59 -07:00
Clint Rutkas
a1669fd34e
Merge pull request #558 from microsoft/enricogior-patch-1
Update README.md
2019-10-27 11:45:05 -07:00
Chris Davis
70ce6705dd
Update README.md
More details on usage and demo gif addition
2019-10-26 22:47:47 -07:00
Chris Davis
5cee2e8a53
Delete foo 2019-10-26 22:28:10 -07:00
Chris Davis
484c902cf1
Add PowerRename demo gif 2019-10-26 22:25:09 -07:00
Chris Davis
b8f202642d
Create foo 2019-10-26 22:24:35 -07:00
Chris Davis
fdbe909f3c
Add PowerRename entry 2019-10-26 22:22:28 -07:00
Enrico Giordani
5cb54d3bbd
Update README.md 2019-10-25 15:21:16 +02:00
Jeff Bogdan
329392b7d6
Merge pull request #542 from enricogior/small-screens-support
FZ Editor support for small screens
2019-10-24 14:07:10 -07:00
Enrico Giordani
661ac4e841 revert change based on PR feedback 2019-10-24 21:36:09 +02:00
Enrico Giordani
57cd5b5b10
don't quit the FZ editor if no layout is selected when clicking on the "Edit selected layout" (#548)
don't exit when clicking on "Apply" if no layout is selected

Credit to @AlexR3 for the fix. Alex provided a more extensive fix that  disable the button when no layout  is selected, but it requires more changes to the XAML and we preferred to avoid that now.
2019-10-23 21:22:36 +02:00
Bartosz Sosnowski
8f8f4506ff
Make sure m_callback is not null before using it (#541) 2019-10-23 18:42:40 +02:00
Enrico Giordani
b26ee410d1 Allow FZ Editor windows to minimize
this is useful on small screens
2019-10-22 14:16:16 +02:00
Enrico Giordani
425a418599 FZ Editor support for small screens 2019-10-22 09:52:17 +02:00
Bartosz Sosnowski
e4c7ed9c3e fixup: move the test to IsWindowVisible 2019-10-22 09:46:15 +02:00
Bartosz Sosnowski
b17106e88d Don't zone hidden windows 2019-10-22 09:46:15 +02:00
Enrico Giordani
4b1d2ee106
fix bug in multi monitor scenario (#528)
the zone rect.X and rect.Y coordinates are relative to the current monitor.
2019-10-22 08:19:15 +02:00
Enrico Giordani
a07a42624b
Telemetry events
* Don't trace event on exit
change 'PowertoyModuleDeleter' to not call 'module->disable();' before 'module->destroy();' so the module can distinguish between being turned off and PowerToys exiting.
Code formatting.

* uppercase for event name

* Trace on/off event for ShortcutGuide module

* Trace the 'hide' event only if the guide was visible
'on_hide()' is invoked when the module is turned off, in that case don't trace the hide event.

* Remove spaces in data field names
Remove 'ShowGuide' event since it's not providing any useful data.

* Include build number in version number
2019-10-22 08:11:23 +02:00
Enrico Giordani
5fb59cd64a
Add PowerRename icon (#537)
remove unused icons.
2019-10-21 13:28:21 +02:00
Bartosz Sosnowski
123999febd Make Start menu not appear if Shortcut Guide fade-in animation completes. 2019-10-18 13:40:57 +02:00
Bartosz Sosnowski
68d3450ff4 Send undefined keystroke instead of Ctrl to suppress the start menu. 2019-10-18 10:23:30 +02:00
Chris Davis
e1d5dd263a
Initial add of PowerRename from SmartRename repo (#499)
* Initial add of PowerRename from SmartRename repo
2019-10-17 20:57:19 -07:00
Bartosz Sosnowski
04b9422ea6 Update settings-web module dependencies 2019-10-17 15:06:26 +02:00
Bret
6d3ce4e3cd
Merge pull request #504 from TheMrJukes/master
Fix rcNormalPosition in SetWindowPlacement
2019-10-16 09:54:08 -07:00
Bartosz Sosnowski
41842048a3 Save the zone when window is moved by hotkeys 2019-10-16 10:23:22 +02:00
Bartosz Sosnowski
52b15f29ad
Add darkmode support for the settings window (#494) 2019-10-16 10:21:44 +02:00
Enrico Giordani
c8039828fa fixes for zone resize 2019-10-16 01:14:40 +02:00
Bret Anderson
03cb04823c Fix rcNormalPosition in SetWindowPlacement 2019-10-14 12:17:55 -07:00
Enrico Giordani
f9be71eca5
Add version number to telemetry event
use defines from version.h in .rc files and other places.
2019-10-14 19:22:14 +02:00
Antti Kuntsi
c069f6a555 fix FancyZonesEditor CLI dpi parsing with comma decimal locales 2019-10-09 16:18:36 +02:00
Patrick D
67c139cae9 change window name from window1 to FancyZones Editor
this will fix issue #453 but I'm not sure about the. I'll change it if required
2019-10-09 15:57:32 +02:00
Bartosz Sosnowski
892fed6011 Rename CustomSettingsScreen to ModuleSettings 2019-10-09 13:16:37 +02:00
Enrico Giordani
6bea03fee9 update destination folder
this is a regression from renaming the 'editor' folder to 'settings'
2019-10-08 11:06:53 +02:00
Enrico Giordani
b50df5afe1 rename 'src/editor' to '/src/settings' 2019-10-07 15:58:21 +02:00
Enrico Giordani
4b273a7e39 exit Settings on fatal error
fix error checking
2019-10-07 14:39:54 +02:00
Bartosz Sosnowski
5f8c4ea143
Improve window filter to include start menu and Cortana search box. (#474)
Also moves GetProcessPath* functions to common, renaming both to
get_process_path.
2019-10-07 11:12:44 +02:00
Enrico Giordani
298a8787d5 drop privileges if running elevated
make sure the Settings process is not running elevated otherwise the WebView control will fail to start
2019-10-04 11:50:27 +02:00
Enrico Giordani
25510b23e1 remove mutex
the mutex is not necessary since the global window handler is set after the WM_CREATE event is fired.
2019-10-04 11:50:27 +02:00
Enrico Giordani
1fc351b088 code refactoring
fix casting warning
disable automatic window content refresh on resize, this is required by the upcoming support for WebView2
2019-10-04 11:50:27 +02:00
Enrico Giordani
7db627df1b global variable name 2019-10-04 11:50:27 +02:00
Enrico Giordani
c00733ea11 error handling and error checking 2019-10-04 11:50:27 +02:00
Enrico Giordani
7a94ee04c8 global variables name 2019-10-04 11:50:27 +02:00
Enrico Giordani
799ac545a2 supress warning C26451 arithmetic overflow 2019-10-04 11:50:27 +02:00
Enrico Giordani
11396015fb WinMain annotation and argument name 2019-10-04 11:50:27 +02:00
Enrico Giordani
6839b4773a NULL -> nullptr 2019-10-04 11:50:27 +02:00
Enrico Giordani
a2b0671d6d rename variables and functions
supress warning C26444
2019-10-04 11:50:27 +02:00
Enrico Giordani
99e5680f33 code refactoring for local stream uri 2019-10-04 11:50:27 +02:00
Enrico Giordani
f93bcd875a remove unused WebViewControlProcessOptions 2019-10-04 11:50:27 +02:00
Enrico Giordani
576f75d230 rename global variables 2019-10-04 11:50:27 +02:00
Enrico Giordani
f28e9bdb96 remove namespace prefix
since it is declared to be used
2019-10-04 11:50:27 +02:00
Enrico Giordani
7c43e814e9 remove unused libs 2019-10-04 11:50:27 +02:00
Bartosz Sosnowski
d96db2a408 Add dropdown settings UI element 2019-10-04 09:26:40 +02:00
Bartosz Sosnowski
bf82e04ddb Add radio button group and add theme select for ShortcutGuide 2019-10-03 10:12:36 +02:00
Bartosz Sosnowski
64f606daaa
Add a hotkey settings control and use it in FancyZones (#450)
Add a hotkey settings control and use it in FancyZones
2019-10-02 17:18:55 +02:00
Tomer Cohen
de08485db8 FancyZone documentation typo fixes
Miscellanious→Miscellaneous
maintining→maintaining
2019-09-30 19:54:05 +02:00
cedi
faf1fae873 Modifying the startup behaviour of the FancyZones Layout Editor
Add setting to allow to choose if the FZ editor opens in the screen where mouse cursor is or where the active windows is.
2019-09-28 16:29:29 +02:00
ebbyd3
a8f0d3298f Fixed some minor code styling issues. Removed some minor redundant calculations for a small performance enhancement with zone detection. 2019-09-26 23:23:09 +02:00
ebbyd3
af67f7782c Added more in-depth check for zone determination when dragging around
the screen. Previously, it would iterate through the zones in the order
they were added and find the first one that fit the description. While
this works in most cases, if a user wants to have overlapping zones, it
is better to iterate through all of them and find the zone that the user
expects. There are cases where a zone is completely inaccessible on drag
because of the current code. To resolve this, the zone search will look
for the smallest zone possible. The reason I chose this solution is
because this guarantees that zones are at least reachable since if a
zone was bigger than another zone, then there must be a part of it
that is exposed, therefore reachable itself. Note: this solution is for
the scenario between two zones. More than that is not guaranteed. But I
feel like this covers enough scenarios to warrant its addition.

Example:
  ----------------
  - Zone1        -
  -  ----------  -
  -  - Zone2  -  -
  -  -        -  -
  -  ----------  -
  ----------------

Previously, zone2 was inaccessible since it would iterate through 1 then
2. But 1 would always be seen first when dragging a window. With this
fix it zone2 will be accessible.
2019-09-26 23:23:09 +02:00
Bartosz Sosnowski
50dae8a37b Make detection of windows creation more robust 2019-09-26 08:54:00 +02:00
Bartosz Sosnowski
0b86941a3b Make FancyZone distinguish different modern apps. 2019-09-26 08:54:00 +02:00
José I. Escudero
5d75feebdc Update README.md
Fix typo
2019-09-26 08:26:29 +02:00
Bartosz Sosnowski
b85f722e09 When moving window to a zone, ensure it does not remain in maximized state. 2019-09-18 10:41:51 +02:00
Bartosz Sosnowski
1a400bd7fd Filter windows moved by keyboard in FancyZones 2019-09-18 10:41:16 +02:00
Bartosz Sosnowski
487c485911 Move window filter to separate function, filter more windows. 2019-09-18 10:41:16 +02:00
Bret
a54e4299aa
Merge pull request #391 from microsoft/user/bretan/fz-multimon
Fix for #195 - Fancy Zones new editor needs to support multiple monitors
Fix for #292 - Zone Editor opens behind PowerToys Window
2019-09-17 17:58:53 -07:00
Bret Anderson
209ec55912 PR feedback 2019-09-17 17:53:43 -07:00
Bret Anderson
2c3c4e7519 Need to adjust x/y by scaled diff between monitor and work area rect 2019-09-16 12:48:55 -07:00
Bret Anderson
1078101631 Fix for #292 (Zone Editor opens behind PowerToys Window) 2019-09-15 13:48:56 -07:00
Bret Anderson
c0cdf7aaa6 Everything is working. 2019-09-15 13:34:00 -07:00
Gary Hunt
7eedda30db Fix typos in src/README.md (#364) 2019-09-14 12:53:54 +02:00
Enrico Giordani
8221f5e641
activate zones for windows with custom titlebar
fixes https://github.com/microsoft/PowerToys/issues/209
2019-09-11 21:12:39 +02:00
Enrico Giordani
1430332b98
default 'flashZones' to false 2019-09-11 21:11:55 +02:00
Bartosz Sosnowski
7aeac4996b
Don't show the tasklist arrows when taskbar is autohide (#340)
Ref: https://github.com/microsoft/PowerToys/issues/291
2019-09-11 12:38:58 +02:00
Bartosz Sosnowski
1737128b1d
Make Alt-F4 always close the settings window (#334)
Fixes: https://github.com/microsoft/PowerToys/issues/289
2019-09-11 12:38:40 +02:00
Bartosz Sosnowski
8ac6db8b5a
Fix cppcheck reported issues (#333)
Fixes: https://github.com/microsoft/PowerToys/issues/266
2019-09-11 12:38:20 +02:00
Alaric von Teplitz
ffa1b1e6a3 Cleanup settings-web (#280) 2019-09-09 13:47:18 +02:00
Bret Anderson
d4c8c84445 Pass DPI through to editor. It is more reliable. 2019-09-08 23:53:30 -07:00
Bret Anderson
3836aaa9d1 Almost working. Doesn't apply on my small monitor running at 150% scaling. 2019-09-08 14:54:44 -07:00
Bret Anderson
e562b29ecd Editor should come up on the monitor with the foreground window. Defaults to primary monitor if there is no foreground window. 2019-09-08 01:47:12 -07:00
Ewout ter Hoeven
5f5402aa0a [ImgBot] Optimize images (#225)
*Total -- 3,268.30kb -> 2,584.85kb (20.91%)

/doc/images/example_powertoy/settings.png -- 126.39kb -> 56.48kb (55.31%)
/src/modules/fancyzones/FancyZonesSettings.png -- 177.46kb -> 116.84kb (34.16%)
/Logo.jpg -- 37.32kb -> 26.97kb (27.73%)
/doc/images/Logo.jpg -- 37.32kb -> 26.97kb (27.73%)
/src/modules/fancyzones/Picker.png -- 35.86kb -> 26.45kb (26.25%)
/doc/images/runner/tray.png -- 3.40kb -> 2.52kb (25.95%)
/doc/images/shortcut_guide/usage.png -- 95.94kb -> 72.74kb (24.19%)
/doc/images/shortcut_guide/settings.png -- 40.33kb -> 30.76kb (23.73%)
/src/modules/fancyzones/FancyZones.png -- 1,266.91kb -> 982.63kb (22.44%)
/doc/images/MTNDWidget.jpg -- 5.74kb -> 4.73kb (17.59%)
/MTNDWidget.jpg -- 5.74kb -> 4.73kb (17.59%)
/src/modules/fancyzones/TableEditor.png -- 288.73kb -> 237.93kb (17.59%)
/WindowsKeyShortcutGuide.jpg -- 323.86kb -> 273.17kb (15.65%)
/doc/images/WindowsKeyShortcutGuide.jpg -- 323.86kb -> 273.17kb (15.65%)
/src/modules/fancyzones/WindowEditor.png -- 277.95kb -> 245.99kb (11.5%)
/doc/images/FZTutorial.jpg -- 214.13kb -> 195.51kb (8.7%)
/src/settings-web/src/components/fabric.png -- 7.36kb -> 7.26kb (1.31%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2019-09-06 19:53:54 +02:00
Jay Tulk
6acddfb0c7 Fix typo in fancyzones/README.md (#259) 2019-09-06 19:27:45 +02:00
Michael Cooper
fdab2d01b9 Escape less-than-sign in fancyzones/README.md (#222)
Without escaping this is rendered as an HTML, which is invisible.
2019-09-06 19:12:03 +02:00
Rich Turner
8d80f32a95 Fix typo in src/README.md (#207) 2019-09-06 19:03:36 +02:00
Bartosz Sosnowski
8431b80e48 FancyZones and Shortcut Guide initial commit
Co-authored-by: Alexis Campailla <alexis@janeasystems.com>
Co-authored-by: Bret Anderson <bretan@microsoft.com>
Co-authored-by: Enrico Giordani <enrico.giordani@gmail.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Jeff Bogdan <jeffbog@microsoft.com>
Co-authored-by: March Rogers <marchr@microsoft.com>
Co-authored-by: Mike Harsh <mharsh@microsoft.com>
Co-authored-by: Nachum Bundak <Nachum.Bundak@microsoft.com>
Co-authored-by: Oliver Jones <ojones@microsoft.com>
Co-authored-by: Patrick Little <plittle@microsoft.com>
2019-09-05 18:12:40 +02:00
qianlifeng
62a33fe7fc remove unnessary files. 2015-01-20 22:41:19 +08:00
qianlifeng
5e3d29df4c Add Auto Updater [WIP] & remove UAC project 2015-01-19 23:08:53 +08:00