Commit 9e32b2ab authored by g_harland's avatar g_harland
Browse files

Assorted changes; see change_log.txt

parent ee68d20e
Loading
Loading
Loading
Loading
+48 −1
Original line number Diff line number Diff line
@@ -4,6 +4,54 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with 
email address.

2007-Oct-07 UPDATE   Geoff Harland <gharlandau@yahoo.com.au>
================================================================================
+ all
  * Various dialog boxes can now (otherwise) be cancelled by pressing the "Esc" key.
    (Some dialog boxes still require attention in that regard though, so that task
    is not yet complete.) And the captions of the "OK" button within various dialog
    boxes have been fully capitalised (meaning that an icon is now provided within
    each of those buttons within the Linux version of KiCad).
  * DIALOG_STYLE (defined within include/wxstruct.h) now includes MAYBE_RESIZE_BORDER
    field. (Refer to 2007-Oct-2 UPDATE notes for the relevance of this.)
  * Beautification and house keeping.
+ eeschema
  * The editpart.cpp and editpart.cpp files (which are no longer used) have been
    removed, and replaced with editpart.cpp.notused and editpart.cpp.notused
+ cvpcb
  * Additional "OK", "Cancel", and "Apply" buttons have now been provided for the
    "Options" dialog box which lists various display options for footprints.
+ pcbnew
  * Invoking the "Select Layer Pair:" dialog box is no longer possible whenever only
    one (copper) layer is currently enabled. And it is no longer possible to select
    the same layer to be both the Top Layer and Bottom Layer (for any Layer Pair).
  * Deselecting layers during the "Swap layers" command is now more user-friendly,
    due to the provision of an additional "(Deselect)" radiobutton within the (child)
    "Select Layer:" dialog box (which is always invoked whenever a different
    radiobutton within the "Swap Layers:" dialog box is clicked on). (It had
    previously been necessary to cancel the "Select Layer:" dialog box before being
    able to click on the "Deselect" button within the "Swap Layers:" dialog box.)
  * Definition for NB_LAYERS changed from (EDGE_N + 1) to (LAST_NO_COPPER_LAYER + 1)
    (Although EDGE_N is currently the "last" layer, that wouldn't necessarily still
    be true if any additional layers are ever defined in the future.) And comparisons
    to 29 (or 28) have been replaced with comparisons to NB_LAYERS (when appropriate).
+ gerbview
  * The previously provided "Exit" button within the "GerbView Layer Colors" dialog
    box has been replaced with "OK", "Cancel", and "Apply" buttons; and both the
    visibility and color of the Grid layer can now be edited from the same dialog.
  * Deselecting (Gerber) layers during the "Export to Pcbnew" command is now more
    user-friendly, due to the provision of an additional "(Deselect)" radiobutton
    within the (child) "Select Layer:" dialog box (which is always invoked whenever
    a different radiobutton within the "Layer selection:" dialog box is clicked on).
    (It had previously been necessary to cancel the "Select Layer:" dialog box before
    being able to click on the "Deselect" button within the "Layer selection:" dialog
    box.)
  * The "Export to Pcbnew" command now requires at least one Gerber file to have been
    already loaded. And Gerber files can now be loaded into any of the 32 (Gerber)
    layers provided. (It had previously been necessary to avoid having any gaps within
    the sequence of used Gerber layers.)


2007-Oct-6 UPDATE   Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+ pcbnew
@@ -11,7 +59,6 @@ email address.
	move RemoteCommand() and SendMessageToEESCHEMA() to cross-probing.cpp



2007-Oct-3 UPDATE   Dick Hollenbeck <dick@softplc.com>
================================================================================
+ pcbnew
+10 −12
Original line number Diff line number Diff line
@@ -16,14 +16,12 @@
	/***********************/

enum listbox {
	ID_LISTBOX_CANCEL = 8000,
	ID_LISTBOX_LIST,
	ID_LISTBOX_OK
    ID_LISTBOX_LIST = 8000
};

