--- configure 2020-06-07 20:13:09.165799417 +0000 +++ configure 2020-06-07 20:12:54.318912986 +0000 @@ -3308,7 +3308,7 @@ GLIB_VERSION_CFLAGS="-DGLIB_MIN_REQUIRED_VERSION=GLIB_ -GLIB_REQUIRED_VERSION=2.57.2 +GLIB_REQUIRED_VERSION=2.56.3 PANGO_REQUIRED_VERSION=1.41.0 ATK_REQUIRED_VERSION=2.15.1 CAIRO_REQUIRED_VERSION=1.14.0 @@ -23543,12 +23543,12 @@ if test -n "$BASE_DEPENDENCIES_CFLAGS"; then pkg_cv_BASE_DEPENDENCIES_CFLAGS="$BASE_DEPENDENCIES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_BASE_DEPENDENCIES_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>/dev/null` + pkg_cv_BASE_DEPENDENCIES_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -23560,12 +23560,12 @@ if test -n "$BASE_DEPENDENCIES_LIBS"; then pkg_cv_BASE_DEPENDENCIES_LIBS="$BASE_DEPENDENCIES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_BASE_DEPENDENCIES_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>/dev/null` + pkg_cv_BASE_DEPENDENCIES_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -23586,14 +23586,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>&1` + BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>&1` else - BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>&1` + BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$BASE_DEPENDENCIES_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0) were not met: + as_fn_error $? "Package requirements (glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0) were not met: $BASE_DEPENDENCIES_PKG_ERRORS @@ -24385,7 +24385,7 @@ else fi - min_glib_version=2.57.2 + min_glib_version=2.56.3 pkg_config_args="glib-2.0 >= $min_glib_version" for module in . gobject gmodule-no-export do @@ -24879,7 +24879,7 @@ rm -f core conftest.err conftest.$ac_objext \ GLIB_MKENUMS="" GLIB_COMPILE_RESOURCES="" as_fn_error $? " -*** GLIB 2.57.2 or better is required. The latest version of +*** GLIB 2.56.3 or better is required. The latest version of *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/." "$LINENO" 5 fi rm -f conf.glibtest @@ -26825,12 +26825,12 @@ if test "$os_win32" != "yes"; then have_gio_unix=yes fi if test "$have_gio_unix" = "yes"; then - GDK_GIO_PACKAGE="gio-unix-2.0 >= 2.57.2" + GDK_GIO_PACKAGE="gio-unix-2.0 >= 2.56.3" $as_echo "#define HAVE_GIO_UNIX 1" >>confdefs.h else - GDK_GIO_PACKAGE="gio-2.0 >= 2.57.2" + GDK_GIO_PACKAGE="gio-2.0 >= 2.56.3" fi # Check for Pango flags @@ -27134,13 +27134,13 @@ $as_echo "yes" >&6; } fi -GTK_PACKAGES="atk >= 2.15.1 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0 gio-2.0 >= 2.57.2" +GTK_PACKAGES="atk >= 2.15.1 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0 gio-2.0 >= 2.56.3" GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES epoxy >= 1.4 fribidi >= 0.19.7" if test "x$enable_x11_backend" = xyes -o "x$enable_wayland_backend" = xyes; then GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2" fi if test "$have_gio_unix" = "yes"; then - GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES gio-unix-2.0 >= 2.57.2" + GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES gio-unix-2.0 >= 2.56.3" fi GTK_EXTRA_LIBS= diff --git gtk/gtkmountoperation.c gtk/gtkmountoperation.c index 43b039e40e..8ca5c55413 100644 --- gtk/gtkmountoperation.c +++ gtk/gtkmountoperation.c @@ -121,10 +121,14 @@ struct _GtkMountOperationPrivate { GtkWidget *username_entry; GtkWidget *domain_entry; GtkWidget *password_entry; +#if GLIB_CHECK_VERSION(2, 57, 2) GtkWidget *pim_entry; +#endif GtkWidget *anonymous_toggle; +#if GLIB_CHECK_VERSION(2, 57, 2) GtkWidget *tcrypt_hidden_toggle; GtkWidget *tcrypt_system_toggle; +#endif GList *user_widgets; GAskPasswordFlags ask_flags; @@ -351,6 +355,7 @@ pw_dialog_got_response (GtkDialog *dialog, g_mount_operation_set_password (op, text); } +#if GLIB_CHECK_VERSION(2, 57, 2) if (priv->pim_entry) { text = gtk_entry_get_text (GTK_ENTRY (priv->pim_entry)); @@ -371,6 +376,7 @@ pw_dialog_got_response (GtkDialog *dialog, if (priv->tcrypt_system_toggle && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->tcrypt_system_toggle))) g_mount_operation_set_is_tcrypt_system_volume (op, TRUE); +#endif if (priv->ask_flags & G_ASK_PASSWORD_SAVING_SUPPORTED) g_mount_operation_set_password_save (op, priv->password_save); @@ -399,6 +405,7 @@ entry_has_input (GtkWidget *entry_widget) return text != NULL && text[0] != '\0'; } +#if GLIB_CHECK_VERSION(2, 57, 2) static gboolean pim_entry_is_valid (GtkWidget *entry_widget) { @@ -421,6 +428,7 @@ pim_entry_is_valid (GtkWidget *entry_widget) else return TRUE; } +#endif static gboolean pw_dialog_input_is_valid (GtkMountOperation *operation) @@ -435,8 +443,12 @@ pw_dialog_input_is_valid (GtkMountOperation *operation * definitively needs a password. */ is_valid = entry_has_input (priv->username_entry) && +#if GLIB_CHECK_VERSION(2, 57, 2) entry_has_input (priv->domain_entry) && pim_entry_is_valid (priv->pim_entry); +#else + entry_has_input (priv->domain_entry); +#endif return is_valid; } @@ -705,6 +717,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS priv->domain_entry = table_add_entry (operation, rows++, _("_Domain"), default_domain, operation); +#if GLIB_CHECK_VERSION(2, 57, 2) priv->pim_entry = NULL; if (priv->ask_flags & G_ASK_PASSWORD_TCRYPT) { @@ -729,6 +742,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS priv->pim_entry = table_add_entry (operation, rows++, _("_PIM"), NULL, operation); } +#endif priv->password_entry = NULL; if (priv->ask_flags & G_ASK_PASSWORD_NEED_PASSWORD) @@ -846,12 +860,14 @@ call_password_proxy_cb (GObject *source, g_mount_operation_set_password (op, g_variant_get_string (value, NULL)); else if (strcmp (key, "password_save") == 0) g_mount_operation_set_password_save (op, g_variant_get_uint32 (value)); +#if GLIB_CHECK_VERSION(2, 57, 2) else if (strcmp (key, "hidden_volume") == 0) g_mount_operation_set_is_tcrypt_hidden_volume (op, g_variant_get_boolean (value)); else if (strcmp (key, "system_volume") == 0) g_mount_operation_set_is_tcrypt_system_volume (op, g_variant_get_boolean (value)); else if (strcmp (key, "pim") == 0) g_mount_operation_set_pim (op, g_variant_get_uint32 (value)); +#endif } out: diff --git meson.build meson.build index 415a66c732..9081b03381 100644 --- meson.build +++ meson.build @@ -8,8 +8,8 @@ project('gtk+-3.0', 'c', license: 'LGPLv2.1+') glib_major_req = 2 -glib_minor_req = 57 -glib_micro_req = 2 +glib_minor_req = 56 +glib_micro_req = 3 if glib_minor_req.is_odd() glib_min_required = 'GLIB_VERSION_@0@_@1@'.format(glib_major_req, glib_minor_req - 1)