Commit c6bc58fb authored by Rebecca Walter's avatar Rebecca Walter Committed by Rebecca Jean Pedersen
Browse files

app/core/gimpbrush.c app/core/gimpbrushpipe.c Proofreading to strings,

2001-11-15  Rebecca Walter <rjp@mail.tele.dk>
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpchannel.c:  Proofreading to strings, approved by Sven
parent 1e21bf86
2001-11-15 Rebecca Walter <rjp@mail.tele.dk>
* app/core/gimpbrush.c
* app/core/gimpbrushpipe.c
* app/core/gimpchannel.c: Proofreading to strings, approved by Sven
2001-11-15 Sven Neumann <sven@gimp.org> 2001-11-15 Sven Neumann <sven@gimp.org>
* RELEASE-TO-CVS.patch: recreated from toplevel dir so it applies * RELEASE-TO-CVS.patch: recreated from toplevel dir so it applies
......
...@@ -453,7 +453,8 @@ gimp_brush_load_brush (gint fd, ...@@ -453,7 +453,8 @@ gimp_brush_load_brush (gint fd,
if (header.version != 1 && if (header.version != 1 &&
(header.magic_number != GBRUSH_MAGIC || header.version != 2)) (header.magic_number != GBRUSH_MAGIC || header.version != 2))
{ {
g_message (_("Unknown brush format version #%d in \"%s\"."), g_message (_("Fatal parsing error (unknown version %d):\n"
"Brush file '%s'"),
header.version, filename); header.version, filename);
return NULL; return NULL;
} }
...@@ -473,14 +474,15 @@ gimp_brush_load_brush (gint fd, ...@@ -473,14 +474,15 @@ gimp_brush_load_brush (gint fd,
name = g_new (gchar, bn_size); name = g_new (gchar, bn_size);
if ((read (fd, name, bn_size)) < bn_size) if ((read (fd, name, bn_size)) < bn_size)
{ {
g_message (_("Error in GIMP brush file \"%s\"."), filename); g_message (_("Fatal parsing error:\nBrush file '%s' appears truncated."),
filename);
g_free (name); g_free (name);
return NULL; return NULL;
} }
if (!g_utf8_validate (name, -1, NULL)) if (!g_utf8_validate (name, -1, NULL))
{ {
g_message (_("Invalid UTF-8 string in GIMP brush file \"%s\"."), g_message (_("Invalid UTF-8 string in brush file '%s'."),
filename); filename);
g_free (name); g_free (name);
name = NULL; name = NULL;
...@@ -500,7 +502,7 @@ gimp_brush_load_brush (gint fd, ...@@ -500,7 +502,7 @@ gimp_brush_load_brush (gint fd,
temp_buf_data (brush->mask), header.width * header.height) < temp_buf_data (brush->mask), header.width * header.height) <
header.width * header.height) header.width * header.height)
{ {
g_message (_("GIMP brush file appears to be truncated: \"%s\"."), g_message (_("Fatal parsing error:\nBrush file '%s' appears truncated."),
filename); filename);
g_free (name); g_free (name);
g_object_unref (G_OBJECT (brush)); g_object_unref (G_OBJECT (brush));
...@@ -519,7 +521,7 @@ gimp_brush_load_brush (gint fd, ...@@ -519,7 +521,7 @@ gimp_brush_load_brush (gint fd,
+ i * 3, 3) != 3 || + i * 3, 3) != 3 ||
read (fd, temp_buf_data (brush->mask) + i, 1) != 1) read (fd, temp_buf_data (brush->mask) + i, 1) != 1)
{ {
g_message (_("GIMP brush file appears to be truncated: \"%s\"."), g_message (_("Fatal parsing error:\nBrush file '%s' appears truncated."),
filename); filename);
g_free (name); g_free (name);
g_object_unref (G_OBJECT (brush)); g_object_unref (G_OBJECT (brush));
...@@ -529,9 +531,9 @@ gimp_brush_load_brush (gint fd, ...@@ -529,9 +531,9 @@ gimp_brush_load_brush (gint fd,
break; break;
default: default:
g_message ("Unsupported brush depth: %d\n" g_message ("Unsupported brush depth %d\n"
"in file \"%s\"\n" "in file '%s'.\n"
"GIMP Brushes must be GRAY or RGBA", "GIMP brushes must be GRAY or RGBA.",
header.bytes, filename); header.bytes, filename);
g_free (name); g_free (name);
return NULL; return NULL;
...@@ -549,3 +551,7 @@ gimp_brush_load_brush (gint fd, ...@@ -549,3 +551,7 @@ gimp_brush_load_brush (gint fd,
return brush; return brush;
} }
...@@ -453,7 +453,8 @@ gimp_brush_load_brush (gint fd, ...@@ -453,7 +453,8 @@ gimp_brush_load_brush (gint fd,
if (header.version != 1 && if (header.version != 1 &&
(header.magic_number != GBRUSH_MAGIC || header.version != 2)) (header.magic_number != GBRUSH_MAGIC || header.version != 2))
{ {
g_message (_("Unknown brush format version #%d in \"%s\"."), g_message (_("Fatal parsing error (unknown version %d):\n"
"Brush file '%s'"),
header.version, filename); header.version, filename);
return NULL; return NULL;
} }
...@@ -473,14 +474,15 @@ gimp_brush_load_brush (gint fd, ...@@ -473,14 +474,15 @@ gimp_brush_load_brush (gint fd,
name = g_new (gchar, bn_size); name = g_new (gchar, bn_size);
if ((read (fd, name, bn_size)) < bn_size) if ((read (fd, name, bn_size)) < bn_size)
{ {
g_message (_("Error in GIMP brush file \"%s\"."), filename); g_message (_("Fatal parsing error:\nBrush file '%s' appears truncated."),
filename);
g_free (name); g_free (name);
return NULL; return NULL;
} }
if (!g_utf8_validate (name, -1, NULL)) if (!g_utf8_validate (name, -1, NULL))
{ {
g_message (_("Invalid UTF-8 string in GIMP brush file \"%s\"."), g_message (_("Invalid UTF-8 string in brush file '%s'."),
filename); filename);
g_free (name); g_free (name);
name = NULL; name = NULL;
...@@ -500,7 +502,7 @@ gimp_brush_load_brush (gint fd, ...@@ -500,7 +502,7 @@ gimp_brush_load_brush (gint fd,
temp_buf_data (brush->mask), header.width * header.height) < temp_buf_data (brush->mask), header.width * header.height) <
header.width * header.height) header.width * header.height)
{ {
g_message (_("GIMP brush file appears to be truncated: \"%s\"."), g_message (_("Fatal parsing error:\nBrush file '%s' appears truncated."),
filename); filename);
g_free (name); g_free (name);
g_object_unref (G_OBJECT (brush)); g_object_unref (G_OBJECT (brush));
...@@ -519,7 +521,7 @@ gimp_brush_load_brush (gint fd, ...@@ -519,7 +521,7 @@ gimp_brush_load_brush (gint fd,
+ i * 3, 3) != 3 || + i * 3, 3) != 3 ||
read (fd, temp_buf_data (brush->mask) + i, 1) != 1) read (fd, temp_buf_data (brush->mask) + i, 1) != 1)
{ {
g_message (_("GIMP brush file appears to be truncated: \"%s\"."), g_message (_("Fatal parsing error:\nBrush file '%s' appears truncated."),
filename); filename);
g_free (name); g_free (name);
g_object_unref (G_OBJECT (brush)); g_object_unref (G_OBJECT (brush));
...@@ -529,9 +531,9 @@ gimp_brush_load_brush (gint fd, ...@@ -529,9 +531,9 @@ gimp_brush_load_brush (gint fd,
break; break;
default: default:
g_message ("Unsupported brush depth: %d\n" g_message ("Unsupported brush depth %d\n"
"in file \"%s\"\n" "in file '%s'.\n"
"GIMP Brushes must be GRAY or RGBA", "GIMP brushes must be GRAY or RGBA.",
header.bytes, filename); header.bytes, filename);
g_free (name); g_free (name);
return NULL; return NULL;
...@@ -549,3 +551,7 @@ gimp_brush_load_brush (gint fd, ...@@ -549,3 +551,7 @@ gimp_brush_load_brush (gint fd,
return brush; return brush;
} }
...@@ -286,7 +286,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -286,7 +286,7 @@ gimp_brush_pipe_load (const gchar *filename)
fd = open (filename, O_RDONLY | _O_BINARY); fd = open (filename, O_RDONLY | _O_BINARY);
if (fd == -1) if (fd == -1)
{ {
g_message ("Couldn't open file '%s'", filename); g_message (_("Could not open file '%s'"), filename);
return NULL; return NULL;
} }
...@@ -307,7 +307,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -307,7 +307,7 @@ gimp_brush_pipe_load (const gchar *filename)
} }
else else
{ {
g_message (_("Invalid UTF-8 string in GIMP brush file \"%s\"."), g_message (_("Invalid UTF-8 string in GIMP brush file '%s'."),
filename); filename);
gimp_object_set_name (GIMP_OBJECT (pipe), _("Unnamed")); gimp_object_set_name (GIMP_OBJECT (pipe), _("Unnamed"));
} }
...@@ -316,7 +316,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -316,7 +316,7 @@ gimp_brush_pipe_load (const gchar *filename)
if (!pipe) if (!pipe)
{ {
g_message ("Couldn't read name for brush pipe from file \"%s\".\n", g_message (_("Fatal parsing error:\nBrush pipe file '%s' is corrupt."),
filename); filename);
close (fd); close (fd);
return NULL; return NULL;
...@@ -334,7 +334,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -334,7 +334,7 @@ gimp_brush_pipe_load (const gchar *filename)
if (num_of_brushes < 1) if (num_of_brushes < 1)
{ {
g_message (_("Brush pipes should have at least one brush:\n\"%s\""), g_message (_("Fatal parsing error:\nBrush pipe file '%s' is corrupt."),
filename); filename);
close (fd); close (fd);
g_object_unref (G_OBJECT (pipe)); g_object_unref (G_OBJECT (pipe));
...@@ -422,8 +422,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -422,8 +422,7 @@ gimp_brush_pipe_load (const gchar *filename)
} }
else else
{ {
g_message (_("Failed to load one of the brushes in the brush pipe\n\"%s\""), g_message (_("Fatal parsing error:\nBrush pipe file '%s' is corrupt."), filename);
filename);
close (fd); close (fd);
g_object_unref (G_OBJECT (pipe)); g_object_unref (G_OBJECT (pipe));
return NULL; return NULL;
......
...@@ -286,7 +286,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -286,7 +286,7 @@ gimp_brush_pipe_load (const gchar *filename)
fd = open (filename, O_RDONLY | _O_BINARY); fd = open (filename, O_RDONLY | _O_BINARY);
if (fd == -1) if (fd == -1)
{ {
g_message ("Couldn't open file '%s'", filename); g_message (_("Could not open file '%s'"), filename);
return NULL; return NULL;
} }
...@@ -307,7 +307,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -307,7 +307,7 @@ gimp_brush_pipe_load (const gchar *filename)
} }
else else
{ {
g_message (_("Invalid UTF-8 string in GIMP brush file \"%s\"."), g_message (_("Invalid UTF-8 string in GIMP brush file '%s'."),
filename); filename);
gimp_object_set_name (GIMP_OBJECT (pipe), _("Unnamed")); gimp_object_set_name (GIMP_OBJECT (pipe), _("Unnamed"));
} }
...@@ -316,7 +316,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -316,7 +316,7 @@ gimp_brush_pipe_load (const gchar *filename)
if (!pipe) if (!pipe)
{ {
g_message ("Couldn't read name for brush pipe from file \"%s\".\n", g_message (_("Fatal parsing error:\nBrush pipe file '%s' is corrupt."),
filename); filename);
close (fd); close (fd);
return NULL; return NULL;
...@@ -334,7 +334,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -334,7 +334,7 @@ gimp_brush_pipe_load (const gchar *filename)
if (num_of_brushes < 1) if (num_of_brushes < 1)
{ {
g_message (_("Brush pipes should have at least one brush:\n\"%s\""), g_message (_("Fatal parsing error:\nBrush pipe file '%s' is corrupt."),
filename); filename);
close (fd); close (fd);
g_object_unref (G_OBJECT (pipe)); g_object_unref (G_OBJECT (pipe));
...@@ -422,8 +422,7 @@ gimp_brush_pipe_load (const gchar *filename) ...@@ -422,8 +422,7 @@ gimp_brush_pipe_load (const gchar *filename)
} }
else else
{ {
g_message (_("Failed to load one of the brushes in the brush pipe\n\"%s\""), g_message (_("Fatal parsing error:\nBrush pipe file '%s' is corrupt."), filename);
filename);
close (fd); close (fd);
g_object_unref (G_OBJECT (pipe)); g_object_unref (G_OBJECT (pipe));
return NULL; return NULL;
......
...@@ -943,7 +943,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask, ...@@ -943,7 +943,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
gimp_channel_sub_segment (mask, x1, i, (x2 - x1), 255); gimp_channel_sub_segment (mask, x1, i, (x2 - x1), 255);
break; break;
default: default:
g_warning ("Only ADD, REPLACE and SUB are valid for channel_combine!"); g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
break; break;
} }
} }
...@@ -987,7 +987,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask, ...@@ -987,7 +987,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
gimp_channel_sub_segment (mask, x0, i, j - x0, last); gimp_channel_sub_segment (mask, x0, i, j - x0, last);
break; break;
default: default:
g_warning ("Only ADD, REPLACE and SUB are valid for channel_combine!"); g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
break; break;
} }
} }
...@@ -1010,7 +1010,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask, ...@@ -1010,7 +1010,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
else if (op == CHANNEL_OP_SUB) else if (op == CHANNEL_OP_SUB)
gimp_channel_sub_segment (mask, x0, i, j - x0, last); gimp_channel_sub_segment (mask, x0, i, j - x0, last);
else else
g_warning ("Only ADD, REPLACE and SUB are valid for channel_combine!"); g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
} }
} }
...@@ -1166,7 +1166,7 @@ gimp_channel_combine_mask (GimpChannel *mask, ...@@ -1166,7 +1166,7 @@ gimp_channel_combine_mask (GimpChannel *mask,
NULL, 2, &srcPR, &destPR); NULL, 2, &srcPR, &destPR);
break; break;
default: default:
g_message ("Error: unknown opperation type in channel_combine_mask\n"); g_warning ("%s: unknown operation type\n", G_GNUC_PRETTY_FUNCTION);
break; break;
} }
......
...@@ -943,7 +943,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask, ...@@ -943,7 +943,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
gimp_channel_sub_segment (mask, x1, i, (x2 - x1), 255); gimp_channel_sub_segment (mask, x1, i, (x2 - x1), 255);
break; break;
default: default:
g_warning ("Only ADD, REPLACE and SUB are valid for channel_combine!"); g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
break; break;
} }
} }
...@@ -987,7 +987,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask, ...@@ -987,7 +987,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
gimp_channel_sub_segment (mask, x0, i, j - x0, last); gimp_channel_sub_segment (mask, x0, i, j - x0, last);
break; break;
default: default:
g_warning ("Only ADD, REPLACE and SUB are valid for channel_combine!"); g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
break; break;
} }
} }
...@@ -1010,7 +1010,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask, ...@@ -1010,7 +1010,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
else if (op == CHANNEL_OP_SUB) else if (op == CHANNEL_OP_SUB)
gimp_channel_sub_segment (mask, x0, i, j - x0, last); gimp_channel_sub_segment (mask, x0, i, j - x0, last);
else else
g_warning ("Only ADD, REPLACE and SUB are valid for channel_combine!"); g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
} }
} }
...@@ -1166,7 +1166,7 @@ gimp_channel_combine_mask (GimpChannel *mask, ...@@ -1166,7 +1166,7 @@ gimp_channel_combine_mask (GimpChannel *mask,
NULL, 2, &srcPR, &destPR); NULL, 2, &srcPR, &destPR);
break; break;
default: default:
g_message ("Error: unknown opperation type in channel_combine_mask\n"); g_warning ("%s: unknown operation type\n", G_GNUC_PRETTY_FUNCTION);
break; break;
} }
......
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