From ffb8606928b19cd56c6b31139012975f2dbd65c1 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 6 Mar 2003 01:09:39 +0000 Subject: [PATCH] Fix hacks needed in the dimm.h check. 2003-03-06 Tor Lillqvist * configure.in: Fix hacks needed in the dimm.h check. * gtk/gtkfilesel.c (gtk_file_selection_set_filename): UTF-8 fix. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ configure.in | 7 +++++-- gtk/gtkfilesel.c | 11 ++++++----- 7 files changed, 41 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35d0634251..331d796859 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-03-06 Tor Lillqvist + + * configure.in: Fix hacks needed in the dimm.h check. + + * gtk/gtkfilesel.c (gtk_file_selection_set_filename): UTF-8 fix. + 2003-02-09 Tor Lillqvist * gtk/gtkfilesel.c (win32_gtk_add_drives_to_dir_list): Clean up. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 35d0634251..331d796859 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2003-03-06 Tor Lillqvist + + * configure.in: Fix hacks needed in the dimm.h check. + + * gtk/gtkfilesel.c (gtk_file_selection_set_filename): UTF-8 fix. + 2003-02-09 Tor Lillqvist * gtk/gtkfilesel.c (win32_gtk_add_drives_to_dir_list): Clean up. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 35d0634251..331d796859 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2003-03-06 Tor Lillqvist + + * configure.in: Fix hacks needed in the dimm.h check. + + * gtk/gtkfilesel.c (gtk_file_selection_set_filename): UTF-8 fix. + 2003-02-09 Tor Lillqvist * gtk/gtkfilesel.c (win32_gtk_add_drives_to_dir_list): Clean up. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 35d0634251..331d796859 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2003-03-06 Tor Lillqvist + + * configure.in: Fix hacks needed in the dimm.h check. + + * gtk/gtkfilesel.c (gtk_file_selection_set_filename): UTF-8 fix. + 2003-02-09 Tor Lillqvist * gtk/gtkfilesel.c (win32_gtk_add_drives_to_dir_list): Clean up. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 35d0634251..331d796859 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2003-03-06 Tor Lillqvist + + * configure.in: Fix hacks needed in the dimm.h check. + + * gtk/gtkfilesel.c (gtk_file_selection_set_filename): UTF-8 fix. + 2003-02-09 Tor Lillqvist * gtk/gtkfilesel.c (win32_gtk_add_drives_to_dir_list): Clean up. diff --git a/configure.in b/configure.in index a61de8146a..266025da0a 100644 --- a/configure.in +++ b/configure.in @@ -319,13 +319,16 @@ if test "${with_ie55+set}" = set && test $with_ie55 != no; then AC_MSG_CHECKING([for dimm.h]) saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -idirafter $with_ie55/Include" - AC_TRY_COMPILE([#include -#include + AC_TRY_COMPILE([ #ifdef __GNUC__ /* The w32api imm.h clashes a bit with the IE5.5 dimm.h */ #define IMEMENUITEMINFOA hidden_IMEMENUITEMINFOA #define IMEMENUITEMINFOW hidden_IMEMENUITEMINFOW +#endif +#include +#include #include +#ifdef __GNUC__ #undef IMEMENUITEMINFOA #undef IMEMENUITEMINFOW #endif diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index d780207daf..e2789f3103 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -718,8 +718,8 @@ void gtk_file_selection_set_filename (GtkFileSelection *filesel, const gchar *filename) { - gchar *buf, *utf8_buf; - const char *name, *last_slash; + gchar *buf, *utf8_buf, *utf8_name; + const char *last_slash; g_return_if_fail (filesel != NULL); g_return_if_fail (GTK_IS_FILE_SELECTION (filesel)); @@ -734,22 +734,23 @@ gtk_file_selection_set_filename (GtkFileSelection *filesel, if (!last_slash) { buf = g_strdup (""); - name = filename; + utf8_name = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); } else { buf = g_strdup (filename); buf[last_slash - filename + 1] = 0; - name = last_slash + 1; + utf8_name = g_filename_to_utf8 (last_slash + 1, -1, NULL, NULL, NULL); } utf8_buf = g_filename_to_utf8 (buf, -1, NULL, NULL, NULL); gtk_file_selection_populate (filesel, utf8_buf, FALSE); if (filesel->selection_entry) - gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), name); + gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), utf8_name); g_free (buf); g_free (utf8_buf); + g_free (utf8_name); } gchar*