diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 1e8d154146..f4ed42fb5b 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -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; } diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp index 10f9709132..92594110ac 100644 --- a/common/eda_doc.cpp +++ b/common/eda_doc.cpp @@ -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; diff --git a/common/gestfich.cpp b/common/gestfich.cpp index d4700a1c6a..2228df412a 100644 --- a/common/gestfich.cpp +++ b/common/gestfich.cpp @@ -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; } } diff --git a/common/validators.cpp b/common/validators.cpp index 067538bfe7..44c540cc6c 100644 --- a/common/validators.cpp +++ b/common/validators.cpp @@ -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; } diff --git a/common/widgets/unit_binder.cpp b/common/widgets/unit_binder.cpp index ad5c065f74..e8ec80ffa4 100644 --- a/common/widgets/unit_binder.cpp +++ b/common/widgets/unit_binder.cpp @@ -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(); diff --git a/cvpcb/dialogs/dialog_config_equfiles.cpp b/cvpcb/dialogs/dialog_config_equfiles.cpp index e9718c488c..0b33082af0 100644 --- a/cvpcb/dialogs/dialog_config_equfiles.cpp +++ b/cvpcb/dialogs/dialog_config_equfiles.cpp @@ -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() ) ); } } diff --git a/cvpcb/display_footprints_frame.cpp b/cvpcb/display_footprints_frame.cpp index 36000ad5d1..ddc7514f04 100644 --- a/cvpcb/display_footprints_frame.cpp +++ b/cvpcb/display_footprints_frame.cpp @@ -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; } diff --git a/eeschema/design_block_utils.cpp b/eeschema/design_block_utils.cpp index 839de0a2d4..93f1e68761 100644 --- a/eeschema/design_block_utils.cpp +++ b/eeschema/design_block_utils.cpp @@ -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; } diff --git a/eeschema/dialogs/dialog_bom.cpp b/eeschema/dialogs/dialog_bom.cpp index 70343e1f76..ff8a3a6683 100644 --- a/eeschema/dialogs/dialog_bom.cpp +++ b/eeschema/dialogs/dialog_bom.cpp @@ -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() ); } } diff --git a/eeschema/dialogs/dialog_edit_symbols_libid.cpp b/eeschema/dialogs/dialog_edit_symbols_libid.cpp index 141539c730..5fb728101b 100644 --- a/eeschema/dialogs/dialog_edit_symbols_libid.cpp +++ b/eeschema/dialogs/dialog_edit_symbols_libid.cpp @@ -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 ) diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index 80a05f30c0..7359329506 100644 --- a/eeschema/dialogs/dialog_erc.cpp +++ b/eeschema/dialogs/dialog_erc.cpp @@ -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() ) ); } } diff --git a/pcbnew/load_select_footprint.cpp b/pcbnew/load_select_footprint.cpp index 89714007b1..0832adb09c 100644 --- a/pcbnew/load_select_footprint.cpp +++ b/pcbnew/load_select_footprint.cpp @@ -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; } diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 5c4c8f8df7..ffe2acb3a6 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -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; } } diff --git a/pcbnew/specctra_import_export/specctra_export.cpp b/pcbnew/specctra_import_export/specctra_export.cpp index afbe449059..094d8d96f8 100644 --- a/pcbnew/specctra_import_export/specctra_export.cpp +++ b/pcbnew/specctra_import_export/specctra_export.cpp @@ -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> diff --git a/pcbnew/specctra_import_export/specctra_import.cpp b/pcbnew/specctra_import_export/specctra_import.cpp index 1ed04063e4..066d8159f3 100644 --- a/pcbnew/specctra_import_export/specctra_import.cpp +++ b/pcbnew/specctra_import_export/specctra_import.cpp @@ -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; } diff --git a/pcbnew/tools/footprint_editor_control.cpp b/pcbnew/tools/footprint_editor_control.cpp index 4f7a3a3405..8bdf29dc5e 100644 --- a/pcbnew/tools/footprint_editor_control.cpp +++ b/pcbnew/tools/footprint_editor_control.cpp @@ -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( ... ) { diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index 3161f1db16..3b87ebc7a6 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -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; } diff --git a/pcbnew/zone_manager/panel_zone_properties.cpp b/pcbnew/zone_manager/panel_zone_properties.cpp index a7d51efb9b..8c666bf5e8 100644 --- a/pcbnew/zone_manager/panel_zone_properties.cpp +++ b/pcbnew/zone_manager/panel_zone_properties.cpp @@ -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; } diff --git a/qa/tools/pns/pns_log_viewer_frame.cpp b/qa/tools/pns/pns_log_viewer_frame.cpp index 090b067cea..079c2ece95 100644 --- a/qa/tools/pns/pns_log_viewer_frame.cpp +++ b/qa/tools/pns/pns_log_viewer_frame.cpp @@ -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; }