+
+ if ((win->HandleWindowEvent( event )) &&
+ !event.IsAllowed() )
+ {
+ /* program has vetoed */
+ win->m_adjust->value = win->m_oldPos;
+
+ gtk_signal_disconnect_by_func( GTK_OBJECT (win->m_adjust),
+ (GtkSignalFunc) gtk_spinbutt_callback,
+ (gpointer) win );
+
+ gtk_signal_emit_by_name( GTK_OBJECT(win->m_adjust), "value_changed" );
+
+ gtk_signal_connect( GTK_OBJECT (win->m_adjust),
+ "value_changed",
+ (GtkSignalFunc) gtk_spinbutt_callback,
+ (gpointer) win );
+ return;
+ }
+
+ win->m_oldPos = win->m_adjust->value;
+
+ /* always send a thumbtrack event */
+ if (command != wxEVT_SCROLL_THUMBTRACK)
+ {
+ command = wxEVT_SCROLL_THUMBTRACK;
+ wxSpinEvent event2( command, win->GetId());
+ event2.SetPosition( value );
+ event2.SetEventObject( win );
+ win->HandleWindowEvent( event2 );
+ }
+}