plug-ins/FractalExplorer/Dialogs.c

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

	* plug-ins/FractalExplorer/Dialogs.c
	* plug-ins/FractalExplorer/FractalExplorer.c
	* plug-ins/bmp/bmpread.c
	* plug-ins/bmp/bmpwrite.c
	* plug-ins/common/CEL.c
	* plug-ins/common/CML_explorer.c
	* plug-ins/common/animoptimize.c
	* plug-ins/common/bz2.c
	* plug-ins/common/convmatrix.c
	* plug-ins/common/curve_bend.c
	* plug-ins/common/dicom.c
	* plug-ins/common/gauss_iir.c
	* plug-ins/common/gauss_rle.c
	* plug-ins/common/gbr.c
	* plug-ins/common/gif.c
	* plug-ins/common/gifload.c
	* plug-ins/common/gih.c
	* plug-ins/common/grid.c
	* plug-ins/common/gtm.c
	* plug-ins/common/gz.c
	* plug-ins/common/hrz.c
	* plug-ins/common/jpeg.c
	* plug-ins/common/mail.c
	* plug-ins/common/mapcolor.c
	* plug-ins/common/pat.c
	* plug-ins/common/pcx.c
	* plug-ins/common/pix.c
	* plug-ins/common/png.c
	* plug-ins/common/pnm.c
	* plug-ins/common/ps.c
	* plug-ins/common/psd.c
	* plug-ins/common/psd_save.c
	* plug-ins/common/psp.c
	* plug-ins/common/sel_gauss.c
	* plug-ins/common/spheredesigner.c
	* plug-ins/common/sunras.c
	* plug-ins/common/svg.c
	* plug-ins/common/tga.c
	* plug-ins/common/tiff.c
	* plug-ins/common/wmf.c
	* plug-ins/common/xbm.c
	* plug-ins/common/xwd.c
	* plug-ins/faxg3/faxg3.c
	* plug-ins/fits/fits.c
	* plug-ins/flame/flame.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gflare/gflare.c
	* plug-ins/gfli/gfli.c
	* plug-ins/gimpressionist/brush.c
	* plug-ins/gimpressionist/ppmtool.c
	* plug-ins/helpbrowser/domain.c
	* plug-ins/ifscompose/ifscompose.c
	* plug-ins/sgi/sgi.c
	* plug-ins/twain/twain.c
	* plug-ins/winsnap/winsnap.c
	* plug-ins/xjt/xjt.c: removed explicit newlines from messages.
	Made file open/save messages the same all over the place. Reduced
	number of translatable strings by adding some more "standard"
	messages. Removed plug-in names from messages. Added some random
	mnemonics. Unmarked some strings for translation and added some
	that were forgotten. General message cleanup. Removed trailing
	whitespace.
This commit is contained in:
Michael Natterer 2003-11-15 13:53:33 +00:00 committed by Michael Natterer
parent 020163d5b3
commit 30aabbc23c
65 changed files with 603 additions and 496 deletions

View File

@ -1,3 +1,68 @@
2003-11-15 Michael Natterer <mitch@gimp.org>
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/FractalExplorer/FractalExplorer.c
* plug-ins/bmp/bmpread.c
* plug-ins/bmp/bmpwrite.c
* plug-ins/common/CEL.c
* plug-ins/common/CML_explorer.c
* plug-ins/common/animoptimize.c
* plug-ins/common/bz2.c
* plug-ins/common/convmatrix.c
* plug-ins/common/curve_bend.c
* plug-ins/common/dicom.c
* plug-ins/common/gauss_iir.c
* plug-ins/common/gauss_rle.c
* plug-ins/common/gbr.c
* plug-ins/common/gif.c
* plug-ins/common/gifload.c
* plug-ins/common/gih.c
* plug-ins/common/grid.c
* plug-ins/common/gtm.c
* plug-ins/common/gz.c
* plug-ins/common/hrz.c
* plug-ins/common/jpeg.c
* plug-ins/common/mail.c
* plug-ins/common/mapcolor.c
* plug-ins/common/pat.c
* plug-ins/common/pcx.c
* plug-ins/common/pix.c
* plug-ins/common/png.c
* plug-ins/common/pnm.c
* plug-ins/common/ps.c
* plug-ins/common/psd.c
* plug-ins/common/psd_save.c
* plug-ins/common/psp.c
* plug-ins/common/sel_gauss.c
* plug-ins/common/spheredesigner.c
* plug-ins/common/sunras.c
* plug-ins/common/svg.c
* plug-ins/common/tga.c
* plug-ins/common/tiff.c
* plug-ins/common/wmf.c
* plug-ins/common/xbm.c
* plug-ins/common/xwd.c
* plug-ins/faxg3/faxg3.c
* plug-ins/fits/fits.c
* plug-ins/flame/flame.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c
* plug-ins/gfli/gfli.c
* plug-ins/gimpressionist/brush.c
* plug-ins/gimpressionist/ppmtool.c
* plug-ins/helpbrowser/domain.c
* plug-ins/ifscompose/ifscompose.c
* plug-ins/sgi/sgi.c
* plug-ins/twain/twain.c
* plug-ins/winsnap/winsnap.c
* plug-ins/xjt/xjt.c: removed explicit newlines from messages.
Made file open/save messages the same all over the place. Reduced
number of translatable strings by adding some more "standard"
messages. Removed plug-in names from messages. Added some random
mnemonics. Unmarked some strings for translation and added some
that were forgotten. General message cleanup. Removed trailing
whitespace.
2003-11-15 Sven Neumann <sven@gimp.org>
* app/gui/preferences-dialog.c: readded a toggle for

View File

