X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f9671150978a0bbb5d5b52f1442e3e3e3d023871..050c9e3c90c58b05d5b3f7384d1556ca9669f13e:/src/gtk/font.cpp diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index 1da01a2ed0..74864d1882 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -162,18 +162,18 @@ bool wxNativeFontInfo::FromString(const wxString& s) xFontName = tokenizer.GetNextToken(); if(!xFontName) return FALSE; - + return TRUE; } wxString wxNativeFontInfo::ToString() const { wxString s; - + s.Printf(_T("%d;%s"), 0, // version xFontName.c_str()); - + return s; } @@ -185,8 +185,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) void wxFont::Init() { - if (wxTheFontList) - wxTheFontList->Append( this ); } wxFont::wxFont(const wxNativeFontInfo& info) @@ -334,8 +332,6 @@ void wxFont::Unshare() wxFont::~wxFont() { - if (wxTheFontList) - wxTheFontList->DeleteObject( this ); } // ---------------------------------------------------------------------------- @@ -493,6 +489,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; }