X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ca41e57f48db4c1a2de7ae67c7e4b655d9809af..324dbfec39cc030027830a100239cb9a4e6624e8:/src/gtk1/gauge.cpp diff --git a/src/gtk1/gauge.cpp b/src/gtk1/gauge.cpp index eb0f339bb0..e176cbe194 100644 --- a/src/gtk1/gauge.cpp +++ b/src/gtk1/gauge.cpp @@ -13,6 +13,11 @@ #include "wx/gauge.h" +#if wxUSE_GAUGE + +#include "gdk/gdk.h" +#include "gtk/gtk.h" + //----------------------------------------------------------------------------- // wxGauge //----------------------------------------------------------------------------- @@ -27,7 +32,9 @@ bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, PreCreation( parent, id, pos, size, style, name ); - SetValidator( validator ); +#if wxUSE_VALIDATORS + SetValidator( validator ); +#endif m_rangeMax = range; m_gaugePos = 0; @@ -35,9 +42,7 @@ bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, m_widget = gtk_progress_bar_new(); - m_parent->AddChild( this ); - - (m_parent->m_insertCallback)( m_parent, this ); + m_parent->DoAddChild( this ); PostCreation(); @@ -78,3 +83,4 @@ void wxGauge::ApplyWidgetStyle() gtk_widget_set_style( m_widget, m_widgetStyle ); } +#endif