Loading pcbnew/class_footprint_wizard.cpp +12 −7 Original line number Diff line number Diff line Loading @@ -11,6 +11,9 @@ void FOOTPRINT_WIZARD::register_wizard() FOOTPRINT_WIZARDS::register_wizard( this ); } /** * FOOTPRINT_WIZARD system wide static list */ std::vector<FOOTPRINT_WIZARD*> FOOTPRINT_WIZARDS::m_FootprintWizards; Loading @@ -26,7 +29,9 @@ FOOTPRINT_WIZARD* FOOTPRINT_WIZARDS::GetWizard(wxString aName) for( int i=0; i<max;i++ ) { FOOTPRINT_WIZARD *wizard = GetWizard( i ); wxString name = wizard->GetName(); if ( name.Cmp(aName) ) return wizard; } Loading @@ -45,7 +50,7 @@ void FOOTPRINT_WIZARDS::register_wizard(FOOTPRINT_WIZARD *aWizard) wxString name = aWizard->GetName(); m_FootprintWizards.push_back(aWizard); printf("Registered footprint wizard '%s'\n",(const char*)name.mb_str() ); //printf("Registered footprint wizard '%s'\n",(const char*)name.mb_str() ); } Loading pcbnew/class_footprint_wizard.h +3 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,9 @@ #include <vector> #include <wxPcbStruct.h> /* This is the parent class from where any footprint wiizard class must /** * Class FOOTPRINT_WIZARD * This is the parent class from where any footprint wizard class must * derive */ class FOOTPRINT_WIZARD { Loading pcbnew/footprint_wizard_frame.h +35 −14 Original line number Diff line number Diff line Loading @@ -46,19 +46,19 @@ class wxGridEvent; class FOOTPRINT_WIZARD_FRAME : public PCB_BASE_FRAME { private: // List of libraries (for selection ) wxSashLayoutWindow* m_PageListWindow; wxListBox* m_PageList; // The list of pages wxSize m_PageListSize; // size of the window // List of components in the selected library wxSashLayoutWindow* m_ParameterGridWindow; wxGrid* m_ParameterGrid; // The list of parameters wxSize m_ParameterGridSize; // size of the window wxSashLayoutWindow* m_PageListWindow; //< List of libraries (for selection ) wxListBox* m_PageList; //< The list of pages wxSize m_PageListSize; //< size of the window wxSashLayoutWindow* m_ParameterGridWindow; //< List of components in the selected library wxGrid* m_ParameterGrid; //< The list of parameters wxSize m_ParameterGridSize; //< size of the window // Flags wxSemaphore* m_Semaphore; // != NULL if the frame must emulate a modal dialog wxString m_configPath; // subpath for configuration wxSemaphore* m_Semaphore; //< != NULL if the frame must emulate a modal dialog wxString m_configPath; //< subpath for configuration FOOTPRINT_WIZARD* m_FootprintWizard; Loading Loading @@ -86,19 +86,40 @@ private: void OnSashDrag( wxSashEvent& event ); /** * Function ReCreateLibraryList * * Creates or recreates the list of current loaded libraries. * This list is sorted, with the library cache always at end of the list * Function ReCreatePageList * Creates or recreates the list of parameter pages for the current wizard. * This list is sorted */ void ReCreatePageList(); /** * Function ReCreateParameterList * Creates the list of parameters for the current page */ void ReCreateParameterList(); /** * Function SelectFootprintWizard * Shows the list of footprint wizards available into the system */ void SelectFootprintWizard(); /** * Function ReloadFootprint * Reloads the current footprint */ void ReloadFootprint(); void Process_Special_Functions( wxCommandEvent& event ); /** * Function DisplayWizardInfos * Shows all the details about the current wizard */ void DisplayWizardInfos(); void RedrawActiveWindow( wxDC* DC, bool EraseBg ); void OnCloseWindow( wxCloseEvent& Event ); void ReCreateHToolbar(); Loading scripting/dlist.i +5 −4 Original line number Diff line number Diff line Loading @@ -6,9 +6,9 @@ { class DLISTIter: def __init__(self,aList): self.last = aList self.last = aList # last item is the start of list def next(self): def next(self): # get the next item item = self.last try: Loading @@ -16,7 +16,7 @@ except: pass if item is None: if item is None: # if the item is None, then finish the iteration raise StopIteration else: ret = None Loading @@ -25,11 +25,12 @@ try: ret = self.last.Get() except: ret = self.last #next items just not.. ret = self.last # next items do not.. self.last = self.last.Next() # when the iterated object can be casted down in inheritance, just do it.. if 'Cast' in dir(ret): ret = ret.Cast() Loading scripting/fixswigimports.py +5 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ f = open(filename,"rb") lines = f.readlines() f.close() f = open(filename,"wb") doneOk = False Loading @@ -35,14 +34,18 @@ if (len(lines)<4000): print "still building" exit(0) txt = "" for l in lines: if l.startswith("if version_info >= (2,6,0):"): l = l.replace("version_info >= (2,6,0)","False") doneOk = True elif l.startswith("if False:"): # it was already patched? doneOk = True f.write(l) txt = txt + l f = open(filename,"wb") f.write(txt) f.close() if doneOk: Loading Loading
pcbnew/class_footprint_wizard.cpp +12 −7 Original line number Diff line number Diff line Loading @@ -11,6 +11,9 @@ void FOOTPRINT_WIZARD::register_wizard() FOOTPRINT_WIZARDS::register_wizard( this ); } /** * FOOTPRINT_WIZARD system wide static list */ std::vector<FOOTPRINT_WIZARD*> FOOTPRINT_WIZARDS::m_FootprintWizards; Loading @@ -26,7 +29,9 @@ FOOTPRINT_WIZARD* FOOTPRINT_WIZARDS::GetWizard(wxString aName) for( int i=0; i<max;i++ ) { FOOTPRINT_WIZARD *wizard = GetWizard( i ); wxString name = wizard->GetName(); if ( name.Cmp(aName) ) return wizard; } Loading @@ -45,7 +50,7 @@ void FOOTPRINT_WIZARDS::register_wizard(FOOTPRINT_WIZARD *aWizard) wxString name = aWizard->GetName(); m_FootprintWizards.push_back(aWizard); printf("Registered footprint wizard '%s'\n",(const char*)name.mb_str() ); //printf("Registered footprint wizard '%s'\n",(const char*)name.mb_str() ); } Loading
pcbnew/class_footprint_wizard.h +3 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,9 @@ #include <vector> #include <wxPcbStruct.h> /* This is the parent class from where any footprint wiizard class must /** * Class FOOTPRINT_WIZARD * This is the parent class from where any footprint wizard class must * derive */ class FOOTPRINT_WIZARD { Loading
pcbnew/footprint_wizard_frame.h +35 −14 Original line number Diff line number Diff line Loading @@ -46,19 +46,19 @@ class wxGridEvent; class FOOTPRINT_WIZARD_FRAME : public PCB_BASE_FRAME { private: // List of libraries (for selection ) wxSashLayoutWindow* m_PageListWindow; wxListBox* m_PageList; // The list of pages wxSize m_PageListSize; // size of the window // List of components in the selected library wxSashLayoutWindow* m_ParameterGridWindow; wxGrid* m_ParameterGrid; // The list of parameters wxSize m_ParameterGridSize; // size of the window wxSashLayoutWindow* m_PageListWindow; //< List of libraries (for selection ) wxListBox* m_PageList; //< The list of pages wxSize m_PageListSize; //< size of the window wxSashLayoutWindow* m_ParameterGridWindow; //< List of components in the selected library wxGrid* m_ParameterGrid; //< The list of parameters wxSize m_ParameterGridSize; //< size of the window // Flags wxSemaphore* m_Semaphore; // != NULL if the frame must emulate a modal dialog wxString m_configPath; // subpath for configuration wxSemaphore* m_Semaphore; //< != NULL if the frame must emulate a modal dialog wxString m_configPath; //< subpath for configuration FOOTPRINT_WIZARD* m_FootprintWizard; Loading Loading @@ -86,19 +86,40 @@ private: void OnSashDrag( wxSashEvent& event ); /** * Function ReCreateLibraryList * * Creates or recreates the list of current loaded libraries. * This list is sorted, with the library cache always at end of the list * Function ReCreatePageList * Creates or recreates the list of parameter pages for the current wizard. * This list is sorted */ void ReCreatePageList(); /** * Function ReCreateParameterList * Creates the list of parameters for the current page */ void ReCreateParameterList(); /** * Function SelectFootprintWizard * Shows the list of footprint wizards available into the system */ void SelectFootprintWizard(); /** * Function ReloadFootprint * Reloads the current footprint */ void ReloadFootprint(); void Process_Special_Functions( wxCommandEvent& event ); /** * Function DisplayWizardInfos * Shows all the details about the current wizard */ void DisplayWizardInfos(); void RedrawActiveWindow( wxDC* DC, bool EraseBg ); void OnCloseWindow( wxCloseEvent& Event ); void ReCreateHToolbar(); Loading
scripting/dlist.i +5 −4 Original line number Diff line number Diff line Loading @@ -6,9 +6,9 @@ { class DLISTIter: def __init__(self,aList): self.last = aList self.last = aList # last item is the start of list def next(self): def next(self): # get the next item item = self.last try: Loading @@ -16,7 +16,7 @@ except: pass if item is None: if item is None: # if the item is None, then finish the iteration raise StopIteration else: ret = None Loading @@ -25,11 +25,12 @@ try: ret = self.last.Get() except: ret = self.last #next items just not.. ret = self.last # next items do not.. self.last = self.last.Next() # when the iterated object can be casted down in inheritance, just do it.. if 'Cast' in dir(ret): ret = ret.Cast() Loading
scripting/fixswigimports.py +5 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ f = open(filename,"rb") lines = f.readlines() f.close() f = open(filename,"wb") doneOk = False Loading @@ -35,14 +34,18 @@ if (len(lines)<4000): print "still building" exit(0) txt = "" for l in lines: if l.startswith("if version_info >= (2,6,0):"): l = l.replace("version_info >= (2,6,0)","False") doneOk = True elif l.startswith("if False:"): # it was already patched? doneOk = True f.write(l) txt = txt + l f = open(filename,"wb") f.write(txt) f.close() if doneOk: Loading