]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/spinbutt.cpp
Don't always maximize top-level windows on Smartphone
[wxWidgets.git] / src / gtk / spinbutt.cpp
index a62d2c121e62f90a8f2dbb0dc9338421d3a54fb3..77416c0a63accfdbcb4d041b7a9166b030693a30 100644 (file)
@@ -21,9 +21,7 @@
 #if wxUSE_SPINBTN
 
 #include "wx/utils.h"
 #if wxUSE_SPINBTN
 
 #include "wx/utils.h"
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
@@ -45,6 +43,7 @@ static const float sensitivity = 0.02;
 // "value_changed"
 //-----------------------------------------------------------------------------
 
 // "value_changed"
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *win )
 {
     if (g_isIdle) wxapp_install_idle_handler();
 static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *win )
 {
     if (g_isIdle) wxapp_install_idle_handler();
@@ -100,6 +99,7 @@ static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *wi
         win->GetEventHandler()->ProcessEvent( event2 );
     }
 }
         win->GetEventHandler()->ProcessEvent( event2 );
     }
 }
+}
 
 //-----------------------------------------------------------------------------
 // wxSpinButton
 
 //-----------------------------------------------------------------------------
 // wxSpinButton
@@ -227,7 +227,9 @@ bool wxSpinButton::IsOwnGtkWindow( GdkWindow *window )
 
 wxSize wxSpinButton::DoGetBestSize() const
 {
 
 wxSize wxSpinButton::DoGetBestSize() const
 {
-    return wxSize(15, 26); // FIXME
+    wxSize best(15, 26); // FIXME
+    CacheBestSize(best);
+    return best;
 }
 
 // static
 }
 
 // static