Remove escaped double-quotes

For some reason, escaped double quotes in wxString::Format cause issues
on Mac.  We can replace them with single quotes in most places without
loss of clarity
This commit is contained in:
Seth Hillbrand 2021-11-03 17:02:14 -07:00
parent 888050bd67
commit cf6b18ec7e
14 changed files with 21 additions and 21 deletions

View File

@ -60,7 +60,7 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
if( extension == "xsl" ) if( extension == "xsl" )
{ {
m_info = readHeader( "-->" ); m_info = readHeader( "-->" );
m_cmd = wxString::Format( "xsltproc -o \"%%O%s\" \"%s\" \"%%I\"", m_cmd = wxString::Format( "xsltproc -o '%%O%s' '%s' '%%I'",
getOutputExtension( m_info ), m_file.GetFullPath() ); getOutputExtension( m_info ), m_file.GetFullPath() );
} }
else if( extension == "py" ) else if( extension == "py" )
@ -76,7 +76,7 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
if( interpreter.IsEmpty() ) if( interpreter.IsEmpty() )
interpreter = wxT( "python" ); interpreter = wxT( "python" );
m_cmd = wxString::Format( "%s \"%s\" \"%%I\" \"%%O%s\"", interpreter, m_file.GetFullPath(), m_cmd = wxString::Format( "%s '%s' '%%I' '%%O%s'", interpreter, m_file.GetFullPath(),
getOutputExtension( m_info ) ); getOutputExtension( m_info ) );
#endif #endif
} }

View File

@ -399,7 +399,7 @@ private:
} }
else else
{ {
wxFAIL_MSG( wxString::Format( "string \"%s\" can't be converted to boolean " wxFAIL_MSG( wxString::Format( "string '%s' can't be converted to boolean "
"correctly, it will have been perceived as FALSE", "correctly, it will have been perceived as FALSE",
aValue ) ); aValue ) );
return false; return false;

View File

@ -997,7 +997,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnAddField( wxCommandEvent& event )
{ {
if( fieldName == m_dataModel->GetColLabelValue( i ) ) if( fieldName == m_dataModel->GetColLabelValue( i ) )
{ {
DisplayError( this, wxString::Format( _( "Field name \"%s\" already in use." ), DisplayError( this, wxString::Format( _( "Field name '%s' already in use." ),
fieldName ) ); fieldName ) );
return; return;
} }

View File

@ -667,7 +667,7 @@ bool FIELDS_GRID_TABLE<T>::BoolFromString( wxString aValue ) const
} }
else else
{ {
wxFAIL_MSG( wxString::Format( "string \"%s\" can't be converted to boolean " wxFAIL_MSG( wxString::Format( "string '%s' can't be converted to boolean "
"correctly, it will have been perceived as FALSE", aValue ) ); "correctly, it will have been perceived as FALSE", aValue ) );
return false; return false;
} }

View File

@ -1095,7 +1095,7 @@ void SCH_EAGLE_PLUGIN::loadSegments( wxXmlNode* aSegmentsNode, const wxString& n
} }
else // DEFAULT else // DEFAULT
{ {
// THROW_IO_ERROR( wxString::Format( _( "XML node \"%s\" unknown" ), nodeName ) ); // THROW_IO_ERROR( wxString::Format( _( "XML node '%s' unknown" ), nodeName ) );
} }
// Get next segment attribute // Get next segment attribute

View File

@ -67,7 +67,7 @@ private:
( net_attr.m_NetAttribType & GBR_NETLIST_METADATA::GBR_NETINFO_CMP ) ) ( net_attr.m_NetAttribType & GBR_NETLIST_METADATA::GBR_NETINFO_CMP ) )
{ {
auto menuEntry = Add( GERBVIEW_ACTIONS::highlightComponent ); auto menuEntry = Add( GERBVIEW_ACTIONS::highlightComponent );
menuEntry->SetItemLabel( wxString::Format( _( "Highlight Items of Component \"%s\"" ), menuEntry->SetItemLabel( wxString::Format( _( "Highlight Items of Component '%s'" ),
net_attr.m_Cmpref ) ); net_attr.m_Cmpref ) );
addSeparator = true; addSeparator = true;
} }
@ -75,7 +75,7 @@ private:
if( ( net_attr.m_NetAttribType & GBR_NETLIST_METADATA::GBR_NETINFO_NET ) ) if( ( net_attr.m_NetAttribType & GBR_NETLIST_METADATA::GBR_NETINFO_NET ) )
{ {
auto menuEntry = Add( GERBVIEW_ACTIONS::highlightNet ); auto menuEntry = Add( GERBVIEW_ACTIONS::highlightNet );
menuEntry->SetItemLabel( wxString::Format( _( "Highlight Items of Net \"%s\"" ), menuEntry->SetItemLabel( wxString::Format( _( "Highlight Items of Net '%s'" ),
UnescapeString( net_attr.m_Netname ) ) ); UnescapeString( net_attr.m_Netname ) ) );
addSeparator = true; addSeparator = true;
} }
@ -85,7 +85,7 @@ private:
if( apertDescr && !apertDescr->m_AperFunction.IsEmpty() ) if( apertDescr && !apertDescr->m_AperFunction.IsEmpty() )
{ {
auto menuEntry = Add( GERBVIEW_ACTIONS::highlightAttribute ); auto menuEntry = Add( GERBVIEW_ACTIONS::highlightAttribute );
menuEntry->SetItemLabel( wxString::Format( _( "Highlight Aperture Type \"%s\"" ), menuEntry->SetItemLabel( wxString::Format( _( "Highlight Aperture Type '%s'" ),
apertDescr->m_AperFunction ) ); apertDescr->m_AperFunction ) );
addSeparator = true; addSeparator = true;
} }

