]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/button.cpp
fix for non precomp
[wxWidgets.git] / src / gtk / button.cpp
index 2fd0db643d0f011e269b0a11c1d7769affc1b41f..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);
     }
 
@@ -155,11 +149,13 @@ bool wxButton::Create(  wxWindow *parent, wxWindowID id, const wxString &label,
     if (style & wxNO_BORDER)
        gtk_button_set_relief( GTK_BUTTON(m_widget), GTK_RELIEF_NONE );
 
-    gtk_signal_connect_after( GTK_OBJECT(m_widget), "clicked",
-      GTK_SIGNAL_FUNC(gtk_button_clicked_callback), (gpointer*)this );
+    g_signal_connect_after (m_widget, "clicked",
+                            G_CALLBACK (gtk_button_clicked_callback),
+                            this);
 
-    gtk_signal_connect_after( GTK_OBJECT(m_widget), "style_set",
-      GTK_SIGNAL_FUNC(gtk_button_style_set_callback), (gpointer*) this );
+    g_signal_connect_after (m_widget, "style_set",
+                            G_CALLBACK (gtk_button_style_set_callback),
+                            this);
 
     m_parent->DoAddChild( this );
 
@@ -253,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;
 }
@@ -266,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