GNOME Bugzilla – Bug 765201
Allow gtk_settings_reset_property to be used
Last modified: 2016-04-24 11:17:56 UTC
We need to update GDK_VERSION_MAX_ALLOWED to 3.20 so that gtk_settings_reset_property does trigger the following warning: terminal-app.c: In function ‘terminal_app_theme_variant_changed_cb’: terminal-app.c:320:5: warning: ‘gtk_settings_reset_property’ is deprecated: Not available before 3.20 [-Wdeprecated-declarations] gtk_settings_reset_property (gtk_settings, GTK_SETTING_PREFER_DARK_THEME); ^ In file included from /opt/include/gtk-3.0/gtk/gtk.h:188:0, from terminal-app.h:22, from terminal-app.c:30: /opt/include/gtk-3.0/gtk/gtksettings.h:144:10: note: declared here void gtk_settings_reset_property (GtkSettings *settings, ^
Created attachment 326237 [details] [review] build: Allow gtk_settings_reset_property to be used
Created attachment 326240 [details] [review] build: Keep GLIB_MAX_ALLOWED in sync with GLIB_{MIN_}REQUIRED
Comment on attachment 326237 [details] [review] build: Allow gtk_settings_reset_property to be used Ok.
Comment on attachment 326240 [details] [review] build: Keep GLIB_MAX_ALLOWED in sync with GLIB_{MIN_}REQUIRED Ok, if this doesn't introduce any additional deprecation warnings from glib.
Reopening. This change (commit b8a643d) breaks building with older Gtk+ (in particular, Gtk+ 3.18 in Xenial): make[3]: Entering directory '/home/egmont/gnome-terminal2/src' CC libterminal_nautilus_la-terminal-client-utils.lo In file included from terminal-client-utils.c:22:0: ../config.h:20:33: warning: "GDK_VERSION_3_20" is not defined [-Wundef] #define GDK_VERSION_MAX_ALLOWED GDK_VERSION_3_20 ^ /usr/include/gtk-3.0/gdk/gdkversionmacros.h:216:5: note: in expansion of macro ‘GDK_VERSION_MAX_ALLOWED’ #if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_MIN_REQUIRED ^ In file included from /usr/include/gtk-3.0/gdk/gdk.h:31:0, from terminal-client-utils.c:31: /usr/include/gtk-3.0/gdk/gdkversionmacros.h:217:2: error: #error "GDK_VERSION_MAX_ALLOWED must be >= GDK_VERSION_MIN_REQUIRED" #error "GDK_VERSION_MAX_ALLOWED must be >= GDK_VERSION_MIN_REQUIRED" ^ In file included from terminal-client-utils.c:22:0: ../config.h:20:33: warning: "GDK_VERSION_3_20" is not defined [-Wundef] #define GDK_VERSION_MAX_ALLOWED GDK_VERSION_3_20 [further warnings stripped]
Let's revert this patch and go with the #pragma method to suppress the deprecation warning.
to talk about future versions, you can do G_ENCODE_VERSION(3,50)
Fixed on master.