eeschema: Use system-dependent default wildcard

wxWidgets provides a system-dependent string for "*" or "*.*" depending
on the system.  Unfortunately, wxFormBuilder does not use this and
instead defaults to the Windows-only "*.*".  This is an ugly work
around.

Fixes: lp:1810221
* https://bugs.launchpad.net/kicad/+bug/1810221
This commit is contained in:
Seth Hillbrand 2019-01-05 19:58:40 -08:00
parent 69fc301bf3
commit 02a1bf1de6
5 changed files with 915 additions and 1112 deletions

View File

@ -1,170 +1,180 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2017 Wayne Stambaugh <stambaughw@gmail.com> * Copyright (C) 2017 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2017-2019 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your * Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. * option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "dialog_global_sym_lib_table_config.h" #include "dialog_global_sym_lib_table_config.h"
#include <confirm.h> #include <confirm.h>
#include <grid_tricks.h> #include <grid_tricks.h>
#include <kiface_i.h> #include <kiface_i.h>
#include <lib_table_grid.h> #include <lib_table_grid.h>
#include <lib_table_lexer.h> #include <lib_table_lexer.h>
#include <macros.h> #include <macros.h>
#include <wx/filename.h> #include <wx/filename.h>
#include "symbol_lib_table.h" #include "symbol_lib_table.h"
DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG( wxWindow* aParent ) : DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG( wxWindow* aParent ) :
DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE( aParent ) DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE( aParent )
{ {
wxFileName fn = SYMBOL_LIB_TABLE::GetGlobalTableFileName(); wxFileName fn = SYMBOL_LIB_TABLE::GetGlobalTableFileName();
// Attempt to find the default global file table from the KiCad template folder. // Attempt to find the default global file table from the KiCad template folder.
wxString fileName = Kiface().KifaceSearch().FindValidPath( fn.GetName() ); wxString fileName = Kiface().KifaceSearch().FindValidPath( fn.GetName() );
m_defaultFileFound = wxFileName::FileExists( fileName ); m_defaultFileFound = wxFileName::FileExists( fileName );
m_filePicker1->SetFileName( wxFileName( fileName ) );
m_filePicker_new = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _( "Select a file" ),
wxFileSelectorDefaultWildcardStr, wxDefaultPosition, wxDefaultSize,
wxFLP_DEFAULT_STYLE | wxFLP_FILE_MUST_EXIST | wxFLP_OPEN );
m_filePicker_new->SetFileName( wxFileName( fileName ) );
m_filePicker_new->Enable( false );
m_filePicker_new->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::onUpdateFilePicker ), NULL, this );
bSizer2->Replace( m_filePicker1, m_filePicker_new, true );
bSizer2->Layout();
if( !m_defaultFileFound ) if( !m_defaultFileFound )
m_customRb->SetValue( true ); m_customRb->SetValue( true );
wxButton* okButton = (wxButton *) FindWindowById( wxID_OK ); wxButton* okButton = (wxButton *) FindWindowById( wxID_OK );
if( okButton ) if( okButton )
okButton->SetDefault(); okButton->SetDefault();
FinishDialogSettings(); FinishDialogSettings();
} }
DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::~DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG() DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::~DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG()
{ {
} m_filePicker_new->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::onUpdateFilePicker ), NULL, this );
}
void DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::onUpdateFilePicker( wxUpdateUIEvent& aEvent )
{ void DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::onUpdateFilePicker( wxUpdateUIEvent& aEvent )
aEvent.Enable( m_customRb->GetValue() ); {
} aEvent.Enable( m_customRb->GetValue() );
}
void DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::onUpdateDefaultSelection( wxUpdateUIEvent& aEvent )
{ void DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::onUpdateDefaultSelection( wxUpdateUIEvent& aEvent )
aEvent.Enable( m_defaultFileFound ); {
} aEvent.Enable( m_defaultFileFound );
}
bool DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::TransferDataFromWindow()
{ bool DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::TransferDataFromWindow()
// Create an empty table if requested by the user. {
if( m_emptyRb->GetValue() ) // Create an empty table if requested by the user.
{ if( m_emptyRb->GetValue() )
SYMBOL_LIB_TABLE emptyTable; {
SYMBOL_LIB_TABLE emptyTable;
try
{ try
emptyTable.Save( SYMBOL_LIB_TABLE::GetGlobalTableFileName() ); {
} emptyTable.Save( SYMBOL_LIB_TABLE::GetGlobalTableFileName() );
catch( const IO_ERROR& ioe ) }
{ catch( const IO_ERROR& ioe )
DisplayError( this, {
wxString::Format( _( "Error occurred writing empty symbol library table " DisplayError( this,
"file.\n\n%s" ), wxString::Format( _( "Error occurred writing empty symbol library table "
SYMBOL_LIB_TABLE::GetGlobalTableFileName(), "file.\n\n%s" ),
ioe.What() ) ); SYMBOL_LIB_TABLE::GetGlobalTableFileName(),
return false; ioe.What() ) );
} return false;
}
return true;
} return true;
}
wxString fileName = m_filePicker1->GetPath();
wxString fileName = m_filePicker_new->GetPath();
if( fileName.IsEmpty() )
{ if( fileName.IsEmpty() )
DisplayError( this, _( "Please select a symbol library table file." ) ); {
return false; DisplayError( this, _( "Please select a symbol library table file." ) );
} return false;
}
wxFileName fn = fileName;
wxFileName fn = fileName;
// Make sure the symbol library table to copy actually exists.
if( !fn.FileExists() ) // Make sure the symbol library table to copy actually exists.
{ if( !fn.FileExists() )
DisplayError( this, {
DisplayError( this,
wxString::Format( _( "File \"%s\" not found." ), fn.GetFullPath() ) ); wxString::Format( _( "File \"%s\" not found." ), fn.GetFullPath() ) );
return false; return false;
} }
// Make sure the symbol library table to copy is a valid symbol library table file. // Make sure the symbol library table to copy is a valid symbol library table file.
SYMBOL_LIB_TABLE tmpTable; SYMBOL_LIB_TABLE tmpTable;
try try
{ {
tmpTable.Load( fn.GetFullPath() ); tmpTable.Load( fn.GetFullPath() );
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
DisplayError( this, DisplayError( this,
wxString::Format( _( "File \"%s\" is not a valid symbol library table " wxString::Format( _( "File \"%s\" is not a valid symbol library table "
"file.\n\n%s" ), fn.GetFullPath(), ioe.What() ) ); "file.\n\n%s" ), fn.GetFullPath(), ioe.What() ) );
return false; return false;
} }
// Create the config path if it doesn't already exist. // Create the config path if it doesn't already exist.
wxFileName symTableFileName = SYMBOL_LIB_TABLE::GetGlobalTableFileName(); wxFileName symTableFileName = SYMBOL_LIB_TABLE::GetGlobalTableFileName();
if( !symTableFileName.DirExists() && !symTableFileName.Mkdir( 0x777, wxPATH_MKDIR_FULL ) ) if( !symTableFileName.DirExists() && !symTableFileName.Mkdir( 0x777, wxPATH_MKDIR_FULL ) )
{ {
DisplayError( this, DisplayError( this,
wxString::Format( _( "Cannot create global library table path \"%s\"." ), wxString::Format( _( "Cannot create global library table path \"%s\"." ),
symTableFileName.GetPath() ) ); symTableFileName.GetPath() ) );
return false; return false;
} }
// Copy the global symbol library table file to the user config. // Copy the global symbol library table file to the user config.
if( !::wxCopyFile( fn.GetFullPath(), symTableFileName.GetFullPath() ) ) if( !::wxCopyFile( fn.GetFullPath(), symTableFileName.GetFullPath() ) )
{ {
DisplayError( this, DisplayError( this,
wxString::Format( _( "Cannot copy global symbol library table " wxString::Format( _( "Cannot copy global symbol library table "
"file:\n\n \"%s\"\n\n:to:\n\n\"%s\"." ), "file:\n\n \"%s\"\n\n:to:\n\n\"%s\"." ),
fn.GetFullPath(), symTableFileName.GetFullPath() ) ); fn.GetFullPath(), symTableFileName.GetFullPath() ) );
return false; return false;
} }
// Load the successfully copied symbol library table file. This should not fail // Load the successfully copied symbol library table file. This should not fail
// since the file was tested above. Check for failure anyway to keep the compiler // since the file was tested above. Check for failure anyway to keep the compiler
// from complaining. // from complaining.
try try
{ {
if( !SYMBOL_LIB_TABLE::LoadGlobalTable( SYMBOL_LIB_TABLE::GetGlobalLibTable() ) ) if( !SYMBOL_LIB_TABLE::LoadGlobalTable( SYMBOL_LIB_TABLE::GetGlobalLibTable() ) )
return false; return false;
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
DisplayError( this, DisplayError( this,
wxString::Format( _( "Error occurred loading global symbol library table:" wxString::Format( _( "Error occurred loading global symbol library table:"
"\n\n%s" ), ioe.What() ) ); "\n\n%s" ), ioe.What() ) );
return false; return false;
} }
return true; return true;
} }

