After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765201 - Allow gtk_settings_reset_property to be used
Allow gtk_settings_reset_property to be used
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
3.20.x
Other All
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-18 10:19 UTC by Debarshi Ray
Modified: 2016-04-24 11:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Allow gtk_settings_reset_property to be used (722 bytes, patch)
2016-04-18 10:21 UTC, Debarshi Ray
committed Details | Review
build: Keep GLIB_MAX_ALLOWED in sync with GLIB_{MIN_}REQUIRED (870 bytes, patch)
2016-04-18 10:42 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2016-04-18 10:19:30 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,
          ^
Comment 1 Debarshi Ray 2016-04-18 10:21:27 UTC
Created attachment 326237 [details] [review]
build: Allow gtk_settings_reset_property to be used
Comment 2 Debarshi Ray 2016-04-18 10:42:55 UTC
Created attachment 326240 [details] [review]
build: Keep GLIB_MAX_ALLOWED in sync with GLIB_{MIN_}REQUIRED
Comment 3 Christian Persch 2016-04-18 16:19:27 UTC
Comment on attachment 326237 [details] [review]
build: Allow gtk_settings_reset_property to be used

Ok.
Comment 4 Christian Persch 2016-04-18 16:19:52 UTC
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.
Comment 5 Egmont Koblinger 2016-04-20 10:44:06 UTC
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]
Comment 6 Christian Persch 2016-04-20 16:50:11 UTC
Let's revert this patch and go with the #pragma method to suppress the deprecation warning.
Comment 7 Matthias Clasen 2016-04-20 18:07:53 UTC
to talk about future versions,  you can do G_ENCODE_VERSION(3,50)
Comment 8 Christian Persch 2016-04-24 11:17:56 UTC
Fixed on master.