72 if( fileName.IsEmpty() )
74 DisplayError(
this,
_(
"Please select a symbol library table file." ) );
78 wxFileName fn = fileName;
81 if( !fn.FileExists() )
92 tmpTable.
Load( fn.GetFullPath() );
105 if( !symTableFileName.DirExists() && !symTableFileName.Mkdir( 0x777, wxPATH_MKDIR_FULL ) )
108 symTableFileName.GetPath() ) );
113 if( !::wxCopyFile( fn.GetFullPath(), symTableFileName.GetFullPath() ) )
118 symTableFileName.GetFullPath() ) );
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
static SYMBOL_LIB_TABLE & GetGlobalLibTable()
This file is part of the common library.
bool TransferDataFromWindow() override
virtual ~DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG()
This file contains miscellaneous commonly used macros and functions.
static bool LoadGlobalTable(SYMBOL_LIB_TABLE &aTable)
Load the global symbol library table into aTable.
virtual const wxString What() const
A composite of Problem() and Where()
wxRadioButton * m_emptyRb
void Load(const wxString &aFileName)
Load the library table using the path defined by aFileName aFallBackTable.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
wxFilePickerCtrl * m_filePicker1
void Save(const wxString &aFileName) const
Write this library table to aFileName in s-expression form.
virtual wxFileName GetGlobalTableFileName() override
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
static wxString GetGlobalTableFileName()
Fetch the global symbol library table file name.
DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG(wxWindow *aParent)