Eeschema: Fix wx28 compatibility issue.

This commit is contained in:
jean-pierre charras 2013-06-17 21:01:47 +02:00
parent b4d0cd7467
commit 4536e27426
1 changed files with 6 additions and 7 deletions

View File

@ -204,8 +204,6 @@ DIALOG_BOM::DIALOG_BOM( SCH_EDIT_FRAME* parent ) :
DIALOG_BOM::~DIALOG_BOM() DIALOG_BOM::~DIALOG_BOM()
{ {
wxString list;
// Save the plugin descriptions in config. // Save the plugin descriptions in config.
// the config stores only one string. // the config stores only one string.
// plugins are saved inside a S expr: // plugins are saved inside a S expr:
@ -215,16 +213,16 @@ DIALOG_BOM::~DIALOG_BOM()
// ) // )
STRING_FORMATTER writer; STRING_FORMATTER writer;
list << wxT("(plugins"); writer.Print( 0, "(plugins" );
for( unsigned ii = 0; ii < m_plugins.GetCount(); ii += 2 ) for( unsigned ii = 0; ii < m_plugins.GetCount(); ii += 2 )
{ {
writer.Print( 1, "(plugin %s (cmd %s))", writer.Print( 1, "(plugin %s (cmd %s))",
writer.Quotew( m_plugins[ii] ).c_str(), writer.Quotew( m_plugins[ii] ).c_str(),
writer.Quotew( m_plugins[ii+1] ).c_str() ); writer.Quotew( m_plugins[ii+1] ).c_str() );
} }
writer.Print( 0, ")" );
list << writer.GetString(); wxString list( FROM_UTF8( writer.GetString().c_str() ) );
list << wxT(")");
m_config->Write( BOM_PLUGINS_KEY, list ); m_config->Write( BOM_PLUGINS_KEY, list );
@ -238,13 +236,14 @@ DIALOG_BOM::~DIALOG_BOM()
*/ */
void DIALOG_BOM::installPluginsList() void DIALOG_BOM::installPluginsList()
{ {
wxString list, text, active_plugin_name; wxString list, active_plugin_name;
m_config->Read( BOM_PLUGINS_KEY, &list ); m_config->Read( BOM_PLUGINS_KEY, &list );
m_config->Read( BOM_PLUGIN_SELECTED_KEY, &active_plugin_name ); m_config->Read( BOM_PLUGIN_SELECTED_KEY, &active_plugin_name );
if( !list.IsEmpty() ) if( !list.IsEmpty() )
{ {
BOM_CFG_READER_PARSER cfg_parser( &m_plugins, list.c_str(), wxT( "plugins" ) ); BOM_CFG_READER_PARSER cfg_parser( &m_plugins, TO_UTF8( list ),
wxT( "plugins" ) );
try try
{ {
cfg_parser.Parse(); cfg_parser.Parse();