View File

@ -70,7 +70,7 @@ void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event )
if( zipfiledlg.ShowModal() == wxID_CANCEL ) if( zipfiledlg.ShowModal() == wxID_CANCEL )
return; return;
wxString msg = wxString::Format( _( "\nOpen \"%s\"\n" ), zipfiledlg.GetPath() ); wxString msg = wxString::Format( _( "\nOpen '%s'\n" ), zipfiledlg.GetPath() );
PrintMsg( msg ); PrintMsg( msg );
wxDirDialog dirDlg( this, _( "Target Directory" ), fn.GetPath(), wxDD_DEFAULT_STYLE ); wxDirDialog dirDlg( this, _( "Target Directory" ), fn.GetPath(), wxDD_DEFAULT_STYLE );

View File

@ -741,7 +741,7 @@ void KICAD_MANAGER_FRAME::OnIdle( wxIdleEvent& aEvent )
if( file.open ) if( file.open )
{ {
progressReporter.Update( i++, progressReporter.Update( i++,
wxString::Format( _( "Restoring \"%s\"" ), file.fileName ) ); wxString::Format( _( "Restoring '%s'" ), file.fileName ) );
wxFileName fn( file.fileName ); wxFileName fn( file.fileName );

View File

@ -207,7 +207,7 @@ bool PCM_TASK_MANAGER::extract( const wxString& aFilePath, const wxString& aPack
continue; continue;
} }
// m_reporter->Report( wxString::Format( _( "Extracting file \"%s\"\n" ), entry->GetName() ), // m_reporter->Report( wxString::Format( _( "Extracting file '%s'\n" ), entry->GetName() ),
// RPT_SEVERITY_INFO ); // RPT_SEVERITY_INFO );
// Transform paths from // Transform paths from

View File

@ -854,7 +854,7 @@ void PROJECT_TREE_PANE::onRenameFile( wxCommandEvent& event )
return; return;
wxString buffer = m_TreeProject->GetItemText( curr_item ); wxString buffer = m_TreeProject->GetItemText( curr_item );
wxString msg = wxString::Format( _( "Change filename: \"%s\"" ), wxString msg = wxString::Format( _( "Change filename: '%s'" ),
tree_data[0]->GetFileName() ); tree_data[0]->GetFileName() );
wxTextEntryDialog dlg( this, msg, _( "Change filename" ), buffer ); wxTextEntryDialog dlg( this, msg, _( "Change filename" ), buffer );

View File

@ -415,7 +415,7 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
} }
LOCALE_IO dummy; LOCALE_IO dummy;
cmdK2S.Append( wxString::Format( " --user-origin=\"%.6f x %.6f\"", xOrg, yOrg ) ); cmdK2S.Append( wxString::Format( " --user-origin='%.6f x %.6f'", xOrg, yOrg ) );
} }
break; break;
@ -425,21 +425,21 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
xOrg = Iu2Millimeter( bbox.GetCenter().x ); xOrg = Iu2Millimeter( bbox.GetCenter().x );
yOrg = Iu2Millimeter( bbox.GetCenter().y ); yOrg = Iu2Millimeter( bbox.GetCenter().y );
LOCALE_IO dummy; LOCALE_IO dummy;
cmdK2S.Append( wxString::Format( " --user-origin=\"%.6f x %.6f\"", xOrg, yOrg ) ); cmdK2S.Append( wxString::Format( " --user-origin='%.6f x %.6f'", xOrg, yOrg ) );
} }
break; break;
} }
{ {
LOCALE_IO dummy; LOCALE_IO dummy;
cmdK2S.Append( wxString::Format( " --min-distance=\"%.3f mm\"", tolerance ) ); cmdK2S.Append( wxString::Format( " --min-distance='%.3f mm'", tolerance ) );
} }
cmdK2S.Append( " -f -o " ); cmdK2S.Append( " -f -o " );
cmdK2S.Append( wxString::Format("\"%s\"", m_filePickerSTEP->GetPath() ) ); // input file path cmdK2S.Append( wxString::Format("'%s'", m_filePickerSTEP->GetPath() ) ); // input file path
cmdK2S.Append( " " ); cmdK2S.Append( " " );
cmdK2S.Append( wxString::Format("\"%s\"", m_boardPath ) ); // output file path cmdK2S.Append( wxString::Format("'%s'", m_boardPath ) ); // output file path
wxExecute( cmdK2S, wxEXEC_ASYNC | wxEXEC_SHOW_CONSOLE ); wxExecute( cmdK2S, wxEXEC_ASYNC | wxEXEC_SHOW_CONSOLE );

