This should fix a link error in GTK 2.3.X and

it is the right thing to do anyway.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2004-03-16 21:30:06 +00:00
parent c0d0a5520e
commit 119cd34193
2 changed files with 22 additions and 6 deletions

View File

@ -313,9 +313,17 @@ wxFont wxSystemSettingsNative::GetFont( wxSystemFont index )
}
else
{
const gchar *font_name =
_gtk_rc_context_get_default_font_name(gtk_settings_get_default());
gs_objects.m_fontSystem = wxFont(wxString::FromAscii(font_name));
GtkSettings *settings = gtk_settings_get_default();
gchar *font_name = NULL;
g_object_get ( settings,
"gtk-font-name",
&font_name,
NULL);
if (!font_name)
gs_objects.m_fontSystem = wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL );
else
gs_objects.m_fontSystem = wxFont(wxString::FromAscii(font_name));
g_free (font_name);
}
gtk_widget_destroy( widget );
#else

View File

@ -313,9 +313,17 @@ wxFont wxSystemSettingsNative::GetFont( wxSystemFont index )
}
else
{
const gchar *font_name =
_gtk_rc_context_get_default_font_name(gtk_settings_get_default());
gs_objects.m_fontSystem = wxFont(wxString::FromAscii(font_name));
GtkSettings *settings = gtk_settings_get_default();
gchar *font_name = NULL;
g_object_get ( settings,
"gtk-font-name",
&font_name,
NULL);
if (!font_name)
gs_objects.m_fontSystem = wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL );
else
gs_objects.m_fontSystem = wxFont(wxString::FromAscii(font_name));
g_free (font_name);
}
gtk_widget_destroy( widget );
#else