g_settings_get_child

This commit is contained in:
Ryan Lortie 2010-04-14 19:45:05 -04:00
parent 178225a04a
commit 7eecee26f8

View File

@ -741,6 +741,20 @@ g_settings_is_writable (GSettings *settings,
return writable;
}
GSettings *
g_settings_get_child (GSettings *settings,
const gchar *name)
{
gchar *child_schema;
GSettings *child;
child_schema = g_strconcat (settings->priv->schema_name, ".", name, NULL);
child = g_object_new (G_TYPE_SETTINGS, "schema", child_schema, NULL);
g_free (child_schema);
return child;
}
/**
* g_settings_new:
* @schema: the name of the schema