X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58614078c466cffaf0e5d0369741706f130fb793..510649e4d5e8eaf8967ddd082f3eb5945471eb5e:/src/gtk1/gauge.cpp diff --git a/src/gtk1/gauge.cpp b/src/gtk1/gauge.cpp index 82e27351ce..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,6 +42,8 @@ bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, m_widget = gtk_progress_bar_new(); + m_parent->DoAddChild( this ); + PostCreation(); Show( TRUE ); @@ -74,3 +83,4 @@ void wxGauge::ApplyWidgetStyle() gtk_widget_set_style( m_widget, m_widgetStyle ); } +#endif