summaryrefslogtreecommitdiff
path: root/mateweather/mateweather-dialog.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-07-30 10:46:54 +0200
committerraveit65 <[email protected]>2017-08-05 15:02:54 +0200
commitb7a723af540cd8051807a2af4f33141029ea1659 (patch)
tree7a59b66dde6a8cab34341a97817eee6405d4aeab /mateweather/mateweather-dialog.c
parent822ccb7f2f14f839291b79efdb938912a1217806 (diff)
downloadmate-applets-b7a723af540cd8051807a2af4f33141029ea1659.tar.bz2
mate-applets-b7a723af540cd8051807a2af4f33141029ea1659.tar.xz
weather: don't use deprecated gtk_show_uri
Diffstat (limited to 'mateweather/mateweather-dialog.c')
-rw-r--r--mateweather/mateweather-dialog.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c
index dc14080d..5f7911dc 100644
--- a/mateweather/mateweather-dialog.c
+++ b/mateweather/mateweather-dialog.c
@@ -109,10 +109,17 @@ static void response_cb(MateWeatherDialog* dialog, gint id, gpointer data)
static void link_cb(GtkButton* button, gpointer data)
{
+#if GTK_CHECK_VERSION (3, 22, 0)
+ gtk_show_uri_on_window (NULL,
+ "http://www.weather.com/",
+ gtk_get_current_event_time (),
+ NULL);
+#else
gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (button)),
- "http://www.weather.com/",
- gtk_get_current_event_time (),
- NULL);
+ "http://www.weather.com/",
+ gtk_get_current_event_time (),
+ NULL);
+#endif
}
static gchar* replace_multiple_new_lines(gchar* s)