summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-07-24 18:50:24 +0200
committerraveit65 <[email protected]>2017-07-24 18:50:24 +0200
commit5945276ff2e3570435494bc942bfac53ed68952d (patch)
tree3f532e1a4dba34ae3d889bb33851575a82b37c3a
parentd3eaccf60ae1b95f176df2caba36f9e8036a5a75 (diff)
downloadmate-control-center-5945276ff2e3570435494bc942bfac53ed68952d.tar.bz2
mate-control-center-5945276ff2e3570435494bc942bfac53ed68952d.tar.xz
capplet-util: don't use deprecated gtk_show_uri
-rw-r--r--capplets/common/capplet-util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/capplets/common/capplet-util.c b/capplets/common/capplet-util.c
index 2a66e955..3f9e4b53 100644
--- a/capplets/common/capplet-util.c
+++ b/capplets/common/capplet-util.c
@@ -71,18 +71,26 @@ capplet_help (GtkWindow *parent, char const *section)
{
GError *error = NULL;
char *uri;
+#if !GTK_CHECK_VERSION (3, 22, 0)
GdkScreen *screen;
+#endif
g_return_if_fail (section != NULL);
+#if !GTK_CHECK_VERSION (3, 22, 0)
if (!parent)
screen = gdk_screen_get_default ();
else
screen = gtk_widget_get_screen (GTK_WIDGET (parent));
+#endif
uri = g_strdup_printf ("help:mate-user-guide/%s", section);
+#if GTK_CHECK_VERSION (3, 22, 0)
+ if (!gtk_show_uri_on_window (parent , uri, gtk_get_current_event_time (), &error)) {
+#else
if (!gtk_show_uri (screen, uri, gtk_get_current_event_time (), &error)) {
+#endif
capplet_error_dialog (
parent,
_("There was an error displaying help: %s"),