mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-07 17:15:31 +00:00
Some DisplayError -> DisplayErrorMessage
This commit is contained in:
parent
4771e573ef
commit
22d13546fb
common
cvpcb
eeschema
pcbnew
qa/tools/pns
@ -537,7 +537,7 @@ bool EDA_DRAW_PANEL_GAL::SwitchBackend( GAL_TYPE aGalType )
|
||||
// Create a dummy GAL
|
||||
new_gal = new KIGFX::GAL( m_options );
|
||||
aGalType = GAL_TYPE_NONE;
|
||||
DisplayError( m_parent, wxString( err.what() ) );
|
||||
DisplayErrorMessage( m_parent, _( "Error switch GAL backend" ), wxString( err.what() ) );
|
||||
result = false;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT
|
||||
if( !wxFileExists( fullfilename ) )
|
||||
{
|
||||
msg.Printf( _( "Documentation file '%s' not found." ), docname );
|
||||
DisplayError( aParent, msg );
|
||||
DisplayErrorMessage( aParent, msg );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT
|
||||
if( !success )
|
||||
{
|
||||
msg.Printf( _( "Unknown MIME type for documentation file '%s'" ), fullfilename );
|
||||
DisplayError( aParent, msg );
|
||||
DisplayErrorMessage( aParent, msg );
|
||||
}
|
||||
|
||||
return success;
|
||||
|
@ -246,7 +246,7 @@ int ExecuteFile( const wxString& aEditorName, const wxString& aFileName, wxProce
|
||||
|
||||
wxString msg;
|
||||
msg.Printf( _( "Command '%s' could not be found." ), fullEditorName );
|
||||
DisplayError( nullptr, msg, 20 );
|
||||
DisplayErrorMessage( nullptr, msg );
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ bool OpenPDF( const wxString& file )
|
||||
if( !LaunchExternal( filename ) )
|
||||
{
|
||||
msg.Printf( _( "Unable to find a PDF viewer for '%s'." ), filename );
|
||||
DisplayError( nullptr, msg );
|
||||
DisplayErrorMessage( nullptr, msg );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -278,7 +278,7 @@ bool OpenPDF( const wxString& file )
|
||||
if( wxExecute( const_cast<wchar_t**>( args ) ) == -1 )
|
||||
{
|
||||
msg.Printf( _( "Problem while running the PDF viewer '%s'." ), args[0] );
|
||||
DisplayError( nullptr, msg );
|
||||
DisplayErrorMessage( nullptr, msg );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ bool REGEX_VALIDATOR::Validate( wxWindow* aParent )
|
||||
if( !valid )
|
||||
{
|
||||
m_validatorWindow->SetFocus();
|
||||
DisplayError( aParent, wxString::Format( _( "Incorrect value: %s" ), value ) );
|
||||
DisplayErrorMessage( aParent, wxString::Format( _( "Incorrect value: %s" ), value ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -333,7 +333,7 @@ wxString valueDescriptionFromLabel( wxStaticText* aLabel )
|
||||
void UNIT_BINDER::delayedFocusHandler( wxCommandEvent& )
|
||||
{
|
||||
if( !m_errorMessage.IsEmpty() )
|
||||
DisplayError( m_valueCtrl->GetParent(), m_errorMessage );
|
||||
DisplayErrorMessage( m_valueCtrl->GetParent(), m_errorMessage );
|
||||
|
||||
m_errorMessage = wxEmptyString;
|
||||
m_valueCtrl->SetFocus();
|
||||
|
@ -247,7 +247,7 @@ void DIALOG_CONFIG_EQUFILES::OnAddFiles( wxCommandEvent& event )
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "File '%s' already exists in list." ),
|
||||
DisplayErrorMessage( this, wxString::Format( _( "File '%s' already exists in list." ),
|
||||
filepath.GetData() ) );
|
||||
}
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ FOOTPRINT* DISPLAY_FOOTPRINTS_FRAME::GetFootprint( const wxString& aFootprintNam
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( this, ioe.What() );
|
||||
DisplayErrorMessage( this, _( "Error loading footprint" ), ioe.What() );
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ void SCH_EDIT_FRAME::SaveSheetAsDesignBlock( const wxString& aLibraryName,
|
||||
// Make sure the user has selected a library to save into
|
||||
if( m_designBlocksPane->GetSelectedLibId().GetLibNickname().empty() )
|
||||
{
|
||||
DisplayError( this, _( "Please select a library to save the design block to." ) );
|
||||
DisplayErrorMessage( this, _( "Please select a library to save the design block to." ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ void SCH_EDIT_FRAME::SaveSheetAsDesignBlock( const wxString& aLibraryName,
|
||||
|
||||
if( !sheets.empty() )
|
||||
{
|
||||
DisplayError( this, _( "Design blocks with nested sheets are not supported." ) );
|
||||
DisplayErrorMessage( this, _( "Design blocks with nested sheets are not supported." ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -330,7 +330,7 @@ void SCH_EDIT_FRAME::SaveSheetAsDesignBlock( const wxString& aLibraryName,
|
||||
wxString tempFile = wxFileName::CreateTempFileName( "design_block" );
|
||||
if( !saveSchematicFile( aSheetPath.Last(), tempFile ) )
|
||||
{
|
||||
DisplayError( this, _( "Error saving temporary schematic file to create design block." ) );
|
||||
DisplayErrorMessage( this, _( "Error saving temporary schematic file to create design block." ) );
|
||||
wxRemoveFile( tempFile );
|
||||
return;
|
||||
}
|
||||
@ -366,7 +366,7 @@ void SCH_EDIT_FRAME::SaveSelectionAsDesignBlock( const wxString& aLibraryName )
|
||||
// Make sure the user has selected a library to save into
|
||||
if( m_designBlocksPane->GetSelectedLibId().GetLibNickname().empty() )
|
||||
{
|
||||
DisplayError( this, _( "Please select a library to save the design block to." ) );
|
||||
DisplayErrorMessage( this, _( "Please select a library to save the design block to." ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -375,7 +375,7 @@ void SCH_EDIT_FRAME::SaveSelectionAsDesignBlock( const wxString& aLibraryName )
|
||||
|
||||
if( selection.Empty() )
|
||||
{
|
||||
DisplayError( this, _( "Please select some items to save as a design block." ) );
|
||||
DisplayErrorMessage( this, _( "Please select some items to save as a design block." ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ void SCH_EDIT_FRAME::SaveSelectionAsDesignBlock( const wxString& aLibraryName )
|
||||
SaveSheetAsDesignBlock( aLibraryName, curPath );
|
||||
}
|
||||
else
|
||||
DisplayError( this, _( "Design blocks with nested sheets are not supported." ) );
|
||||
DisplayErrorMessage( this, _( "Design blocks with nested sheets are not supported." ) );
|
||||
|
||||
return;
|
||||
}
|
||||
@ -424,7 +424,7 @@ void SCH_EDIT_FRAME::SaveSelectionAsDesignBlock( const wxString& aLibraryName )
|
||||
wxString tempFile = wxFileName::CreateTempFileName( "design_block" );
|
||||
if( !saveSchematicFile( tempSheet, tempFile ) )
|
||||
{
|
||||
DisplayError( this, _( "Error saving temporary schematic file to create design block." ) );
|
||||
DisplayErrorMessage( this, _( "Error saving temporary schematic file to create design block." ) );
|
||||
wxRemoveFile( tempFile );
|
||||
return;
|
||||
}
|
||||
@ -461,7 +461,7 @@ bool SCH_EDIT_FRAME::DeleteDesignBlockLibrary( const wxString& aLibName, bool aC
|
||||
{
|
||||
if( aLibName.IsEmpty() )
|
||||
{
|
||||
DisplayError( this, _( "Please select a library to delete." ) );
|
||||
DisplayErrorMessage( this, _( "Please select a library to delete." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,7 @@ void DIALOG_BOM::OnRunGenerator( wxCommandEvent& event )
|
||||
status = m_parent->WriteNetListFile( NET_TYPE_BOM, fullfilename, GNL_OPT_BOM|GNL_ALL, &reporter );
|
||||
|
||||
if( !status )
|
||||
DisplayError( this, _( "Failed to create file." ) );
|
||||
DisplayErrorMessage( this, _( "Failed to create file." ) );
|
||||
|
||||
m_Messages->SetValue( reporter.GetMessages() );
|
||||
|
||||
@ -359,7 +359,7 @@ void DIALOG_BOM::OnAddGenerator( wxCommandEvent& event )
|
||||
}
|
||||
catch( const std::runtime_error& e )
|
||||
{
|
||||
DisplayError( this, e.what() );
|
||||
DisplayErrorMessage( this, e.what() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -748,7 +748,7 @@ bool DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow()
|
||||
id.GetLibNickname().wx_str(),
|
||||
ioe.What() );
|
||||
|
||||
DisplayError( this, msg );
|
||||
DisplayErrorMessage( this, msg );
|
||||
}
|
||||
|
||||
if( symbol == nullptr )
|
||||
|
@ -1056,7 +1056,7 @@ void DIALOG_ERC::OnSaveReport( wxCommandEvent& aEvent )
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "Failed to create file '%s'." ),
|
||||
fn.GetFullPath() ) );
|
||||
DisplayErrorMessage( this, wxString::Format( _( "Failed to create file '%s'." ),
|
||||
fn.GetFullPath() ) );
|
||||
}
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveLibraryAs( const wxString& aLibraryPath )
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( this, ioe.What() );
|
||||
DisplayErrorMessage( this, _( "Error saving footprint library" ), ioe.What() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1962,7 +1962,7 @@ int PCB_EDIT_FRAME::TestStandalone()
|
||||
|
||||
if( !fn.FileExists() )
|
||||
{
|
||||
DisplayError( this, _( "The schematic for this board cannot be found." ) );
|
||||
DisplayErrorMessage( this, _( "The schematic for this board cannot be found." ) );
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <confirm.h> // DisplayError()
|
||||
#include <confirm.h> // DisplayErrorMessage()
|
||||
#include <gestfich.h> // EDA_FileSelector()
|
||||
#include <locale_io.h>
|
||||
#include <macros.h>
|
||||
|
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <confirm.h> // DisplayError()
|
||||
#include <confirm.h> // DisplayErrorMessage()
|
||||
#include <gestfich.h> // EDA_FileSelector()
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <locale_io.h>
|
||||
@ -73,7 +73,7 @@ bool PCB_EDIT_FRAME::ImportSpecctraSession( const wxString& fullFileName )
|
||||
|
||||
wxString extra = ioe.What();
|
||||
|
||||
DisplayErrorMessage( this, msg, extra);
|
||||
DisplayErrorMessage( this, msg, extra );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ int FOOTPRINT_EDITOR_CONTROL::RenameFootprint( const TOOL_EVENT& aEvent )
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( m_frame, ioe.What() );
|
||||
DisplayErrorMessage( m_frame, _( "Error renaming footprint" ), ioe.What() );
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
|
@ -1506,8 +1506,7 @@ int PCB_CONTROL::AppendBoard( PCB_IO& pi, wxString& fileName )
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
wxString msg = wxString::Format( _( "Error loading board.\n%s" ), ioe.What() );
|
||||
DisplayError( editFrame, msg );
|
||||
DisplayErrorMessage( editFrame, _( "Error loading board." ), ioe.What() );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ bool PANEL_ZONE_PROPERTIES::AcceptOptions( bool aUseExportableSetupOnly )
|
||||
|
||||
if( m_settings->m_ThermalReliefSpokeWidth < m_settings->m_ZoneMinThickness )
|
||||
{
|
||||
DisplayError( this, _( "Thermal spoke width cannot be smaller than the minimum width." ) );
|
||||
DisplayErrorMessage( this, _( "Thermal spoke width cannot be smaller than the minimum width." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -388,7 +388,7 @@ void PNS_LOG_VIEWER_FRAME::SetLogFile( PNS_LOG_FILE* aLog )
|
||||
drawLoggedItems( m_rewindIter );
|
||||
updateDumpPanel( m_rewindIter );
|
||||
updatePnsPreviewItems( m_rewindIter );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -427,7 +427,7 @@ void PNS_LOG_VIEWER_FRAME::onSaveAs( wxCommandEvent& event )
|
||||
{
|
||||
if( !m_logFile )
|
||||
{
|
||||
DisplayError( this, wxT( "No log file Loaded!" ) );
|
||||
DisplayErrorMessage( this, wxT( "No log file Loaded!" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user