From 10237c4270b710bd769bf58aaff4a4b714d86d45 Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Fri, 14 Mar 2025 20:00:15 +0000
Subject: [PATCH] Remove extraneous parameter and fix error dialog title.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20061
---
 common/confirm.cpp | 7 +++----
 include/confirm.h  | 4 +---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/common/confirm.cpp b/common/confirm.cpp
index 43465c8065..7a1ce5bc6f 100644
--- a/common/confirm.cpp
+++ b/common/confirm.cpp
@@ -167,7 +167,7 @@ int OKOrCancelDialog( wxWindow* aParent, const wxString& aWarning, const wxStrin
 
 
 // DisplayError should be deprecated, use DisplayErrorMessage instead
-void DisplayError( wxWindow* aParent, const wxString& aText, int aDisplayTime )
+void DisplayError( wxWindow* aParent, const wxString& aText )
 {
     if( !wxTheApp || !wxTheApp->IsMainLoopRunning() )
     {
@@ -182,10 +182,9 @@ void DisplayError( wxWindow* aParent, const wxString& aText, int aDisplayTime )
     }
 
     wxMessageDialog* dlg;
-    int              icon = aDisplayTime > 0 ? wxICON_INFORMATION : wxICON_ERROR;
 
-    dlg = new wxMessageDialog( aParent, aText, _( "Warning" ),
-                               wxOK | wxCENTRE | wxRESIZE_BORDER | icon | wxSTAY_ON_TOP );
+    dlg = new wxMessageDialog( aParent, aText, _( "Error" ),
+                               wxOK | wxCENTRE | wxRESIZE_BORDER | wxICON_ERROR | wxSTAY_ON_TOP );
 
     dlg->ShowModal();
     dlg->Destroy();
diff --git a/include/confirm.h b/include/confirm.h
index 75868696e1..fe99979f9a 100644
--- a/include/confirm.h
+++ b/include/confirm.h
@@ -86,10 +86,8 @@ KICOMMON_API bool ConfirmRevertDialog( wxWindow* parent, const wxString& aMessag
 
 /**
  * Display an error or warning message box with \a aMessage.
- *
- * @warning Setting \a displaytime does not work.  Do not use it.
  */
-KICOMMON_API void DisplayError( wxWindow* aParent, const wxString& aText, int aDisplayTime = 0 );
+KICOMMON_API void DisplayError( wxWindow* aParent, const wxString& aText );
 
 /**
  * Display an error message with \a aMessage