Commit df93154d authored by Miguel Angel Ajo's avatar Miguel Angel Ajo

wxT added to the locales fix, message box on python exceptions inside wizard,...

wxT added to the locales fix, message box on python exceptions inside wizard, added some missing copyright notices
parent 1477210b
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 NBEE Embedded Systems SL, Miguel Angel Ajo <miguelangel@ajo.es>
* Copyright (C) 2013 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file class_footprint_wizard.cpp * @file class_footprint_wizard.cpp
* @brief Class FOOTPRINT_WIZARD and FOOTPRINT_WIZARDS * @brief Class FOOTPRINT_WIZARD and FOOTPRINT_WIZARDS
......
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 NBEE Embedded Systems SL, Miguel Angel Ajo <miguelangel@ajo.es>
* Copyright (C) 2013 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file pcbnew_footprint_wizards.h * @file pcbnew_footprint_wizards.h
* @brief Class PCBNEW_FOOTPRINT_WIZARDS * @brief Class PCBNEW_FOOTPRINT_WIZARDS
......
...@@ -185,11 +185,12 @@ void FOOTPRINT_WIZARD_FRAME::ParametersUpdated( wxGridEvent& event ) ...@@ -185,11 +185,12 @@ void FOOTPRINT_WIZARD_FRAME::ParametersUpdated( wxGridEvent& event )
value.Printf( wxT("%lf"), dValue ); value.Printf( wxT("%lf"), dValue );
}
// If our locale is set to use , for decimal point, just change it // If our locale is set to use , for decimal point, just change it
// to be scripting compatible // to be scripting compatible
value.Replace(",",".");
} value.Replace( wxT( "," ), wxT( "." ) );
arr.Add( value ); arr.Add( value );
} }
......
...@@ -458,6 +458,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList() ...@@ -458,6 +458,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList()
} }
value.Printf( wxT( "%lf" ), dValue ); value.Printf( wxT( "%lf" ), dValue );
value.Replace( wxT( "," ), wxT( "." ) );
} }
else if ( ptList[i]==wxT( "UNITS" ) ) // 1,2,3,4,5 ... N else if ( ptList[i]==wxT( "UNITS" ) ) // 1,2,3,4,5 ... N
{ {
......
* think about documentation, how to do it * think about documentation, how to do it
* toolbar button and menu for scripting console
* Action plugins: * Action plugins:
right click hooks, right click hooks,
toolbar hooks, toolbar hooks,
menu hooks, menu hooks,
* IO plugins * IO plugins
* better footprint wizard (preview in footprint wizard list) * better footprint wizard (preview in footprint wizard list)
* fix WX asserts
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 NBEE Embedded Systems SL, Miguel Angel Ajo <miguelangel@ajo.es>
* Copyright (C) 2013 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file pcbnew_footprint_wizards.cpp * @file pcbnew_footprint_wizards.cpp
* @brief Class PCBNEW_PYTHON_FOOTPRINT_WIZARDS * @brief Class PCBNEW_PYTHON_FOOTPRINT_WIZARDS
...@@ -39,14 +63,23 @@ PyObject* PYTHON_FOOTPRINT_WIZARD::CallMethod( const char* aMethod, PyObject* aA ...@@ -39,14 +63,23 @@ PyObject* PYTHON_FOOTPRINT_WIZARD::CallMethod( const char* aMethod, PyObject* aA
if( PyErr_Occurred() ) if( PyErr_Occurred() )
{ {
wxString message;
PyObject* t; PyObject* t;
PyObject* v; PyObject* v;
PyObject* b; PyObject* b;
PyErr_Fetch( &t, &v, &b ); PyErr_Fetch( &t, &v, &b );
printf ( "calling %s()\n", aMethod ); message.Printf ( wxT( "calling %s()\n"
printf ( "Exception: %s\n", PyString_AsString( PyObject_Str( v ) ) ); "Exception: %s\n"
printf ( " : %s\n", PyString_AsString( PyObject_Str( b ) ) ); " : %s\n"),
aMethod,
PyString_AsString( PyObject_Str( v ) ),
PyString_AsString( PyObject_Str( b ) )
);
wxMessageBox( message,
wxT( "Exception on python footprint wizard code" ),
wxICON_ERROR|wxOK);
} }
if( result ) if( result )
......
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 NBEE Embedded Systems SL, Miguel Angel Ajo <miguelangel@ajo.es>
* Copyright (C) 2013 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file pcbnew_footprint_wizards.h * @file pcbnew_footprint_wizards.h
* @brief Class PCBNEW_FOOTPRINT_WIZARDS * @brief Class PCBNEW_FOOTPRINT_WIZARDS
......
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 NBEE Embedded Systems SL, Miguel Angel Ajo <miguelangel@ajo.es>
* Copyright (C) 2013 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __PCBNEW_SCRIPTING_HELPERS_H #ifndef __PCBNEW_SCRIPTING_HELPERS_H
#define __PCBNEW_SCRIPTING_HELPERS_H #define __PCBNEW_SCRIPTING_HELPERS_H
......
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 NBEE Embedded Systems SL, Miguel Angel Ajo <miguelangel@ajo.es>
* Copyright (C) 2013 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
%{ %{
#include <scripting/pcbnew_footprint_wizards.h> #include <scripting/pcbnew_footprint_wizards.h>
......
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