Commit 6eb77294 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

libgimpwidgets/gimpquerybox.c configure the labels in the message dialog

2003-11-14  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpquerybox.c
	* app/widgets/gimpwidgets-utils.c: configure the labels in the
	message dialog and the query boxes to do automatic word wrapping
	to be HIG compliant.

	* app/app_procs.c
	* app/batch.c
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-path.c
	* app/config/gimpconfig-utils.c
	* app/config/gimpconfigwriter.c
	* app/config/gimpscanner.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpdatafactory.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell.c
	* app/file/file-utils.c
	* app/gui/brush-select.c
	* app/gui/dialogs-commands.c
	* app/gui/drawable-commands.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/font-select.c
	* app/gui/gradient-select.c
	* app/gui/gui.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/palette-select.c
	* app/gui/palettes-commands.c
	* app/gui/pattern-select.c
	* app/gui/preferences-dialog.c
	* app/gui/select-commands.c
	* app/gui/stroke-dialog.c
	* app/gui/tool-options-menu.c
	* app/gui/vectors-commands.c
	* app/gui/view-commands.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimptransformtool.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimptooloptionseditor.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/image.pdb: removed explicit newlines from
	messages. Reduced number of translatable strings by making many
	file error messages the same. Quote single words and filenames
	with 'foo', not "foo". Replaced some more "drawable" by "layer".
	General message cleanup and consistency check.

	* app/pdb/image_cmds.c: regenerated.
