From: Nicolas Boichat Date: Tue, 7 Jun 2005 20:17:58 +0000 (+0000) Subject: Fix wxWidgets for GTK+-2.0 without Unicode problem with non-ASCII filenames. X-Git-Tag: Release-1.38.0~386 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2be32f2beeb416726cbb95b1c52dfa743cf13ba2;p=bacula%2Fbacula Fix wxWidgets for GTK+-2.0 without Unicode problem with non-ASCII filenames. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2114 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/wx-console/wxbmainframe.cpp b/bacula/src/wx-console/wxbmainframe.cpp index 23c823654a..c7832330b1 100644 --- a/bacula/src/wx-console/wxbmainframe.cpp +++ b/bacula/src/wx-console/wxbmainframe.cpp @@ -264,9 +264,12 @@ wxbMainFrame::wxbMainFrame(const wxString& title, const wxPoint& pos, const wxSi #if defined __WXGTK12__ && !defined __WXGTK20__ // Fix for "chinese" fonts under gtk+ 1.2 font.SetDefaultEncoding(wxFONTENCODING_ISO8859_1); consoleCtrl->SetDefaultStyle(wxTextAttr(*wxBLACK, wxNullColour, font)); - Print("Warning : Unicode is disabled because you are using wxWidgets for GTK+ 1.2.\n", CS_DEBUG); -#else + Print(wxT("Warning : Unicode is disabled because you are using wxWidgets for GTK+ 1.2.\n"), CS_DEBUG); +#else consoleCtrl->SetDefaultStyle(wxTextAttr(*wxBLACK, wxNullColour, font)); +#if (wxUSE_UNICODE == 0) && __WXGTK20__ + Print(wxT("Warning : There is a problem with wxWidgets for GTK+ 2.0 without Unicode support when handling non-ASCII filenames: Every non-ASCII character in such filenames will be replaced by an interrogation mark.\nIf this behaviour disturbs you, please build wx-console against a Unicode version of wxWidgets for GTK+ 2.0.\n---\n"), CS_DEBUG); +#endif #endif helpCtrl = new wxStaticText(consolePanel, -1, wxT("Type your command below:")); diff --git a/bacula/src/wx-console/wxbutils.cpp b/bacula/src/wx-console/wxbutils.cpp index 11139b5ae8..9a7014d9e4 100644 --- a/bacula/src/wx-console/wxbutils.cpp +++ b/bacula/src/wx-console/wxbutils.cpp @@ -39,7 +39,7 @@ bool wxbUtils::inited = false; wxString wxbUtils::ConvertToPrintable(wxString& str) { /* FIXME : Unicode support should be added to fix this problem */ -#if needed // wxUSE_UNICODE == 0 +#if (wxUSE_UNICODE == 0) && __WXGTK20__ wxString strnew(str); /* Convert the string to something printable without unicode */ for (unsigned int i = 0; i < strnew.Length(); i++) {