X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/385e8575dd1f9219fb0e3f7fa26ffe4c24d2fdbb..e9d7a889634ee5cbe90bcc639c6197a29169be3a:/src/gtk/spinctrl.cpp?ds=sidebyside diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index f35eca8445..e2c07c0b74 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -21,7 +21,9 @@ #include "wx/wxcrtvararg.h" #endif +#include #include "wx/gtk/private.h" +#include "wx/gtk/private/gtk2-compat.h" //----------------------------------------------------------------------------- // data @@ -195,7 +197,7 @@ bool wxSpinCtrlGTKBase::GetSnapToTicks() const { wxCHECK_MSG(m_widget, false, "invalid spin button"); - return gtk_spin_button_get_snap_to_ticks( GTK_SPIN_BUTTON(m_widget) ); + return gtk_spin_button_get_snap_to_ticks( GTK_SPIN_BUTTON(m_widget) ) != 0; } void wxSpinCtrlGTKBase::SetValue( const wxString& value ) @@ -325,10 +327,15 @@ void wxSpinCtrlGTKBase::OnChar( wxKeyEvent &event ) GdkWindow *wxSpinCtrlGTKBase::GTKGetWindow(wxArrayGdkWindows& windows) const { +#ifdef __WXGTK3__ + // no access to internal GdkWindows + wxUnusedVar(windows); +#else GtkSpinButton* spinbutton = GTK_SPIN_BUTTON(m_widget); windows.push_back(spinbutton->entry.text_area); windows.push_back(spinbutton->panel); +#endif return NULL; }