From: Robert Roebling Date: Sun, 28 Nov 1999 11:48:06 +0000 (+0000) Subject: Damn broken pipes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/57a1fd73042accb25f48366ef8b51c974dfa2c04?hp=aed8ac3f8954c07fb2dee3e2ba9ae02fa8890428 Damn broken pipes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 996c428eaa..54600e3d10 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -16,10 +16,11 @@ #if wxUSE_SLIDER #include "wx/utils.h" + #include -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // idle system @@ -34,6 +35,8 @@ extern bool g_isIdle; extern bool g_blockEventsOnDrag; +static const float sensitivity = 0.02; + //----------------------------------------------------------------------------- // "value_changed" //----------------------------------------------------------------------------- @@ -46,7 +49,7 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win ) if (g_blockEventsOnDrag) return; float diff = adjust->value - win->m_oldPos; - if (fabs(diff) < 0.2) return; + if (fabs(diff) < sensitivity) return; win->m_oldPos = adjust->value; @@ -79,14 +82,6 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win ) IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl) -wxSlider::wxSlider(void) -{ -} - -wxSlider::~wxSlider(void) -{ -} - bool wxSlider::Create(wxWindow *parent, wxWindowID id, int value, int minValue, int maxValue, const wxPoint& pos, const wxSize& size, diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index 996c428eaa..54600e3d10 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -16,10 +16,11 @@ #if wxUSE_SLIDER #include "wx/utils.h" + #include -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // idle system @@ -34,6 +35,8 @@ extern bool g_isIdle; extern bool g_blockEventsOnDrag; +static const float sensitivity = 0.02; + //----------------------------------------------------------------------------- // "value_changed" //----------------------------------------------------------------------------- @@ -46,7 +49,7 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win ) if (g_blockEventsOnDrag) return; float diff = adjust->value - win->m_oldPos; - if (fabs(diff) < 0.2) return; + if (fabs(diff) < sensitivity) return; win->m_oldPos = adjust->value; @@ -79,14 +82,6 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win ) IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl) -wxSlider::wxSlider(void) -{ -} - -wxSlider::~wxSlider(void) -{ -} - bool wxSlider::Create(wxWindow *parent, wxWindowID id, int value, int minValue, int maxValue, const wxPoint& pos, const wxSize& size,