diff --git a/HOW_TO_CONTRIBUTE.txt b/HOW_TO_CONTRIBUTE.txt new file mode 100644 index 0000000000..8d7477eb51 --- /dev/null +++ b/HOW_TO_CONTRIBUTE.txt @@ -0,0 +1,44 @@ +Contribute to KiCad (under Linux) +-------------------- + +1) make sure you have all the dependencies of KiCad: + sudo apt-get install debhelper dpatch libx11-dev + sudo apt-get install libglu1-mesa-dev libgl1-mesa-dev mesa-common-dev + sudo apt-get install libwxbase2.8-dev libwxgtk2.8-dev libboost-dev fakeroot + sudo apt-get install cmake bzr + +2) initialize Bazaar: + bzr whoami "John Doe " + +3) get LATEST KiCad source tree and name it, for instance, "kicad_john": + cd ~/ + bzr branch lp:kicad kicad_john + +4) create a copy of this folder and zip it away (just in case). + +5) Modify/add source code. + cd kicad_john + gedit ....... + +6) Compile: + cd kicad_john + mkdir build; cd build + cmake ../ -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Debug + make -j 4 # this is for a 4 core machine + +7) Repeat step 5 and 6 until satisfied. + +8) Delete the "build" folder and create a patch: + cd kicad_john + rm -R ./build + bzr add . + bzr status + bzr diff > gui_better_zoom.patch + +9) Send the patch file "gui_better_zoom.patch" to the KiCad developers mailing list. + in the subject of the e-mail include the keyword "[PATCH]". + in the body of the e-mail clearly explain what you have done. + + +for more info see INSTALL.txt. + diff --git a/common/confirm.cpp b/common/confirm.cpp index 4aa766c92f..24240e7d00 100644 --- a/common/confirm.cpp +++ b/common/confirm.cpp @@ -5,7 +5,9 @@ #include "fctsys.h" #include "common.h" - +#include "wx/wx.h" +#include "wx/html/htmlwin.h" +#include "html_messagebox.h" /* Display an error or warning message. * TODO: @@ -45,6 +47,18 @@ void DisplayInfoMessage( wxWindow* parent, const wxString& text, } + /* Display a simple message window in html format. + */ +void DisplayHtmlInfoMessage( wxWindow* parent, const wxString& title, + const wxString& text, const wxSize& size ) +{ + HTML_MESSAGE_BOX *dlg = new HTML_MESSAGE_BOX(parent,title, wxDefaultPosition, size ); + dlg->AddHTML_Text( text ); + dlg->ShowModal(); + dlg->Destroy(); +} + + bool IsOK( wxWindow* parent, const wxString& text ) { int ii; diff --git a/common/hotkeys_basic.cpp b/common/hotkeys_basic.cpp index dde2a5378f..927afbf21e 100644 --- a/common/hotkeys_basic.cpp +++ b/common/hotkeys_basic.cpp @@ -339,8 +339,9 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame, wxString keyname; Ki_HotkeyInfo** List; - wxString msg = _( "Current hotkey list:\n\n" ); + wxString msg = _( "" ); + msg += _( "

Hotkeys List

