]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix wxWidgets for GTK+-2.0 without Unicode problem with non-ASCII filenames.
authorNicolas Boichat <nicolas@boichat.ch>
Tue, 7 Jun 2005 20:17:58 +0000 (20:17 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Tue, 7 Jun 2005 20:17:58 +0000 (20:17 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2114 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/wx-console/wxbmainframe.cpp
bacula/src/wx-console/wxbutils.cpp

index 23c823654aef76cc6e658bb88bbb7a8378c19b3b..c7832330b19a450e1c35dec57877622c51a60c23 100644 (file)
@@ -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:"));
index 11139b5ae8e736bf12d617641ed8238ce7d31e75..9a7014d9e454d945d2bab79b8b030d03640fe7c8 100644 (file)
@@ -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++) {