Commit 59e86d02 authored by William Skaggs's avatar William Skaggs
Browse files

Bill Skaggs <weskaggs@primate.ucdavis.edu>

	* app/actions/documents-commands.c
	* app/actions/file-commands.c
	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-open-location-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c: replace % with space
	in file name before showing error message,
	fixes bug #162147.

	* app/core/gimp-gui.c
	* app/widgets/gimpmessagebox.c: be a bit more paranoid
	about validating utf8 for messages.
parent 1380e5ea
2004-12-24 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/actions/documents-commands.c
* app/actions/file-commands.c
* app/dialogs/file-open-dialog.c
* app/dialogs/file-open-location-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimptoolbox-dnd.c: replace % with space
in file name before showing error message,
fixes bug #162147.
* app/core/gimp-gui.c
* app/widgets/gimpmessagebox.c: be a bit more paranoid
about validating utf8 for messages.
2004-12-23 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* gimp/app/widgets/gimpsizebox.c: fix incorrect Update
......
......@@ -246,8 +246,11 @@ documents_open_image (GimpContext *context,
if (! gimage && status != GIMP_PDB_CANCEL)
{
gchar *filename;
gchar *p;
filename = file_utils_uri_to_utf8_filename (uri);
while ( (p = strchr (filename, '%')) )
*p = ' ';
g_message (_("Opening '%s' failed:\n\n%s"),
filename, error->message);
......
......@@ -156,9 +156,12 @@ file_last_opened_cmd_callback (GtkAction *action,
if (! gimage && status != GIMP_PDB_CANCEL)
{
gchar *filename;
gchar *p;
filename =
file_utils_uri_to_utf8_filename (GIMP_OBJECT (imagefile)->name);
while ( (p = strchr (filename, '%')) )
*p = ' ';
g_message (_("Opening '%s' failed:\n\n%s"),
filename, error->message);
......
......@@ -29,6 +29,8 @@
#include "gimpimage.h"
#include "gimpprogress.h"
#include "libgimpbase/gimputils.h"
#include "gimp-intl.h"
......@@ -142,15 +144,20 @@ gimp_message (Gimp *gimp,
const gchar *domain,
const gchar *message)
{
gchar *message2 = gimp_any_to_utf8 (message, -1,
"Cannot convert message to utf8.");
g_return_if_fail (GIMP_IS_GIMP (gimp));
if (! domain)
domain = _("GIMP");
if (! gimp->console_messages && gimp->gui.message)
gimp->gui.message (gimp, domain, message);
gimp->gui.message (gimp, domain, message2);
else
g_printerr ("%s: %s\n\n", domain, message);
g_printerr ("%s: %s\n\n", domain, message2);
g_free (message2);
}
void
......
......@@ -177,6 +177,7 @@ file_open_dialog_open_image (GtkWidget *open_dialog,
GimpImage *gimage;
GimpPDBStatusType status;
GError *error = NULL;
gchar *p;
gimage = file_open_with_proc_and_display (gimp,
gimp_get_user_context (gimp),
......@@ -194,6 +195,8 @@ file_open_dialog_open_image (GtkWidget *open_dialog,
else if (status != GIMP_PDB_CANCEL)
{
gchar *filename = file_utils_uri_to_utf8_filename (uri);
while ( (p = strchr (filename, '%')) )
*p = ' ';
g_message (_("Opening '%s' failed:\n\n%s"),
filename, error->message);
......@@ -245,6 +248,10 @@ file_open_dialog_open_layer (GtkWidget *open_dialog,
else if (status != GIMP_PDB_CANCEL)
{
gchar *filename = file_utils_uri_to_utf8_filename (uri);
gchar *p;
while ( (p = strchr (filename, '%')) )
*p = ' ';
g_message (_("Opening '%s' failed:\n\n%s"),
filename, error->message);
......
......@@ -189,6 +189,10 @@ file_open_location_response (GtkDialog *dialog,
if (image == NULL && status != GIMP_PDB_CANCEL)
{
gchar *filename = file_utils_uri_to_utf8_filename (uri);
gchar *p;
while ( (p = strchr (filename, '%')) )
*p = ' ';
g_message (_("Opening '%s' failed:\n\n%s"),
filename, error->message);
......
......@@ -18,6 +18,8 @@
#include "config.h"
#include <string.h>
#include <gtk/gtk.h>
#include "display-types.h"
......@@ -327,8 +329,12 @@ gimp_display_shell_drop_uri_list (GtkWidget *widget,
}
else if (status != GIMP_PDB_CANCEL)
{
gchar *p;
gchar *filename = file_utils_uri_to_utf8_filename (uri);
while ( (p = strchr (filename, '%')) )
*p = ' ';
g_message (_("Opening '%s' failed:\n\n%s"),
filename, error->message);
......
......@@ -21,6 +21,8 @@
#include "config.h"
#include <string.h>
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
......@@ -797,8 +799,12 @@ gimp_layer_tree_view_drop_uri_list (GimpContainerTreeView *view,
}
else if (status != GIMP_PDB_CANCEL)
{
gchar *p;
gchar *filename = file_utils_uri_to_utf8_filename (uri);
while ( (p = strchr (filename, '%')) )
*p = ' ';
g_message (_("Opening '%s' failed:\n\n%s"),
filename, error->message);
......
......@@ -24,6 +24,7 @@
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "libgimpbase/gimputils.h"
#include "widgets-types.h"
......@@ -355,7 +356,8 @@ gimp_message_box_set_label_text (GimpMessageBox *box,
if (format)
{
gchar *text = g_strdup_vprintf (format, args);
gchar *text = gimp_any_to_utf8 (g_strdup_vprintf (format, args), -1,
"Cannot convert text to utf8.");
gtk_label_set_text (GTK_LABEL (label), text);
gtk_widget_show (label);
......
......@@ -18,6 +18,8 @@
#include "config.h"
#include <string.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
......@@ -119,6 +121,10 @@ gimp_toolbox_drop_uri_list (GtkWidget *widget,
if (! gimage && status != GIMP_PDB_CANCEL)
{
gchar *filename = file_utils_uri_to_utf8_filename (uri);
gchar *p;
while ( (p = strchr (filename, '%')) )
*p = ' ';
g_message (_("Opening '%s' failed:\n\n%s"),
filename, error->message);
......
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