From a64fb40d7e7cf06764de0644e0e79adc8745c75b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 29 Sep 2013 12:57:20 +0200 Subject: [PATCH] Fixed strings for wxWidgets 2.8 --- common/tool/context_menu.cpp | 7 ++++--- common/tool/tool_manager.cpp | 2 +- common/worksheet_item.cpp | 4 ++-- pcbnew/tools/move_tool.cpp | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 96a877abf8..66546bb793 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -103,12 +103,13 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) wxString menuEntry; if( aAction.HasHotKey() ) - menuEntry = wxString( aAction.GetMenuItem() + '\t' + getHotKeyDescription( aAction ) ); + menuEntry = wxString( ( aAction.GetMenuItem() + '\t' + getHotKeyDescription( aAction ) ).c_str(), + wxConvUTF8 ); else - menuEntry = wxString( aAction.GetMenuItem() ); + menuEntry = wxString( aAction.GetMenuItem().c_str(), wxConvUTF8 ); m_menu.Append( new wxMenuItem( &m_menu, id, menuEntry, - wxString( aAction.GetDescription() ), wxITEM_NORMAL ) ); + wxString( aAction.GetDescription().c_str(), wxConvUTF8 ), wxITEM_NORMAL ) ); m_toolActions[id] = &aAction; } diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 2350994b6b..d062faa9c4 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -139,7 +139,7 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) bool initState = static_cast( aTool )->Init(); if( !initState ) { - wxLogError( wxT( "Initialization of the %s tool failed" ), aTool->GetName() ); + wxLogError( wxT( "Initialization of the %s tool failed" ), aTool->GetName().c_str() ); // Unregister the tool m_toolState.erase( aTool ); diff --git a/common/worksheet_item.cpp b/common/worksheet_item.cpp index 9eefc3d908..e46d3e2822 100644 --- a/common/worksheet_item.cpp +++ b/common/worksheet_item.cpp @@ -79,8 +79,8 @@ const BOX2I WORKSHEET_ITEM::ViewBBox() const void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const { RENDER_SETTINGS* settings = m_view->GetPainter()->GetSettings(); - wxString fileName( m_fileName ); - wxString sheetName( m_sheetName ); + wxString fileName( m_fileName.c_str(), wxConvUTF8 ); + wxString sheetName( m_sheetName.c_str(), wxConvUTF8 ); WS_DRAW_ITEM_LIST drawList; drawList.SetPenSize( settings->GetWorksheetLineWidth() ); diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index b21a0a19da..3e2170a051 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -68,7 +68,7 @@ bool MOVE_TOOL::Init() } else { - wxLogError( "pcbnew.InteractiveSelection tool is not available" ); + wxLogError( wxT( "pcbnew.InteractiveSelection tool is not available" ) ); return false; }