]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/slider.cpp
For all platforms except WXMAC, the wxGIFDecoder::dgif function was
[wxWidgets.git] / src / mac / slider.cpp
index 05b29b696adb2240abdf004566d6fb949d3b708e..bce30a4bd1b95bf80694d8483ac266b72a5b7d12 100644 (file)
@@ -133,7 +133,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
     }
   
   m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds ,
-                               title , true ,  value , minValue , maxValue, 
+                               title , false ,  value , minValue , maxValue, 
                                kControlSliderProc +  kControlSliderLiveFeedback + ( ( style & wxSL_AUTOTICKS ) ? kControlSliderHasTickMarks : 0 ) , (long) this ) ;
   
   wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ;
@@ -312,20 +312,13 @@ void wxSlider::MacHandleControlClick( ControlHandle control , SInt16 controlpart
        SetValue( value ) ;             
        
        wxScrollEvent event(wxEVT_SCROLL_THUMBTRACK, m_windowId);
-       event.SetPosition(GetControlValue( m_macControl) );
+       event.SetPosition(value);
        event.SetEventObject( this );
+       GetEventHandler()->ProcessEvent(event);
 
-#if WXWIN_COMPATIBILITY
+  wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, m_windowId );
+  cevent.SetInt( value );
+  cevent.SetEventObject( this );
 
-    wxEventType oldEvent = event.GetEventType();
-    event.SetEventType( wxEVT_COMMAND_SLIDER_UPDATED );
-    if ( !GetEventHandler()->ProcessEvent(event) )
-    {
-        event.SetEventType( oldEvent );
-        if (!GetParent()->GetEventHandler()->ProcessEvent(event))
-            event.Skip();
-    }
-#else
-       GetEventHandler()->ProcessEvent(event);
-#endif
+  GetEventHandler()->ProcessEvent( cevent );
 }