Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5471/src/gui

Modified Files:
        wxTextDialog.cpp 
Log Message:
use latin1 encoding for the text control, otherwise non UTF-8 text doesn't 
appear at all in it under GTK+ 2

Index: wxTextDialog.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxTextDialog.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -b -u -2 -r1.12 -r1.13
--- wxTextDialog.cpp    23 Aug 2006 15:47:11 -0000      1.12
+++ wxTextDialog.cpp    24 Aug 2006 17:51:23 -0000      1.13
@@ -171,9 +171,17 @@
                            wxTE_NOHIDESEL |
                            wxTE_RICH2);
-   m_text->SetValue(text);
 
-   // use fixed-width font
+   // use fixed-width font and latin1 encoding in which all text is valid:
+   // without encoding information (which wouldn't make sense anyhow as we can
+   // have multiple parts using different encodings) we must do this to at
+   // least show something to the user while using the default UTF-8 encoding
+   // of GTK+ 2 could result in nothing being shown at all
    m_text->SetFont(wxFont(wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE,
-                          wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
+                          wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
+                          false /* not underlined */, wxEmptyString,
+                          wxFONTENCODING_ISO8859_1));
+
+   // now that the encoding is set, we can show the text
+   m_text->SetValue(text);
 
    // in TAB order we want "Save" to get focus before "Close", so create


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to