]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/font.cpp
allow changing the page from keyboard in property sheet like controls even when the...
[wxWidgets.git] / src / x11 / font.cpp
index c1e764679674a4dbb586716df66d561b1d419cde..9cbc28fa1e940031c0757a1f9638e3ead3785810 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/string.h"
+    #include "wx/utils.h"       // for wxGetDisplay()
+    #include "wx/settings.h"
+    #include "wx/gdicmn.h"
 #endif
 
-#include "wx/gdicmn.h"
-#include "wx/utils.h"       // for wxGetDisplay()
 #include "wx/fontutil.h"    // for wxNativeFontInfo
 #include "wx/tokenzr.h"
-#include "wx/settings.h"
 
 #include "wx/x11/private.h"
 
@@ -121,7 +121,7 @@ public:
     void SetStyle(int style);
     void SetWeight(int weight);
     void SetUnderlined(bool underlined);
-    void SetFaceName(const wxString& facename);
+    bool SetFaceName(const wxString& facename);
     void SetEncoding(wxFontEncoding encoding);
 
     void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
@@ -503,9 +503,10 @@ void wxFontRefData::SetUnderlined(bool underlined)
     // the XLFD doesn't have "underlined" field anyhow
 }
 
-void wxFontRefData::SetFaceName(const wxString& facename)
+bool wxFontRefData::SetFaceName(const wxString& facename)
 {
     m_faceName = facename;
+    return true;
 }
 
 void wxFontRefData::SetEncoding(wxFontEncoding encoding)
@@ -816,11 +817,12 @@ void wxFont::SetWeight(int weight)
     M_FONTDATA->SetWeight(weight);
 }
 
-void wxFont::SetFaceName(const wxString& faceName)
+bool wxFont::SetFaceName(const wxString& faceName)
 {
     Unshare();
 
-    M_FONTDATA->SetFaceName(faceName);
+    return M_FONTDATA->SetFaceName(faceName) &&
+        wxFontBase::SetFaceName(faceName);
 }
 
 void wxFont::SetUnderlined(bool underlined)