Commit 43b95559 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

fixed signedness warnings.

2005-08-09  Sven Neumann  <sven@gimp.org>

	* app/config/gimpxmlparser.c: fixed signedness warnings.

	* plug-ins/imagemap/imap_browse.c (handle_drop): UTF-8 validate
	the dropped text before setting it on the entry.
parent 5481a2de
2005-08-09 Sven Neumann <sven@gimp.org>
* app/config/gimpxmlparser.c: fixed signedness warnings.
* plug-ins/imagemap/imap_browse.c (handle_drop): UTF-8 validate
the dropped text before setting it on the entry.
2005-08-08 Manish Singh <yosh@gimp.org>
* plug-ins/common/psd.c: Generate valid names for aux channels that
......
......@@ -157,7 +157,7 @@ gimp_xml_parser_parse_io_channel (GimpXmlParser *parser,
GError **error)
{
GIOStatus status;
guchar buffer[4096];
gchar buffer[4096];
gsize len = 0;
gsize bytes;
const gchar *io_encoding;
......@@ -259,12 +259,17 @@ gimp_xml_parser_parse_buffer (GimpXmlParser *parser,
if (g_ascii_strcasecmp (encoding, "UTF-8") &&
g_ascii_strcasecmp (encoding, "UTF8"))
{
conv = g_convert (buffer, len, "UTF-8", encoding, NULL, &len, error);
gsize written;
conv = g_convert (buffer, len,
"UTF-8", encoding, NULL, &written, error);
if (! conv)
{
g_free (encoding);
return FALSE;
}
len = written;
}
g_free (encoding);
......
......@@ -96,16 +96,17 @@ static void
handle_drop(GtkWidget *widget, GdkDragContext *context, gint x, gint y,
GtkSelectionData *data, guint info, guint time)
{
gboolean success;
gboolean success = FALSE;
if (data->length >= 0 && data->format == 8)
{
gtk_entry_set_text(GTK_ENTRY(widget), data->data);
success = TRUE;
}
else
{
success = FALSE;
const gchar *text = (const gchar *) data->data;
if (g_utf8_validate (text, -1, NULL))
{
gtk_entry_set_text (GTK_ENTRY (widget), text);
success = TRUE;
}
}
gtk_drag_finish(context, success, FALSE, time);
......
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