]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/font.cpp
removing dependancy on mac headers from public wx headers (eventually adding wx/mac...
[wxWidgets.git] / src / gtk1 / 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
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxFont
 // ----------------------------------------------------------------------------
@@ -169,15 +154,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
 
 void wxFont::Init()
 {
 
 void wxFont::Init()
 {
-    if (wxTheFontList)
-        wxTheFontList->Append( this );
 }
 
 wxFont::wxFont(const wxNativeFontInfo& info)
 {
     Init();
 
 }
 
 wxFont::wxFont(const wxNativeFontInfo& info)
 {
     Init();
 
-    Create(info.ToString());
+    Create(info.xFontName);
 }
 
 bool wxFont::Create(const wxNativeFontInfo& info)
 }
 
 bool wxFont::Create(const wxNativeFontInfo& info)
@@ -318,8 +301,6 @@ void wxFont::Unshare()
 
 wxFont::~wxFont()
 {
 
 wxFont::~wxFont()
 {
-    if (wxTheFontList)
-        wxTheFontList->DeleteObject( this );
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -477,6 +458,12 @@ GdkFont *GtkGetDefaultGuiFont()
         }
         gtk_widget_destroy( widget );
     }
         }
         gtk_widget_destroy( widget );
     }
+    else
+    {
+        // already have it, but ref it once more before returning
+        gdk_font_ref(g_systemDefaultGuiFont);
+    }
+
     return g_systemDefaultGuiFont;
 }
 
     return g_systemDefaultGuiFont;
 }