-
Notifications
You must be signed in to change notification settings - Fork 7.9k
feat(FileConverter): initial implementation of context menu file conversion (seeking feedback) #46786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Pikachu-5
wants to merge
4
commits into
microsoft:main
Choose a base branch
from
Pikachu-5:feature/file-converterclean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(FileConverter): initial implementation of context menu file conversion (seeking feedback) #46786
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
917327a
Add File Converter module with context menu, UI, and conversion engine
Pikachu-5 f23f559
refactor: address automated review feedback (WIC formats, localizatio…
Pikachu-5 0c0e9d3
removed accidental json.hpp push
Pikachu-5 d6dae60
fix(fileconverter): update executable reference and improve pipe hand…
Pikachu-5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,5 +38,6 @@ public enum ModuleType | |
| Workspaces, | ||
| ZoomIt, | ||
| GeneralSettings, | ||
| FileConverter, | ||
| } | ||
| } | ||
97 changes: 97 additions & 0 deletions
97
src/modules/FileConverter/FileConverterContextMenu/AppxManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Package | ||
| xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" | ||
| xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" | ||
| xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" | ||
| xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" | ||
| xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" | ||
| 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: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"> | ||
| <Identity Name="Microsoft.PowerToys.FileConverterContextMenu" ProcessorArchitecture="neutral" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.0.0.0" /> | ||
| <Properties> | ||
| <DisplayName>PowerToys File Converter Context Menu</DisplayName> | ||
| <PublisherDisplayName>Microsoft</PublisherDisplayName> | ||
| <Logo>Assets\FileConverter\storelogo.png</Logo> | ||
| <uap10:AllowExternalContent>true</uap10:AllowExternalContent> | ||
| </Properties> | ||
| <Resources> | ||
| <Resource Language="en-us" /> | ||
| </Resources> | ||
| <Dependencies> | ||
| <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.18950.0" MaxVersionTested="10.0.19000.0" /> | ||
| </Dependencies> | ||
| <Capabilities> | ||
| <rescap:Capability Name="runFullTrust" /> | ||
| <rescap:Capability Name="unvirtualizedResources"/> | ||
| </Capabilities> | ||
| <Applications> | ||
| <Application Id="Microsoft.PowerToys.FileConverterContextMenu" Executable="FileConverter.exe" uap10:TrustLevel="mediumIL" uap10:RuntimeBehavior="win32App"> | ||
| <uap:VisualElements AppListEntry="none" DisplayName="PowerToys File Converter Context Menu" Description="FileConverterContextMenu" BackgroundColor="transparent" Square150x150Logo="Assets\FileConverter\Square150x150Logo.png" Square44x44Logo="Assets\FileConverter\Square44x44Logo.png"> | ||
| <uap:DefaultTile Wide310x150Logo="Assets\FileConverter\Wide310x150Logo.png" Square310x310Logo="Assets\FileConverter\LargeTile.png" Square71x71Logo="Assets\FileConverter\SmallTile.png"></uap:DefaultTile> | ||
| <uap:SplashScreen Image="Assets\FileConverter\SplashScreen.png" /> | ||
| </uap:VisualElements> | ||
| <Extensions> | ||
| <desktop4:Extension Category="windows.fileExplorerContextMenus"> | ||
| <desktop4:FileExplorerContextMenus> | ||
| <desktop5:ItemType Type=".bmp"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".dib"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".gif"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".jfif"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".jpe"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".jpeg"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".jpg"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".jxr"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".png"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".tif"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".tiff"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".wdp"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".heic"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".heif"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| <desktop5:ItemType Type=".webp"> | ||
| <desktop5:Verb Id="FileConverterCommand" Clsid="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" /> | ||
| </desktop5:ItemType> | ||
| </desktop4:FileExplorerContextMenus> | ||
| </desktop4:Extension> | ||
| <com:Extension Category="windows.comServer" uap10:RuntimeBehavior="packagedClassicApp"> | ||
| <com:ComServer> | ||
| <com:SurrogateServer DisplayName="Context menu verb handler"> | ||
| <com:Class Id="57EC18F5-24D5-4DC6-AE2E-9D0F7A39F8BA" Path="PowerToys.FileConverterContextMenu.dll" ThreadingModel="STA"/> | ||
| </com:SurrogateServer> | ||
| </com:ComServer> | ||
| </com:Extension> | ||
| </Extensions> | ||
| </Application> | ||
| </Applications> | ||
| </Package> | ||
Binary file added
BIN
+1.37 KB
...dules/FileConverter/FileConverterContextMenu/Assets/FileConverter/LargeTile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+433 Bytes
...dules/FileConverter/FileConverterContextMenu/Assets/FileConverter/SmallTile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.28 KB
...es/FileConverter/FileConverterContextMenu/Assets/FileConverter/SplashScreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.37 KB
...leConverter/FileConverterContextMenu/Assets/FileConverter/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+433 Bytes
...FileConverter/FileConverterContextMenu/Assets/FileConverter/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.25 KB
...FileConverter/FileConverterContextMenu/Assets/FileConverter/Wide310x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+328 Bytes
...dules/FileConverter/FileConverterContextMenu/Assets/FileConverter/storelogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions
65
src/modules/FileConverter/FileConverterContextMenu/FileConverterContextMenu.vcxproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| <PropertyGroup Label="Globals"> | ||
| <Keyword>Win32Proj</Keyword> | ||
| <ProjectGuid>{f3610647-6f9f-45ee-987f-c9a89c23f7f0}</ProjectGuid> | ||
| <RootNamespace>FileConverterContextMenu</RootNamespace> | ||
| <ProjectName>FileConverterContextMenu</ProjectName> | ||
| <TargetName>PowerToys.FileConverterContextMenu</TargetName> | ||
| </PropertyGroup> | ||
| <PropertyGroup Label="Configuration"> | ||
| <ConfigurationType>DynamicLibrary</ConfigurationType> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| <ImportGroup Label="ExtensionSettings" /> | ||
| <ImportGroup Label="Shared" /> | ||
| <ImportGroup Label="PropertySheets"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <PropertyGroup Label="UserMacros" /> | ||
| <PropertyGroup> | ||
| <OutDir>$(RepoRoot)$(Platform)\$(Configuration)\WinUI3Apps\</OutDir> | ||
| <IntDir>$(SolutionDir)$(Platform)\$(Configuration)\TemporaryBuild\obj\$(ProjectName)\</IntDir> | ||
| </PropertyGroup> | ||
| <ItemDefinitionGroup> | ||
| <ClCompile> | ||
| <PreprocessorDefinitions>_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| <AdditionalIncludeDirectories>..\FileConverterLib;$(RepoRoot)src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
| </ClCompile> | ||
| <Link> | ||
| <SubSystem>Windows</SubSystem> | ||
| <EnableUAC>false</EnableUAC> | ||
| <ModuleDefinitionFile>Source.def</ModuleDefinitionFile> | ||
| <AdditionalDependencies>runtimeobject.lib;shell32.lib;shlwapi.lib;windowscodecs.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="framework.h" /> | ||
| <ClInclude Include="pch.h" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClCompile Include="dllmain.cpp" /> | ||
| <ClCompile Include="pch.cpp"> | ||
| <PrecompiledHeader Condition="'$(UsePrecompiledHeaders)' != 'false'">Create</PrecompiledHeader> | ||
| </ClCompile> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ProjectReference Include="..\FileConverterLib\FileConverterLib.vcxproj"> | ||
| <Project>{2d6e2c29-43ce-4be9-b0fd-2f6240d04ef4}</Project> | ||
| </ProjectReference> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Include="AppxManifest.xml" /> | ||
| <None Include="..\Strings\en-us\Resources.resw" /> | ||
| <None Include="Source.def" /> | ||
| <None Include="Assets\FileConverter\LargeTile.png" /> | ||
| <None Include="Assets\FileConverter\SmallTile.png" /> | ||
| <None Include="Assets\FileConverter\SplashScreen.png" /> | ||
| <None Include="Assets\FileConverter\Square150x150Logo.png" /> | ||
| <None Include="Assets\FileConverter\Square44x44Logo.png" /> | ||
| <None Include="Assets\FileConverter\storelogo.png" /> | ||
| <None Include="Assets\FileConverter\Wide310x150Logo.png" /> | ||
| </ItemGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| </Project> |
4 changes: 4 additions & 0 deletions
4
src/modules/FileConverter/FileConverterContextMenu/Source.def
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| EXPORTS | ||
| DllGetActivationFactory PRIVATE | ||
| DllCanUnloadNow PRIVATE | ||
| DllGetClassObject PRIVATE |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.