]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/settings.cpp
Make this compile with gtk+ 1.3.1... not sure what the "casting"
[wxWidgets.git] / src / gtk1 / settings.cpp
index 4a491823fa31ccd8c1a23d1c755e8bd0f509425b..0adcfd51b32fcb15985767d3851a140d9abe095f 100644 (file)
@@ -21,6 +21,8 @@
 #include <gdk/gdkprivate.h>
 #include <gtk/gtk.h>
 
+extern GdkFont *GtkGetDefaultGuiFont();
+
 
 /*
 #define wxSYS_COLOUR_SCROLLBAR         0
@@ -233,19 +235,8 @@ wxFont wxSystemSettings::GetSystemFont( int index )
         {
             if (!g_systemFont)
             {
-                GdkFont *gdk_font = (GdkFont*) NULL;
-                GtkWidget *widget = gtk_button_new();
 #if 0
-                GtkStyle *def = gtk_rc_get_style( widget );
-                if (def)
-                    gdk_font =  def->font;
-                else
-                {
-                    def = gtk_widget_get_default_style();
-                    if (def)
-                        gdk_font =  def->font;
-                }
-#endif
+                GdkFont *gdk_font = GtkGetDefaultGuiFont();
                 if (gdk_font)
                 {
                     GSList *font_list = ((GdkFontPrivate*)gdk_font)->names;
@@ -254,12 +245,11 @@ wxFont wxSystemSettings::GetSystemFont( int index )
                     wxFontData font_data;
                     g_systemFont = new wxFont( font_string, font_data );
                 }
-                else
-                {
-                    g_systemFont = new wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL );
-                }
-                
                 gtk_widget_destroy( widget );
+#endif
+
+                g_systemFont = new wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL );
+                
             }
             return *g_systemFont;
         }