plug-ins/common/mail.c use more already translated standard file error

2004-01-20  Michael Natterer  <mitch@gimp.org>

	* plug-ins/common/mail.c
	* plug-ins/common/mng.c: use more already translated standard file
	error messages. Some cleanup.
This commit is contained in:
Michael Natterer 2004-01-20 11:24:14 +00:00 committed by Michael Natterer
parent 2bd7a44a4e
commit 8096cef139
6 changed files with 32 additions and 27 deletions

View file

@ -1,3 +1,9 @@
2004-01-20 Michael Natterer <mitch@gimp.org>
* plug-ins/common/mail.c
* plug-ins/common/mng.c: use more already translated standard file
error messages. Some cleanup.
2004-01-20 Michael Natterer <mitch@gimp.org>
* app/gui/file-open-menu.c

View file

@ -376,7 +376,7 @@ save_image (const gchar *filename,
|| !WIFEXITED (process_status)
|| (WEXITSTATUS (process_status) != 0))
{
g_message ("mail didnt work or something on file\n'%s'",
g_message ("mail didnt work or something on file '%s'",
gimp_filename_to_utf8 (tmpname));
g_free (tmpname);
return GIMP_PDB_EXECUTION_ERROR;

View file

@ -44,6 +44,7 @@
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -498,17 +499,12 @@ mng_save_image (const gchar *filename,
break;
}
if ((userdata = g_new0 (struct mnglib_userdata_t, 1)) == NULL)
{
g_warning
("Unable to allocate a user data buffer in mng_save_image()");
return 0;
}
userdata = g_new0 (struct mnglib_userdata_t, 1);
if ((userdata->fp = fopen (filename, "wb")) == NULL)
{
g_warning ("Unable to open output file %s in mng_save_image()",
filename);
g_message (_("Could not open '%s' for writing: %s"),
gimp_filename_to_utf8 (filename), g_strerror (errno));
g_free (userdata);
return 0;
}
@ -839,8 +835,9 @@ mng_save_image (const gchar *filename,
if ((outfile = fopen (temp_file_name, "wb")) == NULL)
{
g_warning ("fopen() failed for '%s' in mng_save_image()",
temp_file_name);
g_message (_("Could not open '%s' for writing: %s"),
gimp_filename_to_utf8 (temp_file_name),
g_strerror (errno));
unlink (temp_file_name);
mng_cleanup (&handle);
fclose (userdata->fp);
@ -1007,7 +1004,9 @@ mng_save_image (const gchar *filename,
if ((infile = fopen (temp_file_name, "rb")) == NULL)
{
g_warning ("Unable to fopen(in) in mng_save_image()");
g_message (_("Could not open '%s' for reading: %s"),
gimp_filename_to_utf8 (temp_file_name),
g_strerror (errno));
unlink (temp_file_name);
mng_cleanup (&handle);
fclose (userdata->fp);

View file

@ -197,7 +197,7 @@ load_image (const gchar *filename,
|| !WIFEXITED (process_status)
|| (WEXITSTATUS (process_status) != 0))
{
g_message ("wget exited abnormally on URL %s", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -243,7 +243,7 @@ load_image (const gchar *filename,
/* The second line is the local copy of the file */
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -258,7 +258,7 @@ load_image (const gchar *filename,
read_connect:
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -282,7 +282,7 @@ read_connect:
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -303,7 +303,7 @@ read_connect:
/* The fifth line is either the length of the file or an error */
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;

View file

@ -197,7 +197,7 @@ load_image (const gchar *filename,
|| !WIFEXITED (process_status)
|| (WEXITSTATUS (process_status) != 0))
{
g_message ("wget exited abnormally on URL %s", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -243,7 +243,7 @@ load_image (const gchar *filename,
/* The second line is the local copy of the file */
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -258,7 +258,7 @@ load_image (const gchar *filename,
read_connect:
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -282,7 +282,7 @@ read_connect:
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -303,7 +303,7 @@ read_connect:
/* The fifth line is either the length of the file or an error */
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;

View file

@ -197,7 +197,7 @@ load_image (const gchar *filename,
|| !WIFEXITED (process_status)
|| (WEXITSTATUS (process_status) != 0))
{
g_message ("wget exited abnormally on URL %s", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -243,7 +243,7 @@ load_image (const gchar *filename,
/* The second line is the local copy of the file */
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -258,7 +258,7 @@ load_image (const gchar *filename,
read_connect:
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -282,7 +282,7 @@ read_connect:
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;
@ -303,7 +303,7 @@ read_connect:
/* The fifth line is either the length of the file or an error */
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("wget exited abnormally on URL\n'%s'", filename);
g_message ("wget exited abnormally on URL '%s'", filename);
g_free (tmpname);
*status = GIMP_PDB_EXECUTION_ERROR;
return -1;