]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/fontpicker.cpp
fixed wxString::FromAscii signature
[wxWidgets.git] / src / gtk / fontpicker.cpp
index eda8022cc19a7c96f09b5f4854e5812a95a0c7af..6719a53aa9accd626b72bdd00fe4903a79104f2c 100644 (file)
@@ -60,9 +60,6 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id,
 {
     if (!gtk_check_version(2,4,0))
     {
-        m_needParent = true;
-        m_acceptsFocus = true;
-
         if (!PreCreation( parent, pos, size ) ||
             !wxControl::CreateBase(parent, id, pos, size, style, validator, name))
         {
@@ -73,7 +70,7 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id,
         m_widget = gtk_font_button_new();
 
         // set initial font
-        m_selectedFont = initial;
+        m_selectedFont = initial.IsOk() ? initial : *wxNORMAL_FONT;
         UpdateFont();
 
         // honour the fontbutton styles
@@ -85,7 +82,7 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id,
         gtk_font_button_set_use_size(GTK_FONT_BUTTON(m_widget), usefont);
         gtk_font_button_set_use_font(GTK_FONT_BUTTON(m_widget), usefont);
 
-        gtk_widget_show( GTK_WIDGET(m_widget) );
+        gtk_widget_show(m_widget);
 
         // GtkFontButton signals
         g_signal_connect(m_widget, "font-set",