File tree Expand file tree Collapse file tree 3 files changed +14
-11
lines changed
Plugins/Wox.Plugin.Program Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -191,22 +191,19 @@ private void DisableProgram(IProgram programToDelete)
191191 ) ;
192192 }
193193
194- public static bool StartProcess ( Func < ProcessStartInfo , Process > runProcess , ProcessStartInfo info )
194+ public static void StartProcess ( Func < ProcessStartInfo , Process > runProcess , ProcessStartInfo info )
195195 {
196196 bool hide ;
197197 try
198198 {
199199 runProcess ( info ) ;
200- hide = true ;
201200 }
202201 catch ( Exception )
203202 {
204203 var name = "Plugin: Program" ;
205- var message = $ "Can't start: { info . FileName } ";
204+ var message = $ "Unable to start: { info . FileName } ";
206205 _context . API . ShowMsg ( name , message , string . Empty ) ;
207- hide = false ;
208206 }
209- return hide ;
210207 }
211208
212209 public void ReloadData ( )
Original file line number Diff line number Diff line change @@ -319,11 +319,14 @@ public List<Result> ContextMenus(IPublicAPI api)
319319 new Result
320320 {
321321 Title = api . GetTranslation ( "wox_plugin_program_open_containing_folder" ) ,
322+
322323 Action = _ =>
323324 {
324- var hide = Main . StartProcess ( Process . Start , new ProcessStartInfo ( Package . Location ) ) ;
325- return hide ;
325+ Main . StartProcess ( Process . Start , new ProcessStartInfo ( Package . Location ) ) ;
326+
327+ return true ;
326328 } ,
329+
327330 IcoPath = "Images/folder.png"
328331 }
329332 } ;
Original file line number Diff line number Diff line change @@ -64,8 +64,10 @@ public Result Result(string query, IPublicAPI api)
6464 FileName = FullPath ,
6565 WorkingDirectory = ParentDirectory
6666 } ;
67- var hide = Main . StartProcess ( Process . Start , info ) ;
68- return hide ;
67+
68+ Main . StartProcess ( Process . Start , info ) ;
69+
70+ return true ;
6971 }
7072 } ;
7173
@@ -129,8 +131,9 @@ public List<Result> ContextMenus(IPublicAPI api)
129131 Title = api . GetTranslation ( "wox_plugin_program_open_containing_folder" ) ,
130132 Action = _ =>
131133 {
132- var hide = Main . StartProcess ( Process . Start , new ProcessStartInfo ( ParentDirectory ) ) ;
133- return hide ;
134+ Main . StartProcess ( Process . Start , new ProcessStartInfo ( ParentDirectory ) ) ;
135+
136+ return true ;
134137 } ,
135138 IcoPath = "Images/folder.png"
136139 }
You can’t perform that action at this time.
0 commit comments