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

libgimp: remove underscores from the procedure conifig load/save functions

They are needed by GimpProcedureDialog wich is in libgimp. Keep them
in the private header anyway for now.
parent b6b77fea
Pipeline #119054 passed with stages
in 12 minutes and 21 seconds
......@@ -687,6 +687,12 @@ EXPORTS
gimp_procedure_config_get_procedure
gimp_procedure_config_get_type
gimp_procedure_config_get_values
gimp_procedure_config_load_default
gimp_procedure_config_load_last
gimp_procedure_config_load_parasite
gimp_procedure_config_save_default
gimp_procedure_config_save_last
gimp_procedure_config_save_parasite
gimp_procedure_config_set_values
gimp_procedure_create_config
gimp_procedure_extension_ready
......
......@@ -1587,7 +1587,7 @@ gimp_procedure_run (GimpProcedure *procedure,
/* if saved defaults exist, they override GParamSpec */
config = gimp_procedure_create_config (procedure);
if (_gimp_procedure_config_load_default (config, NULL))
if (gimp_procedure_config_load_default (config, NULL))
config_class = G_OBJECT_GET_CLASS (config);
else
g_clear_object (&config);
......
......@@ -23,21 +23,22 @@
#define __GIMP_PROCEDURE_CONFIG_PRIVATE_H__
gboolean _gimp_procedure_config_load_default (GimpProcedureConfig *config,
GError **error);
gboolean _gimp_procedure_config_save_default (GimpProcedureConfig *config,
GError **error);
gboolean gimp_procedure_config_load_default (GimpProcedureConfig *config,
GError **error);
gboolean gimp_procedure_config_save_default (GimpProcedureConfig *config,
GError **error);
gboolean _gimp_procedure_config_load_last (GimpProcedureConfig *config,
GError **error);
gboolean _gimp_procedure_config_save_last (GimpProcedureConfig *config,
GError **error);
gboolean gimp_procedure_config_load_last (GimpProcedureConfig *config,
GError **error);
gboolean gimp_procedure_config_save_last (GimpProcedureConfig *config,
GError **error);
gboolean _gimp_procedure_config_load_parasite (GimpProcedureConfig *config,
GimpImage *image,
GError **error);
gboolean _gimp_procedure_config_save_parasite (GimpProcedureConfig *config,
GimpImage *image);
gboolean gimp_procedure_config_load_parasite (GimpProcedureConfig *config,
GimpImage *image,
GError **error);
gboolean gimp_procedure_config_save_parasite (GimpProcedureConfig *config,
GimpImage *image,
GError **error);
#endif /* __GIMP_PROCEDURE_CONFIG_PRIVATE_H__ */
......@@ -342,8 +342,8 @@ gimp_procedure_config_begin_run (GimpProcedureConfig *config,
case GIMP_RUN_WITH_LAST_VALS:
if (image)
{
loaded = _gimp_procedure_config_load_parasite (config, image,
&error);
loaded = gimp_procedure_config_load_parasite (config, image,
&error);
if (! loaded && error)
{
g_printerr ("Loading last used values from parasite failed: %s\n",
......@@ -353,7 +353,7 @@ gimp_procedure_config_begin_run (GimpProcedureConfig *config,
}
if (! loaded &&
! _gimp_procedure_config_load_last (config, &error) && error)
! gimp_procedure_config_load_last (config, &error) && error)
{
g_printerr ("Loading last used values from disk failed: %s\n",
error->message);
......@@ -406,9 +406,10 @@ gimp_procedure_config_end_run (GimpProcedureConfig *config,
GError *error = NULL;
if (config->priv->image)
_gimp_procedure_config_save_parasite (config, config->priv->image);
gimp_procedure_config_save_parasite (config, config->priv->image,
NULL);
if (! _gimp_procedure_config_save_last (config, &error))
if (! gimp_procedure_config_save_last (config, &error))
{
g_printerr ("Saving last used values to disk failed: %s\n",
error->message);
......@@ -438,12 +439,17 @@ gimp_procedure_config_get_file (GimpProcedureConfig *config,
}
gboolean
_gimp_procedure_config_load_default (GimpProcedureConfig *config,
GError **error)
gimp_procedure_config_load_default (GimpProcedureConfig *config,
GError **error)
{
GFile *file = gimp_procedure_config_get_file (config, ".default");
GFile *file;
gboolean success;
g_return_val_if_fail (GIMP_IS_PROCEDURE_CONFIG (config), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
file = gimp_procedure_config_get_file (config, ".default");
success = gimp_config_deserialize_file (GIMP_CONFIG (config),
file,
NULL, error);
......@@ -459,12 +465,17 @@ _gimp_procedure_config_load_default (GimpProcedureConfig *config,
}
gboolean
_gimp_procedure_config_save_default (GimpProcedureConfig *config,
GError **error)
gimp_procedure_config_save_default (GimpProcedureConfig *config,
GError **error)
{
GFile *file = gimp_procedure_config_get_file (config, ".default");
GFile *file;
gboolean success;
g_return_val_if_fail (GIMP_IS_PROCEDURE_CONFIG (config), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
file = gimp_procedure_config_get_file (config, ".default");
success = gimp_config_serialize_to_file (GIMP_CONFIG (config),
file,
"settings",
......@@ -477,12 +488,17 @@ _gimp_procedure_config_save_default (GimpProcedureConfig *config,
}
gboolean
_gimp_procedure_config_load_last (GimpProcedureConfig *config,
GError **error)
gimp_procedure_config_load_last (GimpProcedureConfig *config,
GError **error)
{
GFile *file = gimp_procedure_config_get_file (config, ".last");
GFile *file;
gboolean success;
g_return_val_if_fail (GIMP_IS_PROCEDURE_CONFIG (config), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
file = gimp_procedure_config_get_file (config, ".last");
success = gimp_config_deserialize_file (GIMP_CONFIG (config),
file,
NULL, error);
......@@ -498,12 +514,17 @@ _gimp_procedure_config_load_last (GimpProcedureConfig *config,
}
gboolean
_gimp_procedure_config_save_last (GimpProcedureConfig *config,
GError **error)
gimp_procedure_config_save_last (GimpProcedureConfig *config,
GError **error)
{
GFile *file = gimp_procedure_config_get_file (config, ".last");
GFile *file;
gboolean success;
g_return_val_if_fail (GIMP_IS_PROCEDURE_CONFIG (config), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
file = gimp_procedure_config_get_file (config, ".last");
success = gimp_config_serialize_to_file (GIMP_CONFIG (config),
file,
"settings",
......@@ -523,14 +544,18 @@ gimp_procedure_config_parasite_name (GimpProcedureConfig *config,
}
gboolean
_gimp_procedure_config_load_parasite (GimpProcedureConfig *config,
GimpImage *image,
GError **error)
gimp_procedure_config_load_parasite (GimpProcedureConfig *config,
GimpImage *image,
GError **error)
{
gchar *name;
GimpParasite *parasite;
gboolean success;
g_return_val_if_fail (GIMP_IS_PROCEDURE_CONFIG (config), FALSE);
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
name = gimp_procedure_config_parasite_name (config, "-last");
parasite = gimp_image_get_parasite (image, name);
g_free (name);
......@@ -547,12 +572,17 @@ _gimp_procedure_config_load_parasite (GimpProcedureConfig *config,
}
gboolean
_gimp_procedure_config_save_parasite (GimpProcedureConfig *config,
GimpImage *image)
gimp_procedure_config_save_parasite (GimpProcedureConfig *config,
GimpImage *image,
GError **error)
{
gchar *name;
GimpParasite *parasite;
g_return_val_if_fail (GIMP_IS_PROCEDURE_CONFIG (config), FALSE);
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
name = gimp_procedure_config_parasite_name (config, "-last");
parasite = gimp_config_serialize_to_parasite (GIMP_CONFIG (config),
name,
......
......@@ -348,7 +348,7 @@ gimp_procedure_dialog_load_defaults (GtkWidget *button,
{
GError *error = NULL;
if (! _gimp_procedure_config_load_default (dialog->priv->config, &error))
if (! gimp_procedure_config_load_default (dialog->priv->config, &error))
{
if (error)
{
......@@ -369,7 +369,7 @@ gimp_procedure_dialog_save_defaults (GtkWidget *button,
{
GError *error = NULL;
if (! _gimp_procedure_config_save_default (dialog->priv->config, &error))
if (! gimp_procedure_config_save_default (dialog->priv->config, &error))
{
g_printerr ("Saving default values to disk failed: %s\n",
error->message);
......
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