Commit 85365b0d authored by Maciej Suminski's avatar Maciej Suminski

Upstream merge.

parents 82661dc3 94bc4355
......@@ -101,6 +101,16 @@ else()
endif()
find_program(patch_bin NAMES patch patch.exe)
if( "${patch_bin}" STREQUAL "patch_bin-NOTFOUND" )
set( PATCH_STR_CMD ${PATCH_STR_CMD} )
else()
set( PATCH_STR_CMD ${patch_bin} -p0 -i )
endif()
if( MINGW AND NOT CMAKE_HOST_UNIX ) # building for MINGW on windows not UNIX
if( MSYS )
# The Boost system does not build properly on MSYS using bootstrap.sh. Running
......@@ -197,25 +207,25 @@ ExternalProject_Add( boost
# bzr revert is insufficient to remove "added" files:
COMMAND bzr clean-tree -q --force
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch"
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch"
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch"
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch"
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86.patch" #https://svn.boost.org/trac/boost/ticket/8266
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86.patch" #https://svn.boost.org/trac/boost/ticket/8266
# tell bzr about "added" files by last patch:
COMMAND bzr add libs/context/src/asm/jump_i386_x86_64_sysv_macho_gas.S
COMMAND bzr add libs/context/src/asm/make_i386_x86_64_sysv_macho_gas.S
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86_build.patch" #https://svn.boost.org/trac/boost/ticket/8266
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_older_openssl.patch" #https://svn.boost.org/trac/boost/ticket/9273
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86_build.patch" #https://svn.boost.org/trac/boost/ticket/8266
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_older_openssl.patch" #https://svn.boost.org/trac/boost/ticket/9273
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_mingw.patch" #https://svn.boost.org/trac/boost/ticket/7262
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_mingw.patch" #https://svn.boost.org/trac/boost/ticket/7262
# tell bzr about "added" files by last patch:
COMMAND bzr add libs/context/src/asm/make_i386_ms_pe_gas.S
COMMAND bzr add libs/context/src/asm/jump_i386_ms_pe_gas.S
COMMAND bzr add libs/context/src/asm/make_x86_64_ms_pe_gas.S
COMMAND bzr add libs/context/src/asm/jump_x86_64_ms_pe_gas.S
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/patch_macosx_context_ppc_v2.patch" #https://svn.boost.org/trac/boost/ticket/8266
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/patch_macosx_context_ppc_v2.patch" #https://svn.boost.org/trac/boost/ticket/8266
COMMAND bzr add libs/context/build/Jamfile.v2
COMMAND bzr add libs/context/build/architecture.jam
COMMAND bzr add libs/context/src/asm/jump_combined_sysv_macho_gas.S
......
......@@ -42,6 +42,14 @@ if( CMAKE_TOOLCHAIN_FILE )
set( TOOLCHAIN "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" )
endif()
FIND_PROGRAM (patch_bin NAMES patch.exe patch)
if( "${patch_bin}" STREQUAL "patch_bin-NOTFOUND" )
set( PATCH_STR_CMD bzr patch -p0 )
else()
set( PATCH_STR_CMD ${patch_bin} -p0 -i )
endif()
ExternalProject_Add(
openssl
DOWNLOAD_DIR ${DOWNLOAD_DIR}
......@@ -64,7 +72,7 @@ ExternalProject_Add(
# to ignore previously applied patches
PATCH_COMMAND bzr revert
# PATCH_COMMAND continuation (any *_COMMAND here can be continued with COMMAND):
COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch
COMMAND ${PATCH_STR_CMD} ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch
CONFIGURE_COMMAND
${CMAKE_COMMAND}
......
......@@ -176,6 +176,7 @@ set( BMAPS_MID
copyblock
copycomponent
copy_button
copy_library
copper_layers_setup
cursor_shape
cursor
......
This diff is collapsed.
This diff is collapsed.
......@@ -175,7 +175,7 @@ void HOTKEYS_EDITOR_DIALOG::OnClickOnCell( wxGridEvent& event )
/** OnRightClickOnCell
* If a cell is selected, display a list of keys for selection
* The list is restricted to keys that cannot be entered:
* tab, home ... because these keys have special functions in dialogs
* tab, home, return ... because these keys have special functions in dialogs
*/
void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event )
{
......@@ -186,8 +186,8 @@ void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event )
return;
// Do not translate these key names. They are internally used.
//ee hotkeys_basic.cpp
#define C_COUNT 8
// See hotkeys_basic.cpp
#define C_COUNT 9
wxString choices[C_COUNT] =
{
wxT("End")
......@@ -198,6 +198,7 @@ void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event )
wxT("Space"),
wxT("Ctrl+Space"),
wxT("Alt+Space"),
wxT("Return")
};
wxString keyname = wxGetSingleChoice( _( "Special keys only. For others keys, use keyboard" ),
......
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.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 <hotkey_grid_table.h>
/*
......
......@@ -133,6 +133,8 @@ static struct hotkey_name_descr s_Hotkey_Name_List[] =
{ wxT( "Left" ), WXK_LEFT },
{ wxT( "Right" ), WXK_RIGHT },
{ wxT( "Return" ), WXK_RETURN },
{ wxT( "Space" ), WXK_SPACE },
// Do not change this line: end of list
......
......@@ -164,7 +164,7 @@ static const wxString dso_full_path( const wxString& aAbsoluteArgv0 )
// in them. They are basically spin-offs from what was once a top process module.
// That may not make linux package maintainers happy, but that is not my job.
// Get over it. KiCad is not a trivial suite, and multiple platforms come
// into play, not merely linux. For starters they will use extension ".kicad",
// into play, not merely linux. For starters they will use extension ".kiface",
// but later in time morph to ".so". They are not purely libraries, else they
// would begin with "lib" in basename. Like I said, get over it, we're serving
// too many masters here: python, windows, linux, OSX, multiple versions of wx...
......@@ -338,7 +338,8 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp )
// KIFACE::CreateWindow() is a virtual so we don't need to link to it.
// Remember its in the *.kiface DSO.
#if 0
// this pulls in EDA_DRAW_FRAME type info, which we don't want in single_top
// this pulls in EDA_DRAW_FRAME type info, which we don't want in
// the single_top link image.
KIWAY_PLAYER* frame = dynamic_cast<KIWAY_PLAYER*>( kiface->CreateWindow(
NULL, TOP_FRAME, &kiway, KFCTL_STANDALONE ) );
#else
......@@ -375,9 +376,9 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp )
if( argc == 2 )
{
#if defined(PGM_DATA_FILE_EXT)
// PGM_DATA_FILE_EXT is different for each compile, it may come
// from CMake on the compiler command line, often does not.
// This facillity is mostly useful only for those program modules
// PGM_DATA_FILE_EXT, if present, may be different for each compile,
// it may come from CMake on the compiler command line, but often does not.
// This facillity is mostly useful for those program modules
// supporting a single argv[1].
if( !argv1.GetExt() )
argv1.SetExt( wxT( PGM_DATA_FILE_EXT ) );
......@@ -413,11 +414,13 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp )
}
else
{
/* The lean single_top program launcher has no access program settings,
else it would not be lean. That kind of functionality is in the
KIFACE now, but it cannot assume that it is the only KIFACE in memory.
So this looks like a dead concept here, or an expensive one in terms
of code size.
/*
The lean single_top program launcher has no access to program
settings, for if it did, it would not be lean. That kind of
functionality is in the KIFACE now, but it cannot assume that it is
the only KIFACE in memory. So this looks like a dead concept here,
or an expensive one in terms of code size.
wxString dir;
......@@ -455,8 +458,8 @@ void PGM_SINGLE_TOP::MacOpenFile( const wxString& aFileName )
if( filename.FileExists() )
{
#if 0
// this pulls in EDA_DRAW_FRAME type info, which we don't want in single_top
// link image.
// this pulls in EDA_DRAW_FRAME type info, which we don't want in
// the single_top link image.
KIWAY_PLAYER* frame = dynamic_cast<KIWAY_PLAYER*>( App().GetTopWindow() );
#else
KIWAY_PLAYER* frame = (KIWAY_PLAYER*) App().GetTopWindow();
......
set( MAKE_LINK_MAPS true )
# the map generation creates on Windows/gcc a lot of useless warnings
# so disable it on windows
if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
set( MAKE_LINK_MAPS false )
else()
set( MAKE_LINK_MAPS true )
endif()
add_definitions( -DCVPCB )
......
set( MAKE_LINK_MAPS true )
# the map generation creates on Windows/gcc a lot of useless warnings
# so disable it on windows
if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
set( MAKE_LINK_MAPS false )
else()
set( MAKE_LINK_MAPS true )
endif()
add_definitions( -DEESCHEMA )
......
......@@ -248,7 +248,6 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
SCH_SCREEN* screen;
wxString fullFileName( aFileSet[0] );
wxString msg;
bool libCacheExist = false;
SCH_SCREENS screenList;
for( screen = screenList.GetFirst(); screen != NULL; screen = screenList.GetNext() )
......@@ -384,9 +383,12 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
}
// load the project.
libCacheExist = LoadCacheLibrary( g_RootSheet->GetScreen()->GetFileName() );
bool libCacheExist = LoadCacheLibrary( g_RootSheet->GetScreen()->GetFileName() );
g_RootSheet->SetScreen( NULL );
bool diag = g_RootSheet->Load( this );
SetScreen( m_CurrentSheet->LastScreen() );
UpdateFileHistory( g_RootSheet->GetScreen()->GetFileName() );
......@@ -397,6 +399,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
SetSheetNumberAndCount();
m_canvas->Refresh( true );
(void) libCacheExist;
(void) diag;
// return diag;
return true; // do not close Eeschema if the file if not found:
// we may have to create a new schematic file.
......
......@@ -128,6 +128,10 @@ static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL + 'Z'
(int) wxID_REDO );
#endif
// mouse click command:
static EDA_HOTKEY HkMouseLeftClick( wxT( "Mouse Left Click" ), HK_LEFT_CLICK, WXK_RETURN, 0 );
static EDA_HOTKEY HkMouseLeftDClick( wxT( "Mouse Left DClick" ), HK_LEFT_DCLICK, WXK_END, 0 );
// Schematic editor
static EDA_HOTKEY HkBeginWire( wxT( "Begin Wire" ), HK_BEGIN_WIRE, 'W', ID_WIRE_BUTT );
static EDA_HOTKEY HkBeginBus( wxT( "Begin Bus" ), HK_BEGIN_BUS, 'B', ID_BUS_BUTT );
......@@ -191,6 +195,8 @@ static EDA_HOTKEY HkDelete( wxT( "Delete Item" ), HK_DELETE, WXK_DELETE );
static EDA_HOTKEY HkFindItem( wxT( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL, ID_FIND_ITEMS );
static EDA_HOTKEY HkFindNextItem( wxT( "Find Next Item" ), HK_FIND_NEXT_ITEM, WXK_F5,
wxEVT_COMMAND_FIND );
static EDA_HOTKEY HkFindReplace( wxT( "Find and Replace" ), HK_FIND_REPLACE,
'F' + GR_KB_CTRL + GR_KB_ALT, wxID_REPLACE );
static EDA_HOTKEY HkFindNextDrcMarker( wxT( "Find Next DRC Marker" ), HK_FIND_NEXT_DRC_MARKER,
WXK_F5 + GR_KB_SHIFT, EVT_COMMAND_FIND_DRC_MARKER );
......@@ -220,6 +226,8 @@ EDA_HOTKEY* s_Common_Hotkey_List[] =
&HkDrag,
&HkUndo,
&HkRedo,
&HkMouseLeftClick,
&HkMouseLeftDClick,
NULL
};
......@@ -231,6 +239,7 @@ EDA_HOTKEY* s_Schematic_Hotkey_List[] =
&HkFindItem,
&HkFindNextItem,
&HkFindNextDrcMarker,
&HkFindReplace,
&HkInsert,
&HkMove2Drag,
&HkSaveBlock,
......@@ -361,6 +370,15 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
GetScreen()->m_O_Curseur = GetCrossHairPosition();
break;
case HK_LEFT_CLICK:
OnLeftClick( aDC, aPosition );
break;
case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events
OnLeftClick( aDC, aPosition );
OnLeftDClick( aDC, aPosition );
break;
case HK_ZOOM_IN:
case HK_ZOOM_OUT:
case HK_ZOOM_REDRAW:
......@@ -395,6 +413,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
case HK_UNDO:
case HK_REDO:
case HK_FIND_ITEM:
case HK_FIND_REPLACE:
if( notBusy )
{
cmd.SetId( hotKey->m_IdMenuEvent );
......@@ -558,6 +577,15 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
GetScreen()->m_O_Curseur = GetCrossHairPosition();
break;
case HK_LEFT_CLICK:
OnLeftClick( aDC, aPosition );
break;
case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events
OnLeftClick( aDC, aPosition );
OnLeftDClick( aDC, aPosition );
break;
case HK_ZOOM_IN:
case HK_ZOOM_OUT:
case HK_ZOOM_REDRAW:
......
......@@ -13,6 +13,7 @@ enum hotkey_id_commnand {
HK_FIND_NEXT_ITEM = HK_COMMON_END,
HK_FIND_NEXT_DRC_MARKER,
HK_FIND_ITEM,
HK_FIND_REPLACE,
HK_DELETE,
HK_REPEAT_LAST,
HK_LIBEDIT_MOVE_GRAPHIC_ITEM,
......@@ -48,7 +49,9 @@ enum hotkey_id_commnand {
HK_ADD_NOCONN_FLAG,
HK_SAVE_LIB,
HK_SAVE_SCH,
HK_LOAD_SCH
HK_LOAD_SCH,
HK_LEFT_CLICK,
HK_LEFT_DCLICK
};
// List of hotkey descriptors for Eeschema
......
......@@ -213,7 +213,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
AddMenuItem( editMenu, ID_FIND_ITEMS, text, HELP_FIND, KiBitmap( find_xpm ) );
// Find/Replace
AddMenuItem( editMenu, wxID_REPLACE, _( "Find and Re&place\tCtrl+Shift+F" ), HELP_REPLACE,
text = AddHotkeyName( _( "Find and Re&place" ), s_Schematic_Hokeys_Descr,
HK_FIND_REPLACE );
AddMenuItem( editMenu, wxID_REPLACE, text, HELP_REPLACE,
KiBitmap( find_replace_xpm ) );
// Import footprint association from the CvPcb cmp file:
......
set( MAKE_LINK_MAPS true )
# the map generation creates on Windows/gcc a lot of useless warnings
# so disable it on windows
if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
set( MAKE_LINK_MAPS false )
else()
set( MAKE_LINK_MAPS true )
endif()
add_definitions(-DGERBVIEW)
......
......@@ -103,6 +103,7 @@ EXTERN_BITMAP( copper_layers_setup_xpm )
EXTERN_BITMAP( copyblock_xpm )
EXTERN_BITMAP( copycomponent_xpm )
EXTERN_BITMAP( copy_button_xpm )
EXTERN_BITMAP( copy_library_xpm )
EXTERN_BITMAP( create_cmp_file_xpm )
EXTERN_BITMAP( cursor_shape_xpm )
EXTERN_BITMAP( cursor_xpm )
......
set( MAKE_LINK_MAPS true )
# the map generation creates on Windows/gcc a lot of useless warnings
# so disable it on windows
if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
set( MAKE_LINK_MAPS false )
else()
set( MAKE_LINK_MAPS true )
endif()
add_definitions(-DPL_EDITOR)
......
......@@ -55,8 +55,12 @@
* and see this list for some ascii keys (space ...)
*/
/* local variables */
/* Hotkey list: */
// Hotkey list:
// mouse click command:
static EDA_HOTKEY HkMouseLeftClick( wxT( "Mouse Left Click" ), HK_LEFT_CLICK, WXK_RETURN, 0 );
static EDA_HOTKEY HkMouseLeftDClick( wxT( "Mouse Left DClick" ), HK_LEFT_DCLICK, WXK_END, 0 );
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
HK_RESET_LOCAL_COORD, ' ' );
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE );
......@@ -67,6 +71,7 @@ static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN );
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
static EDA_HOTKEY HkMoveItem( wxT( "Move Item" ), HK_MOVE_ITEM, 'M', ID_POPUP_ITEM_MOVE );
static EDA_HOTKEY HkPlaceItem( wxT( "Place Item" ), HK_PLACE_ITEM, 'P', ID_POPUP_ITEM_PLACE );
static EDA_HOTKEY HkMoveStartPoint( wxT( "Move Start Point" ), HK_MOVE_START_POINT, 'S',
ID_POPUP_ITEM_MOVE_START_POINT );
static EDA_HOTKEY HkMoveEndPoint( wxT( "Move End Point" ), HK_MOVE_END_POINT, 'E',
......@@ -85,13 +90,17 @@ EDA_HOTKEY* s_Common_Hotkey_List[] =
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
&HkZoomAuto, &HkResetLocalCoord,
&HkUndo, &HkRedo,
&HkMouseLeftClick,
&HkMouseLeftDClick,
NULL
};
EDA_HOTKEY* s_PlEditor_Hotkey_List[] =
{
&HkMoveItem, &HkMoveStartPoint,
&HkMoveEndPoint, &HkDeleteItem,
&HkMoveEndPoint,
&HkPlaceItem,
&HkDeleteItem,
NULL
};
......@@ -142,6 +151,15 @@ void PL_EDITOR_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode,
case HK_NOT_FOUND:
return;
case HK_LEFT_CLICK:
OnLeftClick( aDC, aPosition );
break;
case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events
OnLeftClick( aDC, aPosition );
OnLeftDClick( aDC, aPosition );
break;
case HK_HELP: // Display Current hotkey list
DisplayHotkeyList( this, s_PlEditor_Hokeys_Descr );
break;
......@@ -208,6 +226,14 @@ void PL_EDITOR_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode,
GetEventHandler()->ProcessEvent( cmd );
break;
case HK_PLACE_ITEM:
if( busy )
{
cmd.SetId( HK_Descr->m_IdMenuEvent );
GetEventHandler()->ProcessEvent( cmd );
}
break;
default:
wxMessageBox( wxT("Unknown hotkey") );
return;
......
......@@ -39,7 +39,10 @@ enum hotkey_id_commnand {
HK_MOVE_ITEM,
HK_MOVE_START_POINT,
HK_MOVE_END_POINT,
HK_DELETE_ITEM
HK_PLACE_ITEM,
HK_DELETE_ITEM,
HK_LEFT_CLICK,
HK_LEFT_DCLICK
};
// List of hotkey descriptors for PlEditor.
......
......@@ -108,7 +108,9 @@ bool PL_EDITOR_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* aPopMenu )
}
else // An item is currently in edit
{
AddMenuItem( aPopMenu, ID_POPUP_ITEM_PLACE, _( "Place" ),
msg = AddHotkeyName( _( "Place Item" ), s_PlEditor_Hokeys_Descr,
HK_PLACE_ITEM );
AddMenuItem( aPopMenu, ID_POPUP_ITEM_PLACE, msg,
KiBitmap( move_xpm ) );
AddMenuItem( aPopMenu, ID_POPUP_ITEM_PLACE_CANCEL, _( "Cancel" ),
KiBitmap( cancel_xpm ) );
......
set( MAKE_LINK_MAPS true )
# the map generation creates on Windows/gcc a lot of useless warnings
# so disable it on windows
if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
set( MAKE_LINK_MAPS false )
else()
set( MAKE_LINK_MAPS true )
endif()
add_definitions( -DPCBNEW )
add_subdirectory(router)
......@@ -535,6 +541,7 @@ if( USE_KIWAY_DLLS )
${PCBNEW_SCRIPTING_SRCS}
# ${PCBNEW_RESOURCES}
)
set_target_properties( pcbnew_kiface PROPERTIES
# Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
# _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface
......@@ -547,6 +554,7 @@ if( USE_KIWAY_DLLS )
COMPILE_FLAGS ${OpenMP_CXX_FLAGS}
)
endif()
target_link_libraries( pcbnew_kiface
3d-viewer
pcbcommon
......
......@@ -109,9 +109,7 @@ int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const
}
else
{
#ifdef DEBUG
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetClearance():NULL netclass,type %d"), Type() );
#endif
DBG(printf( "%s: NULL netclass,type %d", __func__, Type() );)
}
return 0;
......@@ -129,9 +127,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const
if( board == NULL ) // Should not occur
{
#ifdef DEBUG
wxLogWarning( wxT("BOARD_CONNECTED_ITEM::GetNetClass():NULL board,type %d"), Type() );
#endif
DBG(printf( "%s: NULL board,type %d", __func__, Type() );)
return NULL;
}
......@@ -142,12 +138,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const
{
netclass = net->GetNetClass();
#ifdef DEBUG
if( netclass == NULL )
{
wxLogWarning( wxT("BOARD_CONNECTED_ITEM::GetNetClass():NULL netclass,type %d"), Type() );
}
#endif
//DBG( if(!netclass) printf( "%s: NULL netclass,type %d", __func__, Type() );)
}
if( netclass )
......
......@@ -29,8 +29,14 @@
* and see this list for some ascii keys (space ...)
*/
/* local variables */
/* Hotkey list: */
// Hotkey list:
// mouse click command:
static EDA_HOTKEY HkMouseLeftClick( wxT( "Mouse Left Click" ),
HK_LEFT_CLICK, WXK_RETURN, 0 );
static EDA_HOTKEY HkMouseLeftDClick( wxT( "Mouse Left DClick" ),
HK_LEFT_DCLICK, WXK_END, 0 );
static EDA_HOTKEY HkSwitch2CopperLayer( wxT( "Switch to Copper layer" ),
HK_SWITCH_LAYER_TO_COPPER, WXK_PAGEDOWN );
static EDA_HOTKEY HkSwitch2ComponentLayer( wxT( "Switch to Component layer" ),
......@@ -70,7 +76,6 @@ static EDA_HOTKEY HkSelLayerAndAddBlindBuriedVia( wxT( "Sel Layer and Add Blind/
static EDA_HOTKEY HkSwitchTrackPosture( wxT( "Switch Track Posture" ), HK_SWITCH_TRACK_POSTURE, '/' );
static EDA_HOTKEY HkDragTrackKeepSlope( wxT( "Drag track keep slope" ), HK_DRAG_TRACK_KEEP_SLOPE, 'D' );
static EDA_HOTKEY HkPlaceItem( wxT( "Place Item" ), HK_PLACE_ITEM, 'P' );
static EDA_HOTKEY HkEndTrack( wxT( "End Track" ), HK_END_TRACK, WXK_END );
static EDA_HOTKEY HkEditBoardItem( wxT( "Edit Item" ), HK_EDIT_ITEM, 'E' );
static EDA_HOTKEY HkFlipItem( wxT( "Flip Item" ), HK_FLIP_ITEM, 'F' );
static EDA_HOTKEY HkRotateItem( wxT( "Rotate Item" ), HK_ROTATE_ITEM, 'R' );
......@@ -211,6 +216,8 @@ EDA_HOTKEY* common_Hotkey_List[] =
&HkZoomRedraw, &HkZoomCenter, &HkZoomAuto,
&HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin, &HkResetGridOrigin,
&HkUndo, &HkRedo,
&HkMouseLeftClick,
&HkMouseLeftDClick,
NULL
};
......@@ -225,7 +232,8 @@ EDA_HOTKEY* board_edit_Hotkey_List[] =
&HkSwitchTrackPosture,
&HkDragTrackKeepSlope,
&HkPlaceItem, &HkCopyItem,
&HkEndTrack, &HkMoveItem, &HkFlipItem,
&HkMoveItem,
&HkFlipItem,
&HkRotateItem, &HkDragFootprint,
&HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile, &HkSavefileAs,
&HkLoadfile, &HkFindItem, &HkEditBoardItem,
......
......@@ -28,7 +28,6 @@ enum hotkey_id_commnand {
HK_ADD_MICROVIA,
HK_SWITCH_TRACK_POSTURE,
HK_DRAG_TRACK_KEEP_SLOPE,
HK_END_TRACK,
HK_SAVE_BOARD,
HK_SAVE_BOARD_AS,
HK_LOAD_BOARD,
......@@ -90,6 +89,8 @@ enum hotkey_id_commnand {
HK_CANVAS_DEFAULT,
HK_CANVAS_OPENGL,
HK_CANVAS_CAIRO,
HK_LEFT_CLICK,
HK_LEFT_DCLICK
};
// Full list of hotkey descriptors for board editor and footprint editor
......
......@@ -160,6 +160,15 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
return;
break;
case HK_LEFT_CLICK:
OnLeftClick( aDC, aPosition );
break;
case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events
OnLeftClick( aDC, aPosition );
OnLeftDClick( aDC, aPosition );
break;
case HK_RECORD_MACROS_0:
case HK_RECORD_MACROS_1:
case HK_RECORD_MACROS_2:
......@@ -395,16 +404,6 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
break;
case HK_END_TRACK:
if( itemCurrentlyEdited && GetCurItem()->IsTrack() && GetCurItem()->IsNew() )
{
// A new track is in progress: call to End_Route()
m_canvas->MoveCursorToCrossHair();
End_Route( (TRACK*) GetCurItem(), aDC );
}
break;
case HK_GET_AND_MOVE_FOOTPRINT:
if( !itemCurrentlyEdited )
evt_type = ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST;
......
......@@ -58,6 +58,15 @@ void FOOTPRINT_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPos
GetScreen()->m_O_Curseur = GetCrossHairPosition();
break;
case HK_LEFT_CLICK:
OnLeftClick( aDC, aPosition );
break;
case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events
OnLeftClick( aDC, aPosition );
OnLeftDClick( aDC, aPosition );
break;
case HK_SET_GRID_ORIGIN:
SetGridOrigin( GetCrossHairPosition() );
m_canvas->Refresh();
......
......@@ -104,7 +104,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBRARY_AS,
_( "Save Current Library As..." ),
_( "Save entire current library under a new name." ),
wxNullBitmap );
KiBitmap( copy_library_xpm ) );
// Save module
text = AddHotkeyName( _( "&Save Module in Active Library" ),
......
......@@ -410,7 +410,9 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent )
void FOOTPRINT_EDIT_FRAME::OnUpdateLibSelected( wxUpdateUIEvent& aEvent )
{
aEvent.Enable( getLibPath() != wxEmptyString );
bool enable = getLibPath() != wxEmptyString;
aEvent.Enable( enable );
GetMenuBar()->Enable( ID_MODEDIT_SAVE_LIBRARY_AS, enable );
}
......
......@@ -271,10 +271,31 @@ const wxChar* FOOTPRINT_VIEWER_FRAME::GetFootprintViewerFrameName()
}
FOOTPRINT_VIEWER_FRAME* FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( const wxWindow* aParent )
FOOTPRINT_VIEWER_FRAME* FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( const KIWAY_PLAYER* aParent )
{
// top_of_project!
wxASSERT( dynamic_cast<const PCB_EDIT_FRAME*>( aParent ) );
wxASSERT( aParent );
// We search only within the current project, and do so by limiting
// the search scope to a wxWindow hierarchy subset. Find the top most
// KIWAY_PLAYER which is part of this PROJECT by matching its KIWAY* to the
// most immediate parent's.
// NOTE: an open FOOTPRINT_VIEWER_FRAME may have either the PCB_EDIT_FRAME
// or the FOOTPRINT_EDIT_FRAME as parent.
KIWAY* kiway = &aParent->Kiway();
wxWindow* frame;
while( (frame = aParent->GetParent()) != NULL )
{
// will go NULL when we reach a non-KIWAY_PLAYER
KIWAY_PLAYER* kwp = dynamic_cast<KIWAY_PLAYER*>( frame );
if( kwp && &kwp->Kiway() == kiway )
aParent = kwp;
else
break;
}
return (FOOTPRINT_VIEWER_FRAME*) wxWindow::FindWindowByName(
GetFootprintViewerFrameName(), aParent );
......@@ -424,7 +445,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event )
{
GetBoard()->Add( loadFootprint( id ) );
}
catch( IO_ERROR ioe )
catch( const IO_ERROR& ioe )
{
wxString msg;
msg.Printf( _( "Could not load footprint \"%s\" from library \"%s\".\n\n"
......
......@@ -74,10 +74,14 @@ public:
/**
* Function GetActiveFootprintViewer (static)
* @return a reference to the current opened Footprint viewer
* or NULL if no Footprint viewer currently opened
*
* @param aParent the KIWAY_PLAYER which is the parent of the calling wxWindow.
* This is used to traverse the window hierarchy upwards to the topmost
* KIWAY_PLAYER which is still part of the same project.
*
* @return Any currently opened Footprint viewer or NULL if none.
*/
static FOOTPRINT_VIEWER_FRAME* GetActiveFootprintViewer( const wxWindow* aParent );
static FOOTPRINT_VIEWER_FRAME* GetActiveFootprintViewer( const KIWAY_PLAYER* aParent );
wxString& GetSelectedFootprint( void ) const { return m_selectedFootprintName; }
const wxString GetSelectedLibraryFullName();
......
......@@ -520,7 +520,7 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
{
if( flags & IS_NEW )
{
msg = AddHotkeyName( _( "End Track" ), g_Board_Editor_Hokeys_Descr, HK_END_TRACK );
msg = AddHotkeyName( _( "End Track" ), g_Board_Editor_Hokeys_Descr, HK_LEFT_DCLICK );
AddMenuItem( PopMenu, ID_POPUP_PCB_END_TRACK, msg, KiBitmap( checked_ok_xpm ) );
}
......
This diff is collapsed.
......@@ -35,13 +35,26 @@
WORKING_TREES=~/kicad_sources
# CMake Options
OPTS="$OPTS -DCMAKE_BUILD_TYPE=Release"
OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=ON"
#OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=OFF"
# Python scripting, uncomment to enable
#OPTS="$OPTS -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON"
LIB_REPO=~dickelbeck/kicad/library-read-only
# Use https under bazaar to retrieve repos because this does not require a
# launchpad.net account. Whereas lp:<something> requires a launchpad account.
# https results in read only access.
REPOS=https://code.launchpad.net
# This is no longer maintained, is old
#LEGACY_LIB_REPO=$REPOS/~dickelbeck/kicad/library-read-only
# This branch is a bzr/launchpad import of the Git repository
# at https://github.com/KiCad/kicad-library.git.
# It has schematic parts and 3D models in it.
LIBS_REPO=$REPOS/~kicad-product-committers/kicad/library
SRCS_REPO=$REPOS/~kicad-product-committers/kicad/product
DOCS_REPO=$REPOS/~kicad-developers/kicad/doc
usage()
......@@ -196,7 +209,7 @@ install_or_update()
echo "step 3) checking out the source code from launchpad repo..."
if [ ! -d "$WORKING_TREES/kicad.bzr" ]; then
bzr checkout lp:kicad kicad.bzr
bzr checkout $SRCS_REPO kicad.bzr
echo " source repo to local working tree."
else
cd kicad.bzr
......@@ -205,8 +218,9 @@ install_or_update()
cd ../
fi
echo "step 4) checking out the schematic parts and 3D library repo."
if [ ! -d "$WORKING_TREES/kicad-lib.bzr" ]; then
bzr checkout "lp:$LIB_REPO" kicad-lib.bzr
bzr checkout $LIBS_REPO kicad-lib.bzr
echo ' kicad-lib checked out.'
else
cd kicad-lib.bzr
......@@ -217,7 +231,7 @@ install_or_update()
echo "step 5) checking out the documentation from launchpad repo..."
if [ ! -d "$WORKING_TREES/kicad-doc.bzr" ]; then
bzr checkout lp:~kicad-developers/kicad/doc kicad-doc.bzr
bzr checkout $DOCS_REPO kicad-doc.bzr
echo " docs checked out."
else
cd kicad-doc.bzr
......
REM This file was created using <kicad_src>/scripts/library-repos-install.sh on linux.
REM Run it from a directory you desire as the base for all libraries.
git clone https://github.com/KiCad/kicad-library
git clone https://github.com/KiCad/Displays_7-Segment.pretty
git clone https://github.com/KiCad/Air_Coils_SML_NEOSID.pretty
git clone https://github.com/KiCad/Sockets_BNC.pretty
git clone https://github.com/KiCad/Buzzers_Beepers.pretty
git clone https://github.com/KiCad/Capacitors_Elko_ThroughHole.pretty
git clone https://github.com/KiCad/Capacitors.pretty
git clone https://github.com/KiCad/Capacitors_SMD.pretty
git clone https://github.com/KiCad/Capacitors_ThroughHole.pretty
git clone https://github.com/KiCad/Choke_Axial_ThroughHole.pretty
git clone https://github.com/KiCad/Choke_Radial_ThroughHole.pretty
git clone https://github.com/KiCad/Choke_SMD.pretty
git clone https://github.com/KiCad/Choke_Toroid_ThroughHole.pretty
git clone https://github.com/KiCad/Choke_Common-Mode_Wurth.pretty
git clone https://github.com/KiCad/Connect.pretty
git clone https://github.com/KiCad/Connectors_Serial_MOLEX.pretty
git clone https://github.com/KiCad/Converters_DCDC_ACDC.pretty
git clone https://github.com/KiCad/Crystals.pretty
git clone https://github.com/KiCad/Crystals_Oscillators_SMD.pretty
git clone https://github.com/KiCad/Diodes_SMD.pretty
git clone https://github.com/KiCad/Diodes_ThroughHole.pretty
git clone https://github.com/KiCad/Discret.pretty
git clone https://github.com/KiCad/Display.pretty
git clone https://github.com/KiCad/Divers.pretty
git clone https://github.com/KiCad/EuroBoard_Outline.pretty
git clone https://github.com/KiCad/Fiducials.pretty
git clone https://github.com/KiCad/Filters_HF_Coils_NEOSID.pretty
git clone https://github.com/KiCad/Footprint_Symbols.pretty
git clone https://github.com/KiCad/Fuse_Holders_and_Fuses.pretty
git clone https://github.com/KiCad/Heatsinks.pretty
git clone https://github.com/KiCad/Housings_ROHM.pretty
git clone https://github.com/KiCad/Housings_SIP9.pretty
git clone https://github.com/KiCad/Housings_SOT-23_SOT-143_TSOT-6.pretty
git clone https://github.com/KiCad/Housings_SOT-89.pretty
git clone https://github.com/KiCad/Housings_SOT.pretty
git clone https://github.com/KiCad/Housings_TO-50.pretty
git clone https://github.com/KiCad/Housings_TO-78.pretty
git clone https://github.com/KiCad/Housings_TO-92.pretty
git clone https://github.com/KiCad/Inductors.pretty
git clone https://github.com/KiCad/Inductors_NEOSID.pretty
git clone https://github.com/KiCad/IR-DirectFETs.pretty
git clone https://github.com/KiCad/Iut.pretty
git clone https://github.com/KiCad/Labels.pretty
git clone https://github.com/KiCad/LEDs.pretty
git clone https://github.com/KiCad/Hall-Effect_Transducers_LEM.pretty
git clone https://github.com/KiCad/Measurement_Points.pretty
git clone https://github.com/KiCad/Measurement_Scales.pretty
git clone https://github.com/KiCad/Mechanical_Sockets.pretty
git clone https://github.com/KiCad/Mounting_Holes.pretty
git clone https://github.com/KiCad/Muonde.pretty
git clone https://github.com/KiCad/NF-Transformers_ETAL.pretty
git clone https://github.com/KiCad/Oddities.pretty
git clone https://github.com/KiCad/Transistors_OldSowjetAera.pretty
git clone https://github.com/KiCad/Opto-Devices.pretty
git clone https://github.com/KiCad/Oscillator-Modules.pretty
git clone https://github.com/KiCad/Oscillators.pretty
git clone https://github.com/KiCad/Pentawatts.pretty
git clone https://github.com/KiCad/PFF_PSF_PSS_Leadforms.pretty
git clone https://github.com/KiCad/Pin_Arrays.pretty
git clone https://github.com/KiCad/Potentiometers.pretty
git clone https://github.com/KiCad/Power_Integrations.pretty
git clone https://github.com/KiCad/Printtrafo_CHK.pretty
git clone https://github.com/KiCad/Relays_ThroughHole.pretty
git clone https://github.com/KiCad/Resistors_SMD.pretty
git clone https://github.com/KiCad/Resistors_ThroughHole.pretty
git clone https://github.com/KiCad/Resistors_Universal.pretty
git clone https://github.com/KiCad/QFP.pretty
git clone https://github.com/KiCad/SMD_Packages.pretty
git clone https://github.com/KiCad/Sockets_DIP.pretty
git clone https://github.com/KiCad/Sockets_Mini-Universal.pretty
git clone https://github.com/KiCad/Sockets.pretty
git clone https://github.com/KiCad/Sockets_MOLEX_KK-System.pretty
git clone https://github.com/KiCad/Sockets_PGA.pretty
git clone https://github.com/KiCad/Sockets_WAGO734.pretty
git clone https://github.com/KiCad/SOIC_Packages.pretty
git clone https://github.com/KiCad/SSOP_Packages.pretty
git clone https://github.com/KiCad/Capacitors_Tantalum_SMD.pretty
git clone https://github.com/KiCad/Terminal_Blocks.pretty
git clone https://github.com/KiCad/Transformers_SMPS_ThroughHole.pretty
git clone https://github.com/KiCad/Transistors_SMD.pretty
git clone https://github.com/KiCad/Transistors_TO-220.pretty
git clone https://github.com/KiCad/Transistors_TO-247.pretty
git clone https://github.com/KiCad/Valves.pretty
git clone https://github.com/KiCad/Wire_Connections_Bridges.pretty
git clone https://github.com/KiCad/Wire_Pads.pretty
git clone https://github.com/KiCad/Pin_Headers.pretty
git clone https://github.com/KiCad/Socket_Strips.pretty
......@@ -34,12 +34,15 @@ usage()
echo ""
echo "./library-sources-install.sh <cmd>"
echo " where <cmd> is one of:"
echo " --install-prerequisites (install command tools needed here, run once first.)"
echo " --install-or-update (from github, the library sources.)"
echo " --remove-all-libraries (remove all *.pretty from $WORKING_TREES/library-repos/. )"
echo " --install-prerequisites (install command tools needed here, run once first.)"
echo " --remove-orphaned-libraries (remove local libraries which have been deleted or renamed at github.)"
echo " --list-libraries (show the full list of github libraries.)"
echo " --create-bat-file (cat a windows batch file, redirect to capture to disk.)"
echo ""
echo "example:"
echo "examples (with --install-prerequisites once first):"
echo ' $ ./library-sources-install.sh --install-prerequisites'
echo ' $ ./library-sources-install.sh --install-or-update'
}
......@@ -134,7 +137,7 @@ checkout_or_update_libraries()
if [ ! -e "$WORKING_TREES/library-repos/$repo" ]; then
# Be _sure_ and preserve the directory name, we want extension .pretty not .pretty.git.
# Preserve the directory extension as ".pretty".
# That way those repos can serve as pretty libraries directly if need be.
echo "installing $WORKING_TREES/library-repos/$repo"
......@@ -217,5 +220,32 @@ if [ $# -eq 1 -a "$1" == "--install-prerequisites" ]; then
exit
fi
if [ $# -eq 1 -a "$1" == "--list-libraries" ]; then
# use github API to get repos into PRETTY_REPOS var
detect_pretty_repos
# add the "schematic parts & 3D model" kicad-library to total
for repo in kicad-library $PRETTY_REPOS; do
echo "$repo"
done
exit
fi
# may re-direct this output to a disk file for Windows *.BAT file creation.
if [ $# -eq 1 -a "$1" == "--create-bat-file" ]; then
# use github API to get repos into PRETTY_REPOS var
detect_pretty_repos
echo "REM This file was created using <kicad_src>/scripts/library-repos-install.sh on linux."
echo "REM Run it from a directory you desire as the base for all libraries."
# add the "schematic parts & 3D model" kicad-library to total
for repo in kicad-library $PRETTY_REPOS; do
echo "git clone https://github.com/KiCad/$repo"
done
exit
fi
usage
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