From d9bc8c55b4babc07398fd1c88648a4cf971097ce Mon Sep 17 00:00:00 2001 From: Chris Angelico Date: Fri, 30 Jun 2023 22:24:48 +1000 Subject: [PATCH] window: Remove no-longer-needed mess of browser invocation --- window.pike | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/window.pike b/window.pike index ea910ecf..b792e3e4 100644 --- a/window.pike +++ b/window.pike @@ -4,32 +4,6 @@ //compatibility where the code exists also elsewhere (eg Gypsum). #define persist persist_config -int invoke_browser(string url) -{ - if (G->G->invoke_cmd) {Process.create_process(G->G->invoke_cmd+({url})); return 1;} - foreach (({ - #ifdef __NT__ - //Windows - ({"cmd","/c","start"}), - #elif defined(__APPLE__) - //Darwin - ({"open"}), - #else - //Linux, various. Try the first one in the list; if it doesn't - //work, go on to the next, and the next. A sloppy technique. :( - ({"xdg-open"}), - ({"exo-open"}), - ({"gnome-open"}), - ({"kde-open"}), - #endif - }),array(string) cmd) catch - { - Process.create_process(cmd+({url})); - G->G->invoke_cmd = cmd; //Remember this for next time, to save a bit of trouble - return 1; //If no exception is thrown, hope that it worked. - }; -} - //Usage: gtksignal(some_object,"some_signal",handler,arg,arg,arg) --> save that object. //Equivalent to some_object->signal_connect("some_signal",handler,arg,arg,arg) //When this object expires, the signal is disconnected, which should gc the function.