Preferences
Object Hierarchy:
Description:
public abstract class Preferences : Object
The base class for all preferences in the system. Preferences are serialized to files. The file is watched for changes and loads new
values if the backing file changed. When any public property of a sub-class is changed, the public properties are serialized to the
backing file.
Content:
Creation methods:
Methods:
- protected virtual void verify (string prop)
This method will verify the value of a property. If the value is
wrong, this method should replace it with a sanitized value.
- protected abstract void reset_properties ()
Resets all properties to their default values. Called from construct
and before loading from the backing file.
- protected void init_from_file (File file)
Initializes this preferences with a backing file.
- protected void init_from_filename (string filename)
Initializes this preferences with a backing filename.
- public void delay ()
Delays saving changes to the backing file until apply() is called.
- public void apply ()
If any settings were changed, apply them now.
- public string get_filename ()
Returns the filename of the backing file.
- public weak File? get_backing_file ()
Returns the backing file.
- public void @delete ()
This forces the deletion of the backing file for this preferences.
Signals:
Inherited Members:
All known members inherited from class GLib.Object
- @new
- new_valist
- newv
- new_with_properties
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- freeze_notify
- @get
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- notify_property
- @ref
- ref_sink
- replace_data
- replace_qdata
- remove_toggle_ref
- remove_weak_pointer
- @set
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
- notify
- ref_count