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

libgimpconfig: get rid of filenames in all config related APIs

and rename function names which say "gfile" to just "file".
parent b327e0ff
Pipeline #116975 passed with stages
in 13 minutes and 13 seconds
......@@ -111,8 +111,8 @@ gimp_lang_rc_constructed (GObject *object)
g_print ("Parsing '%s' for configured language.\n",
gimp_file_get_utf8_name (rc->system_gimprc));
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (rc),
rc->system_gimprc, NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (rc),
rc->system_gimprc, NULL, &error))
{
if (error->code != GIMP_CONFIG_ERROR_OPEN_ENOENT)
g_message ("%s", error->message);
......@@ -124,8 +124,8 @@ gimp_lang_rc_constructed (GObject *object)
g_print ("Parsing '%s' for configured language.\n",
gimp_file_get_utf8_name (rc->user_gimprc));
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (rc),
rc->user_gimprc, NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (rc),
rc->user_gimprc, NULL, &error))
{
if (error->code != GIMP_CONFIG_ERROR_OPEN_ENOENT)
g_message ("%s", error->message);
......
......@@ -315,8 +315,8 @@ gimp_rc_load_system (GimpRc *rc)
g_print ("Parsing '%s'\n",
gimp_file_get_utf8_name (rc->system_gimprc));
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (rc),
rc->system_gimprc, NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (rc),
rc->system_gimprc, NULL, &error))
{
if (error->code != GIMP_CONFIG_ERROR_OPEN_ENOENT)
g_message ("%s", error->message);
......@@ -336,8 +336,8 @@ gimp_rc_load_user (GimpRc *rc)
g_print ("Parsing '%s'\n",
gimp_file_get_utf8_name (rc->user_gimprc));
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (rc),
rc->user_gimprc, NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (rc),
rc->user_gimprc, NULL, &error))
{
if (error->code != GIMP_CONFIG_ERROR_OPEN_ENOENT)
{
......@@ -530,8 +530,8 @@ gimp_rc_save (GimpRc *rc)
if (gimp)
g_object_unref (gimp);
gimp_config_deserialize_gfile (GIMP_CONFIG (global),
rc->system_gimprc, NULL, NULL);
gimp_config_deserialize_file (GIMP_CONFIG (global),
rc->system_gimprc, NULL, NULL);
header = g_strconcat (top, gimp_file_get_utf8_name (rc->system_gimprc),
bottom, NULL);
......@@ -540,10 +540,10 @@ gimp_rc_save (GimpRc *rc)
g_print ("Writing '%s'\n",
gimp_file_get_utf8_name (rc->user_gimprc));
if (! gimp_config_serialize_to_gfile (GIMP_CONFIG (rc),
rc->user_gimprc,
header, footer, global,
&error))
if (! gimp_config_serialize_to_file (GIMP_CONFIG (rc),
rc->user_gimprc,
header, footer, global,
&error))
{
g_message ("%s", error->message);
g_error_free (error);
......
......@@ -84,9 +84,9 @@ gimp_contexts_load (Gimp *gimp,
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
success = gimp_config_deserialize_gfile (GIMP_CONFIG (gimp_get_user_context (gimp)),
file,
NULL, &my_error);
success = gimp_config_deserialize_file (GIMP_CONFIG (gimp_get_user_context (gimp)),
file,
NULL, &my_error);
g_object_unref (file);
......@@ -121,11 +121,11 @@ gimp_contexts_save (Gimp *gimp,
if (gimp->be_verbose)
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
success = gimp_config_serialize_to_gfile (GIMP_CONFIG (gimp_get_user_context (gimp)),
file,
"GIMP user context",
"end of user context",
NULL, error);
success = gimp_config_serialize_to_file (GIMP_CONFIG (gimp_get_user_context (gimp)),
file,
"GIMP user context",
"end of user context",
NULL, error);
g_object_unref (file);
......
......@@ -75,7 +75,7 @@ gimp_modules_load (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
scanner = gimp_scanner_new_gfile (file, NULL);
scanner = gimp_scanner_new_file (file, NULL);
g_object_unref (file);
if (scanner)
......@@ -195,10 +195,10 @@ gimp_modules_unload (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
writer = gimp_config_writer_new_from_gfile (file,
TRUE,
"GIMP modulerc",
&error);
writer = gimp_config_writer_new_from_file (file,
TRUE,
"GIMP modulerc",
&error);
g_object_unref (file);
if (writer)
......
......@@ -124,8 +124,8 @@ gimp_parasiterc_load (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (gimp->parasites),
file, NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (gimp->parasites),
file, NULL, &error))
{
if (error->code != GIMP_CONFIG_ERROR_OPEN_ENOENT)
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR, error->message);
......@@ -157,10 +157,10 @@ gimp_parasiterc_save (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_serialize_to_gfile (GIMP_CONFIG (gimp->parasites),
file,
header, footer, NULL,
&error))
if (! gimp_config_serialize_to_file (GIMP_CONFIG (gimp->parasites),
file,
header, footer, NULL,
&error))
{
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR, error->message);
g_error_free (error);
......
......@@ -49,8 +49,8 @@ gimp_templates_load (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (gimp->templates),
file, NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (gimp->templates),
file, NULL, &error))
{
if (error->code == GIMP_CONFIG_ERROR_OPEN_ENOENT)
{
......@@ -59,8 +59,8 @@ gimp_templates_load (Gimp *gimp)
file = gimp_sysconf_directory_file ("templaterc", NULL);
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (gimp->templates),
file, NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (gimp->templates),
file, NULL, &error))
{
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR,
error->message);
......@@ -100,10 +100,10 @@ gimp_templates_save (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_serialize_to_gfile (GIMP_CONFIG (gimp->templates),
file,
header, footer, NULL,
&error))
if (! gimp_config_serialize_to_file (GIMP_CONFIG (gimp->templates),
file,
header, footer, NULL,
&error))
{
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR, error->message);
g_error_free (error);
......@@ -171,8 +171,8 @@ gimp_templates_migrate (const gchar *olddir)
GimpContainer *templates = gimp_list_new (GIMP_TYPE_TEMPLATE, TRUE);
GFile *file = gimp_directory_file ("templaterc", NULL);
if (gimp_config_deserialize_gfile (GIMP_CONFIG (templates), file,
NULL, NULL))
if (gimp_config_deserialize_file (GIMP_CONFIG (templates), file,
NULL, NULL))
{
GFile *sysconf_file;
......@@ -190,23 +190,23 @@ gimp_templates_migrate (const gchar *olddir)
class->get_child_by_name = gimp_templates_migrate_get_child_by_name;
gimp_config_deserialize_gfile (GIMP_CONFIG (templates),
sysconf_file, NULL, NULL);
gimp_config_deserialize_file (GIMP_CONFIG (templates),
sysconf_file, NULL, NULL);
class->get_child_by_name = func;
}
else
{
gimp_config_deserialize_gfile (GIMP_CONFIG (templates),
sysconf_file, NULL, NULL);
gimp_config_deserialize_file (GIMP_CONFIG (templates),
sysconf_file, NULL, NULL);
}
g_object_unref (sysconf_file);
gimp_list_reverse (GIMP_LIST (templates));
gimp_config_serialize_to_gfile (GIMP_CONFIG (templates), file,
NULL, NULL, NULL, NULL);
gimp_config_serialize_to_file (GIMP_CONFIG (templates), file,
NULL, NULL, NULL, NULL);
}
g_object_unref (file);
......
......@@ -205,7 +205,7 @@ gimp_unitrc_load (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
scanner = gimp_scanner_new_gfile (file, &error);
scanner = gimp_scanner_new_file (file, &error);
if (! scanner && error->code == GIMP_CONFIG_ERROR_OPEN_ENOENT)
{
......@@ -214,7 +214,7 @@ gimp_unitrc_load (Gimp *gimp)
file = gimp_sysconf_directory_file ("unitrc", NULL);
scanner = gimp_scanner_new_gfile (file, NULL);
scanner = gimp_scanner_new_file (file, NULL);
}
if (! scanner)
......@@ -303,16 +303,16 @@ gimp_unitrc_save (Gimp *gimp)
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
writer =
gimp_config_writer_new_from_gfile (file,
TRUE,
"GIMP units\n\n"
"This file contains the user unit database. "
"You can edit this list with the unit "
"editor. You are not supposed to edit it "
"manually, but of course you can do.\n"
"This file will be entirely rewritten each "
"time you exit.",
NULL);
gimp_config_writer_new_from_file (file,
TRUE,
"GIMP units\n\n"
"This file contains the user unit database. "
"You can edit this list with the unit "
"editor. You are not supposed to edit it "
"manually, but of course you can do.\n"
"This file will be entirely rewritten each "
"time you exit.",
NULL);
g_object_unref (file);
......
......@@ -576,8 +576,8 @@ gimp_extension_manager_initialize (GimpExtensionManager *manager)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
processed_ids = NULL;
gimp_config_deserialize_gfile (GIMP_CONFIG (manager),
file, &processed_ids, &error);
gimp_config_deserialize_file (GIMP_CONFIG (manager),
file, &processed_ids, &error);
if (error)
{
g_printerr ("Failed to parse '%s': %s\n",
......@@ -653,12 +653,12 @@ gimp_extension_manager_exit (GimpExtensionManager *manager)
if (manager->p->gimp->be_verbose)
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_serialize_to_gfile (GIMP_CONFIG (manager),
file,
"GIMP extensionrc",
"end of extensionrc",
NULL,
&error))
if (! gimp_config_serialize_to_file (GIMP_CONFIG (manager),
file,
"GIMP extensionrc",
"end of extensionrc",
NULL,
&error))
{
gimp_message_literal (manager->p->gimp, NULL, GIMP_MESSAGE_ERROR, error->message);
g_error_free (error);
......
......@@ -90,7 +90,7 @@ gimp_palette_mru_load (GimpPaletteMru *mru,
palette = GIMP_PALETTE (mru);
scanner = gimp_scanner_new_gfile (file, NULL);
scanner = gimp_scanner_new_file (file, NULL);
if (! scanner)
return;
......@@ -153,12 +153,12 @@ gimp_palette_mru_save (GimpPaletteMru *mru,
g_return_if_fail (GIMP_IS_PALETTE_MRU (mru));
g_return_if_fail (G_IS_FILE (file));
writer = gimp_config_writer_new_from_gfile (file,
TRUE,
"GIMP colorrc\n\n"
"This file holds a list of "
"recently used colors.",
NULL);
writer = gimp_config_writer_new_from_file (file,
TRUE,
"GIMP colorrc\n\n"
"This file holds a list of "
"recently used colors.",
NULL);
if (! writer)
return;
......
......@@ -297,11 +297,11 @@ gimp_tool_options_serialize (GimpToolOptions *tool_options,
footer = g_strdup_printf ("end of %s options",
gimp_object_get_name (tool_options->tool_info));
retval = gimp_config_serialize_to_gfile (GIMP_CONFIG (tool_options),
file,
header, footer,
NULL,
error);
retval = gimp_config_serialize_to_file (GIMP_CONFIG (tool_options),
file,
header, footer,
NULL,
error);
g_free (header);
g_free (footer);
......@@ -326,10 +326,10 @@ gimp_tool_options_deserialize (GimpToolOptions *tool_options,
if (tool_options->tool_info->gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
retval = gimp_config_deserialize_gfile (GIMP_CONFIG (tool_options),
file,
NULL,
error);
retval = gimp_config_deserialize_file (GIMP_CONFIG (tool_options),
file,
NULL,
error);
g_object_unref (file);
......
......@@ -331,11 +331,11 @@ color_profile_combo_box_new (ProfileDialog *private)
GtkListStore *store;
GtkWidget *combo;
GtkWidget *chooser;
gchar *history;
GFile *history;
history = gimp_personal_rc_file ("profilerc");
history = gimp_directory_file ("profilerc", NULL);
store = gimp_color_profile_store_new (history);
g_free (history);
g_object_unref (history);
if (private->default_profile)
{
......
......@@ -616,9 +616,9 @@ dialogs_load_recent_docks (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (global_recent_docks),
file,
NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (global_recent_docks),
file,
NULL, &error))
{
if (error->code != GIMP_CONFIG_ERROR_OPEN_ENOENT)
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR, error->message);
......@@ -651,11 +651,11 @@ dialogs_save_recent_docks (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_serialize_to_gfile (GIMP_CONFIG (global_recent_docks),
file,
"recently closed docks",
"end of recently closed docks",
NULL, &error))
if (! gimp_config_serialize_to_file (GIMP_CONFIG (global_recent_docks),
file,
"recently closed docks",
"end of recently closed docks",
NULL, &error))
{
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR, error->message);
g_clear_error (&error);
......
......@@ -1309,12 +1309,12 @@ prefs_dialog_new (Gimp *gimp,
{
GObject *color_config = G_OBJECT (core_config->color_management);
GtkListStore *store;
gchar *filename;
GFile *file;
gint row = 0;
filename = gimp_personal_rc_file ("profilerc");
store = gimp_color_profile_store_new (filename);
g_free (filename);
file = gimp_directory_file ("profilerc");
store = gimp_color_profile_store_new (file);
g_object_unref (file);
gimp_color_profile_store_add_file (GIMP_COLOR_PROFILE_STORE (store),
NULL, NULL);
......
......@@ -79,7 +79,7 @@ session_init (Gimp *gimp)
file = session_file (gimp);
scanner = gimp_scanner_new_gfile (file, &error);
scanner = gimp_scanner_new_file (file, &error);
if (! scanner && error->code == GIMP_CONFIG_ERROR_OPEN_ENOENT)
{
......@@ -88,7 +88,7 @@ session_init (Gimp *gimp)
file = gimp_sysconf_directory_file ("sessionrc", NULL);
scanner = gimp_scanner_new_gfile (file, NULL);
scanner = gimp_scanner_new_file (file, NULL);
}
if (! scanner)
......@@ -368,18 +368,18 @@ session_save (Gimp *gimp,
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
writer =
gimp_config_writer_new_from_gfile (file,
TRUE,
"GIMP sessionrc\n\n"
"This file takes session-specific info "
"(that is info, you want to keep between "
"two GIMP sessions). You are not supposed "
"to edit it manually, but of course you "
"can do. The sessionrc will be entirely "
"rewritten every time you quit GIMP. "
"If this file isn't found, defaults are "
"used.",
NULL);
gimp_config_writer_new_from_file (file,
TRUE,
"GIMP sessionrc\n\n"
"This file takes session-specific info "
"(that is info, you want to keep between "
"two GIMP sessions). You are not supposed "
"to edit it manually, but of course you "
"can do. The sessionrc will be entirely "
"rewritten every time you quit GIMP. "
"If this file isn't found, defaults are "
"used.",
NULL);
g_object_unref (file);
if (!writer)
......
......@@ -264,11 +264,11 @@ gimp_operation_config_serialize (Gimp *gimp,
gimp_operation_config_remove_sep (container);
if (! gimp_config_serialize_to_gfile (GIMP_CONFIG (container),
file,
"settings",
"end of settings",
NULL, &error))
if (! gimp_config_serialize_to_file (GIMP_CONFIG (container),
file,
"settings",
"end of settings",
NULL, &error))
{
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR,
error->message);
......@@ -305,9 +305,9 @@ gimp_operation_config_deserialize (Gimp *gimp,
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (container),
file,
NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (container),
file,
NULL, &error))
{
if (error->code != GIMP_CONFIG_ERROR_OPEN_ENOENT)
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR,
......
......@@ -115,7 +115,7 @@ plug_in_rc_parse (Gimp *gimp,
g_return_val_if_fail (G_IS_FILE (file), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
scanner = gimp_scanner_new_gfile (file, error);
scanner = gimp_scanner_new_file (file, error);
if (! scanner)
return NULL;
......@@ -1105,14 +1105,14 @@ plug_in_rc_write (GSList *plug_in_defs,
GEnumClass *enum_class;
GSList *list;
writer = gimp_config_writer_new_from_gfile (file,
FALSE,
"GIMP pluginrc\n\n"
"This file can safely be removed and "
"will be automatically regenerated by "
"querying the installed plug-ins.",
error);
if (!writer)
writer = gimp_config_writer_new_from_file (file,
FALSE,
"GIMP pluginrc\n\n"
"This file can safely be removed and "
"will be automatically regenerated by "
"querying the installed plug-ins.",
error);
if (! writer)
return FALSE;
enum_class = g_type_class_ref (GIMP_TYPE_ICON_TYPE);
......
......@@ -270,8 +270,8 @@ gimp_tools_restore (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
if (gimp_config_deserialize_gfile (GIMP_CONFIG (gimp_list), file,
NULL, &error))
if (gimp_config_deserialize_file (GIMP_CONFIG (gimp_list), file,
NULL, &error))
{
gint n = gimp_container_get_n_children (gimp->tool_info_list);
gint i;
......@@ -423,11 +423,11 @@ gimp_tools_save (Gimp *gimp,
if (gimp->be_verbose)
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
gimp_config_serialize_to_gfile (GIMP_CONFIG (gimp->tool_info_list),
file,
"GIMP toolrc",
"end of toolrc",
NULL, NULL);
gimp_config_serialize_to_file (GIMP_CONFIG (gimp->tool_info_list),
file,
"GIMP toolrc",
"end of toolrc",
NULL, NULL);
g_object_unref (file);
}
......
......@@ -122,7 +122,7 @@ gimp_action_history_init (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
scanner = gimp_scanner_new_gfile (file, NULL);
scanner = gimp_scanner_new_file (file, NULL);
g_object_unref (file);
if (! scanner)
......@@ -222,8 +222,8 @@ gimp_action_history_exit (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
writer = gimp_config_writer_new_from_gfile (file, TRUE, "GIMP action-history",
NULL);
writer = gimp_config_writer_new_from_file (file, TRUE, "GIMP action-history",
NULL);
g_object_unref (file);
for (actions = history.items->head, i = 0;
......
......@@ -150,8 +150,8 @@ gimp_controllers_restore (Gimp *gimp,
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (manager->controllers),
file, NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (manager->controllers),
file, NULL, &error))
{
if (error->code == GIMP_CONFIG_ERROR_OPEN_ENOENT)
{
......@@ -160,8 +160,8 @@ gimp_controllers_restore (Gimp *gimp,
file = gimp_sysconf_directory_file ("controllerrc", NULL);
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (manager->controllers),
file, NULL, &error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (manager->controllers),
file, NULL, &error))
{
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR,
error->message);
......@@ -205,10 +205,10 @@ gimp_controllers_save (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_serialize_to_gfile (GIMP_CONFIG (manager->controllers),
file,
header, footer, NULL,
&error))
if (! gimp_config_serialize_to_file (GIMP_CONFIG (manager->controllers),
file,
header, footer, NULL,
&error))
{
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR, error->message);
g_error_free (error);
......
......@@ -113,10 +113,10 @@ gimp_devices_restore (Gimp *gimp)
if (gimp->be_verbose)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
if (! gimp_config_deserialize_gfile (GIMP_CONFIG (manager),
file,
gimp,
&error))
if (! gimp_config_deserialize_file (GIMP_CONFIG (manager),
file,
gimp,
&error))
{
if (error->code != GIMP_CONFIG_ERROR_OPEN_ENOENT)
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR, error->message);
......@@ -183,12 +183,12 @@ gimp_devices_save (Gimp *gimp,
gimp_device_info_save_tool (current_device);
}
if (! gimp_config_serialize_to_gfile (GIMP_CONFIG (manager),
file,
"GIMP devicerc",
"end of devicerc",
NULL,
&error))
if (! gimp_config_serialize_to_file (GIMP_CONFIG (manager),
file,
"GIMP devicerc",
"end of devicerc",
NULL,
&error))
{
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_ERROR, error->message);
g_error_free (error);
......
......@@ -405,9 +405,9 @@ gimp_procedure_config_load_last (GimpProcedureConfig *config,
GFile *file = gimp_procedure_config_get_file (config, ".last");
gboolean success;
success = gimp_config_deserialize_gfile (GIMP_CONFIG (config),
file,
NULL, error);
success = gimp_config_deserialize_file (GIMP_CONFIG (config),
file,
NULL, error);
if (! success && (*error)->code == GIMP_CONFIG_ERROR_OPEN_ENOENT)
{
......@@ -427,11 +427,11 @@ gimp_procedure_config_save_last (GimpProcedureConfig *config,
GFile *file = gimp_procedure_config_get_file (config, ".last");
gboolean success;
success = gimp_config_serialize_to_gfile (GIMP_CONFIG (config),
file,
"settings",
"end of settings",
NULL, error);
success = gimp_config_serialize_to_file (GIMP_CONFIG (config),
file,
"settings",
"end of settings",
NULL, error);
g_object_unref (file);
......
......@@ -277,47 +277,6 @@ gimp_config_iface_copy (GimpConfig *src,
/**
* gimp_config_serialize_to_file:
* @config: a #GObject that implements the #GimpConfigInterface.
* @filename: the name of the file to write the configuration to.
* @header: optional file header (must be ASCII only)
* @footer: optional file footer (must be ASCII only)
* @data: user data passed to the serialize implementation.
* @error: return location for a possible error
*
* Serializes the object properties of @config to the file specified
* by @filename. If a file with that name already exists, it is
* overwritten. Basically this function opens @filename for you and
* calls the serialize function of the @config's #GimpConfigInterface.
*
* Returns: %TRUE if serialization succeeded, %FALSE otherwise.
*
* Since: 2.4
**/
gboolean
gimp_config_serialize_to_file (GimpConfig *config,
const gchar *filename,
const gchar *header,
const gchar *footer,
gpointer data,
GError **error)
{
GimpConfigWriter *writer;
g_return_val_if_fail (GIMP_IS_CONFIG (config), FALSE);