X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f03fc89fff2d6e823e7d4d14fbe14822ad6777b1..8a4df1595bc8ce70286afe99f122f64916790ad4:/src/gtk/scrolbar.cpp diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index 6fd20ff176..56cc1d6d58 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/scrolbar.cpp @@ -13,6 +13,9 @@ #endif #include "wx/scrolbar.h" + +#if wxUSE_SCROLLBAR + #include "wx/utils.h" #include @@ -41,7 +44,7 @@ static void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *wi { 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; @@ -134,9 +137,12 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, m_needParent = TRUE; m_acceptsFocus = 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("wxScrollBar creation failed") ); + return FALSE; + } m_oldPos = 0.0; @@ -307,3 +313,4 @@ void wxScrollBar::ApplyWidgetStyle() gtk_widget_set_style( m_widget, m_widgetStyle ); } +#endif