From 1952a17a17213b4375f43913721630d23af74344 Mon Sep 17 00:00:00 2001 From: Kai Tao <69313318+vanzue@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:31:56 +0800 Subject: [PATCH] Runner: Remove "Show Tray Icon" menu in tray icon (#40190) ## Summary of the Pull Request "Show Tray Icon" when you click tray icon has not sense. If it's visible, show that has no effect, if it's not, you can't make it visible by click it. Remove the menu for that This impl is just not showing the menu item, if open for the choice that show "hide the tray icon" here ## PR Checklist - [ ] **Closes:** #xxx - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed Locally tested --- src/runner/Resources.resx | 3 --- src/runner/general_settings.cpp | 3 ++- src/runner/resource.base.h | 1 - src/runner/runner.base.rc | Bin 3092 -> 2968 bytes src/runner/tray_icon.cpp | 9 --------- 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/runner/Resources.resx b/src/runner/Resources.resx index 2986ec6cef..3cc2f1ad36 100644 --- a/src/runner/Resources.resx +++ b/src/runner/Resources.resx @@ -180,9 +180,6 @@ Exit Exit as a verb, as in Exit the application - - Show icon - Report bug diff --git a/src/runner/general_settings.cpp b/src/runner/general_settings.cpp index bf80fb2df8..4fdf6b74d2 100644 --- a/src/runner/general_settings.cpp +++ b/src/runner/general_settings.cpp @@ -164,7 +164,8 @@ void apply_general_settings(const json::JsonObject& general_configs, bool save) else { delete_auto_start_task_for_this_user(); - if (gpo_run_as_startup == powertoys_gpo::gpo_rule_configured_enabled || gpo_run_as_startup == powertoys_gpo::gpo_rule_configured_not_configured) { + if (gpo_run_as_startup == powertoys_gpo::gpo_rule_configured_enabled || gpo_run_as_startup == powertoys_gpo::gpo_rule_configured_not_configured) + { create_auto_start_task_for_this_user(run_as_elevated); } } diff --git a/src/runner/resource.base.h b/src/runner/resource.base.h index 0ee4cbb2e5..027f5b4281 100644 --- a/src/runner/resource.base.h +++ b/src/runner/resource.base.h @@ -21,4 +21,3 @@ #define ID_REPORT_BUG_COMMAND 40004 #define ID_DOCUMENTATION_MENU_COMMAND 40005 #define ID_QUICK_ACCESS_MENU_COMMAND 40006 -#define ID_SHOW_TRAY_ICON_MENU_COMMAND 40007 diff --git a/src/runner/runner.base.rc b/src/runner/runner.base.rc index 9f56295553d8fd29c64c47c2b508fcf01b29a887..10a4555db8ec5de58a2a12eb479c9547d7d7c186 100644 GIT binary patch delta 12 TcmbOtF++UACg#n0EYH{hA4vq0 delta 78 zcmbOsK1E`~CT7cEh75*$hH?f422X}$AS;hSi9rXQ2xjnL@Mj1IvO*Yw7#tZQ afh