Commit 8096cef1 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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.
parent 2bd7a44a
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
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment