]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/gauge.cpp
attempts to fix wxStaticBitmap::SetBitmap() - still doesn't work
[wxWidgets.git] / src / gtk / gauge.cpp
index 82e27351ce401606aeceb5bc44d1567cc9ed76b6..e176cbe194d8a5bbffe1a02c1c63c44a426f847a 100644 (file)
 
 #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