Commit b7c78c5b authored by Michael Natterer's avatar Michael Natterer 😴

app: use gimp_config_serialize_to_gfile() for dynamics and tool presets

parent 6ec5fb80
...@@ -32,20 +32,12 @@ gboolean ...@@ -32,20 +32,12 @@ gboolean
gimp_dynamics_save (GimpData *data, gimp_dynamics_save (GimpData *data,
GError **error) GError **error)
{ {
gchar *path;
gboolean success;
g_return_val_if_fail (GIMP_IS_DYNAMICS (data), FALSE); g_return_val_if_fail (GIMP_IS_DYNAMICS (data), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
path = g_file_get_path (gimp_data_get_file (data)); return gimp_config_serialize_to_gfile (GIMP_CONFIG (data),
gimp_data_get_file (data),
success = gimp_config_serialize_to_file (GIMP_CONFIG (data), path, "GIMP dynamics file",
"GIMP dynamics file", "end of GIMP dynamics file",
"end of GIMP dynamics file", NULL, error);
NULL, error);
g_free (path);
return success;
} }
...@@ -32,20 +32,12 @@ gboolean ...@@ -32,20 +32,12 @@ gboolean
gimp_tool_preset_save (GimpData *data, gimp_tool_preset_save (GimpData *data,
GError **error) GError **error)
{ {
gchar *path;
gboolean success;
g_return_val_if_fail (GIMP_IS_TOOL_PRESET (data), FALSE); g_return_val_if_fail (GIMP_IS_TOOL_PRESET (data), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
path = g_file_get_path (gimp_data_get_file (data)); return gimp_config_serialize_to_gfile (GIMP_CONFIG (data),
gimp_data_get_file (data),
success = gimp_config_serialize_to_file (GIMP_CONFIG (data), path, "GIMP tool preset file",
"GIMP tool preset file", "end of GIMP tool preset file",
"end of GIMP tool preset file", NULL, error);
NULL, error);
g_free (path);
return success;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment