Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13764/src/gui
Modified Files:
wxOptionsDlg.cpp wxBrowseButton.cpp
Log Message:
don't mangle the font description (this broke settings fonts in GTK2 version)
Index: wxOptionsDlg.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxOptionsDlg.cpp,v
retrieving revision 1.430
retrieving revision 1.431
diff -b -u -2 -r1.430 -r1.431
--- wxOptionsDlg.cpp 31 Jul 2006 00:38:47 -0000 1.430
+++ wxOptionsDlg.cpp 31 Aug 2006 23:18:28 -0000 1.431
@@ -2819,7 +2819,4 @@
case Field_Font:
- strValue = wxFontBrowseButton::FontDescToUser(strValue);
- // fall through
-
case Field_Dir:
case Field_File:
@@ -2988,6 +2985,4 @@
if ( fieldType == Field_Passwd )
strValue = strutil_encrypt(strValue);
- else if ( fieldType == Field_Font )
- strValue = wxFontBrowseButton::FontDescFromUser(strValue);
else if ( fieldType == Field_Number ) {
wxASSERT( m_aDefaults[n].IsNumeric() );
Index: wxBrowseButton.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxBrowseButton.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -b -u -2 -r1.43 -r1.44
--- wxBrowseButton.cpp 9 Apr 2006 20:36:54 -0000 1.43
+++ wxBrowseButton.cpp 31 Aug 2006 23:18:28 -0000 1.44
@@ -385,33 +385,4 @@
}
-// FIXME: these methods rely on internals of wxNativeFontInfo because they
-// know that it prepends the format version number (currently 0) to
-// the real font desc string - they shouldn't but we should add methods
-// to wxNativeFontInfo to do this conversion instead!
-
-String wxFontBrowseButton::FontDescToUser(const String& desc)
-{
- String user = desc;
- if ( user.length() > 2 && user[0u] == '0' && user[1u] == ';' )
- {
- user.erase(0, 2);
- }
-
- return user;
-}
-
-String wxFontBrowseButton::FontDescFromUser(const String& user)
-{
- String desc;
- if ( !user.empty() )
- {
- desc = _T("0;");
- }
-
- desc += user;
-
- return desc;
-}
-
void wxFontBrowseButton::DoBrowse()
{
@@ -421,5 +392,5 @@
if ( !desc.empty() )
{
- if ( fontInfo.FromString(FontDescFromUser(desc)) )
+ if ( fontInfo.FromString(desc) )
{
font.SetNativeFontInfo(fontInfo);
@@ -435,5 +406,5 @@
font = dialog.GetFontData().GetChosenFont();
- SetText(FontDescToUser(font.GetNativeFontInfoDesc()));
+ SetText(font.GetNativeFontInfoDesc());
}
}
-------------------------------------------------------------------------
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