Commit 0dddb720 authored by jean-pierre charras's avatar jean-pierre charras

Set minimum cmake version to 2.6.4. Added footprint name edition in the module...

Set minimum cmake version to 2.6.4. Added footprint name edition in the module editor dialog properties.
parent 67a959a5
...@@ -2,9 +2,9 @@ project(kicad) ...@@ -2,9 +2,9 @@ project(kicad)
# test the minimum Cmake version requirement (could be different under unix or Windows # test the minimum Cmake version requirement (could be different under unix or Windows
if(WIN32) if(WIN32)
cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR) cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)
else(WIN32) else(WIN32)
cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR) cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)
endif(WIN32) endif(WIN32)
# Path to local CMake modules. # Path to local CMake modules.
......
...@@ -121,8 +121,8 @@ bool IsOK( wxWindow* parent, const wxString& text ) ...@@ -121,8 +121,8 @@ bool IsOK( wxWindow* parent, const wxString& text )
* Leading and trailing spaces are removed * Leading and trailing spaces are removed
* Buffer is the initial text displayed, anr the returned text * Buffer is the initial text displayed, anr the returned text
* Return: * Return:
* 1 if OK * 0 if OK
* 0 if ESCAPE * 1 if CANCEL
*/ */
int Get_Message( const wxString& title, // The question int Get_Message( const wxString& title, // The question
const wxString& frame_caption, // The frame caption const wxString& frame_caption, // The frame caption
......
update=13/5/2006-07:55:36 update=16/05/2010 14:21:37
version=1 version=1
last_client=pcbnew last_client=pcbnew
[common] [common]
NetDir= NetDir=
[eeschema] [eeschema]
version=1 version=1
LibDir= LibDir=
NetFmt=1 NetFmt=1
HPGLSpd=20 HPGLSpd=20
HPGLDm=15 HPGLDm=15
HPGLNum=1 HPGLNum=1
offX_A4=0 offX_A4=0
offY_A4=0 offY_A4=0
offX_A3=0 offX_A3=0
offY_A3=0 offY_A3=0
offX_A2=0 offX_A2=0
offY_A2=0 offY_A2=0
offX_A1=0 offX_A1=0
offY_A1=0 offY_A1=0
offX_A0=0 offX_A0=0
offY_A0=0 offY_A0=0
offX_A=0 offX_A=0
offY_A=0 offY_A=0
offX_B=0 offX_B=0
offY_B=0 offY_B=0
offX_C=0 offX_C=0
offY_C=0 offY_C=0
offX_D=0 offX_D=0
offY_D=0 offY_D=0
offX_E=0 offX_E=0
offY_E=0 offY_E=0
RptD_X=0 RptD_X=0
RptD_Y=100 RptD_Y=100
RptLab=1 RptLab=1
PenMin=20 PenMin=20
SimCmd= SimCmd=
UseNetN=0 UseNetN=0
[eeschema/libraries] [eeschema/libraries]
LibName1=power LibName1=power
LibName2=device LibName2=device
LibName3=conn LibName3=conn
LibName4=linear LibName4=linear
LibName5=regul LibName5=regul
LibName6=74xx LibName6=74xx
LibName7=cmos4000 LibName7=cmos4000
LibName8=adc-dac LibName8=adc-dac
LibName9=memory LibName9=memory
LibName10=xilinx LibName10=xilinx
LibName11=special LibName11=special
[general] [general]
version=1 version=1
RootSch=interf_u.sch RootSch=interf_u.sch
BoardNm=interf_u.brd BoardNm=interf_u.brd
[cvpcb] [cvpcb]
version=1 version=1
NetITyp=0 NetITyp=0
NetIExt=.net NetIExt=.net
PkgIExt=.pkg PkgIExt=.pkg
NetType=0 NetType=0
[cvpcb/libraries] [cvpcb/libraries]
EquName1=devcms EquName1=devcms
[pcbnew] [pcbnew]
version=1 version=1
PadDril=1200 PadDrlX=430
PadDimH=1500 PadDimH=550
PadDimV=1500 PadDimV=550
PadForm=1 BoardThickness=630
PadMask=14745599 SgPcb45=1
ViaDiam=600 TxtPcbV=800
ViaDril=250 TxtPcbH=600
Isol=110 TxtModV=600
Countlayer=2 TxtModH=600
Lpiste=170 TxtModW=120
RouteTo=15 VEgarde=100
RouteBo=0 DrawLar=150
TypeVia=3 EdgeLar=50
Segm45=1 TxtLar=170
Racc45=1 MSegLar=150
Unite=0 LastNetListRead=interf_u.net
SegFill=1 [pcbnew/libraries]
SegAffG=0 LibDir=
NewAffG=1 LibName1=connect
PadFill=1 LibName2=discret
PadAffG=1 LibName3=pin_array
PadSNum=1 LibName4=sockets
ModAffC=1 LibName5=divers
ModAffT=1 LibName6=libcms
PcbAffT=1 LibName7=display
SgPcb45=1
TxtPcbV=800
TxtPcbH=600
TxtModV=600
TxtModH=600
TxtModW=120
HPGLnum=1
HPGdiam=15
HPGLSpd=20
HPGLrec=2
HPGLorg=0
GERBmin=15
VEgarde=100
DrawLar=150
EdgeLar=150
TxtLar=170
MSegLar=150
ForPlot=1
WpenSer=10
UserGrX=0,1
UserGrY=0,1
UserGrU=0
DivGrPc=1
TimeOut=600
MaxLnkS=3
ShowRat=0
ShowMRa=1
[pcbnew/libraries]
LibDir=
LibName1=connect
LibName2=discret
LibName3=pin_array
LibName4=divers
LibName5=libcms
LibName6=supports
LibName7=display
...@@ -77,7 +77,8 @@ void DIALOG_MODULE_MODULE_EDITOR::InitModeditProperties() ...@@ -77,7 +77,8 @@ void DIALOG_MODULE_MODULE_EDITOR::InitModeditProperties()
m_ValueCopy->Copy(m_CurrentModule->m_Value); m_ValueCopy->Copy(m_CurrentModule->m_Value);
m_ReferenceCtrl->SetValue( m_ReferenceCopy->m_Text ); m_ReferenceCtrl->SetValue( m_ReferenceCopy->m_Text );
m_ValueCtrl->SetValue( m_ValueCopy->m_Text ); m_ValueCtrl->SetValue( m_ValueCopy->m_Text );
m_ValueCtrl->SetValue( m_ValueCopy->m_Text );
m_FootprintNameCtrl->SetValue( m_CurrentModule->m_LibRef );
#if wxCHECK_VERSION( 2, 8, 0 ) #if wxCHECK_VERSION( 2, 8, 0 )
m_AttributsCtrl->SetItemToolTip( 0, _( "Use this attribute for most non smd components" ) ); m_AttributsCtrl->SetItemToolTip( 0, _( "Use this attribute for most non smd components" ) );
...@@ -343,6 +344,10 @@ void DIALOG_MODULE_MODULE_EDITOR::OnOkClick( wxCommandEvent& event ) ...@@ -343,6 +344,10 @@ void DIALOG_MODULE_MODULE_EDITOR::OnOkClick( wxCommandEvent& event )
m_CurrentModule->m_Doc = m_DocCtrl->GetValue(); m_CurrentModule->m_Doc = m_DocCtrl->GetValue();
m_CurrentModule->m_KeyWord = m_KeywordCtrl->GetValue(); m_CurrentModule->m_KeyWord = m_KeywordCtrl->GetValue();
// Init footprint name in library
if( ! m_FootprintNameCtrl->GetValue( ).IsEmpty() )
m_CurrentModule->m_LibRef = m_FootprintNameCtrl->GetValue( );
// Init Fields: // Init Fields:
m_CurrentModule->m_Reference->Copy(m_ReferenceCopy ); m_CurrentModule->m_Reference->Copy(m_ReferenceCopy );
m_CurrentModule->m_Value->Copy(m_ValueCopy ); m_CurrentModule->m_Value->Copy(m_ValueCopy );
...@@ -429,3 +434,4 @@ void DIALOG_MODULE_MODULE_EDITOR::OnEditValue(wxCommandEvent& event) ...@@ -429,3 +434,4 @@ void DIALOG_MODULE_MODULE_EDITOR::OnEditValue(wxCommandEvent& event)
m_Parent->GetScreen()->m_Curseur = tmp; m_Parent->GetScreen()->m_Curseur = tmp;
m_ValueCtrl->SetValue(m_ValueCopy->m_Text); m_ValueCtrl->SetValue(m_ValueCopy->m_Text);
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_edit_module_for_Modedit_base__ #ifndef __dialog_edit_module_for_Modedit_base__
#define __dialog_edit_module_for_Modedit_base__ #define __dialog_edit_module_for_Modedit_base__
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include <wx/string.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/radiobox.h> #include <wx/radiobox.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/slider.h> #include <wx/slider.h>
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/panel.h> #include <wx/panel.h>
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/image.h> #include <wx/image.h>
#include <wx/icon.h> #include <wx/icon.h>
#include <wx/listbox.h> #include <wx/listbox.h>
#include <wx/notebook.h> #include <wx/notebook.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#define ID_NOTEBOOK 1000 #define ID_NOTEBOOK 1000
#define ID_BROWSE_3D_LIB 1001 #define ID_BROWSE_3D_LIB 1001
#define ID_REMOVE_3D_SHAPE 1002 #define ID_REMOVE_3D_SHAPE 1002
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_MODULE_MODULE_EDITOR_BASE /// Class DIALOG_MODULE_MODULE_EDITOR_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_MODULE_MODULE_EDITOR_BASE : public wxDialog class DIALOG_MODULE_MODULE_EDITOR_BASE : public wxDialog
{ {
private: private:
wxBoxSizer* m_GeneralBoxSizer; wxBoxSizer* m_GeneralBoxSizer;
wxBoxSizer* m_PropRightSizer; wxBoxSizer* m_PropRightSizer;
protected: protected:
wxNotebook* m_NoteBook; wxNotebook* m_NoteBook;
wxPanel* m_PanelProperties; wxPanel* m_PanelProperties;
wxTextCtrl* m_DocCtrl; wxTextCtrl* m_DocCtrl;
wxTextCtrl* m_KeywordCtrl; wxTextCtrl* m_KeywordCtrl;
wxTextCtrl* m_ReferenceCtrl; wxTextCtrl* m_ReferenceCtrl;
wxButton* m_button4; wxButton* m_button4;
wxTextCtrl* m_ValueCtrl; wxTextCtrl* m_ValueCtrl;
wxButton* m_button5; wxButton* m_button5;
wxRadioBox* m_AttributsCtrl;
wxRadioBox* m_AutoPlaceCtrl; wxTextCtrl* m_FootprintNameCtrl;
wxStaticText* m_staticText11;
wxSlider* m_CostRot90Ctrl; wxRadioBox* m_AttributsCtrl;
wxStaticText* m_staticText12; wxRadioBox* m_AutoPlaceCtrl;
wxSlider* m_CostRot180Ctrl; wxStaticText* m_staticText11;
wxStaticText* m_staticTextInfo; wxSlider* m_CostRot90Ctrl;
wxStaticText* m_staticTextNetClearance; wxStaticText* m_staticText12;
wxTextCtrl* m_NetClearanceValueCtrl; wxSlider* m_CostRot180Ctrl;
wxStaticText* m_NetClearanceUnits; wxStaticText* m_staticTextInfo;
wxStaticLine* m_staticline1; wxStaticText* m_staticTextNetClearance;
wxStaticLine* m_staticline2; wxTextCtrl* m_NetClearanceValueCtrl;
wxStaticLine* m_staticline3; wxStaticText* m_NetClearanceUnits;
wxStaticText* m_MaskClearanceTitle; wxStaticLine* m_staticline1;
wxTextCtrl* m_SolderMaskMarginCtrl; wxStaticLine* m_staticline2;
wxStaticText* m_SolderMaskMarginUnits; wxStaticLine* m_staticline3;
wxStaticText* m_staticTextSolderPaste; wxStaticText* m_MaskClearanceTitle;
wxTextCtrl* m_SolderPasteMarginCtrl; wxTextCtrl* m_SolderMaskMarginCtrl;
wxStaticText* m_SolderPasteMarginUnits; wxStaticText* m_SolderMaskMarginUnits;
wxStaticText* m_staticTextRatio; wxStaticText* m_staticTextSolderPaste;
wxTextCtrl* m_SolderPasteMarginRatioCtrl; wxTextCtrl* m_SolderPasteMarginCtrl;
wxStaticText* m_SolderPasteRatioMarginUnits; wxStaticText* m_SolderPasteMarginUnits;
wxPanel* m_Panel3D; wxStaticText* m_staticTextRatio;
wxStaticText* m_staticText3Dname; wxTextCtrl* m_SolderPasteMarginRatioCtrl;
wxListBox* m_3D_ShapeNameListBox; wxStaticText* m_SolderPasteRatioMarginUnits;
wxButton* m_buttonBrowse; wxPanel* m_Panel3D;
wxButton* m_buttonRemove; wxStaticText* m_staticText3Dname;
wxStdDialogButtonSizer* m_sdbSizerStdButtons; wxListBox* m_3D_ShapeNameListBox;
wxButton* m_sdbSizerStdButtonsOK; wxButton* m_buttonBrowse;
wxButton* m_sdbSizerStdButtonsCancel; wxButton* m_buttonRemove;
wxStdDialogButtonSizer* m_sdbSizerStdButtons;
// Virtual event handlers, overide them in your derived class wxButton* m_sdbSizerStdButtonsOK;
virtual void OnEditReference( wxCommandEvent& event ){ event.Skip(); } wxButton* m_sdbSizerStdButtonsCancel;
virtual void OnEditValue( wxCommandEvent& event ){ event.Skip(); }
virtual void On3DShapeNameSelected( wxCommandEvent& event ){ event.Skip(); } // Virtual event handlers, overide them in your derived class
virtual void BrowseAndAdd3DLib( wxCommandEvent& event ){ event.Skip(); } virtual void OnEditReference( wxCommandEvent& event ){ event.Skip(); }
virtual void Remove3DShape( wxCommandEvent& event ){ event.Skip(); } virtual void OnEditValue( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } virtual void On3DShapeNameSelected( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } virtual void BrowseAndAdd3DLib( wxCommandEvent& event ){ event.Skip(); }
virtual void Remove3DShape( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
public: virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
wxStaticBoxSizer* m_Sizer3DValues;
DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Module properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 541,540 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_MODULE_MODULE_EDITOR_BASE(); public:
wxStaticBoxSizer* m_Sizer3DValues;
}; DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Module properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 541,540 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_MODULE_MODULE_EDITOR_BASE();
#endif //__dialog_edit_module_for_Modedit_base__
};
#endif //__dialog_edit_module_for_Modedit_base__
...@@ -391,9 +391,9 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library( ...@@ -391,9 +391,9 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library(
} }
/* /** function Archive_Modules
* Save library: * Save in the library:
* All new modules (ie modules not already exist (if NewModulesOnly == true) * All new modules (ie modules not found in this lib) (if NewModulesOnly == true)
* all modules (if NewModulesOnly == FALSE) * all modules (if NewModulesOnly == FALSE)
*/ */
void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName, void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName,
...@@ -522,8 +522,8 @@ int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName, ...@@ -522,8 +522,8 @@ int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName,
if( aDisplayDialog ) if( aDisplayDialog )
{ {
Get_Message( _( "Name:" ), _( "Save module" ), Name_Cmp, this ); int cancel = Get_Message( _( "Name:" ), _( "Save module" ), Name_Cmp, this );
if( Name_Cmp.IsEmpty() ) if( Name_Cmp.IsEmpty() || cancel )
return 0; return 0;
Name_Cmp.Trim( true ); Name_Cmp.Trim( true );
Name_Cmp.Trim( FALSE ); Name_Cmp.Trim( FALSE );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment