Commit 474128a4 authored by Miguel Angel Ajo's avatar Miguel Angel Ajo
Browse files

pcbnew scripting: fixed for coding style policy

parent f96d557e
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -50,9 +50,6 @@ 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() );
    
    
}


+22 −21
Original line number Diff line number Diff line
@@ -451,7 +451,6 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList()
        }

        m_ParameterGrid->SetCellValue( i, 1 , value );        

        m_ParameterGrid->SetCellValue( i, 2 , units );
        m_ParameterGrid->SetReadOnly( i, 2 );
    }
@@ -734,6 +733,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar()
                                    _( "Insert footprint in board" ) );
        }
#endif

        // after adding the buttons to the toolbar, must call Realize() to
        // reflect the changes
        m_mainToolBar->Realize();
@@ -745,4 +745,5 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar()

void FOOTPRINT_WIZARD_FRAME::ReCreateVToolbar()
{

}
+101 −104
Original line number Diff line number Diff line
@@ -51,7 +51,8 @@ PyObject* PYTHON_FOOTPRINT_WIZARD::CallMethod(const char* aMethod, PyObject *aAr
        printf( "method not found, or not callable: %s\n", aMethod );
    }
    
    if (pFunc) Py_XDECREF(pFunc);
    if ( pFunc ) 
        Py_XDECREF( pFunc );
    
    return NULL;
}
@@ -134,7 +135,8 @@ int PYTHON_FOOTPRINT_WIZARD::GetNumParameterPages()
   
    if (result)
    {
         if (!PyInt_Check(result)) return -1;
         if ( !PyInt_Check( result ) ) 
            return -1;
         ret = PyInt_AsLong( result ); 
         Py_DECREF( result );    
    }
@@ -260,8 +262,6 @@ wxString PYTHON_FOOTPRINT_WIZARD::SetParameterValues(int aPage,wxArrayString& aV
    wxString res = CallRetStrMethod( "SetParameterValues", arglist );
    Py_DECREF( arglist );
    
    
    
    return res;
}

@@ -272,10 +272,12 @@ MODULE *PYTHON_FOOTPRINT_WIZARD::GetModule()
{
    PyObject *result, *obj;
    result = CallMethod( "GetModule", NULL );
    if (!result) return NULL;

    if (!result) 
        return NULL;
       
    obj = PyObject_GetAttrString( result, "this" );
    
    if (PyErr_Occurred())
    {
        /*
@@ -288,7 +290,6 @@ MODULE *PYTHON_FOOTPRINT_WIZARD::GetModule()
        PyErr_Print();
    }
         
    
    return PyModule_to_MODULE(obj);
}

@@ -308,7 +309,6 @@ void PYTHON_FOOTPRINT_WIZARDS::register_wizard(PyObject* aPyWizard)
    
    fw->register_wizard(); 
                           

#if 0 
    /* just to test if it works correctly */
    int pages = fw->GetNumParameterPages();
@@ -321,9 +321,6 @@ void PYTHON_FOOTPRINT_WIZARDS::register_wizard(PyObject* aPyWizard)
    }
#endif    
    
    
}


+13 −12
Original line number Diff line number Diff line
@@ -43,7 +43,8 @@ static PCB_EDIT_FRAME *PcbEditFrame=NULL;

BOARD *GetBoard()
{
	if (PcbEditFrame) return PcbEditFrame->GetBoard();
	if (PcbEditFrame) 
        return PcbEditFrame->GetBoard();
	else return NULL;
}

@@ -57,6 +58,7 @@ BOARD* LoadBoard(wxString& aFileName)

    if ( aFileName.EndsWith( wxT( ".kicad_brd" ) ) ) 
        return LoadBoard(aFileName,IO_MGR::KICAD);

    else if (aFileName.EndsWith(wxT(".brd")))  
        return LoadBoard(aFileName,IO_MGR::LEGACY);
	
@@ -68,7 +70,6 @@ BOARD* LoadBoard(wxString& aFileName)
BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat )
{
	return IO_MGR::Load( aFormat, aFileName );
	
}

bool SaveBoard( wxString& aFilename, BOARD* aBoard )
+7 −6
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ BOARD *GetBoard();

BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat );
BOARD* LoadBoard( wxString& aFileName );

bool  SaveBoard( wxString& aFileName, BOARD* aBoard, IO_MGR::PCB_FILE_T aFormat );
bool  SaveBoard( wxString& aFileName, BOARD* aBoard );

+12 −12

File changed.

Contains only whitespace changes.

+17 −17

File changed.

Contains only whitespace changes.

Loading