View File

@ -80,7 +80,7 @@ PyObject* PYTHON_ACTION_PLUGIN::CallMethod( const char* aMethod, PyObject* aArgl
} }
else else
{ {
wxString msg = wxString::Format( _( "Method \"%s\" not found, or not callable" ), aMethod ); wxString msg = wxString::Format( _( "Method '%s' not found, or not callable" ), aMethod );
wxMessageBox( msg, _( "Unknown Method" ), wxICON_ERROR | wxOK ); wxMessageBox( msg, _( "Unknown Method" ), wxICON_ERROR | wxOK );
} }

View File

@ -80,7 +80,7 @@ PyObject* PYTHON_FOOTPRINT_WIZARD::CallMethod( const char* aMethod, PyObject* aA
} }
else else
{ {
wxString msg = wxString::Format(_( "Method \"%s\" not found, or not callable" ), aMethod ); wxString msg = wxString::Format(_( "Method '%s' not found, or not callable" ), aMethod );
wxMessageBox( msg, _( "Unknown Method" ), wxICON_ERROR | wxOK ); wxMessageBox( msg, _( "Unknown Method" ), wxICON_ERROR | wxOK );
} }

View File

@ -442,7 +442,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard )
'wire'. 'wire'.
wxString netId = FROM_UTF8( wire->net_id.c_str() ); wxString netId = FROM_UTF8( wire->net_id.c_str() );
THROW_IO_ERROR( wxString::Format( _("Unsupported wire shape: \"%s\" for net: \"%s\""), THROW_IO_ERROR( wxString::Format( _("Unsupported wire shape: '%s' for net: '%s'"),
DLEX::GetTokenString(shape).GetData(), DLEX::GetTokenString(shape).GetData(),
netId.GetData() netId.GetData()
) ); ) );