View File

@ -1,42 +1,43 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2017 Wayne Stambaugh <stambaughw@gmail.com> * Copyright (C) 2017 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your * Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. * option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_H_ #ifndef _DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_H_
#define _DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_H_ #define _DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_H_
#include "dialog_global_sym_lib_table_config_base.h" #include "dialog_global_sym_lib_table_config_base.h"
class DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG : public DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE class DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG : public DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE
{ {
private: private:
bool m_defaultFileFound; bool m_defaultFileFound;
wxFilePickerCtrl* m_filePicker_new;
public:
DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG( wxWindow* aParent ); public:
virtual ~DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG(); DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG( wxWindow* aParent );
virtual ~DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG();
bool TransferDataFromWindow() override;
bool TransferDataFromWindow() override;
protected:
virtual void onUpdateFilePicker( wxUpdateUIEvent& aEvent ) override; protected:
virtual void onUpdateDefaultSelection( wxUpdateUIEvent& aEvent ) override; virtual void onUpdateFilePicker( wxUpdateUIEvent& aEvent ) override;
}; virtual void onUpdateDefaultSelection( wxUpdateUIEvent& aEvent ) override;
};
#endif // _DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_H_
#endif // _DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_H_

View File

@ -1,88 +1,87 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jul 29 2017) // C++ code generated with wxFormBuilder (version Nov 23 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "dialog_global_sym_lib_table_config_base.h" #include "dialog_global_sym_lib_table_config_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bSizer1; wxBoxSizer* bSizer1;
bSizer1 = new wxBoxSizer( wxHORIZONTAL ); bSizer1 = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer2; bSizer2 = new wxBoxSizer( wxVERTICAL );
bSizer2 = new wxBoxSizer( wxVERTICAL );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("KiCad has been run for the first time using the new symbol library table for accessing symbol libraries. In order for KiCad to access symbol libraries, you must configure your global symbol library table. Please select from one of the options below. If you are not sure which option to select, please use the default selection."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("KiCad has been run for the first time using the new symbol library table for accessing symbol libraries. In order for KiCad to access symbol libraries, you must configure your global symbol library table. Please select from one of the options below. If you are not sure which option to select, please use the default selection."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1->Wrap( 500 );
m_staticText1->Wrap( 500 ); bSizer2->Add( m_staticText1, 0, wxALL, 5 );
bSizer2->Add( m_staticText1, 0, wxALL, 5 );
bSizer2->Add( 0, 0, 0, wxALL|wxEXPAND, 5 );
bSizer2->Add( 0, 0, 0, wxALL|wxEXPAND, 5 );
m_defaultRb = new wxRadioButton( this, wxID_ANY, _("Copy default global symbol library table (recommended)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_defaultRb = new wxRadioButton( this, wxID_ANY, _("Copy default global symbol library table (recommended)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); m_defaultRb->SetValue( true );
m_defaultRb->SetValue( true ); m_defaultRb->SetToolTip( _("Select this option if you not sure about configuring the global symbol library table") );
m_defaultRb->SetToolTip( _("Select this option if you not sure about configuring the global symbol library table") );
bSizer2->Add( m_defaultRb, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizer2->Add( m_defaultRb, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_customRb = new wxRadioButton( this, wxID_ANY, _("Copy custom global symbol library table"), wxDefaultPosition, wxDefaultSize, 0 );
m_customRb = new wxRadioButton( this, wxID_ANY, _("Copy custom global symbol library table"), wxDefaultPosition, wxDefaultSize, 0 ); m_customRb->SetToolTip( _("Select this option to copy a symbol library table file other than the default") );
m_customRb->SetToolTip( _("Select this option to copy a symbol library table file other than the default") );
bSizer2->Add( m_customRb, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizer2->Add( m_customRb, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_emptyRb = new wxRadioButton( this, wxID_ANY, _("Create an empty global symbol library table"), wxDefaultPosition, wxDefaultSize, 0 );
m_emptyRb = new wxRadioButton( this, wxID_ANY, _("Create an empty global symbol library table"), wxDefaultPosition, wxDefaultSize, 0 ); m_emptyRb->SetToolTip( _("Select this option to define symbol libraries in project specific library tables") );
m_emptyRb->SetToolTip( _("Select this option to define symbol libraries in project specific library tables") );
bSizer2->Add( m_emptyRb, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizer2->Add( m_emptyRb, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizer2->Add( 0, 0, 0, wxALL|wxEXPAND, 5 );
bSizer2->Add( 0, 0, 0, wxALL|wxEXPAND, 5 );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Select global symbol library table file:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Select global symbol library table file:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText2->Wrap( -1 );
m_staticText2->Wrap( -1 ); bSizer2->Add( m_staticText2, 0, wxALL, 5 );
bSizer2->Add( m_staticText2, 0, wxALL, 5 );
m_filePicker1 = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a file"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN );
m_filePicker1 = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN ); m_filePicker1->Enable( false );
m_filePicker1->Enable( false );
bSizer2->Add( m_filePicker1, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizer2->Add( m_filePicker1, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizer2->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
bSizer2->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK ); m_sdbSizer1->Realize();
m_sdbSizer1->Realize();
bSizer2->Add( m_sdbSizer1, 1, wxEXPAND, 5 );
bSizer2->Add( m_sdbSizer1, 1, wxEXPAND, 5 );
bSizer1->Add( bSizer2, 1, wxALL|wxEXPAND, 5 );
bSizer1->Add( bSizer2, 1, wxALL|wxEXPAND, 5 );
this->SetSizer( bSizer1 );
this->SetSizer( bSizer1 ); this->Layout();
this->Layout(); bSizer1->Fit( this );
bSizer1->Fit( this );
this->Centre( wxBOTH );
this->Centre( wxBOTH );
// Connect Events
// Connect Events m_defaultRb->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::onUpdateDefaultSelection ), NULL, this );
m_defaultRb->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::onUpdateDefaultSelection ), NULL, this ); m_filePicker1->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::onUpdateFilePicker ), NULL, this );
m_filePicker1->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::onUpdateFilePicker ), NULL, this ); }
}
DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::~DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE()
DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::~DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE() {
{ // Disconnect Events
// Disconnect Events m_defaultRb->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::onUpdateDefaultSelection ), NULL, this );
m_defaultRb->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::onUpdateDefaultSelection ), NULL, this ); m_filePicker1->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::onUpdateFilePicker ), NULL, this );
m_filePicker1->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE::onUpdateFilePicker ), NULL, this );
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,63 +1,60 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jul 29 2017) // C++ code generated with wxFormBuilder (version Nov 23 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE_H__ #pragma once
#define __DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE_H__
#include <wx/artprov.h>
#include <wx/artprov.h> #include <wx/xrc/xmlres.h>
#include <wx/xrc/xmlres.h> #include <wx/intl.h>
#include <wx/intl.h> #include "dialog_shim.h"
class DIALOG_SHIM; #include <wx/string.h>
#include <wx/stattext.h>
#include "dialog_shim.h" #include <wx/gdicmn.h>
#include <wx/string.h> #include <wx/font.h>
#include <wx/stattext.h> #include <wx/colour.h>
#include <wx/gdicmn.h> #include <wx/settings.h>
#include <wx/font.h> #include <wx/radiobut.h>
#include <wx/colour.h> #include <wx/filepicker.h>
#include <wx/settings.h> #include <wx/statline.h>
#include <wx/radiobut.h> #include <wx/sizer.h>
#include <wx/filepicker.h> #include <wx/button.h>
#include <wx/statline.h> #include <wx/dialog.h>
#include <wx/sizer.h>
#include <wx/button.h> ///////////////////////////////////////////////////////////////////////////
#include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE
///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// class DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE : public DIALOG_SHIM
/// Class DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE {
/////////////////////////////////////////////////////////////////////////////// private:
class DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE : public DIALOG_SHIM
{ protected:
private: wxBoxSizer* bSizer2;
wxStaticText* m_staticText1;
protected: wxRadioButton* m_defaultRb;
wxStaticText* m_staticText1; wxRadioButton* m_customRb;
wxRadioButton* m_defaultRb; wxRadioButton* m_emptyRb;
wxRadioButton* m_customRb; wxStaticText* m_staticText2;
wxRadioButton* m_emptyRb; wxFilePickerCtrl* m_filePicker1;
wxStaticText* m_staticText2; wxStaticLine* m_staticline1;
wxFilePickerCtrl* m_filePicker1; wxStdDialogButtonSizer* m_sdbSizer1;
wxStaticLine* m_staticline1; wxButton* m_sdbSizer1OK;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK; // Virtual event handlers, overide them in your derived class
virtual void onUpdateDefaultSelection( wxUpdateUIEvent& event ) { event.Skip(); }
// Virtual event handlers, overide them in your derived class virtual void onUpdateFilePicker( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void onUpdateDefaultSelection( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void onUpdateFilePicker( wxUpdateUIEvent& event ) { event.Skip(); }
public:
public: DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure Global Symbol Library Table"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER );
~DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE();
DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure Global Symbol Library Table"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER );
~DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE(); };
};
#endif //__DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG_BASE_H__