[libnma/lr/gtk-4.0: 31/33] all: bump Gtk4 version requirement
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libnma/lr/gtk-4.0: 31/33] all: bump Gtk4 version requirement
- Date: Fri, 15 Oct 2021 12:24:13 +0000 (UTC)
commit 9aefa7f4762300861b7304cf86464cddabe9dfa9
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Thu Oct 14 16:43:43 2021 +0200
all: bump Gtk4 version requirement
configure.ac | 4 ++--
meson.build | 6 +++---
src/nma-mobile-wizard.c | 4 ++--
src/nma-private.h | 2 +-
src/nma-ui-utils.c | 4 ++--
src/nma-wifi-dialog.c | 6 +++---
src/tests/cert-chooser.c | 2 +-
src/utils/utils.c | 4 ++--
8 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index afe6716c..98f61f5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,8 +136,8 @@ GTK3_CFLAGS="$GTK3_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_10 -DGDK_VERS
AC_ARG_WITH(libnma-gtk4, AS_HELP_STRING([--with-libnma-gtk4], [build EXPERIMENTAL libnma-gtk4 library for
use with GTK4]))
if test "$with_libnma_gtk4" == yes; then
- PKG_CHECK_MODULES(GTK4, gtk4 >= 3.94)
- GTK4_CFLAGS="$GTK4_CFLAGS -DGTK_VERSION_MIN_REQUIRED=GTK_VERSION_3_96
-DGTK_VERSION_MAX_ALLOWED=GTK_VERSION_3_96"
+ PKG_CHECK_MODULES(GTK4, gtk4 >= 4.0)
+ GTK4_CFLAGS="$GTK4_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_0
-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_4_0"
else
with_libnma_gtk4=no
fi
diff --git a/meson.build b/meson.build
index 1ef88aaf..1021878a 100644
--- a/meson.build
+++ b/meson.build
@@ -74,12 +74,12 @@ endif
enable_libnma_gtk4 = get_option('libnma_gtk4')
if enable_libnma_gtk4
- gtk4_ext_dep = dependency('gtk4', version: '>= 3.96')
+ gtk4_ext_dep = dependency('gtk4', version: '>= 4.0')
gtk4_dep = declare_dependency(
dependencies: gtk4_ext_dep,
compile_args: [
- '-DGTK_VERSION_MIN_REQUIRED=GTK_VERSION_3_96',
- '-DGTK_VERSION_MAX_ALLOWED=GTK_VERSION_3_96'
+ '-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_0',
+ '-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_4_0'
]
)
endif
diff --git a/src/nma-mobile-wizard.c b/src/nma-mobile-wizard.c
index ec299087..816ac437 100644
--- a/src/nma-mobile-wizard.c
+++ b/src/nma-mobile-wizard.c
@@ -13,7 +13,7 @@
#include <stdlib.h>
#ifdef GDK_WINDOWING_X11
-#if GTK_CHECK_VERSION(3,90,0)
+#if GTK_CHECK_VERSION(4,0,0)
#include <gdk/x11/gdkx.h>
#else
#include <gdk/gdkx.h>
@@ -1466,7 +1466,7 @@ nma_mobile_wizard_init (NMAMobileWizard *self)
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (GTK_WIDGET (priv->assistant)))) {
-#if GTK_CHECK_VERSION(3,90,0)
+#if GTK_CHECK_VERSION(4,0,0)
GdkSurface *surface = gtk_native_get_surface (GTK_NATIVE (priv->assistant));
gdk_x11_surface_set_skip_taskbar_hint (surface, TRUE);
#else
diff --git a/src/nma-private.h b/src/nma-private.h
index b30015c4..cf54225a 100644
--- a/src/nma-private.h
+++ b/src/nma-private.h
@@ -8,7 +8,7 @@
#ifndef NMA_PRIVATE_H
-#if !GTK_CHECK_VERSION(3,96,0)
+#if !GTK_CHECK_VERSION(4,0,0)
#define gtk_editable_set_text(editable,text) gtk_entry_set_text(GTK_ENTRY(editable), (text))
#define gtk_editable_get_text(editable) gtk_entry_get_text(GTK_ENTRY(editable))
#define gtk_editable_set_width_chars(editable, n_chars)
gtk_entry_set_width_chars(GTK_ENTRY(editable), (n_chars))
diff --git a/src/nma-ui-utils.c b/src/nma-ui-utils.c
index a166ee3a..cf257517 100644
--- a/src/nma-ui-utils.c
+++ b/src/nma-ui-utils.c
@@ -209,7 +209,7 @@ popup_menu_item_info_register (GtkWidget *item,
static void
icon_release_cb (GtkEntry *entry,
GtkEntryIconPosition position,
-#if !GTK_CHECK_VERSION(3,90,0)
+#if !GTK_CHECK_VERSION(4,0,0)
GdkEventButton *event,
#endif
gpointer data)
@@ -217,7 +217,7 @@ icon_release_cb (GtkEntry *entry,
GtkMenu *menu = GTK_MENU (data);
if (position == GTK_ENTRY_ICON_SECONDARY) {
-#if GTK_CHECK_VERSION(3,90,0)
+#if GTK_CHECK_VERSION(4,0,0)
gtk_widget_show (GTK_WIDGET (data));
gtk_menu_popup_at_pointer (menu, NULL);
#else
diff --git a/src/nma-wifi-dialog.c b/src/nma-wifi-dialog.c
index d42c4484..60793fc6 100644
--- a/src/nma-wifi-dialog.c
+++ b/src/nma-wifi-dialog.c
@@ -520,7 +520,7 @@ connection_combo_init (NMAWifiDialog *self)
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (widget), renderer, TRUE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (widget), renderer,
"text", C_NAME_COLUMN);
-#if !GTK_CHECK_VERSION(3,96,0)
+#if !GTK_CHECK_VERSION(4,0,0)
gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (widget), 1);
#endif
@@ -1093,7 +1093,7 @@ internal_init (NMAWifiDialog *self,
gtk_window_set_icon_name (GTK_WINDOW (self), icon_name);
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "image1"));
-#if GTK_CHECK_VERSION(3,90,0)
+#if GTK_CHECK_VERSION(4,0,0)
gtk_image_set_from_icon_name (GTK_IMAGE (widget), icon_name);
#else
gtk_image_set_from_icon_name (GTK_IMAGE (widget), icon_name, GTK_ICON_SIZE_DIALOG);
@@ -1111,7 +1111,7 @@ internal_init (NMAWifiDialog *self,
priv->ok_response_button = widget;
}
-#if !GTK_CHECK_VERSION(3,96,0)
+#if !GTK_CHECK_VERSION(4,0,0)
g_object_set (G_OBJECT (widget), "can-default", TRUE, NULL);
gtk_widget_grab_default (widget);
#endif
diff --git a/src/tests/cert-chooser.c b/src/tests/cert-chooser.c
index e99f684a..5ee251b7 100644
--- a/src/tests/cert-chooser.c
+++ b/src/tests/cert-chooser.c
@@ -35,7 +35,7 @@ main (int argc, char *argv[])
content = GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog)));
gtk_orientable_set_orientation (GTK_ORIENTABLE (content), GTK_ORIENTATION_VERTICAL);
-#if GTK_CHECK_VERSION(3,90,0)
+#if GTK_CHECK_VERSION(4,0,0)
gtk_box_set_spacing (content, 6);
#endif
diff --git a/src/utils/utils.c b/src/utils/utils.c
index 7fa460c4..cb769fab 100644
--- a/src/utils/utils.c
+++ b/src/utils/utils.c
@@ -259,14 +259,14 @@ utils_override_bg_color (GtkWidget *widget, GdkRGBA *rgba)
if (rgba) {
css = g_strdup_printf ("* { background-color: %s; background-image: none; }",
gdk_rgba_to_string (rgba));
-#if GTK_CHECK_VERSION(3,90,0)
+#if GTK_CHECK_VERSION(4,0,0)
gtk_css_provider_load_from_data (provider, css, -1);
#else
gtk_css_provider_load_from_data (provider, css, -1, NULL);
#endif
g_free (css);
} else {
-#if GTK_CHECK_VERSION(3,90,0)
+#if GTK_CHECK_VERSION(4,0,0)
gtk_css_provider_load_from_data (provider, "", -1);
#else
gtk_css_provider_load_from_data (provider, "", -1, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]