X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dda88f5eee7ae13a328f92996847f90caed2e5e9..4aaef122cbbd5bbe0e70b824e320458e2329dd13:/src/gtk/font.cpp diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index a4e761d20c..15909254a4 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -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; }