* wxFrameLayout should compile in unicode builds for ports other than wxMSW or wxGTK too - fix missing _().
* wxMac has Reparent, so use it in wxFL instead of the, now unicode-compilable, warning messagebox. * Code cleanup. - Probably some more ports have Reparent too, so could add into the CPP check. And it might be a good idea to do for the non-supported ports what wxGTK1 does (just return, not spew a messagebox). If Reparent already does nothing for unsupported ports, then could get rid of the CPP logic completely. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -366,26 +366,7 @@ bool wxFrameLayout::CanReparent()
|
|||||||
|
|
||||||
void wxFrameLayout::ReparentWindow( wxWindow* pChild, wxWindow* pNewParent )
|
void wxFrameLayout::ReparentWindow( wxWindow* pChild, wxWindow* pNewParent )
|
||||||
{
|
{
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXMSW__) || defined(__WXGTK20__) || defined(__WXMAC__)
|
||||||
#if 0
|
|
||||||
|
|
||||||
if ( pChild->GetParent() )
|
|
||||||
{
|
|
||||||
bool success = pChild->GetParent()->GetChildren().DeleteObject( pChild );
|
|
||||||
|
|
||||||
wxASSERT( success ); // DBG::
|
|
||||||
}
|
|
||||||
|
|
||||||
::SetParent( (HWND)pChild->m_hWnd, (HWND)pNewParent->m_hWnd );
|
|
||||||
|
|
||||||
pNewParent->GetChildren().Append( pChild );
|
|
||||||
|
|
||||||
pChild->SetParent( pNewParent );
|
|
||||||
#endif
|
|
||||||
pChild->Reparent(pNewParent);
|
|
||||||
|
|
||||||
return;
|
|
||||||
#elif defined(__WXGTK20__)
|
|
||||||
pChild->Reparent(pNewParent);
|
pChild->Reparent(pNewParent);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -400,7 +381,7 @@ void wxFrameLayout::ReparentWindow( wxWindow* pChild, wxWindow* pNewParent )
|
|||||||
#else
|
#else
|
||||||
wxUnusedVar(pChild);
|
wxUnusedVar(pChild);
|
||||||
wxUnusedVar(pNewParent);
|
wxUnusedVar(pNewParent);
|
||||||
wxMessageBox( "Sorry, docking is not supported for ports other than MSW and wxGTK" );
|
wxMessageBox( _("Sorry, docking is not supported for ports other than wxMSW, wxMac and wxGTK") );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user