Skip to content

Commit

Permalink
window: Remove no-longer-needed mess of browser invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Jun 30, 2023
1 parent 32e28ff commit d9bc8c5
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions window.pike
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d9bc8c5

Please sign in to comment.