GString *key;
- gchar *value;
+ GValue *value;
guint i;
if (zak_form_element_get_is_key (element))
{
- value = zak_form_element_unformat (element, zak_form_element_get_value (element));
- g_string_append_printf (key, "|%s", value);
- g_free (value);
+ value = zak_form_element_unformat_gvalue (element, zak_form_element_get_value_gvalue (element));
+ g_string_append_printf (key, "|%s", g_value_get_string (value));
+ g_value_unset (value);
}
}
guint i;
- gchar *value;
+ GValue *value;
gchar *group;
GError *error;
ZakFormElement *element = (ZakFormElement *)g_ptr_array_index (elements, i);
if (zak_form_element_get_to_save (element))
{
- value = zak_form_element_unformat (element, zak_form_element_get_value (element));
+ value = zak_form_element_unformat_gvalue (element, zak_form_element_get_value_gvalue (element));
g_key_file_set_string (priv->kfile, group,
zak_form_element_get_name (element),
- value);
+ g_value_get_string (value));
error = NULL;
if (!g_key_file_save_to_file (priv->kfile, priv->filename, &error)
error != NULL && error->message != NULL ? error->message : "no details");
}
- g_free (value);
+ g_value_unset (value);
}
}