Skip to content

Commit

Permalink
Fixed enable/disable toogle from XAML
Browse files Browse the repository at this point in the history
  • Loading branch information
jefflord committed Dec 3, 2023
1 parent 199cc87 commit 92aee5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/runner/centralized_kb_hook.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace CentralizedKeyboardHook
void ClearModuleHotkeys(const std::wstring& moduleName) noexcept;
void RegisterWindow(HWND hwnd) noexcept;
void RefreshConfig();
void SetRunProgramEnabled(bool enabled);
DWORD GetProcessIdByName(const std::wstring& processName);
std::wstring GetFileNameFromPath(const std::wstring& fullPath);
HWND find_main_window(unsigned long process_id);
Expand Down
6 changes: 6 additions & 0 deletions src/runner/general_settings.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "pch.h"
#include "general_settings.h"
#include "centralized_kb_hook.h"
#include "auto_start_helper.h"
#include "Generated files/resource.h"

Expand Down Expand Up @@ -159,6 +160,11 @@ void apply_general_settings(const json::JsonObject& general_configs, bool save)
target_enabled = gpo_rule == powertoys_gpo::gpo_rule_configured_enabled;
}

if (name == L"Keyboard Manager")
{
CentralizedKeyboardHook::SetRunProgramEnabled(target_enabled);
}

if (module_inst_enabled == target_enabled)
{
continue;
Expand Down

1 comment on commit 92aee5f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@check-spelling-bot Report

🔴 Please review

See the 📜action log or 📝 job summary for details.

Unrecognized words (12)
ARGSFORPROGRAM
cmdow
direcotry
PATHTOPROGRAM
PROCESSENTRY
ritchielawrence
SNAPPROCESS
splitw
STARTINDIRFORPROGRAM
tlhelp
Toolhelp
wcsicmp
Previously acknowledged words that are now absent CHT constexpr DEU hashcode HEB JPN nodiscard pcs qps roundf RUS RValue SVE wifi 🫥
To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:jefflord/PowerToys.git repository
on the launch-apps-3350 branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.22/apply.pl' |
perl - 'https://github.com/jefflord/PowerToys/actions/runs/7076913553/attempts/1'
Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (1848) from .github/actions/spell-check/expect.txt and unrecognized words (12)

Dictionary Entries Covers Uniquely
cspell:r/src/r.txt 543 1 1
cspell:cpp/src/people.txt 23 1
cspell:cpp/src/ecosystem.txt 51 1

Consider adding them (in .github/workflows/spelling2.yml) for uses: check-spelling/check-spelling@v0.0.22 in its with:

      with:
        extra_dictionaries:
          cspell:r/src/r.txt
          cspell:cpp/src/people.txt
          cspell:cpp/src/ecosystem.txt

To stop checking additional dictionaries, add (in .github/workflows/spelling2.yml) for uses: check-spelling/check-spelling@v0.0.22 in its with:

check_extra_dictionaries: ''
If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Please sign in to comment.