[Launcher] Categorize Lnk files in program plugin correctly as per the target file type (#6348)

* Updated UnregisteredApps code

* Added file type checking code and Folder and File classifications

* Added more file formats

* Removed run as admin for lnk folders

* Added script files as executable and changed hashset to case insensitive

* Removed runasadmin for generic files

* Removed FileTypes enum

* Extended ApplicationTypes enum

* Fix file format error

* Cleaned use of ApplicationType enum to public and match AppType and used ApplicationType in OnAppRenamed

* Modify tests to use ApplicationType enum

* Added tests for new App types

* Modified dummy appref

* Mock Directory.Exists and add tests for GetAppTypeFromPath

* Combined tests
This commit is contained in:
Arjun Balgovind
2020-09-10 15:06:37 -07:00
committed by GitHub
parent ab8bec8866
commit 82e1be2839
8 changed files with 287 additions and 59 deletions

View File

@@ -78,6 +78,24 @@ namespace Microsoft.Plugin.Program.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Folder.
/// </summary>
public static string powertoys_run_plugin_program_folder_type {
get {
return ResourceManager.GetString("powertoys_run_plugin_program_folder_type", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to File.
/// </summary>
public static string powertoys_run_plugin_program_generic_file_type {
get {
return ResourceManager.GetString("powertoys_run_plugin_program_generic_file_type", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Internet shortcut application.
/// </summary>

View File

@@ -153,6 +153,12 @@
<data name="powertoys_run_plugin_program_file_path" xml:space="preserve">
<value>Path</value>
</data>
<data name="powertoys_run_plugin_program_folder_type" xml:space="preserve">
<value>Folder</value>
</data>
<data name="powertoys_run_plugin_program_generic_file_type" xml:space="preserve">
<value>File</value>
</data>
<data name="powertoys_run_plugin_program_start_failed" xml:space="preserve">
<value>Unable to start</value>
</data>