diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj
index 1f979cbdf..c1fe421fb 100644
--- a/Flow.Launcher/Flow.Launcher.csproj
+++ b/Flow.Launcher/Flow.Launcher.csproj
@@ -89,7 +89,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 2e3922d06..f393af119 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -92,6 +92,7 @@
Query time:
| Version
Website
+ Uninstall
diff --git a/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml b/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml
index 39d5f8a4e..b1a8744fd 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml
@@ -5,11 +5,12 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="{DynamicResource flowlauncher_plugin_program_directory}"
- Width="530"
+ Width="Auto"
+ Height="276"
Background="{DynamicResource PopuBGColor}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
- SizeToContent="Height"
+ SizeToContent="Width"
WindowStartupLocation="CenterScreen">
@@ -69,9 +70,9 @@
TextAlignment="Left"
TextWrapping="WrapWithOverflow" />
-
-
-
+
+
+
@@ -88,21 +89,22 @@
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_program_directory}" />
-
+ Content="{DynamicResource flowlauncher_plugin_program_browse}"
+ DockPanel.Dock="Right" />
+ HorizontalAlignment="Stretch"
+ VerticalAlignment="Center" />
- _uid; set => _uid = value == null ? string.Empty : value.ToLowerInvariant(); }
public string DisplayName { get; set; }
public string Description { get; set; }
public string UserModelId { get; set; }
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
index c13b32e80..6d27e579e 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
@@ -23,7 +23,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
public class Win32 : IProgram, IEquatable
{
public string Name { get; set; }
- public string UniqueIdentifier { get => _uid; set => _uid = value.ToLowerInvariant(); } // For path comparison
+ public string UniqueIdentifier { get => _uid; set => _uid = value == null ? string.Empty : value.ToLowerInvariant(); } // For path comparison
public string IcoPath { get; set; }
public string FullPath { get; set; }
public string LnkResolvedPath { get; set; }
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/Models/ProgramSource.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/Models/ProgramSource.cs
index fb32fb892..571dc0017 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/Models/ProgramSource.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/Models/ProgramSource.cs
@@ -15,37 +15,39 @@ namespace Flow.Launcher.Plugin.Program.Views.Models
///
public class ProgramSource
{
- private string name;
+ private string name = string.Empty;
+ private string loc = string.Empty;
+ private string uniqueIdentifier = string.Empty;
- private string loc;
public string Location
{
get => loc;
set
{
- loc = value;
- UniqueIdentifier = value.ToLowerInvariant();
+ loc = value ?? string.Empty;
+ UniqueIdentifier = value;
}
}
- public string Name { get => name ?? new DirectoryInfo(Location).Name; set => name = value; }
+
+ public string Name { get => name; set => name = value ?? string.Empty; }
public bool Enabled { get; set; } = true;
- public string UniqueIdentifier { get; private set; }
+ public string UniqueIdentifier
+ {
+ get => uniqueIdentifier;
+ private set
+ {
+ uniqueIdentifier = value == null ? string.Empty : value.ToLowerInvariant();
+ }
+ }
[JsonConstructor]
public ProgramSource(string name, string location, bool enabled, string uniqueIdentifier)
{
- loc = location;
- this.name = name;
+ loc = location ?? string.Empty;
+ Name = name;
Enabled = enabled;
- if (location.Equals(uniqueIdentifier, StringComparison.OrdinalIgnoreCase))
- {
- UniqueIdentifier = location.ToLowerInvariant(); // To make sure old config can be reset to case-insensitive
- }
- else
- {
- UniqueIdentifier = uniqueIdentifier; // For uwp apps
- }
+ UniqueIdentifier = uniqueIdentifier;
}
///
@@ -55,14 +57,15 @@ namespace Flow.Launcher.Plugin.Program.Views.Models
/// enabled
public ProgramSource(string location, bool enabled = true)
{
- loc = location;
+ loc = location ?? string.Empty;
Enabled = enabled;
- UniqueIdentifier = location.ToLowerInvariant(); // For path comparison
+ UniqueIdentifier = location; // For path comparison
+ Name = new DirectoryInfo(Location).Name;
}
public ProgramSource(IProgram source)
{
- loc = source.Location;
+ loc = source.Location ?? string.Empty;
Name = source.Name;
Enabled = source.Enabled;
UniqueIdentifier = source.UniqueIdentifier;