"); for( ; aDescList->m_HK_InfoList != NULL; aDescList++ ) { List = aDescList->m_HK_InfoList; @@ -348,13 +349,14 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame, for( ; *List != NULL; List++ ) { Ki_HotkeyInfo* hk_decr = *List; - msg += _( "key " ); keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode ); - msg += keyname + wxT( ": " ) + hk_decr->m_InfoMsg + wxT( "\n" ); + msg += wxT( ""); + msg += wxT("" ); } } - DisplayInfoMessage( aFrame, msg ); + msg += wxT("
" ) + hk_decr->m_InfoMsg + wxT("  ") + keyname + wxT( "
"); + DisplayHtmlInfoMessage( aFrame, _("Hotkeys List"), msg, wxSize(340, 750)); } diff --git a/eeschema/help_common_strings.h b/eeschema/help_common_strings.h index b0dff7f1a8..d6c03ea4e4 100644 --- a/eeschema/help_common_strings.h +++ b/eeschema/help_common_strings.h @@ -57,3 +57,4 @@ #define HELP_ADD_BODYCIRCLE _( "Add circles to the component body" ) #define HELP_ADD_BODYARC _( "Add arcs to the component body" ) #define HELP_ADD_BODYPOLYGON _( "Add lines and polygons to the component body" ) +#define HELP_PLACE_GRAPHICIMAGES _("Add a bitmap image") diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp index 867ef33fe4..6f3712b230 100644 --- a/eeschema/hotkeys.cpp +++ b/eeschema/hotkeys.cpp @@ -87,8 +87,8 @@ static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 ); static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-' ); #endif -static Ki_HotkeyInfo HkHelp( wxT( "Help: this message" ), HK_HELP, '?' ); -static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset local coord." ), +static Ki_HotkeyInfo HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' ); +static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' ); /* Undo */ @@ -104,11 +104,11 @@ static Ki_HotkeyInfo HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL + // Schematic editor static Ki_HotkeyInfo HkAddLabel( wxT( "add Label" ), HK_ADD_LABEL, 'L' ); -static Ki_HotkeyInfo HkAddHierarchicalLabel( wxT( "add Hierarchical Label" ), HK_ADD_HLABEL, 'H' ); -static Ki_HotkeyInfo HkAddGlobalLabel( wxT( "add Global Label" ), HK_ADD_GLABEL, GR_KB_CTRL + 'L' ); -static Ki_HotkeyInfo HkAddJunction( wxT( "add Junction" ), HK_ADD_JUNCTION, 'J' ); -static Ki_HotkeyInfo HkBeginWire( wxT( "begin Wire" ), HK_BEGIN_WIRE, 'W' ); -static Ki_HotkeyInfo HkBeginBus( wxT( "begin Bus" ), HK_BEGIN_BUS, 'B' ); +static Ki_HotkeyInfo HkAddHierarchicalLabel( wxT( "Add Hierarchical Label" ), HK_ADD_HLABEL, 'H' ); +static Ki_HotkeyInfo HkAddGlobalLabel( wxT( "Add Global Label" ), HK_ADD_GLABEL, GR_KB_CTRL + 'L' ); +static Ki_HotkeyInfo HkAddJunction( wxT( "Add Junction" ), HK_ADD_JUNCTION, 'J' ); +static Ki_HotkeyInfo HkBeginWire( wxT( "Draw Wire" ), HK_BEGIN_WIRE, 'W' ); +static Ki_HotkeyInfo HkBeginBus( wxT( "Draw Bus" ), HK_BEGIN_BUS, 'B' ); static Ki_HotkeyInfo HkAddComponent( wxT( "Add Component" ), HK_ADD_NEW_COMPONENT, 'A' ); static Ki_HotkeyInfo HkAddPower( wxT( "Add Power" ), HK_ADD_NEW_POWER, 'P' ); static Ki_HotkeyInfo HkAddNoConn( wxT( "Add NoConnected Flag" ), HK_ADD_NOCONN_FLAG, 'Q' ); @@ -139,20 +139,20 @@ static Ki_HotkeyInfo HkCopyComponentOrText( wxT( "Copy Component or Label" ), static Ki_HotkeyInfo HkDrag( wxT( "Drag Schematic Item" ), HK_DRAG, 'G', ID_POPUP_SCH_DRAG_CMP_REQUEST ); -static Ki_HotkeyInfo HkMove2Drag( wxT( "Switch move block to drag block" ), +static Ki_HotkeyInfo HkMove2Drag( wxT( "Move Block -> Drag Block" ), HK_MOVEBLOCK_TO_DRAGBLOCK, '\t' ); static Ki_HotkeyInfo HkInsert( wxT( "Repeat Last Item" ), HK_REPEAT_LAST, WXK_INSERT ); static Ki_HotkeyInfo HkDelete( wxT( "Delete Item" ), HK_DELETE, WXK_DELETE ); static Ki_HotkeyInfo HkFindItem( wxT( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL ); static Ki_HotkeyInfo HkFindNextItem( wxT( "Find Next Item" ), HK_FIND_NEXT_ITEM, WXK_F5 ); -static Ki_HotkeyInfo HkFindNextDrcMarker( wxT( "Find next DRC marker" ), HK_FIND_NEXT_DRC_MARKER, +static Ki_HotkeyInfo HkFindNextDrcMarker( wxT( "Find Next DRC Marker" ), HK_FIND_NEXT_DRC_MARKER, WXK_F5 + GR_KB_SHIFT ); // Special keys for library editor: static Ki_HotkeyInfo HkCreatePin( wxT( "Create Pin" ), HK_LIBEDIT_CREATE_PIN, 'P' ); static Ki_HotkeyInfo HkInsertPin( wxT( "Repeat Pin" ), HK_REPEAT_LAST, WXK_INSERT ); -static Ki_HotkeyInfo HkMoveLibItem( wxT( "Move Lib Item" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' ); +static Ki_HotkeyInfo HkMoveLibItem( wxT( "Move Library Item" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' ); // List of common hotkey descriptors @@ -977,7 +977,7 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, break; case HK_LIBEDIT_CREATE_PIN: - SetToolID( ID_LIBEDIT_PIN_BUTT, wxCURSOR_PENCIL, _( "Add pin" ) ); + SetToolID( ID_LIBEDIT_PIN_BUTT, wxCURSOR_PENCIL, _( "Add Pin" ) ); OnLeftClick( aDC, aPosition ); break; diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index fef72125f9..8e24d9df5a 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -51,7 +51,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( fileMenu, ID_LOAD_PROJECT, _( "&Open\tCtrl+O" ), - _( "Open an existing schematic project" ), + _( "Open Existing Schematic Project" ), open_document_xpm ); // Open Recent submenu @@ -67,7 +67,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu ); AddMenuItem( fileMenu, openRecentMenu, wxID_ANY, _( "Open &Recent" ), - _( "Open a recent opened schematic project" ), + _( "Open Recent Opened Schematic Project" ), open_project_xpm ); // Separator @@ -196,7 +196,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( editMenu, ID_BACKANNO_ITEMS, _( "&Backannotate" ), - _( "Back annotate the footprint fields" ), + _( "Back Annotate Footprint Fields" ), import_footprint_names_xpm ); // Menu View: @@ -258,7 +258,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() add_component_xpm ); // Power port - text = AddHotkeyName( _( "Power port" ), s_Schematic_Hokeys_Descr, + text = AddHotkeyName( _( "Power Port" ), s_Schematic_Hokeys_Descr, HK_ADD_NEW_POWER, false ); // add comment, not a shortcut AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text, HELP_PLACE_POWERPORT, @@ -279,21 +279,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() add_bus_xpm ); // Wire to Bus entry - text = AddHotkeyName( _( "Wire to bus entry" ), s_Schematic_Hokeys_Descr, + text = AddHotkeyName( _( "Wire to Bus Entry" ), s_Schematic_Hokeys_Descr, HK_ADD_WIRE_ENTRY, false ); // add comment, not a shortcut AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text, HELP_PLACE_WIRE2BUS_ENTRY, add_line2bus_xpm ); // Bus to Bus entry - text = AddHotkeyName( _( "Bus to bus entry" ), s_Schematic_Hokeys_Descr, + text = AddHotkeyName( _( "Bus to Bus Entry" ), s_Schematic_Hokeys_Descr, HK_ADD_BUS_ENTRY, false ); // add comment, not a shortcut AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text, HELP_PLACE_BUS2BUS_ENTRY, add_bus2bus_xpm ); - // No connect flag - text = AddHotkeyName( _( "No connect flag" ), s_Schematic_Hokeys_Descr, + // No Connect Flag + text = AddHotkeyName( _( "No Connect Flag" ), s_Schematic_Hokeys_Descr, HK_ADD_NOCONN_FLAG, false ); // add comment, not a shortcut AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, noconn_xpm ); @@ -305,7 +305,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() add_line_label_xpm ); // Global label - text = AddHotkeyName( _( "Global label" ), s_Schematic_Hokeys_Descr, + text = AddHotkeyName( _( "Global Label" ), s_Schematic_Hokeys_Descr, HK_ADD_GLABEL, false ); // add comment, not a shortcut AddMenuItem( placeMenu, ID_GLABEL_BUTT, text, HELP_PLACE_GLOBALLABEL, @@ -322,9 +322,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() placeMenu->AppendSeparator(); // Hierarchical label - text = AddHotkeyName( _( "Hierarchical label" ), s_Schematic_Hokeys_Descr, + text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_ADD_HLABEL, false ); // add comment, not a shortcut - text = AddHotkeyName( _( "Hierarchical label" ), s_Schematic_Hokeys_Descr, + text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_ADD_HLABEL, false ); // add comment, not a shortcut AddMenuItem( placeMenu, ID_HIERLABEL_BUTT, text, HELP_PLACE_HIER_LABEL, @@ -332,7 +332,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Hierarchical sheet - text = AddHotkeyName( _( "Hierarchical sheet" ), s_Schematic_Hokeys_Descr, + text = AddHotkeyName( _( "Hierarchical Sheet" ), s_Schematic_Hokeys_Descr, HK_ADD_HIER_SHEET, false ); // add comment, not a shortcut AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text, HELP_PLACE_SHEET, @@ -348,7 +348,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Add hierarchical Pin to Sheet AddMenuItem( placeMenu, ID_SHEET_PIN_BUTT, - _( "Add Hierarchical Pin to Sheet" ), + _( "Hierarchical Pin to Sheet" ), HELP_PLACE_SHEETPIN, add_hierar_pin_xpm ); @@ -356,19 +356,23 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() placeMenu->AppendSeparator(); // Graphic line or polygon - text = AddHotkeyName( _( "Graphic polyline" ), s_Schematic_Hokeys_Descr, + text = AddHotkeyName( _( "Graphic Polyline" ), s_Schematic_Hokeys_Descr, HK_ADD_GRAPHIC_POLYLINE, false ); // add comment, not a shortcut AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text, HELP_PLACE_GRAPHICLINES, add_dashed_line_xpm ); // Graphic text - text = AddHotkeyName( _( "Graphic text" ), s_Schematic_Hokeys_Descr, + text = AddHotkeyName( _( "Graphic Text" ), s_Schematic_Hokeys_Descr, HK_ADD_GRAPHIC_TEXT, false ); // add comment, not a shortcut AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text, HELP_PLACE_GRAPHICTEXTS, add_text_xpm ); + // Graphic image + AddMenuItem( placeMenu, ID_ADD_IMAGE_BUTT, _("Image"), + HELP_PLACE_GRAPHICIMAGES, + image_xpm ); // Menu Preferences: wxMenu* preferencesMenu = new wxMenu; @@ -412,14 +416,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Save preferences AddMenuItem( preferencesMenu, ID_CONFIG_SAVE, - _( "&Save preferences" ), + _( "&Save Preferences" ), _( "Save application preferences" ), save_setup_xpm ); // Read preferences AddMenuItem( preferencesMenu, ID_CONFIG_READ, - _( "&Read preferences" ), + _( "&Read Preferences" ), _( "Read application preferences" ), read_setup_xpm ); @@ -478,14 +482,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() //Run CVPcb AddMenuItem( toolsMenu, ID_TO_CVPCB, - _( "A&ssign component footprints" ), + _( "A&ssign Component Footprints" ), _( "Run CVPcb" ), cvpcb_xpm ); // Run PCBNew AddMenuItem( toolsMenu, ID_TO_PCB, - _( "&Layout printed circuit board" ), + _( "&Layout Printed Circuit Board" ), _( "Run PCBNew" ), pcbnew_xpm ); diff --git a/eeschema/tool_sch.cpp b/eeschema/tool_sch.cpp index e210e259d7..d464794592 100644 --- a/eeschema/tool_sch.cpp +++ b/eeschema/tool_sch.cpp @@ -218,7 +218,7 @@ void SCH_EDIT_FRAME::ReCreateVToolbar() HELP_PLACE_GRAPHICTEXTS, wxITEM_CHECK ); m_VToolBar->AddTool( ID_ADD_IMAGE_BUTT, wxEmptyString, wxBitmap( image_xpm ), - _("Add a bitmap image"), wxITEM_CHECK ); + HELP_PLACE_GRAPHICIMAGES, wxITEM_CHECK ); m_VToolBar->AddTool( ID_SCHEMATIC_DELETE_ITEM_BUTT, wxEmptyString, KiBitmap( delete_body_xpm ), HELP_DELETE_ITEMS, wxITEM_CHECK ); diff --git a/gerbview/hotkeys.cpp b/gerbview/hotkeys.cpp index b3d4f74928..52d3728efe 100644 --- a/gerbview/hotkeys.cpp +++ b/gerbview/hotkeys.cpp @@ -30,13 +30,13 @@ /* local variables */ /* Hotkey list: */ -static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset local coord." ), HK_RESET_LOCAL_COORD, ' ' ); +static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' ); static Ki_HotkeyInfo HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME ); static Ki_HotkeyInfo HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4 ); static Ki_HotkeyInfo HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3 ); static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 ); static Ki_HotkeyInfo HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1 ); -static Ki_HotkeyInfo HkHelp( wxT( "Help: this message" ), HK_HELP, '?' ); +static Ki_HotkeyInfo HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' ); static Ki_HotkeyInfo HkSwitchUnits( wxT( "Switch Units" ), HK_SWITCH_UNITS, 'U' ); static Ki_HotkeyInfo HkTrackDisplayMode( wxT( "Track Display Mode" ), diff --git a/include/confirm.h b/include/confirm.h index 942d45e012..843ba2f439 100644 --- a/include/confirm.h +++ b/include/confirm.h @@ -16,4 +16,9 @@ void DisplayInfoMessage( wxWindow* parent, const wxString& msg, bool IsOK( wxWindow* parent, const wxString& msg ); +void DisplayHtmlInfoMessage( wxWindow* parent, const wxString& title, + const wxString& msg, + const wxSize& size=wxDefaultSize ); + + #endif /* __INCLUDE__CONFIRM_H__ */ diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 42778de3ab..1bb5635854 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -82,7 +82,7 @@ static Ki_HotkeyInfo HkGetAndMoveFootprint( wxT( "Get and Move Footprint" ), static Ki_HotkeyInfo HkLock_Unlock_Footprint( wxT( "Lock/Unlock Footprint" ), HK_LOCK_UNLOCK_FOOTPRINT, 'L' ); static Ki_HotkeyInfo HkDelete( wxT( "Delete Track or Footprint" ), HK_DELETE, WXK_DELETE ); -static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset local coord." ), +static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' ); /* Fit on Screen */ @@ -115,7 +115,7 @@ static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 ); static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-' ); #endif -static Ki_HotkeyInfo HkHelp( wxT( "Help: this message" ), HK_HELP, '?' ); +static Ki_HotkeyInfo HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' ); /* Undo */