BEGIN_EVENT_TABLE(WinEDAListBox, wxDialog)
	EVT_BUTTON(ID_LISTBOX_OK, WinEDAListBox::Ok)
	EVT_BUTTON(ID_LISTBOX_CANCEL, WinEDAListBox::Cancel)
    EVT_BUTTON(wxID_OK, WinEDAListBox::OnOkClick)
    EVT_BUTTON(wxID_CANCEL, WinEDAListBox::OnCancelClick)
	EVT_LISTBOX(ID_LISTBOX_LIST, WinEDAListBox::ClickOnList)
	EVT_LISTBOX_DCLICK(ID_LISTBOX_LIST, WinEDAListBox::D_ClickOnList)
	EVT_CHAR(WinEDAListBox::OnKeyEvent)
@@ -98,11 +96,11 @@ int ii;
		m_List->Append(*names);
		}

	wxButton * butt = new wxButton(this, ID_LISTBOX_OK, _("Ok"));
    wxButton * butt = new wxButton(this, wxID_OK, _("OK"));
    RightBoxSizer->Add(butt, 0, wxGROW|wxALL, 5);
	butt->SetDefault();

	butt = new wxButton(this, ID_LISTBOX_CANCEL, _("Cancel"));
    butt = new wxButton(this, wxID_CANCEL, _("Cancel"));
    RightBoxSizer->Add(butt, 0, wxGROW|wxALL, 5);

	if (m_MoveFct )
@@ -174,7 +172,7 @@ void WinEDAListBox::InsertItems(const wxArrayString & itemlist, int position)
}

