Commit 0b6d1bbc authored by Wayne Stambaugh's avatar Wayne Stambaugh
Browse files

Minor dialog improvements.

* Make generate button the default in Eeschema netlist dialog.
* Fix spacing issues in export IDF dialog.
* Make OK button the default in export IDF dialog.
* Remove unnecessary end dialog code from export IDF dialog.
* Improve resizing of export IDF dialog.
parent 670df702
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
/*
 * 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 <stambaughw@verizon.net>
 * 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 <stambaughw@verizon.net>
 * 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();
+8 −12
Original line number Diff line number Diff line
@@ -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();
    }
+9 −6
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
// 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 );
}
+17 −7
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
    <FileVersion major="1" minor="11" />
    <FileVersion major="1" minor="13" />
    <object class="Project" expanded="1">
        <property name="class_decoration"></property>
        <property name="code_generation">C++</property>
@@ -44,7 +44,7 @@
            <property name="minimum_size"></property>
            <property name="name">DIALOG_EXPORT_IDF3_BASE</property>
            <property name="pos"></property>
            <property name="size">424,191</property>
            <property name="size">-1,-1</property>
            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
            <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
            <property name="title">Export IDFv3</property>
@@ -89,13 +89,13 @@
            <event name="OnSize"></event>
            <event name="OnUpdateUI"></event>
            <object class="wxBoxSizer" expanded="1">
                <property name="minimum_size">500,-1</property>
                <property name="minimum_size">-1,-1</property>
                <property name="name">bSizerIDFFile</property>
                <property name="orient">wxVERTICAL</property>
                <property name="permission">none</property>
                <object class="sizeritem" expanded="1">
                    <property name="border">5</property>
                    <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
                    <property name="flag">wxBOTTOM|wxLEFT|wxRIGHT|wxTOP</property>
                    <property name="proportion">0</property>
                    <object class="wxStaticText" expanded="1">
                        <property name="BottomDockable">1</property>
@@ -125,7 +125,7 @@
                        <property name="gripper">0</property>
                        <property name="hidden">0</property>
                        <property name="id">wxID_ANY</property>
                        <property name="label">IDF board file</property>
                        <property name="label">File name:</property>
                        <property name="max_size"></property>
                        <property name="maximize_button">0</property>
                        <property name="maximum_size"></property>
@@ -298,7 +298,7 @@
                        <property name="gripper">0</property>
                        <property name="hidden">0</property>
                        <property name="id">wxID_ANY</property>
                        <property name="label">IDF File Units</property>
                        <property name="label">Units</property>
                        <property name="majorDimension">1</property>
                        <property name="max_size"></property>
                        <property name="maximize_button">0</property>
@@ -355,6 +355,16 @@
                        <event name="OnUpdateUI"></event>
                    </object>
                </object>
                <object class="sizeritem" expanded="1">
                    <property name="border">5</property>
                    <property name="flag"></property>
                    <property name="proportion">1</property>
                    <object class="spacer" expanded="1">
                        <property name="height">0</property>
                        <property name="permission">protected</property>
                        <property name="width">0</property>
                    </object>
                </object>
                <object class="sizeritem" expanded="1">
                    <property name="border">5</property>
                    <property name="flag">wxEXPAND | wxALL</property>
@@ -438,7 +448,7 @@
                </object>
                <object class="sizeritem" expanded="1">
                    <property name="border">5</property>
                    <property name="flag">wxALIGN_RIGHT</property>
                    <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
                    <property name="proportion">0</property>
                    <object class="wxStdDialogButtonSizer" expanded="1">
                        <property name="Apply">0</property>
+2 −2
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
// 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();
	
};