Commit 2dc53276 authored by Dick Hollenbeck's avatar Dick Hollenbeck

pieces of Amir's 2010-09-28 patch

parent 40b40ea5
......@@ -432,7 +432,7 @@ foreach(LOOP_VAR ${BITMAP_SRCS})
set(CPP_BITMAP "${XPM_CPP_PATH}/${BASENAME}.cpp")
add_custom_command(
OUTPUT ${CPP_BITMAP}
COMMAND "$(CMAKE_COMMAND)" -E copy "${PATH}/${BASENAME}.xpm" "${CPP_BITMAP}"
COMMAND "${CMAKE_COMMAND}" -E copy "${PATH}/${BASENAME}.xpm" "${CPP_BITMAP}"
DEPENDS ${BASENAME}.xpm)
list(APPEND CPP_BITMAPS ${CPP_BITMAP})
set_source_files_properties(${CPP_BITMAP} PROPERTIES COMPILE_FLAGS -DXPMMAIN)
......
......@@ -313,21 +313,10 @@ void WinEDA_BasicFrame::AddHelpVersionInfoMenuEntry( wxMenu* aMenu )
}
void WinEDA_BasicFrame::CopyVersionInfoToClipboard( wxCommandEvent& WXUNUSED( event ) )
{
if( !wxTheClipboard->Open() )
{
wxMessageBox( _( "Could not open clipboard to write version information." ),
_( "Clipboard Error" ), wxOK | wxICON_EXCLAMATION, this );
return;
}
// This is an enhanced version of the compiler build macro provided by wxWidgets
// in <wx/build.h>. Please do not make any of these strings translatable. They
// are used for conveying troubleshooting information to developers.
wxString tmp;
wxPlatformInfo info;
// This is an enhanced version of the compiler build macro provided by wxWidgets
// in <wx/build.h>. Please do not make any of these strings translatable. They
// are used for conveying troubleshooting information to developers.
#if defined(__GXX_ABI_VERSION)
#define __ABI_VERSION ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION)
#else
......@@ -354,24 +343,44 @@ void WinEDA_BasicFrame::CopyVersionInfoToClipboard( wxCommandEvent& WXUNUSED( ev
#endif
#if wxCHECK_VERSION( 2, 9, 0 )
#define KICAD_BUILD_OPTIONS_SIGNATURE \
" (" __WX_BO_UNICODE \
__ABI_VERSION __BO_COMPILER \
__WX_BO_STL \
__WX_BO_WXWIN_COMPAT_2_6 __WX_BO_WXWIN_COMPAT_2_8 \
")"
static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
{
return
" (" __WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL
__WX_BO_WXWIN_COMPAT_2_6 __WX_BO_WXWIN_COMPAT_2_8 ")"
;
}
#else
#define KICAD_BUILD_OPTIONS_SIGNATURE \
" (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
__ABI_VERSION __BO_COMPILER \
__WX_BO_STL \
__WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 \
")"
static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
{
return
" (" __WX_BO_DEBUG ","
__WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL
__WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 ")"
;
}
#endif
void WinEDA_BasicFrame::CopyVersionInfoToClipboard( wxCommandEvent& WXUNUSED( event ) )
{
if( !wxTheClipboard->Open() )
{
wxMessageBox( _( "Could not open clipboard to write version information." ),
_( "Clipboard Error" ), wxOK | wxICON_EXCLAMATION, this );
return;
}
wxString tmp;
wxPlatformInfo info;
tmp = wxT( "Application: " ) + wxGetApp().GetTitle() + wxT( "\n" );
tmp += wxT( "Version: " ) + GetBuildVersion() + wxT( "\n" );
tmp << wxT( "Build: " ) << wxVERSION_STRING
<< wxT( KICAD_BUILD_OPTIONS_SIGNATURE ) << wxT( "\n" )
<< CONV_FROM_UTF8( KICAD_BUILD_OPTIONS_SIGNATURE() ) << wxT( "\n" )
<< wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " )
<< info.GetArchName() << wxT( ", " ) << info.GetEndiannessName() << wxT( ", " )
<< info.GetPortIdName();
......
......@@ -13,7 +13,7 @@ HotkeyGridTable::HotkeyGridTable( struct
for( section = origin; section->m_HK_InfoList; section++ )
{
hotkey_spec spec( *section->m_SectionTag, 0 );
hotkey_spec spec( *section->m_SectionTag, new Ki_HotkeyInfo( NULL, 0, 0 ) );
m_hotkeys.push_back( spec );
Ki_HotkeyInfo** info_ptr;
......
......@@ -80,7 +80,7 @@ void WinEDA_SchematicFrame::LoadLibraries( void )
{
wxString prompt;
prompt.Printf( _( "Component library <%s> failed to load.\n\n\Error: %s" ),
prompt.Printf( _( "Component library <%s> failed to load.\n\nError: %s" ),
GetChars( fn.GetFullPath() ),
GetChars( errMsg ) );
DisplayError( this, prompt );
......
......@@ -729,7 +729,7 @@ void D_PAD::BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue, int aRotat
if( delta.y ) // lower and upper segment is horizontal
{
// Calculate angle of left (or right) segment with vertical axis
angle = atan2( m_DeltaSize.y, m_Size.y );
angle = atan2( double( m_DeltaSize.y ), double( m_Size.y ) );
// left and right sides are moved by aInflateValue.x in their perpendicular direction
// We must calculate the corresponding displacement on the horizontal axis
......@@ -745,7 +745,7 @@ void D_PAD::BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue, int aRotat
else if( delta.x ) // left and right segment is vertical
{
// Calculate angle of lower (or upper) segment with horizontal axis
angle = atan2( m_DeltaSize.x, m_Size.x );
angle = atan2( double( m_DeltaSize.x ), double( m_Size.x ) );
// lower and upper sides are moved by aInflateValue.x in their perpendicular direction
// We must calculate the corresponding displacement on the vertical axis
......
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