mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-26 18:58:29 +08:00
5a07579b73
12 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Alekhya
|
5a07579b73
|
Fix for settings crash on toggling enable button for any PowerToy (#6620)
* Removed getSettings from moduleEnabled so that it doesn't have to reopen the file everytime * To Lower to while checking the theme * color picker doesn't reopen the file * use the generalView model config directly for FZ * Made the same change for all the viewmodels so that they access the general view model value directly instead of opening and reading the value from a file each time * removed unused variable * Fix initialization in tests * should read the file only if general settings does not exist * Added interfaces for all the powertoys to use the generalSettings singleton class * Runner is responding to changes in settings, only issue is that every time the general settings page is loaded the information is being read because isInitialized property could not be ignored during serialization * All tests pass * Settings and runner are working as expected with the settings cache * added a null check to read from the file only when the settings process is started * use converter to deserialize an interface * Renamed generalSettings within the cache to be called CommonSettingsConfig * All tests pass, had to initialize the common settings config instance * Added few comments to newly created classes * encapsulating load and store of general view model * reading from file is encapsulated * settings and runner wotk with generic singleton * Shortcut guide works as expected * Fancyzones, shortcutguide and power preview use the settings repository and work as expected * referencing GeneralSettings instead of the settingsRepository<GeneralSettings> within viewmodels * unified access to General settings and removed the IGeneralSettingsData interface * Passing settings to viewmodel as a parameter * removed ISettingsConfig interface from the viewmodels which are not using the singleton to access settings * have to use ISettingsConfig to use GetSettings * refactored tests, all tests pass * Added test for settingsRepository that a single instance is created * Added comments and removed unnecessary headers/code * added settings repository tests * moq for each settings file * Img resizer tests pass * General tests pass * FancyZones tests pass * PowerPreview tests pass * PowerRename tests pass * shortcut guide tests pass * Added GetModuleName to ISettingsConfig * unify the way the Modulename is accessed. It was redeclared in multiple places and this would cause an issue if the name is changed only in one place. All the module names are accessed using the <T>Settings.ModuleName, eg: ShortcutGuideSettings.ModuleName. * create PTRun settings file if it does not exist * GetFile is now a private function. Modified the logic of KBM default.json access and PT Run so that we can re-use GetSettings instead of GetFile. * Added UpgradeSettingsConfiguration to the ISettingsConfig interface so that the settings file can be upgraded based on some condition. Presently, only the GeneralSettings file is utilizing this to change the PT Version number based on the old PT version and the current PT version that it receives from the helper function. Verified that if the PT version is lower in the general settings.json file, settings saves the file with the new version info. * The naming for the PowerToys was inconsistent and the variables were redeclared in multiple places. To have the settings.ModuleName as the main name, all other places should refer to that name. In the tests file the module name for ImgResizer was 'ImageResizer' and not 'Image Resizer'. * renamed lock * Remove unnecessary GetSettingsFileNAme function. It is no longer in use because the code does not use types to create a new BasePTModule object |
||
ryanbodrug-microsoft
|
0f6428eed0
|
User/ryanbod/mock settings disk access (#6188)
* 1) Making Directory Methods private. 2) Removing the CreateDirectory / DeleteDirectory functionality from all Settings Unit Tests. * Abstracting disk access via IIOProvider to be able to provide mocks for unit tests instead of writing to disk. This also prevents developers who are running unit tests from interfering with the PowerToys settings on their local dev box. * Dependency Injecting stub SettingsUtils for all tests * Removing ISettingsUtils from constructors of objects that need to be deserialized (ColorPickerSettings/PowerLauncherSettings) as this breaks System.Text.Json * Removing unused namespace reference * Removing redifined mock * As per PR feedback. Stub Settings utils should work with any settings type if the intent is to compile / avoid null ref exceptions. Strangely when implementing this fix it became apparent that a stub settings isn't enough, and disk access needed to be mocked. I can't explain why the tests were passing previously. * Leveraging GetMockIOProviderForSaveLoadExists |
||
Divyansh Srivastava
|
52a06b5cdc
|
[PT Run] Mitigate JSON Deserialization exception (#6295)
* Add error reporting window on deserialisation error * Add message box to show launcher errors * Change report window to messagebox * nit fix in error window * Localized string for error window * update messagebox interface * Correct ShowMessageBox argument order |
||
Clint Rutkas
|
d055ba1c3b
|
whitespace forced changes (#6002) | ||
Clint Rutkas
|
398991f3c1
|
Adjusting settings to leverage base class (#5127)
* renaming / deleting file * adding in base class Co-authored-by: Clint Rutkas <crutkas@microsoft.com> |
||
Divyansh Srivastava
|
5c3acf61b4
|
Fixed powertoys run not reacting to change in settings (#2968)
* Fixed powertoys run project name in settings * Rename save directory |
||
ryanbodrug-microsoft
|
da550a4a67 | Moving launcher save settings under AppData/Local/Microsoft/PowerToys/Run | ||
Tomas Agustin Raies
|
d9c4abe0df
|
Merge PowerLauncher branch (#2345)
* minor modifications in README * Added launcher project and changed references to common * Added the code to launch another process * added shellapi header * Added launcher to runner * added functions to remove the abstract class error * added the wox launcher dll * Readded the reference to common * modified the additional include directories for the release version * changed the name to be displayed from Wox.Launcher to Launcher * Localized the strings of Launcher * Added a SearchResult Helper class * Created a helper class to use indexer and return search results * Added the main and settings file which declare most of the plugin interfaces * Added references and renamed a class * Added the images folder which contains the windows indexer icon * Added the image * Added the plugin.json file * Minor changes in project files * Added plugin.json to the project * Modified the output paths to create the dll for the plugin in the correct location * Refactored the code to make it unit testable * Made the code unit testable and added unit tests for the indexer plugin * Removed commented out code * Code to terminate wox when we exit PowerToys * Copy from Jeremy's fork PR * Removed unnecessary plugins from source tree * add missing files * Fix postbuild event * Added x64 for all Wox project - Debug mode * Removed the AnyCPU config - Debug * Added the build paths for release x64 (removed AnyCPU) * Set warning level to 4 : Release * Set warning level 4 : Debug * set optimize code to false * Removed notify icon component * Removed setting UI XAML file and references * Readded necessary callback functions * Removed python path and python plugin functions * Removed UI related to python path and the bindings related to that * Remove python bindings * Removed the localized string translations from pythonDirectory and SelectPythonDirectory * Manually resolving conflicts * Fix Wox build in project settings * deleting unused project files * Undo change internal * Fix internal variable * All wox exceptions in debug are getting rethrown, and thus causing the app to crash. This change removes the debug specific code and allows exceptions to be handled the same was as release. * Ported Indexer plugin to .net core 3 * Added the test project back * Removed the .net framework indexer folder * readding the plugin.json file * Changed the anyCPU config to x64 for windows indexer plugin * Adding dependency to wox project on the runner. This should make sure the wox.exe can be build and launched by the runner so wox can run as a background process. * Updating build dependencies. Wox.Launcher wasn't built as part of the F5 Experience, and nor were the plugins * removing locks from the ResultListBox code behind file. All callbacks are accessed from the Main/UI thread. * Remove anyCPU config and changed it to x64 * Removed anycpu of test proj * Adding dependency * Renaming executable to PowerLauncher. Replaceing icons with placeholder. Deleting Docs folder * Renaming AppData directory from 'Wox' to 'PowerLauncher'. Also replacing issue link with powertoys github. * adding support for xaml islands * Added Neils UI code * Replace Niels Code references * Added assets and behaviours * Add missing reference * Add main view model binding * Using proper executable name when closing 'PowerLauncher' process * changed x:bind to Binding to avoid reference * Updated bindings for launcher * Added binding on searchBox * Adding Directory.Build.targets file to kill the PowerLauncher pprocess on Build or Clean operations of all 'Launcher' projects. * Fixed exception preventing result display * Fixed issue with wpf marshalling events to a non UI thread * Optimised result binding by inserting search result from multiple plugin in parallel * copy resource files to output folder * Corrected the output path for the indexer plugin * windows indexer plugin is working * Remove console print statement * Added callback function for mouse click on search result * Working App execution * Cherry picked pinyin performance changes from jjw24's master branch * change nuget package to msft for winrt compat * Working up/down arrow key * updating references and removing a few that seem uneeded for how stuff is referenced * adding two back in * Removing Squirrel dll. unsure on updating so i kept that logic in * Updated functionality on suggestion chosen in autosuggestbox * Added the <useWPF> tag to remove the warning * Removed an unnecessary <useWindowsForms> tag * Removed the item group for properties from calculator plugin * Removed the item group for properties from folder plugin * Removed the item group for properties from indexer, program and shell plugin * Removed itemgrp from wox.core and wox.test csprojs * Removed the unnecessary wox files to clean up codebase * Renamed Wox.Plugin.Indexer to Microsoft.Plugin.Indexer * Renamed Wox.Launcher to Microsoft.Launcher * To avoid DBNull to String typecast exception * Added query submitted event to handle default action on clicking a list view item * Merge pull request #42 from microsoft/AddPinyinPerformance Cherry picked pinyin performance changes from jjw24's master branch (cherry picked from commit |
||
Tomas Agustin Raies
|
7ec8d02c1f
|
PowerLauncherSettings unit tests (#2276) | ||
Clint Rutkas
|
6fbed4ad5c
|
Settingsv2 fix warnings (#2076)
* updating a ton of warnings. * bunch of cleanup * few smaller ones * fixed naming * reversing an oops * adjusting json to use attribute * more json properties |
||
Tomas Raies
|
a85b84fd56 | Stylecop compliance | ||
Tomas Raies
|
443b3c8b82 |
PowerLauncher Settings
* Cherry Picked commit branch due to merge conflicts * add HotkeySettingsControl * add localization strings * add PowerLauncherPage ViewModel * fix build dependency - settings.ui.runner depends on TwoWayIPCLib * uncomment IPC settings propagation |