@b4n 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))

Just be aware of one thing: gtk_show_uri*() will happily open a lot more URIs than what the web browser might support. It basically can open any URI, be it http:, mailto: or my-custom-scheme:. It's nice and all, but some suggest that it should be handled with care not to open random programs using random schemes.

Admittedly, there's two things going for us here:

But we cannot know what plugins might do.

Though we should check how are file: URIs handled. We use that in help, and when using the builtin build exec command.


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/1304215240@github.com>