Skip to content

Commit a3b62bc

Browse files
committed
Fix rename issue
1 parent 5ee6c4b commit a3b62bc

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
6363
.AsParallel()
6464
.WithCancellation(token)
6565
.Where(p => p.Enabled)
66-
.Select(p => p.Result(query.Search, _context.API))
66+
.Select(p => p.Result(query.Search, Context.API))
6767
.Where(r => r?.Score > 0)
6868
.ToList());
6969

@@ -80,7 +80,7 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
8080

8181
public async Task InitAsync(PluginInitContext context)
8282
{
83-
_context = context;
83+
Context = context;
8484

8585
_settings = context.API.LoadSettingJsonStorage<Settings>();
8686

@@ -155,17 +155,17 @@ public static async Task IndexPrograms()
155155

156156
public Control CreateSettingPanel()
157157
{
158-
return new ProgramSetting(_context, _settings, _win32s, _uwps);
158+
return new ProgramSetting(Context, _settings, _win32s, _uwps);
159159
}
160160

161161
public string GetTranslatedPluginTitle()
162162
{
163-
return _context.API.GetTranslation("flowlauncher_plugin_program_plugin_name");
163+
return Context.API.GetTranslation("flowlauncher_plugin_program_plugin_name");
164164
}
165165

166166
public string GetTranslatedPluginDescription()
167167
{
168-
return _context.API.GetTranslation("flowlauncher_plugin_program_plugin_description");
168+
return Context.API.GetTranslation("flowlauncher_plugin_program_plugin_description");
169169
}
170170

171171
public List<Result> LoadContextMenus(Result selectedResult)
@@ -174,19 +174,19 @@ public List<Result> LoadContextMenus(Result selectedResult)
174174
var program = selectedResult.ContextData as IProgram;
175175
if (program != null)
176176
{
177-
menuOptions = program.ContextMenus(_context.API);
177+
menuOptions = program.ContextMenus(Context.API);
178178
}
179179

180180
menuOptions.Add(
181181
new Result
182182
{
183-
Title = _context.API.GetTranslation("flowlauncher_plugin_program_disable_program"),
183+
Title = Context.API.GetTranslation("flowlauncher_plugin_program_disable_program"),
184184
Action = c =>
185185
{
186186
DisableProgram(program);
187-
_context.API.ShowMsg(
188-
_context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"),
189-
_context.API.GetTranslation(
187+
Context.API.ShowMsg(
188+
Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"),
189+
Context.API.GetTranslation(
190190
"flowlauncher_plugin_program_disable_dlgtitle_success_message"));
191191
return false;
192192
},
@@ -235,7 +235,7 @@ public static void StartProcess(Func<ProcessStartInfo, Process> runProcess, Proc
235235
{
236236
var name = "Plugin: Program";
237237
var message = $"Unable to start: {info.FileName}";
238-
_context.API.ShowMsg(name, message, string.Empty);
238+
Context.API.ShowMsg(name, message, string.Empty);
239239
}
240240
}
241241

Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,5 @@ private void Row_OnClick(object sender, RoutedEventArgs e)
347347
btnProgramSourceStatus.Content = "Enable";
348348
}
349349
}
350-
351-
private void CustomizeExplorer(object sender, TextChangedEventArgs e)
352-
{
353-
_settings.CustomizedExplorer = CustomizeExplorerBox.Text;
354-
}
355-
356-
private void CustomizeExplorerArgs(object sender, TextChangedEventArgs e)
357-
{
358-
_settings.CustomizedArgs = CustomizeArgsBox.Text;
359-
}
360350
}
361351
}

0 commit comments

Comments
 (0)