Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3948/src/classes
Modified Files:
MessageView.cpp
Log Message:
better/more general fix for the font-overriding problem:
1. added new CreateFontFromDesc() function (and put it new wxMGuiUtils.cpp
together with EnsureAvailableTextEncoding() which used to be in
wxMApp.cpp)
2. default font family and size are now wxDEFAULT/-1
3. use CreateFontFromDesc() from message view, composer and folder view
and don't use the returned font if it's invalid
Index: MessageView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MessageView.cpp,v
retrieving revision 1.173
retrieving revision 1.174
diff -b -u -2 -r1.173 -r1.174
--- MessageView.cpp 24 Jul 2006 14:13:41 -0000 1.173
+++ MessageView.cpp 19 Aug 2006 13:11:59 -0000 1.174
@@ -506,33 +506,15 @@
wxFont MessageView::AllProfileValues::GetFont(wxFontEncoding encoding) const
{
- wxFont font;
-
- if ( !fontDesc.empty() )
- {
- wxNativeFontInfo fontInfo;
- if ( fontInfo.FromString(fontDesc) )
- {
- font.SetNativeFontInfo(fontInfo);
+ wxFont font(CreateFontFromDesc(fontDesc, fontSize, fontFamily));
// assume that iso8859-1 text can be shown in any encoding - it's
// true for all normal fonts
- if ( font.Ok() &&
- (encoding != wxFONTENCODING_DEFAULT) &&
- (encoding != wxFONTENCODING_ISO8859_1) )
+ if ( encoding != wxFONTENCODING_DEFAULT &&
+ encoding != wxFONTENCODING_ISO8859_1 )
{
- font.SetEncoding(encoding);
- }
- }
- }
-
if ( !font.Ok() )
- {
- font = wxFont(fontSize,
- fontFamily,
- wxFONTSTYLE_NORMAL,
- wxFONTWEIGHT_NORMAL,
- FALSE, // not underlined
- wxEmptyString, // no specific face name
- encoding);
+ font = *wxNORMAL_FONT;
+
+ font.SetEncoding(encoding);
}
-------------------------------------------------------------------------
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