Commit e89db97d authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Pcbnew: footprint wizard dialogs: minor fixes, and fixes a not working...

Pcbnew: footprint wizard dialogs: minor fixes, and fixes a not working parmeters dialog under Windows, due to an incorrect Printf format.
parent c99243ff
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -68,5 +68,10 @@ FOOTPRINT_WIZARD* DIALOG_FOOTPRINT_WIZARD_LIST::GetWizard()


void DIALOG_FOOTPRINT_WIZARD_LIST::OnOpenButtonClick( wxCommandEvent& event )
void DIALOG_FOOTPRINT_WIZARD_LIST::OnOpenButtonClick( wxCommandEvent& event )
{
{
    Close(true);
    EndModal( wxID_OK );
}

void DIALOG_FOOTPRINT_WIZARD_LIST::OnCancelClick( wxCommandEvent& event )
{
    EndModal( wxID_CANCEL );
}
}
+19 −81
Original line number Original line Diff line number Diff line
@@ -236,90 +236,28 @@
                </object>
                </object>
                <object class="sizeritem" expanded="1">
                <object class="sizeritem" expanded="1">
                    <property name="border">5</property>
                    <property name="border">5</property>
                    <property name="flag">wxALIGN_CENTER|wxALL</property>
                    <property name="flag">wxEXPAND</property>
                    <property name="proportion">0</property>
                    <property name="proportion">0</property>
                    <object class="wxButton" expanded="1">
                    <object class="wxStdDialogButtonSizer" expanded="1">
                        <property name="BottomDockable">1</property>
                        <property name="Apply">0</property>
                        <property name="LeftDockable">1</property>
                        <property name="Cancel">1</property>
                        <property name="RightDockable">1</property>
                        <property name="ContextHelp">0</property>
                        <property name="TopDockable">1</property>
                        <property name="Help">0</property>
                        <property name="aui_layer"></property>
                        <property name="No">0</property>
                        <property name="aui_name"></property>
                        <property name="OK">1</property>
                        <property name="aui_position"></property>
                        <property name="Save">0</property>
                        <property name="aui_row"></property>
                        <property name="Yes">0</property>
                        <property name="best_size"></property>
                        <property name="bg"></property>
                        <property name="caption"></property>
                        <property name="caption_visible">1</property>
                        <property name="center_pane">0</property>
                        <property name="close_button">1</property>
                        <property name="context_help"></property>
                        <property name="context_menu">1</property>
                        <property name="default">1</property>
                        <property name="default_pane">0</property>
                        <property name="dock">Dock</property>
                        <property name="dock_fixed">0</property>
                        <property name="docking">Left</property>
                        <property name="enabled">1</property>
                        <property name="fg"></property>
                        <property name="floatable">1</property>
                        <property name="font"></property>
                        <property name="gripper">0</property>
                        <property name="hidden">0</property>
                        <property name="id">wxID_ANY</property>
                        <property name="label">Open</property>
                        <property name="max_size"></property>
                        <property name="maximize_button">0</property>
                        <property name="maximum_size"></property>
                        <property name="min_size"></property>
                        <property name="minimize_button">0</property>
                        <property name="minimum_size"></property>
                        <property name="minimum_size"></property>
                        <property name="moveable">1</property>
                        <property name="name">m_sdbSizer</property>
                        <property name="name">m_btOpen</property>
                        <property name="pane_border">1</property>
                        <property name="pane_position"></property>
                        <property name="pane_size"></property>
                        <property name="permission">protected</property>
                        <property name="permission">protected</property>
                        <property name="pin_button">1</property>
                        <event name="OnApplyButtonClick"></event>
                        <property name="pos"></property>
                        <event name="OnCancelButtonClick">OnCancelClick</event>
                        <property name="resize">Resizable</property>
                        <event name="OnContextHelpButtonClick"></event>
                        <property name="show">1</property>
                        <event name="OnHelpButtonClick"></event>
                        <property name="size"></property>
                        <event name="OnNoButtonClick"></event>
                        <property name="style"></property>
                        <event name="OnOKButtonClick">OnOpenButtonClick</event>
                        <property name="subclass"></property>
                        <event name="OnSaveButtonClick"></event>
                        <property name="toolbar_pane">0</property>
                        <event name="OnYesButtonClick"></event>
                        <property name="tooltip"></property>
                        <property name="validator_data_type"></property>
                        <property name="validator_style">wxFILTER_NONE</property>
                        <property name="validator_type">wxDefaultValidator</property>
                        <property name="validator_variable"></property>
                        <property name="window_extra_style"></property>
                        <property name="window_name"></property>
                        <property name="window_style"></property>
                        <event name="OnButtonClick">OnOpenButtonClick</event>
                        <event name="OnChar"></event>
                        <event name="OnEnterWindow"></event>
                        <event name="OnEraseBackground"></event>
                        <event name="OnKeyDown"></event>
                        <event name="OnKeyUp"></event>
                        <event name="OnKillFocus"></event>
                        <event name="OnLeaveWindow"></event>
                        <event name="OnLeftDClick"></event>
                        <event name="OnLeftDown"></event>
                        <event name="OnLeftUp"></event>
                        <event name="OnMiddleDClick"></event>
                        <event name="OnMiddleDown"></event>
                        <event name="OnMiddleUp"></event>
                        <event name="OnMotion"></event>
                        <event name="OnMouseEvents"></event>
                        <event name="OnMouseWheel"></event>
                        <event name="OnPaint"></event>
                        <event name="OnRightDClick"></event>
                        <event name="OnRightDown"></event>
                        <event name="OnRightUp"></event>
                        <event name="OnSetFocus"></event>
                        <event name="OnSize"></event>
                        <event name="OnUpdateUI"></event>
                    </object>
                    </object>
                </object>
                </object>
            </object>
            </object>