/************************************************/
void WinEDAListBox::Cancel(wxCommandEvent& event)
void WinEDAListBox::OnCancelClick(wxCommandEvent& event)
/************************************************/
{
	EndModal(-1);
@@ -205,7 +203,7 @@ int ii = m_List->GetSelection();


/***********************************************/
void WinEDAListBox::Ok(wxCommandEvent& event)
void WinEDAListBox::OnOkClick(wxCommandEvent& event)
/***********************************************/
{
int ii = m_List->GetSelection();
@@ -224,7 +222,7 @@ void WinEDAListBox::OnClose(wxCloseEvent& event)
static int SortItems( const wxString ** ptr1, const wxString ** ptr2 )
/********************************************************************/
/* Routines de comparaison pour le tri tri alphabetique,
	avec traitement des nombres en tant que valeur numerique
 * avec traitement des nombres en tant que valeur numerique
 */
{
	return StrNumICmp( (*ptr1)->GetData(), (*ptr2)->GetData() );
+88 −47
Original line number Diff line number Diff line
@@ -47,7 +47,8 @@ void WinEDA_DisplayFrame::InstallOptionsDisplay(wxCommandEvent& event)
/* Creation de la fenetre d'options de la fenetre de visu */
{
	KiDisplayOptionsFrame * OptionWindow = new KiDisplayOptionsFrame(this);
	OptionWindow->ShowModal(); OptionWindow->Destroy();
	OptionWindow->ShowModal();
	OptionWindow->Destroy();
}


@@ -65,15 +66,13 @@ IMPLEMENT_DYNAMIC_CLASS( KiDisplayOptionsFrame, wxDialog )
BEGIN_EVENT_TABLE( KiDisplayOptionsFrame, wxDialog )

////@begin KiDisplayOptionsFrame event table entries
    EVT_CHECKBOX( PADNUM_OPT, KiDisplayOptionsFrame::OnPadnumOptClick )

    EVT_BUTTON( ID_SAVE_CONFIG, KiDisplayOptionsFrame::OnSaveConfigClick )

    EVT_CHECKBOX( PADFILL_OPT, KiDisplayOptionsFrame::OnPadfillOptClick )
    EVT_BUTTON( wxID_OK, KiDisplayOptionsFrame::OnOkClick )

    EVT_RADIOBOX( EDGE_SELECT, KiDisplayOptionsFrame::OnEdgeSelectSelected )
    EVT_BUTTON( wxID_CANCEL, KiDisplayOptionsFrame::OnCancelClick )

    EVT_RADIOBOX( TEXT_SELECT, KiDisplayOptionsFrame::OnTextSelectSelected )
    EVT_BUTTON( wxID_APPLY, KiDisplayOptionsFrame::OnApplyClick )

////@end KiDisplayOptionsFrame event table entries

@@ -101,10 +100,10 @@ KiDisplayOptionsFrame::KiDisplayOptionsFrame( WinEDA_BasePcbFrame* parent, wxWin
bool KiDisplayOptionsFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin KiDisplayOptionsFrame member initialisation
    m_IsShowPadNum = NULL;
    m_IsShowPadFill = NULL;
    m_EdgesDisplayOption = NULL;
    m_TextDisplayOption = NULL;
    m_IsShowPadNum = NULL;
    m_IsShowPadFill = NULL;
////@end KiDisplayOptionsFrame member initialisation

////@begin KiDisplayOptionsFrame creation
@@ -132,24 +131,16 @@ void KiDisplayOptionsFrame::CreateControls()

    KiDisplayOptionsFrame* itemDialog1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
    itemDialog1->SetSizer(itemBoxSizer2);

    wxFlexGridSizer* itemFlexGridSizer3 = new wxFlexGridSizer(3, 2, 0, 0);
    itemBoxSizer2->Add(itemFlexGridSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
//  itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_TOP|wxALL, 5);

    m_IsShowPadNum = new wxCheckBox( itemDialog1, PADNUM_OPT, _("Pad &Num"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_IsShowPadNum->SetValue(false);
    itemFlexGridSizer3->Add(m_IsShowPadNum, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton5 = new wxButton( itemDialog1, ID_SAVE_CONFIG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer3->Add(itemButton5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_IsShowPadFill = new wxCheckBox( itemDialog1, PADFILL_OPT, _("&Pad Fill"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_IsShowPadFill->SetValue(false);
    itemFlexGridSizer3->Add(m_IsShowPadFill, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemFlexGridSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
    wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
//  itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    itemBoxSizer2->Add(itemBoxSizer4, 0, wxGROW|wxALIGN_TOP|wxALL, 5);

    wxString m_EdgesDisplayOptionStrings[] = {
        _("&Filaire"),
@@ -157,7 +148,8 @@ void KiDisplayOptionsFrame::CreateControls()
        _("&Sketch")
    };
    m_EdgesDisplayOption = new wxRadioBox( itemDialog1, EDGE_SELECT, _("Edges:"), wxDefaultPosition, wxDefaultSize, 3, m_EdgesDisplayOptionStrings, 1, wxRA_SPECIFY_COLS );
    itemFlexGridSizer3->Add(m_EdgesDisplayOption, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
//  itemBoxSizer3->Add(m_EdgesDisplayOption, 0, wxGROW|wxALL, 5);
    itemBoxSizer3->Add(m_EdgesDisplayOption, 0, wxALIGN_LEFT|wxALL, 5);

    wxString m_TextDisplayOptionStrings[] = {
        _("&Filaire"),
@@ -165,13 +157,54 @@ void KiDisplayOptionsFrame::CreateControls()
        _("&Sketch")
    };
    m_TextDisplayOption = new wxRadioBox( itemDialog1, TEXT_SELECT, _("Texts:"), wxDefaultPosition, wxDefaultSize, 3, m_TextDisplayOptionStrings, 1, wxRA_SPECIFY_COLS );
    itemFlexGridSizer3->Add(m_TextDisplayOption, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
//  itemBoxSizer3->Add(m_TextDisplayOption, 0, wxGROW|wxALL, 5);
    itemBoxSizer3->Add(m_TextDisplayOption, 0, wxALIGN_LEFT|wxALL, 5);

    wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
//  itemBoxSizer3->Add(itemBoxSizer5, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    itemBoxSizer3->Add(itemBoxSizer5, 0, wxGROW|wxALL, 0);

    // Provide a spacer to improve appearance of dialog box
    itemBoxSizer5->AddSpacer(5);

    m_IsShowPadNum = new wxCheckBox( itemDialog1, PADNUM_OPT, _("Pad &Num"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_IsShowPadNum->SetValue(false);
//  itemBoxSizer5->Add(m_IsShowPadNum, 0, wxGROW|wxALL, 5);
    itemBoxSizer5->Add(m_IsShowPadNum, 0, wxALIGN_TOP|wxALL, 5);

    m_IsShowPadFill = new wxCheckBox( itemDialog1, PADFILL_OPT, _("&Pad Fill"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_IsShowPadFill->SetValue(false);
//  itemBoxSizer5->Add(m_IsShowPadFill, 0, wxGROW|wxALL, 5);
    itemBoxSizer5->Add(m_IsShowPadFill, 0, wxALIGN_TOP|wxALL, 5);

    // Provide a stretch spacer to improve appearance of dialog box
    itemBoxSizer5->AddStretchSpacer();

    wxButton* itemButton6 = new wxButton( itemDialog1, ID_SAVE_CONFIG, _("Save Cfg..."), wxDefaultPosition, wxDefaultSize, 0 );
//  itemBoxSizer5->Add(itemButton6, 0, wxGROW|wxALL, 5);
    itemBoxSizer5->Add(itemButton6, 0, wxALIGN_BOTTOM|wxALL, 5);

//  itemBoxSizer4->AddStretchSpacer();

    wxButton* itemButton7 = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton7->SetForegroundColour(*wxRED);
//  itemBoxSizer4->Add(itemButton7, 0, wxGROW|wxALL, 5);
    itemBoxSizer4->Add(itemButton7, 0, wxALIGN_RIGHT|wxALL, 5);

    wxButton* itemButton8 = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton8->SetForegroundColour(*wxBLUE);
//  itemBoxSizer4->Add(itemButton8, 0, wxGROW|wxALL, 5);
    itemBoxSizer4->Add(itemButton8, 0, wxALIGN_RIGHT|wxALL, 5);

    wxButton* itemButton9 = new wxButton( itemDialog1, wxID_APPLY, _("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
//  itemBoxSizer4->Add(itemButton9, 0, wxGROW|wxALL, 5);
    itemBoxSizer4->Add(itemButton9, 0, wxALIGN_RIGHT|wxALL, 5);

    // Set validators
    m_IsShowPadNum->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadNum) );
    m_IsShowPadFill->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadFill) );
    m_EdgesDisplayOption->SetValidator( wxGenericValidator(& DisplayOpt.DisplayModEdge) );
    m_TextDisplayOption->SetValidator( wxGenericValidator(& DisplayOpt.DisplayModText) );
    m_IsShowPadNum->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadNum) );
    m_IsShowPadFill->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadFill) );
////@end KiDisplayOptionsFrame content construction
}

@@ -210,57 +243,65 @@ wxIcon KiDisplayOptionsFrame::GetIconResource( const wxString& name )
////@end KiDisplayOptionsFrame icon retrieval
}


/*!
 * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for PADFILL_OPT
 * Update settings related to edges, text strings, and pads
 */

void KiDisplayOptionsFrame::OnPadfillOptClick( wxCommandEvent& event )
void KiDisplayOptionsFrame::UpdateObjectSettings()
{
    // Update settings
////@begin KiDisplayOptionsFrame update settings
	DisplayOpt.DisplayModEdge = m_Parent->m_DisplayModEdge =
		m_EdgesDisplayOption->GetSelection();

	DisplayOpt.DisplayModText = m_Parent->m_DisplayModText = 
		m_TextDisplayOption->GetSelection();

    DisplayOpt.DisplayPadNum = m_Parent->m_DisplayPadNum =
        m_IsShowPadNum->GetValue();

	DisplayOpt.DisplayPadFill = m_Parent->m_DisplayPadFill =
		m_IsShowPadFill->GetValue();

	m_Parent->ReDrawPanel();
////@end KiDisplayOptionsFrame update settings
}

/*!
 * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for PADNUM_OPT
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SAVE_CONFIG
 */

void KiDisplayOptionsFrame::OnPadnumOptClick( wxCommandEvent& event )
void KiDisplayOptionsFrame::OnSaveConfigClick( wxCommandEvent& event )
{
    DisplayOpt.DisplayPadNum = m_Parent->m_DisplayPadNum = m_IsShowPadNum->GetValue();
	m_Parent->ReDrawPanel();
	Save_Config(this);
}

/*!
 * wxEVT_COMMAND_RADIOBOX_SELECTED event handler for EDGE_SELECT
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
 */

void KiDisplayOptionsFrame::OnEdgeSelectSelected( wxCommandEvent& event )
void KiDisplayOptionsFrame::OnOkClick( wxCommandEvent& event )
{
	DisplayOpt.DisplayModEdge = m_Parent->m_DisplayModEdge =
		m_EdgesDisplayOption->GetSelection();
	m_Parent->ReDrawPanel();
	UpdateObjectSettings();
    EndModal( 1 );
}

/*!
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SAVE_CONFIG
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
 */

void KiDisplayOptionsFrame::OnSaveConfigClick( wxCommandEvent& event )
void KiDisplayOptionsFrame::OnCancelClick( wxCommandEvent& event )
{
	Save_Config(this);
    EndModal( -1 );
}

/*!
 * wxEVT_COMMAND_RADIOBOX_SELECTED event handler for TEXT_SELECT
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_APPLY
 */

void KiDisplayOptionsFrame::OnTextSelectSelected( wxCommandEvent& event )
void KiDisplayOptionsFrame::OnApplyClick( wxCommandEvent& event )
{
	DisplayOpt.DisplayModText = m_Parent->m_DisplayModText = 
		m_TextDisplayOption->GetSelection();
	m_Parent->ReDrawPanel();
	UpdateObjectSettings();
}

+11 −11
Original line number Diff line number Diff line
@@ -81,20 +81,17 @@ public:

////@begin KiDisplayOptionsFrame event handler declarations

    /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for PADNUM_OPT
    void OnPadnumOptClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SAVE_CONFIG
    void OnSaveConfigClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for PADFILL_OPT
    void OnPadfillOptClick( wxCommandEvent& event );
    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
    void OnOkClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for EDGE_SELECT
    void OnEdgeSelectSelected( wxCommandEvent& event );
    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
    void OnCancelClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for TEXT_SELECT
    void OnTextSelectSelected( wxCommandEvent& event );
    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_APPLY
    void OnApplyClick( wxCommandEvent& event );

////@end KiDisplayOptionsFrame event handler declarations

@@ -105,16 +102,19 @@ public:

    /// Retrieves icon resources
    wxIcon GetIconResource( const wxString& name );

    /// Updates settings related to edges, text strings, and pads
    void UpdateObjectSettings();
////@end KiDisplayOptionsFrame member function declarations

    /// Should we show tooltips?
    static bool ShowToolTips();
	
////@begin KiDisplayOptionsFrame member variables
    wxCheckBox* m_IsShowPadNum;
    wxCheckBox* m_IsShowPadFill;
    wxRadioBox* m_EdgesDisplayOption;
    wxRadioBox* m_TextDisplayOption;
    wxCheckBox* m_IsShowPadNum;
    wxCheckBox* m_IsShowPadFill;
////@end KiDisplayOptionsFrame member variables

	WinEDA_BasePcbFrame * m_Parent;
+1 −1
Original line number Diff line number Diff line
@@ -194,7 +194,7 @@ WinEDA_ComponentPropertiesFrame::WinEDA_ComponentPropertiesFrame(

    pos.x += MButton->GetDefaultSize().x + 10;
    wxButton* Button = new wxButton( this, ID_ACCEPT_CMP_PROPERTIES,
                                     _( "Ok" ), pos );
                                     _( "OK" ), pos );
    Button->SetForegroundColour( *wxBLUE );
    c = new wxLayoutConstraints;
    c->left.SameAs( MButton, wxRight, 20 );
Loading