From 6450b6a5560c687d6dfe26e15de65b9f39bd1c90 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 27 Jun 2018 12:07:03 -0700 Subject: [PATCH] Fix build failure with old gtk versions --- gtk/src/callbacks.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index bd7bc3f1e..d5cb56a5d 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -4610,12 +4610,16 @@ browse_url(signal_user_data_t *ud, const gchar *url) #if defined(_WIN32) ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL); #else - GtkWindow * parent; gboolean result; +#if GTK_CHECK_VERSION(3, 22, 0) + GtkWindow * parent; + parent = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window")); result = gtk_show_uri_on_window(parent, url, GDK_CURRENT_TIME, NULL); if (result) return; +#endif + char *argv[] = {"xdg-open",NULL,NULL,NULL}; argv[1] = (gchar*)url; -- 2.40.0