mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Add Windows 10 context menu entry back on Windows 11 (#41351)
## Summary of the Pull Request Ensure Windows 11 adds the registry entries for the old context menu so that "Show more options"/classic menu always includes them. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **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 <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed
This commit is contained in:
@@ -88,12 +88,9 @@ public:
|
|||||||
package::RegisterSparsePackage(path, packageUri);
|
package::RegisterSparsePackage(path, packageUri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
||||||
FileLocksmithRuntimeRegistration::EnsureRegistered();
|
FileLocksmithRuntimeRegistration::EnsureRegistered();
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
m_enabled = true;
|
m_enabled = true;
|
||||||
}
|
}
|
||||||
@@ -101,13 +98,10 @@ public:
|
|||||||
virtual void disable() override
|
virtual void disable() override
|
||||||
{
|
{
|
||||||
Logger::info(L"File Locksmith disabled");
|
Logger::info(L"File Locksmith disabled");
|
||||||
if (!package::IsWin11OrGreater())
|
|
||||||
{
|
|
||||||
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
||||||
FileLocksmithRuntimeRegistration::Unregister();
|
FileLocksmithRuntimeRegistration::Unregister();
|
||||||
Logger::info(L"File Locksmith context menu unregistered (Win10)");
|
Logger::info(L"File Locksmith context menu unregistered (Win10)");
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
m_enabled = false;
|
m_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,12 +112,9 @@ public:
|
|||||||
package::RegisterSparsePackage(path, packageUri);
|
package::RegisterSparsePackage(path, packageUri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
||||||
ImageResizerRuntimeRegistration::EnsureRegistered();
|
ImageResizerRuntimeRegistration::EnsureRegistered();
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
Trace::EnableImageResizer(m_enabled);
|
Trace::EnableImageResizer(m_enabled);
|
||||||
}
|
}
|
||||||
@@ -127,14 +124,11 @@ public:
|
|||||||
{
|
{
|
||||||
m_enabled = false;
|
m_enabled = false;
|
||||||
Trace::EnableImageResizer(m_enabled);
|
Trace::EnableImageResizer(m_enabled);
|
||||||
if (!package::IsWin11OrGreater())
|
|
||||||
{
|
|
||||||
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
||||||
ImageResizerRuntimeRegistration::Unregister();
|
ImageResizerRuntimeRegistration::Unregister();
|
||||||
Logger::info(L"ImageResizer context menu unregistered (Win10)");
|
Logger::info(L"ImageResizer context menu unregistered (Win10)");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Returns if the powertoys is enabled
|
// Returns if the powertoys is enabled
|
||||||
virtual bool is_enabled() override
|
virtual bool is_enabled() override
|
||||||
|
|||||||
@@ -202,27 +202,21 @@ public:
|
|||||||
package::RegisterSparsePackage(path, packageUri);
|
package::RegisterSparsePackage(path, packageUri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
||||||
PowerRenameRuntimeRegistration::EnsureRegistered();
|
PowerRenameRuntimeRegistration::EnsureRegistered();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Disable the powertoy
|
// Disable the powertoy
|
||||||
virtual void disable()
|
virtual void disable()
|
||||||
{
|
{
|
||||||
m_enabled = false;
|
m_enabled = false;
|
||||||
Logger::info(L"PowerRename disabled");
|
Logger::info(L"PowerRename disabled");
|
||||||
if (!package::IsWin11OrGreater())
|
|
||||||
{
|
|
||||||
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
#if defined(ENABLE_REGISTRATION) || defined(NDEBUG)
|
||||||
PowerRenameRuntimeRegistration::Unregister();
|
PowerRenameRuntimeRegistration::Unregister();
|
||||||
Logger::info(L"PowerRename context menu unregistered (Win10)");
|
Logger::info(L"PowerRename context menu unregistered (Win10)");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Returns if the powertoy is enabled
|
// Returns if the powertoy is enabled
|
||||||
virtual bool is_enabled() override
|
virtual bool is_enabled() override
|
||||||
|
|||||||
Reference in New Issue
Block a user