Browse Source

Quasimodo is not a monster, he is your friend.

pull/1/head
Dick Hollenbeck 12 years ago
parent
commit
fb346a0c10
  1. 10
      common/dialog_shim.cpp
  2. 10
      common/kiway_player.cpp
  3. 2
      pcbnew/clean.cpp

10
common/dialog_shim.cpp

@ -246,14 +246,20 @@ int DIALOG_SHIM::ShowQuasiModal()
wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
ENABLE_DISABLE toggle( parent );
ENABLE_DISABLE toggle( parent ); // quasi-modal: disable only my "optimal" parent
Show( true );
m_qmodal_showing = true;
WX_EVENT_LOOP event_loop;
#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate.
// new code needs this, old code does it in wxEventLoop::Run() and cannot
// tolerate it here. Where that boundary is as a version number, I don't know.
// A closer look at the subversion repo for wx would tell.
wxEventLoopActivator event_loop_stacker( &event_loop );
#endif
m_qmodal_loop = &event_loop;
@ -269,7 +275,7 @@ void DIALOG_SHIM::EndQuasiModal( int retCode )
if( !IsQuasiModal() )
{
wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" );
wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ) );
return;
}

10
common/kiway_player.cpp

@ -74,7 +74,7 @@ void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent )
bool KIWAY_PLAYER::ShowModal( wxString* aResult )
{
wxASSERT_MSG( IsModal(), "ShowModal() shouldn't be called on non-modal frame" );
wxASSERT_MSG( IsModal(), wxT( "ShowModal() shouldn't be called on non-modal frame" ) );
/*
This function has a nice interface but a necessarily unsightly implementation.
@ -95,13 +95,19 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult )
} clear_this( (void*&) m_modal_loop );
// exception safe way to disable all frames except the modal one,
// re-enable on exit
// re-enables only those that were disabled on exit
wxWindowDisabler toggle( this );
Show( true );
WX_EVENT_LOOP event_loop;
#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate.
// new code needs this, old code does it in wxEventLoop::Run() and cannot
// tolerate it here. Where that boundary is as a version number, I don't know.
// A closer look at the subversion repo for wx would tell.
wxEventLoopActivator event_loop_stacker( &event_loop );
#endif
m_modal_loop = &event_loop;

2
pcbnew/clean.cpp

@ -203,7 +203,7 @@ bool TRACKS_CLEANER::clean_vias()
// Correct via m_End defects (if any), should never happen
if( via->GetStart() != via->GetEnd() )
{
wxFAIL_MSG( "Via with mismatching ends" );
wxFAIL_MSG( wxT( "Via with mismatching ends" ) );
via->SetEnd( via->GetStart() );
}

Loading…
Cancel
Save