minor cleanup.

2006-07-11  Sven Neumann  <sven@gimp.org>

	* app/xcf/xcf.c: minor cleanup.
This commit is contained in:
Sven Neumann 2006-07-11 19:03:55 +00:00 committed by Sven Neumann
parent 9dba73fb01
commit b2252db16c
2 changed files with 17 additions and 59 deletions

View File

@ -1,5 +1,7 @@
2006-07-11 Sven Neumann <sven@gimp.org>
* app/xcf/xcf.c: minor cleanup.
* app/core/gimpimage-merge.[ch]: made gimp_image_merge_layers() a
static function, it isn't used outside this file.

View File

@ -62,55 +62,6 @@ static GValueArray * xcf_save_invoker (GimpProcedure *procedure,
const GValueArray *args);
#if 0
static PlugInProcDef xcf_plug_in_load_proc =
{
"gimp-xcf-load",
N_("GIMP XCF image"),
NULL,
GIMP_ICON_TYPE_STOCK_ID,
-1,
(guint8 *) "gimp-wilber",
NULL, /* ignored for load */
0, /* ignored for load */
0,
FALSE,
NULL,
TRUE,
"xcf",
"",
"0,string,gimp\\040xcf\\040",
"image/x-xcf",
NULL, /* fill me in at runtime */
NULL, /* fill me in at runtime */
NULL /* fill me in at runtime */
};
static PlugInProcDef xcf_plug_in_save_proc =
{
"gimp-xcf-save",
N_("GIMP XCF image"),
NULL,
GIMP_ICON_TYPE_STOCK_ID,
-1,
(guint8 *) "gimp-wilber",
"RGB*, GRAY*, INDEXED*",
0, /* fill me in at runtime */
0,
FALSE,
NULL,
TRUE,
"xcf",
"",
NULL,
"image/x-xcf",
NULL, /* fill me in at runtime */
NULL, /* fill me in at runtime */
NULL /* fill me in at runtime */
};
#endif
static GimpXcfLoaderFunc * const xcf_loaders[] =
{
xcf_load_image, /* version 0 */
@ -153,8 +104,8 @@ xcf_init (Gimp *gimp)
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-xcf-save");
gimp_procedure_set_static_strings (procedure,
"gimp-xcf-save",
"saves file in the .xcf file format",
"The xcf file format has been designed "
"Saves file in the .xcf file format",
"The XCF file format has been designed "
"specifically for loading and saving "
"tiled and layered images in the GIMP. "
"This procedure will save the specified "
@ -220,8 +171,8 @@ xcf_init (Gimp *gimp)
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-xcf-load");
gimp_procedure_set_static_strings (procedure,
"gimp-xcf-load",
"loads file saved in the .xcf file format",
"The xcf file format has been designed "
"Loads file saved in the .xcf file format",
"The XCF file format has been designed "
"specifically for loading and saving "
"tiled and layered images in the GIMP. "
"This procedure will load the specified "
@ -306,13 +257,13 @@ xcf_load_invoker (GimpProcedure *procedure,
success = TRUE;
info.cp += xcf_read_int8 (info.fp, (guint8*) id, 14);
info.cp += xcf_read_int8 (info.fp, (guint8 *) id, 14);
if (strncmp (id, "gimp xcf ", 9) != 0)
{
success = FALSE;
}
else if (strcmp (id+9, "file") == 0)
else if (strcmp (id + 9, "file") == 0)
{
info.file_version = 0;
}
@ -345,8 +296,10 @@ xcf_load_invoker (GimpProcedure *procedure,
fclose (info.fp);
}
else
g_message (_("Could not open '%s' for reading: %s"),
gimp_filename_to_utf8 (filename), g_strerror (errno));
{
g_message (_("Could not open '%s' for reading: %s"),
gimp_filename_to_utf8 (filename), g_strerror (errno));
}
return_vals = gimp_procedure_get_return_values (procedure, success);
@ -394,6 +347,7 @@ xcf_save_invoker (GimpProcedure *procedure,
xcf_save_choose_format (&info, image);
success = xcf_save_image (&info, image);
if (fclose (info.fp) == EOF)
{
g_message (_("Error saving XCF file: %s"), g_strerror (errno));
@ -402,8 +356,10 @@ xcf_save_invoker (GimpProcedure *procedure,
}
}
else
g_message (_("Could not open '%s' for writing: %s"),
gimp_filename_to_utf8 (filename), g_strerror (errno));
{
g_message (_("Could not open '%s' for writing: %s"),
gimp_filename_to_utf8 (filename), g_strerror (errno));
}
return_vals = gimp_procedure_get_return_values (procedure, success);