From 91b167ddeb53aa37dae060e8fde7eed276959c47 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 8 Aug 2002 09:24:38 +0000 Subject: [PATCH] Applied patch [ 590031 ] Slider: Events must be enabled earlier The current wxSlider - implementation gives a gtk-warning about not being able to find an event handler. This is because the first call of GtkEnableEvents has to happen a few lines earlier. The patch fixes this. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/slider.cpp | 4 ++-- src/gtk1/slider.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 07bc86620d..9f59575679 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -131,11 +131,11 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); + GtkEnableEvents(); + SetRange( minValue, maxValue ); SetValue( value ); - GtkEnableEvents(); - m_parent->DoAddChild( this ); PostCreation(); diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index 07bc86620d..9f59575679 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -131,11 +131,11 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); + GtkEnableEvents(); + SetRange( minValue, maxValue ); SetValue( value ); - GtkEnableEvents(); - m_parent->DoAddChild( this ); PostCreation();