Remove obsolete code
This commit is contained in:
@@ -471,8 +471,7 @@ set( COMMON_DLG_SRCS
|
||||
dialogs/panel_embedded_files.cpp
|
||||
dialogs/panel_embedded_files_base.cpp
|
||||
dialogs/panel_base_display_options.cpp
|
||||
dialogs/panel_global_lib_table_config.cpp
|
||||
dialogs/panel_global_lib_table_config_base.cpp
|
||||
dialogs/panel_base_display_options.cpp
|
||||
dialogs/panel_hotkeys_editor.cpp
|
||||
dialogs/panel_image_editor.cpp
|
||||
dialogs/panel_image_editor_base.cpp
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 Wayne Stambaugh <[email protected]>
|
||||
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "dialog_global_design_block_lib_table_config.h"
|
||||
|
||||
#include <confirm.h>
|
||||
#include <kiface_base.h>
|
||||
#include <kiway.h>
|
||||
#include <macros.h>
|
||||
|
||||
#include "design_block_lib_table.h"
|
||||
|
||||
#include <kiplatform/io.h>
|
||||
|
||||
|
||||
DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG::DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG(
|
||||
wxWindow* aParent ) :
|
||||
DIALOG_GLOBAL_LIB_TABLE_CONFIG( aParent, _( "design block" ), KIWAY::FACE_SCH )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG::~DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
wxFileName DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG::GetGlobalTableFileName()
|
||||
{
|
||||
return DESIGN_BLOCK_LIB_TABLE::GetGlobalTableFileName();
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG::TransferDataFromWindow()
|
||||
{
|
||||
// Create an empty table if requested by the user.
|
||||
if( m_emptyRb->GetValue() )
|
||||
{
|
||||
DESIGN_BLOCK_LIB_TABLE emptyTable;
|
||||
|
||||
try
|
||||
{
|
||||
emptyTable.Save( DESIGN_BLOCK_LIB_TABLE::GetGlobalTableFileName() );
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( this,
|
||||
wxString::Format( _( "Error creating design block library table '%s'.\n"
|
||||
"%s" ),
|
||||
DESIGN_BLOCK_LIB_TABLE::GetGlobalTableFileName(),
|
||||
ioe.What() ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxString fileName = m_filePicker1->GetPath();
|
||||
|
||||
if( fileName.IsEmpty() )
|
||||
{
|
||||
DisplayError( this, _( "Please select a design block library table file." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
wxFileName fn = fileName;
|
||||
|
||||
// Make sure the design block library table to copy actually exists.
|
||||
if( !fn.FileExists() )
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "File '%s' not found." ), fn.GetFullPath() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure the design block library table to copy is a valid design block library
|
||||
// table file.
|
||||
DESIGN_BLOCK_LIB_TABLE tmpTable;
|
||||
|
||||
try
|
||||
{
|
||||
tmpTable.Load( fn.GetFullPath() );
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( this,
|
||||
wxString::Format( _( "Error reading design block library table '%s'.\n"
|
||||
"%s" ),
|
||||
fn.GetFullPath(), ioe.What() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create the config path if it doesn't already exist.
|
||||
wxFileName designBlockTableFileName = DESIGN_BLOCK_LIB_TABLE::GetGlobalTableFileName();
|
||||
|
||||
if( !wxFileName::DirExists( designBlockTableFileName.GetPath() )
|
||||
&& !wxFileName::Mkdir( designBlockTableFileName.GetPath(), 0x777, wxPATH_MKDIR_FULL ) )
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "Cannot create global library table '%s'." ),
|
||||
designBlockTableFileName.GetPath() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Copy the global design block library table file to the user config.
|
||||
if( !::wxCopyFile( fn.GetFullPath(), designBlockTableFileName.GetFullPath() ) )
|
||||
{
|
||||
DisplayError(
|
||||
this,
|
||||
wxString::Format( _( "Error copying global design block library table '%s' "
|
||||
"to '%s'." ),
|
||||
fn.GetFullPath(), designBlockTableFileName.GetFullPath() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ensure the copied file is writable
|
||||
KIPLATFORM::IO::MakeWriteable( designBlockTableFileName.GetFullPath() );
|
||||
}
|
||||
|
||||
// Load the successfully copied design block library table file. This should not fail since the
|
||||
// file was tested above. Check for failure anyway to keep the compiler from complaining.
|
||||
try
|
||||
{
|
||||
if( !DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable(
|
||||
DESIGN_BLOCK_LIB_TABLE::GetGlobalLibTable() ) )
|
||||
return false;
|
||||
}
|
||||
catch( const IO_ERROR& )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG_H_
|
||||
#define _DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG_H_
|
||||
|
||||
#include <dialogs/dialog_global_lib_table_config.h>
|
||||
|
||||
|
||||
class DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG : public DIALOG_GLOBAL_LIB_TABLE_CONFIG
|
||||
{
|
||||
public:
|
||||
DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG( wxWindow* aParent );
|
||||
virtual ~DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG();
|
||||
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
virtual wxFileName GetGlobalTableFileName() override;
|
||||
};
|
||||
|
||||
#endif // _DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG_H_
|
||||
@@ -1,166 +0,0 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 Wayne Stambaugh <[email protected]>
|
||||
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <dialogs/panel_global_lib_table_config.h>
|
||||
|
||||
#include <env_vars.h>
|
||||
#include <pgm_base.h>
|
||||
#include <search_stack.h>
|
||||
#include <systemdirsappend.h>
|
||||
#include <confirm.h>
|
||||
|
||||
#include <kiplatform/environment.h>
|
||||
|
||||
|
||||
PANEL_GLOBAL_LIB_TABLE_CONFIG::PANEL_GLOBAL_LIB_TABLE_CONFIG( wxWindow* aParent,
|
||||
const wxString& aTableName,
|
||||
std::shared_ptr<PANEL_GLOBAL_LIB_TABLE_CONFIG_MODEL> aModel,
|
||||
const KIWAY::FACE_T aFaceType ) :
|
||||
PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE( aParent ),
|
||||
m_tableName( aTableName ),
|
||||
m_defaultFileFound( false ),
|
||||
m_faceType( aFaceType ),
|
||||
m_model( aModel )
|
||||
{
|
||||
wxString tmp;
|
||||
|
||||
tmp.Printf( _( "Configure Global %s Library Table" ), aTableName.Capitalize() );
|
||||
|
||||
tmp.Printf( _( "KiCad has been run for the first time using the new %s library table for\n"
|
||||
"accessing libraries. In order for KiCad to access %s libraries,\n"
|
||||
"you must configure your global %s library table. Please select from one\n"
|
||||
"of the options below. If you are not sure which option to select, please\n"
|
||||
"use the default selection." ), aTableName, aTableName, aTableName );
|
||||
m_staticText1->SetLabel( tmp );
|
||||
|
||||
tmp.Printf( _( "Copy default global %s library table (recommended)"), aTableName );
|
||||
m_defaultRb->SetLabel( tmp );
|
||||
tmp.Printf( _( "Select this option if you not sure about configuring the global %s library "
|
||||
"table" ), aTableName );
|
||||
m_defaultRb->SetToolTip( tmp );
|
||||
|
||||
tmp.Printf( _( "Copy custom global %s library table" ), aTableName );
|
||||
m_customRb->SetLabel( tmp );
|
||||
tmp.Printf( _( "Select this option to copy a %s library table file other than the default" ),
|
||||
aTableName );
|
||||
m_customRb->SetToolTip( tmp );
|
||||
|
||||
tmp.Printf( _( "Create an empty global %s library table" ), aTableName );
|
||||
m_emptyRb->SetLabel( tmp );
|
||||
tmp.Printf( _( "Select this option to define %s libraries in project specific library tables" ),
|
||||
aTableName );
|
||||
m_emptyRb->SetToolTip( tmp );
|
||||
|
||||
tmp.Printf( _( "Select global %s library table file:" ), aTableName );
|
||||
m_staticText2->SetLabel( tmp );
|
||||
|
||||
m_filePicker1->Connect( wxEVT_UPDATE_UI,
|
||||
wxUpdateUIEventHandler( PANEL_GLOBAL_LIB_TABLE_CONFIG::onUpdateFilePicker ),
|
||||
nullptr, this );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
PANEL_GLOBAL_LIB_TABLE_CONFIG::~PANEL_GLOBAL_LIB_TABLE_CONFIG()
|
||||
{
|
||||
m_filePicker1->Disconnect( wxEVT_UPDATE_UI,
|
||||
wxUpdateUIEventHandler( PANEL_GLOBAL_LIB_TABLE_CONFIG::onUpdateFilePicker ),
|
||||
nullptr, this );
|
||||
}
|
||||
|
||||
|
||||
void PANEL_GLOBAL_LIB_TABLE_CONFIG::onUpdateFilePicker( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
aEvent.Enable( m_customRb->GetValue() );
|
||||
}
|
||||
|
||||
|
||||
void PANEL_GLOBAL_LIB_TABLE_CONFIG::onUpdateDefaultSelection( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
aEvent.Enable( m_defaultFileFound );
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_GLOBAL_LIB_TABLE_CONFIG::TransferDataFromWindow()
|
||||
{
|
||||
if( m_emptyRb->GetValue() )
|
||||
{
|
||||
m_model->m_tableMode = PANEL_GLOBAL_LIB_TABLE_CONFIG_MODEL::TABLE_MODE::EMPTY;
|
||||
}
|
||||
else if (m_defaultRb->GetValue())
|
||||
{
|
||||
m_model->m_tableMode = PANEL_GLOBAL_LIB_TABLE_CONFIG_MODEL::TABLE_MODE::DEFAULT;
|
||||
}
|
||||
else if( m_customRb->GetValue() )
|
||||
{
|
||||
m_model->m_tableMode = PANEL_GLOBAL_LIB_TABLE_CONFIG_MODEL::TABLE_MODE::CUSTOM;
|
||||
m_model->m_customTablePath = m_filePicker1->GetPath();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_GLOBAL_LIB_TABLE_CONFIG::TransferDataToWindow()
|
||||
{
|
||||
if( !wxPanel::TransferDataToWindow() )
|
||||
return false;
|
||||
|
||||
wxFileName fn = GetGlobalTableFileName();
|
||||
|
||||
SEARCH_STACK ss;
|
||||
|
||||
GlobalPathsAppend( &ss, m_faceType );
|
||||
|
||||
wxString templatePath;
|
||||
const ENV_VAR_MAP& envVars = Pgm().GetLocalEnvVariables();
|
||||
|
||||
if( std::optional<wxString> v = ENV_VAR::GetVersionedEnvVarValue( envVars,
|
||||
wxT( "TEMPLATE_DIR" ) ) )
|
||||
{
|
||||
templatePath = *v;
|
||||
}
|
||||
|
||||
if( !templatePath.IsEmpty() )
|
||||
ss.AddPaths( templatePath, 0 );
|
||||
else
|
||||
templatePath = KIPLATFORM::ENV::GetUserConfigPath();
|
||||
|
||||
m_filePicker1->SetInitialDirectory( templatePath );
|
||||
|
||||
// Attempt to find the default global file table from the KiCad template folder.
|
||||
wxString fileName = ss.FindValidPath( fn.GetName() );
|
||||
|
||||
m_defaultFileFound = wxFileName::FileExists( fileName );
|
||||
|
||||
if( m_defaultFileFound )
|
||||
{
|
||||
m_model->m_defaultTablePath = fileName;
|
||||
m_filePicker1->SetPath( fileName );
|
||||
m_filePicker1->Enable( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_customRb->SetValue( true );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "panel_global_lib_table_config_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE::PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
||||
{
|
||||
wxBoxSizer* bSizer1;
|
||||
bSizer1 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
bSizer2 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticText1 = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1->Wrap( 500 );
|
||||
bSizer2->Add( m_staticText1, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bSizer2->Add( 0, 0, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_defaultRb = new wxRadioButton( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||
m_defaultRb->SetValue( true );
|
||||
m_defaultRb->SetToolTip( _("dummy") );
|
||||
|
||||
bSizer2->Add( m_defaultRb, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_customRb = new wxRadioButton( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_customRb->SetToolTip( _("dummy") );
|
||||
|
||||
bSizer2->Add( m_customRb, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_emptyRb = new wxRadioButton( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_emptyRb->SetToolTip( _("dummy") );
|
||||
|
||||
bSizer2->Add( m_emptyRb, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizer2->Add( 0, 0, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_staticText2 = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText2->Wrap( -1 );
|
||||
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->Enable( false );
|
||||
|
||||
bSizer2->Add( m_filePicker1, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizer1->Add( bSizer2, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizer1 );
|
||||
this->Layout();
|
||||
bSizer1->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
m_defaultRb->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE::onUpdateDefaultSelection ), NULL, this );
|
||||
m_filePicker1->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE::onUpdateFilePicker ), NULL, this );
|
||||
}
|
||||
|
||||
PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE::~PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_defaultRb->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE::onUpdateDefaultSelection ), NULL, this );
|
||||
m_filePicker1->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE::onUpdateFilePicker ), NULL, this );
|
||||
|
||||
}
|
||||
@@ -1,475 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="16" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
<property name="disconnect_events">1</property>
|
||||
<property name="disconnect_mode">source_name</property>
|
||||
<property name="disconnect_php_events">0</property>
|
||||
<property name="disconnect_python_events">0</property>
|
||||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">panel_global_lib_table_config_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="skip_lua_events">1</property>
|
||||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Panel" expanded="1">
|
||||
<property name="aui_managed">0</property>
|
||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="event_handler">impl_virtual</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="two_step_creation">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer1</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer2</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">protected</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">dummy</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">500</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="0">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">dummy</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_defaultRb</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRB_GROUP</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">dummy</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value">1</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnUpdateUI">onUpdateDefaultSelection</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">dummy</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_customRb</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">dummy</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">dummy</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_emptyRb</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">dummy</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="0">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">dummy</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText2</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxFilePickerCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">0</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="message">Select a file</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_filePicker1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxFLP_DEFAULT_STYLE|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="wildcard"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnUpdateUI">onUpdateFilePicker</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</wxFormBuilder_Project>
|
||||
@@ -1,55 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/filepicker.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxBoxSizer* bSizer2;
|
||||
wxStaticText* m_staticText1;
|
||||
wxRadioButton* m_defaultRb;
|
||||
wxRadioButton* m_customRb;
|
||||
wxRadioButton* m_emptyRb;
|
||||
wxStaticText* m_staticText2;
|
||||
wxFilePickerCtrl* m_filePicker1;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
virtual void onUpdateDefaultSelection( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void onUpdateFilePicker( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~PANEL_GLOBAL_LIB_TABLE_CONFIG_BASE();
|
||||
|
||||
};
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "startwizard_provider_schlib.h"
|
||||
#include "symbol_lib_table.h"
|
||||
#include <confirm.h>
|
||||
#include <kiplatform/io.h>
|
||||
|
||||
#include <dialogs/panel_global_lib_table_config.h>
|
||||
|
||||
|
||||
class PANEL_GLOBAL_SYM_LIB_TABLE_CONFIG : public PANEL_GLOBAL_LIB_TABLE_CONFIG
|
||||
{
|
||||
public:
|
||||
PANEL_GLOBAL_SYM_LIB_TABLE_CONFIG(
|
||||
wxWindow* aParent, std::shared_ptr<PANEL_GLOBAL_LIB_TABLE_CONFIG_MODEL> aModel ) :
|
||||
PANEL_GLOBAL_LIB_TABLE_CONFIG( aParent, _( "symbol" ), aModel, KIWAY::FACE_SCH )
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~PANEL_GLOBAL_SYM_LIB_TABLE_CONFIG(){};
|
||||
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
virtual wxFileName GetGlobalTableFileName() override
|
||||
{
|
||||
return SYMBOL_LIB_TABLE::GetGlobalTableFileName();
|
||||
}
|
||||
};
|
||||
|
||||
bool PANEL_GLOBAL_SYM_LIB_TABLE_CONFIG::TransferDataFromWindow()
|
||||
{
|
||||
// Create an empty table if requested by the user.
|
||||
if( m_emptyRb->GetValue() )
|
||||
{
|
||||
SYMBOL_LIB_TABLE emptyTable;
|
||||
|
||||
try
|
||||
{
|
||||
emptyTable.Save( SYMBOL_LIB_TABLE::GetGlobalTableFileName() );
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "Error creating symbol library table '%s'.\n"
|
||||
"%s" ),
|
||||
SYMBOL_LIB_TABLE::GetGlobalTableFileName(),
|
||||
ioe.What() ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxString fileName = m_filePicker1->GetPath();
|
||||
|
||||
if( fileName.IsEmpty() )
|
||||
{
|
||||
DisplayError( this, _( "Please select a symbol library table file." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
wxFileName fn = fileName;
|
||||
|
||||
// Make sure the symbol library table to copy actually exists.
|
||||
if( !fn.FileExists() )
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "File '%s' not found." ), fn.GetFullPath() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure the symbol library table to copy is a valid symbol library table file.
|
||||
SYMBOL_LIB_TABLE tmpTable;
|
||||
|
||||
try
|
||||
{
|
||||
tmpTable.Load( fn.GetFullPath() );
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "Error reading symbol library table '%s'.\n"
|
||||
"%s" ),
|
||||
fn.GetFullPath(), ioe.What() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create the config path if it doesn't already exist.
|
||||
wxFileName symTableFileName = SYMBOL_LIB_TABLE::GetGlobalTableFileName();
|
||||
|
||||
if( !wxFileName::DirExists( symTableFileName.GetPath() )
|
||||
&& !wxFileName::Mkdir( symTableFileName.GetPath(), 0x777, wxPATH_MKDIR_FULL ) )
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "Cannot create global library table '%s'." ),
|
||||
symTableFileName.GetPath() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Copy the global symbol library table file to the user config.
|
||||
if( !::wxCopyFile( fn.GetFullPath(), symTableFileName.GetFullPath() ) )
|
||||
{
|
||||
DisplayError( this,
|
||||
wxString::Format( _( "Error copying global symbol library table '%s' "
|
||||
"to '%s'." ),
|
||||
fn.GetFullPath(), symTableFileName.GetFullPath() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ensure the copied file is writable
|
||||
KIPLATFORM::IO::MakeWriteable( symTableFileName.GetFullPath() );
|
||||
}
|
||||
|
||||
// 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 from complaining.
|
||||
try
|
||||
{
|
||||
if( !SYMBOL_LIB_TABLE::LoadGlobalTable( SYMBOL_LIB_TABLE::GetGlobalLibTable() ) )
|
||||
return false;
|
||||
}
|
||||
catch( const IO_ERROR& )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
STARTWIZARD_PROVIDER_SCHLIB::STARTWIZARD_PROVIDER_SCHLIB() :
|
||||
STARTWIZARD_PROVIDER( wxT( "Schematic Libraries" ) )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
wxPanel* STARTWIZARD_PROVIDER_SCHLIB::GetWizardPanel( wxWindow* aParent )
|
||||
{
|
||||
m_model = std::make_shared<PANEL_GLOBAL_LIB_TABLE_CONFIG_MODEL>();
|
||||
return new PANEL_GLOBAL_SYM_LIB_TABLE_CONFIG( aParent, m_model );
|
||||
}
|
||||
|
||||
|
||||
bool STARTWIZARD_PROVIDER_SCHLIB::NeedsUserInput() const
|
||||
{
|
||||
wxFileName fn = SYMBOL_LIB_TABLE::GetGlobalTableFileName();
|
||||
|
||||
return !fn.FileExists();
|
||||
}
|
||||
|
||||
|
||||
void STARTWIZARD_PROVIDER_SCHLIB::Finish()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2023 Mark Roszko <[email protected]>
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef STARTWIZARD_PROVIDER_SCHLIB_H
|
||||
#define STARTWIZARD_PROVIDER_SCHLIB_H
|
||||
|
||||
#include <memory>
|
||||
#include <../include/startwizard/startwizard_provider.h>
|
||||
|
||||
class PANEL_GLOBAL_LIB_TABLE_CONFIG_MODEL;
|
||||
|
||||
class STARTWIZARD_PROVIDER_SCHLIB : public STARTWIZARD_PROVIDER
|
||||
{
|
||||
public:
|
||||
STARTWIZARD_PROVIDER_SCHLIB();
|
||||
|
||||
virtual bool NeedsUserInput() const override;
|
||||
|
||||
virtual wxPanel* GetWizardPanel( wxWindow* aParent ) override;
|
||||
|
||||
virtual void Finish() override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<PANEL_GLOBAL_LIB_TABLE_CONFIG_MODEL> m_model;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 Wayne Stambaugh <[email protected]>
|
||||
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _DIALOG_GLOBAL_LIB_TABLE_CONFIG_H_
|
||||
#define _DIALOG_GLOBAL_LIB_TABLE_CONFIG_H_
|
||||
|
||||
#include "dialog_global_lib_table_config_base.h"
|
||||
|
||||
#include <kiway.h>
|
||||
#include <wx/filename.h>
|
||||
|
||||
|
||||
class DIALOG_GLOBAL_LIB_TABLE_CONFIG : public DIALOG_GLOBAL_LIB_TABLE_CONFIG_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_GLOBAL_LIB_TABLE_CONFIG( wxWindow* aParent, const wxString& aTableName,
|
||||
const KIWAY::FACE_T aFaceType );
|
||||
virtual ~DIALOG_GLOBAL_LIB_TABLE_CONFIG();
|
||||
|
||||
virtual wxFileName GetGlobalTableFileName() = 0;
|
||||
|
||||
virtual bool TransferDataToWindow() override;
|
||||
|
||||
protected:
|
||||
virtual void onUpdateFilePicker( wxUpdateUIEvent& aEvent ) override;
|
||||
virtual void onUpdateDefaultSelection( wxUpdateUIEvent& aEvent ) override;
|
||||
|
||||
wxString m_tableName;
|
||||
bool m_defaultFileFound;
|
||||
KIWAY::FACE_T m_faceType;
|
||||
};
|
||||
|
||||
#endif // _DIALOG_GLOBAL_LIB_TABLE_CONFIG_H_
|
||||
@@ -23,8 +23,6 @@ set( KICAD_SRCS
|
||||
dialogs/dialog_copyfiles_job_settings_base.cpp
|
||||
dialogs/dialog_executecommand_job_settings.cpp
|
||||
dialogs/dialog_executecommand_job_settings_base.cpp
|
||||
dialogs/dialog_update_check_prompt_base.cpp
|
||||
dialogs/dialog_update_check_prompt.cpp
|
||||
dialogs/dialog_update_notice_base.cpp
|
||||
dialogs/dialog_update_notice.cpp
|
||||
dialogs/dialog_template_selector_base.cpp
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2023 Mark Roszko <[email protected]>
|
||||
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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 Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <dialogs/dialog_update_check_prompt.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <settings/kicad_settings.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
DIALOG_UPDATE_CHECK_PROMPT::DIALOG_UPDATE_CHECK_PROMPT( wxWindow* aWindow ) :
|
||||
DIALOG_UPDATE_CHECK_PROMPT_BASE( aWindow )
|
||||
{
|
||||
#ifndef KICAD_UPDATE_CHECK
|
||||
m_cbKiCadUpdates->Hide();
|
||||
#endif
|
||||
|
||||
m_sdbSizerOK->SetFocus();
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_UPDATE_CHECK_PROMPT::TransferDataFromWindow()
|
||||
{
|
||||
if( KICAD_SETTINGS* settings = GetAppSettings<KICAD_SETTINGS>( "kicad" ) )
|
||||
{
|
||||
settings->m_PcmUpdateCheck = m_cbPCMUpdates->GetValue();
|
||||
#ifndef KICAD_UPDATE_CHECK
|
||||
settings->m_KiCadUpdateCheck = m_cbKiCadUpdates->GetValue();
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2023 Mark Roszko <[email protected]>
|
||||
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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 Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <dialogs/dialog_update_check_prompt_base.h>
|
||||
|
||||
class DIALOG_UPDATE_CHECK_PROMPT : public DIALOG_UPDATE_CHECK_PROMPT_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_UPDATE_CHECK_PROMPT( wxWindow* aParent );
|
||||
|
||||
protected:
|
||||
bool TransferDataFromWindow() override;
|
||||
};
|
||||
@@ -1,67 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_update_check_prompt_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_UPDATE_CHECK_PROMPT_BASE::DIALOG_UPDATE_CHECK_PROMPT_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 );
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer4;
|
||||
fgSizer4 = new wxFlexGridSizer( 0, 2, 10, 0 );
|
||||
fgSizer4->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
wxBoxSizer* bSizer4;
|
||||
bSizer4 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_messageLine1 = new wxStaticText( this, wxID_ANY, _("Would you like to automatically check for updates on startup?"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_messageLine1->Wrap( -1 );
|
||||
bSizer4->Add( m_messageLine1, 0, wxALL, 5 );
|
||||
|
||||
m_cbKiCadUpdates = new wxCheckBox( this, wxID_ANY, _("KiCad"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbKiCadUpdates->SetValue(true);
|
||||
bSizer4->Add( m_cbKiCadUpdates, 0, wxALL, 5 );
|
||||
|
||||
m_cbPCMUpdates = new wxCheckBox( this, wxID_ANY, _("Plugin and Content Manager"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbPCMUpdates->SetValue(true);
|
||||
bSizer4->Add( m_cbPCMUpdates, 0, wxALL, 5 );
|
||||
|
||||
|
||||
fgSizer4->Add( bSizer4, 1, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
|
||||
fgSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
fgSizer4->Add( m_sdbSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( fgSizer4, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
}
|
||||
|
||||
DIALOG_UPDATE_CHECK_PROMPT_BASE::~DIALOG_UPDATE_CHECK_PROMPT_BASE()
|
||||
{
|
||||
}
|
||||
@@ -1,319 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="18"/>
|
||||
<object class="Project" expanded="true">
|
||||
<property name="code_generation">C++</property>
|
||||
<property name="cpp_class_decoration"></property>
|
||||
<property name="cpp_disconnect_events">1</property>
|
||||
<property name="cpp_event_generation">connect</property>
|
||||
<property name="cpp_help_provider">none</property>
|
||||
<property name="cpp_namespace"></property>
|
||||
<property name="cpp_precompiled_header"></property>
|
||||
<property name="cpp_use_array_enum">0</property>
|
||||
<property name="cpp_use_enum">0</property>
|
||||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="file">dialog_update_check_prompt_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="lua_skip_events">1</property>
|
||||
<property name="lua_ui_table">UI</property>
|
||||
<property name="name">dialog_update_check_prompt_base</property>
|
||||
<property name="path">.</property>
|
||||
<property name="php_disconnect_events">0</property>
|
||||
<property name="php_disconnect_mode">source_name</property>
|
||||
<property name="php_skip_events">1</property>
|
||||
<property name="python_disconnect_events">0</property>
|
||||
<property name="python_disconnect_mode">source_name</property>
|
||||
<property name="python_image_path_wrapper_function_name"></property>
|
||||
<property name="python_indent_with_spaces"></property>
|
||||
<property name="python_skip_events">1</property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<property name="use_native_eol">0</property>
|
||||
<object class="Dialog" expanded="true">
|
||||
<property name="aui_managed">0</property>
|
||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||
<property name="bg"></property>
|
||||
<property name="center">wxBOTH</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="event_handler">impl_virtual</property>
|
||||
<property name="extra_style"></property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">DIALOG_UPDATE_CHECK_PROMPT_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE</property>
|
||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Check for Updates</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="two_step_creation">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerMain</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxFlexGridSizer" expanded="true">
|
||||
<property name="cols">2</property>
|
||||
<property name="flexible_direction">wxBOTH</property>
|
||||
<property name="growablecols"></property>
|
||||
<property name="growablerows"></property>
|
||||
<property name="hgap">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">fgSizer4</property>
|
||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">0</property>
|
||||
<property name="vgap">10</property>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer4</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Would you like to automatically check for updates on startup?</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_messageLine1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">1</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">KiCad</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_cbKiCadUpdates</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">1</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Plugin and Content Manager</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_cbPCMUpdates</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="true">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="true">
|
||||
<property name="Apply">0</property>
|
||||
<property name="Cancel">1</property>
|
||||
<property name="ContextHelp">0</property>
|
||||
<property name="Help">0</property>
|
||||
<property name="No">0</property>
|
||||
<property name="OK">1</property>
|
||||
<property name="Save">0</property>
|
||||
<property name="Yes">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_sdbSizer</property>
|
||||
<property name="permission">protected</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</wxFormBuilder_Project>
|
||||
@@ -1,49 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_UPDATE_CHECK_PROMPT_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_UPDATE_CHECK_PROMPT_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_messageLine1;
|
||||
wxCheckBox* m_cbKiCadUpdates;
|
||||
wxCheckBox* m_cbPCMUpdates;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_UPDATE_CHECK_PROMPT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Check for Updates"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
|
||||
~DIALOG_UPDATE_CHECK_PROMPT_BASE();
|
||||
|
||||
};
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <build_version.h>
|
||||
#include <confirm.h>
|
||||
#include <dialogs/panel_kicad_launcher.h>
|
||||
#include <dialogs/dialog_update_check_prompt.h>
|
||||
#include <dialogs/panel_jobset.h>
|
||||
#include <dialogs/dialog_edit_cfg.h>
|
||||
#include <eda_base_frame.h>
|
||||
@@ -1218,14 +1217,6 @@ void KICAD_MANAGER_FRAME::OnIdle( wxIdleEvent& aEvent )
|
||||
|
||||
KICAD_SETTINGS* settings = kicadSettings();
|
||||
|
||||
if( !Pgm().GetCommonSettings()->m_DoNotShowAgain.update_check_prompt )
|
||||
{
|
||||
auto prompt = new DIALOG_UPDATE_CHECK_PROMPT( this );
|
||||
prompt->ShowModal();
|
||||
|
||||
Pgm().GetCommonSettings()->m_DoNotShowAgain.update_check_prompt = true;
|
||||
}
|
||||
|
||||
if( KIPLATFORM::POLICY::GetPolicyBool( POLICY_KEY_PCM ) != KIPLATFORM::POLICY::PBOOL::DISABLED
|
||||
&& settings->m_PcmUpdateCheck )
|
||||
{
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 Wayne Stambaugh <[email protected]>
|
||||
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "dialog_global_fp_lib_table_config.h"
|
||||
|
||||
#include <confirm.h>
|
||||
#include <kiface_base.h>
|
||||
#include <kiway.h>
|
||||
|
||||
#include "fp_lib_table.h"
|
||||
|
||||
#include <kiplatform/io.h>
|
||||
|
||||
|
||||
DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG( wxWindow* aParent ) :
|
||||
DIALOG_GLOBAL_LIB_TABLE_CONFIG( aParent, _( "footprint" ), KIWAY::FACE_PCB )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::~DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
wxFileName DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::GetGlobalTableFileName()
|
||||
{
|
||||
return FP_LIB_TABLE::GetGlobalTableFileName();
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::TransferDataFromWindow()
|
||||
{
|
||||
// Create an empty table if requested by the user.
|
||||
if( m_emptyRb->GetValue() )
|
||||
{
|
||||
FP_LIB_TABLE emptyTable;
|
||||
|
||||
try
|
||||
{
|
||||
emptyTable.Save( FP_LIB_TABLE::GetGlobalTableFileName() );
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "Error occurred writing empty footprint "
|
||||
"library table '%s'." ),
|
||||
FP_LIB_TABLE::GetGlobalTableFileName() )
|
||||
+ wxS( "\n" ) + ioe.What() );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxString fileName = m_filePicker1->GetPath();
|
||||
|
||||
if( fileName.IsEmpty() )
|
||||
{
|
||||
DisplayError( this, _( "Please select a footprint library table file." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
wxFileName fn = fileName;
|
||||
|
||||
// Make sure the footprint library table to copy actually exists.
|
||||
if( !fn.FileExists() )
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "File '%s' not found." ), fn.GetFullPath() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure the footprint library table to copy is a valid footprint library table file.
|
||||
FP_LIB_TABLE tmpTable;
|
||||
|
||||
try
|
||||
{
|
||||
tmpTable.Load( fn.GetFullPath() );
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( this,
|
||||
wxString::Format( _( "'%s' is not a valid footprint library table." ),
|
||||
fn.GetFullPath() )
|
||||
+ wxS( "\n" ) + ioe.What() );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create the config path if it doesn't already exist.
|
||||
wxFileName fpTableFileName = FP_LIB_TABLE::GetGlobalTableFileName();
|
||||
|
||||
if( !wxFileName::DirExists( fpTableFileName.GetPath() )
|
||||
&& !wxFileName::Mkdir( fpTableFileName.GetPath(), 0x777, wxPATH_MKDIR_FULL ) )
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "Cannot create library table path '%s'." ),
|
||||
fpTableFileName.GetPath() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Copy the global footprint library table file to the user config.
|
||||
if( !::wxCopyFile( fn.GetFullPath(), fpTableFileName.GetFullPath() ) )
|
||||
{
|
||||
DisplayError( this,
|
||||
wxString::Format( _( "Cannot copy footprint library table from:\n"
|
||||
"%s\n"
|
||||
"to:\n"
|
||||
"%s." ),
|
||||
fn.GetFullPath(), fpTableFileName.GetFullPath() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ensure the copied file is writable
|
||||
KIPLATFORM::IO::MakeWriteable( fpTableFileName.GetFullPath() );
|
||||
}
|
||||
|
||||
// Load the successfully copied footprint library table file. This should not fail
|
||||
// since the file was tested above. Check for failure anyway to keep the compiler
|
||||
// from complaining.
|
||||
try
|
||||
{
|
||||
if( !FP_LIB_TABLE::LoadGlobalTable( GFootprintTable ) )
|
||||
return false;
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( this, _( "Error loading footprint library table." )
|
||||
+ wxS( "\n" ) + ioe.What() );
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user