build: glib 2.46 deprecates g_settings_list_keys
Bump configure.ac
to GLIB_MIN_REQUIRED=2.46
. Compiling gives this warning:
CC gnome_terminal-terminal-settings-list.o
terminal-settings-list.c: In function ‘clone_child’:
terminal-settings-list.c:315:5: warning: ‘g_settings_list_keys’ is deprecated: Use 'g_settings_schema_list_keys' instead [-Wdeprecated-declarations]
315 | keys = g_settings_list_keys (dummy);
| ^~~~
In file included from /usr/include/glib-2.0/gio/gio.h:115,
from terminal-settings-list.h:21,
from terminal-settings-list.c:20:
/usr/include/glib-2.0/gio/gsettings.h:96:25: note: declared here
96 | gchar ** g_settings_list_keys (GSettings *settings);
| ^~~~~~~~~~~~~~~~~~~~
GLib 2.46 deprecates g_settings_list_keys in favor of the new g_settings_schema_list_keys.
Our relevant source code has this comment:
/* FIXME: this is beyond ugly. Need API on GSettingsSchema to list all the keys! */
@chpe As far as I understand, the new GLib method is exactly what you were looking for, right? If so, could you please update the code (and bump GLIB_MIN_REQUIRED (*))? (I'm sure you can do it magnitudes faster than I could, I'm not really familiar with these stuff.) Thanks in advance!
(*) Apparently you can bump all the way up to 2.50, there aren't any other warnings.
Edited by Egmont Koblinger