@kugel- commented on this pull request.


In src/utils.c:

>  	{
-		gchar *new_cmd = dialogs_show_input(_("Select Browser"), GTK_WINDOW(main_widgets.window),
-			_("Failed to spawn the configured browser command. "
-			  "Please correct it or enter another one."),
+		/* Uses the user's default browser akin to xdg-open (in flatpak through a portal) */
+		if (EMPTY(tool_prefs.browser_cmd))
+		{
+			if (gtk_show_uri_on_window(GTK_WINDOW(main_widgets.window), uri, GDK_CURRENT_TIME, NULL))

Seems we already feed file:// URIs to the function, e.g. for file:///usr/local/share/doc/geany/html/index.html. So at least file:// must be supported, although without the change we explicitly opened the configured browser, and now we rely on GTK do find the right "browser".

I hesitate to limit the inputs the function accepts. Webdevelopment plugins may want this function to open arbitrary stuff in the browser.

If anything, we might limit to https://, http:// and file:// but then we might exclude fancy webapps that some plugins could use (they could use gtk_show_uri_on_window() directly but lets help them to work on windows as well).

And then, on Windows we also do a generic open, the browser_cmd configuration is not a thing there.

Long story shot: I leave this as-is until problems arise


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3178/review/1588781960@github.com>