]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/font.cpp
PyCrust updates
[wxWidgets.git] / src / gtk / font.cpp
index a4e761d20cabac877ff64b24a237bdc293f28231..15909254a4a109c07bd90fcf085286ae773d4e2e 100644 (file)
@@ -146,21 +146,6 @@ wxFontRefData::~wxFontRefData()
     }
 }
 
-// ----------------------------------------------------------------------------
-// wxNativeFontInfo
-// ----------------------------------------------------------------------------
-
-bool wxNativeFontInfo::FromString(const wxString& s)
-{
-    xFontName = s;
-    return TRUE;
-}
-
-wxString wxNativeFontInfo::ToString() const
-{
-    return xFontName;
-}
-
 // ----------------------------------------------------------------------------
 // wxFont
 // ----------------------------------------------------------------------------
@@ -169,15 +154,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
 
 void wxFont::Init()
 {
-    if (wxTheFontList)
-        wxTheFontList->Append( this );
 }
 
 wxFont::wxFont(const wxNativeFontInfo& info)
 {
     Init();
 
-    Create(info.ToString());
+    Create(info.xFontName);
 }
 
 bool wxFont::Create(const wxNativeFontInfo& info)
@@ -318,8 +301,6 @@ void wxFont::Unshare()
 
 wxFont::~wxFont()
 {
-    if (wxTheFontList)
-        wxTheFontList->DeleteObject( this );
 }
 
 // ----------------------------------------------------------------------------
@@ -477,6 +458,12 @@ GdkFont *GtkGetDefaultGuiFont()
         }
         gtk_widget_destroy( widget );
     }
+    else
+    {
+        // already have it, but ref it once more before returning
+        gdk_font_ref(g_systemDefaultGuiFont);
+    }
+
     return g_systemDefaultGuiFont;
 }