X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f03fc89fff2d6e823e7d4d14fbe14822ad6777b1..77671fd2d684b066b96e210c132a017e82914e4d:/src/gtk1/slider.cpp diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index 393dddf10c..5d115ba3b8 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -12,6 +12,9 @@ #endif #include "wx/slider.h" + +#if wxUSE_SLIDER + #include "wx/utils.h" #include @@ -39,7 +42,7 @@ static void gtk_slider_callback( GtkWidget *WXUNUSED(widget), wxSlider *win ) { if (g_isIdle) wxapp_install_idle_handler(); - if (!win->HasVMT()) return; + if (!win->m_hasVMT) return; if (g_blockEventsOnDrag) return; float diff = win->m_adjust->value - win->m_oldPos; @@ -95,9 +98,12 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, m_acceptsFocus = TRUE; m_needParent = TRUE; - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); + if (!PreCreation( parent, pos, size ) || + !CreateBase( parent, id, pos, size, style, validator, name )) + { + wxFAIL_MSG( _T("wxSlider creation failed") ); + return FALSE; + } m_oldPos = 0.0; @@ -289,3 +295,5 @@ void wxSlider::ApplyWidgetStyle() SetWidgetStyle(); gtk_widget_set_style( m_widget, m_widgetStyle ); } + +#endif