mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Clean up g_settings_list_schemas()
In its previous form, g_settings_list_schemas() was not useful as a tool to prevent aborts due to using g_settings_new() with an invalid schema name. This is because g_settings_list_scheams() also listed relocatable schemas, and calling g_settings_new() for those would abort just the same as if you called it for a non-existent schema. Modify g_settings_list_schemas() so that it only returns schemas for which it is safe to call g_settings_new(). Add another call for sake of completeness: g_settings_list_relocatable_schemas().
This commit is contained in:
@@ -71,6 +71,7 @@ struct _GSettings
|
||||
GType g_settings_get_type (void);
|
||||
|
||||
const gchar * const * g_settings_list_schemas (void);
|
||||
const gchar * const * g_settings_list_relocatable_schemas (void);
|
||||
GSettings * g_settings_new (const gchar *schema);
|
||||
GSettings * g_settings_new_with_path (const gchar *schema,
|
||||
const gchar *path);
|
||||
|
Reference in New Issue
Block a user