]> gitweb.factorcode.org Git - factor.git/commitdiff
webbrowser.*: let's open the file in a detached process
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 4 Nov 2015 10:35:40 +0000 (11:35 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 4 Nov 2015 10:35:40 +0000 (11:35 +0100)
Seems more useful overall and matches how it already works on Windows.

basis/webbrowser/linux/linux.factor
basis/webbrowser/macosx/macosx.factor
basis/webbrowser/webbrowser-docs.factor

index 322ea1943807fc7a139b94af32a255a939f6a3d8..8f3d518c4650904c3c82b7e224aa8910825ca1ed 100644 (file)
@@ -6,4 +6,4 @@ USING: arrays io.launcher kernel present system webbrowser ;
 IN: webbrowser.linux
 
 M: linux open-file ( path -- )
-    present "xdg-open" swap 2array try-process ;
+    present "xdg-open" swap 2array run-detached drop ;
index 7f9a22fc6bc49ae718a1518cd2ef5962b93c92dc..3b4c64214606ed220dadf10a32b3798d08560d15 100644 (file)
@@ -6,4 +6,4 @@ USING: arrays io.launcher kernel present system webbrowser ;
 IN: webbrowser.macosx
 
 M: macosx open-file ( path -- )
-    present "open" swap 2array try-process ;
+    present "open" swap 2array run-detached drop ;
index 264de1de05afaca44c25312062b6bf222e1c6aff..d537f2806a55ffff3b8f1a010a4477478c72896a 100644 (file)
@@ -8,8 +8,8 @@ IN: webbrowser
 HELP: open-file
 { $values { "path" string } }
 { $description
-    "Open a specified file or directory using the default "
-    "application, similar to double-clicking the file's icon."
+    "Open a specified file or directory in a detached process using "
+    "the default application, similar to double-clicking the file's icon."
 } ;
 
 HELP: open-url