Up-ported wxBusyCursor fix and wxCombBov default dialog
action behaviour if enter is hit in it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -647,7 +647,24 @@ void wxComboBox::OnChar( wxKeyEvent &event )
|
|||||||
event.SetString( GetValue() );
|
event.SetString( GetValue() );
|
||||||
event.SetInt( GetSelection() );
|
event.SetInt( GetSelection() );
|
||||||
event.SetEventObject( this );
|
event.SetEventObject( this );
|
||||||
GetEventHandler()->ProcessEvent( event );
|
|
||||||
|
if (!GetEventHandler()->ProcessEvent( event ))
|
||||||
|
{
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Catch GTK event so that GTK doesn't open the drop
|
// Catch GTK event so that GTK doesn't open the drop
|
||||||
// down list upon RETURN.
|
// down list upon RETURN.
|
||||||
|
@@ -370,7 +370,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
|
|||||||
wxSetCursor( wxCursor(wxCURSOR_WATCH) );
|
wxSetCursor( wxCursor(wxCURSOR_WATCH) );
|
||||||
|
|
||||||
if (wxTheApp)
|
if (wxTheApp)
|
||||||
wxTheApp->SendIdleEvents();
|
wxTheApp->ProcessIdle();
|
||||||
|
|
||||||
gdk_flush();
|
gdk_flush();
|
||||||
}
|
}
|
||||||
|
@@ -647,7 +647,24 @@ void wxComboBox::OnChar( wxKeyEvent &event )
|
|||||||
event.SetString( GetValue() );
|
event.SetString( GetValue() );
|
||||||
event.SetInt( GetSelection() );
|
event.SetInt( GetSelection() );
|
||||||
event.SetEventObject( this );
|
event.SetEventObject( this );
|
||||||
GetEventHandler()->ProcessEvent( event );
|
|
||||||
|
if (!GetEventHandler()->ProcessEvent( event ))
|
||||||
|
{
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Catch GTK event so that GTK doesn't open the drop
|
// Catch GTK event so that GTK doesn't open the drop
|
||||||
// down list upon RETURN.
|
// down list upon RETURN.
|
||||||
|
@@ -370,7 +370,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
|
|||||||
wxSetCursor( wxCursor(wxCURSOR_WATCH) );
|
wxSetCursor( wxCursor(wxCURSOR_WATCH) );
|
||||||
|
|
||||||
if (wxTheApp)
|
if (wxTheApp)
|
||||||
wxTheApp->SendIdleEvents();
|
wxTheApp->ProcessIdle();
|
||||||
|
|
||||||
gdk_flush();
|
gdk_flush();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user