always connect to both XmNvalueChangedCallback and XmNdragCallback

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-10-08 18:35:36 +00:00
parent 31df756d74
commit ad60f069f1

View File

@ -33,7 +33,7 @@
#include "wx/motif/private.h"
void wxSliderCallback (Widget widget, XtPointer clientData, XmScaleCallbackStruct * cbs);
static void wxSliderCallback (Widget widget, XtPointer clientData, XmScaleCallbackStruct * cbs);
IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
@ -89,21 +89,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
m_mainWidget = (WXWidget) sliderWidget;
#ifdef __VMS__
#pragma message disable codcauunr
// VMS gives here the compiler warning :
// statement either is unreachable or causes unreachable code
#endif
if(style & wxSL_NOTIFY_DRAG)
XtAddCallback (sliderWidget, XmNdragCallback,
(XtCallbackProc) wxSliderCallback, (XtPointer) this);
else
XtAddCallback (sliderWidget, XmNvalueChangedCallback,
(XtCallbackProc) wxSliderCallback, (XtPointer) this);
#ifdef __VMS__
#pragma message enable codcauunr
#endif
XtAddCallback (sliderWidget, XmNvalueChangedCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
ChangeFont(false);