diff options
author | Ryan Lortie <desrt@desrt.ca> | 2013-10-26 18:57:55 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2013-10-27 10:42:55 -0700 |
commit | 96a053e025f4b5a7286844df3d691ebb508953ab (patch) | |
tree | a9e387770f6ee221c98dcd5ddd232f1399a3f2d5 /gio/gsettingsschema.h | |
parent | 84fa07aeb1e3e41deac3508231712967366abfbd (diff) | |
download | glib-96a053e025f4b5a7286844df3d691ebb508953ab.tar.gz |
Add g_settings_schema_key_get_summary/description
Add an API to read the summary and description from the .xml schema
files.
This will be used by dconf-editor and gnome-tweak-tool.
This API is a bit heavy -- it parses the XML and builds a table. It
also loads gettext domains for translation. It only does these things
if it is used, however, so it will not impact normal applications.
We store the summary/description in a pair of hash tables on the schema
source (which we have a backref to as of a few commits ago). We can't
use a global table because people might want to request summary and
description from non-default sources. We don't want to use per-schema
tables because we'd have to reparse the directory every time (since we
cannot guess which file a schema may have been in).
https://bugzilla.gnome.org/show_bug.cgi?id=668232
Diffstat (limited to 'gio/gsettingsschema.h')
-rw-r--r-- | gio/gsettingsschema.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gio/gsettingsschema.h b/gio/gsettingsschema.h index e84029efb..ee70a3f28 100644 --- a/gio/gsettingsschema.h +++ b/gio/gsettingsschema.h @@ -77,6 +77,11 @@ GSettingsSchemaKey * g_settings_schema_key_ref (GSettin GLIB_AVAILABLE_IN_2_40 void g_settings_schema_key_unref (GSettingsSchemaKey *key); +GLIB_AVAILABLE_IN_2_40 +const gchar * g_settings_schema_key_get_summary (GSettingsSchemaKey *key); +GLIB_AVAILABLE_IN_2_40 +const gchar * g_settings_schema_key_get_description (GSettingsSchemaKey *key); + G_END_DECLS #endif /* __G_SETTINGS_SCHEMA_H__ */ |