+2 −2
Original line number Original line Diff line number Diff line
@@ -20,9 +20,9 @@ public:
    FOOTPRINT_WIZARD* GetWizard();
    FOOTPRINT_WIZARD* GetWizard();


private:
private:

    void OnCellWizardClick( wxGridEvent& event );
    void OnCellWizardClick( wxGridEvent& event );
    void OnOpenButtonClick( wxCommandEvent& event );
    void OnOpenButtonClick( wxCommandEvent& event );
	void OnCancelClick( wxCommandEvent& event );
};
};


#endif  // _DIALOG_FOOTPRINT_WIZARD_LIST_H_
#endif  // _DIALOG_FOOTPRINT_WIZARD_LIST_H_
+12 −5
Original line number Original line Diff line number Diff line
@@ -51,9 +51,14 @@ DIALOG_FOOTPRINT_WIZARD_LIST_BASE::DIALOG_FOOTPRINT_WIZARD_LIST_BASE( wxWindow*
	
	
	bSizerMain->Add( m_footprintWizardsGrid, 1, wxALL|wxEXPAND, 5 );
	bSizerMain->Add( m_footprintWizardsGrid, 1, wxALL|wxEXPAND, 5 );
	
	
	m_btOpen = new wxButton( this, wxID_ANY, _("Open"), wxDefaultPosition, wxDefaultSize, 0 );
	m_sdbSizer = new wxStdDialogButtonSizer();
	m_btOpen->SetDefault(); 
	m_sdbSizerOK = new wxButton( this, wxID_OK );
	bSizerMain->Add( m_btOpen, 0, wxALIGN_CENTER|wxALL, 5 );
	m_sdbSizer->AddButton( m_sdbSizerOK );
	m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer->AddButton( m_sdbSizerCancel );
	m_sdbSizer->Realize();
	
	bSizerMain->Add( m_sdbSizer, 0, wxEXPAND, 5 );
	
	
	
	
	this->SetSizer( bSizerMain );
	this->SetSizer( bSizerMain );
@@ -63,13 +68,15 @@ DIALOG_FOOTPRINT_WIZARD_LIST_BASE::DIALOG_FOOTPRINT_WIZARD_LIST_BASE( wxWindow*
	
	
	// Connect Events
	// Connect Events
	m_footprintWizardsGrid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnCellWizardClick ), NULL, this );
	m_footprintWizardsGrid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnCellWizardClick ), NULL, this );
	m_btOpen->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnOpenButtonClick ), NULL, this );
	m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnCancelClick ), NULL, this );
	m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnOpenButtonClick ), NULL, this );
}
}


DIALOG_FOOTPRINT_WIZARD_LIST_BASE::~DIALOG_FOOTPRINT_WIZARD_LIST_BASE()
DIALOG_FOOTPRINT_WIZARD_LIST_BASE::~DIALOG_FOOTPRINT_WIZARD_LIST_BASE()
{
{
	// Disconnect Events
	// Disconnect Events
	m_footprintWizardsGrid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnCellWizardClick ), NULL, this );
	m_footprintWizardsGrid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnCellWizardClick ), NULL, this );
	m_btOpen->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnOpenButtonClick ), NULL, this );
	m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnCancelClick ), NULL, this );
	m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnOpenButtonClick ), NULL, this );
	
	
}
}
+5 −2
Original line number Original line Diff line number Diff line
@@ -20,8 +20,8 @@ class DIALOG_SHIM;
#include <wx/font.h>
#include <wx/font.h>
#include <wx/grid.h>
#include <wx/grid.h>
#include <wx/gdicmn.h>
#include <wx/gdicmn.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/sizer.h>
#include <wx/button.h>
#include <wx/dialog.h>
#include <wx/dialog.h>


///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
@@ -36,10 +36,13 @@ class DIALOG_FOOTPRINT_WIZARD_LIST_BASE : public DIALOG_SHIM
	
	
	protected:
	protected:
		wxGrid* m_footprintWizardsGrid;
		wxGrid* m_footprintWizardsGrid;
		wxButton* m_btOpen;
		wxStdDialogButtonSizer* m_sdbSizer;
		wxButton* m_sdbSizerOK;
		wxButton* m_sdbSizerCancel;
		
		
		// Virtual event handlers, overide them in your derived class
		// Virtual event handlers, overide them in your derived class
		virtual void OnCellWizardClick( wxGridEvent& event ) { event.Skip(); }
		virtual void OnCellWizardClick( wxGridEvent& event ) { event.Skip(); }
		virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnOpenButtonClick( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnOpenButtonClick( wxCommandEvent& event ) { event.Skip(); }
		
		
	
	
Loading