From 4a32c38f678ab4ca84978e142f77c5cd7cd756d3 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 30 Sep 2002 16:57:17 +0000 Subject: [PATCH] Enable wxMatchWild() for Unicode (under GTK) / git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filefn.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 935fa8608c..7e8784b5a0 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1679,11 +1679,21 @@ bool wxIsWild( const wxString& pattern ) } } return FALSE; -}; +} + +#if wxUSE_UNICODE && defined(__WXGTK20__) +#include +#endif bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) -#ifdef HAVE_FNMATCH +#if wxUSE_UNICODE && defined(__WXGTK20__) +{ + // treat dot_special somehow + return g_pattern_match_simple( wxConvUTF8.cWX2MB( pat ), wxConvUTF8.cWX2MB( text ) ); +} + +#elif defined(HAVE_FNMATCH) { // this probably won't work well for multibyte chars in Unicode mode? if(dot_special)