mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
Spelling: ... (#3398)
This commit is contained in:
@@ -155,7 +155,7 @@ Sample code from [`the example PowerToy`](/src/modules/example_powertoy/dllmain.
|
||||
// More settings
|
||||
...
|
||||
|
||||
// Add a custom action property. When using this settings type, the "call_custom_action()" method should be overriden as well.
|
||||
// Add a custom action property. When using this settings type, the "call_custom_action()" method should be overridden as well.
|
||||
settings.add_custom_action(
|
||||
L"test_custom_action", // action name.
|
||||
L"This is what a CustomAction property looks like", // label above the field.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
- [Coding style](style.md).
|
||||
- Try to package new ideas/components into libraries that have nicely defined interfaces.
|
||||
- Package new ideas into classes or refactor existing ideas into a class as you extend.
|
||||
- When adding new classes/methos/changing existing code: add new unit tests or update the existing tests.
|
||||
- When adding new classes/methods/changing existing code: add new unit tests or update the existing tests.
|
||||
|
||||
## Github Workflow
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ If you're running any application as an administrator (aka elevated) and PowerTo
|
||||
|
||||
We understand users will run applications elevated. We do as well. We have two options for you when this scenario happens:
|
||||
|
||||
1. **Recommended:** PowerToys will prompt when we detect a process that is elevated. Go to PowerToys settings inside the General Tab and click "Relaunch as adminstrator".
|
||||
1. **Recommended:** PowerToys will prompt when we detect a process that is elevated. Go to PowerToys settings inside the General Tab and click "Relaunch as administrator".
|
||||
2. Enable "Always run as administrator" in the PowerToys settings.
|
||||
|
||||
## What is "Run as Administrator" / Elevated processes
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#### [`main.cpp`](/src/runner/main.cpp)
|
||||
Contains the executable starting point, initialization code and the list of known PowerToys. All singletones are also initialized here at the start. Loads all the powertoys by scanning the `./modules` folder and `enable()`s those makred as enabled in `%LOCALAPPDATA%\Microsoft\PowerToys\settings.json` config. Then it runs [a message loop](https://docs.microsoft.com/en-us/windows/win32/winmsg/using-messages-and-message-queues) for the tray UI. Note that this message loop also [handles lowlevel_keyboard_hook events](https://github.com/microsoft/PowerToys/blob/1760af50c8803588cb575167baae0439af38a9c1/src/runner/lowlevel_keyboard_event.cpp#L24).
|
||||
Contains the executable starting point, initialization code and the list of known PowerToys. All singletones are also initialized here at the start. Loads all the powertoys by scanning the `./modules` folder and `enable()`s those marked as enabled in `%LOCALAPPDATA%\Microsoft\PowerToys\settings.json` config. Then it runs [a message loop](https://docs.microsoft.com/en-us/windows/win32/winmsg/using-messages-and-message-queues) for the tray UI. Note that this message loop also [handles lowlevel_keyboard_hook events](https://github.com/microsoft/PowerToys/blob/1760af50c8803588cb575167baae0439af38a9c1/src/runner/lowlevel_keyboard_event.cpp#L24).
|
||||
|
||||
#### [`general_settings.cpp`](./general_settings.cpp)
|
||||
#### [`powertoy_module.h`](/src/runner/powertoy_module.h) and [`powertoy_module.cpp`](/src/runner/powertoy_module.cpp)
|
||||
|
||||
@@ -80,7 +80,7 @@ Example module JSON (taken from Shortcut Guide):
|
||||
```
|
||||
produces this settings screen:
|
||||
|
||||

|
||||

|
||||
|
||||
### Helper methods
|
||||
|
||||
@@ -191,7 +191,7 @@ settings.set_icon_key(L"pt-example");
|
||||
settings.add_string(L"string_val", L"Example string label", L"example value");
|
||||
settings.add_int_spinner(L"int_val", L"Example int label", 0, 0, 100, 10);
|
||||
```
|
||||
You can then use `std::wstring serialize()` or `bool serialize_to_buffer(wchar_t* buffer, int* uffer_size)` methods to generate output JSON string.
|
||||
You can then use `std::wstring serialize()` or `bool serialize_to_buffer(wchar_t* buffer, int* buffer_size)` methods to generate output JSON string.
|
||||
|
||||
### Saving settings
|
||||
Use
|
||||
|
||||
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Reference in New Issue
Block a user