]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/clrpicker.cpp
fix MDI child sizing, which was working more or less by accident before I broke it...
[wxWidgets.git] / src / gtk / clrpicker.cpp
index 5ba0324488ddb7623a3cd7ad4a9c179b58a30429..9184ed70257df6e7589ee722434c3963cc583470 100644 (file)
@@ -37,7 +37,9 @@ static void gtk_clrbutton_setcolor_callback(GtkColorButton *widget,
 {
     // update the m_colour member of the wxColourButton
     wxASSERT(p);
 {
     // update the m_colour member of the wxColourButton
     wxASSERT(p);
-    gtk_color_button_get_color(widget, p->GetGdkColor());
+    GdkColor gdkColor;
+    gtk_color_button_get_color(widget, &gdkColor);
+    p->SetGdkColor(gdkColor);
 
     // fire the colour-changed event
     wxColourPickerEvent event(p, p->GetId(), p->GetColour());
 
     // fire the colour-changed event
     wxColourPickerEvent event(p, p->GetId(), p->GetColour());
@@ -59,8 +61,6 @@ bool wxColourButton::Create( wxWindow *parent, wxWindowID id,
 {
     if (!gtk_check_version(2,4,0))
     {
 {
     if (!gtk_check_version(2,4,0))
     {
-        m_needParent = true;
-
         if (!PreCreation( parent, pos, size ) ||
             !wxControl::CreateBase(parent, id, pos, size, style, validator, name))
         {
         if (!PreCreation( parent, pos, size ) ||
             !wxControl::CreateBase(parent, id, pos, size, style, validator, name))
         {
@@ -70,7 +70,7 @@ bool wxColourButton::Create( wxWindow *parent, wxWindowID id,
 
         m_colour = col;
         m_widget = gtk_color_button_new_with_color( m_colour.GetColor() );
 
         m_colour = col;
         m_widget = gtk_color_button_new_with_color( m_colour.GetColor() );
-        gtk_widget_show( GTK_WIDGET(m_widget) );
+        gtk_widget_show(m_widget);
 
         // GtkColourButton signals
         g_signal_connect(m_widget, "color-set",
 
         // GtkColourButton signals
         g_signal_connect(m_widget, "color-set",
@@ -80,7 +80,7 @@ bool wxColourButton::Create( wxWindow *parent, wxWindowID id,
         m_parent->DoAddChild( this );
 
         PostCreation(size);
         m_parent->DoAddChild( this );
 
         PostCreation(size);
-        SetBestSize(size);
+        SetInitialSize(size);
     }
     else
         return wxGenericColourButton::Create(parent, id, col, pos, size,
     }
     else
         return wxGenericColourButton::Create(parent, id, col, pos, size,