diff --git a/eeschema/dialogs/dialog_netlist.cpp b/eeschema/dialogs/dialog_netlist.cpp index 7528c0f942..a47f7f0df9 100644 --- a/eeschema/dialogs/dialog_netlist.cpp +++ b/eeschema/dialogs/dialog_netlist.cpp @@ -1,9 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras@wanadoo.fr - * Copyright (C) 2013 Wayne Stambaugh - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013-2015 Jean-Pierre Charras, jp.charras@wanadoo.fr + * Copyright (C) 2013-2015 Wayne Stambaugh + * Copyright (C) 1992-2015 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 @@ -342,6 +342,7 @@ NETLIST_DIALOG::NETLIST_DIALOG( SCH_EDIT_FRAME* parent ) : // Add custom panels: InstallCustomPages(); + SetDefaultItem( m_buttonNetlist ); GetSizer()->SetSizeHints( this ); Centre(); diff --git a/pcbnew/dialogs/dialog_export_idf.cpp b/pcbnew/dialogs/dialog_export_idf.cpp index 9e3d14d8c0..b2631f677d 100644 --- a/pcbnew/dialogs/dialog_export_idf.cpp +++ b/pcbnew/dialogs/dialog_export_idf.cpp @@ -5,7 +5,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Cirilo Bernardo + * Copyright (C) 2013-2015 Cirilo Bernardo * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -46,15 +46,6 @@ private: wxConfigBase* m_config; bool m_idfThouOpt; // remember last preference for units in THOU - void OnCancelClick( wxCommandEvent& event ) - { - EndModal( wxID_CANCEL ); - } - void OnOkClick( wxCommandEvent& event ) - { - EndModal( wxID_OK ); - } - public: DIALOG_EXPORT_IDF3( PCB_EDIT_FRAME* parent ) : DIALOG_EXPORT_IDF3_BASE( parent ) @@ -66,6 +57,11 @@ public: m_config->Read( OPTKEY_IDF_THOU, &m_idfThouOpt ); m_rbUnitSelection->SetSelection( m_idfThouOpt ? 1 : 0 ); + wxWindow* button = FindWindowByLabel( wxT( "OK" ) ); + + if( button ) + SetDefaultItem( button ); + GetSizer()->SetSizeHints( this ); Centre(); } @@ -112,9 +108,9 @@ void PCB_EDIT_FRAME::ExportToIDF3( wxCommandEvent& event ) wxString fullFilename = dlg.FilePicker()->GetPath(); - if ( !Export_IDF3( GetBoard(), fullFilename, thou ) ) + if( !Export_IDF3( GetBoard(), fullFilename, thou ) ) { - wxString msg = _("Unable to create ") + fullFilename; + wxString msg = _( "Unable to create " ) + fullFilename; wxMessageBox( msg ); return; } diff --git a/pcbnew/dialogs/dialog_export_idf_base.cpp b/pcbnew/dialogs/dialog_export_idf_base.cpp index 9282b37c21..ba8cbcab95 100644 --- a/pcbnew/dialogs/dialog_export_idf_base.cpp +++ b/pcbnew/dialogs/dialog_export_idf_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 6 2013) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -16,20 +16,22 @@ DIALOG_EXPORT_IDF3_BASE::DIALOG_EXPORT_IDF3_BASE( wxWindow* parent, wxWindowID i wxBoxSizer* bSizerIDFFile; bSizerIDFFile = new wxBoxSizer( wxVERTICAL ); - bSizerIDFFile->SetMinSize( wxSize( 500,-1 ) ); - m_txtBrdFile = new wxStaticText( this, wxID_ANY, _("IDF board file"), wxDefaultPosition, wxDefaultSize, 0 ); + m_txtBrdFile = new wxStaticText( this, wxID_ANY, _("File name:"), wxDefaultPosition, wxDefaultSize, 0 ); m_txtBrdFile->Wrap( -1 ); - bSizerIDFFile->Add( m_txtBrdFile, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizerIDFFile->Add( m_txtBrdFile, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxTOP, 5 ); m_filePickerIDF = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select an IDF export filename"), wxT("*.emn"), wxDefaultPosition, wxSize( 450,-1 ), wxFLP_OVERWRITE_PROMPT|wxFLP_SAVE|wxFLP_USE_TEXTCTRL ); bSizerIDFFile->Add( m_filePickerIDF, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxString m_rbUnitSelectionChoices[] = { _("Millimeters"), _("Mils") }; int m_rbUnitSelectionNChoices = sizeof( m_rbUnitSelectionChoices ) / sizeof( wxString ); - m_rbUnitSelection = new wxRadioBox( this, wxID_ANY, _("IDF File Units"), wxDefaultPosition, wxDefaultSize, m_rbUnitSelectionNChoices, m_rbUnitSelectionChoices, 1, wxRA_SPECIFY_COLS ); + m_rbUnitSelection = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_rbUnitSelectionNChoices, m_rbUnitSelectionChoices, 1, wxRA_SPECIFY_COLS ); m_rbUnitSelection->SetSelection( 0 ); bSizerIDFFile->Add( m_rbUnitSelection, 0, wxALL, 5 ); + + bSizerIDFFile->Add( 0, 0, 1, 0, 5 ); + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizerIDFFile->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); @@ -40,11 +42,12 @@ DIALOG_EXPORT_IDF3_BASE::DIALOG_EXPORT_IDF3_BASE( wxWindow* parent, wxWindowID i m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); m_sdbSizer1->Realize(); - bSizerIDFFile->Add( m_sdbSizer1, 0, wxALIGN_RIGHT, 5 ); + bSizerIDFFile->Add( m_sdbSizer1, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); this->SetSizer( bSizerIDFFile ); this->Layout(); + bSizerIDFFile->Fit( this ); this->Centre( wxBOTH ); } diff --git a/pcbnew/dialogs/dialog_export_idf_base.fbp b/pcbnew/dialogs/dialog_export_idf_base.fbp index 964a8cc5e3..434d92339d 100644 --- a/pcbnew/dialogs/dialog_export_idf_base.fbp +++ b/pcbnew/dialogs/dialog_export_idf_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -44,7 +44,7 @@ DIALOG_EXPORT_IDF3_BASE - 424,191 + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Export IDFv3 @@ -89,13 +89,13 @@ - 500,-1 + -1,-1 bSizerIDFFile wxVERTICAL none 5 - wxTOP|wxRIGHT|wxLEFT + wxBOTTOM|wxLEFT|wxRIGHT|wxTOP 0 1 @@ -125,7 +125,7 @@ 0 0 wxID_ANY - IDF board file + File name: 0 @@ -298,7 +298,7 @@ 0 0 wxID_ANY - IDF File Units + Units 1 0 @@ -355,6 +355,16 @@ + + 5 + + 1 + + 0 + protected + 0 + + 5 wxEXPAND | wxALL @@ -438,7 +448,7 @@ 5 - wxALIGN_RIGHT + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT 0 0 diff --git a/pcbnew/dialogs/dialog_export_idf_base.h b/pcbnew/dialogs/dialog_export_idf_base.h index 722bfcad31..8a67803936 100644 --- a/pcbnew/dialogs/dialog_export_idf_base.h +++ b/pcbnew/dialogs/dialog_export_idf_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 6 2013) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -47,7 +47,7 @@ class DIALOG_EXPORT_IDF3_BASE : public DIALOG_SHIM public: - DIALOG_EXPORT_IDF3_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Export IDFv3"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 424,191 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_EXPORT_IDF3_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Export IDFv3"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_EXPORT_IDF3_BASE(); };