X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/09fcd88955f6460d1f0d3d506118ce52c1090621..4aaef122cbbd5bbe0e70b824e320458e2329dd13:/src/gtk1/font.cpp diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index 22c761e6fc..15909254a4 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -146,37 +146,6 @@ wxFontRefData::~wxFontRefData() } } -// ---------------------------------------------------------------------------- -// wxNativeFontInfo -// ---------------------------------------------------------------------------- - -bool wxNativeFontInfo::FromString(const wxString& s) -{ - wxStringTokenizer tokenizer(s, _T(";")); - - wxString token = tokenizer.GetNextToken(); - // - // Ignore the version for now - // - - xFontName = tokenizer.GetNextToken(); - if(!xFontName) - return FALSE; - - return TRUE; -} - -wxString wxNativeFontInfo::ToString() const -{ - wxString s; - - s.Printf("%d;%s", - 0, // version - xFontName.c_str()); - - return s; -} - // ---------------------------------------------------------------------------- // wxFont // ---------------------------------------------------------------------------- @@ -185,8 +154,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) void wxFont::Init() { - if (wxTheFontList) - wxTheFontList->Append( this ); } wxFont::wxFont(const wxNativeFontInfo& info) @@ -334,8 +301,6 @@ void wxFont::Unshare() wxFont::~wxFont() { - if (wxTheFontList) - wxTheFontList->DeleteObject( this ); } // ---------------------------------------------------------------------------- @@ -493,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; }