@ -1799,7 +1799,7 @@ save_callback (void)
if (!fp)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
savename, g_strerror (errno));
return;
}
@ -1814,7 +1814,7 @@ save_callback (void)
save_options (fp);
if (ferror (fp))
g_message (_("Failed to write '%s':\n%s"),
g_message (_("Could not write '%s': %s"),
savename, g_strerror (ferror (fp)));
fclose (fp);
@ -1838,7 +1838,7 @@ file_selection_ok (GtkWidget *w,
if (g_file_test (filenamebuf, G_FILE_TEST_IS_DIR))
{
/* Can't save to directory */
g_message (_("Save: Can't save to a folder."));
g_message (_("Cannot save to a folder."));
return;
}
@ -2104,19 +2104,20 @@ explorer_load (void)
if (!fp)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return;
}
get_line (load_buf, MAX_LOAD_LINE, fp, 1);
if (strncmp (FRACTAL_HEADER, load_buf, strlen (load_buf)))
{
g_message (_("'%s'\nis not a FractalExplorer file"), filename);
g_message (_("'%s' is not a FractalExplorer file"), filename);
return;
}
if (load_options (current_obj,fp))
{
g_message (_("'%s' is corrupt.\nLine %d Option section incorrect"),
g_message (_("'%s' is corrupt. Line %d Option section incorrect"),
filename, line_no);
return;
}

View File

@ -760,7 +760,7 @@ delete_fractal_callback (GtkWidget *widget,
sel_obj = (fractalexplorerOBJ *)
g_object_get_data (G_OBJECT (sellist->data), "fractalexplorer");
str = g_strdup_printf (_("Are you sure you want to delete\n"
str = g_strdup_printf (_("Are you sure you want to delete "
"\"%s\" from the list and from disk?"),
sel_obj->draw_name);

View File

@ -1,7 +1,7 @@
/* bmpread.c reads any bitmap I could get for testing */
/* Alexander.Schulz@stud.uni-karlsruhe.de */
/*
/*
* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
@ -37,28 +37,28 @@
#include "libgimp/stdplugins-intl.h"
static gint32
static gint32
ToL (guchar *puffer)
{
return (puffer[0] | puffer[1]<<8 | puffer[2]<<16 | puffer[3]<<24);
}
static gint16
static gint16
ToS (guchar *puffer)
{
return (puffer[0] | puffer[1]<<8);
}
static gboolean
ReadColorMap (FILE *fd,
guchar buffer[256][3],
gint number,
gint size,
ReadColorMap (FILE *fd,
guchar buffer[256][3],
gint number,
gint size,
gint *grey)
{
gint i;
guchar rgb[4];
*grey=(number>2);
for (i = 0; i < number ; i++)
{
@ -67,7 +67,7 @@ ReadColorMap (FILE *fd,
g_message (_("Bad colormap"));
return FALSE;
}
/* Bitmap save the colors in another order! But change only once! */
buffer[i][0] = rgb[2];
@ -78,7 +78,7 @@ ReadColorMap (FILE *fd,
return TRUE;
}
gint32
gint32
ReadBMP (const gchar *name)
{
FILE *fd;
@ -94,7 +94,7 @@ ReadBMP (const gchar *name)
if (!fd)
{
g_message (_("Can't open '%s':\n%s"),
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -113,7 +113,7 @@ ReadBMP (const gchar *name)
g_message (_("'%s' is not a valid BMP file"), filename);
return -1;
}
while (!strncmp(magick,"BA",2))
{
if (!ReadOK(fd, buffer, 12))
@ -140,22 +140,22 @@ ReadBMP (const gchar *name)
Bitmap_File_Head.zzHotX = ToS (&buffer[0x04]);
Bitmap_File_Head.zzHotY = ToS (&buffer[0x06]);
Bitmap_File_Head.bfOffs = ToL (&buffer[0x08]);
if (!ReadOK(fd, buffer, 4))
{
g_message (_("'%s' is not a valid BMP file"), filename);
return -1;
}
Bitmap_File_Head.biSize = ToL (&buffer[0x00]);
/* What kind of bitmap is it? */
/* What kind of bitmap is it? */
if (Bitmap_File_Head.biSize == 12) /* OS/2 1.x ? */
{
if (!ReadOK (fd, buffer, 8))
{
g_message (_("Error reading BMP file header\nfrom '%s'"), filename);
g_message (_("Error reading BMP file header from '%s'"), filename);
return -1;
}
@ -173,7 +173,7 @@ ReadBMP (const gchar *name)
{
if (!ReadOK (fd, buffer, Bitmap_File_Head.biSize - 4))
{
g_message (_("Error reading BMP file header\nfrom '%s'"), filename);
g_message (_("Error reading BMP file header from '%s'"), filename);
return -1;
}
Bitmap_Head.biWidth =ToL (&buffer[0x00]); /* 12 */
@ -193,7 +193,7 @@ ReadBMP (const gchar *name)
{
if (!ReadOK (fd, buffer, Bitmap_File_Head.biSize - 4))
{
g_message (_("Error reading BMP file header\nfrom '%s'"), filename);
g_message (_("Error reading BMP file header from '%s'"), filename);
return -1;
}
Bitmap_Head.biWidth =ToL (&buffer[0x00]); /* 12 */
@ -211,15 +211,15 @@ ReadBMP (const gchar *name)
}
else
{
g_message (_("Error reading BMP file header\nfrom '%s'"), filename);
g_message (_("Error reading BMP file header from '%s'"), filename);
return -1;
}
/* Valid bitpdepthis 1, 4, 8, 16, 24, 32 */
/* 16 is awful, we should probably shoot whoever invented it */
/* There should be some colors used! */
ColormapSize = (Bitmap_File_Head.bfOffs - Bitmap_File_Head.biSize - 14) / Maps;
if ((Bitmap_Head.biClrUsed == 0) && (Bitmap_Head.biBitCnt <= 8))
@ -229,17 +229,17 @@ ReadBMP (const gchar *name)
/* Sanity checks */
if (Bitmap_Head.biHeight == 0 || Bitmap_Head.biWidth == 0) {
g_message (_("Error reading BMP file header\nfrom '%s'"), filename);
g_message (_("Error reading BMP file header from '%s'"), filename);
return -1;
}
if (Bitmap_Head.biPlanes != 1) {
g_message (_("Error reading BMP file header\nfrom '%s'"), filename);
g_message (_("Error reading BMP file header from '%s'"), filename);
return -1;
}
if (ColormapSize > 256 || Bitmap_Head.biClrUsed > 256) {
g_message (_("Error reading BMP file header\nfrom '%s'"), filename);
g_message (_("Error reading BMP file header from '%s'"), filename);
return -1;
}
@ -254,12 +254,12 @@ ReadBMP (const gchar *name)
Bitmap_File_Head.bfSize,Bitmap_Head.biClrUsed,Bitmap_Head.biBitCnt,Bitmap_Head.biWidth,
Bitmap_Head.biHeight, Bitmap_Head.biCompr, rowbytes);
#endif
/* Get the Colormap */
if (!ReadColorMap (fd, ColorMap, ColormapSize, Maps, &Grey))
return -1;
#ifdef DEBUG
printf("Colormap read\n");
#endif
@ -267,16 +267,16 @@ ReadBMP (const gchar *name)
fseek(fd, Bitmap_File_Head.bfOffs, SEEK_SET);
/* Get the Image and return the ID or -1 on error*/
image_ID = ReadImage (fd,
Bitmap_Head.biWidth,
Bitmap_Head.biHeight,
ColorMap,
Bitmap_Head.biClrUsed,
Bitmap_Head.biBitCnt,
Bitmap_Head.biCompr,
rowbytes,
image_ID = ReadImage (fd,
Bitmap_Head.biWidth,
Bitmap_Head.biHeight,
ColorMap,
Bitmap_Head.biClrUsed,
Bitmap_Head.biBitCnt,
Bitmap_Head.biCompr,
rowbytes,
Grey);
if (Bitmap_Head.biXPels > 0 && Bitmap_Head.biYPels > 0)
{
/* Fixed up from scott@asofyet's changes last year, njl195 */
@ -297,15 +297,15 @@ ReadBMP (const gchar *name)
return (image_ID);
}
Image
ReadImage (FILE *fd,
gint width,
gint height,
guchar cmap[256][3],
gint ncols,
gint bpp,
gint compression,
gint rowbytes,
Image
ReadImage (FILE *fd,
gint width,
gint height,
guchar cmap[256][3],
gint ncols,
gint bpp,
gint compression,
gint rowbytes,
gint grey)
{
guchar v,wieviel;
@ -319,9 +319,9 @@ ReadImage (FILE *fd,
gushort rgb;
long rowstride, channels;
gint i, j, cur_progress, max_progress, unused;
/* Make a new image in the gimp */
if (bpp >= 16)
{
image = gimp_image_new (width, height, GIMP_RGB);
@ -346,21 +346,21 @@ ReadImage (FILE *fd,
GIMP_INDEXED_IMAGE, 100, GIMP_NORMAL_MODE);
channels = 1;
}
gimp_image_set_filename(image, filename);
gimp_image_add_layer(image,layer,0);
drawable = gimp_drawable_get(layer);
dest = g_malloc(drawable->width*drawable->height*channels);
buffer= g_malloc(rowbytes);
rowstride = drawable->width * channels;
ypos = height - 1; /* Bitmaps begin in the lower left corner */
cur_progress = 0;
max_progress = height;
switch (bpp) {
case 32:
{
@ -459,7 +459,7 @@ ReadImage (FILE *fd,
while (ypos >= 0 && xpos <= width)
{
unused = ReadOK (fd, buffer, 2);
if ((guchar) buffer[0] != 0)
if ((guchar) buffer[0] != 0)
/* Count + Color - record */
{
for (j = 0; ((guchar) j < (guchar) buffer[0]) && (xpos < width);)

View File

@ -122,7 +122,7 @@ WriteBMP (const gchar *filename,
0, 0, drawable->width, drawable->height, FALSE, FALSE);
if (gimp_drawable_has_alpha(drawable_ID))
{
g_message (_("Cannot operate on unknown image types or alpha images"));
g_message (_("Cannot save images with alpha channel."));
return GIMP_PDB_EXECUTION_ERROR;
}
@ -168,7 +168,7 @@ WriteBMP (const gchar *filename,
}
break;
default:
fprintf (stderr, "%s: This should not happen\n", prog_name);
g_message (_("Cannot operate on unknown image types."));
return GIMP_PDB_EXECUTION_ERROR;
}
@ -184,7 +184,7 @@ WriteBMP (const gchar *filename,
outfile = fopen (filename, "wb");
if (!outfile)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return GIMP_PDB_EXECUTION_ERROR;
}

View File

@ -108,8 +108,8 @@ query (void)
"May 1998",
"<Load>/CEL",
NULL,
GIMP_PLUGIN,
G_N_ELEMENTS (load_args),
GIMP_PLUGIN,
G_N_ELEMENTS (load_args),
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
@ -250,7 +250,8 @@ load_image (const gchar *file,
if (fp == NULL)
{
g_message (_("Can't open '%s':\n%s"), file, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
file, g_strerror (errno));
return -1;
}
@ -316,7 +317,7 @@ load_image (const gchar *file,
case 16:
fread (buffer, (width+1)/2, 1, fp);
for (j = 0, k = 0; j < width*2; j+= 4, ++k)
{
{
if (buffer[k] / 16 == 0)
{
line[j]= 16;
@ -361,7 +362,7 @@ load_image (const gchar *file,
g_message (_("Unsupported number of colors (%d)"), colours);
return -1;
}
gimp_pixel_rgn_set_rect (&pixel_rgn, line, 0, i, drawable->width, 1);
gimp_progress_update ((float) i / (float) height);
}
@ -494,7 +495,7 @@ save_image (const gchar *file,
if (fp == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
file, g_strerror (errno));
return FALSE;
}
@ -556,7 +557,7 @@ save_image (const gchar *file,
else
{
for (j = 0, k = 0; j < drawable->width*2; j+= 4, ++k)
{
{
buffer[k] = 0;
if (line[j+1] > 127)
{

View File

@ -2129,7 +2129,7 @@ CML_execute_save_to_file (GtkWidget *widget,
if ((err != 0) && (file == NULL))
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return;
}
@ -2182,7 +2182,7 @@ CML_execute_save_to_file (GtkWidget *widget,
fprintf (file, "Random seed : %d\n", VALS.seed);
fclose(file);
g_message (_("Parameters were Saved to\n'%s'"), filename);
g_message (_("Parameters were Saved to '%s'"), filename);
strncpy (VALS.last_file_name, filename,
sizeof (VALS.last_file_name) - 1);
@ -2339,7 +2339,8 @@ CML_load_parameter_file (const gchar *filename,
if (!file)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return FALSE;
}
else
@ -2367,9 +2368,10 @@ CML_load_parameter_file (const gchar *filename,
if (interactive_mode)
{
if (version < PARAM_FILE_FORMAT_VERSION)
g_message (_("Warning: '%s'\nis an old format file."), filename);
g_message (_("Warning: '%s' is an old format file."), filename);
if (PARAM_FILE_FORMAT_VERSION < version)
g_message (_("Warning: '%s'\nis a parameter file for newer CML_explorer than me."), filename);
g_message (_("Warning: '%s' is a parameter file for newer "
"CML_explorer than me."), filename);
}
for (channel_id = 0; flag && (channel_id < 3); channel_id++)
{

View File

@ -255,14 +255,14 @@ run (const gchar *name,
*return_vals = values;
run_mode = param[0].data.d_int32;
INIT_I18N ();
if (run_mode == GIMP_RUN_NONINTERACTIVE && n_params != 3)
{
status = GIMP_PDB_CALLING_ERROR;
}
/* Check the procedure name we were called with, to decide
what needs to be done. */
if (strcmp(name,"plug_in_animationoptimize")==0)
@ -275,7 +275,7 @@ run (const gchar *name,
opmode = OPFOREGROUND;
else
g_error("GAH!!!");
if (status == GIMP_PDB_SUCCESS)
{
image_id = param[1].data.d_image;
@ -285,7 +285,7 @@ run (const gchar *name,
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush();
}
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
@ -377,7 +377,7 @@ compose_row(int frame_num,
/* render... */
srcptr = line_buf;
for (i=rawx; i<rawwidth+rawx; i++)
{
if (i>=0 && i<dest_width)
@ -392,10 +392,10 @@ compose_row(int frame_num,
dest[i*pixelstep + pixelstep - 1] = 255;
}
}
srcptr += rawbpp;
}
}
@ -422,7 +422,7 @@ do_optimizations(GimpRunMode run_mode)
gchar* oldlayer_name;
gchar* newlayer_name;
gboolean can_combine;
gint32 bbox_top, bbox_bottom, bbox_left, bbox_right;
@ -452,7 +452,7 @@ do_optimizations(GimpRunMode run_mode)
pixelstep = (imagetype == GIMP_RGB) ? 4 : 2;
/* gimp_tile_cache_ntiles(total_frames * (width / gimp_tile_width() + 1) );*/
drawabletype_alpha = (imagetype == GIMP_RGB) ? GIMP_RGBA_IMAGE :
((imagetype == GIMP_INDEXED) ? GIMP_INDEXEDA_IMAGE : GIMP_GRAYA_IMAGE);
@ -462,6 +462,7 @@ do_optimizations(GimpRunMode run_mode)
this_frame = g_malloc (frame_sizebytes);
last_frame = g_malloc (frame_sizebytes);
opti_frame = g_malloc (frame_sizebytes);
if (opmode == OPBACKGROUND ||
opmode == OPFOREGROUND)
back_frame = g_malloc (frame_sizebytes);
@ -478,9 +479,6 @@ do_optimizations(GimpRunMode run_mode)
gimp_image_set_cmap (new_image_id, palette, ncolours);
}
if ((this_frame == NULL) || (last_frame == NULL) || (opti_frame == NULL))
g_error(_("Not enough memory to allocate buffers for optimization.\n"));
#if 1
if (opmode == OPBACKGROUND ||
opmode == OPFOREGROUND)
@ -495,7 +493,7 @@ do_optimizations(GimpRunMode run_mode)
guint **count;
guint *num_colours;
these_rows = g_new (guchar *, total_frames);
red = g_new (guchar *, total_frames);
green = g_new (guchar *, total_frames);
@ -516,7 +514,7 @@ g_warning("stat fun");
count[this_frame_num] = g_new0(guint, width);
}
for (row = 0; row < height; row++)
{
memset(num_colours, 0, width * sizeof(guint));
@ -527,9 +525,9 @@ g_warning("stat fun");
drawable =
gimp_drawable_get (layers[total_frames-(this_frame_num+1)]);
dispose = get_frame_disposal (this_frame_num);
compose_row(this_frame_num,
dispose,
row,
@ -541,7 +539,7 @@ g_warning("stat fun");
gimp_drawable_detach(drawable);
}
/* g_warning("eh2."); */
for (this_frame_num=0; this_frame_num<total_frames; this_frame_num++)
@ -606,7 +604,7 @@ g_warning("stat fun");
}
/* g_warning("eh."); */
for (i=0; i<width; i++)
{
guint best_count = 0;
@ -641,9 +639,9 @@ g_warning("stat fun");
these_rows[0],
width * pixelstep);*/
}
g_warning("stat fun over");
for (this_frame_num=0; this_frame_num<total_frames; this_frame_num++)
{
g_free(these_rows[this_frame_num]);
@ -662,18 +660,18 @@ g_warning("stat fun");
#endif
if (opmode == OPBACKGROUND)
{
{
new_layer_id = gimp_layer_new(new_image_id,
"Backgroundx",
width, height,
drawabletype_alpha,
100.0,
GIMP_NORMAL_MODE);
gimp_image_add_layer (new_image_id, new_layer_id, 0);
drawable = gimp_drawable_get (new_layer_id);
gimp_pixel_rgn_init (&pixel_rgn, drawable,
0, 0,
width, height,
@ -704,7 +702,7 @@ g_warning("stat fun");
this_delay = get_frame_duration (this_frame_num);
dispose = get_frame_disposal (this_frame_num);
for (row = 0; row < height; row++)
{
compose_row(this_frame_num,
@ -740,7 +738,7 @@ g_warning("stat fun");
+ byteit])
{
goto enough;
}
}
}
this_frame[yit*width*pixelstep + xit*pixelstep
+ pixelstep - 1] = 0;
@ -786,7 +784,7 @@ g_warning("stat fun");
rbox_top = height;
rbox_right = 0;
rbox_bottom = 0;
for (yit=0; yit<height; yit++)
{
for (xit=0; xit<width; xit++)
@ -845,7 +843,7 @@ g_warning("stat fun");
{
keep_pix = TRUE;
goto decided;
}
}
}
decided:
if (opaq_pix)
@ -924,7 +922,7 @@ g_warning("stat fun");
*/
memcpy(last_frame, this_frame, frame_sizebytes);
/*
*
* PUT THIS FRAME INTO A NEW LAYER IN THE NEW IMAGE
@ -962,18 +960,18 @@ g_warning("stat fun");
oldlayer_name =
gimp_layer_get_name(last_true_frame);
buflen = strlen(oldlayer_name) + 40;
newlayer_name = g_malloc(buflen);
remove_disposal_tag(newlayer_name, oldlayer_name);
g_free(oldlayer_name);
oldlayer_name = g_malloc(buflen);
remove_ms_tag(oldlayer_name, newlayer_name);
g_snprintf(newlayer_name, buflen, "%s(%dms)%s",
oldlayer_name, cumulated_delay,
(this_frame_num == 0) ? "" :
@ -996,11 +994,11 @@ g_warning("stat fun");
100.0,
GIMP_NORMAL_MODE);
g_free(newlayer_name);
gimp_image_add_layer (new_image_id, new_layer_id, 0);
drawable = gimp_drawable_get (new_layer_id);
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0,
bbox_right-bbox_left,
bbox_bottom-bbox_top,
@ -1009,7 +1007,7 @@ g_warning("stat fun");
bbox_right-bbox_left,
bbox_bottom-bbox_top);
gimp_drawable_flush (drawable);
gimp_drawable_detach (drawable);
gimp_drawable_detach (drawable);
gimp_layer_translate (new_layer_id, (gint)bbox_left, (gint)bbox_top);
}
@ -1017,9 +1015,9 @@ g_warning("stat fun");
((double)total_frames));
}
}
gimp_image_undo_enable (new_image_id);
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_display_new (new_image_id);
@ -1050,7 +1048,7 @@ get_frame_disposal (const guint whichframe)
{
gchar* layer_name;
DisposeType disposal;
layer_name = gimp_layer_get_name(layers[total_frames-(whichframe+1)]);
disposal = parse_disposal_tag(layer_name);
g_free(layer_name);
@ -1072,7 +1070,7 @@ get_frame_duration (const guint whichframe)
duration = parse_ms_tag(layer_name);
g_free(layer_name);
}
if (duration < 0) duration = 100; /* FIXME for default-if-not-said */
if (duration == 0) duration = 100; /* FIXME - 0-wait is nasty */
@ -1097,7 +1095,7 @@ is_ms_tag (const char *str, int *duration, int *taglength)
/* eat any spaces between open-parenthesis and number */
while ((offset<length) && (str[offset] == ' '))
offset++;
if ((offset>=length) || (!isdigit(str[offset])))
return 0;
@ -1107,7 +1105,7 @@ is_ms_tag (const char *str, int *duration, int *taglength)
sum += str[offset] - '0';
offset++;
}
while ((offset<length) && (isdigit(str[offset])));
while ((offset<length) && (isdigit(str[offset])));
if (length-offset <= 2)
return 0;
@ -1130,7 +1128,7 @@ is_ms_tag (const char *str, int *duration, int *taglength)
return 0;
offset++;
*duration = sum;
*taglength = offset;
@ -1153,7 +1151,7 @@ parse_ms_tag (const char *str)
if (is_ms_tag(&str[i], &rtn, &dummy))
return rtn;
}
return -1;
}
@ -1163,7 +1161,7 @@ is_disposal_tag (const char *str, DisposeType *disposal, int *taglength)
{
if (strlen(str) != 9)
return 0;
if (strncmp(str, "(combine)", 9) == 0)
{
*taglength = 9;

View File

@ -303,7 +303,7 @@ save_image (const gchar *filename,
/* and bzip2 into it */
execlp ("bzip2", "bzip2", "-cf", tmpname, NULL);
g_message ("exec failed: bzip2: %s", g_strerror (errno));
g_message ("execlp(\"bzip2 -cf\") failed: %s", g_strerror (errno));
g_free (tmpname);
_exit (127);
}
@ -322,7 +322,7 @@ save_image (const gchar *filename,
|| !WIFEXITED (process_status)
|| (WEXITSTATUS (process_status) != 0))
{
g_message ("bzip2 exited abnormally on file\n'%s'", tmpname);
g_message ("bzip2 exited abnormally on file '%s'", tmpname);
g_free (tmpname);
return GIMP_PDB_EXECUTION_ERROR;
}
@ -348,8 +348,8 @@ load_image (const gchar *filename,
if (NULL == (ext = find_extension (filename)))
{
g_message (_("No sensible extension, "
"attempting to load with file magic."));
g_message (_("No sensible extension, attempting to load "
"with file magic."));
ext = ".foo";
}
@ -381,7 +381,7 @@ load_image (const gchar *filename,
/* and unzip into it */
execlp ("bzip2", "bzip2", "-cfd", filename, NULL);
g_message ("exec failed: bunzip2: %s", g_strerror (errno));
g_message ("execlp(\"bzip2 -cfd\") failed: %s", g_strerror (errno));
g_free (tmpname);
_exit (127);
}
@ -401,7 +401,7 @@ load_image (const gchar *filename,
|| !WIFEXITED (process_status)
|| (WEXITSTATUS (process_status) != 0))
{
g_message ("bzip2 exited abnormally on file\n'%s'", filename);
g_message ("bzip2 exited abnormally on file '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;

View File

@ -289,7 +289,7 @@ spawn_gzip (gchar *filename,
close (tfd);
if (*pid == -1)
{
g_message ("spawn failed: %s", g_strerror (errno));
g_message ("spawnlp() failed: %s", g_strerror (errno));
return -1;
}
return 0;
@ -369,7 +369,7 @@ save_image (const gchar *filename,
/* and gzip into it */
execlp ("gzip", "gzip", "-cfn", tmpname, NULL);
g_message ("exec failed: gzip: %s", g_strerror (errno));
g_message ("execlp(\"gzip -cfn\") failed: %s", g_strerror (errno));
g_free (tmpname);
_exit(127);
}
@ -381,7 +381,7 @@ save_image (const gchar *filename,
|| !WIFEXITED (process_status)
|| (WEXITSTATUS (process_status) != 0))
{
g_message ("gzip exited abnormally on file\n'%s'", tmpname);
g_message ("gzip exited abnormally on file '%s'", tmpname);
g_free (tmpname);
return 0;
}
@ -443,8 +443,8 @@ load_image (const gchar *filename,
if (NULL == (ext = find_extension (filename)))
{
g_message (_("No sensible extension, "
"attempting to load with file magic."));
g_message (_("No sensible extension, attempting to load "
"with file magic."));
ext = ".foo";
}
@ -487,7 +487,7 @@ load_image (const gchar *filename,
/* and unzip into it */
execlp ("gzip", "gzip", "-cfd", filename, NULL);
g_message ("exec failed: gunzip: %s", g_strerror (errno));
g_message ("execlp(\"gzip -cfd\") failed: %s", g_strerror (errno));
g_free (tmpname);
_exit(127);
}
@ -499,7 +499,7 @@ load_image (const gchar *filename,
|| !WIFEXITED (process_status)
|| (WEXITSTATUS (process_status) != 0))
{
g_message ("gzip exited abnormally on file\n'%s'", filename);
g_message ("gzip exited abnormally on file '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;

View File

@ -225,7 +225,8 @@ run (const gchar *name,
/* The plug-in is not able to handle images smaller than 3 pixels */
if (drawable->width < 3 || drawable->height < 3)
{
g_message (_("Convolution Matrix does not work\non layers smaller than 3 pixels."));
g_message (_("Convolution Matrix does not work on layers "
"smaller than 3 pixels."));
status = GIMP_PDB_EXECUTION_ERROR;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;

View File

@ -809,7 +809,7 @@ p_save_pointfile (BenderDialog *cd,
l_fp = fopen(filename, "w+");
if (!l_fp)
{
g_message (_("Failed to write file '%s':\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return -1;
}
@ -861,7 +861,7 @@ p_load_pointfile (BenderDialog *cd,
l_fp = fopen(filename, "r");
if (!l_fp)
{
g_message (_("Failed to open file '%s':\n%s"),
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}

View File

@ -290,7 +290,8 @@ load_image (const gchar *filename)
if (!DICOM)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -609,7 +610,7 @@ save_image (const gchar *filename,
/* Make sure we're not saving an image with an alpha channel */
if (gimp_drawable_has_alpha (drawable_ID))
{
g_message (_("DICOM save cannot handle images with alpha channels"));
g_message (_("Cannot save images with alpha channel."));
return FALSE;
}
@ -639,7 +640,7 @@ save_image (const gchar *filename,
if (!DICOM)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
gimp_drawable_detach (drawable);
return FALSE;

View File

@ -233,7 +233,8 @@ run (const gchar *name,
if (!(bvals.horizontal || bvals.vertical))
{
gimp_message ( _("gauss_iir: you must specify either horizontal or vertical (or both)"));
g_message (_("You must specify either horizontal "
"or vertical (or both)"));
status = GIMP_PDB_CALLING_ERROR;
}
}
@ -281,7 +282,7 @@ run (const gchar *name,
if (gimp_drawable_is_rgb (drawable->drawable_id) ||
gimp_drawable_is_gray (drawable->drawable_id))
{
gimp_progress_init ( _("IIR Gaussian Blur"));
gimp_progress_init (_("IIR Gaussian Blur"));
/* set the tile cache size so that the gaussian blur works well */
gimp_tile_cache_ntiles (2 *
@ -314,7 +315,7 @@ run (const gchar *name,
}
else
{
gimp_message ( "gauss_iir: cannot operate on indexed color images");
g_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
}

View File

@ -226,7 +226,8 @@ run (const gchar *name,
if (!(bvals.horizontal || bvals.vertical))
{
g_message ( _("You must specify either horizontal or vertical (or both)"));
g_message (_("You must specify either horizontal "
"or vertical (or both)"));
status = GIMP_PDB_CALLING_ERROR;
}
@ -275,7 +276,7 @@ run (const gchar *name,
if (gimp_drawable_is_rgb (drawable->drawable_id) ||
gimp_drawable_is_gray (drawable->drawable_id))
{
gimp_progress_init ( _("RLE Gaussian Blur"));
gimp_progress_init (_("RLE Gaussian Blur"));
/* set the tile cache size so that the gaussian blur works well */
gimp_tile_cache_ntiles (2 *
@ -308,7 +309,7 @@ run (const gchar *name,
}
else
{
gimp_message ( "gauss_rle: cannot operate on indexed color images");
g_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
}

View File

@ -292,7 +292,7 @@ load_image (const gchar *filename)
if (fd == -1)
{
g_message (_("Can't open '%s':\n%s"),
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -354,7 +354,7 @@ load_image (const gchar *filename)
name = g_new (gchar, bn_size);
if ((read (fd, name, bn_size)) < bn_size)
{
g_message (_("Error in GIMP brush file\n'%s'"), filename);
g_message (_("Error in GIMP brush file '%s'"), filename);
close (fd);
g_free (name);
return -1;
@ -539,12 +539,12 @@ save_image (const gchar *filename,
if (fd == -1)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}
temp = g_strdup_printf (_("Saving %s:"), filename);
temp = g_strdup_printf (_("Saving '%s'..."), filename);
gimp_progress_init (temp);
g_free (temp);

View File

@ -687,7 +687,7 @@ find_unused_ia_colour (guchar *pixels,
return ((*colors)-1);
}
g_message (_("Couldn't simply reduce colors further.\nSaving as opaque."));
g_message (_("Couldn't simply reduce colors further. Saving as opaque."));
return (-1);
}
@ -908,7 +908,7 @@ save_image (const gchar *filename,
{
if (*c < 0)
{
g_message (_("The GIF format only supports comments in\n"
g_message (_("The GIF format only supports comments in "
"7bit ASCII encoding. No comment is saved."));
g_free (globalcomment);
@ -969,8 +969,8 @@ save_image (const gchar *filename,
break;
default:
g_message (_("Sorry, can't save RGB images as GIFs. "
"Convert to Indexed or Grayscale first."));
g_message (_("Cannot save RGB color images. Convert to "
"indexed color or grayscale first."));
return FALSE;
}
@ -993,7 +993,7 @@ save_image (const gchar *filename,
outfile = fopen (filename, "wb");
if (!outfile)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -18,7 +18,7 @@
/* Additionally...
* "The Graphics Interchange Format(c) is the Copyright property of
* CompuServe Incorporated. GIF(sm) is a Service Mark property of
* CompuServe Incorporated."
* CompuServe Incorporated."
*/
/*
@ -293,7 +293,8 @@ load_image (const gchar *filename)
fd = fopen (filename, "rb");
if (!fd)
{
g_message ("Can't open '%s':\n%s", filename, g_strerror (errno));
g_message ("Could not open '%s' for reading: %s",
filename, g_strerror (errno));
return -1;
}
@ -352,7 +353,7 @@ load_image (const gchar *filename)
highest_used_index = 0;
for (;;)
{
@ -527,7 +528,7 @@ DoExtension (FILE *fd,
if (comment_parasite)
gimp_parasite_free (comment_parasite);
comment_parasite = gimp_parasite_new ("gimp-comment",
GIMP_PARASITE_PERSISTENT,
strlen(buf) + 1, buf);
@ -890,7 +891,7 @@ ReadImage (FILE *fd,
)
{ /* Everything is RGB(A) from now on... sigh. */
promote_to_rgb = TRUE;
/* Promote everything we have so far into RGB(A) */
#ifdef GIFDEBUG
g_print ("GIF: Promoting image to RGB...\n");
@ -909,23 +910,23 @@ ReadImage (FILE *fd,
switch (previous_disposal)
{
case 0x00:
case 0x00:
break; /* 'don't care' */
case 0x01:
case 0x01:
framename_ptr = framename;
framename = g_strconcat (framename, " (combine)", NULL);
g_free (framename_ptr);
break;
case 0x02:
case 0x02:
framename_ptr = framename;
framename = g_strconcat (framename, " (replace)", NULL);
framename = g_strconcat (framename, " (replace)", NULL);
g_free (framename_ptr);
break;
case 0x03: /* Rarely-used, and unhandled by many
loaders/players (including GIMP: we treat as
'combine' mode). */
framename_ptr = framename;
framename = g_strconcat (framename, " (combine) (!)", NULL);
framename = g_strconcat (framename, " (combine) (!)", NULL);
g_free (framename_ptr);
break;
case 0x04: /* I've seen a composite of this type. stvo_online_banner2.gif */
@ -940,7 +941,7 @@ ReadImage (FILE *fd,
"GIF plugin author!\n (adam@foxbox.org)",
previous_disposal);
break;
default:
default:
g_message ("Something got corrupted.");
break;
}
@ -976,7 +977,8 @@ ReadImage (FILE *fd,
if (!alpha_frame && promote_to_rgb)
{
g_message ("Ouchie! Can't handle non-alpha RGB frames.\n Please mail the plugin author. (adam@gimp.org)");
g_message ("Ouchie! Can't handle non-alpha RGB frames. "
"Please mail the plugin author. (adam@gimp.org)");
gimp_quit();
}

View File

@ -624,7 +624,8 @@ gih_load_image (const gchar *filename)
if (fd == -1)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -1211,7 +1212,7 @@ gih_save_image (const gchar *filename,
if (fd == -1)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -726,7 +726,7 @@ dialog (gint32 image_ID,
0, 2, 0.0);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (width), _("Intersection"),
0, 3, 0.0);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (width), _("Width: "),
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (width), _("Width:"),
1, 0, 0.0);
/* put a chain_button under the size_entries */
@ -786,7 +786,7 @@ dialog (gint32 image_ID,
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (space), 2, grid_cfg.ispace);
/* attach labels */
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (space), _("Spacing: "),
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (space), _("Spacing:"),
1, 0, 0.0);
/* put a chain_button under the spacing_entries */
@ -850,7 +850,7 @@ dialog (gint32 image_ID,
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (offset), 2, grid_cfg.ioffset);
/* attach labels */
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (offset), _("Offset: "),
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (offset), _("Offset:"),
1, 0, 0.0);
/* this is a weird hack: we put a table into the offset table */

View File

@ -223,7 +223,7 @@ save_image (const gchar *filename,
if (! fp)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -289,7 +289,7 @@ spawn_gzip (gchar *filename,
close (tfd);
if (*pid == -1)
{
g_message ("spawn failed: %s", g_strerror (errno));
g_message ("spawnlp() failed: %s", g_strerror (errno));
return -1;
}
return 0;
@ -369,7 +369,7 @@ save_image (const gchar *filename,
/* and gzip into it */
execlp ("gzip", "gzip", "-cfn", tmpname, NULL);
g_message ("exec failed: gzip: %s", g_strerror (errno));
g_message ("execlp(\"gzip -cfn\") failed: %s", g_strerror (errno));
g_free (tmpname);
_exit(127);
}
@ -381,7 +381,7 @@ save_image (const gchar *filename,
|| !WIFEXITED (process_status)
|| (WEXITSTATUS (process_status) != 0))
{
g_message ("gzip exited abnormally on file\n'%s'", tmpname);
g_message ("gzip exited abnormally on file '%s'", tmpname);
g_free (tmpname);
return 0;
}
@ -443,8 +443,8 @@ load_image (const gchar *filename,
if (NULL == (ext = find_extension (filename)))
{
g_message (_("No sensible extension, "
"attempting to load with file magic."));
g_message (_("No sensible extension, attempting to load "
"with file magic."));
ext = ".foo";
}
@ -487,7 +487,7 @@ load_image (const gchar *filename,
/* and unzip into it */
execlp ("gzip", "gzip", "-cfd", filename, NULL);
g_message ("exec failed: gunzip: %s", g_strerror (errno));
g_message ("execlp(\"gzip -cfd\") failed: %s", g_strerror (errno));
g_free (tmpname);
_exit(127);
}
@ -499,7 +499,7 @@ load_image (const gchar *filename,
|| !WIFEXITED (process_status)
|| (WEXITSTATUS (process_status) != 0))
{
g_message ("gzip exited abnormally on file\n'%s'", filename);
g_message ("gzip exited abnormally on file '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;

View File

@ -334,7 +334,8 @@ load_image (const gchar *filename)
if (filedes == -1)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -448,7 +449,7 @@ save_image (const gchar *filename,
fp = fopen (filename, "wb");
if (fp == NULL)
{
g_message ("Can't open '%s' for writing:\n%s",
g_message ("Could not open '%s' for writing: %s",
filename, g_strerror (errno));
return FALSE;
}

View File

@ -758,7 +758,8 @@ load_image (const gchar *filename,
if ((infile = fopen (filename, "rb")) == NULL)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
gimp_quit ();
}
@ -1292,7 +1293,7 @@ save_image (const gchar *filename,
*/
if ((outfile = fopen (filename, "wb")) == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -482,7 +482,7 @@ save_dialog (void)
g_snprintf (buffer, sizeof (buffer), "%s", mail_info.receipt);
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Recipient:"), 1.0, 0.5,
_("_Recipient:"), 1.0, 0.5,
entry, 1, FALSE);
g_signal_connect (entry, "changed",
G_CALLBACK (mail_entry_callback),
@ -494,7 +494,7 @@ save_dialog (void)
g_snprintf (buffer, sizeof (buffer), "%s", mail_info.from);
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Sender:"), 1.0, 0.5,
_("_Sender:"), 1.0, 0.5,
entry, 1, FALSE);
g_signal_connect (entry, "changed",
G_CALLBACK (mail_entry_callback),
@ -506,7 +506,7 @@ save_dialog (void)
g_snprintf (buffer, sizeof (buffer), "%s", mail_info.subject);
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Subject:"), 1.0, 0.5,
_("S_ubject:"), 1.0, 0.5,
entry, 1, FALSE);
g_signal_connect (entry, "changed",
G_CALLBACK (mail_entry_callback),
@ -518,7 +518,7 @@ save_dialog (void)
g_snprintf (buffer, sizeof (buffer), "%s", mail_info.comment);
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
_("Comment:"), 1.0, 0.5,
_("Comm_ent:"), 1.0, 0.5,
entry, 1, FALSE);
g_signal_connect (entry, "changed",
G_CALLBACK (mail_entry_callback),
@ -530,7 +530,7 @@ save_dialog (void)
g_snprintf (buffer, sizeof (buffer), "%s", mail_info.filename);
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 4,
_("Filename:"), 1.0, 0.5,
_("_Filename:"), 1.0, 0.5,
entry, 1, FALSE);
g_signal_connect (entry, "changed",
G_CALLBACK (mail_entry_callback),
@ -538,10 +538,11 @@ save_dialog (void)
/* comment */
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 4);
gtk_table_attach (GTK_TABLE (table), scrolled_window,
0, 2, 5, 6,
GTK_EXPAND | GTK_FILL,
@ -575,8 +576,8 @@ save_dialog (void)
&mail_info.encapsulation,
mail_info.encapsulation,
_("Uuencode"), ENCAPSULATION_UUENCODE, NULL,
_("MIME"), ENCAPSULATION_MIME, NULL,
_("_Uuencode"), ENCAPSULATION_UUENCODE, NULL,
_("_MIME"), ENCAPSULATION_MIME, NULL,
NULL);
gtk_table_attach (GTK_TABLE (table), vbox, 1, 2, 6, 8,

View File

@ -394,7 +394,7 @@ run (const gchar *name,
drawable = gimp_drawable_get (param[2].data.d_drawable);
if (!gimp_drawable_is_rgb (drawable->drawable_id))
{
g_message (_("Color Mapping / Adjust FG/BG:\nCannot operate on gray/indexed images"));
g_message (_("Cannot operate on gray or indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
break;
}
@ -709,7 +709,7 @@ color_mapping (GimpDrawable *drawable)
if (!gimp_drawable_is_rgb (drawable->drawable_id))
{
g_message (_("Color Mapping / Adjust FG/BG:\nCannot operate on gray/indexed images"));
g_message (_("Cannot operate on gray or indexed color images."));
return;
}

View File

@ -262,7 +262,8 @@ load_image (const gchar *filename)
if (fd == -1)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -378,7 +379,7 @@ save_image (const gchar *filename,
if (fd == -1)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -298,7 +298,8 @@ load_image (const gchar *filename)
fd = fopen (filename, "rb");
if (!fd)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -308,13 +309,13 @@ load_image (const gchar *filename)
if (fread (&pcx_header, 128, 1, fd) == 0)
{
g_message (_("Can't read header from\n'%s'"), filename);
g_message (_("Could not read header from '%s'"), filename);
return -1;
}
if (pcx_header.manufacturer != 10)
{
g_message (_("'%s'\nis not a PCX file"), filename);
g_message (_("'%s' is not a PCX file"), filename);
return -1;
}
@ -570,13 +571,13 @@ save_image (const gchar *filename,
break;
default:
g_message (_("Can't save layers with alpha.\nFlatten your image"));
g_message (_("Cannot save images with alpha channel."));
return FALSE;
}
if ((fp = fopen (filename, "wb")) == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -330,7 +330,8 @@ load_image (const gchar *filename)
file = fopen (filename, "rb");
if (NULL == file)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -511,7 +512,7 @@ save_image (const gchar *filename,
file = fopen (filename, "wb");
if (!file)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -463,7 +463,7 @@ load_image (const gchar *filename)
if (setjmp (pp->jmpbuf))
{
g_message (_("'%s':\nPNG error. File corrupted?"), filename);
g_message (_("Error while reading '%s'. File corrupted?"), filename);
return image;
}
@ -479,7 +479,8 @@ load_image (const gchar *filename)
if (fp == NULL)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
gimp_quit ();
}
@ -594,14 +595,14 @@ load_image (const gchar *filename)
layer_type = GIMP_INDEXED_IMAGE;
break;
default: /* Aie! Unknown type */
g_message (_("'%s':\nUnknown PNG color model"), filename);
g_message (_("Unknown color model in PNG file '%s'."), filename);
return -1;
};
image = gimp_image_new (info->width, info->height, image_type);
if (image == -1)
{
g_message ("'%s'\nCan't allocate new image", filename);
g_message ("Could not create new image for '%s'", filename);
gimp_quit ();
};
@ -951,7 +952,7 @@ save_image (const gchar *filename,
if (setjmp (pp->jmpbuf))
{
g_message (_("'%s':\nPNG error. Couldn't save image"), filename);
g_message (_("Error while saving '%s'. Could not save image."), filename);
return 0;
}
@ -965,7 +966,7 @@ save_image (const gchar *filename,
fp = fopen (filename, "wb");
if (fp == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return 0;
}
@ -1037,7 +1038,7 @@ save_image (const gchar *filename,
respin_cmap (pp, info, remap, image_ID, drawable);
break;
default:
g_message ("'%s':\nImage type can't be saved as PNG", filename);
g_message ("Image type can't be saved as PNG");
return 0;
};
@ -1299,7 +1300,7 @@ respin_cmap (png_structp pp,
{
/* Inform the user that we couldn't losslessly save the
* transparency & just use the full palette */
g_message (_("Couldn't losslessly save transparency,\n"
g_message (_("Couldn't losslessly save transparency, "
"saving opacity instead."));
png_set_PLTE (pp, info, (png_colorp) before, colors);
}

View File

@ -392,7 +392,8 @@ load_image (const gchar *filename)
if (fd == -1)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -767,7 +768,7 @@ save_image (const gchar *filename,
if (fd == -1)
{
g_message ("Can't open '%s' for writing:\n%s",
g_message ("Could not open '%s' for writing: %s",
filename, g_strerror (errno));
return FALSE;
}

View File

@ -852,7 +852,7 @@ load_image (const gchar *filename)
ifp = fopen (filename, "r");
if (ifp == NULL)
{
g_message (_("Can't open '%s':\n%s"),
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -865,7 +865,7 @@ load_image (const gchar *filename)
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury, &is_epsf);
if (!ifp)
{
g_message (_("Can't interpret file"));
g_message (_("Could not interpret '%s'"), filename);
return (-1);
}
@ -963,7 +963,7 @@ save_image (const gchar *filename,
case GIMP_RGB_IMAGE:
break;
default:
g_message (_("Cannot operate on unknown image types"));
g_message (_("Cannot operate on unknown image types."));
return (FALSE);
break;
}
@ -972,7 +972,7 @@ save_image (const gchar *filename,
ofp = fopen (filename, "wb");
if (!ofp)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return (FALSE);
}

View File

@ -852,7 +852,7 @@ load_image (const gchar *filename)
ifp = fopen (filename, "r");
if (ifp == NULL)
{
g_message (_("Can't open '%s':\n%s"),
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -865,7 +865,7 @@ load_image (const gchar *filename)
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury, &is_epsf);
if (!ifp)
{
g_message (_("Can't interpret file"));
g_message (_("Could not interpret '%s'"), filename);
return (-1);
}
@ -963,7 +963,7 @@ save_image (const gchar *filename,
case GIMP_RGB_IMAGE:
break;
default:
g_message (_("Cannot operate on unknown image types"));
g_message (_("Cannot operate on unknown image types."));
return (FALSE);
break;
}
@ -972,7 +972,7 @@ save_image (const gchar *filename,
ofp = fopen (filename, "wb");
if (!ofp)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return (FALSE);
}

View File

@ -1713,7 +1713,8 @@ load_image (const gchar *name)
fd = fopen (name, "rb");
if (! fd)
{
g_message (_("Can't open '%s':\n%s"), name, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
name, g_strerror (errno));
return -1;
}

View File

@ -1523,7 +1523,7 @@ save_image (const gchar *filename,
fd = fopen (filename, "wb");
if (fd == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -1456,7 +1456,8 @@ load_image (const gchar *filename)
f = fopen (filename, "rb");
if (f == NULL)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}

View File

@ -205,7 +205,7 @@ run (const gchar *name,
}
else
{
gimp_message (_("sel_gauss: Cannot operate on indexed color images"));
gimp_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
}

View File

@ -1987,7 +1987,8 @@ loadit (const gchar * fn)
f = fopen (fn, "rt");
if (!f)
{
g_message ("Failed to open '%s': %s", fn, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
fn, g_strerror (errno));
return;
}
@ -2073,7 +2074,8 @@ saveit (const gchar *fn)
f = fopen (fn, "wt");
if (!f)
{
g_message ("Failed to open '%s': %s", fn, g_strerror (errno));
g_message (_("Could not open '%s' for writing: %s"),
fn, g_strerror (errno));
return;
}

View File

@ -378,7 +378,8 @@ load_image (const gchar *filename)
ifp = fopen (filename, "rb");
if (!ifp)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -387,7 +388,7 @@ load_image (const gchar *filename)
read_sun_header (ifp, &sunhdr);
if (sunhdr.l_ras_magic != RAS_MAGIC)
{
g_message (_("Can't open file as SUN-raster-file"));
g_message (_("Could not open '%s' as SUN-raster-file"), filename);
fclose (ifp);
return (-1);
}
@ -417,7 +418,8 @@ load_image (const gchar *filename)
#endif
if (sunhdr.l_ras_magic != RAS_MAGIC)
{
g_message (_("Can't read color entries"));
g_message (_("Could not read color entries from '%s'"),
filename);
fclose (ifp);
return (-1);
}
@ -505,7 +507,7 @@ save_image (const gchar *filename,
ofp = fopen (filename, "wb");
if (!ofp)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -238,9 +238,8 @@ load_image (const gchar *filename)
if (!pixbuf)
{
/* Do not rely on librsvg setting GError on failure! */
g_message (_("Can't open '%s':\n"
"%s"),
filename, error ? error->message : "unknown reason");
g_message (_("Could not open '%s' for reading: %s"),
filename, error ? error->message : _("Unknown reason"));
gimp_quit ();
}
@ -621,9 +620,8 @@ load_dialog (const gchar *filename)
if (!preview)
{
/* Do not rely on librsvg setting GError on failure! */
g_message (_("Can't open '%s':\n"
"%s"),
filename, error ? error->message : "unknown reason");
g_message (_("Could not open '%s' for reading: %s"),
filename, error ? error->message : _("Unknown reason"));
return FALSE;
}

View File

@ -410,7 +410,8 @@ load_image (const gchar *filename)
fp = fopen (filename, "rb");
if (!fp)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -1011,7 +1012,7 @@ save_image (const gchar *filename,
if ((fp = fopen (filename, "wb")) == NULL)
{
g_message ("Can't open '%s'\nfor writing: %s",
g_message ("Could not open '%s' for writing: %s",
filename, g_strerror (errno));
return FALSE;
}

View File

@ -429,7 +429,8 @@ load_image (const gchar *filename)
tif = TIFFOpen (filename, "r");
if (!tif)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
gimp_quit ();
}
@ -449,19 +450,20 @@ load_image (const gchar *filename)
if (!TIFFGetField (tif, TIFFTAG_IMAGEWIDTH, &cols))
{
g_message ("Can't get image width");
g_message ("Could not get image width from '%s'", filename);
gimp_quit ();
}
if (!TIFFGetField (tif, TIFFTAG_IMAGELENGTH, &rows))
{
g_message ("Can't get image length");
g_message ("Could not get image length from '%s'", filename);
gimp_quit ();
}
if (!TIFFGetField (tif, TIFFTAG_PHOTOMETRIC, &photomet))
{
g_message ("Can't get photometric\nAssuming min-is-black");
g_message ("Could not get photometric from '%s'. Assuming min-is-black",
filename);
/* old AppleScan software misses out the photometric tag (and
* incidentally assumes min-is-white, but xv assumes min-is-black,
* so we follow xv's lead. It's not much hardship to invert the
@ -522,7 +524,7 @@ load_image (const gchar *filename)
if ((image = gimp_image_new (cols, rows, image_type)) == -1)
{
g_message ("Can't create a new image");
g_message ("Could not create a new image");
gimp_quit ();
}
@ -646,7 +648,7 @@ load_image (const gchar *filename)
{
if (!TIFFGetField (tif, TIFFTAG_COLORMAP, &redmap, &greenmap, &bluemap))
{
g_message ("Can't get colormaps");
g_message ("Could not get colormaps from '%s'", filename);
gimp_quit ();
}
@ -1505,7 +1507,7 @@ save_image (const gchar *filename,
tif = TIFFOpen (filename, "w");
if (!tif)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -394,11 +394,11 @@ load_image (const gchar *filename,
if (!pixels)
{
g_message (_("Can't open '%s'"), filename);
g_message (_("Could not open '%s' for reading."), filename);
gimp_quit ();
}
status = g_strdup_printf (_("Loading %s:"), filename);
status = g_strdup_printf (_("Opening '%s'..."), filename);
gimp_progress_init (status);
g_free (status);
@ -406,7 +406,7 @@ load_image (const gchar *filename,
if (image == -1)
{
g_message ("Can't allocate new image for %s", filename);
g_message ("Could not allocate new image for '%s'", filename);
gimp_quit ();
}

View File

@ -715,7 +715,8 @@ load_image (const gchar *filename)
fp = fopen (filename, "rb");
if (!fp)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -798,7 +799,7 @@ load_image (const gchar *filename)
if (c == EOF)
{
g_message (_("'%s':\nCan't read header (ftell == %ld)"),
g_message (_("'%s':\nCould not read header (ftell == %ld)"),
filename, ftell (fp));
return -1;
}
@ -987,7 +988,7 @@ save_image (const gchar *filename,
fp = fopen (filename, "w");
if (!fp)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -380,16 +380,17 @@ load_image (const gchar *filename)
ifp = fopen (filename, "rb");
if (!ifp)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
read_xwd_header (ifp, &xwdhdr);
if (xwdhdr.l_file_version != 7)
{
g_message(_("Can't open file as XWD file"));
g_message (_("Could not read XWD header from '%s'"), filename);
fclose (ifp);
return (-1);
return -1;
}
#ifdef XWD_COL_WAIT_DEBUG
@ -506,7 +507,7 @@ save_image (const gchar *filename,
/* Make sure we're not saving an image with an alpha channel */
if (gimp_drawable_has_alpha (drawable_ID))
{
g_message (_("XWD save cannot handle images with alpha channels"));
g_message (_("Cannot save images with alpha channels."));
return FALSE;
}
@ -517,7 +518,7 @@ save_image (const gchar *filename,
case GIMP_RGB_IMAGE:
break;
default:
g_message (_("cannot operate on unknown image types"));
g_message (_("Cannot operate on unknown image types."));
return (FALSE);
break;
}
@ -526,7 +527,7 @@ save_image (const gchar *filename,
ofp = fopen (filename, "wb");
if (!ofp)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -215,7 +215,8 @@ load_image (const gchar *filename)
if (fd < 0)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -244,7 +245,7 @@ load_image (const gchar *filename)
bitmap = g_new0 (gchar, ( max_rows = MAX_ROWS ) * MAX_COLS / 8 );
bp = &bitmap[ row * MAX_COLS/8 ];
bp = &bitmap[ row * MAX_COLS/8 ];
while ( rs > 0 && cons_eol < 4 ) /* i.e., while (!EOF) */
{
@ -285,7 +286,7 @@ load_image (const gchar *filename)
}
if ( p == NULL ) /* invalid code */
{
{
fprintf( stderr, "invalid code, row=%d, col=%d, file offset=%lx, skip to eol\n",
row, col, (unsigned long) lseek( fd, 0, 1 ) - rs + rp );
while ( ( data & 0x03f ) != 0 )
@ -358,8 +359,8 @@ load_image (const gchar *filename)
#endif
} /* end skip 0bits */
hibit--; data >>=1;
color=0;
color=0;
if ( col == 0 )
cons_eol++; /* consecutive EOLs */
@ -385,8 +386,8 @@ load_image (const gchar *filename)
( max_rows - row ) * MAX_COLS/8 );
}
}
col=0; bp = &bitmap[ row * MAX_COLS/8 ];
col=0; bp = &bitmap[ row * MAX_COLS/8 ];
cons_eol = 0;
}
}

View File

@ -334,7 +334,8 @@ load_image (const gchar *filename)
fp = fopen (filename, "rb");
if (!fp)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return (-1);
}
fclose (fp);
@ -437,7 +438,7 @@ save_image (const gchar *filename,
case GIMP_RGB_IMAGE: case GIMP_RGBA_IMAGE:
break;
default:
g_message (_("Cannot operate on unknown image types"));
g_message (_("Cannot operate on unknown image types."));
return (FALSE);
break;
}
@ -446,14 +447,14 @@ save_image (const gchar *filename,
ofp = fits_open (filename, "w");
if (!ofp)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return (FALSE);
}
if (l_run_mode != GIMP_RUN_NONINTERACTIVE)
{
temp = g_strdup_printf (_("Saving '%s':"), filename);
temp = g_strdup_printf (_("Saving '%s'..."), filename);
gimp_progress_init (temp);
g_free (temp);
}

View File

@ -412,7 +412,8 @@ file_ok_callback (GtkWidget *widget,
if (f == NULL)
{
g_message (_("Can't open '%s': %s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return;
}
@ -441,7 +442,7 @@ file_ok_callback (GtkWidget *widget,
if (NULL == f)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return;
}

View File

@ -713,7 +713,8 @@ gfig_load (const gchar *filename,
fp = fopen (filename, "r");
if (!fp)
{
g_warning ("Error opening: %s", filename);
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return NULL;
}
@ -1021,7 +1022,7 @@ gfig_save_callbk (void)
if (!fp)
{
message = g_strdup_printf (_("Error opening file '%s':\n%s"),
message = g_strdup_printf (_("Could not open '%s' for writing: %s"),
savename, g_strerror (errno));
g_message (message);
g_free (message);
@ -1091,7 +1092,7 @@ file_selection_ok (GtkWidget *w,
if (g_file_test (filenamebuf, G_FILE_TEST_IS_DIR))
{
g_message ("Save: Can't save to a folder.");
g_message (_("Cannot save to a folder."));
return;
}
@ -2659,7 +2660,6 @@ grid_frame (void)
g_signal_connect (toggle, "toggled",
G_CALLBACK (draw_grid_clear),
NULL);
gimp_help_set_help_data (toggle, _("Show grid"), NULL);
gtk_widget_show (toggle);
gfig_opt_widget.drawgrid = toggle;
@ -2668,7 +2668,6 @@ grid_frame (void)
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&selvals.opts.snap2grid);
gimp_help_set_help_data (toggle, _("Snap to grid"), NULL);
gtk_widget_show (toggle);
gfig_opt_widget.snap2grid = toggle;
@ -3072,7 +3071,7 @@ gfig_response (GtkWidget *widget,
gchar *message;
message =
g_strdup_printf (_("%d unsaved Gfig objects.\n"
g_strdup_printf (_("%d unsaved Gfig objects. "
"Continue with exiting?"), count);
dialog = gimp_query_boolean_box (_("Warning"),
@ -3806,7 +3805,7 @@ gfig_delete_gfig_callback (GtkWidget *widget,
if (delete_dialog)
return;
str = g_strdup_printf (_("Are you sure you want to delete\n"
str = g_strdup_printf (_("Are you sure you want to delete "
"\"%s\" from the list and from disk?"),
sel_obj->draw_name);

View File

@ -953,7 +953,7 @@ plugin_run (const gchar *name,
}
else
{
g_message (_("GFlare: cannot operate on indexed color images"));
g_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
}
}
@ -1426,11 +1426,11 @@ gflare_save (GFlare *gflare)
gflare_dir =
g_strescape ("${gimp_dir}" G_DIR_SEPARATOR_S "gflare", NULL);
g_message (_("GFlare `%s' is not saved.\n"
"If you add a new entry in %s, like:\n"
g_message (_("GFlare '%s' is not saved. If you add a new entry "
"in '%s', like:\n"
"(gflare-path \"%s\")\n"
"and make a folder %s,\n"
"then you can save your own GFlares into that folder."),
"and make a folder '%s', then you can save "
"your own GFlares into that folder."),
gflare->name, gimprc, gflare_dir, dir);
g_free (gimprc);
@ -2955,8 +2955,8 @@ dlg_selector_new_callback (GtkWidget *widget,
gtk_widget_get_toplevel (widget),
gimp_standard_help_func,
"filters/gflare.html",
_("Enter a Name for the New GFlare:"),
_("untitled"),
_("Enter a name for the new GFlare"),
_("Unnamed"),
NULL, NULL,
dlg_selector_new_ok_callback, dlg);
gtk_widget_show (query_box);
@ -3028,7 +3028,7 @@ dlg_selector_copy_callback (GtkWidget *widget,
gtk_widget_get_toplevel (widget),
gimp_standard_help_func,
"filters/gflare.html",
_("Enter a Name for the Copied GFlare:"),
_("Enter a name for the copied GFlare"),
name,
NULL, NULL,
dlg_selector_copy_ok_callback, dlg);
@ -3081,7 +3081,7 @@ dlg_selector_delete_callback (GtkWidget *widget,
gtk_widget_set_sensitive (dlg->shell, FALSE);
str = g_strdup_printf (_("Are you sure you want to delete\n"
str = g_strdup_printf (_("Are you sure you want to delete "
"\"%s\" from the list and from disk?"),
dlg->gflare->name);

View File

@ -422,7 +422,8 @@ get_info (const gchar *filename,
if (!file)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return FALSE;
}
fli_read_header (file, &fli_header);
@ -457,7 +458,8 @@ load_image (const gchar *filename,
file = fopen (filename ,"rb");
if (!file)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
return -1;
}
@ -709,7 +711,7 @@ save_image (const gchar *filename,
file = fopen (filename ,"wb");
if (!file)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -193,7 +193,7 @@ void savebrush(GtkWidget *wg, gpointer data)
sprintf(path, "%s/Brushes/", (char *)thispath->data);
window = gtk_file_selection_new( _("Save brush"));
window = gtk_file_selection_new (_("Save Brush"));
gtk_window_set_transient_for (GTK_WINDOW (window),
GTK_WINDOW (gtk_widget_get_toplevel (wg)));

View File

@ -496,7 +496,7 @@ void saveppm(ppm_t *p, const char *fn)
if (!f)
{
g_message (_("Failed to save PPM file '%s':\n%s"),
g_message (_("Failed to save PPM file '%s': %s"),
fn, g_strerror (errno));
return;
}

View File

@ -241,8 +241,8 @@ domain_parse (HelpDomain *domain,
if (! fp)
{
g_set_error (error, 0, 0,
"Could not open gimp-help.xml mapping file\n"
"from \"%s\"", domain->help_uri);
"Could not open gimp-help.xml mapping file from '%s'",
domain->help_uri);
g_free (filename);
return FALSE;
}

View File

@ -2565,7 +2565,7 @@ ifscompose_message_dialog (GtkMessageType type,
gtk_window_set_title (GTK_WINDOW (dlg), title);
gtk_window_set_role (GTK_WINDOW (dlg), "ifscompose-message");
gimp_dialog_run (GIMP_DIALOG (dlg));
gtk_dialog_run (GTK_DIALOG (dlg));
gtk_widget_destroy (dlg);
}
@ -2591,9 +2591,8 @@ ifsfile_save (GtkWidget *widget,
}
else
{
gchar *message = g_strdup_printf (_("Cannot save file '%s'.\n"
"Check the path and permissions."),
filename);
gchar *message = g_strdup_printf (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
ifscompose_message_dialog (GTK_MESSAGE_ERROR, GTK_WINDOW (file_select),
"Save failed", message);
g_free (message);

View File

@ -758,7 +758,8 @@ load_image (const gchar *filename,
if ((infile = fopen (filename, "rb")) == NULL)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
gimp_quit ();
}
@ -1292,7 +1293,7 @@ save_image (const gchar *filename,
*/
if ((outfile = fopen (filename, "wb")) == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -758,7 +758,8 @@ load_image (const gchar *filename,
if ((infile = fopen (filename, "rb")) == NULL)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
gimp_quit ();
}
@ -1292,7 +1293,7 @@ save_image (const gchar *filename,
*/
if ((outfile = fopen (filename, "wb")) == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -758,7 +758,8 @@ load_image (const gchar *filename,
if ((infile = fopen (filename, "rb")) == NULL)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
gimp_quit ();
}
@ -1292,7 +1293,7 @@ save_image (const gchar *filename,
*/
if ((outfile = fopen (filename, "wb")) == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -758,7 +758,8 @@ load_image (const gchar *filename,
if ((infile = fopen (filename, "rb")) == NULL)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
gimp_quit ();
}
@ -1292,7 +1293,7 @@ save_image (const gchar *filename,
*/
if ((outfile = fopen (filename, "wb")) == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -758,7 +758,8 @@ load_image (const gchar *filename,
if ((infile = fopen (filename, "rb")) == NULL)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
gimp_quit ();
}
@ -1292,7 +1293,7 @@ save_image (const gchar *filename,
*/
if ((outfile = fopen (filename, "wb")) == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -758,7 +758,8 @@ load_image (const gchar *filename,
if ((infile = fopen (filename, "rb")) == NULL)
{
g_message (_("Can't open '%s':\n%s"), filename, g_strerror (errno));
g_message (_("Could not open '%s' for reading: %s"),
filename, g_strerror (errno));
gimp_quit ();
}
@ -1292,7 +1293,7 @@ save_image (const gchar *filename,
*/
if ((outfile = fopen (filename, "wb")) == NULL)
{
g_message (_("Can't open '%s' for writing:\n%s"),
g_message (_("Could not open '%s' for writing: %s"),
filename, g_strerror (errno));
return FALSE;
}

View File

@ -314,7 +314,7 @@ load_image (const gchar *filename) /* I - File to load */
sgip = sgiOpen ((char *) filename, SGI_READ, 0, 0, 0, 0, 0);
if (sgip == NULL)
{
g_message ("Can't open '%s'", filename);
g_message ("Could not open '%s' for reading.", filename);
return -1;
};
@ -353,7 +353,7 @@ load_image (const gchar *filename) /* I - File to load */
image = gimp_image_new (sgip->xsize, sgip->ysize, image_type);
if (image == -1)
{
g_message ("Can't allocate new image");
g_message ("Could not allocate new image");
return -1;
}
@ -515,7 +515,7 @@ save_image (const gchar *filename,
zsize = 4;
break;
default:
g_message ("Image must be of type RGB or GRAY");
g_message (_("Cannot operate on indexed color images."));
return FALSE;
}
@ -527,7 +527,7 @@ save_image (const gchar *filename,
drawable->width, drawable->height, zsize);
if (sgip == NULL)
{
g_message (_("Can't open '%s' for writing"), filename);
g_message (_("Could not open '%s' for writing."), filename);
return FALSE;
};

View File

@ -1,4 +1,4 @@
/*
/*
* TWAIN Plug-in
* Copyright (C) 1999 Craig Setera
* Craig Setera <setera@home.com>
@ -25,7 +25,7 @@
* Randomize
*
* Any suggestions, bug-reports or patches are welcome.
*
*
* This plug-in interfaces to the TWAIN support library in order
* to capture images from TWAIN devices directly into GIMP images.
* The plug-in is capable of acquiring the following type of
@ -38,7 +38,7 @@
* Prerequisites:
* This plug-in will not compile on anything other than a Win32
* platform. Although the TWAIN documentation implies that there
* is TWAIN support available on Macintosh, I neither have a
* is TWAIN support available on Macintosh, I neither have a
* Macintosh nor the interest in porting this. If anyone else
* has an interest, consult www.twain.org for more information on
* interfacing to TWAIN.
@ -48,12 +48,12 @@
* configuration compiles with a maximum of single image transfers.
*/
/*
/*
* Revision history
* (02/07/99) v0.1 First working version (internal)
* (02/09/99) v0.2 First release to anyone other than myself
* (02/15/99) v0.3 Added image dump and read support for debugging
* (03/31/99) v0.5 Added support for multi-byte samples and paletted
* (03/31/99) v0.5 Added support for multi-byte samples and paletted
* images.
*/
#include "config.h"
@ -103,7 +103,7 @@
#define WM_TRANSFER_IMAGE (WM_USER + 100)
/*
* Definition of the run states
* Definition of the run states
*/
#define RUN_STANDARD 0
#define RUN_DUMP 1
@ -141,7 +141,7 @@ GimpPlugInInfo PLUG_IN_INFO =
query, /* query_proc */
run, /* run_proc */
};
extern void set_gimp_PLUG_IN_INFO_PTR(GimpPlugInInfo *);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
@ -162,8 +162,8 @@ typedef struct {
} TwainValues;
/* Default Twain values */
static TwainValues twainvals =
{
static TwainValues twainvals =
{
"",
100.0, 100.0,
0, 0,
@ -206,11 +206,11 @@ setRunMode(char *argv[])
twain_run_mode = RUN_READDUMP;
}
#endif /* _DEBUG */
/******************************************************************
* Win32 entry point and setup...
******************************************************************/
/*
* WinMain
*
@ -220,14 +220,14 @@ setRunMode(char *argv[])
* and process window messages on behalf of the TWAIN
* datasource.
*/
int APIENTRY
int APIENTRY
WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
/*
/*
* Normally, we would do all of the Windows-ish set up of
* the window classes and stuff here in WinMain. But,
* the only time we really need the window and message
@ -272,7 +272,7 @@ int main (int argc, char *argv[])
*/
return gimp_main(&PLUG_IN_INFO, __argc, __argv);
}
/*
* initTwainAppIdentity
*
@ -283,7 +283,7 @@ static pTW_IDENTITY
getAppIdentity(void)
{
pTW_IDENTITY appIdentity = g_new (TW_IDENTITY, 1);
/* Set up the application identity */
appIdentity->Id = 0;
appIdentity->Version.MajorNum = 0;
@ -297,10 +297,10 @@ getAppIdentity(void)
strcpy(appIdentity->Manufacturer, "Craig Setera");
strcpy(appIdentity->ProductFamily, "GIMP");
strcpy(appIdentity->ProductName, "GIMP for Win32");
return appIdentity;
}
/*
* initializeTwain
*
@ -313,13 +313,13 @@ void
initializeTwain(void)
{
pTW_IDENTITY appIdentity;
/* Get our application's identity */
appIdentity = getAppIdentity();
/* Create a new session object */
twSession = newSession(appIdentity);
/* Register our image transfer callback functions */
#ifdef _DEBUG
if (twain_run_mode == RUN_DUMP)
@ -328,18 +328,18 @@ initializeTwain(void)
#endif /* _DEBUG */
registerTransferCallbacks(twSession, &standardCbFuncs, NULL);
}
/*
* InitApplication
*
* Initialize window data and register the window class
*/
BOOL
BOOL
InitApplication(HINSTANCE hInstance)
{
WNDCLASS wc;
BOOL retValue;
/*
* Fill in window class structure with parameters to describe
* the main window.
@ -354,41 +354,41 @@ InitApplication(HINSTANCE hInstance)
wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
wc.lpszClassName = APP_NAME;
wc.lpszMenuName = NULL;
/* Register the window class and stash success/failure code. */
retValue = RegisterClass(&wc);
/* Log error */
if (!retValue)
LogLastWinError();
return retValue;
}
/*
* InitInstance
*
*
* Create the main window for the application. Used to
* interface with the TWAIN datasource.
*/
BOOL
BOOL
InitInstance(HINSTANCE hInstance, int nCmdShow)
{
/* Create our window */
hwnd = CreateWindow(APP_NAME, APP_NAME, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
NULL, NULL, hInstance, NULL);
if (!hwnd) {
return (FALSE);
}
ShowWindow(hwnd, nCmdShow);
UpdateWindow(hwnd);
return TRUE;
}
/*
* twainWinMain
*
@ -399,48 +399,48 @@ InitInstance(HINSTANCE hInstance, int nCmdShow)
* operate.
*/
int
twainWinMain(void)
twainWinMain(void)
{
/* Initialize the twain information */
initializeTwain();
/* Perform instance initialization */
if (!InitApplication(hInst))
return (FALSE);
/* Perform application initialization */
if (!InitInstance(hInst, SHOW_WINDOW))
return (FALSE);
/*
/*
* Call the main message processing loop...
* This call will not return until the application
* exits.
*/
return twainMessageLoop(twSession);
}
/*
* WndProc
*
* Process window message for the main window.
*/
LRESULT CALLBACK
LRESULT CALLBACK
WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_CREATE:
/* Register our window handle with the TWAIN
* support.
*/
registerWindowHandle(twSession, hWnd);
/* Schedule the image transfer by posting a message */
PostMessage(hWnd, WM_TRANSFER_IMAGE, 0, 0);
break;
case WM_TRANSFER_IMAGE:
/* Get an image */
#ifdef _DEBUG
@ -450,22 +450,22 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#endif /* _DEBUG */
getImage(twSession);
break;
case WM_DESTROY:
LogMessage("Exiting application\n");
PostQuitMessage(0);
break;
default:
return (DefWindowProc(hWnd, message, wParam, lParam));
}
return 0;
}
/******************************************************************
* GIMP Plug-in entry points
******************************************************************/
/*
* Plug-in Parameter definitions
*/
@ -476,14 +476,14 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{ GIMP_PDB_INT32, "image_count", "Number of acquired images" }, \
{ GIMP_PDB_INT32ARRAY, "image_ids", "Array of acquired image identifiers" }
/*
* query
*
* The plug-in is being queried. Install our procedure for
* acquiring.
*/
static void
static void
query (void)
{
static GimpParamDef args[] = { IN_ARGS };
@ -530,7 +530,7 @@ query (void)
PLUG_IN_AUTHOR,
PLUG_IN_COPYRIGHT,
PLUG_IN_VERSION,
N_("<Toolbox>/File/Acquire/TWAIN..."),
N_("<Toolbox>/File/Acquire/_TWAIN..."),
NULL,
GIMP_PLUGIN,
NUMBER_IN_ARGS,
@ -538,8 +538,8 @@ query (void)
args,
return_vals);
}
/* Return values storage */
static GimpParam values[3];
@ -549,7 +549,7 @@ static GimpParam values[3];
* The plug-in is being requested to run.
* Capture an image from a TWAIN datasource
*/
static void
static void
run (const gchar *name,
gint nparams,
const GimpParam *param,
@ -559,7 +559,7 @@ run (const gchar *name,
GimpRunMode run_mode;
/* Initialize the return values
* Always return at least the status to the caller.
* Always return at least the status to the caller.
*/
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_SUCCESS;
@ -579,13 +579,13 @@ run (const gchar *name,
/* Get the runmode from the in-parameters */
run_mode = param[0].data.d_int32;
/* Set up the rest of the return parameters */
values[1].type = GIMP_PDB_INT32;
values[1].data.d_int32 = 0;
values[2].type = GIMP_PDB_INT32ARRAY;
values[2].data.d_int32array = g_new (gint32, MAX_IMAGES);
/* How are we running today? */
switch (run_mode) {
case GIMP_RUN_INTERACTIVE:
@ -594,29 +594,29 @@ run (const gchar *name,
*/
gimp_get_data(PLUG_IN_NAME, &twainvals);
break;
case GIMP_RUN_NONINTERACTIVE:
/* Currently, we don't do non-interactive calls.
* Bail if someone tries to call us non-interactively
*/
values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
return;
case GIMP_RUN_WITH_LAST_VALS:
/* Retrieve values from the last run...
* Currently ignored
*/
gimp_get_data(PLUG_IN_NAME, &twainvals);
break;
default:
break;
} /* switch */
/* Have we succeeded so far? */
if (values[0].data.d_status == GIMP_PDB_SUCCESS)
twainWinMain();
/* Check to make sure we got at least one valid
* image.
*/
@ -629,18 +629,18 @@ run (const gchar *name,
/* Store variable states for next run */
gimp_set_data(PLUG_IN_NAME, &twainvals, sizeof (TwainValues));
}
/* Set return values */
*nreturn_vals = 3;
} else {
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
}
}
/***********************************************************************
* Image transfer callback functions
***********************************************************************/
/* Data used to carry data between each of
* the callback function calls.
*/
@ -664,7 +664,7 @@ void
preTransferCallback(void *clientData)
{
/* Initialize our progress dialog */
gimp_progress_init(_("Transferring TWAIN data"));
gimp_progress_init(_("Transferring TWAIN data..."));
}
/*
@ -681,10 +681,10 @@ beginTransferCallback(pTW_IMAGEINFO imageInfo, void *clientData)
pClientDataStruct theClientData = g_new (ClientDataStruct, 1);
#ifdef _DEBUG
#ifdef _DEBUG
logBegin(imageInfo, clientData);
#endif
/* Decide on the image type */
switch (imageInfo->PixelType) {
case TWPT_BW:
@ -693,7 +693,7 @@ beginTransferCallback(pTW_IMAGEINFO imageInfo, void *clientData)
imageType = GIMP_GRAY;
layerType = GIMP_GRAY_IMAGE;
break;
case TWPT_RGB:
/* Set up the image and layer types */
imageType = GIMP_RGB;
@ -734,46 +734,46 @@ beginTransferCallback(pTW_IMAGEINFO imageInfo, void *clientData)
*/
return FALSE;
}
/* Create the GIMP image */
theClientData->image_id = gimp_image_new(imageInfo->ImageWidth,
theClientData->image_id = gimp_image_new(imageInfo->ImageWidth,
imageInfo->ImageLength, imageType);
/* Create a layer */
theClientData->layer_id = gimp_layer_new(theClientData->image_id,
_("Background"),
imageInfo->ImageWidth,
imageInfo->ImageWidth,
imageInfo->ImageLength,
layerType, 100, GIMP_NORMAL_MODE);
/* Add the layer to the image */
gimp_image_add_layer(theClientData->image_id,
gimp_image_add_layer(theClientData->image_id,
theClientData->layer_id, 0);
/* Update the progress dialog */
theClientData->totalPixels = imageInfo->ImageWidth * imageInfo->ImageLength;
theClientData->completedPixels = 0;
gimp_progress_update((double) 0);
/* Get our drawable */
theClientData->drawable = gimp_drawable_get(theClientData->layer_id);
/* Initialize a pixel region for writing to the image */
gimp_pixel_rgn_init(&(theClientData->pixel_rgn), theClientData->drawable,
gimp_pixel_rgn_init(&(theClientData->pixel_rgn), theClientData->drawable,
0, 0, imageInfo->ImageWidth, imageInfo->ImageLength,
TRUE, FALSE);
/* Store our client data for the data transfer callbacks */
if (clientData)
g_free (clientData);
setClientData(twSession, (void *) theClientData);
/* Make sure to return TRUE to continue the image
* transfer
*/
return TRUE;
}
/*
* bitTransferCallback
*
@ -786,7 +786,7 @@ beginTransferCallback(pTW_IMAGEINFO imageInfo, void *clientData)
* image.
*/
static char bitMasks[] = { 128, 64, 32, 16, 8, 4, 2, 1 };
static int
static int
bitTransferCallback(pTW_IMAGEINFO imageInfo,
pTW_IMAGEMEMXFER imageMemXfer,
void *clientData)
@ -796,11 +796,11 @@ bitTransferCallback(pTW_IMAGEINFO imageInfo,
int rows = imageMemXfer->Rows;
int cols = imageMemXfer->Columns;
pClientDataStruct theClientData = (pClientDataStruct) clientData;
/* Allocate a buffer as necessary */
if (!destBuf)
destBuf = g_new (char, rows * cols);
/* Unpack the image data from bits into bytes */
srcBuf = (char *) imageMemXfer->Memory.TheMem;
offset = 0;
@ -810,21 +810,21 @@ bitTransferCallback(pTW_IMAGEINFO imageInfo,
destBuf[offset++] = ((byte & bitMasks[col % 8]) != 0) ? 255 : 0;
}
}
/* Update the complete chunk */
gimp_pixel_rgn_set_rect(&(theClientData->pixel_rgn),
gimp_pixel_rgn_set_rect(&(theClientData->pixel_rgn),
(guchar *) destBuf,
imageMemXfer->XOffset, imageMemXfer->YOffset,
cols, rows);
/* Update the user on our progress */
theClientData->completedPixels += (cols * rows);
gimp_progress_update((double) theClientData->completedPixels /
gimp_progress_update((double) theClientData->completedPixels /
(double) theClientData->totalPixels);
return TRUE;
}
/*
* oneBytePerSampleTransferCallback
*
@ -835,7 +835,7 @@ bitTransferCallback(pTW_IMAGEINFO imageInfo,
* from a greater number of bits per sample down to the
* 8 bits per sample understood by The GIMP.
*/
static int
static int
oneBytePerSampleTransferCallback(pTW_IMAGEINFO imageInfo,
pTW_IMAGEMEMXFER imageMemXfer,
void *clientData)
@ -846,11 +846,11 @@ oneBytePerSampleTransferCallback(pTW_IMAGEINFO imageInfo,
int rows = imageMemXfer->Rows;
int cols = imageMemXfer->Columns;
pClientDataStruct theClientData = (pClientDataStruct) clientData;
/* Allocate a buffer as necessary */
if (!destBuf)
destBuf = g_new (char, rows * cols * bytesPerPixel);
/* The bytes coming from the source may not be padded in
* a way that The GIMP is terribly happy with. It is
* possible to transfer row by row, but that is particularly
@ -866,29 +866,29 @@ oneBytePerSampleTransferCallback(pTW_IMAGEINFO imageInfo,
(srcBuf + (row * imageMemXfer->BytesPerRow)),
(bytesPerPixel * cols));
}
/* Update the complete chunk */
gimp_pixel_rgn_set_rect(&(theClientData->pixel_rgn),
gimp_pixel_rgn_set_rect(&(theClientData->pixel_rgn),
(guchar *) destBuf,
imageMemXfer->XOffset, imageMemXfer->YOffset,
cols, rows);
/* Update the user on our progress */
theClientData->completedPixels += (cols * rows);
gimp_progress_update((double) theClientData->completedPixels /
gimp_progress_update((double) theClientData->completedPixels /
(double) theClientData->totalPixels);
return TRUE;
}
/*
* twoBytesPerSampleTransferCallback
*
* The following function is called for each memory
* block that is transferred from the data source if
* the image type is Grayscale or RGB.
*/
static int
*/
static int
twoBytesPerSampleTransferCallback(pTW_IMAGEINFO imageInfo,
pTW_IMAGEMEMXFER imageMemXfer,
void *clientData)
@ -904,11 +904,11 @@ twoBytesPerSampleTransferCallback(pTW_IMAGEINFO imageInfo,
TW_UINT16 *samplePtr;
pClientDataStruct theClientData = (pClientDataStruct) clientData;
/* Allocate a buffer as necessary */
if (!destBuf)
destBuf = g_new (char, rows * cols * imageInfo->SamplesPerPixel);
/* The bytes coming from the source may not be padded in
* a way that The GIMP is terribly happy with. It is
* possible to transfer row by row, but that is particularly
@ -922,7 +922,7 @@ twoBytesPerSampleTransferCallback(pTW_IMAGEINFO imageInfo,
/* Work through the rows */
for (row = 0; row < rows; row++) {
/* The start of this source row */
samplePtr = (TW_UINT16 *)
samplePtr = (TW_UINT16 *)
((char *) imageMemXfer->Memory.TheMem + (row * imageMemXfer->BytesPerRow));
/* The start of this dest row */
@ -944,21 +944,21 @@ twoBytesPerSampleTransferCallback(pTW_IMAGEINFO imageInfo,
}
}
}
/* Send the complete chunk */
gimp_pixel_rgn_set_rect(&(theClientData->pixel_rgn),
gimp_pixel_rgn_set_rect(&(theClientData->pixel_rgn),
(guchar *) destBuf,
imageMemXfer->XOffset, imageMemXfer->YOffset,
cols, rows);
/* Update the user on our progress */
theClientData->completedPixels += (cols * rows);
gimp_progress_update((double) theClientData->completedPixels /
gimp_progress_update((double) theClientData->completedPixels /
(double) theClientData->totalPixels);
return TRUE;
}
/*
* palettedTransferCallback
*
@ -970,8 +970,8 @@ twoBytesPerSampleTransferCallback(pTW_IMAGEINFO imageInfo,
* palette. This function will create an RGB or Gray
* image and use the palette to set the details of
* the pixels.
*/
static int
*/
static int
palettedTransferCallback(pTW_IMAGEINFO imageInfo,
pTW_IMAGEMEMXFER imageMemXfer,
void *clientData)
@ -984,9 +984,9 @@ palettedTransferCallback(pTW_IMAGEINFO imageInfo,
/* Get the client data */
pClientDataStruct theClientData = (pClientDataStruct) clientData;
/* Look up the palette entry size */
channelsPerEntry =
channelsPerEntry =
(theClientData->paletteData->PaletteType == TWPA_RGB) ? 3 : 1;
/* Allocate a buffer as necessary */
@ -996,7 +996,7 @@ palettedTransferCallback(pTW_IMAGEINFO imageInfo,
/* Work through the rows */
destPtr = destBuf;
for (row = 0; row < rows; row++) {
srcPtr = (char *) ((char *) imageMemXfer->Memory.TheMem +
srcPtr = (char *) ((char *) imageMemXfer->Memory.TheMem +
(row * imageMemXfer->BytesPerRow));
/* Work through the columns */
@ -1021,28 +1021,28 @@ palettedTransferCallback(pTW_IMAGEINFO imageInfo,
}
}
}
/* Send the complete chunk */
gimp_pixel_rgn_set_rect(&(theClientData->pixel_rgn),
gimp_pixel_rgn_set_rect(&(theClientData->pixel_rgn),
(guchar *) destBuf,
imageMemXfer->XOffset, imageMemXfer->YOffset,
cols, rows);
/* Update the user on our progress */
theClientData->completedPixels += (cols * rows);
gimp_progress_update((double) theClientData->completedPixels /
gimp_progress_update((double) theClientData->completedPixels /
(double) theClientData->totalPixels);
return TRUE;
}
/*
* dataTransferCallback
*
* The following function is called for each memory
* block that is transferred from the data source.
*/
int
int
dataTransferCallback(pTW_IMAGEINFO imageInfo,
pTW_IMAGEMEMXFER imageMemXfer,
void *clientData)
@ -1050,7 +1050,7 @@ dataTransferCallback(pTW_IMAGEINFO imageInfo,
#ifdef _DEBUG
logData(imageInfo, imageMemXfer, clientData);
#endif
/* Choose the appropriate transfer handler */
switch (imageInfo->PixelType) {
case TWPT_PALETTE:
@ -1058,25 +1058,25 @@ dataTransferCallback(pTW_IMAGEINFO imageInfo,
case TWPT_BW:
return bitTransferCallback(imageInfo, imageMemXfer, clientData);
case TWPT_GRAY:
case TWPT_RGB:
switch (imageInfo->BitsPerPixel / imageInfo->SamplesPerPixel) {
case 8:
return oneBytePerSampleTransferCallback(imageInfo, imageMemXfer, clientData);
case 16:
return twoBytesPerSampleTransferCallback(imageInfo, imageMemXfer, clientData);
default:
return FALSE;
}
default:
return FALSE;
}
}
/*
* endTransferCallback
*
@ -1097,7 +1097,7 @@ int
endTransferCallback(int completionState, int pendingCount, void *clientData)
{
pClientDataStruct theClientData = (pClientDataStruct) clientData;
LogMessage("endTransferCallback: CompState = %d, pending = %d\n",
completionState, pendingCount);
@ -1112,10 +1112,10 @@ endTransferCallback(int completionState, int pendingCount, void *clientData)
/* Make sure to check our return code */
if (completionState == TWRC_XFERDONE) {
/* We have a completed image transfer */
values[2].type = GIMP_PDB_INT32ARRAY;
values[2].type = GIMP_PDB_INT32ARRAY;
values[2].data.d_int32array[values[1].data.d_int32++] =
theClientData->image_id;
/* Display the image */
LogMessage("Displaying image %d\n", theClientData->image_id);
gimp_display_new (theClientData->image_id);
@ -1124,7 +1124,7 @@ endTransferCallback(int completionState, int pendingCount, void *clientData)
LogMessage("Deleting image\n");
gimp_image_delete(theClientData->image_id);
}
/* Shut down if we have received all of the possible images */
return (values[1].data.d_int32 < MAX_IMAGES);
}
@ -1151,7 +1151,7 @@ postTransferCallback(int pendingCount, void *clientData)
disableDS(twSession);
closeDS(twSession);
closeDSM(twSession);
/* Post a message to close up the application */
PostQuitMessage(0);
}

View File

@ -143,7 +143,7 @@ GimpPlugInInfo PLUG_IN_INFO =
query, /* query_proc */
run, /* run_proc */
};
/* We create a DIB section to hold the grabbed area. The scanlines in
* DIB sections are aligned ona LONG (four byte) boundary. Its pixel
* data is in RGB (BGR actually) format, three bytes per pixel.
@ -354,7 +354,7 @@ doCapture(HWND selectedHwnd)
/******************************************************************
* Win32 entry point and setup...
******************************************************************/
#define DINV 3
/*
@ -584,7 +584,7 @@ dialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
hDC = BeginPaint(hwndDlg, &ps);
DrawIconEx(hDC, bitmapRect.left, bitmapRect.top, selectCursor,
0, 0, 0, NULL, DI_NORMAL);
EndPaint(hwndDlg, &ps);
EndPaint(hwndDlg, &ps);
}
}
break;
@ -637,7 +637,7 @@ WinMain(HINSTANCE hInstance,
*/
return gimp_main(&PLUG_IN_INFO, __argc, __argv);
}
/*
* InitApplication
*
@ -648,7 +648,7 @@ InitApplication(HINSTANCE hInstance)
{
WNDCLASS wc;
BOOL retValue;
/* Get some resources */
#ifdef _MSC_VER
/* For some reason this works only with MSVC */
@ -672,20 +672,20 @@ InitApplication(HINSTANCE hInstance)
wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
wc.lpszClassName = APP_NAME;
wc.lpszMenuName = NULL;
/* Register the window class and stash success/failure code. */
retValue = RegisterClass(&wc);
/* Log error */
if (!retValue) {
formatWindowsError(buffer);
g_error("Error registering class: %s", buffer);
return retValue;
}
return retValue;
}
/*
* InitInstance
*
@ -698,17 +698,17 @@ InitInstance(HINSTANCE hInstance, int nCmdShow)
mainHwnd = CreateWindow(APP_NAME, APP_NAME, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
NULL, NULL, hInstance, NULL);
if (!mainHwnd) {
return (FALSE);
}
ShowWindow(mainHwnd, nCmdShow);
UpdateWindow(mainHwnd);
return TRUE;
}
/*
* winsnapWinMain
*
@ -726,11 +726,11 @@ winsnapWinMain(void)
/* Perform instance initialization */
if (!InitApplication(hInst))
return (FALSE);
/* Perform application initialization */
if (!InitInstance(hInst, SHOW_WINDOW))
return (FALSE);
/* Main message loop */
while (GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
@ -739,7 +739,7 @@ winsnapWinMain(void)
return (msg.wParam);
}
/*
* WndProc
*
@ -751,12 +751,12 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
HWND selectedHwnd;
switch (message) {
case WM_CREATE:
/* The window is created... Send the capture message */
PostMessage(hwnd, WM_DOCAPTURE, 0, 0);
break;
case WM_DOCAPTURE:
/* Get the selected window handle */
selectedHwnd = (HWND) DialogBox(hInst, MAKEINTRESOURCE(IDD_SELECT),
@ -806,7 +806,7 @@ doWindowCapture(void)
*/
winsnapWinMain();
}
/******************************************************************
* Snapshot configuration dialog
******************************************************************/
@ -834,7 +834,7 @@ snap_grab_callback(GtkWidget *widget,
gpointer data)
{
winsnapintf.run = TRUE;
winsnapvals.delay =
winsnapvals.delay =
gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (winsnapintf.delay_spinner));
gtk_widget_destroy(GTK_WIDGET (data));
}
@ -1014,7 +1014,7 @@ snap_dialog(void)
label = gtk_label_new (_("after"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
adj = (GtkAdjustment *) gtk_adjustment_new ((gfloat)delay, 0.0, 100.0, 1.0, 5.0, 0.0);
winsnapintf.delay_spinner = gtk_spin_button_new (adj, 0, 0);
gtk_box_pack_start (GTK_BOX(hbox), winsnapintf.delay_spinner, FALSE, FALSE, 0);
@ -1041,7 +1041,7 @@ snap_dialog(void)
/******************************************************************
* GIMP Plug-in entry points
******************************************************************/
/*
* Plug-in Parameter definitions
*/
@ -1054,7 +1054,7 @@ snap_dialog(void)
#define NUMBER_OUT_ARGS 1
#define OUT_ARGS { GIMP_PDB_IMAGE, "image", "Output image" }
/*
* query
*
@ -1074,7 +1074,7 @@ query(void)
PLUG_IN_AUTHOR,
PLUG_IN_COPYRIGHT,
PLUG_IN_VERSION,
N_("<Toolbox>/File/Acquire/Screen Shot..."),
N_("<Toolbox>/File/Acquire/_Screen Shot..."),
NULL,
GIMP_PLUGIN,
NUMBER_IN_ARGS,
@ -1082,7 +1082,7 @@ query(void)
args,
return_vals);
}
/* Return values storage */
static GimpParam values[2];
@ -1114,11 +1114,11 @@ run (const gchar *name,
run_mode = param[0].data.d_int32;
INIT_I18N ();
/* Set up the rest of the return parameters */
values[1].type = GIMP_PDB_INT32;
values[1].data.d_int32 = 0;
/* Get the data from last run */
gimp_get_data(PLUG_IN_NAME, &winsnapvals);
@ -1129,17 +1129,17 @@ run (const gchar *name,
if (!snap_dialog())
return;
break;
case GIMP_RUN_NONINTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
if (!winsnapvals.root)
values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
break;
default:
break;
} /* switch */
/* Do the actual window capture */
if (winsnapvals.root)
doRootWindowCapture();
@ -1157,7 +1157,7 @@ run (const gchar *name,
/* Store variable states for next run */
gimp_set_data(PLUG_IN_NAME, &winsnapvals, sizeof(WinSnapValues));
}
/* Set return values */
*nreturn_vals = 2;
} else {
@ -1222,7 +1222,7 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect)
/* Check that we got the memory */
if (!capBytes) {
g_warning(_("No data captured"));
g_message (_("No data captured"));
return;
}
@ -1242,7 +1242,7 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect)
/* Get our drawable */
drawable = gimp_drawable_get(layer_id);
gimp_tile_cache_size(ROUND4(width) * gimp_tile_height() * 3);
/* Initialize a pixel region for writing to the image */
@ -1262,6 +1262,6 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect)
/* Finish up */
gimp_drawable_detach(drawable);
gimp_display_new (image_id);
return;
}

View File

@ -55,6 +55,7 @@
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -1269,7 +1270,8 @@ p_write_parasite(const gchar *dirname,
l_fp_pte = fopen(l_parasite_file, "wb");
if(l_fp_pte == NULL)
{
g_message (_("Can't open (write): %s"), l_parasite_file);
g_message (_("Could not open '%s' for writing: %s"),
l_parasite_file, g_strerror (errno));
g_free(l_parasite_file);
return -1;
}
@ -1678,11 +1680,11 @@ save_xjt_image (const gchar *filename,
case GIMP_GRAY:
break;
case GIMP_INDEXED:
g_message (_("xjt: cannot operate on indexed color images"));
g_message (_("Cannot operate on indexed color images."));
return -1;
break;
default:
g_message (_("xjt: cannot operate on unknown image types"));
g_message (_("Cannot operate on unknown image types."));
return -1;
break;
}
@ -1697,7 +1699,8 @@ save_xjt_image (const gchar *filename,
l_mode_dir = 0777;
if(mkdir(l_dirname, l_mode_dir) != 0)
{
g_message (_("Can't create working dir: %s"), l_dirname);
g_message (_("Could not create working folder '%s': %s"),
l_dirname, g_strerror (errno));
goto cleanup;
}
@ -1706,7 +1709,8 @@ save_xjt_image (const gchar *filename,
l_fp_prp = fopen(l_prop_file, "w");
if(l_fp_prp == NULL)
{
g_message (_("Can't open: %s"), l_prop_file);
g_message (_("Could not open '%s' for writing: %s"),
l_prop_file, g_strerror (errno));
goto cleanup;
}
@ -2527,14 +2531,16 @@ p_create_and_attach_parasite (gint32 gimp_obj_id,
if (0 != stat(l_parasite_file, &l_stat_buf))
{
/* stat error (file does not exist) */
g_message (_("Can't open (read): %s"), l_parasite_file);
g_message (_("Could not open '%s' for reading: %s"),
l_parasite_file, g_strerror (errno));
return(-1);
}
l_fp_pte = fopen(l_parasite_file, "rb");
if(l_fp_pte == NULL)
{
g_message (_("Can't open (read): %s"), l_parasite_file);
g_message (_("Could not open '%s' for reading: %s"),
l_parasite_file, g_strerror (errno));
return(-1);
}
@ -3188,12 +3194,12 @@ t_image_props * p_load_prop_file(const gchar *prop_filename)
l_file_buff = p_load_linefile(prop_filename, &l_filesize);
if(l_file_buff == NULL)
{
g_message(_("Error: Can't read XJT propertyfile %s"), prop_filename);
g_message(_("Error: Could not read XJT property file '%s'."), prop_filename);
goto cleanup;
}
if(l_filesize == 0)
{
g_message(_("Error: XJT propertyfile %s is empty"), prop_filename);
g_message(_("Error: XJT property file '%s' is empty."), prop_filename);
goto cleanup;
}
@ -3319,7 +3325,8 @@ load_xjt_image (const gchar *filename)
l_mode_dir = 0777;
if(mkdir(l_dirname, l_mode_dir) != 0)
{
g_message (_("Can't create working dir: %s"), l_dirname);
g_message (_("Could not create working folder '%s': %s"),
l_dirname, g_strerror (errno));
goto cleanup;
}