From ed4fee76493c3ec3e298d617b7f15bc1ff43f1b7 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 25 Aug 2014 18:31:32 +0200 Subject: [PATCH] Eeschema: add dialog libedit options and move options relative to libedit from eeschema options to this dialog. Ensure some values initialized by the schematic editor and used by libedit are also initialized in libedit even if the schematic editor was not started. Remove useless commands (save/load project config) in libedit, because now they have no sense. --- 3d-viewer/3d_toolbar.cpp | 10 +- eeschema/CMakeLists.txt | 2 + eeschema/dialogs/dialog_eeschema_options.h | 3 - .../dialogs/dialog_eeschema_options_base.cpp | 23 +- .../dialogs/dialog_eeschema_options_base.fbp | 268 +-- .../dialogs/dialog_eeschema_options_base.h | 9 +- eeschema/dialogs/dialog_libedit_options.cpp | 59 + eeschema/dialogs/dialog_libedit_options.h | 61 + .../dialogs/dialog_libedit_options_base.cpp | 138 ++ .../dialogs/dialog_libedit_options_base.fbp | 1707 +++++++++++++++++ .../dialogs/dialog_libedit_options_base.h | 71 + eeschema/eeschema_config.cpp | 153 +- eeschema/eeschema_config.h | 6 - eeschema/general.h | 23 +- eeschema/lib_pin.cpp | 6 +- eeschema/libeditframe.cpp | 47 +- eeschema/libeditframe.h | 29 +- eeschema/menubar_libedit.cpp | 34 +- eeschema/pinedit.cpp | 6 +- eeschema/schframe.cpp | 2 +- include/wxEeschemaStruct.h | 2 +- pagelayout_editor/pl_editor_config.cpp | 2 - 22 files changed, 2230 insertions(+), 431 deletions(-) create mode 100644 eeschema/dialogs/dialog_libedit_options.cpp create mode 100644 eeschema/dialogs/dialog_libedit_options.h create mode 100644 eeschema/dialogs/dialog_libedit_options_base.cpp create mode 100644 eeschema/dialogs/dialog_libedit_options_base.fbp create mode 100644 eeschema/dialogs/dialog_libedit_options_base.h diff --git a/3d-viewer/3d_toolbar.cpp b/3d-viewer/3d_toolbar.cpp index a81d49daa8..1213c11c6d 100644 --- a/3d-viewer/3d_toolbar.cpp +++ b/3d-viewer/3d_toolbar.cpp @@ -158,7 +158,7 @@ void EDA_3D_FRAME::CreateMenuBar() wxMenu * renderOptionsMenu = new wxMenu; AddMenuItem( prefsMenu, renderOptionsMenu, ID_MENU3D_COLOR, - _( "Render options" ), KiBitmap( tools_xpm ) ); + _( "Render Options" ), KiBitmap( tools_xpm ) ); AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_SHADOWS, _( "Render Shadows" ), @@ -180,7 +180,7 @@ void EDA_3D_FRAME::CreateMenuBar() KiBitmap( green_xpm ), wxITEM_CHECK ); AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_MATERIAL, - _( "Render Material properties" ), + _( "Render Material Properties" ), KiBitmap( green_xpm ), wxITEM_CHECK ); prefsMenu->AppendSeparator(); @@ -224,10 +224,10 @@ void EDA_3D_FRAME::CreateMenuBar() prefsMenu->AppendSeparator(); AddMenuItem( prefsMenu, ID_MENU3D_SHOW_BOARD_BODY, - _( "Show Board Body" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK ); + _( "Show Board Bod&y" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK ); AddMenuItem( prefsMenu, ID_MENU3D_USE_COPPER_THICKNESS, - _( "Show Copper Thickness" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK ); + _( "Show Copper &Thickness" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK ); AddMenuItem( prefsMenu, ID_MENU3D_MODULE_ONOFF, _( "Show 3D F&ootprints" ), KiBitmap( shape_3d_xpm ), wxITEM_CHECK ); @@ -239,7 +239,7 @@ void EDA_3D_FRAME::CreateMenuBar() wxMenu * layersMenu = new wxMenu; AddMenuItem( prefsMenu, layersMenu, ID_MENU3D_LAYERS, - _( "Show Layers" ), KiBitmap( tools_xpm ) ); + _( "Show &Layers" ), KiBitmap( tools_xpm ) ); AddMenuItem( layersMenu, ID_MENU3D_ADHESIVE_ONOFF, _( "Show &Adhesive Layers" ), KiBitmap( tools_xpm ), wxITEM_CHECK ); diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index f857ed1891..5ff221eba7 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -48,6 +48,8 @@ set( EESCHEMA_DLGS dialogs/dialog_libedit_dimensions_base.cpp dialogs/dialog_lib_edit_draw_item.cpp dialogs/dialog_lib_edit_draw_item_base.cpp + dialogs/dialog_libedit_options_base.cpp + dialogs/dialog_libedit_options.cpp dialogs/dialog_lib_edit_pin.cpp dialogs/dialog_lib_edit_pin_base.cpp dialogs/dialog_lib_new_component.cpp diff --git a/eeschema/dialogs/dialog_eeschema_options.h b/eeschema/dialogs/dialog_eeschema_options.h index 1d49bdd694..01ce909728 100644 --- a/eeschema/dialogs/dialog_eeschema_options.h +++ b/eeschema/dialogs/dialog_eeschema_options.h @@ -58,9 +58,6 @@ public: void SetLineWidth( int aWidth ) { m_spinLineWidth->SetValue( aWidth ); } int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); } - void SetPinLength( int aLength ) { m_spinPinLength->SetValue( aLength ); } - int GetPinLength( void ) { return m_spinPinLength->GetValue(); } - void SetTextSize( int text_size ) { m_spinTextSize->SetValue( text_size ); } int GetTextSize( void ) { return m_spinTextSize->GetValue(); } diff --git a/eeschema/dialogs/dialog_eeschema_options_base.cpp b/eeschema/dialogs/dialog_eeschema_options_base.cpp index a64f18ea81..e921389d25 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.cpp +++ b/eeschema/dialogs/dialog_eeschema_options_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -35,7 +35,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx bSizer3 = new wxBoxSizer( wxVERTICAL ); wxFlexGridSizer* fgSizer1; - fgSizer1 = new wxFlexGridSizer( 11, 3, 0, 0 ); + fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 ); fgSizer1->AddGrowableCol( 0 ); fgSizer1->AddGrowableCol( 1 ); fgSizer1->AddGrowableCol( 2 ); @@ -89,17 +89,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx m_staticLineWidthUnits->Wrap( -1 ); fgSizer1->Add( m_staticLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); - m_staticText52 = new wxStaticText( m_panel1, wxID_ANY, _("Default pin length:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText52->Wrap( -1 ); - fgSizer1->Add( m_staticText52, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 ); - - m_spinPinLength = new wxSpinCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 50, 1000, 100 ); - fgSizer1->Add( m_spinPinLength, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 3 ); - - m_staticPinLengthUnits = new wxStaticText( m_panel1, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticPinLengthUnits->Wrap( -1 ); - fgSizer1->Add( m_staticPinLengthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 ); - m_staticText7 = new wxStaticText( m_panel1, wxID_ANY, _("Default text &size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText7->Wrap( -1 ); fgSizer1->Add( m_staticText7, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); @@ -247,6 +236,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName1 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_fieldName1->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName1, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText161 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 2"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -254,6 +244,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText161, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName2 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_fieldName2->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName2, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText17 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 3"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -261,6 +252,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName3 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_fieldName3->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName3, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText18 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 4"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -268,6 +260,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText18, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName4 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_fieldName4->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName4, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText19 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 5"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -275,6 +268,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText19, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName5 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_fieldName5->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName5, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText20 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 6"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -282,6 +276,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText20, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName6 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_fieldName6->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName6, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText21 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 7"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -289,6 +284,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName7 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_fieldName7->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName7, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); m_staticText22 = new wxStaticText( m_panel2, wxID_ANY, _("Custom field 8"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -296,6 +292,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx fgSizer2->Add( m_staticText22, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 3 ); m_fieldName8 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_fieldName8->SetMaxLength( 0 ); fgSizer2->Add( m_fieldName8, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); diff --git a/eeschema/dialogs/dialog_eeschema_options_base.fbp b/eeschema/dialogs/dialog_eeschema_options_base.fbp index b8e18ad1a9..7739c44ca0 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.fbp +++ b/eeschema/dialogs/dialog_eeschema_options_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 1 0 @@ -42,7 +44,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE - 508,560 + 508,583 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Schematic Editor Options @@ -288,7 +290,7 @@ fgSizer1 wxFLEX_GROWMODE_SPECIFIED none - 11 + 0 0 3 @@ -892,6 +894,7 @@ + @@ -1145,6 +1148,7 @@ + @@ -1231,259 +1235,6 @@ - - 3 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Default pin length: - - 0 - - - 0 - - 1 - m_staticText52 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxALIGN_CENTER|wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 100 - 1000 - - 0 - - 50 - - 0 - - 1 - m_spinPinLength - 1 - - - protected - 1 - - Resizable - 1 - - wxSP_ARROW_KEYS|wxSP_WRAP - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - mils - - 0 - - - 0 - - 1 - m_staticPinLengthUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - 3 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT @@ -1651,6 +1402,7 @@ + @@ -1904,6 +1656,7 @@ + @@ -2157,6 +1910,7 @@ + @@ -2410,6 +2164,7 @@ + @@ -2590,6 +2345,7 @@ + diff --git a/eeschema/dialogs/dialog_eeschema_options_base.h b/eeschema/dialogs/dialog_eeschema_options_base.h index 4ed5cb762a..1413565d90 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.h +++ b/eeschema/dialogs/dialog_eeschema_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,8 @@ #include #include #include +class DIALOG_SHIM; + #include "dialog_shim.h" #include #include @@ -67,9 +69,6 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM wxStaticText* m_staticText5; wxSpinCtrl* m_spinLineWidth; wxStaticText* m_staticLineWidthUnits; - wxStaticText* m_staticText52; - wxSpinCtrl* m_spinPinLength; - wxStaticText* m_staticPinLengthUnits; wxStaticText* m_staticText7; wxSpinCtrl* m_spinTextSize; wxStaticText* m_staticTextSizeUnits; @@ -124,7 +123,7 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM public: - DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 508,560 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 508,583 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_EESCHEMA_OPTIONS_BASE(); }; diff --git a/eeschema/dialogs/dialog_libedit_options.cpp b/eeschema/dialogs/dialog_libedit_options.cpp new file mode 100644 index 0000000000..578a728a46 --- /dev/null +++ b/eeschema/dialogs/dialog_libedit_options.cpp @@ -0,0 +1,59 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2009 Wayne Stambaugh + * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 1992-2011 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 + */ + +/** + * @file dialog_libedit_options.cpp + */ + +#include +#include + +#include + + +DIALOG_LIBEDIT_OPTIONS::DIALOG_LIBEDIT_OPTIONS( wxWindow* parent ) : + DIALOG_LIBEDIT_OPTIONS_BASE( parent ) +{ + m_sdbSizer1OK->SetDefault(); +} + +void DIALOG_LIBEDIT_OPTIONS::SetGridSizes( const GRIDS& grid_sizes, int grid_id ) +{ + wxASSERT( grid_sizes.size() > 0 ); + + int select = wxNOT_FOUND; + + for( size_t i = 0; i < grid_sizes.size(); i++ ) + { + wxString tmp; + tmp.Printf( wxT( "%0.1f" ), grid_sizes[i].m_Size.x ); + m_choiceGridSize->Append( tmp ); + + if( grid_sizes[i].m_Id == grid_id ) + select = (int) i; + } + + m_choiceGridSize->SetSelection( select ); +} diff --git a/eeschema/dialogs/dialog_libedit_options.h b/eeschema/dialogs/dialog_libedit_options.h new file mode 100644 index 0000000000..59042502a2 --- /dev/null +++ b/eeschema/dialogs/dialog_libedit_options.h @@ -0,0 +1,61 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2009 Wayne Stambaugh + * Copyright (C) 1992-2011 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 + */ + +/** + * @file dialog_libedit_options.h + * + * Subclass of DIALOG_LIBEDIT_OPTIONS_BASE, which is generated by wxFormBuilder. + */ + +#ifndef __DIALOG_LIBEDIT_OPTIONS__ +#define __DIALOG_LIBEDIT_OPTIONS__ + +#include + +class DIALOG_LIBEDIT_OPTIONS : public DIALOG_LIBEDIT_OPTIONS_BASE +{ +public: + DIALOG_LIBEDIT_OPTIONS( wxWindow* parent ); + + void SetGridSelection( int select ) { m_choiceGridSize->SetSelection( select ); } + int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); } + void SetGridSizes( const GRIDS& grid_sizes, int grid_id ); + + void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); } + bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); } + + void SetLineWidth( int aWidth ) { m_spinLineWidth->SetValue( aWidth ); } + int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); } + + void SetPinLength( int aLength ) { m_spinPinLength->SetValue( aLength ); } + int GetPinLength( void ) { return m_spinPinLength->GetValue(); } + + void SetPinNumSize( int text_size ) { m_spinPinNumSize->SetValue( text_size ); } + int GetPinNumSize( void ) { return m_spinPinNumSize->GetValue(); } + + void SetPinNameSize( int text_size ) { m_spinPinNameSize->SetValue( text_size ); } + int GetPinNameSize( void ) { return m_spinPinNameSize->GetValue(); } +}; + +#endif // __DIALOG_LIBEDIT_OPTIONS__ diff --git a/eeschema/dialogs/dialog_libedit_options_base.cpp b/eeschema/dialogs/dialog_libedit_options_base.cpp new file mode 100644 index 0000000000..ff15ede07d --- /dev/null +++ b/eeschema/dialogs/dialog_libedit_options_base.cpp @@ -0,0 +1,138 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 5 2014) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_libedit_options_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_LIBEDIT_OPTIONS_BASE::DIALOG_LIBEDIT_OPTIONS_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* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bOptionsSizer; + bOptionsSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* p1mainSizer; + p1mainSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer; + fgSizer = new wxFlexGridSizer( 0, 3, 0, 0 ); + fgSizer->AddGrowableCol( 0 ); + fgSizer->AddGrowableCol( 1 ); + fgSizer->AddGrowableCol( 2 ); + fgSizer->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, _("&Grid size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + fgSizer->Add( m_staticText3, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + wxArrayString m_choiceGridSizeChoices; + m_choiceGridSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceGridSizeChoices, 0 ); + m_choiceGridSize->SetSelection( 0 ); + fgSizer->Add( m_choiceGridSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 3 ); + + m_staticGridUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticGridUnits->Wrap( -1 ); + fgSizer->Add( m_staticGridUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + m_staticText5 = new wxStaticText( this, wxID_ANY, _("Default &line width:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + fgSizer->Add( m_staticText5, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + m_spinLineWidth = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 100, 1 ); + fgSizer->Add( m_spinLineWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); + + m_staticLineWidthUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticLineWidthUnits->Wrap( -1 ); + fgSizer->Add( m_staticLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + m_staticText52 = new wxStaticText( this, wxID_ANY, _("Default pin length:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText52->Wrap( -1 ); + fgSizer->Add( m_staticText52, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 ); + + m_spinPinLength = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 50, 1000, 200 ); + fgSizer->Add( m_spinPinLength, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 3 ); + + m_staticPinLengthUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticPinLengthUnits->Wrap( -1 ); + fgSizer->Add( m_staticPinLengthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 ); + + m_staticText7 = new wxStaticText( this, wxID_ANY, _("Default pin num &size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText7->Wrap( -1 ); + fgSizer->Add( m_staticText7, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + m_spinPinNumSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 1000, 0 ); + fgSizer->Add( m_spinPinNumSize, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); + + m_staticTextSizeUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSizeUnits->Wrap( -1 ); + fgSizer->Add( m_staticTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + m_staticText9 = new wxStaticText( this, wxID_ANY, _("Default pin &name size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( -1 ); + fgSizer->Add( m_staticText9, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + m_spinPinNameSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, -5000, 5000, 0 ); + fgSizer->Add( m_spinPinNameSize, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); + + m_staticRepeatXUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticRepeatXUnits->Wrap( -1 ); + fgSizer->Add( m_staticRepeatXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + + bSizer3->Add( fgSizer, 0, wxALIGN_CENTER|wxEXPAND, 0 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxVERTICAL ); + + m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer2->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 ); + + m_checkShowGrid = new wxCheckBox( this, wxID_ANY, _("Show gr&id"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_checkShowGrid, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 3 ); + + + bSizer3->Add( bSizer2, 0, wxEXPAND, 0 ); + + + p1mainSizer->Add( bSizer3, 1, wxALL|wxEXPAND, 6 ); + + + bOptionsSizer->Add( p1mainSizer, 1, wxEXPAND, 5 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bOptionsSizer->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_sdbSizer1 = new wxStdDialogButtonSizer(); + m_sdbSizer1OK = new wxButton( this, wxID_OK ); + m_sdbSizer1->AddButton( m_sdbSizer1OK ); + m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); + m_sdbSizer1->Realize(); + + bOptionsSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 6 ); + + + mainSizer->Add( bOptionsSizer, 1, wxEXPAND, 12 ); + + + this->SetSizer( mainSizer ); + this->Layout(); + + this->Centre( wxBOTH ); +} + +DIALOG_LIBEDIT_OPTIONS_BASE::~DIALOG_LIBEDIT_OPTIONS_BASE() +{ +} diff --git a/eeschema/dialogs/dialog_libedit_options_base.fbp b/eeschema/dialogs/dialog_libedit_options_base.fbp new file mode 100644 index 0000000000..a05612d082 --- /dev/null +++ b/eeschema/dialogs/dialog_libedit_options_base.fbp @@ -0,0 +1,1707 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + table + dialog_libedit_options_base + 1000 + none + 1 + dialog_libedit_options + + . + + 1 + 1 + 1 + 1 + UI + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_LIBEDIT_OPTIONS_BASE + + 492,244 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Library Editor Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 12 + wxEXPAND + 1 + + + bOptionsSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + p1mainSizer + wxHORIZONTAL + none + + 6 + wxALL|wxEXPAND + 1 + + + bSizer3 + wxVERTICAL + none + + 0 + wxALIGN_CENTER|wxEXPAND + 0 + + 3 + wxHORIZONTAL + 0,1,2 + + 0 + + fgSizer + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 0 + + 3 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + &Grid size: + + 0 + + + 0 + + 1 + m_staticText3 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choiceGridSize + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + + 0 + + + 0 + + 1 + m_staticGridUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default &line width: + + 0 + + + 0 + + 1 + m_staticText5 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 1 + 100 + + 0 + + 1 + + 0 + + 1 + m_spinLineWidth + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS|wxSP_WRAP + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + + 0 + + + 0 + + 1 + m_staticLineWidthUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default pin length: + + 0 + + + 0 + + 1 + m_staticText52 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER|wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 200 + 1000 + + 0 + + 50 + + 0 + + 1 + m_spinPinLength + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS|wxSP_WRAP + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + + 0 + + + 0 + + 1 + m_staticPinLengthUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default pin num &size: + + 0 + + + 0 + + 1 + m_staticText7 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 + 1000 + + 0 + + 0 + + 0 + + 1 + m_spinPinNumSize + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS|wxSP_WRAP + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + + 0 + + + 0 + + 1 + m_staticTextSizeUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default pin &name size: + + 0 + + + 0 + + 1 + m_staticText9 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 + 5000 + + 0 + + -5000 + + 0 + + 1 + m_spinPinNameSize + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS|wxSP_WRAP + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + + 0 + + + 0 + + 1 + m_staticRepeatXUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxEXPAND + 0 + + + bSizer2 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline3 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxTOP|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show gr&id + + 0 + + + 0 + + 1 + m_checkShowGrid + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline2 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + wxALL|wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizer1 + protected + + + + + + + + + + + + + + + + diff --git a/eeschema/dialogs/dialog_libedit_options_base.h b/eeschema/dialogs/dialog_libedit_options_base.h new file mode 100644 index 0000000000..88de1b6d08 --- /dev/null +++ b/eeschema/dialogs/dialog_libedit_options_base.h @@ -0,0 +1,71 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 5 2014) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_LIBEDIT_OPTIONS_BASE_H__ +#define __DIALOG_LIBEDIT_OPTIONS_BASE_H__ + +#include +#include +#include +class DIALOG_SHIM; + +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_LIBEDIT_OPTIONS_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_LIBEDIT_OPTIONS_BASE : public DIALOG_SHIM +{ + private: + + protected: + wxStaticText* m_staticText3; + wxChoice* m_choiceGridSize; + wxStaticText* m_staticGridUnits; + wxStaticText* m_staticText5; + wxSpinCtrl* m_spinLineWidth; + wxStaticText* m_staticLineWidthUnits; + wxStaticText* m_staticText52; + wxSpinCtrl* m_spinPinLength; + wxStaticText* m_staticPinLengthUnits; + wxStaticText* m_staticText7; + wxSpinCtrl* m_spinPinNumSize; + wxStaticText* m_staticTextSizeUnits; + wxStaticText* m_staticText9; + wxSpinCtrl* m_spinPinNameSize; + wxStaticText* m_staticRepeatXUnits; + wxStaticLine* m_staticline3; + wxCheckBox* m_checkShowGrid; + wxStaticLine* m_staticline2; + wxStdDialogButtonSizer* m_sdbSizer1; + wxButton* m_sdbSizer1OK; + wxButton* m_sdbSizer1Cancel; + + public: + + DIALOG_LIBEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 492,244 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_LIBEDIT_OPTIONS_BASE(); + +}; + +#endif //__DIALOG_LIBEDIT_OPTIONS_BASE_H__ diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 0938960ef6..ce35e57880 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -5,7 +5,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors. + * Copyright (C) 2014 KiCad Developers, see CHANGELOG.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 @@ -48,17 +48,15 @@ #include #include +#include #include #include -#define HOTKEY_FILENAME wxT( "eeschema" ) - #define FR_HISTORY_LIST_CNT 10 ///< Maximum number of find and replace strings. -/// The width to draw busses that do not have a specific width -static int s_defaultBusThickness; +static int s_defaultBusThickness = 15; int GetDefaultBusThickness() { @@ -76,7 +74,7 @@ void SetDefaultBusThickness( int aThickness) /// Default size for text (not only labels) -static int s_defaultTextSize; +static int s_defaultTextSize = DEFAULT_SIZE_TEXT; int GetDefaultTextSize() { @@ -112,24 +110,6 @@ void SetDefaultLineThickness( int aThickness ) } -/* - * Default pin length - */ -static int s_defaultPinLength; - - -int GetDefaultPinLength() -{ - return s_defaultPinLength; -} - - -void SetDefaultPinLength( int aLength ) -{ - s_defaultPinLength = aLength; -} - - // Color to draw selected items EDA_COLOR_T GetItemSelectedColor() { @@ -188,39 +168,8 @@ void LIB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) int id = event.GetId(); wxFileName fn; - SCH_EDIT_FRAME* schFrame = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, false ); - wxASSERT( schFrame ); - switch( id ) { - case ID_CONFIG_SAVE: - schFrame->SaveProjectSettings( true ); - break; - - case ID_CONFIG_READ: - { -#if 0 // This is confusing. From the library parts editor, we trigger the loading - // of configuration information into the schematic editor? Makes no more sense - // than me storing my old newspapers in your garage. - - fn = g_RootSheet->GetScreen()->GetFileName(); - fn.SetExt( ProjectFileExtension ); - - wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(), - fn.GetFullName(), ProjectFileWildcard, - wxFD_OPEN | wxFD_FILE_MUST_EXIST ); - - if( dlg.ShowModal() == wxID_CANCEL ) - break; - - wxString foreign_pro = dlg.GetPath(); - - Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH, - GetProjectFileParametersList(), foreign_pro ); -#endif - } - break; - // Hotkey IDs case ID_PREFERENCES_HOTKEY_SHOW_EDITOR: InstallHotkeyFrame( this, s_Eeschema_Hokeys_Descr ); @@ -354,7 +303,7 @@ void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event ) } -void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) +void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event ) { wxArrayString units; GRIDS grid_list = GetScreen()->GetGrids(); @@ -368,7 +317,6 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) dlg.SetGridSizes( grid_list, GetScreen()->GetGridId() ); dlg.SetBusWidth( GetDefaultBusThickness() ); dlg.SetLineWidth( GetDefaultLineThickness() ); - dlg.SetPinLength( GetDefaultPinLength() ); dlg.SetTextSize( GetDefaultTextSize() ); dlg.SetRepeatHorizontal( g_RepeatStep.x ); dlg.SetRepeatVertical( g_RepeatStep.y ); @@ -417,7 +365,6 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) SetDefaultBusThickness( dlg.GetBusWidth() ); SetDefaultLineThickness( dlg.GetLineWidth() ); - SetDefaultPinLength( dlg.GetPinLength() ); SetDefaultTextSize( dlg.GetTextSize() ); g_RepeatStep.x = dlg.GetRepeatHorizontal(); g_RepeatStep.y = dlg.GetRepeatVertical(); @@ -453,6 +400,8 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) } } + SaveSettings( config() ); // save values shared by eeschema applications. + m_canvas->Refresh( true ); } @@ -472,7 +421,7 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList() LIB_PART::SubpartFirstIdPtr(), 'A', '1', 'z' ) ); - /* moved to library load/save specific code + /* moved to library load/save specific code, in a specific section in .pro file m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ), &m_userLibraryPath ) ); m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ), @@ -560,7 +509,6 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave ) static const wxChar DefaultBusWidthEntry[] = wxT( "DefaultBusWidth" ); static const wxChar DefaultDrawLineWidthEntry[] = wxT( "DefaultDrawLineWidth" ); -static const wxChar DefaultPinLengthEntry[] = wxT( "DefaultPinLength" ); static const wxChar ShowHiddenPinsEntry[] = wxT( "ShowHiddenPins" ); static const wxChar HorzVertLinesOnlyEntry[] = wxT( "HorizVertLinesOnly" ); static const wxChar PreviewFramePositionXEntry[] = wxT( "PreviewFramePositionX" ); @@ -583,6 +531,14 @@ static const wxChar ReplaceStringHistoryEntry[] = wxT( "ReplaceStringHistoryLi static const wxChar FieldNamesEntry[] = wxT( "FieldNames" ); static const wxChar SimulatorCommandEntry[] = wxT( "SimCmdLine" ); +// Library editor wxConfig entry names. +static const wxChar lastLibExportPathEntry[] = wxT( "LastLibraryExportPath" ); +static const wxChar lastLibImportPathEntry[] = wxT( "LastLibraryImportPath" ); +static const wxChar libeditdrawBgColorEntry[] = wxT( "LibeditBgColor" ); +static const wxChar defaultPinNumSizeEntry[] = wxT( "LibeditPinNumSize" ); +static const wxChar defaultPinNameSizeEntry[] = wxT( "LibeditPinNameSize" ); +static const wxChar DefaultPinLengthEntry[] = wxT( "DefaultPinLength" ); + PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings() { @@ -616,9 +572,8 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) m_GridColor = GetLayerColor( LAYER_GRID ); - SetDefaultBusThickness( aCfg->Read( DefaultBusWidthEntry, 12l ) ); - SetDefaultLineThickness( aCfg->Read( DefaultDrawLineWidthEntry, 6l ) ); - SetDefaultPinLength( aCfg->Read( DefaultPinLengthEntry, 300l ) ); + SetDefaultBusThickness( aCfg->Read( DefaultBusWidthEntry, DEFAULTBUSTHICKNESS ) ); + SetDefaultLineThickness( aCfg->Read( DefaultDrawLineWidthEntry, DEFAULTDRAWLINETHICKNESS ) ); aCfg->Read( ShowHiddenPinsEntry, &m_showAllPins, false ); aCfg->Read( HorzVertLinesOnlyEntry, &m_forceHVLines, true ); @@ -709,7 +664,6 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg ) aCfg->Write( DefaultBusWidthEntry, (long) GetDefaultBusThickness() ); aCfg->Write( DefaultDrawLineWidthEntry, (long) GetDefaultLineThickness() ); - aCfg->Write( DefaultPinLengthEntry, (long) GetDefaultPinLength() ); aCfg->Write( ShowHiddenPinsEntry, m_showAllPins ); aCfg->Write( HorzVertLinesOnlyEntry, GetForceHVLines() ); @@ -770,3 +724,74 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg ) aCfg->Write( FieldNamesEntry, record ); } + + +void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) +{ + EDA_DRAW_FRAME::LoadSettings( aCfg ); + + wxConfigPathChanger cpc( aCfg, m_configPath ); + + EDA_COLOR_T itmp = ColorByName( aCfg->Read( libeditdrawBgColorEntry, wxT("WHITE") ) ); + SetDrawBgColor( itmp ); + + wxString pro_dir = Prj().GetProjectFullName(); + + m_lastLibExportPath = aCfg->Read( lastLibExportPathEntry, pro_dir ); + m_lastLibImportPath = aCfg->Read( lastLibImportPathEntry, pro_dir ); + + SetDefaultLineThickness( aCfg->Read( DefaultDrawLineWidthEntry, DEFAULTDRAWLINETHICKNESS ) ); + SetDefaultPinLength( aCfg->Read( DefaultPinLengthEntry, DEFAULTPINLENGTH ) ); + m_textPinNumDefaultSize = aCfg->Read( defaultPinNumSizeEntry, DEFAULTPINNUMSIZE ); + m_textPinNameDefaultSize = aCfg->Read( defaultPinNameSizeEntry, DEFAULTPINNAMESIZE ); +} + + +void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg ) +{ + EDA_DRAW_FRAME::SaveSettings( aCfg ); + + wxConfigPathChanger cpc( aCfg, m_configPath ); + + aCfg->Write( libeditdrawBgColorEntry, ColorGetName( GetDrawBgColor() ) ); + aCfg->Write( lastLibExportPathEntry, m_lastLibExportPath ); + aCfg->Write( lastLibImportPathEntry, m_lastLibImportPath ); + aCfg->Write( DefaultPinLengthEntry, (long) GetDefaultPinLength() ); + aCfg->Write( defaultPinNumSizeEntry, (long) m_textPinNumDefaultSize ); + aCfg->Write( defaultPinNameSizeEntry, (long) m_textPinNameDefaultSize ); +} + +void LIB_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event ) +{ + wxArrayString units; + GRIDS grid_list = GetScreen()->GetGrids(); + + DIALOG_LIBEDIT_OPTIONS dlg( this ); + + dlg.SetGridSizes( grid_list, GetScreen()->GetGridId() ); + dlg.SetLineWidth( GetDefaultLineThickness() ); + dlg.SetPinLength( GetDefaultPinLength() ); + dlg.SetPinNumSize( m_textPinNumDefaultSize ); + dlg.SetPinNameSize( m_textPinNameDefaultSize ); + + dlg.SetShowGrid( IsGridVisible() ); + dlg.Layout(); + dlg.Fit(); + + if( dlg.ShowModal() == wxID_CANCEL ) + return; + + wxRealPoint gridsize = grid_list[ (size_t) dlg.GetGridSelection() ].m_Size; + m_LastGridSizeId = GetScreen()->SetGrid( gridsize ); + + SetDefaultLineThickness( dlg.GetLineWidth() ); + SetDefaultPinLength( dlg.GetPinLength() ); + m_textPinNumDefaultSize = dlg.GetPinNumSize(); + m_textPinNameDefaultSize = dlg.GetPinNameSize(); + SetGridVisibility( dlg.GetShowGrid() ); + + SaveSettings( config() ); // save values shared by eeschema applications. + + m_canvas->Refresh( true ); +} + diff --git a/eeschema/eeschema_config.h b/eeschema/eeschema_config.h index e771964aaa..34557e0538 100644 --- a/eeschema/eeschema_config.h +++ b/eeschema/eeschema_config.h @@ -3,9 +3,3 @@ */ #include - - -/* saving parameters option : */ -#define INSETUP true /* used when the parameter is saved in general config - * if not used, the parameter is saved in the local - * config (project config) */ diff --git a/eeschema/general.h b/eeschema/general.h index 828f286d24..b96f6ff252 100644 --- a/eeschema/general.h +++ b/eeschema/general.h @@ -16,6 +16,23 @@ class SCH_SHEET; #define TXTMARGE 10 // Offset in mils for placement of labels and pin numbers #define DANGLING_SYMBOL_SIZE 12 +///< The thickness to draw busses that do not have a specific width +// - -/* Library editor wxConfig entry names. */ -const wxString lastLibExportPathEntry( wxT( "LastLibraryExportPath" ) ); -const wxString lastLibImportPathEntry( wxT( "LastLibraryImportPath" ) ); - - /* This method guarantees unique IDs for the library this run of Eeschema * which prevents ID conflicts and eliminates the need to recompile every * source file in the project when adding IDs to include/id.h. */ @@ -82,6 +76,12 @@ wxSize LIB_EDIT_FRAME:: m_clientSize = wxSize( -1, -1 ); int LIB_EDIT_FRAME:: m_textSize = -1; int LIB_EDIT_FRAME:: m_textOrientation = TEXT_ORIENT_HORIZ; int LIB_EDIT_FRAME:: m_drawLineWidth = 0; + +// these values are overridden when reading the config +int LIB_EDIT_FRAME:: m_textPinNumDefaultSize = DEFAULTPINNUMSIZE; +int LIB_EDIT_FRAME:: m_textPinNameDefaultSize = DEFAULTPINNAMESIZE; +int LIB_EDIT_FRAME:: m_defaultPinLength = DEFAULTPINLENGTH; + FILL_T LIB_EDIT_FRAME:: m_drawFillStyle = NO_FILL; @@ -131,9 +131,8 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) EVT_MENU( ID_COLORS_SETUP, LIB_EDIT_FRAME::OnColorConfig ) + EVT_MENU( wxID_PREFERENCES, LIB_EDIT_FRAME::OnPreferencesOptions ) EVT_MENU( ID_CONFIG_REQ, LIB_EDIT_FRAME::InstallConfigFrame ) - EVT_MENU( ID_CONFIG_SAVE, LIB_EDIT_FRAME::Process_Config ) - EVT_MENU( ID_CONFIG_READ, LIB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_COLORS_SETUP, LIB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_LIBEDIT_DIMENSIONS, LIB_EDIT_FRAME::InstallDimensionsDialog ) @@ -284,26 +283,6 @@ const wxChar* LIB_EDIT_FRAME::GetLibEditFrameName() return LIB_EDIT_FRAME_NAME; } -static const wxChar drawBgColorKey[] = wxT( "LibeditBgColor" ); - -void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) -{ - EDA_DRAW_FRAME::LoadSettings( aCfg ); - - wxConfigPathChanger cpc( aCfg, m_configPath ); - - EDA_COLOR_T itmp = ColorByName( aCfg->Read( drawBgColorKey, wxT("WHITE") ) ); - SetDrawBgColor( itmp ); - - wxString pro_dir = Prj().GetProjectFullName(); - - m_lastLibExportPath = aCfg->Read( lastLibExportPathEntry, pro_dir ); - m_lastLibImportPath = aCfg->Read( lastLibImportPathEntry, pro_dir ); - - m_lastLibExportPath = aCfg->Read( lastLibExportPathEntry, pro_dir ); - m_lastLibImportPath = aCfg->Read( lastLibImportPathEntry, pro_dir ); -} - void LIB_EDIT_FRAME::SetDrawItem( LIB_ITEM* drawItem ) { @@ -311,18 +290,6 @@ void LIB_EDIT_FRAME::SetDrawItem( LIB_ITEM* drawItem ) } -void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg ) -{ - EDA_DRAW_FRAME::SaveSettings( aCfg ); - - wxConfigPathChanger cpc( aCfg, m_configPath ); - - aCfg->Write( drawBgColorKey, ColorGetName( GetDrawBgColor() ) ); - aCfg->Write( lastLibExportPathEntry, m_lastLibExportPath ); - aCfg->Write( lastLibImportPathEntry, m_lastLibImportPath ); -} - - void LIB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) { if( GetScreen()->IsModify() ) diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index a423d45487..c904c3c20f 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -101,7 +101,7 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME // They are enabled when the loaded component has // Graphic items for converted shape // But under some circumstances (New component created) - // these tools must left enable + // these tools must left enabled static bool m_showDeMorgan; /// The current text size setting. @@ -110,6 +110,15 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME /// Current text orientation setting. static int m_textOrientation; + /// The default pin num text size setting. + static int m_textPinNumDefaultSize; + + /// The default pin name text size setting. + static int m_textPinNameDefaultSize; + + /// Default pin length + static int m_defaultPinLength; + static wxSize m_clientSize; friend class DIALOG_LIB_EDIT_TEXT; @@ -149,6 +158,23 @@ public: */ void SetCurPart( LIB_PART* aPart ); + /** @return the default pin num text size. + */ + static int GetPinNumDefaultSize() { return m_textPinNumDefaultSize; } + + /** @return The default pin name text size setting. + */ + static int GetPinNameDefaultSize() { return m_textPinNameDefaultSize; } + + /** @return The default pin len setting. + */ + static int GetDefaultPinLength() { return m_defaultPinLength; } + + /** Set the default pin len. + */ + static void SetDefaultPinLength( int aLength ) { m_defaultPinLength = aLength; } + + void ReCreateMenuBar(); /** @@ -161,6 +187,7 @@ public: void InstallConfigFrame( wxCommandEvent& event ); void InstallDimensionsDialog( wxCommandEvent& event ); void OnColorConfig( wxCommandEvent& aEvent ); + void OnPreferencesOptions( wxCommandEvent& event ); void Process_Config( wxCommandEvent& event ); /** diff --git a/eeschema/menubar_libedit.cpp b/eeschema/menubar_libedit.cpp index 1671b0769e..eb33ad260c 100644 --- a/eeschema/menubar_libedit.cpp +++ b/eeschema/menubar_libedit.cpp @@ -224,18 +224,25 @@ void LIB_EDIT_FRAME::ReCreateMenuBar() // Menu Preferences: wxMenu* preferencesMenu = new wxMenu; - // Library + // Library list AddMenuItem( preferencesMenu, ID_CONFIG_REQ, - _( "&Library" ), - _( "Library preferences" ), + _( "Set Active &Libraries" ), + _( "Set active library list and library paths" ), KiBitmap( library_xpm ) ); + // Default values and options + AddMenuItem( preferencesMenu, + wxID_PREFERENCES, + _( "Component Editor &Options" ), + _( "Set Component Editor default values and options" ), + KiBitmap( preference_xpm ) ); + // Colors AddMenuItem( preferencesMenu, ID_COLORS_SETUP, - _( "&Colors" ), - _( "Color preferences" ), + _( "Set &Colors Scheme" ), + _( "Set color preferences" ), KiBitmap( palette_xpm ) ); // Language submenu @@ -244,23 +251,6 @@ void LIB_EDIT_FRAME::ReCreateMenuBar() // Hotkey submenu AddHotkeyConfigMenu( preferencesMenu ); - // Separator - preferencesMenu->AppendSeparator(); - - // Save preferences - AddMenuItem( preferencesMenu, - ID_CONFIG_SAVE, - _( "&Save preferences" ), - _( "Save application preferences" ), - KiBitmap( save_setup_xpm ) ); - - // Read preferences - AddMenuItem( preferencesMenu, - ID_CONFIG_READ, - _( "&Read preferences" ), - _( "Read application preferences" ), - KiBitmap( read_setup_xpm ) ); - // Menu Help: wxMenu* helpMenu = new wxMenu; diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp index 7b75ac8a0d..f7b585310e 100644 --- a/eeschema/pinedit.cpp +++ b/eeschema/pinedit.cpp @@ -71,7 +71,7 @@ static int LastPinNumSize = -1; static int GetLastPinLength() { if( LastPinLength == -1 ) - LastPinLength = GetDefaultPinLength(); + LastPinLength = LIB_EDIT_FRAME::GetDefaultPinLength(); return LastPinLength; } @@ -79,7 +79,7 @@ static int GetLastPinLength() static int GetLastPinNameSize() { if( LastPinNameSize == -1 ) - LastPinNameSize = GetDefaultTextSize(); + LastPinNameSize = LIB_EDIT_FRAME::GetPinNameDefaultSize(); return LastPinNameSize; } @@ -87,7 +87,7 @@ static int GetLastPinNameSize() static int GetLastPinNumSize() { if( LastPinNumSize == -1 ) - LastPinNumSize = GetDefaultTextSize(); + LastPinNumSize = LIB_EDIT_FRAME::GetPinNumDefaultSize(); return LastPinNumSize; } diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index aca6545b66..117d9c7e80 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -221,7 +221,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME ) SCH_EDIT_FRAME::Process_Config ) EVT_MENU( ID_COLORS_SETUP, SCH_EDIT_FRAME::OnColorConfig ) - EVT_TOOL( wxID_PREFERENCES, SCH_EDIT_FRAME::OnSetOptions ) + EVT_TOOL( wxID_PREFERENCES, SCH_EDIT_FRAME::OnPreferencesOptions ) EVT_TOOL( ID_RUN_LIBRARY, SCH_EDIT_FRAME::OnOpenLibraryEditor ) EVT_TOOL( ID_POPUP_SCH_CALL_LIBEDIT_AND_LOAD_CMP, SCH_EDIT_FRAME::OnOpenLibraryEditor ) diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 7d56fdf830..2bd5f94d7b 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -801,7 +801,7 @@ private: void OnOpenPcbModuleEditor( wxCommandEvent& event ); void OnOpenCvpcb( wxCommandEvent& event ); void OnOpenLibraryEditor( wxCommandEvent& event ); - void OnSetOptions( wxCommandEvent& event ); + void OnPreferencesOptions( wxCommandEvent& event ); void OnCancelCurrentCommand( wxCommandEvent& aEvent ); void OnSelectItem( wxCommandEvent& aEvent ); diff --git a/pagelayout_editor/pl_editor_config.cpp b/pagelayout_editor/pl_editor_config.cpp index 98140d10ab..f136fa1691 100644 --- a/pagelayout_editor/pl_editor_config.cpp +++ b/pagelayout_editor/pl_editor_config.cpp @@ -41,8 +41,6 @@ #define GROUP wxT("/pl_editor") -#define INSETUP true - void PL_EDITOR_FRAME::Process_Config( wxCommandEvent& event ) {