X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e3e14c4871f6c3b783eb12989262e076845c8e3..2b01fd49183b64be59c4e7ba9bdaee479ff29ed2:/src/gtk1/slider.cpp?ds=sidebyside diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index ba70dee257..594d0ae265 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -16,7 +16,7 @@ #include "wx/utils.h" #include "wx/math.h" -#include "wx/gtk/private.h" +#include "wx/gtk1/private.h" //----------------------------------------------------------------------------- // idle system @@ -93,25 +93,7 @@ static void gtk_slider_callback( GtkAdjustment *adjust, return; wxEventType evtType; -#ifdef __WXGTK20__ - if ( win->m_isScrolling ) - evtType = wxEVT_SCROLL_THUMBTRACK; - // it could seem that UP/DOWN are inversed but this is what wxMSW does - else if ( AreSameAdjustValues(diff, adjust->step_increment) ) - evtType = wxEVT_SCROLL_LINEDOWN; - else if ( AreSameAdjustValues(diff, -adjust->step_increment) ) - evtType = wxEVT_SCROLL_LINEUP; - else if ( AreSameAdjustValues(diff, adjust->page_increment) ) - evtType = wxEVT_SCROLL_PAGEDOWN; - else if ( AreSameAdjustValues(diff, -adjust->page_increment) ) - evtType = wxEVT_SCROLL_PAGEUP; - else if ( AreSameAdjustValues(adjust->value, adjust->lower) ) - evtType = wxEVT_SCROLL_TOP; - else if ( AreSameAdjustValues(adjust->value, adjust->upper) ) - evtType = wxEVT_SCROLL_BOTTOM; -#else evtType = GtkScrollTypeToWx(GET_SCROLL_TYPE(win->m_widget)); -#endif ProcessScrollEvent(win, evtType, dvalue); @@ -202,11 +184,6 @@ 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(); gtk_signal_connect( GTK_OBJECT(m_widget), "button_press_event", @@ -333,15 +310,11 @@ int wxSlider::GetLineSize() const bool wxSlider::IsOwnGtkWindow( GdkWindow *window ) { GtkRange *range = GTK_RANGE(m_widget); -#ifdef __WXGTK20__ - return (range->event_window == window); -#else return ( (window == GTK_WIDGET(range)->window) || (window == range->trough) || (window == range->slider) || (window == range->step_forw) || (window == range->step_back) ); -#endif } void wxSlider::GtkDisableEvents()