[gnome-software] Bump gtk+ dep to 3.22.4 and drop ifdefs for older versions



commit 7a385c1f16cd9806f4751873aa20cb88aa3cb65c
Author: Kalev Lember <klember redhat com>
Date:   Mon Nov 13 11:18:44 2017 +0100

    Bump gtk+ dep to 3.22.4 and drop ifdefs for older versions

 meson.build          |    2 +-
 src/gs-application.c |    4 ----
 src/gs-auth-dialog.c |    7 -------
 src/gs-shell.c       |   10 ----------
 4 files changed, 1 insertions(+), 22 deletions(-)
---
diff --git a/meson.build b/meson.build
index ea5a03d..520aa98 100644
--- a/meson.build
+++ b/meson.build
@@ -96,7 +96,7 @@ appstream_glib = dependency('appstream-glib', version : '>= 0.7.0')
 gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.31.5')
 gio_unix = dependency('gio-unix-2.0')
 gmodule = dependency('gmodule-2.0')
-gtk = dependency('gtk+-3.0', version : '>= 3.20.0')
+gtk = dependency('gtk+-3.0', version : '>= 3.22.4')
 json_glib = dependency('json-glib-1.0', version : '>= 1.1.1')
 libm = cc.find_library('m', required: false)
 libsecret = dependency('libsecret-1')
diff --git a/src/gs-application.c b/src/gs-application.c
index 8f48e30..1c4c948 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -34,10 +34,8 @@
 #include <gdk/gdkx.h>
 #endif
 #ifdef GDK_WINDOWING_WAYLAND
-#if GTK_CHECK_VERSION(3,22,4)
 #include <gdk/gdkwayland.h>
 #endif
-#endif
 
 #ifdef HAVE_PACKAGEKIT
 #include "gs-dbus-helper.h"
@@ -748,14 +746,12 @@ install_resources_activated (GSimpleAction *action,
        }
 #endif
 #ifdef GDK_WINDOWING_WAYLAND
-#if GTK_CHECK_VERSION(3,22,4)
        if (GDK_IS_WAYLAND_DISPLAY (display)) {
                if (startup_id != NULL && startup_id[0] != '\0')
                        gdk_wayland_display_set_startup_notification_id (display,
                                                                         startup_id);
        }
 #endif
-#endif
 
        gs_application_present_window (app, startup_id);
 
diff --git a/src/gs-auth-dialog.c b/src/gs-auth-dialog.c
index 57e25a5..0ad5bfc 100644
--- a/src/gs-auth-dialog.c
+++ b/src/gs-auth-dialog.c
@@ -132,7 +132,6 @@ gs_auth_dialog_authenticate_cb (GObject *source,
                if (url != NULL) {
                        g_autoptr(GError) error_local = NULL;
                        g_debug ("showing link in: %s", error->message);
-#if GTK_CHECK_VERSION (3, 22, 0)
                        if (!gtk_show_uri_on_window (GTK_WINDOW (dialog),
                                                     url,
                                                     GDK_CURRENT_TIME,
@@ -140,12 +139,6 @@ gs_auth_dialog_authenticate_cb (GObject *source,
                                g_warning ("failed to show URI %s: %s",
                                           url, error_local->message);
                        }
-#else
-                       if (!gtk_show_uri (NULL, url, GDK_CURRENT_TIME, &error_local)) {
-                               g_warning ("failed to show URI %s: %s",
-                                          url, error_local->message);
-                       }
-#endif
                        return;
                }
 
diff --git a/src/gs-shell.c b/src/gs-shell.c
index ff4158a..4b59f0d 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -1990,7 +1990,6 @@ gs_shell_show_uri (GsShell *shell, const gchar *url)
        GsShellPrivate *priv = gs_shell_get_instance_private (shell);
        g_autoptr(GError) error = NULL;
 
-#if GTK_CHECK_VERSION (3, 22, 0)
        if (!gtk_show_uri_on_window (priv->main_window,
                                     url,
                                     GDK_CURRENT_TIME,
@@ -1998,15 +1997,6 @@ gs_shell_show_uri (GsShell *shell, const gchar *url)
                g_warning ("failed to show URI %s: %s",
                           url, error->message);
        }
-#else
-       if (!gtk_show_uri (NULL,
-                          url,
-                          GDK_CURRENT_TIME,
-                          &error)) {
-               g_warning ("failed to show URI %s: %s",
-                          url, error->message);
-       }
-#endif
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]