]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/slider.cpp
Blind fix for bug #1209944, wxFileConfig constructor corrupts the stack
[wxWidgets.git] / src / gtk1 / slider.cpp
index 740a202322858269c2e47c960ee08517641b3102..c5d5be31fe8108b74d6b168b119499b11bcb7571 100644 (file)
@@ -41,6 +41,7 @@ static const float sensitivity = 0.02;
 // "value_changed"
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_slider_callback( GtkAdjustment *adjust,
                                  SCROLLBAR_CBACK_ARG
                                  wxSlider *win )
@@ -72,6 +73,7 @@ static void gtk_slider_callback( GtkAdjustment *adjust,
     cevent.SetInt( value );
     win->GetEventHandler()->ProcessEvent( cevent );
 }
+}
 
 //-----------------------------------------------------------------------------
 // wxSlider
@@ -132,6 +134,11 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
 
     m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );
 
+#ifdef __WXGTK20__
+    if (style & wxSL_INVERSE)
+        gtk_range_set_inverted( GTK_RANGE(m_widget), TRUE );
+#endif
+
     GtkEnableEvents();
 
     SetRange( minValue, maxValue );