]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/settings.cpp
menu events handling more closely to the menu instance itself, removing menubar where...
[wxWidgets.git] / src / gtk / settings.cpp
index e2be4cd58c68bf07cf59f0058dfbf363a205cf31..d838381c999fa8e08cd886bc5c7e18e9ca812925 100644 (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