parent 37b33424
2003-11-14 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimpquerybox.c
* app/widgets/gimpwidgets-utils.c: configure the labels in the
message dialog and the query boxes to do automatic word wrapping
to be HIG compliant.
* app/app_procs.c
* app/batch.c
* app/config/gimpconfig-deserialize.c
* app/config/gimpconfig-path.c
* app/config/gimpconfig-utils.c
* app/config/gimpconfigwriter.c
* app/config/gimpscanner.c
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpdatafactory.c
* app/core/gimpgradient.c
* app/core/gimpimage-merge.c
* app/core/gimpimage.c
* app/core/gimpimagefile.c
* app/core/gimplayer-floating-sel.c
* app/core/gimppalette.c
* app/core/gimppattern.c
* app/core/gimpselection.c
* app/display/gimpdisplayshell.c
* app/file/file-utils.c
* app/gui/brush-select.c
* app/gui/dialogs-commands.c
* app/gui/drawable-commands.c
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/file-new-dialog.c
* app/gui/font-select.c
* app/gui/gradient-select.c
* app/gui/gui.c
* app/gui/image-commands.c
* app/gui/layers-commands.c
* app/gui/palette-select.c
* app/gui/palettes-commands.c
* app/gui/pattern-select.c
* app/gui/preferences-dialog.c
* app/gui/select-commands.c
* app/gui/stroke-dialog.c
* app/gui/tool-options-menu.c
* app/gui/vectors-commands.c
* app/gui/view-commands.c
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in.c
* app/plug-in/plug-ins.c
* app/text/gimptextlayer-xcf.c
* app/text/gimptextlayer.c
* app/tools/gimpcurvestool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimplevelstool.c
* app/tools/gimptransformtool.c
* app/vectors/gimpvectors-export.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimphelp.c
* app/widgets/gimptemplateview.c
* app/widgets/gimptooloptionseditor.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/image.pdb: removed explicit newlines from
messages. Reduced number of translatable strings by making many
file error messages the same. Quote single words and filenames
with 'foo', not "foo". Replaced some more "drawable" by "layer".
General message cleanup and consistency check.
* app/pdb/image_cmds.c: regenerated.
2003-11-14 Sven Neumann <sven@gimp.org>
* app/config/gimprc-blurbs.h (CAN_CHANGE_ACCELS_BLURB): applied
......@@ -416,7 +416,7 @@ dialogs_change_screen_cmd_callback (GtkWidget *widget,
qbox = gimp_query_int_box ("Move Dock to Screen",
dock,
NULL, 0,
"Enter Destination Screen:",
"Enter destination screen",
cur_screen, 0, num_screens - 1,
G_OBJECT (dock), "destroy",
dialogs_change_screen_confirm_callback,
......
......@@ -78,7 +78,7 @@ drawable_desaturate_cmd_callback (GtkWidget *widget,
if (! gimp_drawable_is_rgb (active_drawable))
{
g_message (_("Desaturate operates only on RGB color drawables."));
g_message (_("Desaturate operates only on RGB color layers."));
return;
}
......@@ -96,7 +96,7 @@ drawable_invert_cmd_callback (GtkWidget *widget,
if (gimp_drawable_is_indexed (active_drawable))
{
g_message (_("Invert does not operate on indexed drawables."));
g_message (_("Invert does not operate on indexed layers."));
return;
}
......@@ -114,7 +114,7 @@ drawable_equalize_cmd_callback (GtkWidget *widget,
if (gimp_drawable_is_indexed (active_drawable))
{
g_message (_("Equalize does not operate on indexed drawables."));
g_message (_("Equalize does not operate on indexed layers."));
return;
}
......
......@@ -287,7 +287,7 @@ edit_stroke_selection (GimpItem *item,
if (! active_drawable)
{
g_message (_("There is no active layer or channel to stroke to"));
g_message (_("There is no active layer or channel to stroke to."));
return;
}
......
......@@ -315,8 +315,7 @@ file_revert_cmd_callback (GtkWidget *widget,
if (! uri)
{
g_message (_("Revert failed.\n"
"No file name associated with this image."));
g_message (_("Revert failed. No file name associated with this image."));
}
else if (query_box)
{
......
......@@ -508,8 +508,8 @@ image_scale_callback (GtkWidget *widget,
gimp_standard_help_func,
GIMP_HELP_IMAGE_SCALE_WARNING,
GTK_STOCK_DIALOG_QUESTION,
_("The chosen image size will shrink\n"
"some layers completely away.\n"
_("The chosen image size will shrink "
"some layers completely away. "
"Is this what you want?"),
GTK_STOCK_OK, GTK_STOCK_CANCEL,
G_OBJECT (image_scale->resize->resize_shell),
......
......@@ -573,7 +573,7 @@ new_layer_query_response (GtkWidget *widget,
}
else
{
g_message ("new_layer_query_response():\n"
g_message ("new_layer_query_response: "
"could not allocate new layer");
}
}
......@@ -1074,8 +1074,7 @@ scale_layer_query_ok_callback (GtkWidget *widget,
}
else
{
g_message (_("Invalid width or height.\n"
"Both must be positive."));
g_message (_("Invalid width or height. Both must be positive."));
}
}
......@@ -1169,8 +1168,7 @@ resize_layer_query_ok_callback (GtkWidget *widget,
}
else
{
g_message (_("Invalid width or height.\n"
"Both must be positive."));
g_message (_("Invalid width or height. Both must be positive."));
}
}
......
......@@ -83,7 +83,7 @@ palettes_merge_palettes_query (GimpContainerEditor *editor)
GTK_WIDGET (editor),
gimp_standard_help_func,
GIMP_HELP_PALETTE_MERGE,
_("Enter a name for merged palette"),
_("Enter a name for the merged palette"),
NULL,
G_OBJECT (editor), "destroy",
palettes_merge_palettes_callback,
......
......@@ -152,7 +152,7 @@ select_feather_cmd_callback (GtkWidget *widget,
gdisp->shell,
gimp_standard_help_func,
GIMP_HELP_SELECTION_FEATHER,
_("Feather Selection by:"),
_("Feather selection by"),
selection_feather_radius, 0, 32767, 3,
gdisp->gimage->unit,
MIN (gdisp->gimage->xresolution,
......@@ -188,7 +188,7 @@ select_shrink_cmd_callback (GtkWidget *widget,
gdisp->shell,
gimp_standard_help_func,
GIMP_HELP_SELECTION_SHRINK,
_("Shrink Selection by:"),
_("Shrink selection by"),
selection_shrink_pixels, 1, 32767, 0,
gdisp->gimage->unit,
MIN (gdisp->gimage->xresolution,
......@@ -222,7 +222,7 @@ select_grow_cmd_callback (GtkWidget *widget,
gdisp->shell,
gimp_standard_help_func,
GIMP_HELP_SELECTION_GROW,
_("Grow Selection by:"),
_("Grow selection by"),
selection_grow_pixels, 1, 32767, 0,
gdisp->gimage->unit,
MIN (gdisp->gimage->xresolution,
......@@ -245,7 +245,7 @@ select_border_cmd_callback (GtkWidget *widget,
gdisp->shell,
gimp_standard_help_func,
GIMP_HELP_SELECTION_BORDER,
_("Border Selection by:"),
_("Border selection by"),
selection_border_radius, 1, 32767, 0,
gdisp->gimage->unit,
MIN (gdisp->gimage->xresolution,
......
......@@ -286,7 +286,7 @@ vectors_stroke_vectors (GimpItem *item,
if (! active_drawable)
{
g_message (_("There is no active layer or channel to stroke to"));
g_message (_("There is no active layer or channel to stroke to."));
return;
}
......
......@@ -475,7 +475,7 @@ view_change_screen_cmd_callback (GtkWidget *widget,
qbox = gimp_query_int_box ("Move Display to Screen",
gdisp->shell,
NULL, 0,
"Enter Destination Screen:",
"Enter destination screen",
cur_screen, 0, num_screens - 1,
G_OBJECT (gdisp->shell), "destroy",
view_change_screen_confirm_callback,
......
......@@ -277,7 +277,7 @@ app_init (const gchar *full_prog_name,
filename = file_utils_uri_to_utf8_filename (uri);
g_message (_("Opening '%s' failed:\n%s"),
g_message (_("Opening '%s' failed: %s"),
filename, error->message);
g_clear_error (&error);
......
......@@ -88,7 +88,7 @@ batch_init (Gimp *gimp,
if (! eval_proc)
{
g_message ("script-fu not available: batch mode disabled\n");
g_message ("script-fu not available: batch mode disabled");
return;
}
......@@ -185,7 +185,7 @@ batch_perl_server (Gimp *gimp,
default:
break;
}
procedural_db_destroy_args (vals, pserver_proc->num_values);
g_free(args);
......
......@@ -613,7 +613,7 @@ gimp_config_deserialize_path (GValue *value,
if (!expand)
{
g_scanner_error (scanner,
_("while parsing token %s: %s"),
_("while parsing token '%s': %s"),
prop_spec->name, error->message);
g_error_free (error);
......
......@@ -141,7 +141,7 @@ gimp_config_path_expand (const gchar *path,
if (!s)
{
g_set_error (error, 0, 0, _("can not expand ${%s}"), token);
g_set_error (error, 0, 0, _("Cannot expand ${%s}"), token);
g_free (token);
goto cleanup;
}
......
......@@ -537,9 +537,10 @@ gimp_config_file_backup_on_error (const gchar *filename,
success = gimp_config_file_copy (filename, backup, error);
if (success)
g_message (_("There was an error parsing your %s file.\n"
"Default values will be used. A backup of your configuration has been\n"
"created at '%s'."), name, backup);
g_message (_("There was an error parsing your '%s' file. "
"Default values will be used. A backup of your "
"configuration has been created at '%s'."),
name, backup);
g_free (backup);
......
......@@ -101,9 +101,8 @@ gimp_config_writer_new_file (const gchar *filename,
if (fd == -1)
{
g_set_error (error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,
_("Failed to create temporary file for '%s': %s"),
g_set_error (error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,
_("Could not create temporary file for '%s': %s"),
filename, g_strerror (errno));
g_free (tmpname);
return NULL;
......@@ -115,9 +114,8 @@ gimp_config_writer_new_file (const gchar *filename,
if (fd == -1)
{
g_set_error (error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,
_("Failed to open '%s' for writing: %s"),
g_set_error (error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,
_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return NULL;
}
......@@ -439,8 +437,7 @@ gimp_config_writer_linefeed (GimpConfigWriter *writer)
if (writer->buffer->len == 0 && !writer->comment)
{
if (write (writer->fd, "\n", 1) < 0)
g_set_error (&writer->error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,
g_set_error (&writer->error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,
g_strerror (errno));
}
else
......@@ -520,8 +517,7 @@ static inline void
gimp_config_writer_flush (GimpConfigWriter *writer)
{
if (write (writer->fd, writer->buffer->str, writer->buffer->len) < 0)
g_set_error (&writer->error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,
g_set_error (&writer->error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,
g_strerror (errno));
g_string_truncate (writer->buffer, 0);
......@@ -600,9 +596,8 @@ gimp_config_writer_close_file (GimpConfigWriter *writer,
if (rename (writer->tmpname, writer->filename) == -1)
{
g_set_error (error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,
_("Failed to create file '%s': %s"),
g_set_error (error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,
_("Could not create '%s': %s"),
writer->filename, g_strerror (errno));
unlink (writer->tmpname);
......
......@@ -88,9 +88,8 @@ gimp_scanner_new_file (const gchar *filename,
code = (errno == ENOENT ?
GIMP_CONFIG_ERROR_OPEN_ENOENT : GIMP_CONFIG_ERROR_OPEN);
g_set_error (error,
GIMP_CONFIG_ERROR, code,
_("Failed to open file: '%s': %s"),
g_set_error (error, GIMP_CONFIG_ERROR, code,
_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return NULL;
......@@ -491,13 +490,11 @@ gimp_scanner_message (GScanner *scanner,
g_return_if_fail (is_error);
if (data->name)
g_set_error (data->error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
_("Error while parsing '%s' in line %d:\n%s"),
g_set_error (data->error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
_("Error while parsing '%s' in line %d: %s"),
data->name, scanner->line, message);
else
/* should never happen, thus not marked for translation */
g_set_error (data->error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
"Error parsing internal buffer: %s", message);
g_set_error (data->error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
"Error parsing internal buffer: %s", message);
}
......@@ -586,9 +586,9 @@ gimp_brush_load_brush (gint fd,
else
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parsing error (unknown depth %d):\n"
"Brush file '%s'"),
header.bytes, filename);
_("Fatal parse error in brush file '%s': "
"Unknown depth %d."),
filename, header.bytes);
return NULL;
}
/* fallthrough */
......@@ -599,9 +599,9 @@ gimp_brush_load_brush (gint fd,
default:
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parsing error (unknown version %d):\n"
"Brush file '%s'"),
header.version, filename);
_("Fatal parse error in brush file '%s': "
"Unknown version %d."),
filename, header.version);
return NULL;
}
......@@ -615,8 +615,8 @@ gimp_brush_load_brush (gint fd,
if ((read (fd, name, bn_size)) < bn_size)
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parsing error:\n"
"Brush file '%s' appears truncated."),
_("Fatal parse error in brush file '%s': "
"File appears truncated."),
filename);
g_free (name);
return NULL;
......@@ -719,8 +719,8 @@ gimp_brush_load_brush (gint fd,
default:
g_object_unref (brush);
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Unsupported brush depth %d\n"
"in file '%s'.\n"
_("Fatal parse error in brush file '%s': "
"Unsupported brush depth %d\n"
"GIMP brushes must be GRAY or RGBA."),
header.bytes, filename);
g_free (name);
......@@ -731,8 +731,8 @@ gimp_brush_load_brush (gint fd,
{
g_object_unref (brush);
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parsing error:\n"
"Brush file '%s' appears truncated."),
_("Fatal parse error in brush file '%s': "
"File appears truncated."),
filename);
g_free (name);
return NULL;
......
......@@ -586,9 +586,9 @@ gimp_brush_load_brush (gint fd,
else
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parsing error (unknown depth %d):\n"
"Brush file '%s'"),
header.bytes, filename);
_("Fatal parse error in brush file '%s': "
"Unknown depth %d."),
filename, header.bytes);
return NULL;
}
/* fallthrough */
......@@ -599,9 +599,9 @@ gimp_brush_load_brush (gint fd,
default:
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parsing error (unknown version %d):\n"
"Brush file '%s'"),
header.version, filename);
_("Fatal parse error in brush file '%s': "
"Unknown version %d."),
filename, header.version);
return NULL;
}
......@@ -615,8 +615,8 @@ gimp_brush_load_brush (gint fd,
if ((read (fd, name, bn_size)) < bn_size)
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parsing error:\n"
"Brush file '%s' appears truncated."),
_("Fatal parse error in brush file '%s': "
"File appears truncated."),
filename);
g_free (name);
return NULL;
......@@ -719,8 +719,8 @@ gimp_brush_load_brush (gint fd,
default:
g_object_unref (brush);
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Unsupported brush depth %d\n"
"in file '%s'.\n"
_("Fatal parse error in brush file '%s': "
"Unsupported brush depth %d\n"
"GIMP brushes must be GRAY or RGBA."),
header.bytes, filename);
g_free (name);
......@@ -731,8 +731,8 @@ gimp_brush_load_brush (gint fd,
{
g_object_unref (brush);
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parsing error:\n"
"Brush file '%s' appears truncated."),
_("Fatal parse error in brush file '%s': "
"File appears truncated."),
filename);
g_free (name);
return NULL;
......
......@@ -80,7 +80,7 @@ gimp_brush_generated_get_type (void)
};
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,
"GimpBrushGenerated",
"GimpBrushGenerated",
&brush_info, 0);
}
......@@ -141,28 +141,28 @@ gimp_brush_generated_save (GimpData *data,
fprintf (fp, "%.255s\n", GIMP_OBJECT (brush)->name);
/* write brush spacing */
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
GIMP_BRUSH (brush)->spacing));
/* write brush radius */
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
brush->radius));
/* write brush hardness */
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
brush->hardness));
/* write brush aspect_ratio */
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
brush->aspect_ratio));
/* write brush angle */
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
brush->angle));
fclose (fp);
......@@ -193,7 +193,7 @@ gimp_brush_generated_duplicate (GimpData *data,
static gdouble
gauss (gdouble f)
{
{
/* this aint' a real gauss function */
if (f < -0.5)
{
......@@ -245,7 +245,7 @@ gimp_brush_generated_dirty (GimpData *data)
gbrush->x_axis.y = -1.0 * s * brush->radius;
gbrush->y_axis.x = s * short_radius;
gbrush->y_axis.y = c * short_radius;
width = ceil (sqrt (gbrush->x_axis.x * gbrush->x_axis.x +
gbrush->y_axis.x * gbrush->y_axis.x));
height = ceil (sqrt (gbrush->x_axis.y * gbrush->x_axis.y +
......@@ -263,7 +263,7 @@ gimp_brush_generated_dirty (GimpData *data)
ceil (brush->radius + 1.0)));
if ((1.0 - brush->hardness) < 0.000001)
exponent = 1000000.0;
exponent = 1000000.0;
else
exponent = 1.0 / (1.0 - brush->hardness);
......@@ -385,7 +385,8 @@ gimp_brush_generated_load (const gchar *filename,
if (strncmp (string, "GIMP-VBR", 8) != 0)
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal Parse Error: '%s' is not a GIMP Brush file"),
_("Fatal parse error in brush file '%s': "
"Not a GIMP brush file."),
filename);
return NULL;
}
......@@ -395,7 +396,8 @@ gimp_brush_generated_load (const gchar *filename,
if (strncmp (string, "1.0", 3))
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal Parse Error: '%s': unknown GIMP Brush version"),
_("Fatal parse error in brush file '%s': "
"Unknown GIMP brush version."),
filename);
return NULL;
}
......@@ -457,7 +459,7 @@ void
gimp_brush_generated_thaw (GimpBrushGenerated *brush)
{
g_return_if_fail (GIMP_IS_BRUSH_GENERATED (brush));
if (brush->freeze > 0)
brush->freeze--;
......
......@@ -80,7 +80,7 @@ gimp_brush_generated_get_type (void)
};
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,
"GimpBrushGenerated",
"GimpBrushGenerated",
&brush_info, 0);
}
......@@ -141,28 +141,28 @@ gimp_brush_generated_save (GimpData *data,
fprintf (fp, "%.255s\n", GIMP_OBJECT (brush)->name);
/* write brush spacing */
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
GIMP_BRUSH (brush)->spacing));
/* write brush radius */
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
brush->radius));
/* write brush hardness */
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
brush->hardness));
/* write brush aspect_ratio */
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
brush->aspect_ratio));
/* write brush angle */
fprintf (fp, "%s\n",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
brush->angle));
fclose (fp);
......@@ -193,7 +193,7 @@ gimp_brush_generated_duplicate (GimpData *data,
static gdouble
gauss (gdouble f)
{
{
/* this aint' a real gauss function */
if (f < -0.5)
{
......@@ -245,7 +245,7 @@ gimp_brush_generated_dirty (GimpData *data)
gbrush->x_axis.y = -1.0 * s * brush->radius;
gbrush->y_axis.x = s * short_radius;
gbrush->y_axis.y = c * short_radius;
width = ceil (sqrt (gbrush->x_axis.x * gbrush->x_axis.x +
gbrush->y_axis.x * gbrush->y_axis.x));
height = ceil (sqrt (gbrush->x_axis.y * gbrush->x_axis.y +
......@@ -263,7 +263,7 @@ gimp_brush_generated_dirty (GimpData *data)
ceil (brush->radius + 1.0)));
if ((1.0 - brush->hardness) < 0.000001)
exponent = 1000000.0;
exponent = 1000000.0;
else
exponent = 1.0 / (1.0 - brush->hardness);
......@@ -385,7 +385,8 @@ gimp_brush_generated_load (const gchar *filename,
if (strncmp (string, "GIMP-VBR", 8) != 0)
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal Parse Error: '%s' is not a GIMP Brush file"),
_("Fatal parse error in brush file '%s': "
"Not a GIMP brush file."),
filename);
return NULL;
}
......@@ -395,7 +396,8 @@ gimp_brush_generated_load (const gchar *filename,
if (strncmp (string, "1.0", 3))
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal Parse Error: '%s': unknown GIMP Brush version"),
_("Fatal parse error in brush file '%s': "
"Unknown GIMP brush version."),
filename);
return NULL;
}
......@@ -457,7 +459,7 @@ void
gimp_brush_generated_thaw (GimpBrushGenerated *brush)
{
g_return_if_fail (GIMP_IS_BRUSH_GENERATED (brush));
if (brush->freeze > 0)
brush->freeze--;
......
......@@ -80,7 +80,7 @@ gimp_brush_generated_get_type (void)
};
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,
"GimpBrushGenerated",
"GimpBrushGenerated",
&brush_info, 0);
}
......@@ -141,28 +141,28 @@ gimp_brush_generated_save (GimpData *data,
fprintf (fp, "%.255s\n", GIMP_OBJECT (brush)->name);
/* write brush spacing */