61 DisplayError(
this, wxString::Format(
_(
"Error creating symbol library table '%s'.\n"
72 if( fileName.IsEmpty() )
74 DisplayError(
this,
_(
"Please select a symbol library table file." ) );
78 wxFileName fn = fileName;
81 if( !fn.FileExists() )
83 DisplayError(
this, wxString::Format(
_(
"File '%s' not found." ), fn.GetFullPath() ) );
92 tmpTable.
Load( fn.GetFullPath() );
96 DisplayError(
this, wxString::Format(
_(
"Error reading symbol library table '%s'.\n"
98 fn.GetFullPath(), ioe.
What() ) );
105 if( !symTableFileName.DirExists() && !symTableFileName.Mkdir( 0x777, wxPATH_MKDIR_FULL ) )
107 DisplayError(
this, wxString::Format(
_(
"Cannot create global library table '%s'." ),
108 symTableFileName.GetPath() ) );
113 if( !::wxCopyFile( fn.GetFullPath(), symTableFileName.GetFullPath() ) )
116 wxString::Format(
_(
"Error copying global symbol library table '%s' "
118 fn.GetFullPath(), symTableFileName.GetFullPath() ) );
wxFilePickerCtrl * m_filePicker1
wxRadioButton * m_emptyRb
bool TransferDataFromWindow() override
DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG(wxWindow *aParent)
virtual ~DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG()
virtual wxFileName GetGlobalTableFileName() override
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
void Load(const wxString &aFileName)
Load the library table using the path defined by aFileName aFallBackTable.
void Save(const wxString &aFileName) const
Write this library table to aFileName in s-expression form.
static SYMBOL_LIB_TABLE & GetGlobalLibTable()
static wxString GetGlobalTableFileName()
Fetch the global symbol library table file name.
static bool LoadGlobalTable(SYMBOL_LIB_TABLE &aTable)
Load the global symbol library table into aTable.
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
This file is part of the common library.
This file contains miscellaneous commonly used macros and functions.