]> 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 658c74ab4e8d846ac4188c83d46a0e04bda29de7..0adcfd51b32fcb15985767d3851a140d9abe095f 100644 (file)
 #include "wx/settings.h"
 #include "wx/debug.h"
 
+#include "wx/cmndata.h"
+
 #include <gdk/gdk.h>
+#include <gdk/gdkprivate.h>
 #include <gtk/gtk.h>
 
+extern GdkFont *GtkGetDefaultGuiFont();
+
+
 /*
 #define wxSYS_COLOUR_SCROLLBAR         0
 #define wxSYS_COLOUR_BACKGROUND        1
@@ -228,7 +234,23 @@ wxFont wxSystemSettings::GetSystemFont( int index )
         case wxSYS_DEFAULT_GUI_FONT:
         {
             if (!g_systemFont)
+            {
+#if 0
+                GdkFont *gdk_font = GtkGetDefaultGuiFont();
+                if (gdk_font)
+                {
+                    GSList *font_list = ((GdkFontPrivate*)gdk_font)->names;
+                    char *name = (char*)font_list->data;
+                    wxString font_string( name );
+                    wxFontData font_data;
+                    g_systemFont = new wxFont( font_string, font_data );
+                }
+                gtk_widget_destroy( widget );
+#endif
+
                 g_systemFont = new wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL );
+                
+            }
             return *g_systemFont;
         }
     }