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 722134 - Add g_settings_new_try (or something similar)
Add g_settings_new_try (or something similar)
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gsettings
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-01-13 21:25 UTC by jessevdk@gmail.com
Modified: 2018-05-24 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jessevdk@gmail.com 2014-01-13 21:25:04 UTC
I've found that on several occasions I'd like to create a GSettings, but not fail/abort when the schema doesn't exist. In these cases I'd like to softly depend on some settings (like for example fonts) but not crash my application trying to get the corresponding settings. Currently we work around it by getting the default schema source, doing a schema lookup and creating a new settings using g_settings_new_full.

Could we maybe have an API of the form:

GSettings *g_settings_new_try (const gchar *schema_id, GError **error)

So that we can gracefully handle schema's not existing without going through the schema_source/schema API's?
Comment 1 GNOME Infrastructure Team 2018-05-24 16:12:47 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/815.