]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/button.cpp
fixed Clear() for GTK+ 2.4+
[wxWidgets.git] / src / gtk / button.cpp
index 5a05a8db2e8aea7d0a12bec96932366461b2d7c7..e7d67d6e925ae65cb96c5127fc9ae626487e2a6c 100644 (file)
 
 class wxButton;
 
-//-----------------------------------------------------------------------------
-// idle system
-//-----------------------------------------------------------------------------
-
-extern void wxapp_install_idle_handler();
-extern bool g_isIdle;
-
 //-----------------------------------------------------------------------------
 // data
 //-----------------------------------------------------------------------------
@@ -86,10 +79,11 @@ gtk_button_style_set_callback( GtkWidget *m_widget, GtkStyle *WXUNUSED(style), w
             bottom_border += default_border->bottom;
             g_free( default_border );
         }
-        win->DoMoveWindow( win->m_x-top_border,
-                           win->m_y-left_border,
-                           win->m_width+left_border+right_border,
-                           win->m_height+top_border+bottom_border );
+        win->MoveWindow(
+            win->m_x - top_border,
+            win->m_y - left_border,
+            win->m_width + left_border + right_border,
+            win->m_height + top_border + bottom_border);
     }
 
     return FALSE;
@@ -145,8 +139,8 @@ bool wxButton::Create(  wxWindow *parent, wxWindowID id, const wxString &label,
     else
 #endif
     {
-        if (GTK_IS_MISC(BUTTON_CHILD(m_widget)))
-            gtk_misc_set_alignment (GTK_MISC (BUTTON_CHILD (m_widget)),
+        if (GTK_IS_MISC(GTK_BIN(m_widget)->child))
+            gtk_misc_set_alignment(GTK_MISC(GTK_BIN(m_widget)->child),
                                 x_alignment, y_alignment);
     }
 
@@ -255,7 +249,7 @@ bool wxButton::Enable( bool enable )
     if ( !wxControl::Enable( enable ) )
         return FALSE;
 
-    gtk_widget_set_sensitive( BUTTON_CHILD(m_widget), enable );
+    gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
 
     return TRUE;
 }
@@ -268,7 +262,7 @@ bool wxButton::IsOwnGtkWindow( GdkWindow *window )
 void wxButton::DoApplyWidgetStyle(GtkRcStyle *style)
 {
     gtk_widget_modify_style(m_widget, style);
-    gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);
+    gtk_widget_modify_style(GTK_BIN(m_widget)->child, style);
 }
 
 wxSize wxButton::DoGetBestSize() const