diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 3cd992283d..55cbde6983 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -601,29 +601,29 @@ void wxComboBox::OnChar( wxKeyEvent &event ) event.SetEventObject( this ); GetEventHandler()->ProcessEvent( event ); } - else - { - // This will invoke the dialog default action, such - // as the clicking the default button. - - wxWindow *top_frame = m_parent; - while (top_frame->GetParent() && !(top_frame->IsTopLevel())) - top_frame = top_frame->GetParent(); - - if (top_frame && GTK_IS_WINDOW(top_frame->m_widget)) - { - GtkWindow *window = GTK_WINDOW(top_frame->m_widget); - if (window->default_widget) - { - gtk_widget_activate (window->default_widget); - return; - } + // This will invoke the dialog default action, such + // as the clicking the default button. + + wxWindow *top_frame = m_parent; + while (top_frame->GetParent() && !(top_frame->IsTopLevel())) + top_frame = top_frame->GetParent(); + + if (top_frame && GTK_IS_WINDOW(top_frame->m_widget)) + { + GtkWindow *window = GTK_WINDOW(top_frame->m_widget); + + if (window->default_widget) + { + gtk_widget_activate (window->default_widget); + return; } } + + return; } } - + event.Skip(); } diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index 46e8f4860f..87acf9dcb6 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -77,7 +77,9 @@ gtk_spinctrl_text_changed_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() ); event.SetEventObject( win ); - event.SetInt( win->GetValue() ); + + // see above + event.SetInt( (int)ceil(win->m_adjust->value) ); win->GetEventHandler()->ProcessEvent( event ); } diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index 3cd992283d..55cbde6983 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -601,29 +601,29 @@ void wxComboBox::OnChar( wxKeyEvent &event ) event.SetEventObject( this ); GetEventHandler()->ProcessEvent( event ); } - else - { - // This will invoke the dialog default action, such - // as the clicking the default button. - - wxWindow *top_frame = m_parent; - while (top_frame->GetParent() && !(top_frame->IsTopLevel())) - top_frame = top_frame->GetParent(); - - if (top_frame && GTK_IS_WINDOW(top_frame->m_widget)) - { - GtkWindow *window = GTK_WINDOW(top_frame->m_widget); - if (window->default_widget) - { - gtk_widget_activate (window->default_widget); - return; - } + // This will invoke the dialog default action, such + // as the clicking the default button. + + wxWindow *top_frame = m_parent; + while (top_frame->GetParent() && !(top_frame->IsTopLevel())) + top_frame = top_frame->GetParent(); + + if (top_frame && GTK_IS_WINDOW(top_frame->m_widget)) + { + GtkWindow *window = GTK_WINDOW(top_frame->m_widget); + + if (window->default_widget) + { + gtk_widget_activate (window->default_widget); + return; } } + + return; } } - + event.Skip(); } diff --git a/src/gtk1/spinctrl.cpp b/src/gtk1/spinctrl.cpp index 46e8f4860f..87acf9dcb6 100644 --- a/src/gtk1/spinctrl.cpp +++ b/src/gtk1/spinctrl.cpp @@ -77,7 +77,9 @@ gtk_spinctrl_text_changed_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() ); event.SetEventObject( win ); - event.SetInt( win->GetValue() ); + + // see above + event.SetInt( (int)ceil(win->m_adjust->value) ); win->GetEventHandler()->ProcessEvent( event ); }