Top | ![]() |
![]() |
![]() |
![]() |
IdeSettings * | ide_settings_new () |
const gchar * | ide_settings_get_relative_path () |
const gchar * | ide_settings_get_schema_id () |
gboolean | ide_settings_get_ignore_project_settings () |
GVariant * | ide_settings_get_default_value () |
GVariant * | ide_settings_get_user_value () |
GVariant * | ide_settings_get_value () |
void | ide_settings_set_value () |
gboolean | ide_settings_get_boolean () |
gdouble | ide_settings_get_double () |
gint | ide_settings_get_int () |
gchar * | ide_settings_get_string () |
guint | ide_settings_get_uint () |
void | ide_settings_set_boolean () |
void | ide_settings_set_double () |
void | ide_settings_set_int () |
void | ide_settings_set_string () |
void | ide_settings_set_uint () |
void | ide_settings_bind () |
void | ide_settings_bind_with_mapping () |
void | ide_settings_unbind () |
gboolean | ignore-project-settings | Read / Write / Construct Only |
char * | project-id | Read / Write / Construct Only |
char * | relative-path | Read / Write / Construct Only |
char * | schema-id | Read / Write / Construct Only |
In Builder, we need support for settings at the user level (their chosen defaults) as well as defaults for a project. IdeSettings attempts to simplify this by providing a layered approach to settings.
If a setting has been set for the current project, it will be returned. If not, the users preference will be returned. Setting a preference via IdeSettings will always modify the projects setting, not the users default settings.
IdeSettings * ide_settings_new (const gchar *project_id
,const gchar *schema_id
,const gchar *relative_path
,gboolean ignore_project_settings
);
gboolean
ide_settings_get_ignore_project_settings
(IdeSettings *self
);
GVariant * ide_settings_get_default_value (IdeSettings *self
,const gchar *key
);
GVariant * ide_settings_get_user_value (IdeSettings *self
,const gchar *key
);
void ide_settings_set_value (IdeSettings *self
,const gchar *key
,GVariant *value
);
gboolean ide_settings_get_boolean (IdeSettings *self
,const gchar *key
);
void ide_settings_set_boolean (IdeSettings *self
,const gchar *key
,gboolean val
);
void ide_settings_set_double (IdeSettings *self
,const gchar *key
,gdouble val
);
void ide_settings_set_string (IdeSettings *self
,const gchar *key
,const gchar *val
);
void ide_settings_set_uint (IdeSettings *self
,const gchar *key
,guint val
);
void ide_settings_bind (IdeSettings *self
,const gchar *key
,gpointer object
,const gchar *property
,GSettingsBindFlags flags
);
void ide_settings_bind_with_mapping (IdeSettings *self
,const gchar *key
,gpointer object
,const gchar *property
,GSettingsBindFlags flags
,GSettingsBindGetMapping get_mapping
,GSettingsBindSetMapping set_mapping
,gpointer user_data
,GDestroyNotify destroy
);
Like ide_settings_bind()
but allows transforming to and from settings storage using
get_mapping
and set_mapping
transformation functions.
Call ide_settings_unbind()
to unbind the mapping.
self |
An IdeSettings |
|
key |
The settings key |
|
object |
the object to bind to |
|
property |
the property of |
|
flags |
flags for the binding |
|
get_mapping |
variant to value mapping. |
[allow-none][scope notified] |
set_mapping |
value to variant mapping. |
[allow-none][scope notified] |
user_data |
user data for |
|
destroy |
destroy function to cleanup |
Since: 3.32
“ignore-project-settings”
property “ignore-project-settings” gboolean
If project settings should be ignored.
Owner: IdeSettings
Flags: Read / Write / Construct Only
Default value: FALSE
“project-id”
property “project-id” char *
The identifier for the project.
Owner: IdeSettings
Flags: Read / Write / Construct Only
Default value: NULL
“relative-path”
property “relative-path” char *
Relative Path.
Owner: IdeSettings
Flags: Read / Write / Construct Only
Default value: NULL
“changed”
signalvoid user_function (IdeSettings *idesettings, char *arg1, gpointer user_data)
Flags: Has Details