Added: handling multiple user paths in library path list in pcbnew.
Small change in doc files: footprint_doc moved from help to share/modules TODO: change dialog_cvpcb_config and copy code (from pcbnew) for multiple user paths in library path list in cvpcb.
This commit is contained in:
parent
ff68ae0bf8
commit
6039a5f785
|
@ -582,17 +582,6 @@ void WinEDA_App::SetDefaultSearchPaths( void )
|
||||||
fn.RemoveLastDir(); // point to <kicad path>
|
fn.RemoveLastDir(); // point to <kicad path>
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add kicad template file path to search path list. */
|
|
||||||
fn.AppendDir( wxT( "template" ) );
|
|
||||||
|
|
||||||
if( fn.IsDirReadable() )
|
|
||||||
{
|
|
||||||
wxLogDebug( wxT( "Adding <%s> to search path list" ),
|
|
||||||
fn.GetPath().c_str() );
|
|
||||||
m_libSearchPaths.Add( fn.GetPath() );
|
|
||||||
}
|
|
||||||
fn.RemoveLastDir();
|
|
||||||
|
|
||||||
/* Add PCB library file path to search path list. */
|
/* Add PCB library file path to search path list. */
|
||||||
if( ( m_Id == APP_TYPE_PCBNEW ) || ( m_Id == APP_TYPE_CVPCB ) )
|
if( ( m_Id == APP_TYPE_PCBNEW ) || ( m_Id == APP_TYPE_CVPCB ) )
|
||||||
{
|
{
|
||||||
|
@ -614,7 +603,19 @@ void WinEDA_App::SetDefaultSearchPaths( void )
|
||||||
fn.GetPath().c_str() );
|
fn.GetPath().c_str() );
|
||||||
m_libSearchPaths.Add( fn.GetPath() );
|
m_libSearchPaths.Add( fn.GetPath() );
|
||||||
}
|
}
|
||||||
|
fn.RemoveLastDir();
|
||||||
|
fn.RemoveLastDir(); // point to <kicad path>
|
||||||
}
|
}
|
||||||
|
/* Add kicad template file path to search path list. */
|
||||||
|
fn.AppendDir( wxT( "template" ) );
|
||||||
|
|
||||||
|
if( fn.IsDirReadable() )
|
||||||
|
{
|
||||||
|
wxLogDebug( wxT( "Adding <%s> to search path list" ),
|
||||||
|
fn.GetPath().c_str() );
|
||||||
|
m_libSearchPaths.Add( fn.GetPath() );
|
||||||
|
}
|
||||||
|
fn.RemoveLastDir();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,11 +82,6 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind
|
||||||
wxBoxSizer* bRightSizer;
|
wxBoxSizer* bRightSizer;
|
||||||
bRightSizer = new wxBoxSizer( wxVERTICAL );
|
bRightSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_buttonRemoveLib = new wxButton( this, ID_REMOVE_LIB, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_buttonRemoveLib->SetToolTip( _("Unload the selected library") );
|
|
||||||
|
|
||||||
bRightSizer->Add( m_buttonRemoveLib, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
|
||||||
|
|
||||||
m_buttonAddLib = new wxButton( this, ID_ADD_LIB, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonAddLib = new wxButton( this, ID_ADD_LIB, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_buttonAddLib->SetToolTip( _("Add a new library after the selected library, and load it") );
|
m_buttonAddLib->SetToolTip( _("Add a new library after the selected library, and load it") );
|
||||||
|
|
||||||
|
@ -95,7 +90,12 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind
|
||||||
m_buttonIns = new wxButton( this, wxID_ANY, _("Insert"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonIns = new wxButton( this, wxID_ANY, _("Insert"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_buttonIns->SetToolTip( _("Add a new library before the selected library, and load it") );
|
m_buttonIns->SetToolTip( _("Add a new library before the selected library, and load it") );
|
||||||
|
|
||||||
bRightSizer->Add( m_buttonIns, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
bRightSizer->Add( m_buttonIns, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_buttonRemoveLib = new wxButton( this, ID_REMOVE_LIB, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_buttonRemoveLib->SetToolTip( _("Unload the selected library") );
|
||||||
|
|
||||||
|
bRightSizer->Add( m_buttonRemoveLib, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bRightSizer->Add( 0, 20, 1, wxEXPAND, 5 );
|
bRightSizer->Add( 0, 20, 1, wxEXPAND, 5 );
|
||||||
|
@ -104,7 +104,7 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind
|
||||||
bRightSizer->Add( m_buttonOk, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
bRightSizer->Add( m_buttonOk, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bRightSizer->Add( m_buttonCancel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
|
bRightSizer->Add( m_buttonCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_buttonSave = new wxButton( this, ID_SAVE_CFG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonSave = new wxButton( this, ID_SAVE_CFG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_buttonSave->SetToolTip( _("Accept and save current configuration setting in the local .pro file") );
|
m_buttonSave->SetToolTip( _("Accept and save current configuration setting in the local .pro file") );
|
||||||
|
@ -131,21 +131,23 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind
|
||||||
bUserListSizer = new wxBoxSizer( wxVERTICAL );
|
bUserListSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_listUserPaths = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
m_listUserPaths = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||||
bUserListSizer->Add( m_listUserPaths, 1, wxALL|wxEXPAND, 5 );
|
m_listUserPaths->SetToolTip( _("Additional paths used in this project. The priority is highter than default Kicad paths.") );
|
||||||
|
|
||||||
|
bUserListSizer->Add( m_listUserPaths, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
sbSizer4->Add( bUserListSizer, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
sbSizer4->Add( bUserListSizer, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bUserPathsButtonsSizer;
|
wxBoxSizer* bUserPathsButtonsSizer;
|
||||||
bUserPathsButtonsSizer = new wxBoxSizer( wxVERTICAL );
|
bUserPathsButtonsSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_buttonRemovePath = new wxButton( this, wxID_REMOVE_PATH, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
bUserPathsButtonsSizer->Add( m_buttonRemovePath, 0, wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
m_buttonAddPath = new wxButton( this, ID_LIB_PATH_SEL, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonAddPath = new wxButton( this, ID_LIB_PATH_SEL, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bUserPathsButtonsSizer->Add( m_buttonAddPath, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
bUserPathsButtonsSizer->Add( m_buttonAddPath, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_buttonInsPath = new wxButton( this, wxID_INSERT_PATH, _("Insert"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonInsPath = new wxButton( this, wxID_INSERT_PATH, _("Insert"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bUserPathsButtonsSizer->Add( m_buttonInsPath, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
bUserPathsButtonsSizer->Add( m_buttonInsPath, 0, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_buttonRemovePath = new wxButton( this, wxID_REMOVE_PATH, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bUserPathsButtonsSizer->Add( m_buttonRemovePath, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
sbSizer4->Add( bUserPathsButtonsSizer, 0, wxEXPAND, 5 );
|
sbSizer4->Add( bUserPathsButtonsSizer, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
@ -170,28 +172,28 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCloseWindow ) );
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCloseWindow ) );
|
||||||
m_buttonRemoveLib->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnRemoveLibClick ), NULL, this );
|
|
||||||
m_buttonAddLib->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
|
m_buttonAddLib->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
|
||||||
m_buttonIns->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
|
m_buttonIns->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
|
||||||
|
m_buttonRemoveLib->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnRemoveLibClick ), NULL, this );
|
||||||
m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnOkClick ), NULL, this );
|
m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnOkClick ), NULL, this );
|
||||||
m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCancelClick ), NULL, this );
|
m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCancelClick ), NULL, this );
|
||||||
m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnSaveCfgClick ), NULL, this );
|
m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnSaveCfgClick ), NULL, this );
|
||||||
m_buttonRemovePath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnRemoveUserPath ), NULL, this );
|
|
||||||
m_buttonAddPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertPath ), NULL, this );
|
m_buttonAddPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertPath ), NULL, this );
|
||||||
m_buttonInsPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertPath ), NULL, this );
|
m_buttonInsPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertPath ), NULL, this );
|
||||||
|
m_buttonRemovePath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnRemoveUserPath ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_EESCHEMA_CONFIG_FBP::~DIALOG_EESCHEMA_CONFIG_FBP()
|
DIALOG_EESCHEMA_CONFIG_FBP::~DIALOG_EESCHEMA_CONFIG_FBP()
|
||||||
{
|
{
|
||||||
// Disconnect Events
|
// Disconnect Events
|
||||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCloseWindow ) );
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCloseWindow ) );
|
||||||
m_buttonRemoveLib->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnRemoveLibClick ), NULL, this );
|
|
||||||
m_buttonAddLib->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
|
m_buttonAddLib->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
|
||||||
m_buttonIns->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
|
m_buttonIns->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
|
||||||
|
m_buttonRemoveLib->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnRemoveLibClick ), NULL, this );
|
||||||
m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnOkClick ), NULL, this );
|
m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnOkClick ), NULL, this );
|
||||||
m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCancelClick ), NULL, this );
|
m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCancelClick ), NULL, this );
|
||||||
m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnSaveCfgClick ), NULL, this );
|
m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnSaveCfgClick ), NULL, this );
|
||||||
m_buttonRemovePath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnRemoveUserPath ), NULL, this );
|
|
||||||
m_buttonAddPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertPath ), NULL, this );
|
m_buttonAddPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertPath ), NULL, this );
|
||||||
m_buttonInsPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertPath ), NULL, this );
|
m_buttonInsPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertPath ), NULL, this );
|
||||||
|
m_buttonRemovePath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnRemoveUserPath ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
|
@ -614,58 +614,6 @@
|
||||||
<property name="name">bRightSizer</property>
|
<property name="name">bRightSizer</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxButton" expanded="1">
|
|
||||||
<property name="bg"></property>
|
|
||||||
<property name="context_help"></property>
|
|
||||||
<property name="default">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">ID_REMOVE_LIB</property>
|
|
||||||
<property name="label">Remove</property>
|
|
||||||
<property name="maximum_size"></property>
|
|
||||||
<property name="minimum_size"></property>
|
|
||||||
<property name="name">m_buttonRemoveLib</property>
|
|
||||||
<property name="permission">protected</property>
|
|
||||||
<property name="pos"></property>
|
|
||||||
<property name="size"></property>
|
|
||||||
<property name="style"></property>
|
|
||||||
<property name="subclass"></property>
|
|
||||||
<property name="tooltip">Unload the selected library</property>
|
|
||||||
<property name="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
<event name="OnButtonClick">OnRemoveLibClick</event>
|
|
||||||
<event name="OnChar"></event>
|
|
||||||
<event name="OnEnterWindow"></event>
|
|
||||||
<event name="OnEraseBackground"></event>
|
|
||||||
<event name="OnKeyDown"></event>
|
|
||||||
<event name="OnKeyUp"></event>
|
|
||||||
<event name="OnKillFocus"></event>
|
|
||||||
<event name="OnLeaveWindow"></event>
|
|
||||||
<event name="OnLeftDClick"></event>
|
|
||||||
<event name="OnLeftDown"></event>
|
|
||||||
<event name="OnLeftUp"></event>
|
|
||||||
<event name="OnMiddleDClick"></event>
|
|
||||||
<event name="OnMiddleDown"></event>
|
|
||||||
<event name="OnMiddleUp"></event>
|
|
||||||
<event name="OnMotion"></event>
|
|
||||||
<event name="OnMouseEvents"></event>
|
|
||||||
<event name="OnMouseWheel"></event>
|
|
||||||
<event name="OnPaint"></event>
|
|
||||||
<event name="OnRightDClick"></event>
|
|
||||||
<event name="OnRightDown"></event>
|
|
||||||
<event name="OnRightUp"></event>
|
|
||||||
<event name="OnSetFocus"></event>
|
|
||||||
<event name="OnSize"></event>
|
|
||||||
<event name="OnUpdateUI"></event>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL</property>
|
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL</property>
|
||||||
|
@ -720,7 +668,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxButton" expanded="1">
|
<object class="wxButton" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
|
@ -770,6 +718,58 @@
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxButton" expanded="1">
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="default">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">ID_REMOVE_LIB</property>
|
||||||
|
<property name="label">Remove</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">m_buttonRemoveLib</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="tooltip">Unload the selected library</property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnButtonClick">OnRemoveLibClick</event>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
|
@ -834,7 +834,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL</property>
|
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxButton" expanded="1">
|
<object class="wxButton" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
|
@ -1033,7 +1033,7 @@
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxListBox" expanded="1">
|
<object class="wxListBox" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
|
@ -1052,7 +1052,7 @@
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style"></property>
|
<property name="style"></property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip">Additional paths used in this project. The priority is highter than default Kicad paths.</property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
|
@ -1096,59 +1096,7 @@
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxButton" expanded="1">
|
|
||||||
<property name="bg"></property>
|
|
||||||
<property name="context_help"></property>
|
|
||||||
<property name="default">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_REMOVE_PATH</property>
|
|
||||||
<property name="label">Remove</property>
|
|
||||||
<property name="maximum_size"></property>
|
|
||||||
<property name="minimum_size"></property>
|
|
||||||
<property name="name">m_buttonRemovePath</property>
|
|
||||||
<property name="permission">protected</property>
|
|
||||||
<property name="pos"></property>
|
|
||||||
<property name="size"></property>
|
|
||||||
<property name="style"></property>
|
|
||||||
<property name="subclass"></property>
|
|
||||||
<property name="tooltip"></property>
|
|
||||||
<property name="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
<event name="OnButtonClick">OnRemoveUserPath</event>
|
|
||||||
<event name="OnChar"></event>
|
|
||||||
<event name="OnEnterWindow"></event>
|
|
||||||
<event name="OnEraseBackground"></event>
|
|
||||||
<event name="OnKeyDown"></event>
|
|
||||||
<event name="OnKeyUp"></event>
|
|
||||||
<event name="OnKillFocus"></event>
|
|
||||||
<event name="OnLeaveWindow"></event>
|
|
||||||
<event name="OnLeftDClick"></event>
|
|
||||||
<event name="OnLeftDown"></event>
|
|
||||||
<event name="OnLeftUp"></event>
|
|
||||||
<event name="OnMiddleDClick"></event>
|
|
||||||
<event name="OnMiddleDown"></event>
|
|
||||||
<event name="OnMiddleUp"></event>
|
|
||||||
<event name="OnMotion"></event>
|
|
||||||
<event name="OnMouseEvents"></event>
|
|
||||||
<event name="OnMouseWheel"></event>
|
|
||||||
<event name="OnPaint"></event>
|
|
||||||
<event name="OnRightDClick"></event>
|
|
||||||
<event name="OnRightDown"></event>
|
|
||||||
<event name="OnRightUp"></event>
|
|
||||||
<event name="OnSetFocus"></event>
|
|
||||||
<event name="OnSize"></event>
|
|
||||||
<event name="OnUpdateUI"></event>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="1">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxButton" expanded="1">
|
<object class="wxButton" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
|
@ -1200,7 +1148,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxButton" expanded="1">
|
<object class="wxButton" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
|
@ -1250,6 +1198,58 @@
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxButton" expanded="1">
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="default">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_REMOVE_PATH</property>
|
||||||
|
<property name="label">Remove</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">m_buttonRemovePath</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnButtonClick">OnRemoveUserPath</event>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -35,12 +35,12 @@ class DIALOG_EESCHEMA_CONFIG_FBP : public wxDialog
|
||||||
protected:
|
protected:
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ID_REMOVE_LIB = 1000,
|
ID_ADD_LIB = 1000,
|
||||||
ID_ADD_LIB,
|
ID_REMOVE_LIB,
|
||||||
ID_SAVE_CFG,
|
ID_SAVE_CFG,
|
||||||
wxID_REMOVE_PATH,
|
|
||||||
ID_LIB_PATH_SEL,
|
ID_LIB_PATH_SEL,
|
||||||
wxID_INSERT_PATH,
|
wxID_INSERT_PATH,
|
||||||
|
wxID_REMOVE_PATH,
|
||||||
};
|
};
|
||||||
|
|
||||||
wxStaticText* m_staticTextNetListFormats;
|
wxStaticText* m_staticTextNetListFormats;
|
||||||
|
@ -53,30 +53,30 @@ class DIALOG_EESCHEMA_CONFIG_FBP : public wxDialog
|
||||||
wxStaticText* m_InfoSchFileExt;
|
wxStaticText* m_InfoSchFileExt;
|
||||||
wxStaticText* m_staticTextlibList;
|
wxStaticText* m_staticTextlibList;
|
||||||
wxListBox* m_ListLibr;
|
wxListBox* m_ListLibr;
|
||||||
wxButton* m_buttonRemoveLib;
|
|
||||||
wxButton* m_buttonAddLib;
|
wxButton* m_buttonAddLib;
|
||||||
wxButton* m_buttonIns;
|
wxButton* m_buttonIns;
|
||||||
|
wxButton* m_buttonRemoveLib;
|
||||||
|
|
||||||
wxButton* m_buttonOk;
|
wxButton* m_buttonOk;
|
||||||
wxButton* m_buttonCancel;
|
wxButton* m_buttonCancel;
|
||||||
wxButton* m_buttonSave;
|
wxButton* m_buttonSave;
|
||||||
wxStaticLine* m_staticline1;
|
wxStaticLine* m_staticline1;
|
||||||
wxListBox* m_listUserPaths;
|
wxListBox* m_listUserPaths;
|
||||||
wxButton* m_buttonRemovePath;
|
|
||||||
wxButton* m_buttonAddPath;
|
wxButton* m_buttonAddPath;
|
||||||
wxButton* m_buttonInsPath;
|
wxButton* m_buttonInsPath;
|
||||||
|
wxButton* m_buttonRemovePath;
|
||||||
wxStaticText* m_staticTextcurrenpaths;
|
wxStaticText* m_staticTextcurrenpaths;
|
||||||
wxListBox* m_DefaultLibraryPathslistBox;
|
wxListBox* m_DefaultLibraryPathslistBox;
|
||||||
|
|
||||||
// Virtual event handlers, overide them in your derived class
|
// Virtual event handlers, overide them in your derived class
|
||||||
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
|
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
|
||||||
virtual void OnRemoveLibClick( wxCommandEvent& event ){ event.Skip(); }
|
|
||||||
virtual void OnAddOrInsertLibClick( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnAddOrInsertLibClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
virtual void OnRemoveLibClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
virtual void OnSaveCfgClick( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnSaveCfgClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
virtual void OnRemoveUserPath( wxCommandEvent& event ){ event.Skip(); }
|
|
||||||
virtual void OnAddOrInsertPath( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnAddOrInsertPath( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
virtual void OnRemoveUserPath( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -769,7 +769,7 @@ void WinEDA_PartPropertiesFrame::BrowseAndSelectDocFile( wxCommandEvent& event )
|
||||||
if( FullFileName.IsEmpty() )
|
if( FullFileName.IsEmpty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* If the library path is already in the library search paths
|
/* If the path is already in the library search paths
|
||||||
* list, just add the library name to the list. Otherwise, add
|
* list, just add the library name to the list. Otherwise, add
|
||||||
* the library name with the full or relative path.
|
* the library name with the full or relative path.
|
||||||
* the relative path, when possible is preferable,
|
* the relative path, when possible is preferable,
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
<pkg-contents spec="1.12"/>
|
|
@ -0,0 +1 @@
|
||||||
|
<pkgref spec="1.12" uuid="01774BEE-6C94-4919-AE05-C5E0A75F0D2F"><config><identifier>net.sourceforge.kicad.cvpcb</identifier><version>1</version><description></description><post-install type="none"/><installFrom relative="true" mod="true" includeRoot="true">cvpcb/cvpcb.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>installFrom.path</mod><mod>installTo.isAbsoluteType</mod><mod>relocatable</mod><mod>installFrom.isRelativeType</mod><mod>includeRoot</mod><mod>installTo.path</mod><mod>installTo</mod><mod>identifier</mod></config><contents><component id="org.kicad-eda.cvpcb" path="/Users/marco/Development/kicad/kicad_d/cvpcb/cvpcb.app" version=""/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
|
|
@ -0,0 +1 @@
|
||||||
|
<pkg-contents spec="1.12"/>
|
|
@ -0,0 +1 @@
|
||||||
|
<pkgref spec="1.12" uuid="1344870A-AE52-4226-BB60-0E9252D34825"><config><identifier>net.sourceforge.kicad.eeschema</identifier><version>1</version><description></description><post-install type="none"/><installFrom relative="true" mod="true" includeRoot="true">eeschema/eeschema.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>installFrom.path</mod><mod>installTo.isAbsoluteType</mod><mod>installFrom.isAbsoluteType</mod><mod>relocatable</mod><mod>installFrom.isRelativeType</mod><mod>includeRoot</mod><mod>installTo.path</mod><mod>installTo</mod><mod>identifier</mod></config><contents><component id="org.kicad-eda.eeschema" path="/Users/marco/Development/kicad/kicad_d/eeschema/eeschema.app" version=""/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
|
|
@ -0,0 +1 @@
|
||||||
|
<pkg-contents spec="1.12"/>
|
|
@ -0,0 +1 @@
|
||||||
|
<pkgref spec="1.12" uuid="37277ADA-6220-4C27-8980-D9028F265267"><config><identifier>net.sourceforge.kicad.pcbnew</identifier><version>1</version><description></description><post-install type="none"/><installFrom relative="true" mod="true" includeRoot="true">pcbnew/pcbnew.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>identifier</mod><mod>installTo.isAbsoluteType</mod><mod>includeRoot</mod><mod>installFrom.path</mod><mod>installTo</mod><mod>installTo.path</mod></config><contents><component id="org.kicad-eda.pcbnew" path="/Users/marco/Development/kicad/kicad_d/pcbnew/pcbnew.app" version=""/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
|
|
@ -0,0 +1 @@
|
||||||
|
<pkg-contents spec="1.12"/>
|
|
@ -0,0 +1 @@
|
||||||
|
<pkgref spec="1.12" uuid="16332325-42A3-47AC-AF70-A6501E7A012D"><config><identifier>net.sourceforge.kicad.kicad</identifier><version>1</version><description></description><post-install type="none"/><installFrom relative="true" mod="true" includeRoot="true">kicad/kicad.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>identifier</mod><mod>installTo.isAbsoluteType</mod><mod>includeRoot</mod><mod>installFrom.path</mod><mod>installTo</mod><mod>installTo.path</mod></config><contents><component id="org.kicad-eda.kicad" path="/Users/marco/Development/kicad/kicad_d/kicad/kicad.app" version=""/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
|
|
@ -0,0 +1 @@
|
||||||
|
<pkg-contents spec="1.12"/>
|
|
@ -0,0 +1 @@
|
||||||
|
<pkgref spec="1.12" uuid="0D9066DC-1B97-47AB-910B-612A3D447EE8"><config><identifier>net.sourceforge.kicad.gerbview</identifier><version>1</version><description></description><post-install type="none"/><installFrom relative="true" mod="true" includeRoot="true">gerbview/gerbview.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>installTo</mod><mod>installTo.isAbsoluteType</mod><mod>version</mod><mod>includeRoot</mod><mod>installTo.path</mod><mod>identifier</mod><mod>installFrom.path</mod></config><contents><component id="org.kicad-eda.gerbview" path="/Users/marco/Development/kicad/kicad_d/gerbview/gerbview.app" version=""/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
<pkgref spec="1.12" uuid="29C97DEE-FDAD-474F-BB53-64DD599F7ADB"><config><identifier>net.sourceforge.kicad.demos</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true" includeRoot="true">demos</installFrom><installTo mod="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>installTo</mod><mod>requireAuthorization</mod><mod>installTo.isAbsoluteType</mod><mod>installTo.isRelativeType</mod><mod>includeRoot</mod><mod>installTo.path</mod><mod>identifier</mod><mod>installFrom.path</mod></config><contents><file-list>06demos-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter><filter>/CMake</filter><filter>/cmake</filter><filter>/Makefile</filter></contents></pkgref>
|
|
@ -0,0 +1 @@
|
||||||
|
<pkmkdoc spec="1.12"><properties><title>Kicad</title><build>/Users/marco/Development/kicad/kicad_d/Kicad.mpkg</build><organization>net.sourceforge.kicad</organization><userSees ui="both"/><min-target os="2"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="cvpcb" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.cvpcb"/></choice><choice title="eeschema" id="choice1" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.eeschema"/></choice><choice title="pcbnew" id="choice2" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.pcbnew"/></choice><choice title="kicad" id="choice3" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.kicad"/></choice><choice title="gerbview" id="choice4" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.gerbview"/></choice><choice title="demos" id="choice10" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.demos"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource relative="true" mod="true" type="license">AUTHORS.txt</resource></locale></resources><flags/><item type="file">01cvpcb.xml</item><item type="file">02eeschema.xml</item><item type="file">03pcbnew.xml</item><item type="file">04kicad.xml</item><item type="file">05gerbview.xml</item><item type="file">06demos.xml</item><mod>properties.anywhereDomain</mod><mod>properties.title</mod></pkmkdoc>
|
|
@ -52,8 +52,9 @@ set(PCBNEW_SRCS
|
||||||
dialog_non_copper_zones_properties_base.cpp
|
dialog_non_copper_zones_properties_base.cpp
|
||||||
dialog_pad_properties.cpp
|
dialog_pad_properties.cpp
|
||||||
dialog_pad_properties_base.cpp
|
dialog_pad_properties_base.cpp
|
||||||
|
dialog_pcbnew_config_libs_and_paths.cpp
|
||||||
|
dialog_pcbnew_config_libs_and_paths_fbp.cpp
|
||||||
dialog_print_using_printer.cpp
|
dialog_print_using_printer.cpp
|
||||||
dialog_setup_libs.cpp
|
|
||||||
dialog_orient_footprints.cpp
|
dialog_orient_footprints.cpp
|
||||||
dialog_track_options.cpp
|
dialog_track_options.cpp
|
||||||
dialog_track_options_base.cpp
|
dialog_track_options_base.cpp
|
||||||
|
|
|
@ -0,0 +1,366 @@
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: dialog_pcbnew_config_libs_and_paths.cpp
|
||||||
|
// Author: jean-pierre Charras
|
||||||
|
// Created: 2009 apr 18
|
||||||
|
// Licence: GPL
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/* Handle the pcbnew library config (library list, and default lib path)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "fctsys.h"
|
||||||
|
#include <wx/tokenzr.h>
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
#include "pcbnew.h"
|
||||||
|
|
||||||
|
#include "dialog_pcbnew_config_libs_and_paths.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************/
|
||||||
|
void WinEDA_PcbFrame::InstallConfigFrame( const wxPoint& pos )
|
||||||
|
/*****************************************************************/
|
||||||
|
{
|
||||||
|
DIALOG_PCBNEW_CONFIG_LIBS dialog( this );
|
||||||
|
dialog.ShowModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DIALOG_PCBNEW_CONFIG_LIBS::DIALOG_PCBNEW_CONFIG_LIBS( WinEDA_PcbFrame* parent ):
|
||||||
|
DIALOG_PCBNEW_CONFIG_LIBS_FBP(parent)
|
||||||
|
{
|
||||||
|
m_Parent = parent;
|
||||||
|
m_Config = wxGetApp().m_EDA_CommonConfig;
|
||||||
|
|
||||||
|
Init( );
|
||||||
|
|
||||||
|
wxString title = _( "from " ) + wxGetApp().m_CurrentOptionFile;
|
||||||
|
SetTitle( title );
|
||||||
|
|
||||||
|
if( GetSizer() )
|
||||||
|
GetSizer()->SetSizeHints( this );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************/
|
||||||
|
void DIALOG_PCBNEW_CONFIG_LIBS::Init()
|
||||||
|
/*************************************/
|
||||||
|
{
|
||||||
|
SetFont( *g_DialogFont );
|
||||||
|
SetFocus();
|
||||||
|
|
||||||
|
m_LibListChanged = false;
|
||||||
|
m_LibPathChanged = false;
|
||||||
|
m_UserLibDirBufferImg = g_UserLibDirBuffer; // Save the original lib path
|
||||||
|
|
||||||
|
// Display current files extension (info)
|
||||||
|
wxString msg = m_InfoBoardFileExt->GetLabel() + PcbExtBuffer;
|
||||||
|
m_InfoBoardFileExt->SetLabel( msg );
|
||||||
|
|
||||||
|
msg = m_InfoCmpFileExt->GetLabel() + NetCmpExtBuffer;
|
||||||
|
m_InfoCmpFileExt->SetLabel( msg );
|
||||||
|
|
||||||
|
msg = m_InfoLibFileExt->GetLabel() + ModuleFileExtension;
|
||||||
|
m_InfoLibFileExt->SetLabel( msg );
|
||||||
|
|
||||||
|
msg = m_InfoNetlistFileExt->GetLabel() + NetExtBuffer;
|
||||||
|
m_InfoNetlistFileExt->SetLabel( msg );
|
||||||
|
|
||||||
|
m_ListLibr->InsertItems( g_LibName_List, 0 );
|
||||||
|
|
||||||
|
// Display current modules doc file:
|
||||||
|
m_Config->Read( wxT( "module_doc_file" ), g_DocModulesFileName );
|
||||||
|
m_TextHelpModulesFileName->SetValue( g_DocModulesFileName );
|
||||||
|
|
||||||
|
// Load user libs paths:
|
||||||
|
wxStringTokenizer Token( m_UserLibDirBufferImg, wxT( ";\n\r" ) );
|
||||||
|
while( Token.HasMoreTokens() )
|
||||||
|
{
|
||||||
|
wxString path = Token.GetNextToken();
|
||||||
|
if( wxFileName::DirExists( path ) )
|
||||||
|
m_listUserPaths->Append(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display actual libraries paths:
|
||||||
|
wxPathList libpaths = wxGetApp().GetLibraryPathList();
|
||||||
|
for( unsigned ii = 0; ii < libpaths.GetCount(); ii++ )
|
||||||
|
{
|
||||||
|
m_DefaultLibraryPathslistBox->Append( libpaths[ii]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// select the first path afer the current path project
|
||||||
|
if ( libpaths.GetCount() > 1 )
|
||||||
|
m_DefaultLibraryPathslistBox->Select( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************/
|
||||||
|
void DIALOG_PCBNEW_CONFIG_LIBS::OnCancelClick( wxCommandEvent& event )
|
||||||
|
/******************************************************************/
|
||||||
|
{
|
||||||
|
// Recreate the user lib path
|
||||||
|
if ( m_LibPathChanged )
|
||||||
|
{
|
||||||
|
for ( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii ++ )
|
||||||
|
wxGetApp().RemoveLibraryPath( m_listUserPaths->GetString(ii)) ;
|
||||||
|
wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1);
|
||||||
|
}
|
||||||
|
EndModal( -1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************/
|
||||||
|
void DIALOG_PCBNEW_CONFIG_LIBS::OnOkClick( wxCommandEvent& event )
|
||||||
|
/**************************************************************/
|
||||||
|
{
|
||||||
|
m_Config->Write( wxT( "module_doc_file" ),
|
||||||
|
m_TextHelpModulesFileName->GetValue() );
|
||||||
|
|
||||||
|
// Recreate the user lib path
|
||||||
|
if ( m_LibPathChanged )
|
||||||
|
{
|
||||||
|
g_UserLibDirBuffer.Empty();
|
||||||
|
for ( unsigned ii = 0; ii < m_listUserPaths->GetCount(); ii ++ )
|
||||||
|
{
|
||||||
|
if ( ii > 0 )
|
||||||
|
g_UserLibDirBuffer << wxT(";");
|
||||||
|
g_UserLibDirBuffer << m_listUserPaths->GetString(ii);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set new active library list if the lib list of if default path list was modified
|
||||||
|
if( m_LibListChanged || m_LibPathChanged )
|
||||||
|
{
|
||||||
|
// Recreate lib list
|
||||||
|
g_LibName_List.Clear();
|
||||||
|
for ( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii ++ )
|
||||||
|
g_LibName_List.Add(m_ListLibr->GetString(ii) );
|
||||||
|
}
|
||||||
|
if ( event.GetId() != ID_SAVE_CFG )
|
||||||
|
EndModal( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**************************************************************/
|
||||||
|
void DIALOG_PCBNEW_CONFIG_LIBS::OnCloseWindow( wxCloseEvent& event )
|
||||||
|
/**************************************************************/
|
||||||
|
{
|
||||||
|
EndModal( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************/
|
||||||
|
void DIALOG_PCBNEW_CONFIG_LIBS::OnRemoveLibClick( wxCommandEvent& event )
|
||||||
|
/*********************************************************************/
|
||||||
|
/* Remove a library to the library list.
|
||||||
|
* The real list (g_LibName_List) is not changed, so the change can be cancelled
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
int ii;
|
||||||
|
|
||||||
|
ii = m_ListLibr->GetSelection();
|
||||||
|
if( ii < 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_ListLibr->Delete(ii);
|
||||||
|
m_LibListChanged = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************/
|
||||||
|
void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertLibClick( wxCommandEvent& event )
|
||||||
|
/**************************************************************************/
|
||||||
|
|
||||||
|
/* Insert or add a library to the library list:
|
||||||
|
* The new library is put in list before (insert button) the selection,
|
||||||
|
* or added (add button) to end of list
|
||||||
|
* The real list (g_LibName_List) is not changed, so the change can be cancelled
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
int ii;
|
||||||
|
wxString libfilename;
|
||||||
|
wxFileName fn;
|
||||||
|
|
||||||
|
ii = m_ListLibr->GetSelection();
|
||||||
|
if( ii == wxNOT_FOUND && event.GetId() != ID_ADD_LIB )
|
||||||
|
ii = 0;
|
||||||
|
|
||||||
|
wxString libpath;
|
||||||
|
libpath = m_DefaultLibraryPathslistBox->GetStringSelection();
|
||||||
|
if ( libpath.IsEmpty() )
|
||||||
|
libpath = wxGetApp().ReturnLastVisitedLibraryPath();
|
||||||
|
|
||||||
|
wxFileDialog FilesDialog( this, _( "Footprint library files:" ), libpath,
|
||||||
|
wxEmptyString, g_FootprintLibFileWildcard,
|
||||||
|
wxFD_DEFAULT_STYLE | wxFD_MULTIPLE );
|
||||||
|
|
||||||
|
if( FilesDialog.ShowModal() != wxID_OK )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxArrayString Filenames;
|
||||||
|
FilesDialog.GetPaths( Filenames );
|
||||||
|
|
||||||
|
for( unsigned jj = 0; jj < Filenames.GetCount(); jj++ )
|
||||||
|
{
|
||||||
|
fn = Filenames[jj];
|
||||||
|
if ( jj == 0 )
|
||||||
|
wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() );
|
||||||
|
|
||||||
|
/* If the library path is already in the library search paths
|
||||||
|
* list, just add the library name to the list. Otherwise, add
|
||||||
|
* the library name with the full or relative path.
|
||||||
|
* the relative path, when possible is preferable,
|
||||||
|
* because it preserve use of default libraries paths, when the path is a sub path of these default paths
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if( wxGetApp().GetLibraryPathList().Index( fn.GetPath() ) != wxNOT_FOUND ) // Ok, trivial case
|
||||||
|
libfilename = fn.GetName();
|
||||||
|
else // not in the default, : see if this file is in a subpath:
|
||||||
|
{
|
||||||
|
libfilename = fn.GetPathWithSep() + fn.GetName();
|
||||||
|
for ( unsigned kk = 0; kk < wxGetApp().GetLibraryPathList().GetCount(); kk ++ )
|
||||||
|
{
|
||||||
|
if( fn.MakeRelativeTo(wxGetApp().GetLibraryPathList()[kk] ) )
|
||||||
|
{
|
||||||
|
libfilename = fn.GetPathWithSep() + fn.GetName();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Add or insert new library name, if not already in list
|
||||||
|
if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
|
||||||
|
{
|
||||||
|
m_LibListChanged = TRUE;
|
||||||
|
if( event.GetId() == ID_ADD_LIB )
|
||||||
|
m_ListLibr->Append( libfilename );
|
||||||
|
else
|
||||||
|
m_ListLibr->Insert( libfilename, ii++ );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wxString msg = wxT( "<" ) + libfilename + wxT( "> : " ) +
|
||||||
|
_( "Library already in use" );
|
||||||
|
DisplayError( this, msg );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************/
|
||||||
|
void DIALOG_PCBNEW_CONFIG_LIBS::OnSaveCfgClick( wxCommandEvent& event )
|
||||||
|
/*******************************************************************/
|
||||||
|
{
|
||||||
|
OnOkClick( event );
|
||||||
|
m_Parent->Update_config( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************/
|
||||||
|
void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertPath( wxCommandEvent& event )
|
||||||
|
/***********************************************************************/
|
||||||
|
{
|
||||||
|
wxString path = wxGetApp().ReturnLastVisitedLibraryPath();
|
||||||
|
|
||||||
|
bool select = EDA_DirectorySelector( _( "Default Path for Libraries" ), /* Titre de la fenetre */
|
||||||
|
path, /* Chemin par defaut */
|
||||||
|
wxDD_DEFAULT_STYLE,
|
||||||
|
this, /* parent frame */
|
||||||
|
wxDefaultPosition );
|
||||||
|
|
||||||
|
if( !select )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( ! wxFileName::DirExists( path ) ) // Should not occurs
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Add or insert path if not already in list
|
||||||
|
if( m_listUserPaths->FindString( path ) == wxNOT_FOUND )
|
||||||
|
{
|
||||||
|
int ipos = m_listUserPaths->GetCount();
|
||||||
|
if ( event.GetId() == wxID_INSERT_PATH )
|
||||||
|
{
|
||||||
|
if ( ipos ) ipos--;
|
||||||
|
int jj = m_listUserPaths->GetSelection();
|
||||||
|
if ( jj >= 0 )
|
||||||
|
ipos = jj;
|
||||||
|
}
|
||||||
|
m_listUserPaths->Insert(path, ipos);
|
||||||
|
m_LibPathChanged = true;
|
||||||
|
wxGetApp().InsertLibraryPath( path, ipos+1 );
|
||||||
|
|
||||||
|
// Display actual libraries paths:
|
||||||
|
wxPathList libpaths = wxGetApp().GetLibraryPathList();
|
||||||
|
m_DefaultLibraryPathslistBox->Clear();
|
||||||
|
for( unsigned ii = 0; ii < libpaths.GetCount(); ii++ )
|
||||||
|
{
|
||||||
|
m_DefaultLibraryPathslistBox->Append( libpaths[ii]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
DisplayError(this, _("Path already in use") );
|
||||||
|
|
||||||
|
wxGetApp().SaveLastVisitedLibraryPath( path );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************/
|
||||||
|
void DIALOG_PCBNEW_CONFIG_LIBS::OnRemoveUserPath( wxCommandEvent& event )
|
||||||
|
/***********************************************************************/
|
||||||
|
{
|
||||||
|
int ii = m_listUserPaths->GetSelection();
|
||||||
|
if ( ii < 0 )
|
||||||
|
ii = m_listUserPaths->GetCount()-1;
|
||||||
|
if ( ii >= 0 )
|
||||||
|
{
|
||||||
|
wxGetApp().RemoveLibraryPath( m_listUserPaths->GetStringSelection() );
|
||||||
|
m_listUserPaths->Delete( ii );
|
||||||
|
m_LibPathChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display actual libraries paths:
|
||||||
|
wxPathList libpaths = wxGetApp().GetLibraryPathList();
|
||||||
|
m_DefaultLibraryPathslistBox->Clear();
|
||||||
|
for( unsigned ii = 0; ii < libpaths.GetCount(); ii++ )
|
||||||
|
{
|
||||||
|
m_DefaultLibraryPathslistBox->Append( libpaths[ii]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**************************************************************************/
|
||||||
|
void DIALOG_PCBNEW_CONFIG_LIBS::OnBrowseModDocFile( wxCommandEvent& event )
|
||||||
|
/**************************************************************************/
|
||||||
|
{
|
||||||
|
wxString FullFileName, mask;
|
||||||
|
wxString docpath, filename;
|
||||||
|
|
||||||
|
docpath = wxGetApp().ReturnLastVisitedLibraryPath(wxT( "doc" ));
|
||||||
|
|
||||||
|
mask = wxT( "*.pdf" );
|
||||||
|
|
||||||
|
wxFileDialog FilesDialog( this, _( "Footprint document file:" ), docpath,
|
||||||
|
wxEmptyString, mask,
|
||||||
|
wxFD_DEFAULT_STYLE );
|
||||||
|
|
||||||
|
if( FilesDialog.ShowModal() != wxID_OK )
|
||||||
|
return;
|
||||||
|
|
||||||
|
FullFileName = FilesDialog.GetPath( );
|
||||||
|
/* If the path is already in the library search paths
|
||||||
|
* list, just add the library name to the list. Otherwise, add
|
||||||
|
* the library name with the full or relative path.
|
||||||
|
* the relative path, when possible is preferable,
|
||||||
|
* because it preserve use of default libraries paths, when the path is a sub path of these default paths
|
||||||
|
*/
|
||||||
|
wxFileName fn = FullFileName;
|
||||||
|
wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() );
|
||||||
|
|
||||||
|
filename = wxGetApp().ReturnFilenameWithRelativePathInLibPath(FullFileName);
|
||||||
|
m_TextHelpModulesFileName->SetValue( filename );
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: dialog_pcbnew_config_libs_and_paths.h
|
||||||
|
// Author: jean-pierre Charras
|
||||||
|
// Licence: GPL
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef _DIALOG_PCBNEW_CONFIG_LIBS_H_
|
||||||
|
#define _DIALOG_PCBNEW_CONFIG_LIBS_H_
|
||||||
|
|
||||||
|
#include "dialog_pcbnew_config_libs_and_paths_fbp.h"
|
||||||
|
|
||||||
|
class DIALOG_PCBNEW_CONFIG_LIBS : public DIALOG_PCBNEW_CONFIG_LIBS_FBP
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
WinEDA_PcbFrame* m_Parent;
|
||||||
|
wxConfig * m_Config;
|
||||||
|
bool m_LibListChanged;
|
||||||
|
bool m_LibPathChanged;
|
||||||
|
wxString m_UserLibDirBufferImg; // Copy of original g_UserLibDirBuffer
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// event handlers, overiding the fbp handlers
|
||||||
|
void Init();
|
||||||
|
void OnCloseWindow( wxCloseEvent& event );
|
||||||
|
void OnSaveCfgClick( wxCommandEvent& event );
|
||||||
|
void OnRemoveLibClick( wxCommandEvent& event );
|
||||||
|
void OnAddOrInsertLibClick( wxCommandEvent& event );
|
||||||
|
void OnAddOrInsertPath( wxCommandEvent& event );
|
||||||
|
void OnOkClick( wxCommandEvent& event );
|
||||||
|
void OnCancelClick( wxCommandEvent& event );
|
||||||
|
void OnRemoveUserPath( wxCommandEvent& event );
|
||||||
|
void OnBrowseModDocFile( wxCommandEvent& event );
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
DIALOG_PCBNEW_CONFIG_LIBS( WinEDA_PcbFrame * parent );
|
||||||
|
~DIALOG_PCBNEW_CONFIG_LIBS() {};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _DIALOG_PCBNEW_CONFIG_LIBS_H_
|
|
@ -0,0 +1,198 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "dialog_pcbnew_config_libs_and_paths_fbp.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
DIALOG_PCBNEW_CONFIG_LIBS_FBP::DIALOG_PCBNEW_CONFIG_LIBS_FBP( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
||||||
|
{
|
||||||
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||||
|
|
||||||
|
wxBoxSizer* bMainSizer;
|
||||||
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bUpperSizer;
|
||||||
|
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bLeftSizer;
|
||||||
|
bLeftSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sFileExtBox;
|
||||||
|
sFileExtBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Files ext:") ), wxVERTICAL );
|
||||||
|
|
||||||
|
m_InfoBoardFileExt = new wxStaticText( this, wxID_ANY, _("Board file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_InfoBoardFileExt->Wrap( -1 );
|
||||||
|
sFileExtBox->Add( m_InfoBoardFileExt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_InfoCmpFileExt = new wxStaticText( this, wxID_ANY, _("Cmp file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_InfoCmpFileExt->Wrap( -1 );
|
||||||
|
sFileExtBox->Add( m_InfoCmpFileExt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_InfoLibFileExt = new wxStaticText( this, wxID_ANY, _("Library file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_InfoLibFileExt->Wrap( -1 );
|
||||||
|
sFileExtBox->Add( m_InfoLibFileExt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_InfoNetlistFileExt = new wxStaticText( this, wxID_ANY, _("Netlist file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_InfoNetlistFileExt->Wrap( -1 );
|
||||||
|
sFileExtBox->Add( m_InfoNetlistFileExt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
bLeftSizer->Add( sFileExtBox, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
bUpperSizer->Add( bLeftSizer, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbLibsChoiceSizer;
|
||||||
|
sbLibsChoiceSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Libraries") ), wxVERTICAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bLibsButtonsSizer;
|
||||||
|
bLibsButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
sbLibsChoiceSizer->Add( bLibsButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
|
m_staticTextlibList = new wxStaticText( this, wxID_ANY, _("Active Libraries:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextlibList->Wrap( -1 );
|
||||||
|
sbLibsChoiceSizer->Add( m_staticTextlibList, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_ListLibr = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE );
|
||||||
|
m_ListLibr->SetToolTip( _("List of active library files.\nOnly library files in this list are loaded by Pcbnew.\nThe order of this list is important:\nPcbnew searchs for a given footprint using this list order priority.") );
|
||||||
|
m_ListLibr->SetMinSize( wxSize( 300,-1 ) );
|
||||||
|
|
||||||
|
sbLibsChoiceSizer->Add( m_ListLibr, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
bUpperSizer->Add( sbLibsChoiceSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bRightSizer;
|
||||||
|
bRightSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_buttonAddLib = new wxButton( this, ID_ADD_LIB, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_buttonAddLib->SetToolTip( _("Add a new library after the selected library, and load it") );
|
||||||
|
|
||||||
|
bRightSizer->Add( m_buttonAddLib, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
|
m_buttonIns = new wxButton( this, wxID_ANY, _("Insert"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_buttonIns->SetToolTip( _("Add a new library before the selected library, and load it") );
|
||||||
|
|
||||||
|
bRightSizer->Add( m_buttonIns, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_buttonRemoveLib = new wxButton( this, ID_REMOVE_LIB, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_buttonRemoveLib->SetToolTip( _("Unload the selected library") );
|
||||||
|
|
||||||
|
bRightSizer->Add( m_buttonRemoveLib, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bRightSizer->Add( 0, 20, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_buttonOk = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bRightSizer->Add( m_buttonOk, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
|
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bRightSizer->Add( m_buttonCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_buttonSave = new wxButton( this, ID_SAVE_CFG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_buttonSave->SetToolTip( _("Accept and save current configuration setting in the local .pro file") );
|
||||||
|
|
||||||
|
bRightSizer->Add( m_buttonSave, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
|
bUpperSizer->Add( bRightSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbModulesDocSizer;
|
||||||
|
sbModulesDocSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Module Doc File:") ), wxHORIZONTAL );
|
||||||
|
|
||||||
|
m_TextHelpModulesFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
sbModulesDocSizer->Add( m_TextHelpModulesFileName, 1, wxALL, 5 );
|
||||||
|
|
||||||
|
m_buttonModDoc = new wxButton( this, wxID_BROWSE_MOD_DOC, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
sbModulesDocSizer->Add( m_buttonModDoc, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
bMainSizer->Add( sbModulesDocSizer, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbLibPathSizer;
|
||||||
|
sbLibPathSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Path for Libraries Files:") ), wxVERTICAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bUserLibPathSizer;
|
||||||
|
bUserLibPathSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbSizer4;
|
||||||
|
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Path:") ), wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bUserListSizer;
|
||||||
|
bUserListSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_listUserPaths = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||||
|
m_listUserPaths->SetToolTip( _("Additional paths used in this project. The priority is highter than default Kicad paths.") );
|
||||||
|
|
||||||
|
bUserListSizer->Add( m_listUserPaths, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
sbSizer4->Add( bUserListSizer, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bUserPathsButtonsSizer;
|
||||||
|
bUserPathsButtonsSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_buttonAddPath = new wxButton( this, ID_LIB_PATH_SEL, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bUserPathsButtonsSizer->Add( m_buttonAddPath, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_buttonInsPath = new wxButton( this, wxID_INSERT_PATH, _("Insert"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bUserPathsButtonsSizer->Add( m_buttonInsPath, 0, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_buttonRemovePath = new wxButton( this, wxID_REMOVE_PATH, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bUserPathsButtonsSizer->Add( m_buttonRemovePath, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
sbSizer4->Add( bUserPathsButtonsSizer, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
bUserLibPathSizer->Add( sbSizer4, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
sbLibPathSizer->Add( bUserLibPathSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticTextcurrenpaths = new wxStaticText( this, wxID_ANY, _("Current Full Paths for Libraries Files in Use:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextcurrenpaths->Wrap( -1 );
|
||||||
|
sbLibPathSizer->Add( m_staticTextcurrenpaths, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_DefaultLibraryPathslistBox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB );
|
||||||
|
m_DefaultLibraryPathslistBox->SetToolTip( _("Paths (system paths and user paths) used to search and load libraries files and component doc files.\nSorted by decreasing priority order.") );
|
||||||
|
m_DefaultLibraryPathslistBox->SetMinSize( wxSize( -1,70 ) );
|
||||||
|
|
||||||
|
sbLibPathSizer->Add( m_DefaultLibraryPathslistBox, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
bMainSizer->Add( sbLibPathSizer, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
this->SetSizer( bMainSizer );
|
||||||
|
this->Layout();
|
||||||
|
|
||||||
|
// Connect Events
|
||||||
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnCloseWindow ) );
|
||||||
|
m_buttonAddLib->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnAddOrInsertLibClick ), NULL, this );
|
||||||
|
m_buttonIns->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnAddOrInsertLibClick ), NULL, this );
|
||||||
|
m_buttonRemoveLib->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnRemoveLibClick ), NULL, this );
|
||||||
|
m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnOkClick ), NULL, this );
|
||||||
|
m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnCancelClick ), NULL, this );
|
||||||
|
m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnSaveCfgClick ), NULL, this );
|
||||||
|
m_buttonModDoc->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnBrowseModDocFile ), NULL, this );
|
||||||
|
m_buttonAddPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnAddOrInsertPath ), NULL, this );
|
||||||
|
m_buttonInsPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnAddOrInsertPath ), NULL, this );
|
||||||
|
m_buttonRemovePath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnRemoveUserPath ), NULL, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
DIALOG_PCBNEW_CONFIG_LIBS_FBP::~DIALOG_PCBNEW_CONFIG_LIBS_FBP()
|
||||||
|
{
|
||||||
|
// Disconnect Events
|
||||||
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnCloseWindow ) );
|
||||||
|
m_buttonAddLib->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnAddOrInsertLibClick ), NULL, this );
|
||||||
|
m_buttonIns->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnAddOrInsertLibClick ), NULL, this );
|
||||||
|
m_buttonRemoveLib->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnRemoveLibClick ), NULL, this );
|
||||||
|
m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnOkClick ), NULL, this );
|
||||||
|
m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnCancelClick ), NULL, this );
|
||||||
|
m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnSaveCfgClick ), NULL, this );
|
||||||
|
m_buttonModDoc->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnBrowseModDocFile ), NULL, this );
|
||||||
|
m_buttonAddPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnAddOrInsertPath ), NULL, this );
|
||||||
|
m_buttonInsPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnAddOrInsertPath ), NULL, this );
|
||||||
|
m_buttonRemovePath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnRemoveUserPath ), NULL, this );
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,89 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef __dialog_pcbnew_config_libs_and_paths_fbp__
|
||||||
|
#define __dialog_pcbnew_config_libs_and_paths_fbp__
|
||||||
|
|
||||||
|
#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/sizer.h>
|
||||||
|
#include <wx/statbox.h>
|
||||||
|
#include <wx/listbox.h>
|
||||||
|
#include <wx/button.h>
|
||||||
|
#include <wx/statline.h>
|
||||||
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Class DIALOG_PCBNEW_CONFIG_LIBS_FBP
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
class DIALOG_PCBNEW_CONFIG_LIBS_FBP : public wxDialog
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ID_ADD_LIB = 1000,
|
||||||
|
ID_REMOVE_LIB,
|
||||||
|
ID_SAVE_CFG,
|
||||||
|
wxID_BROWSE_MOD_DOC,
|
||||||
|
ID_LIB_PATH_SEL,
|
||||||
|
wxID_INSERT_PATH,
|
||||||
|
wxID_REMOVE_PATH,
|
||||||
|
};
|
||||||
|
|
||||||
|
wxStaticText* m_InfoBoardFileExt;
|
||||||
|
wxStaticText* m_InfoCmpFileExt;
|
||||||
|
wxStaticText* m_InfoLibFileExt;
|
||||||
|
wxStaticText* m_InfoNetlistFileExt;
|
||||||
|
wxStaticText* m_staticTextlibList;
|
||||||
|
wxListBox* m_ListLibr;
|
||||||
|
wxButton* m_buttonAddLib;
|
||||||
|
wxButton* m_buttonIns;
|
||||||
|
wxButton* m_buttonRemoveLib;
|
||||||
|
|
||||||
|
wxButton* m_buttonOk;
|
||||||
|
wxButton* m_buttonCancel;
|
||||||
|
wxButton* m_buttonSave;
|
||||||
|
wxStaticLine* m_staticline1;
|
||||||
|
wxTextCtrl* m_TextHelpModulesFileName;
|
||||||
|
wxButton* m_buttonModDoc;
|
||||||
|
wxListBox* m_listUserPaths;
|
||||||
|
wxButton* m_buttonAddPath;
|
||||||
|
wxButton* m_buttonInsPath;
|
||||||
|
wxButton* m_buttonRemovePath;
|
||||||
|
wxStaticText* m_staticTextcurrenpaths;
|
||||||
|
wxListBox* m_DefaultLibraryPathslistBox;
|
||||||
|
|
||||||
|
// Virtual event handlers, overide them in your derived class
|
||||||
|
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
|
||||||
|
virtual void OnAddOrInsertLibClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
virtual void OnRemoveLibClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
virtual void OnSaveCfgClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
virtual void OnBrowseModDocFile( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
virtual void OnAddOrInsertPath( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
virtual void OnRemoveUserPath( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
DIALOG_PCBNEW_CONFIG_LIBS_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 593,612 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
~DIALOG_PCBNEW_CONFIG_LIBS_FBP();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //__dialog_pcbnew_config_libs_and_paths_fbp__
|
|
@ -1,522 +0,0 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// Name: dialog_pcbnew_config.cpp
|
|
||||||
// Purpose:
|
|
||||||
// Author: jean-pierre Charras
|
|
||||||
// Modified by:
|
|
||||||
// Created: 18/02/2006 16:41:57
|
|
||||||
// RCS-ID:
|
|
||||||
// Copyright: License GNU
|
|
||||||
// Licence:
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/* Handle the pcbnew libary config (library list, and default lib path)
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Generated by DialogBlocks (unregistered), 18/02/2006 16:41:57
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
|
||||||
#pragma implementation "dialog_pcbnew_config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
|
||||||
#include "appl_wxstruct.h"
|
|
||||||
#include "gr_basic.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "confirm.h"
|
|
||||||
#include "gestfich.h"
|
|
||||||
#include "pcbnew.h"
|
|
||||||
|
|
||||||
////@begin includes
|
|
||||||
////@end includes
|
|
||||||
|
|
||||||
#include "dialog_setup_libs.h"
|
|
||||||
|
|
||||||
////@begin XPM images
|
|
||||||
////@end XPM images
|
|
||||||
|
|
||||||
/*****************************************************************/
|
|
||||||
void WinEDA_PcbFrame::InstallConfigFrame( const wxPoint& pos )
|
|
||||||
/*****************************************************************/
|
|
||||||
{
|
|
||||||
KiConfigPcbnewFrame* CfgFrame = new KiConfigPcbnewFrame( this );
|
|
||||||
|
|
||||||
CfgFrame->ShowModal(); CfgFrame->Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* KiConfigPcbnewFrame type definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS( KiConfigPcbnewFrame, wxDialog )
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* KiConfigPcbnewFrame event table definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( KiConfigPcbnewFrame, wxDialog )
|
|
||||||
|
|
||||||
////@begin KiConfigPcbnewFrame event table entries
|
|
||||||
EVT_CLOSE( KiConfigPcbnewFrame::OnCloseWindow )
|
|
||||||
|
|
||||||
EVT_BUTTON( SAVE_CFG, KiConfigPcbnewFrame::OnSaveCfgClick )
|
|
||||||
|
|
||||||
EVT_BUTTON( DEL_LIB, KiConfigPcbnewFrame::OnDelLibClick )
|
|
||||||
|
|
||||||
EVT_BUTTON( ADD_LIB, KiConfigPcbnewFrame::OnAddLibClick )
|
|
||||||
|
|
||||||
EVT_BUTTON( INSERT_LIB, KiConfigPcbnewFrame::OnInsertLibClick )
|
|
||||||
|
|
||||||
////@end KiConfigPcbnewFrame event table entries
|
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* KiConfigPcbnewFrame constructors
|
|
||||||
*/
|
|
||||||
|
|
||||||
KiConfigPcbnewFrame::KiConfigPcbnewFrame()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
KiConfigPcbnewFrame::KiConfigPcbnewFrame( WinEDA_PcbFrame* parent,
|
|
||||||
wxWindowID id,
|
|
||||||
const wxString& caption,
|
|
||||||
const wxPoint& pos,
|
|
||||||
const wxSize& size,
|
|
||||||
long style )
|
|
||||||
{
|
|
||||||
wxString title;
|
|
||||||
wxConfig* cfg = wxGetApp().m_EDA_CommonConfig;
|
|
||||||
|
|
||||||
m_Parent = parent;
|
|
||||||
m_LibModified = FALSE;
|
|
||||||
|
|
||||||
Create( parent, id, caption, pos, size, style );
|
|
||||||
|
|
||||||
title = _( "from " ) + wxGetApp().m_CurrentOptionFile;
|
|
||||||
SetTitle( title );
|
|
||||||
m_ListLibr->InsertItems( g_LibName_List, 0 );
|
|
||||||
wxString DocModuleFileName = cfg->Read( wxT( "module_doc_file" ),
|
|
||||||
wxT( "pcbnew/footprints.pdf" ) );
|
|
||||||
m_TextHelpModulesFileName->SetValue( DocModuleFileName );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* KiConfigPcbnewFrame creator
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool KiConfigPcbnewFrame::Create( wxWindow* parent,
|
|
||||||
wxWindowID id,
|
|
||||||
const wxString& caption,
|
|
||||||
const wxPoint& pos,
|
|
||||||
const wxSize& size,
|
|
||||||
long style )
|
|
||||||
{
|
|
||||||
////@begin KiConfigPcbnewFrame member initialisation
|
|
||||||
m_FileExtList = NULL;
|
|
||||||
m_ListLibr = NULL;
|
|
||||||
m_TextLibDir = NULL;
|
|
||||||
m_TextHelpModulesFileName = NULL;
|
|
||||||
|
|
||||||
////@end KiConfigPcbnewFrame member initialisation
|
|
||||||
|
|
||||||
////@begin KiConfigPcbnewFrame creation
|
|
||||||
SetExtraStyle( GetExtraStyle() | wxWS_EX_BLOCK_EVENTS );
|
|
||||||
wxDialog::Create( parent, id, caption, pos, size, style );
|
|
||||||
|
|
||||||
CreateControls();
|
|
||||||
GetSizer()->Fit( this );
|
|
||||||
GetSizer()->SetSizeHints( this );
|
|
||||||
Centre();
|
|
||||||
|
|
||||||
////@end KiConfigPcbnewFrame creation
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Control creation for KiConfigPcbnewFrame
|
|
||||||
*/
|
|
||||||
|
|
||||||
void KiConfigPcbnewFrame::CreateControls()
|
|
||||||
{
|
|
||||||
SetFont( *g_DialogFont );
|
|
||||||
|
|
||||||
////@begin KiConfigPcbnewFrame content construction
|
|
||||||
// Generated by DialogBlocks, 18/02/2006 17:19:54 (unregistered)
|
|
||||||
|
|
||||||
KiConfigPcbnewFrame* itemDialog1 = this;
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxVERTICAL );
|
|
||||||
itemDialog1->SetSizer( itemBoxSizer2 );
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
itemBoxSizer2->Add( itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer4 = new wxBoxSizer( wxVERTICAL );
|
|
||||||
itemBoxSizer3->Add( itemBoxSizer4, 0, wxGROW | wxALL, 5 );
|
|
||||||
|
|
||||||
wxButton* itemButton5 =
|
|
||||||
new wxButton( itemDialog1, SAVE_CFG, _(
|
|
||||||
"Save Cfg" ), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemButton5->SetForegroundColour( wxColour( 204, 0, 0 ) );
|
|
||||||
itemBoxSizer4->Add( itemButton5, 0, wxGROW | wxALL, 5 );
|
|
||||||
|
|
||||||
itemBoxSizer4->Add( 5, 5, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
|
|
||||||
|
|
||||||
wxStaticBox* itemStaticBoxSizer7Static =
|
|
||||||
new wxStaticBox( itemDialog1, wxID_ANY, _(
|
|
||||||
"Files ext:" ) );
|
|
||||||
m_FileExtList = new wxStaticBoxSizer( itemStaticBoxSizer7Static,
|
|
||||||
wxVERTICAL );
|
|
||||||
itemBoxSizer4->Add( m_FileExtList, 0, wxGROW | wxALL, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer8 = new wxBoxSizer( wxVERTICAL );
|
|
||||||
itemBoxSizer3->Add( itemBoxSizer8,
|
|
||||||
0,
|
|
||||||
wxGROW | wxLEFT | wxRIGHT | wxBOTTOM,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer9 = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
itemBoxSizer8->Add( itemBoxSizer9,
|
|
||||||
0,
|
|
||||||
wxALIGN_CENTER_HORIZONTAL | wxLEFT | wxRIGHT |
|
|
||||||
wxBOTTOM,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer10 = new wxBoxSizer( wxVERTICAL );
|
|
||||||
itemBoxSizer9->Add( itemBoxSizer10, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer11 = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
itemBoxSizer10->Add( itemBoxSizer11,
|
|
||||||
0,
|
|
||||||
wxALIGN_CENTER_HORIZONTAL | wxALL,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
wxButton* itemButton12 = new wxButton( itemDialog1, DEL_LIB, _(
|
|
||||||
"Del" ), wxDefaultPosition,
|
|
||||||
wxDefaultSize, 0 );
|
|
||||||
itemButton12->SetForegroundColour( wxColour( 204, 0, 0 ) );
|
|
||||||
itemBoxSizer11->Add( itemButton12, 0, wxGROW | wxALL, 5 );
|
|
||||||
|
|
||||||
wxButton* itemButton13 = new wxButton( itemDialog1, ADD_LIB, _(
|
|
||||||
"Add" ), wxDefaultPosition,
|
|
||||||
wxDefaultSize, 0 );
|
|
||||||
itemButton13->SetForegroundColour( wxColour( 0, 128, 0 ) );
|
|
||||||
itemBoxSizer11->Add( itemButton13, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
|
|
||||||
|
|
||||||
wxButton* itemButton14 = new wxButton( itemDialog1, INSERT_LIB, _(
|
|
||||||
"Ins" ), wxDefaultPosition,
|
|
||||||
wxDefaultSize, 0 );
|
|
||||||
itemButton14->SetDefault();
|
|
||||||
itemButton14->SetForegroundColour( wxColour( 0, 0, 255 ) );
|
|
||||||
itemBoxSizer11->Add( itemButton14, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer15 = new wxBoxSizer( wxVERTICAL );
|
|
||||||
itemBoxSizer10->Add( itemBoxSizer15, 0, wxGROW | wxALL, 5 );
|
|
||||||
|
|
||||||
wxStaticText* itemStaticText16 = new wxStaticText( itemDialog1,
|
|
||||||
wxID_STATIC,
|
|
||||||
_( "Libraries" ),
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxDefaultSize,
|
|
||||||
0 );
|
|
||||||
itemStaticText16->SetForegroundColour( wxColour( 204, 0, 0 ) );
|
|
||||||
itemBoxSizer15->Add( itemStaticText16,
|
|
||||||
0,
|
|
||||||
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxADJUST_MINSIZE,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
wxString* m_ListLibrStrings = NULL;
|
|
||||||
m_ListLibr = new wxListBox( itemDialog1,
|
|
||||||
ID_LIST_LIBS,
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxSize( -1, 200 ),
|
|
||||||
0,
|
|
||||||
m_ListLibrStrings,
|
|
||||||
wxLB_SINGLE | wxSUNKEN_BORDER );
|
|
||||||
itemBoxSizer15->Add( m_ListLibr,
|
|
||||||
0,
|
|
||||||
wxGROW | wxLEFT | wxRIGHT | wxBOTTOM,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
wxStaticText* itemStaticText18 = new wxStaticText( itemDialog1,
|
|
||||||
wxID_STATIC,
|
|
||||||
_( "Lib Modules Dir:" ),
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxDefaultSize,
|
|
||||||
wxALIGN_LEFT );
|
|
||||||
itemStaticText18->SetForegroundColour( wxColour( 204, 0, 0 ) );
|
|
||||||
itemBoxSizer2->Add( itemStaticText18,
|
|
||||||
0,
|
|
||||||
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxADJUST_MINSIZE,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
m_TextLibDir = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(
|
|
||||||
"" ), wxDefaultPosition, wxDefaultSize,
|
|
||||||
0 );
|
|
||||||
itemBoxSizer2->Add( m_TextLibDir,
|
|
||||||
0,
|
|
||||||
wxGROW | wxLEFT | wxRIGHT | wxBOTTOM,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
wxStaticText* itemStaticText20 = new wxStaticText( itemDialog1,
|
|
||||||
wxID_STATIC,
|
|
||||||
_( "Module Doc File:" ),
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxDefaultSize,
|
|
||||||
wxALIGN_LEFT );
|
|
||||||
itemStaticText20->SetForegroundColour( wxColour( 204, 0, 0 ) );
|
|
||||||
itemBoxSizer2->Add( itemStaticText20,
|
|
||||||
0,
|
|
||||||
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxADJUST_MINSIZE,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
m_TextHelpModulesFileName =
|
|
||||||
new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(
|
|
||||||
"" ), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemBoxSizer2->Add( m_TextHelpModulesFileName,
|
|
||||||
0,
|
|
||||||
wxGROW | wxLEFT | wxRIGHT | wxBOTTOM,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
// Set validators
|
|
||||||
m_TextLibDir->SetValidator( wxTextValidator( wxFILTER_NONE,
|
|
||||||
&g_UserLibDirBuffer ) );
|
|
||||||
|
|
||||||
////@end KiConfigPcbnewFrame content construction
|
|
||||||
wxString msg = _( "Board ext: " ) + PcbExtBuffer;
|
|
||||||
wxStaticText* text = new wxStaticText( itemDialog1,
|
|
||||||
-1,
|
|
||||||
msg,
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxDefaultSize,
|
|
||||||
0 );
|
|
||||||
m_FileExtList->Add( text,
|
|
||||||
0,
|
|
||||||
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxADJUST_MINSIZE,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
msg = _( "Cmp ext: " ) + NetCmpExtBuffer;
|
|
||||||
text = new wxStaticText( itemDialog1,
|
|
||||||
-1,
|
|
||||||
msg,
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxDefaultSize,
|
|
||||||
0 );
|
|
||||||
m_FileExtList->Add( text,
|
|
||||||
0,
|
|
||||||
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxADJUST_MINSIZE,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
msg = _( "Lib ext: " ) + ModuleFileExtension;
|
|
||||||
text = new wxStaticText( itemDialog1,
|
|
||||||
-1,
|
|
||||||
msg,
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxDefaultSize,
|
|
||||||
0 );
|
|
||||||
m_FileExtList->Add( text,
|
|
||||||
0,
|
|
||||||
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxADJUST_MINSIZE,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
msg = _( "Net ext: " ) + NetExtBuffer;
|
|
||||||
text = new wxStaticText( itemDialog1,
|
|
||||||
-1,
|
|
||||||
msg,
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxDefaultSize,
|
|
||||||
0 );
|
|
||||||
m_FileExtList->Add( text,
|
|
||||||
0,
|
|
||||||
wxALIGN_LEFT | wxLEFT | wxRIGHT | wxADJUST_MINSIZE,
|
|
||||||
5 );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
|
|
||||||
*/
|
|
||||||
|
|
||||||
void KiConfigPcbnewFrame::OnCloseWindow( wxCloseEvent& event )
|
|
||||||
{
|
|
||||||
SetNewOptions();
|
|
||||||
EndModal( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for SAVE_CFG
|
|
||||||
*/
|
|
||||||
|
|
||||||
void KiConfigPcbnewFrame::OnSaveCfgClick( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
SetNewOptions();
|
|
||||||
m_Parent->Update_config( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for DEL_LIB
|
|
||||||
*/
|
|
||||||
|
|
||||||
void KiConfigPcbnewFrame::OnDelLibClick( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
LibDelFct( event );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ADD_LIB
|
|
||||||
*/
|
|
||||||
|
|
||||||
void KiConfigPcbnewFrame::OnAddLibClick( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
LibInsertFct( event );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for INSERT_LIB
|
|
||||||
*/
|
|
||||||
|
|
||||||
void KiConfigPcbnewFrame::OnInsertLibClick( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
LibInsertFct( event );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Should we show tooltips?
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool KiConfigPcbnewFrame::ShowToolTips()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Get bitmap resources
|
|
||||||
*/
|
|
||||||
|
|
||||||
wxBitmap KiConfigPcbnewFrame::GetBitmapResource( const wxString& name )
|
|
||||||
{
|
|
||||||
// Bitmap retrieval
|
|
||||||
////@begin KiConfigPcbnewFrame bitmap retrieval
|
|
||||||
wxUnusedVar( name );
|
|
||||||
return wxNullBitmap;
|
|
||||||
|
|
||||||
////@end KiConfigPcbnewFrame bitmap retrieval
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Get icon resources
|
|
||||||
*/
|
|
||||||
|
|
||||||
wxIcon KiConfigPcbnewFrame::GetIconResource( const wxString& name )
|
|
||||||
{
|
|
||||||
// Icon retrieval
|
|
||||||
////@begin KiConfigPcbnewFrame icon retrieval
|
|
||||||
wxUnusedVar( name );
|
|
||||||
return wxNullIcon;
|
|
||||||
|
|
||||||
////@end KiConfigPcbnewFrame icon retrieval
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************/
|
|
||||||
void KiConfigPcbnewFrame::SetNewOptions()
|
|
||||||
/********************************************/
|
|
||||||
{
|
|
||||||
wxConfig* cfg = wxGetApp().m_EDA_CommonConfig;
|
|
||||||
|
|
||||||
g_UserLibDirBuffer = m_TextLibDir->GetValue();
|
|
||||||
cfg->Write( wxT( "module_doc_file" ),
|
|
||||||
m_TextHelpModulesFileName->GetValue() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************/
|
|
||||||
void KiConfigPcbnewFrame::LibDelFct( wxCommandEvent& event )
|
|
||||||
/********************************************************/
|
|
||||||
{
|
|
||||||
int ii;
|
|
||||||
|
|
||||||
ii = m_ListLibr->GetSelection();
|
|
||||||
if( ii < 0 )
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_LibName_List.RemoveAt( ii );
|
|
||||||
|
|
||||||
m_ListLibr->Clear();
|
|
||||||
m_ListLibr->InsertItems( g_LibName_List, 0 );
|
|
||||||
m_LibModified = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************
|
|
||||||
* Insert or add a library to the existing library list:
|
|
||||||
* New library is put in list before (insert) or after (add)
|
|
||||||
* the selection.
|
|
||||||
*
|
|
||||||
*************************************************************/
|
|
||||||
void KiConfigPcbnewFrame::LibInsertFct( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
int ii;
|
|
||||||
wxFileName fn;
|
|
||||||
wxString tmp;
|
|
||||||
|
|
||||||
ii = m_ListLibr->GetSelection();
|
|
||||||
if( ii == wxNOT_FOUND && event.GetId() == INSERT_LIB )
|
|
||||||
ii = 0;
|
|
||||||
|
|
||||||
SetNewOptions();
|
|
||||||
|
|
||||||
wxFileDialog FilesDialog( this, _( "Foot Print Library Files" ),
|
|
||||||
wxEmptyString, wxEmptyString,
|
|
||||||
ModuleFileWildcard, wxFD_OPEN | wxFD_MULTIPLE );
|
|
||||||
|
|
||||||
if( FilesDialog.ShowModal() != wxID_OK )
|
|
||||||
return;
|
|
||||||
|
|
||||||
wxArrayString Filenames;
|
|
||||||
FilesDialog.GetPaths( Filenames );
|
|
||||||
|
|
||||||
for( unsigned jj = 0; jj < Filenames.GetCount(); jj++ )
|
|
||||||
{
|
|
||||||
fn = Filenames[jj];
|
|
||||||
|
|
||||||
/* If the library path is already in the library search paths
|
|
||||||
* list, just add the library name to the list. Otherwise, add
|
|
||||||
* the library name with the full path. */
|
|
||||||
if( wxGetApp().GetLibraryPathList().Index( fn.GetPath() ) == wxNOT_FOUND )
|
|
||||||
tmp = fn.GetPathWithSep() + fn.GetName();
|
|
||||||
else
|
|
||||||
tmp = fn.GetName();
|
|
||||||
|
|
||||||
// Add or insert new library name.
|
|
||||||
if( g_LibName_List.Index( tmp, fn.IsCaseSensitive() ) == wxNOT_FOUND )
|
|
||||||
{
|
|
||||||
m_LibModified = TRUE;
|
|
||||||
if( event.GetId() == ADD_LIB )
|
|
||||||
g_LibName_List.Add( tmp );
|
|
||||||
else
|
|
||||||
g_LibName_List.Insert( tmp, ii++ );
|
|
||||||
m_ListLibr->Clear();
|
|
||||||
m_ListLibr->InsertItems( g_LibName_List, 0 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxString msg = wxT( "<" ) + tmp + wxT( "> : " ) +
|
|
||||||
_( "Library already in use" );
|
|
||||||
DisplayError( this, msg );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,133 +0,0 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: dialog_pcbnew_config.h
|
|
||||||
// Purpose:
|
|
||||||
// Author: jean-pierre Charras
|
|
||||||
// Modified by:
|
|
||||||
// Created: 18/02/2006 16:41:57
|
|
||||||
// RCS-ID:
|
|
||||||
// Copyright: License GNU
|
|
||||||
// Licence:
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// Generated by DialogBlocks (unregistered), 18/02/2006 16:41:57
|
|
||||||
|
|
||||||
#ifndef _DIALOG_PCBNEW_CONFIG_H_
|
|
||||||
#define _DIALOG_PCBNEW_CONFIG_H_
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
|
||||||
#pragma interface "dialog_pcbnew_config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Includes
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin includes
|
|
||||||
#include "wx/valtext.h"
|
|
||||||
////@end includes
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Forward declarations
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin forward declarations
|
|
||||||
////@end forward declarations
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Control identifiers
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin control identifiers
|
|
||||||
#define ID_DIALOG 10000
|
|
||||||
#define SYMBOL_KICONFIGPCBNEWFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
|
|
||||||
#define SYMBOL_KICONFIGPCBNEWFRAME_TITLE _("Dialog")
|
|
||||||
#define SYMBOL_KICONFIGPCBNEWFRAME_IDNAME ID_DIALOG
|
|
||||||
#define SYMBOL_KICONFIGPCBNEWFRAME_SIZE wxSize(400, 300)
|
|
||||||
#define SYMBOL_KICONFIGPCBNEWFRAME_POSITION wxDefaultPosition
|
|
||||||
#define SAVE_CFG 10001
|
|
||||||
#define DEL_LIB 10002
|
|
||||||
#define ADD_LIB 10003
|
|
||||||
#define INSERT_LIB 10004
|
|
||||||
#define ID_LIST_LIBS 10005
|
|
||||||
#define ID_TEXTCTRL 10007
|
|
||||||
#define ID_TEXTCTRL1 10008
|
|
||||||
////@end control identifiers
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Compatibility
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef wxCLOSE_BOX
|
|
||||||
#define wxCLOSE_BOX 0x1000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* KiConfigPcbnewFrame class declaration
|
|
||||||
*/
|
|
||||||
|
|
||||||
class KiConfigPcbnewFrame: public wxDialog
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( KiConfigPcbnewFrame )
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
|
|
||||||
public:
|
|
||||||
/// Constructors
|
|
||||||
KiConfigPcbnewFrame( );
|
|
||||||
KiConfigPcbnewFrame( WinEDA_PcbFrame* parent, wxWindowID id = SYMBOL_KICONFIGPCBNEWFRAME_IDNAME, const wxString& caption = SYMBOL_KICONFIGPCBNEWFRAME_TITLE, const wxPoint& pos = SYMBOL_KICONFIGPCBNEWFRAME_POSITION, const wxSize& size = SYMBOL_KICONFIGPCBNEWFRAME_SIZE, long style = SYMBOL_KICONFIGPCBNEWFRAME_STYLE );
|
|
||||||
|
|
||||||
/// Creation
|
|
||||||
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_KICONFIGPCBNEWFRAME_IDNAME, const wxString& caption = SYMBOL_KICONFIGPCBNEWFRAME_TITLE, const wxPoint& pos = SYMBOL_KICONFIGPCBNEWFRAME_POSITION, const wxSize& size = SYMBOL_KICONFIGPCBNEWFRAME_SIZE, long style = SYMBOL_KICONFIGPCBNEWFRAME_STYLE );
|
|
||||||
|
|
||||||
/// Creates the controls and sizers
|
|
||||||
void CreateControls();
|
|
||||||
|
|
||||||
////@begin KiConfigPcbnewFrame event handler declarations
|
|
||||||
|
|
||||||
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
|
|
||||||
void OnCloseWindow( wxCloseEvent& event );
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for SAVE_CFG
|
|
||||||
void OnSaveCfgClick( wxCommandEvent& event );
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for DEL_LIB
|
|
||||||
void OnDelLibClick( wxCommandEvent& event );
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ADD_LIB
|
|
||||||
void OnAddLibClick( wxCommandEvent& event );
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for INSERT_LIB
|
|
||||||
void OnInsertLibClick( wxCommandEvent& event );
|
|
||||||
|
|
||||||
////@end KiConfigPcbnewFrame event handler declarations
|
|
||||||
|
|
||||||
////@begin KiConfigPcbnewFrame member function declarations
|
|
||||||
|
|
||||||
/// Retrieves bitmap resources
|
|
||||||
wxBitmap GetBitmapResource( const wxString& name );
|
|
||||||
|
|
||||||
/// Retrieves icon resources
|
|
||||||
wxIcon GetIconResource( const wxString& name );
|
|
||||||
////@end KiConfigPcbnewFrame member function declarations
|
|
||||||
|
|
||||||
/// Should we show tooltips?
|
|
||||||
static bool ShowToolTips();
|
|
||||||
|
|
||||||
void SaveCfg(wxCommandEvent& event);
|
|
||||||
void LibDelFct(wxCommandEvent& event);
|
|
||||||
void LibInsertFct(wxCommandEvent& event);
|
|
||||||
void SetNewOptions();
|
|
||||||
|
|
||||||
////@begin KiConfigPcbnewFrame member variables
|
|
||||||
wxStaticBoxSizer* m_FileExtList;
|
|
||||||
wxListBox* m_ListLibr;
|
|
||||||
wxTextCtrl* m_TextLibDir;
|
|
||||||
wxTextCtrl* m_TextHelpModulesFileName;
|
|
||||||
////@end KiConfigPcbnewFrame member variables
|
|
||||||
|
|
||||||
WinEDA_PcbFrame * m_Parent;
|
|
||||||
bool m_LibModified;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _DIALOG_PCBNEW_CONFIG_H_
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1029,10 +1029,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
|
||||||
case ID_POPUP_PCB_DISPLAY_FOOTPRINT_DOC:
|
case ID_POPUP_PCB_DISPLAY_FOOTPRINT_DOC:
|
||||||
{
|
{
|
||||||
wxConfig* cfg = wxGetApp().m_EDA_CommonConfig;
|
wxConfig* cfg = wxGetApp().m_EDA_CommonConfig;
|
||||||
wxString msg = FindKicadHelpPath();
|
cfg->Read( wxT( "module_doc_file" ), g_DocModulesFileName );
|
||||||
msg += cfg->Read( wxT( "module_doc_file" ),
|
GetAssociatedDocument( this, g_DocModulesFileName, &wxGetApp().GetLibraryPathList() );
|
||||||
wxT( "pcbnew/footprints.pdf" ) );
|
|
||||||
GetAssociatedDocument( this, msg );
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,8 @@ OBJECTS= $(TARGET).o\
|
||||||
locate.o \
|
locate.o \
|
||||||
modules.o \
|
modules.o \
|
||||||
loadcmp.o \
|
loadcmp.o \
|
||||||
dialog_setup_libs.o \
|
dialog_pcbnew_config_libs_and_paths.o\
|
||||||
|
dialog_pcbnew_config_libs_and_paths_fbp.o\
|
||||||
dialog_general_options.o \
|
dialog_general_options.o \
|
||||||
dialog_general_options_BoardEditor_base.o\
|
dialog_general_options_BoardEditor_base.o\
|
||||||
dialog_display_options_base.o\
|
dialog_display_options_base.o\
|
||||||
|
@ -181,7 +182,7 @@ affiche.o: affiche.cpp
|
||||||
|
|
||||||
tr_modif.o: tr_modif.cpp
|
tr_modif.o: tr_modif.cpp
|
||||||
|
|
||||||
dialog_setup_libs.o: dialog_setup_libs.cpp
|
dialog_pcbnew_config_libs_and_paths.o: dialog_pcbnew_config_libs_and_paths.cpp dialog_pcbnew_config_libs_and_paths_fbp.h
|
||||||
|
|
||||||
initpcb.o: initpcb.cpp dialog_initpcb.cpp dialog_initpcb.h
|
initpcb.o: initpcb.cpp dialog_initpcb.cpp dialog_initpcb.h
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,16 @@ bool Plot_Pads_All_Layers; /* Plot pads meme n'appartenant pas a la
|
||||||
couche ( utile pour serigraphie) */
|
couche ( utile pour serigraphie) */
|
||||||
|
|
||||||
|
|
||||||
|
// Wildcard for footprint libraries filesnames
|
||||||
|
const wxString g_FootprintLibFileWildcard( wxT( "Kicad footprint library file " \
|
||||||
|
"(*.mod)|*.mod" ) );
|
||||||
|
/* Name of the document footprint list
|
||||||
|
* usually located in share/modules/footprints_doc
|
||||||
|
* this is of the responsability to users to create this file
|
||||||
|
* if they want to have a list of footprints
|
||||||
|
*/
|
||||||
|
wxString g_DocModulesFileName = wxT("footprints_doc/footprints.pdf");
|
||||||
|
|
||||||
IMPLEMENT_APP( WinEDA_App )
|
IMPLEMENT_APP( WinEDA_App )
|
||||||
|
|
||||||
/****************************/
|
/****************************/
|
||||||
|
|
|
@ -56,6 +56,8 @@ extern bool g_Show_Pads_Module_in_Move;
|
||||||
extern bool g_Raccord_45_Auto;
|
extern bool g_Raccord_45_Auto;
|
||||||
extern bool g_ShowIsolDuringCreateTrack;
|
extern bool g_ShowIsolDuringCreateTrack;
|
||||||
|
|
||||||
|
extern const wxString g_FootprintLibFileWildcard; // Wildcard for footprint libraries filesnames
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function IsModuleLayerVisible
|
* Function IsModuleLayerVisible
|
||||||
* expects either of the two layers on which a module can reside, and returns
|
* expects either of the two layers on which a module can reside, and returns
|
||||||
|
@ -78,6 +80,7 @@ bool inline IsModuleLayerVisible( int layer ) {
|
||||||
extern bool Track_45_Only;
|
extern bool Track_45_Only;
|
||||||
extern bool Segments_45_Only;
|
extern bool Segments_45_Only;
|
||||||
extern wxString g_Shapes3DExtBuffer;
|
extern wxString g_Shapes3DExtBuffer;
|
||||||
|
extern wxString g_DocModulesFileName;
|
||||||
|
|
||||||
/* A buffer used in some computations (will be removed in next cleanup code,
|
/* A buffer used in some computations (will be removed in next cleanup code,
|
||||||
* do not use) */
|
* do not use) */
|
||||||
|
|
Loading…
Reference in New Issue