Commit 4467b911 authored by Fabrizio's avatar Fabrizio Committed by jean-pierre charras
Browse files

Commit patch make by Fabrizio, with a minor change to avoid duplicate HTML dialog.

parent 9b97938a
Loading
Loading
Loading
Loading

HOW_TO_CONTRIBUTE.txt

0 → 100644
+44 −0
Original line number Diff line number Diff line
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 <john.doe@gmail.com>"

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.
+15 −1
Original line number Diff line number Diff line
@@ -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;
+6 −4
Original line number Diff line number Diff line
@@ -339,8 +339,9 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame,
    wxString        keyname;
    Ki_HotkeyInfo** List;

    wxString        msg = _( "Current hotkey list:\n\n" );
    wxString        msg = _( "<html><body>" );

    msg += _( "<H3>Hotkeys List</H3> <table cellpadding=\"0\">");
    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( "<tr><td>" ) + hk_decr->m_InfoMsg + wxT("</td>");
            msg    += wxT("<td><b>&nbsp;&nbsp;") + keyname + wxT( "</b></td></tr>" );
        }
    }

    DisplayInfoMessage( aFrame, msg );
    msg += wxT("</table></html></body>");
    DisplayHtmlInfoMessage( aFrame, _("Hotkeys List"), msg, wxSize(340, 750));
}


+1 −0
Original line number Diff line number Diff line
@@ -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")
+11 −11
Original line number Diff line number Diff line
@@ -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;

Loading