Compare commits

...

2 Commits

Author SHA1 Message Date
Stefan Markovic
87971b5e17 Debug 2024-02-21 09:02:36 +01:00
Stefan Markovic
bd196ef29d [FileLocksmith] Tier1 context menu drives support 2024-02-20 22:19:51 +01:00
2 changed files with 13 additions and 4 deletions

View File

@@ -7,8 +7,9 @@
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
xmlns:desktop5="http://schemas.microsoft.com/appx/manifest/desktop/windows10/5"
xmlns:desktop10="http://schemas.microsoft.com/appx/manifest/desktop/windows10/10"
xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10"
xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" IgnorableNamespaces="uap uap2 uap3 rescap desktop desktop4 desktop5 uap10 com">
xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" IgnorableNamespaces="uap uap2 uap3 rescap desktop desktop4 desktop5 desktop10 uap10 com">
<Identity Name="Microsoft.PowerToys.FileLocksmithContextMenu" ProcessorArchitecture="neutral" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.0.0.0" />
<Properties>
<DisplayName>PowerToys FileLocksmith Context Menu</DisplayName>
@@ -35,12 +36,15 @@
<Extensions>
<desktop4:Extension Category="windows.fileExplorerContextMenus">
<desktop4:FileExplorerContextMenus>
<desktop4:ItemType Type="*">
<desktop4:Verb Id="FileLocksmithCommand" Clsid="AAF1E27D-4976-49C2-8895-AAFA743C0A7E" />
</desktop4:ItemType>
<desktop5:ItemType Type="Directory">
<desktop5:Verb Id="FileLocksmithCommand" Clsid="AAF1E27D-4976-49C2-8895-AAFA743C0A7E" />
</desktop5:ItemType>
<desktop5:ItemType Type="*">
<desktop5:Verb Id="FileLocksmithCommand" Clsid="AAF1E27D-4976-49C2-8895-AAFA743C0A7E" />
</desktop5:ItemType>
<desktop10:ItemType Type="Drive">
<desktop10:Verb Id="FileLocksmithCommand" Clsid="AAF1E27D-4976-49C2-8895-AAFA743C0A7E" />
</desktop10:ItemType>
</desktop4:FileExplorerContextMenus>
</desktop4:Extension>
<com:Extension Category="windows.comServer" uap10:RuntimeBehavior="packagedClassicApp">

View File

@@ -54,6 +54,7 @@ public:
IFACEMETHODIMP GetIcon(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* icon)
{
MessageBox(NULL, L"GetIcon", NULL, NULL);
std::wstring iconResourcePath = get_module_folderpath(g_hInst);
iconResourcePath += L"\\Assets\\FileLocksmith\\";
iconResourcePath += L"FileLocksmith.ico";
@@ -68,12 +69,14 @@ public:
IFACEMETHODIMP GetCanonicalName(_Out_ GUID* guidCommandName)
{
MessageBox(NULL, L"GetCanonicalName", NULL, NULL);
*guidCommandName = __uuidof(this);
return S_OK;
}
IFACEMETHODIMP GetState(_In_opt_ IShellItemArray* selection, _In_ BOOL okToBeSlow, _Out_ EXPCMDSTATE* cmdState)
{
MessageBox(NULL, L"GetState", NULL, NULL);
*cmdState = ECS_ENABLED;
if (!FileLocksmithSettingsInstance().GetEnabled())
@@ -91,6 +94,7 @@ public:
IFACEMETHODIMP Invoke(_In_opt_ IShellItemArray* selection, _In_opt_ IBindCtx*) noexcept
{
MessageBox(NULL, L"Invoke", NULL, NULL);
Trace::Invoked();
ipc::Writer writer;
@@ -145,6 +149,7 @@ public:
IFACEMETHODIMP GetFlags(_Out_ EXPCMDFLAGS* flags)
{
MessageBox(NULL, L"GetFlags", NULL, NULL);
*flags = Flags();
return S_OK;
}