diff options
author | Tor Lillqvist <tml@novell.com> | 2008-06-02 11:49:15 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2008-06-02 11:49:15 +0000 |
commit | ea93617af6dc9e45abf28a266811de4c9e6cbba6 (patch) | |
tree | 2e949699406e79af3729ff18b6e65219baa4dd81 | |
parent | a77327bf2451e76ac5ba8fbac0f083a9b924a236 (diff) | |
download | evolution-data-server-ea93617af6dc9e45abf28a266811de4c9e6cbba6.tar.gz |
Drop the Win9x code. The GTK+ stack hasn't supported Win9x for a while, so
2008-06-02 Tor Lillqvist <tml@novell.com>
* libedataserver/e-data-server-util.c (get_prefixes): Drop the
Win9x code. The GTK+ stack hasn't supported Win9x for a while,
so no point in attempting to do it here either.
svn path=/trunk/; revision=8896
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | libedataserver/e-data-server-util.c | 42 |
2 files changed, 19 insertions, 26 deletions
@@ -2,6 +2,9 @@ * libedataserver/e-data-server-util.c: Include <mbstring.h> on Windows. + (get_prefixes): Drop the Win9x code. The GTK+ stack hasn't + supported Win9x for a while, so no point in attempting to do it + here either. 2008-05-23 Ed Catmur <ed@catmur.co.uk> diff --git a/libedataserver/e-data-server-util.c b/libedataserver/e-data-server-util.c index 4d82ec190..0f099d1e7 100644 --- a/libedataserver/e-data-server-util.c +++ b/libedataserver/e-data-server-util.c @@ -528,32 +528,22 @@ get_prefixes (gpointer hmodule, *full_prefix = NULL; *cp_prefix = NULL; - if (G_WIN32_HAVE_WIDECHAR_API ()) { - /* NT-based Windows has wide char API */ - if (GetModuleFileNameW ((HMODULE) hmodule, wcbfr, G_N_ELEMENTS (wcbfr))) { - *full_prefix = g_utf16_to_utf8 (wcbfr, -1, - NULL, NULL, NULL); - if (GetShortPathNameW (wcbfr, wcbfr, G_N_ELEMENTS (wcbfr)) && - /* Short pathnames always contain only - * ASCII, I think, but just in case, be - * prepared. - */ - WideCharToMultiByte (CP_ACP, 0, wcbfr, -1, - cpbfr, G_N_ELEMENTS (cpbfr), - NULL, NULL)) - *cp_prefix = g_strdup (cpbfr); - else if (*full_prefix) - *cp_prefix = g_locale_from_utf8 (*full_prefix, -1, - NULL, NULL, NULL); - } - } else { - /* Win9x */ - if (GetModuleFileNameA ((HMODULE) hmodule, cpbfr, G_N_ELEMENTS (cpbfr))) { - *full_prefix = g_locale_to_utf8 (cpbfr, -1, - NULL, NULL, NULL); - *cp_prefix = g_strdup (cpbfr); - } - } + if (GetModuleFileNameW ((HMODULE) hmodule, wcbfr, G_N_ELEMENTS (wcbfr))) { + *full_prefix = g_utf16_to_utf8 (wcbfr, -1, + NULL, NULL, NULL); + if (GetShortPathNameW (wcbfr, wcbfr, G_N_ELEMENTS (wcbfr)) && + /* Short pathnames always contain only + * ASCII, I think, but just in case, be + * prepared. + */ + WideCharToMultiByte (CP_ACP, 0, wcbfr, -1, + cpbfr, G_N_ELEMENTS (cpbfr), + NULL, NULL)) + *cp_prefix = g_strdup (cpbfr); + else if (*full_prefix) + *cp_prefix = g_locale_from_utf8 (*full_prefix, -1, + NULL, NULL, NULL); + } if (*full_prefix != NULL) { gchar *p = strrchr (*full_prefix, '\\'); |