X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/83624f79609f0d5e240c1f7d77d044bfff9702fc..510649e4d5e8eaf8967ddd082f3eb5945471eb5e:/src/gtk1/gauge.cpp diff --git a/src/gtk1/gauge.cpp b/src/gtk1/gauge.cpp index 051b70390b..e176cbe194 100644 --- a/src/gtk1/gauge.cpp +++ b/src/gtk1/gauge.cpp @@ -12,6 +12,9 @@ #endif #include "wx/gauge.h" + +#if wxUSE_GAUGE + #include "gdk/gdk.h" #include "gtk/gtk.h" @@ -29,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; @@ -37,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(); @@ -80,3 +83,4 @@ void wxGauge::ApplyWidgetStyle() gtk_widget_set_style( m_widget, m_widgetStyle ); } +#endif