Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv21757/src/gui
Modified Files:
wxMessageView.cpp
Log Message:
don't put static functions in headers
Index: wxMessageView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMessageView.cpp,v
retrieving revision 1.275
retrieving revision 1.276
diff -b -u -2 -r1.275 -r1.276
--- wxMessageView.cpp 19 Dec 2001 20:56:07 -0000 1.275
+++ wxMessageView.cpp 16 Apr 2002 13:44:28 -0000 1.276
@@ -539,4 +539,8 @@
}
+// ----------------------------------------------------------------------------
+// global functions implemented here
+// ----------------------------------------------------------------------------
+
extern MessageView *ShowMessageViewFrame(wxWindow *parent,
ASMailFolder *asmf,
@@ -548,2 +552,34 @@
}
+// convert a string in UTF-8 into the string in the current encoding: of
+// course, this doesn't work in general as Unicode is not representable as an 8
+// bit charset but it works in some common cases and is better than no UTF-8
+// support at all
+//
+// FIXME this won't be needed when full Unicode support is available
+extern wxFontEncoding ConvertUnicodeToSystem(wxString *strUtf)
+{
+ CHECK( strUtf, wxFONTENCODING_SYSTEM,
+ "NULL string in ConvertUnicodeToSystem" );
+
+ if ( !strUtf->empty() )
+ {
+ wxString str(strUtf->wc_str(wxConvUTF8), wxConvLocal);
+ if ( str.empty() )
+ {
+ // conversion failed - use original text (and display incorrectly,
+ // unfortunately)
+ wxLogDebug("conversion from UTF-8 to default encoding failed");
+ }
+ else
+ {
+ *strUtf = str;
+ }
+ }
+
+#if wxUSE_INTL
+ return wxLocale::GetSystemEncoding();
+#else // !wxUSE_INTL
+ return wxFONTENCODING_ISO8859_1;
+#endif // wxUSE_INTL/!wxUSE_INTL
+}
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates