Setting.from_hash


Description:

[ CCode ( has_construct_function = false ) ]
public Setting.from_hash (Type setting_type, HashTable<string,Value?> hash)

Creates a new Setting object and populates that object with the properties contained in the hash table, using each hash key as the property to set, and each hash value as the value to set that property to.

Setting properties are strongly typed, thus the GValue type of the hash value must be correct. See the documentation on each Setting object subclass for the correct property names and value types.

Parameters:

setting_type

the Setting type which the hash contains properties for

hash

the GenericSet containing a string to GValue mapping of properties that apply to the setting

Returns:

a new Setting object populated with the properties from the hash table, or null on failure