Commit e7f921cb authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/dialogs/image-properties-dialog.c (image_comment_update) use

2006-11-03  Sven Neumann  <sven@gimp.org>

	* app/dialogs/image-properties-dialog.c (image_comment_update)
	* app/text/gimptext-parasite.c (gimp_text_from_gdyntext_parasite):
	use gimp_any_to_utf8() to deal with invalid UTF-8 strings.
parent 568bbb95
2006-11-03 Sven Neumann <sven@gimp.org>
* app/dialogs/image-properties-dialog.c (image_comment_update)
* app/text/gimptext-parasite.c (gimp_text_from_gdyntext_parasite):
use gimp_any_to_utf8() to deal with invalid UTF-8 strings.
2006-11-03 Sven Neumann <sven@gimp.org>
* app/widgets/gimpimageparasiteview.[ch]: made non-abstract.
......
......@@ -135,15 +135,15 @@ image_comment_update (GtkWidget *page,
gchar *text = g_strndup (gimp_parasite_data (parasite),
gimp_parasite_data_size (parasite));
if (g_utf8_validate (text, -1, NULL))
if (! g_utf8_validate (text, -1, NULL))
{
gtk_label_set_text (GTK_LABEL (label), text);
}
else
{
gtk_label_set_text (GTK_LABEL (label), _("(invalid UTF-8 string)"));
gchar *tmp = gimp_any_to_utf8 (text, -1, NULL);
g_free (text);
text = tmp;
}
gtk_label_set_text (GTK_LABEL (label), text);
g_free (text);
gtk_widget_show (page);
......
......@@ -36,8 +36,6 @@
#include "gimptext-parasite.h"
#include "gimptext-xlfd.h"
#include "gimp-intl.h"
/****************************************/
/* The native GimpTextLayer parasite. */
......@@ -155,16 +153,10 @@ gimp_text_from_gdyntext_parasite (const GimpParasite *parasite)
if (! g_utf8_validate (text, -1, NULL))
{
gchar *utf8_str;
utf8_str = g_locale_to_utf8 (text, -1, NULL, NULL, NULL);
gchar *tmp = gimp_any_to_utf8 (text, -1, NULL);
g_free (text);
if (utf8_str)
text = utf8_str;
else
text = g_strdup (_("(invalid UTF-8 string)"));
text = tmp;
}
antialias = atoi (params[ANTIALIAS]) ? TRUE : FALSE;
......
2006-11-03 Sven Neumann <sven@gimp.org>
* POTFILES.in: updated.
2006-11-02 Jakub Friedl <jfriedl@suse.cz>
* cs.po: Updated Czech translation.
......
......@@ -154,6 +154,7 @@ app/dialogs/convert-dialog.c
app/dialogs/desaturate-dialog.c
app/dialogs/dialogs-constructors.c
app/dialogs/dialogs.c
app/dialogs/fade-dialog.c
app/dialogs/file-open-dialog.c
app/dialogs/file-open-location-dialog.c
app/dialogs/file-save-dialog.c
......@@ -252,12 +253,12 @@ app/plug-in/gimppluginmanager.c
app/plug-in/gimppluginprocedure.c
app/plug-in/gimptemporaryprocedure.c
app/plug-in/plug-in-enums.c
app/plug-in/plug-in-icc-profile.c
app/plug-in/plug-in-rc.c
app/text/text-enums.c
app/text/gimpfont.c
app/text/gimptext-compat.c
app/text/gimptext-parasite.c
app/text/gimptextlayer.c
app/text/gimptextlayer-transform.c
app/text/gimptextlayer-xcf.c
......@@ -379,6 +380,7 @@ app/widgets/gimpgrideditor.c
app/widgets/gimphelp.c
app/widgets/gimphistogrameditor.c
app/widgets/gimpimagedock.c
app/widgets/gimpimageprofileview.c
app/widgets/gimpimagepropview.c
app/widgets/gimpitemtreeview.c
app/widgets/gimplayertreeview.c
......@@ -387,6 +389,7 @@ app/widgets/gimpmessagebox.c
app/widgets/gimppaletteeditor.c
app/widgets/gimppdbdialog.c
app/widgets/gimpprogressdialog.c
app/widgets/gimppropwidgets.c
app/widgets/gimpselectiondata.c
app/widgets/gimpselectioneditor.c
app/widgets/gimpsizebox.c
......
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