Commit 974fe74f authored by Miguel Angel Ajo's avatar Miguel Angel Ajo
Browse files

Cleanup toward test-merge

parent 08af5772
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -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;


@@ -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;     
    }
@@ -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() );
    
    
}
+3 −1
Original line number Diff line number Diff line
@@ -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
{
+35 −14
Original line number Diff line number Diff line
@@ -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;

@@ -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();
+5 −4
Original line number Diff line number Diff line
@@ -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:
@@ -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
@@ -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()
						
+5 −2
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ f = open(filename,"rb")
lines = f.readlines()
f.close()

f = open(filename,"wb")

doneOk = False

@@ -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