Skip to content

Commit b0297d3

Browse files
authored
Merge pull request #1581 from VictoriousRaptor/RefactorUWP
Refactor UWP class in Program plugin
2 parents 842d6fb + 8dffdfc commit b0297d3

File tree

7 files changed

+302
-546
lines changed

7 files changed

+302
-546
lines changed

Flow.Launcher.Test/Plugins/ProgramTest.cs

Lines changed: 0 additions & 30 deletions
This file was deleted.

Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@
8181

8282
<!-- Dialogs -->
8383
<system:String x:Key="flowlauncher_plugin_program_disable_dlgtitle_success">Success</system:String>
84+
<system:String x:Key="flowlauncher_plugin_program_disable_dlgtitle_error">Error</system:String>
8485
<system:String x:Key="flowlauncher_plugin_program_disable_dlgtitle_success_message">Successfully disabled this program from displaying in your query</system:String>
8586
<system:String x:Key="flowlauncher_plugin_program_run_as_administrator_not_supported_message">This app is not intended to be run as administrator</system:String>
87+
<system:String x:Key="flowlauncher_plugin_program_run_failed">Unable to run {0}</system:String>
8688

8789
</ResourceDictionary>

Plugins/Flow.Launcher.Plugin.Program/Main.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Threading;
66
using System.Threading.Tasks;
77
using System.Windows.Controls;
8+
using Flow.Launcher.Infrastructure;
89
using Flow.Launcher.Infrastructure.Logger;
910
using Flow.Launcher.Infrastructure.Storage;
1011
using Flow.Launcher.Plugin.Program.Programs;
@@ -225,9 +226,9 @@ public static void StartProcess(Func<ProcessStartInfo, Process> runProcess, Proc
225226
}
226227
catch (Exception)
227228
{
228-
var name = "Plugin: Program";
229-
var message = $"Unable to start: {info.FileName}";
230-
Context.API.ShowMsg(name, message, string.Empty);
229+
var title = Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_error");
230+
var message = string.Format(Context.API.GetTranslation("flowlauncher_plugin_program_run_failed"), info.FileName);
231+
Context.API.ShowMsg(title, string.Format(message, info.FileName), string.Empty);
231232
}
232233
}
233234

Plugins/Flow.Launcher.Plugin.Program/Programs/ApplicationActivationHelper.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

Plugins/Flow.Launcher.Plugin.Program/Programs/AppxPackageHelper.cs

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)