37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
$OpenBSD: patch-src_xtools_c,v 1.3 2004/01/12 05:37:11 jolan Exp $
|
|
--- src/xtools.c.orig 2003-10-30 07:06:17.000000000 -0600
|
|
+++ src/xtools.c 2004-01-11 22:35:32.000000000 -0600
|
|
@@ -3635,7 +3635,7 @@ gchar *convert_for_gtk2_textwidget(gchar
|
|
return str;
|
|
#else
|
|
gchar *locstr;
|
|
-gint in, out;
|
|
+gsize in, out;
|
|
|
|
locstr = g_locale_from_utf8(str, strlen(str), &in, &out, NULL);
|
|
if (locstr) {
|
|
@@ -3655,16 +3655,20 @@ gchar *convert_for_gtk2_filename(gchar *
|
|
return str;
|
|
#else
|
|
gchar *locstr;
|
|
-gint in, out;
|
|
+gsize in, out;
|
|
|
|
/* ok, if your filesystem is already UTF8 we are not
|
|
allowed to change the filenames here. */
|
|
if (c_locale_is_utf8)
|
|
return str;
|
|
|
|
- /* should be logical to use g_filename_from_utf8() here, but
|
|
- somehow this works not correctly on my testsystem */
|
|
+#ifdef BROKEN_GTK2_LOCALE
|
|
+ /* on my redhat 7.3 system it does only work that way, but
|
|
+ on other systems the correct way is in the #else branch */
|
|
locstr = g_locale_from_utf8(str, strlen(str), &in, &out, NULL);
|
|
+#else
|
|
+ locstr = g_filename_from_utf8(str, strlen(str), &in, &out, NULL);
|
|
+#endif
|
|
if (locstr) {
|
|
strncpy(str, locstr, MAXLINE);
|
|
}
|