comparison gtk3/dw.c @ 2158:df3ee6273557

GTK3: Fix deprecation warning by switching to gtk_show_uri_on_window() in 3.22.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 28 Sep 2020 20:27:11 +0000
parents 2090d7f46de5
children 48172881415c
comparison
equal deleted inserted replaced
2157:3ba5cbea84ec 2158:df3ee6273557
11387 * url: Uniform resource locator. 11387 * url: Uniform resource locator.
11388 */ 11388 */
11389 int dw_browse(const char *url) 11389 int dw_browse(const char *url)
11390 { 11390 {
11391 /* If possible load the URL/URI using gvfs... */ 11391 /* If possible load the URL/URI using gvfs... */
11392 #if GTK_CHECK_VERSION(3,22,0)
11393 if(gtk_show_uri_on_window(NULL, url, GDK_CURRENT_TIME, NULL))
11394 #else
11392 if(gtk_show_uri(gdk_screen_get_default(), url, GDK_CURRENT_TIME, NULL)) 11395 if(gtk_show_uri(gdk_screen_get_default(), url, GDK_CURRENT_TIME, NULL))
11396 #endif
11393 { 11397 {
11394 return DW_ERROR_NONE; 11398 return DW_ERROR_NONE;
11395 } 11399 }
11396 else 11400 else
11397 { 11401 {