gtk_value_changed(GtkSpinButton* spinbutton, wxSpinCtrl* win)
{
win->m_pos = int(gtk_spin_button_get_value(spinbutton));
- if (!win->m_hasVMT || g_blockEventsOnDrag || win->m_blockScrollEvent)
+ if (!win->m_hasVMT || g_blockEventsOnDrag)
return;
wxCommandEvent event( wxEVT_COMMAND_SPINCTRL_UPDATED, win->GetId());
static void
gtk_changed(GtkSpinButton* spinbutton, wxSpinCtrl* win)
{
- if (!win->m_hasVMT || win->m_blockScrollEvent)
+ if (!win->m_hasVMT)
return;
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() );
GtkDisableEvents();
gtk_spin_button_update( GTK_SPIN_BUTTON(m_widget) );
+ wx_const_cast(wxSpinCtrl*, this)->m_pos =
+ int(gtk_spin_button_get_value(GTK_SPIN_BUTTON(m_widget)));
GtkEnableEvents();
return m_pos;
GtkDisableEvents();
gtk_spin_button_set_range( GTK_SPIN_BUTTON(m_widget), minVal, maxVal);
+ m_pos = int(gtk_spin_button_get_value(GTK_SPIN_BUTTON(m_widget)));
GtkEnableEvents();
}
{
g_signal_handlers_block_by_func( m_widget,
(gpointer)gtk_value_changed, (void*) this);
-
+
g_signal_handlers_block_by_func(m_widget,
(gpointer)gtk_changed, (void*) this);
}
{
g_signal_handlers_unblock_by_func(m_widget,
(gpointer)gtk_value_changed, (void*) this);
-
+
g_signal_handlers_unblock_by_func(m_widget,
(gpointer)gtk_changed, (void*) this);
}