![]() | ![]() | ![]() | Kipinä internals: reference Manual | ![]() |
---|
gboolean kp_settings_init (const gchar *filename); void kp_settings_deinit (void); void kp_settings_save (void); void kp_settings_remove_setting (const gchar *setting); gint kp_settings_get_int (const gchar *setting); gchar* kp_settings_get_str (const gchar *setting); gboolean kp_settings_get_bool (const gchar *setting); GSList* kp_settings_get_list (const gchar *setting); void kp_settings_set_str (const gchar *setting, const gchar *val, gboolean replace); void kp_settings_set_bool (const gchar *setting, gboolean value); void kp_settings_list_free (GSList *list);
gchar* kp_settings_get_str (const gchar *setting);
Get the value of the setting as string.
setting : | The name of the setting |
Returns : | String that must not be freed, it is not copied. |
gboolean kp_settings_get_bool (const gchar *setting);
Get the value of this setting as boolean.
setting : | The name of the setting |
Returns : | TRUE if setting's value is true or if there is no setting |
void kp_settings_set_str (const gchar *setting, const gchar *val, gboolean replace);
Sets setting
to be val. If replace
is TRUE and setting
with name setting
already exists, that setting will be
replaced with the new one. If replace
is FALSE and there
is already a setting with that name, they will go both to
the hashtable and key will be like: "setting" and value
will be like: "value1;value2;value3".
setting : | The name of the setting |
val : | Value of the setting, can be almost anything |
replace : | if TRUE and the setting is set, it will be replaced and otherwise not. |
void kp_settings_set_bool (const gchar *setting, gboolean value);
Just set the value of some setting to TRUE or FALSE.
setting : | The name of the setting |
value : | TRUE or FALSE |
<<< Other | kipina-i18n >>> |