Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
This commit is contained in:
parent
84a9732497
commit
c3552a940a
|
@ -637,3 +637,69 @@ void DIALOG_SHIM::OnGridEditorHidden( wxGridEvent& event )
|
||||||
SetEscapeId( wxID_ANY );
|
SetEscapeId( wxID_ANY );
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void recursiveDescent( wxSizer* aSizer, std::map<int, wxString>& aLabels )
|
||||||
|
{
|
||||||
|
wxStdDialogButtonSizer* sdbSizer = dynamic_cast<wxStdDialogButtonSizer*>( aSizer );
|
||||||
|
|
||||||
|
auto setupButton =
|
||||||
|
[&]( wxButton* aButton )
|
||||||
|
{
|
||||||
|
if( aLabels.count( aButton->GetId() ) > 0 )
|
||||||
|
{
|
||||||
|
aButton->SetLabel( aLabels[ aButton->GetId() ] );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// wxWidgets has an uneven track record when the language is changed on
|
||||||
|
// the fly so we set them even when they don't appear in the label map
|
||||||
|
switch( aButton->GetId() )
|
||||||
|
{
|
||||||
|
case wxID_OK: aButton->SetLabel( _( "&OK" ) ); break;
|
||||||
|
case wxID_CANCEL: aButton->SetLabel( _( "&Cancel" ) ); break;
|
||||||
|
case wxID_YES: aButton->SetLabel( _( "&Yes" ) ); break;
|
||||||
|
case wxID_NO: aButton->SetLabel( _( "&No" ) ); break;
|
||||||
|
case wxID_APPLY: aButton->SetLabel( _( "&Apply" ) ); break;
|
||||||
|
case wxID_SAVE: aButton->SetLabel( _( "&Save" ) ); break;
|
||||||
|
case wxID_HELP: aButton->SetLabel( _( "&Help" ) ); break;
|
||||||
|
case wxID_CONTEXT_HELP: aButton->SetLabel( _( "&Help" ) ); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if( sdbSizer )
|
||||||
|
{
|
||||||
|
if( sdbSizer->GetAffirmativeButton() )
|
||||||
|
setupButton( sdbSizer->GetAffirmativeButton() );
|
||||||
|
|
||||||
|
if( sdbSizer->GetApplyButton() )
|
||||||
|
setupButton( sdbSizer->GetApplyButton() );
|
||||||
|
|
||||||
|
if( sdbSizer->GetNegativeButton() )
|
||||||
|
setupButton( sdbSizer->GetNegativeButton() );
|
||||||
|
|
||||||
|
if( sdbSizer->GetCancelButton() )
|
||||||
|
setupButton( sdbSizer->GetCancelButton() );
|
||||||
|
|
||||||
|
if( sdbSizer->GetHelpButton() )
|
||||||
|
setupButton( sdbSizer->GetHelpButton() );
|
||||||
|
|
||||||
|
sdbSizer->Layout();
|
||||||
|
|
||||||
|
if( sdbSizer->GetAffirmativeButton() )
|
||||||
|
sdbSizer->GetAffirmativeButton()->SetDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
for( wxSizerItem* item : aSizer->GetChildren() )
|
||||||
|
{
|
||||||
|
if( item->GetSizer() )
|
||||||
|
recursiveDescent( item->GetSizer(), aLabels );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_SHIM::SetupStandardButtons( std::map<int, wxString> aLabels )
|
||||||
|
{
|
||||||
|
recursiveDescent( GetSizer(), aLabels );
|
||||||
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER( wxWindow* aParent, const COLOR4D& aCur
|
||||||
if( aDefaultColor == COLOR4D::UNSPECIFIED )
|
if( aDefaultColor == COLOR4D::UNSPECIFIED )
|
||||||
m_resetToDefault->SetLabel( _( "Clear Color" ) );
|
m_resetToDefault->SetLabel( _( "Clear Color" ) );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS( wxWindow* aParent, FILENAME_RESO
|
||||||
m_sb3DSearchPaths->Show( false );
|
m_sb3DSearchPaths->Show( false );
|
||||||
|
|
||||||
SetInitialFocus( m_EnvVars );
|
SetInitialFocus( m_EnvVars );
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// wxFormBuilder doesn't include this event...
|
// wxFormBuilder doesn't include this event...
|
||||||
m_EnvVars->Connect( wxEVT_GRID_CELL_CHANGING,
|
m_EnvVars->Connect( wxEVT_GRID_CELL_CHANGING,
|
||||||
|
|
|
@ -55,7 +55,7 @@ void DIALOG_EDIT_LIBRARY_TABLES::InstallPanel( wxPanel* aPanel )
|
||||||
|
|
||||||
mainSizer->Add( sdbSizer, 0, wxALL|wxEXPAND, 5 );
|
mainSizer->Add( sdbSizer, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
||||||
|
|
|
@ -71,10 +71,7 @@ DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG( wxWindow* aParen
|
||||||
wxUpdateUIEventHandler( DIALOG_GLOBAL_LIB_TABLE_CONFIG::onUpdateFilePicker ),
|
wxUpdateUIEventHandler( DIALOG_GLOBAL_LIB_TABLE_CONFIG::onUpdateFilePicker ),
|
||||||
nullptr, this );
|
nullptr, this );
|
||||||
|
|
||||||
wxButton* okButton = (wxButton *) FindWindowById( wxID_OK );
|
SetupStandardButtons();
|
||||||
|
|
||||||
if( okButton )
|
|
||||||
okButton->SetDefault();
|
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS( EDA_DRAW_FRAME* aParent ):
|
||||||
m_book->SetSelection( 0 );
|
m_book->SetSelection( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault(); // set OK button as default response to 'Enter' key
|
SetupStandardButtons();
|
||||||
SetInitialFocus( m_GridOriginXCtrl );
|
SetInitialFocus( m_GridOriginXCtrl );
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
|
|
|
@ -39,8 +39,9 @@ DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem
|
||||||
msg.Printf( wxT( "%f" ), m_workingImage->GetScale() );
|
msg.Printf( wxT( "%f" ), m_workingImage->GetScale() );
|
||||||
m_textCtrlScale->SetValue( msg );
|
m_textCtrlScale->SetValue( msg );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,11 @@ DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY( wxWindow* aParent, int aLo
|
||||||
|
|
||||||
m_messageLine1->SetLabel( wxString::Format( m_messageLine1->GetLabel(), aLockedItemCount ) );
|
m_messageLine1->SetLabel( wxString::Format( m_messageLine1->GetLabel(), aLockedItemCount ) );
|
||||||
|
|
||||||
m_sdbSizerOK->SetLabel( _( "Skip Locked Items" ) );
|
SetupStandardButtons( { { wxID_OK, _( "Skip Locked Items" ) } } );
|
||||||
m_sdbSizerOK->SetToolTip( _( "Remove locked items from the selection and only apply the "
|
m_sdbSizerOK->SetToolTip( _( "Remove locked items from the selection and only apply the "
|
||||||
"operation to the unlocked items (if any)." ) );
|
"operation to the unlocked items (if any)." ) );
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
m_sdbSizerOK->SetFocus();
|
SetInitialFocus( m_sdbSizerOK );
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,8 @@ DIALOG_MIGRATE_SETTINGS::DIALOG_MIGRATE_SETTINGS( SETTINGS_MANAGER* aManager ) :
|
||||||
// Disabled for now. See https://gitlab.com/kicad/code/kicad/-/issues/9826
|
// Disabled for now. See https://gitlab.com/kicad/code/kicad/-/issues/9826
|
||||||
m_cbCopyLibraryTables->Hide();
|
m_cbCopyLibraryTables->Hide();
|
||||||
|
|
||||||
m_standardButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
Centre();
|
Centre();
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,8 @@ DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* aParent, double aI
|
||||||
m_staticTextTitleBlock->SetLabel( _( "Title Block" ) );
|
m_staticTextTitleBlock->SetLabel( _( "Title Block" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
Centre();
|
Centre();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,8 +199,6 @@ bool DIALOG_PAGES_SETTINGS::TransferDataToWindow()
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
|
|
||||||
// Make the OK button the default.
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -42,14 +42,9 @@ DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC( EDA_DRAW_FRAME* aParent, PRINTOUT_SE
|
||||||
m_scaleValidator.SetRange( 0.0, MAX_SCALE );
|
m_scaleValidator.SetRange( 0.0, MAX_SCALE );
|
||||||
m_scaleCustomText->SetValidator( m_scaleValidator );
|
m_scaleCustomText->SetValidator( m_scaleValidator );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Print" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_APPLY, _( "Print Preview" ) },
|
||||||
m_sdbSizer1OK->SetLabel( _( "Print" ) );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer1Apply->SetLabel( _( "Print Preview" ) );
|
|
||||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sdbSizer1->Layout();
|
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
|
|
||||||
#if defined(__WXMAC__) or defined(__WXGTK__)
|
#if defined(__WXMAC__) or defined(__WXGTK__)
|
||||||
// Preview does not work well on GTK or Mac,
|
// Preview does not work well on GTK or Mac,
|
||||||
|
|
|
@ -33,8 +33,9 @@ WX_TEXT_ENTRY_DIALOG::WX_TEXT_ENTRY_DIALOG( wxWindow* aParent,
|
||||||
m_label->SetLabel( aFieldLabel );
|
m_label->SetLabel( aFieldLabel );
|
||||||
m_textCtrl->SetValue( aDefaultValue );
|
m_textCtrl->SetValue( aDefaultValue );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
SetInitialFocus( m_textCtrl );
|
SetInitialFocus( m_textCtrl );
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,8 @@ WX_UNIT_ENTRY_DIALOG::WX_UNIT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxStr
|
||||||
{
|
{
|
||||||
m_label->SetLabel( aLabel );
|
m_label->SetLabel( aLabel );
|
||||||
m_unit_binder.SetValue( aDefaultValue );
|
m_unit_binder.SetValue( aDefaultValue );
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
|
SetupStandardButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ EDA_LIST_DIALOG::EDA_LIST_DIALOG( wxWindow* aParent, const wxString& aTitle,
|
||||||
// columns, different column names, and column widths.
|
// columns, different column names, and column widths.
|
||||||
m_hash_key = TO_UTF8( aTitle );
|
m_hash_key = TO_UTF8( aTitle );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// this line fixes an issue on Linux Ubuntu using Unity (dialog not shown),
|
// this line fixes an issue on Linux Ubuntu using Unity (dialog not shown),
|
||||||
// and works fine on all systems
|
// and works fine on all systems
|
||||||
|
|
|
@ -42,7 +42,7 @@ HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* aParent, const wxString& aTitle,
|
||||||
|
|
||||||
Center();
|
Center();
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
reload();
|
reload();
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ PAGED_DIALOG::PAGED_DIALOG( wxWindow* aParent, const wxString& aTitle, bool aSho
|
||||||
m_buttonsSizer->Add( sdbSizer, 1, 0, 5 );
|
m_buttonsSizer->Add( sdbSizer, 1, 0, 5 );
|
||||||
mainSizer->Add( m_buttonsSizer, 0, wxALL|wxEXPAND, 5 );
|
mainSizer->Add( m_buttonsSizer, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// We normally save the dialog size and position based on its class-name. This class
|
// We normally save the dialog size and position based on its class-name. This class
|
||||||
// substitutes the title so that each distinctly-titled dialog can have its own saved
|
// substitutes the title so that each distinctly-titled dialog can have its own saved
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#include <wx/dcclient.h>
|
#include <wx/dcclient.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
|
|
||||||
WX_PANEL::WX_PANEL( wxWindow* parent, wxWindowID id, const wxPoint& pos,
|
WX_PANEL::WX_PANEL( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
|
||||||
const wxSize& size, long style, const wxString& name ) :
|
long style, const wxString& name ) :
|
||||||
wxPanel( parent, id, pos, size, style, name ),
|
wxPanel( parent, id, pos, size, style, name ),
|
||||||
m_leftBorder( false ),
|
m_leftBorder( false ),
|
||||||
m_rightBorder( false ),
|
m_rightBorder( false ),
|
||||||
|
|
|
@ -52,6 +52,8 @@ DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES( CVPCB_MAINFRAME* aParent ) :
|
||||||
|
|
||||||
Init( );
|
Init( );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
Center();
|
Center();
|
||||||
}
|
}
|
||||||
|
@ -59,7 +61,6 @@ DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES( CVPCB_MAINFRAME* aParent ) :
|
||||||
|
|
||||||
void DIALOG_CONFIG_EQUFILES::Init()
|
void DIALOG_CONFIG_EQUFILES::Init()
|
||||||
{
|
{
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
m_ListChanged = false;
|
m_ListChanged = false;
|
||||||
|
|
||||||
PROJECT_FILE& project = Prj().GetProjectFile();
|
PROJECT_FILE& project = Prj().GetProjectFile();
|
||||||
|
@ -90,7 +91,6 @@ void DIALOG_CONFIG_EQUFILES::Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_gridEnvVars->AutoSizeColumns();
|
m_gridEnvVars->AutoSizeColumns();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,13 +87,8 @@ DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, const wxString& messag
|
||||||
m_MessageWindow->SetLabel( _( "Annotation Messages:" ) );
|
m_MessageWindow->SetLabel( _( "Annotation Messages:" ) );
|
||||||
m_MessageWindow->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
|
m_MessageWindow->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Annotate" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer1OK->SetLabel( _( "Annotate" ) );
|
|
||||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sdbSizer1->Layout();
|
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
|
|
||||||
InitValues();
|
InitValues();
|
||||||
Layout();
|
Layout();
|
||||||
|
@ -215,6 +210,7 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event )
|
||||||
m_Parent->GetCanvas()->Refresh();
|
m_Parent->GetCanvas()->Refresh();
|
||||||
|
|
||||||
m_btnClear->Enable();
|
m_btnClear->Enable();
|
||||||
|
|
||||||
m_sdbSizer1Cancel->SetDefault();
|
m_sdbSizer1Cancel->SetDefault();
|
||||||
|
|
||||||
// Don't close dialog if there are things the user needs to address
|
// Don't close dialog if there are things the user needs to address
|
||||||
|
|
|
@ -130,12 +130,10 @@ DIALOG_BOM::DIALOG_BOM( SCH_EDIT_FRAME* parent ) :
|
||||||
m_checkBoxShowConsole->Show( false );
|
m_checkBoxShowConsole->Show( false );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_sdbSizerOK->SetLabel( _( "Generate" ) );
|
SetupStandardButtons( { { wxID_OK, _( "Generate" ) },
|
||||||
m_sdbSizerCancel->SetLabel( _( "Close" ) );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer->Layout();
|
|
||||||
|
|
||||||
SetInitialFocus( m_lbGenerators );
|
SetInitialFocus( m_lbGenerators );
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -180,8 +180,9 @@ DIALOG_BUS_MANAGER::DIALOG_BUS_MANAGER( SCH_EDIT_FRAME* aParent )
|
||||||
m_bus_edit->SetHint( _( "Bus Alias Name" ) );
|
m_bus_edit->SetHint( _( "Bus Alias Name" ) );
|
||||||
m_signal_edit->SetHint( _( "Net or Bus Name" ) );
|
m_signal_edit->SetHint( _( "Net or Bus Name" ) );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
okButton->SetDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -151,16 +151,10 @@ DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS( SCH_EDIT_FRAME* aParent, SCH_SYMBO
|
||||||
// because the update and change versions of this dialog have different controls.
|
// because the update and change versions of this dialog have different controls.
|
||||||
m_hash_key = TO_UTF8( GetTitle() );
|
m_hash_key = TO_UTF8( GetTitle() );
|
||||||
|
|
||||||
// Ensure m_closeButton (with id = wxID_CANCEL) has the right label
|
wxString okLabel = m_mode == MODE::CHANGE ? _( "Change" ) : _( "Update" );
|
||||||
// (to fix automatic renaming of button label )
|
|
||||||
m_sdbSizerCancel->SetLabel( _( "Close" ) );
|
|
||||||
|
|
||||||
if( m_mode == MODE::CHANGE )
|
SetupStandardButtons( { { wxID_OK, okLabel },
|
||||||
m_sdbSizerOK->SetLabel( _( "Change" ) );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
else
|
|
||||||
m_sdbSizerOK->SetLabel( _( "Update" ) );
|
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -197,7 +197,7 @@ DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL( SCH_BASE_FRAME* aParent, const wxStr
|
||||||
}
|
}
|
||||||
|
|
||||||
SetInitialFocus( m_tree->GetFocusTarget() );
|
SetInitialFocus( m_tree->GetFocusTarget() );
|
||||||
okButton->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
Bind( wxEVT_INIT_DIALOG, &DIALOG_CHOOSE_SYMBOL::OnInitDialog, this );
|
Bind( wxEVT_INIT_DIALOG, &DIALOG_CHOOSE_SYMBOL::OnInitDialog, this );
|
||||||
Bind( wxEVT_TIMER, &DIALOG_CHOOSE_SYMBOL::OnCloseTimer, this, m_dbl_click_timer->GetId() );
|
Bind( wxEVT_TIMER, &DIALOG_CHOOSE_SYMBOL::OnCloseTimer, this, m_dbl_click_timer->GetId() );
|
||||||
|
|
|
@ -73,13 +73,8 @@ DIALOG_ERC::DIALOG_ERC( SCH_EDIT_FRAME* parent ) :
|
||||||
syncCheckboxes();
|
syncCheckboxes();
|
||||||
updateDisplayedCounts();
|
updateDisplayedCounts();
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Run ERC" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer1OK->SetLabel( _( "Run ERC" ) );
|
|
||||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sdbSizer1->Layout();
|
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
|
|
||||||
m_errorsBadge->SetMaximumNumber( 999 );
|
m_errorsBadge->SetMaximumNumber( 999 );
|
||||||
m_warningsBadge->SetMaximumNumber( 999 );
|
m_warningsBadge->SetMaximumNumber( 999 );
|
||||||
|
|
|
@ -183,8 +183,6 @@ void DIALOG_FIELD_PROPERTIES::init()
|
||||||
m_TextCtrl->Enable( true );
|
m_TextCtrl->Enable( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sdbSizerButtonsOK->SetDefault();
|
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
|
|
||||||
// Adjust the height of the scintilla text editor after the first layout
|
// Adjust the height of the scintilla text editor after the first layout
|
||||||
|
@ -200,6 +198,8 @@ void DIALOG_FIELD_PROPERTIES::init()
|
||||||
m_StyledTextCtrl->SetUseHorizontalScrollBar( false );
|
m_StyledTextCtrl->SetUseHorizontalScrollBar( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS( SCH_
|
||||||
m_dotColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
|
m_dotColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
|
||||||
m_dotColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
m_dotColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
m_sdbSizerButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,6 @@ DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS( SCH_EDIT_FRAME* aParent,
|
||||||
m_diameter( aParent, m_staticTextDiameter, m_textCtrlDiameter,
|
m_diameter( aParent, m_staticTextDiameter, m_textCtrlDiameter,
|
||||||
m_staticTextDiameterUnits, true )
|
m_staticTextDiameterUnits, true )
|
||||||
{
|
{
|
||||||
m_sdbSizerApply->SetLabel( _( "Default" ) );
|
|
||||||
|
|
||||||
m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
m_helpLabel1->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
m_helpLabel1->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||||
|
@ -42,7 +40,7 @@ DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS( SCH_EDIT_FRAME* aParent,
|
||||||
|
|
||||||
SetInitialFocus( m_textCtrlDiameter );
|
SetInitialFocus( m_textCtrlDiameter );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons( { { wxID_APPLY, _( "Default" ) } } );
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -179,7 +179,7 @@ DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_L
|
||||||
m_spin3->SetBitmap( KiBitmap( BITMAPS::text_align_top ) );
|
m_spin3->SetBitmap( KiBitmap( BITMAPS::text_align_top ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// DIALOG_SHIM needs a unique hash_key because classname is not sufficient because the
|
// DIALOG_SHIM needs a unique hash_key because classname is not sufficient because the
|
||||||
// various versions have different controls so we want to store sizes for each version.
|
// various versions have different controls so we want to store sizes for each version.
|
||||||
|
|
|
@ -509,18 +509,15 @@ DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE( SYMBOL_EDIT_FRAME* parent,
|
||||||
GetSizer()->SetSizeHints(this);
|
GetSizer()->SetSizeHints(this);
|
||||||
Centre();
|
Centre();
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
if( !parent->IsSymbolEditable() || parent->IsSymbolAlias() )
|
if( !parent->IsSymbolEditable() || parent->IsSymbolAlias() )
|
||||||
{
|
{
|
||||||
m_ButtonsCancel->SetDefault();
|
m_ButtonsCancel->SetDefault();
|
||||||
m_ButtonsOK->SetLabel( _( "Read Only" ) );
|
m_ButtonsOK->SetLabel( _( "Read Only" ) );
|
||||||
m_ButtonsOK->Enable( false );
|
m_ButtonsOK->Enable( false );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
m_ButtonsOK->SetDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_ButtonsOK->SetDefault();
|
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
m_modified = false;
|
m_modified = false;
|
||||||
m_width = 0;
|
m_width = 0;
|
||||||
|
|
|
@ -52,8 +52,7 @@ DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL( EDA_DRAW_FRAME* aParent,
|
||||||
// initial focus should be on first editable field.
|
// initial focus should be on first editable field.
|
||||||
m_textName->SetFocus();
|
m_textName->SetFocus();
|
||||||
|
|
||||||
// What happens when user presses "Enter"? OK button! OK?
|
SetupStandardButtons();
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -42,16 +42,14 @@ DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES( SYMBOL_EDIT_FRAME* aPa
|
||||||
// Required under wxGTK if we want to dismiss the dialog with the ESC key
|
// Required under wxGTK if we want to dismiss the dialog with the ESC key
|
||||||
SetFocus();
|
SetFocus();
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
if( !aParent->IsSymbolEditable() || aParent->IsSymbolAlias() )
|
if( !aParent->IsSymbolEditable() || aParent->IsSymbolAlias() )
|
||||||
{
|
{
|
||||||
m_sdbSizerCancel->SetDefault();
|
m_sdbSizerCancel->SetDefault();
|
||||||
m_sdbSizerOK->SetLabel( _( "Read Only" ) );
|
m_sdbSizerOK->SetLabel( _( "Read Only" ) );
|
||||||
m_sdbSizerOK->Enable( false );
|
m_sdbSizerOK->Enable( false );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -86,16 +86,14 @@ DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES( SYMBOL_EDIT_FRAME* a
|
||||||
m_deleteFilterButton->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
m_deleteFilterButton->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
||||||
m_editFilterButton->SetBitmap( KiBitmap( BITMAPS::small_edit ) );
|
m_editFilterButton->SetBitmap( KiBitmap( BITMAPS::small_edit ) );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
if( aParent->IsSymbolFromLegacyLibrary() && !aParent->IsSymbolFromSchematic() )
|
if( aParent->IsSymbolFromLegacyLibrary() && !aParent->IsSymbolFromSchematic() )
|
||||||
{
|
{
|
||||||
m_stdSizerButtonCancel->SetDefault();
|
m_stdSizerButtonCancel->SetDefault();
|
||||||
m_stdSizerButtonOK->SetLabel( _( "Read Only" ) );
|
m_stdSizerButtonOK->SetLabel( _( "Read Only" ) );
|
||||||
m_stdSizerButtonOK->Enable( false );
|
m_stdSizerButtonOK->Enable( false );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
m_stdSizerButtonOK->SetDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef KICAD_SPICE
|
#ifndef KICAD_SPICE
|
||||||
m_spiceFieldsButton->Hide();
|
m_spiceFieldsButton->Hide();
|
||||||
|
|
|
@ -58,17 +58,6 @@ DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES( SYMBOL_EDIT_FRAME* aPare
|
||||||
SetInitialFocus( m_TextCtrl );
|
SetInitialFocus( m_TextCtrl );
|
||||||
m_StyledTextCtrl->Show( false );
|
m_StyledTextCtrl->Show( false );
|
||||||
|
|
||||||
if( !aParent->IsSymbolEditable() || aParent->IsSymbolAlias() )
|
|
||||||
{
|
|
||||||
m_sdbSizerButtonsCancel->SetDefault();
|
|
||||||
m_sdbSizerButtonsOK->SetLabel( _( "Read Only" ) );
|
|
||||||
m_sdbSizerButtonsOK->Enable( false );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_sdbSizerButtonsOK->SetDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_separator1->SetIsSeparator();
|
m_separator1->SetIsSeparator();
|
||||||
|
|
||||||
m_horizontal->SetIsCheckButton();
|
m_horizontal->SetIsCheckButton();
|
||||||
|
@ -114,6 +103,15 @@ DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES( SYMBOL_EDIT_FRAME* aPare
|
||||||
m_vAlignCenter->Bind( wxEVT_BUTTON, &DIALOG_LIB_TEXT_PROPERTIES::onVAlignButton, this );
|
m_vAlignCenter->Bind( wxEVT_BUTTON, &DIALOG_LIB_TEXT_PROPERTIES::onVAlignButton, this );
|
||||||
m_vAlignBottom->Bind( wxEVT_BUTTON, &DIALOG_LIB_TEXT_PROPERTIES::onVAlignButton, this );
|
m_vAlignBottom->Bind( wxEVT_BUTTON, &DIALOG_LIB_TEXT_PROPERTIES::onVAlignButton, this );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
|
if( !aParent->IsSymbolEditable() || aParent->IsSymbolAlias() )
|
||||||
|
{
|
||||||
|
m_sdbSizerButtonsCancel->SetDefault();
|
||||||
|
m_sdbSizerButtonsOK->SetLabel( _( "Read Only" ) );
|
||||||
|
m_sdbSizerButtonsOK->Enable( false );
|
||||||
|
}
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,6 @@ DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES( SCH_EDIT_FRAME
|
||||||
m_strokeItems( aItems ),
|
m_strokeItems( aItems ),
|
||||||
m_width( aParent, m_staticTextWidth, m_lineWidth, m_staticWidthUnits, true )
|
m_width( aParent, m_staticTextWidth, m_lineWidth, m_staticWidthUnits, true )
|
||||||
{
|
{
|
||||||
m_sdbSizerApply->SetLabel( _( "Default" ) );
|
|
||||||
|
|
||||||
m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
m_helpLabel1->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
m_helpLabel1->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||||
|
@ -52,7 +50,7 @@ DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES( SCH_EDIT_FRAME
|
||||||
|
|
||||||
m_typeCombo->Append( DEFAULT_STYLE );
|
m_typeCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons( { { wxID_APPLY, _( "Default" ) } } );
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -264,12 +264,8 @@ NETLIST_DIALOG::NETLIST_DIALOG( SCH_EDIT_FRAME* parent ) :
|
||||||
InstallPageSpice();
|
InstallPageSpice();
|
||||||
InstallCustomPages();
|
InstallCustomPages();
|
||||||
|
|
||||||
// We use a sdbSizer here to get the order right, which is platform-dependent
|
SetupStandardButtons( { { wxID_OK, _( "Export Netlist" ) },
|
||||||
m_sdbSizer2OK->SetLabel( _( "Export Netlist" ) );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer2Cancel->SetLabel( _( "Close" ) );
|
|
||||||
m_buttonSizer->Layout();
|
|
||||||
|
|
||||||
m_sdbSizer2OK->SetDefault();
|
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
@ -647,7 +643,7 @@ NETLIST_DIALOG_ADD_GENERATOR::NETLIST_DIALOG_ADD_GENERATOR( NETLIST_DIALOG* pare
|
||||||
NETLIST_DIALOG_ADD_GENERATOR_BASE( parent )
|
NETLIST_DIALOG_ADD_GENERATOR_BASE( parent )
|
||||||
{
|
{
|
||||||
m_Parent = parent;
|
m_Parent = parent;
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -202,8 +202,8 @@ DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, LIB_PIN
|
||||||
{
|
{
|
||||||
m_alternatesTurndown->Collapse();
|
m_alternatesTurndown->Collapse();
|
||||||
m_alternatesTurndown->Disable();
|
m_alternatesTurndown->Disable();
|
||||||
m_alternatesTurndown->SetToolTip(
|
m_alternatesTurndown->SetToolTip( _( "Alternate pin assignments are not available for "
|
||||||
_( "Alternate pin assignments are not available for De Morgan symbols." ) );
|
"De Morgan symbols." ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set special attributes
|
// Set special attributes
|
||||||
|
@ -223,7 +223,7 @@ DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, LIB_PIN
|
||||||
m_deleteAlternate->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
m_deleteAlternate->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
||||||
m_addAlternate->GetParent()->Layout();
|
m_addAlternate->GetParent()->Layout();
|
||||||
|
|
||||||
m_sdbSizerButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
SetInitialFocus( m_textPinName );
|
SetInitialFocus( m_textPinName );
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
|
|
|
@ -106,14 +106,10 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent )
|
||||||
|
|
||||||
m_MessagesBox->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
|
m_MessagesBox->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Plot All Pages" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_APPLY, _( "Plot Current Page" ) },
|
||||||
m_sdbSizer1OK->SetLabel( _( "Plot All Pages" ) );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer1Apply->SetLabel( _( "Plot Current Page" ) );
|
|
||||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sdbSizer1->Layout();
|
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
initDlg();
|
initDlg();
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
|
|
|
@ -141,20 +141,15 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( SCH_EDIT_FRAME* aParent
|
||||||
{
|
{
|
||||||
wxASSERT( aParent );
|
wxASSERT( aParent );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Print" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_APPLY, _( "Print Preview" ) },
|
||||||
m_sdbSizer1OK->SetLabel( _( "Print" ) );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer1Apply->SetLabel( _( "Preview" ) );
|
|
||||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sdbSizer1->Layout();
|
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// Problems with modal on wx-2.9 - Anyway preview is standard for OSX
|
// Problems with modal on wx-2.9 - Anyway preview is standard for OSX
|
||||||
m_sdbSizer1Apply->Hide();
|
m_sdbSizer1Apply->Hide();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault(); // on linux, this is inadequate to determine
|
|
||||||
// what ENTER does. Must also SetFocus().
|
|
||||||
m_sdbSizer1OK->SetFocus();
|
m_sdbSizer1OK->SetFocus();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -96,8 +96,6 @@ DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH( wxWindow* aParent,
|
||||||
m_previewNewWidget = new SYMBOL_PREVIEW_WIDGET( m_previewNewPanel, Kiway(), aGalBackEndType );
|
m_previewNewWidget = new SYMBOL_PREVIEW_WIDGET( m_previewNewPanel, Kiway(), aGalBackEndType );
|
||||||
m_SizerNewPanel->Add( m_previewNewWidget, 1, wxEXPAND | wxALL, 5 );
|
m_SizerNewPanel->Add( m_previewNewWidget, 1, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
m_stdButtonsOK->SetDefault();
|
|
||||||
|
|
||||||
// Set the info message, customized to include the proper suffix.
|
// Set the info message, customized to include the proper suffix.
|
||||||
wxString info =
|
wxString info =
|
||||||
_( "This schematic was made using older symbol libraries which may break the "
|
_( "This schematic was made using older symbol libraries which may break the "
|
||||||
|
@ -145,11 +143,14 @@ DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH( wxWindow* aParent,
|
||||||
|
|
||||||
// Make sure the HTML window is large enough. Some fun size juggling and
|
// Make sure the HTML window is large enough. Some fun size juggling and
|
||||||
// fudge factors here but it does seem to work pretty reliably.
|
// fudge factors here but it does seem to work pretty reliably.
|
||||||
auto info_size = m_htmlPrompt->GetTextExtent( info );
|
wxSize info_size = m_htmlPrompt->GetTextExtent( info );
|
||||||
auto prompt_size = m_htmlPrompt->GetSize();
|
wxSize prompt_size = m_htmlPrompt->GetSize();
|
||||||
auto font_size = m_htmlPrompt->GetTextExtent( "X" );
|
wxSize font_size = m_htmlPrompt->GetTextExtent( "X" );
|
||||||
auto approx_info_height = ( 2 * info_size.x / prompt_size.x ) * font_size.y;
|
int approx_info_height = ( 2 * info_size.x / prompt_size.x ) * font_size.y;
|
||||||
m_htmlPrompt->SetSizeHints( 2 * prompt_size.x / 3, approx_info_height );
|
m_htmlPrompt->SetSizeHints( 2 * prompt_size.x / 3, approx_info_height );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
setSizeInDU( 480, 360 );
|
setSizeInDU( 480, 360 );
|
||||||
|
|
|
@ -40,10 +40,7 @@ DIALOG_SCH_IMPORT_SETTINGS::DIALOG_SCH_IMPORT_SETTINGS( wxWindow* aParent, SCH_E
|
||||||
{
|
{
|
||||||
m_browseButton->SetBitmap( KiBitmap( BITMAPS::small_folder ) );
|
m_browseButton->SetBitmap( KiBitmap( BITMAPS::small_folder ) );
|
||||||
|
|
||||||
m_sdbSizer1OK->SetLabel( _( "Import Settings" ) );
|
SetupStandardButtons( { { wxID_OK, _( "Import Settings" ) } } );
|
||||||
m_buttonsSizer->Layout();
|
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,8 @@ DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_S
|
||||||
|
|
||||||
// Required under wxGTK if we want to dismiss the dialog with the ESC key
|
// Required under wxGTK if we want to dismiss the dialog with the ESC key
|
||||||
SetFocus();
|
SetFocus();
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -54,7 +54,7 @@ DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES( SCH_EDIT_FRAME* parent
|
||||||
|
|
||||||
m_choiceConnectionType->SetSelection( 0 );
|
m_choiceConnectionType->SetSelection( 0 );
|
||||||
SetInitialFocus( m_comboName );
|
SetInitialFocus( m_comboName );
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Set invalid label characters list:
|
// Set invalid label characters list:
|
||||||
SCH_NETNAME_VALIDATOR validator( true );
|
SCH_NETNAME_VALIDATOR validator( true );
|
||||||
|
|
|
@ -73,7 +73,7 @@ DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_S
|
||||||
}
|
}
|
||||||
|
|
||||||
wxToolTip::Enable( true );
|
wxToolTip::Enable( true );
|
||||||
m_stdDialogButtonSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Configure button logos
|
// Configure button logos
|
||||||
m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
||||||
|
|
|
@ -98,7 +98,7 @@ DIALOG_SIM_SETTINGS::DIALOG_SIM_SETTINGS( wxWindow* aParent,
|
||||||
if( !dynamic_cast<NGSPICE_SIMULATOR_SETTINGS*>( aSettings.get() ) )
|
if( !dynamic_cast<NGSPICE_SIMULATOR_SETTINGS*>( aSettings.get() ) )
|
||||||
m_compatibilityMode->Show( false );
|
m_compatibilityMode->Show( false );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
updateNetlistOpts();
|
updateNetlistOpts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ void DIALOG_SPICE_MODEL::Init()
|
||||||
m_pwlTimeCol = m_pwlValList->AppendColumn( "Time [s]", wxLIST_FORMAT_LEFT, 100 );
|
m_pwlTimeCol = m_pwlValList->AppendColumn( "Time [s]", wxLIST_FORMAT_LEFT, 100 );
|
||||||
m_pwlValueCol = m_pwlValList->AppendColumn( "Value [V/A]", wxLIST_FORMAT_LEFT, 100 );
|
m_pwlValueCol = m_pwlValList->AppendColumn( "Value [V/A]", wxLIST_FORMAT_LEFT, 100 );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
m_staticTextF1->SetLabel( wxS( "f" ) );
|
m_staticTextF1->SetLabel( wxS( "f" ) );
|
||||||
m_staticTextP1->SetLabel( wxS( "p" ) );
|
m_staticTextP1->SetLabel( wxS( "p" ) );
|
||||||
|
|
|
@ -810,7 +810,7 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent )
|
||||||
m_grid->SetGridCursor( 0, 1 );
|
m_grid->SetGridCursor( 0, 1 );
|
||||||
SetInitialFocus( m_grid );
|
SetInitialFocus( m_grid );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
SetSize( defaultDlgSize );
|
SetSize( defaultDlgSize );
|
||||||
|
|
|
@ -353,7 +353,7 @@ DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES( SCH_EDIT_FRAME* aParent,
|
||||||
m_pinGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
|
m_pinGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
|
||||||
|
|
||||||
wxToolTip::Enable( true );
|
wxToolTip::Enable( true );
|
||||||
m_stdDialogButtonSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Configure button logos
|
// Configure button logos
|
||||||
m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
||||||
|
|
|
@ -81,7 +81,7 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_TEX
|
||||||
|
|
||||||
m_separator3->SetIsSeparator();
|
m_separator3->SetIsSeparator();
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
SetupStandardButtons();
|
||||||
Layout();
|
Layout();
|
||||||
|
|
||||||
m_textCtrl->Bind( wxEVT_STC_CHARADDED, &DIALOG_TEXT_PROPERTIES::onScintillaCharAdded, this );
|
m_textCtrl->Bind( wxEVT_STC_CHARADDED, &DIALOG_TEXT_PROPERTIES::onScintillaCharAdded, this );
|
||||||
|
|
|
@ -61,13 +61,9 @@ DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB( SCH_EDIT_FRAME* aParent )
|
||||||
m_cbUpdateValues->SetValue( s_savedDialogState.UpdateValues );
|
m_cbUpdateValues->SetValue( s_savedDialogState.UpdateValues );
|
||||||
m_cbUpdateNetNames->SetValue( s_savedDialogState.UpdateNetNames );
|
m_cbUpdateNetNames->SetValue( s_savedDialogState.UpdateNetNames );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Update Schematic" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizerOK->SetLabel( _( "Update Schematic" ) );
|
|
||||||
m_sdbSizerCancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sdbSizer->Layout();
|
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ DIALOG_UPDATE_SYMBOL_FIELDS::DIALOG_UPDATE_SYMBOL_FIELDS( SYMBOL_EDIT_FRAME* aPa
|
||||||
m_resetFieldEffects->SetValue( g_resetLibFieldEffects );
|
m_resetFieldEffects->SetValue( g_resetLibFieldEffects );
|
||||||
m_resetFieldPositions->SetValue( g_resetLibFieldPositions );
|
m_resetFieldPositions->SetValue( g_resetLibFieldPositions );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -123,6 +123,8 @@ public:
|
||||||
return m_units;
|
return m_units;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetupStandardButtons( std::map<int, wxString> aLabels = {} );
|
||||||
|
|
||||||
static bool IsCtrl( int aChar, const wxKeyEvent& e )
|
static bool IsCtrl( int aChar, const wxKeyEvent& e )
|
||||||
{
|
{
|
||||||
return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
|
return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
|
||||||
|
|
|
@ -126,14 +126,9 @@ DIALOG_PCM::DIALOG_PCM( wxWindow* parent ) : DIALOG_PCM_BASE( parent )
|
||||||
|
|
||||||
m_dialogNotebook->SetSelection( 0 );
|
m_dialogNotebook->SetSelection( 0 );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Close" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_APPLY, _( "Apply Pending Changes" ) },
|
||||||
m_sdbSizer1OK->SetLabel( _( "Close" ) );
|
{ wxID_CANCEL, _( "Discard Pending Changes" ) } } );
|
||||||
m_sdbSizer1Cancel->SetLabel( _( "Discard Pending Changes" ) );
|
|
||||||
m_sdbSizer1Apply->SetLabel( _( "Apply Pending Changes" ) );
|
|
||||||
m_sdbSizer1->Layout();
|
|
||||||
|
|
||||||
SetDefaultItem( m_sdbSizer1OK );
|
|
||||||
|
|
||||||
Bind( wxEVT_CLOSE_WINDOW, &DIALOG_PCM::OnCloseWindow, this );
|
Bind( wxEVT_CLOSE_WINDOW, &DIALOG_PCM::OnCloseWindow, this );
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ DIALOG_REGULATOR_FORM::DIALOG_REGULATOR_FORM( PANEL_REGULATOR* parent, const wxS
|
||||||
m_textCtrlName->Enable( aRegName.IsEmpty() );
|
m_textCtrlName->Enable( aRegName.IsEmpty() );
|
||||||
UpdateDialog();
|
UpdateDialog();
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -27,7 +27,7 @@ DIALOG_DIELECTRIC_MATERIAL::DIALOG_DIELECTRIC_MATERIAL( wxWindow* aParent,
|
||||||
m_materialList( aMaterialList )
|
m_materialList( aMaterialList )
|
||||||
{
|
{
|
||||||
initMaterialList();
|
initMaterialList();
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_DIELECTRIC_MATERIAL::~DIALOG_DIELECTRIC_MATERIAL()
|
DIALOG_DIELECTRIC_MATERIAL::~DIALOG_DIELECTRIC_MATERIAL()
|
||||||
|
|
|
@ -109,6 +109,8 @@ DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT( PCB_BASE_FRAME* aParent,
|
||||||
|
|
||||||
aAdapter->FinishTreeInitialization();
|
aAdapter->FinishTreeInitialization();
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
Bind( wxEVT_TIMER, &DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer, this, m_dbl_click_timer->GetId() );
|
Bind( wxEVT_TIMER, &DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer, this, m_dbl_click_timer->GetId() );
|
||||||
Bind( SYMBOL_PRESELECTED, &DIALOG_CHOOSE_FOOTPRINT::OnComponentPreselected, this );
|
Bind( SYMBOL_PRESELECTED, &DIALOG_CHOOSE_FOOTPRINT::OnComponentPreselected, this );
|
||||||
Bind( SYMBOL_SELECTED, &DIALOG_CHOOSE_FOOTPRINT::OnComponentSelected, this );
|
Bind( SYMBOL_SELECTED, &DIALOG_CHOOSE_FOOTPRINT::OnComponentSelected, this );
|
||||||
|
@ -139,7 +141,6 @@ DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT( PCB_BASE_FRAME* aParent,
|
||||||
SetSize( wxSize( w, h ) );
|
SetSize( wxSize( w, h ) );
|
||||||
|
|
||||||
SetInitialFocus( m_tree->GetFocusTarget() );
|
SetInitialFocus( m_tree->GetFocusTarget() );
|
||||||
okButton->SetDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,11 +41,11 @@ DIALOG_CLEANUP_GRAPHICS::DIALOG_CLEANUP_GRAPHICS( PCB_BASE_FRAME* aParent,
|
||||||
|
|
||||||
m_changesTreeModel->SetSeverities( RPT_SEVERITY_ACTION );
|
m_changesTreeModel->SetSeverities( RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
if( aIsFootprintEditor )
|
||||||
// that requires us to correct the button labels here.
|
SetupStandardButtons( { { wxID_OK, _( "Update Footprint" ) } } );
|
||||||
m_sdbSizerOK->SetLabel( aIsFootprintEditor ? _( "Update Footprint" ) : _( "Update PCB" ) );
|
else
|
||||||
|
SetupStandardButtons( { { wxID_OK, _( "Update PCB" ) } } );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
GetSizer()->SetSizeHints(this);
|
GetSizer()->SetSizeHints(this);
|
||||||
Centre();
|
Centre();
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,11 +50,8 @@ DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS( PCB_EDIT_FRAME*
|
||||||
|
|
||||||
m_changesTreeModel->SetSeverities( RPT_SEVERITY_ACTION );
|
m_changesTreeModel->SetSeverities( RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Update PCB" ) } } );
|
||||||
// that requires us to correct the button labels here.
|
|
||||||
m_sdbSizerOK->SetLabel( _( "Update PCB" ) );
|
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
m_sdbSizer->SetSizeHints( this );
|
m_sdbSizer->SetSizeHints( this );
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -37,7 +37,7 @@ DIALOG_CONSTRAINTS_REPORTER::DIALOG_CONSTRAINTS_REPORTER( PCB_EDIT_FRAME* aParen
|
||||||
|
|
||||||
void DIALOG_CONSTRAINTS_REPORTER::FinishInitialization()
|
void DIALOG_CONSTRAINTS_REPORTER::FinishInitialization()
|
||||||
{
|
{
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,6 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS*
|
||||||
|
|
||||||
m_netSortingByPadCount = true; // false = alphabetic sort, true = pad count sort
|
m_netSortingByPadCount = true; // false = alphabetic sort, true = pad count sort
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
m_ShowNetNameFilter->SetHint( _( "Filter" ) );
|
m_ShowNetNameFilter->SetHint( _( "Filter" ) );
|
||||||
|
|
||||||
m_cbRemoveIslands->Bind( wxEVT_CHOICE,
|
m_cbRemoveIslands->Bind( wxEVT_CHOICE,
|
||||||
|
@ -205,6 +204,8 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS*
|
||||||
m_islandThresholdUnits->Enable( val );
|
m_islandThresholdUnits->Enable( val );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -237,7 +237,7 @@ DIALOG_CREATE_ARRAY::DIALOG_CREATE_ARRAY( PCB_BASE_FRAME* aParent,
|
||||||
setControlEnablement();
|
setControlEnablement();
|
||||||
calculateCircularArrayProperties();
|
calculateCircularArrayProperties();
|
||||||
|
|
||||||
m_stdButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
Fit();
|
Fit();
|
||||||
SetMinSize( GetSize() );
|
SetMinSize( GetSize() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,8 +117,6 @@ DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES( PCB_BASE_EDIT_FRAME* a
|
||||||
m_cbTextOrientation->SetString( i, item );
|
m_cbTextOrientation->SetString( i, item );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
|
|
||||||
m_cbOverrideValue->Bind( wxEVT_CHECKBOX,
|
m_cbOverrideValue->Bind( wxEVT_CHECKBOX,
|
||||||
[&]( wxCommandEvent& evt )
|
[&]( wxCommandEvent& evt )
|
||||||
{
|
{
|
||||||
|
@ -163,6 +161,8 @@ DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES( PCB_BASE_EDIT_FRAME* a
|
||||||
m_cbTextOrientation->Enable( !m_cbKeepAligned->GetValue() );
|
m_cbTextOrientation->Enable( !m_cbKeepAligned->GetValue() );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,12 +92,8 @@ DIALOG_DRC::DIALOG_DRC( PCB_EDIT_FRAME* aEditorFrame, wxWindow* aParent ) :
|
||||||
if( Kiface().IsSingle() )
|
if( Kiface().IsSingle() )
|
||||||
m_cbTestFootprints->Hide();
|
m_cbTestFootprints->Hide();
|
||||||
|
|
||||||
// We use a sdbSizer here to get the order right, which is platform-dependent
|
SetupStandardButtons( { { wxID_OK, _( "Run DRC" ) },
|
||||||
m_sdbSizerOK->SetLabel( _( "Run DRC" ) );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizerCancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sizerButtons->Layout();
|
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
|
|
||||||
initValues();
|
initValues();
|
||||||
syncCheckboxes();
|
syncCheckboxes();
|
||||||
|
|
|
@ -155,16 +155,10 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent,
|
||||||
// because the update and change versions of this dialog have different controls.
|
// because the update and change versions of this dialog have different controls.
|
||||||
m_hash_key = TO_UTF8( GetTitle() );
|
m_hash_key = TO_UTF8( GetTitle() );
|
||||||
|
|
||||||
// Ensure m_closeButton (with id = wxID_CANCEL) has the right label
|
wxString okLabel = m_updateMode ? _( "Update" ) : _( "Change" );
|
||||||
// (to fix automatic renaming of button label )
|
|
||||||
m_sdbSizerCancel->SetLabel( _( "Close" ) );
|
|
||||||
|
|
||||||
if( m_updateMode )
|
SetupStandardButtons( { { wxID_OK, okLabel },
|
||||||
m_sdbSizerOK->SetLabel( _( "Update" ) );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
else
|
|
||||||
m_sdbSizerOK->SetLabel( _( "Change" ) );
|
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -81,7 +81,7 @@ public:
|
||||||
m_IDF_Yref->Enable( true );
|
m_IDF_Yref->Enable( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -91,11 +91,8 @@ DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG( PCB_EDIT_FRAME* aParent, BOARD* aBoard ) :
|
||||||
|
|
||||||
initDialog();
|
initDialog();
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Export" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer1OK->SetLabel( _( "Export" ) );
|
|
||||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sdbSizer1->Layout();
|
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,8 @@ public:
|
||||||
tmpStr = wxT( "" );
|
tmpStr = wxT( "" );
|
||||||
tmpStr << m_YRef;
|
tmpStr << m_YRef;
|
||||||
m_VRML_Yref->SetValue( tmpStr );
|
m_VRML_Yref->SetValue( tmpStr );
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -34,7 +34,8 @@ DIALOG_FILTER_SELECTION::DIALOG_FILTER_SELECTION( PCB_BASE_FRAME* aParent, OPTIO
|
||||||
// Update "All Items" checkbox based on how many items are currently checked
|
// Update "All Items" checkbox based on how many items are currently checked
|
||||||
m_All_Items->Set3StateValue( GetSuggestedAllItemsState() );
|
m_All_Items->Set3StateValue( GetSuggestedAllItemsState() );
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
SetFocus();
|
SetFocus();
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
Centre();
|
Centre();
|
||||||
|
|
|
@ -45,13 +45,8 @@ DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER( FOOTPRINT_EDIT_FRAME* aParen
|
||||||
|
|
||||||
m_markersTreeModel->SetSeverities( -1 );
|
m_markersTreeModel->SetSeverities( -1 );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Run Checks" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizerOK->SetLabel( _( "Run Checks" ) );
|
|
||||||
m_sdbSizerCancel->SetLabel( _( "Close" ) );
|
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
m_sdbSizer->Layout();
|
|
||||||
|
|
||||||
syncCheckboxes();
|
syncCheckboxes();
|
||||||
|
|
||||||
|
|
|
@ -140,14 +140,14 @@ DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParen
|
||||||
m_solderPasteRatio.SetUnits( EDA_UNITS::PERCENT );
|
m_solderPasteRatio.SetUnits( EDA_UNITS::PERCENT );
|
||||||
m_solderPasteRatio.SetNegativeZero();
|
m_solderPasteRatio.SetNegativeZero();
|
||||||
|
|
||||||
m_sdbSizerStdButtonsOK->SetDefault();
|
|
||||||
|
|
||||||
m_orientValue = 0;
|
m_orientValue = 0;
|
||||||
|
|
||||||
// Configure button logos
|
// Configure button logos
|
||||||
m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
||||||
m_bpDelete->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
m_bpDelete->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,12 +131,12 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(
|
||||||
m_solderPasteRatio.SetUnits( EDA_UNITS::PERCENT );
|
m_solderPasteRatio.SetUnits( EDA_UNITS::PERCENT );
|
||||||
m_solderPasteRatio.SetNegativeZero();
|
m_solderPasteRatio.SetNegativeZero();
|
||||||
|
|
||||||
m_sdbSizerStdButtonsOK->SetDefault();
|
|
||||||
|
|
||||||
// Configure button logos
|
// Configure button logos
|
||||||
m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
||||||
m_bpDelete->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
m_bpDelete->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
// wxFormBuilder doesn't include this event...
|
// wxFormBuilder doesn't include this event...
|
||||||
m_itemsGrid->Connect( wxEVT_GRID_CELL_CHANGING,
|
m_itemsGrid->Connect( wxEVT_GRID_CELL_CHANGING,
|
||||||
wxGridEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnGridCellChanging ),
|
wxGridEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnGridCellChanging ),
|
||||||
|
|
|
@ -59,7 +59,7 @@ DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST( wxWindow* aParent )
|
||||||
size.y = cfg->m_FootprintWizardList.height;
|
size.y = cfg->m_FootprintWizardList.height;
|
||||||
SetSize( size );
|
SetSize( size );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
||||||
Center();
|
Center();
|
||||||
|
|
|
@ -96,7 +96,7 @@ public:
|
||||||
// initial focus on the grid please.
|
// initial focus on the grid please.
|
||||||
SetInitialFocus( m_grid );
|
SetInitialFocus( m_grid );
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
SetupStandardButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
~DIALOG_FP_PLUGIN_OPTIONS() override
|
~DIALOG_FP_PLUGIN_OPTIONS() override
|
||||||
|
|
|
@ -72,14 +72,12 @@ DIALOG_GENDRILL::DIALOG_GENDRILL( PCB_EDIT_FRAME* aPcbEditFrame, wxWindow* aPar
|
||||||
m_board = m_pcbEditFrame->GetBoard();
|
m_board = m_pcbEditFrame->GetBoard();
|
||||||
m_plotOpts = m_pcbEditFrame->GetPlotSettings();
|
m_plotOpts = m_pcbEditFrame->GetPlotSettings();
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Generate Drill File" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_APPLY, _( "Generate Map File" ) },
|
||||||
m_sdbSizerOK->SetLabel( _( "Generate Drill File" ) );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizerApply->SetLabel( _( "Generate Map File" ) );
|
|
||||||
m_sdbSizerCancel->SetLabel( _( "Close" ) );
|
|
||||||
m_buttonsSizer->Layout();
|
m_buttonsSizer->Layout();
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
SetReturnCode( 1 );
|
SetReturnCode( 1 );
|
||||||
initDialog();
|
initDialog();
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
|
|
|
@ -43,7 +43,6 @@ public:
|
||||||
DIALOG_GET_FOOTPRINT_BY_NAME( PCB_BASE_FRAME* aParent, wxArrayString& aFpList ) :
|
DIALOG_GET_FOOTPRINT_BY_NAME( PCB_BASE_FRAME* aParent, wxArrayString& aFpList ) :
|
||||||
DIALOG_GET_FOOTPRINT_BY_NAME_BASE( aParent )
|
DIALOG_GET_FOOTPRINT_BY_NAME_BASE( aParent )
|
||||||
{
|
{
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
m_choiceFpList->Append( aFpList );
|
m_choiceFpList->Append( aFpList );
|
||||||
|
|
||||||
m_multipleHint->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
m_multipleHint->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||||
|
@ -51,6 +50,8 @@ public:
|
||||||
// Hide help string until someone implements successive placement (#2227)
|
// Hide help string until someone implements successive placement (#2227)
|
||||||
m_multipleHint->Show( false );
|
m_multipleHint->Show( false );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Dialog should not shrink beyond it's minimal size.
|
// Dialog should not shrink beyond it's minimal size.
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,9 @@ DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent ) :
|
||||||
m_footprintFilterUnlocked->Enable( m_delFootprints->GetValue() );
|
m_footprintFilterUnlocked->Enable( m_delFootprints->GetValue() );
|
||||||
m_drawingFilterLocked->Enable( m_delDrawings->GetValue() );
|
m_drawingFilterLocked->Enable( m_delDrawings->GetValue() );
|
||||||
m_drawingFilterUnlocked->Enable( m_delDrawings->GetValue() );
|
m_drawingFilterUnlocked->Enable( m_delDrawings->GetValue() );
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
SetFocus();
|
SetFocus();
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
Centre();
|
Centre();
|
||||||
|
|
|
@ -141,7 +141,7 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS( PCB_
|
||||||
m_grid->SetCellHighlightPenWidth( 0 );
|
m_grid->SetCellHighlightPenWidth( 0 );
|
||||||
m_grid->SetDefaultCellFont( KIUI::GetInfoFont( this ) );
|
m_grid->SetDefaultCellFont( KIUI::GetInfoFont( this ) );
|
||||||
|
|
||||||
m_sdbSizerButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,8 @@ DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT
|
||||||
buildNetclassesGrid();
|
buildNetclassesGrid();
|
||||||
|
|
||||||
m_netclassGrid->SetCellHighlightPenWidth( 0 );
|
m_netclassGrid->SetCellHighlightPenWidth( 0 );
|
||||||
m_sdbSizerOK->SetDefault();
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
m_netFilter->Connect( NET_SELECTED,
|
m_netFilter->Connect( NET_SELECTED,
|
||||||
wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnNetFilterSelect ),
|
wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnNetFilterSelect ),
|
||||||
|
|
|
@ -146,7 +146,7 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES( PCB_BASE_EDIT_FR
|
||||||
|
|
||||||
SetInitialFocus( m_startXCtrl );
|
SetInitialFocus( m_startXCtrl );
|
||||||
|
|
||||||
m_StandardButtonsSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent,
|
||||||
for( BOARD_ITEM* item : m_group->GetItems() )
|
for( BOARD_ITEM* item : m_group->GetItems() )
|
||||||
m_membersList->Append( item->GetSelectMenuText( m_brdEditor->GetUserUnits() ), item );
|
m_membersList->Append( item->GetSelectMenuText( m_brdEditor->GetUserUnits() ), item );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
SetInitialFocus( m_nameCtrl );
|
SetInitialFocus( m_nameCtrl );
|
||||||
|
|
||||||
|
|
|
@ -42,12 +42,6 @@ DIALOG_IMPORT_SETTINGS::DIALOG_IMPORT_SETTINGS( wxWindow* aParent, PCB_EDIT_FRAM
|
||||||
|
|
||||||
m_browseButton->SetBitmap( KiBitmap( BITMAPS::small_folder ) );
|
m_browseButton->SetBitmap( KiBitmap( BITMAPS::small_folder ) );
|
||||||
|
|
||||||
// Button created in wxFormBuilder is an "OK" button. Change label here
|
|
||||||
m_sdbSizer1OK->SetLabel( _( "Import Settings" ) );
|
|
||||||
|
|
||||||
// Disable "Import Settings" button until user selects at least one import option
|
|
||||||
m_sdbSizer1OK->Enable( false );
|
|
||||||
|
|
||||||
// Make sure "Select All" button is big enough to hold "Deselect All"
|
// Make sure "Select All" button is big enough to hold "Deselect All"
|
||||||
m_selectAllButton->SetLabel( _( "Deselect All" ) ); // Change the text temporarily
|
m_selectAllButton->SetLabel( _( "Deselect All" ) ); // Change the text temporarily
|
||||||
sizeNeeded = m_selectAllButton->GetBestSize(); // Get control to tell us the width required
|
sizeNeeded = m_selectAllButton->GetBestSize(); // Get control to tell us the width required
|
||||||
|
@ -55,9 +49,12 @@ DIALOG_IMPORT_SETTINGS::DIALOG_IMPORT_SETTINGS( wxWindow* aParent, PCB_EDIT_FRAM
|
||||||
sizeNeeded.y = m_selectAllButton->GetSize().y; // Keep the height unchanged
|
sizeNeeded.y = m_selectAllButton->GetSize().y; // Keep the height unchanged
|
||||||
m_selectAllButton->SetMinSize( sizeNeeded ); // Set control to the required size
|
m_selectAllButton->SetMinSize( sizeNeeded ); // Set control to the required size
|
||||||
|
|
||||||
m_buttonsSizer->Layout();
|
SetupStandardButtons( { { wxID_OK, _( "Import Settings" ) } } );
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
// Disable "Import Settings" button until user selects at least one import option
|
||||||
|
m_sdbSizer1OK->Enable( false );
|
||||||
|
|
||||||
|
m_buttonsSizer->Layout();
|
||||||
|
|
||||||
m_showSelectAllOnBtn = true; // Store state to toggle message/usage of "Select All" button
|
m_showSelectAllOnBtn = true; // Store state to toggle message/usage of "Select All" button
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,7 +299,7 @@ DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS( wxWindow* aParent,
|
||||||
// Auto select the first item to improve ease-of-use
|
// Auto select the first item to improve ease-of-use
|
||||||
m_kicad_layers_list->SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
|
m_kicad_layers_list->SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
Fit();
|
Fit();
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -82,7 +82,7 @@ DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT( PCB_BASE_FRAME *aParent, wxPoint& aTransla
|
||||||
m_rotate.SetValue( m_options.entryRotation );
|
m_rotate.SetValue( m_options.entryRotation );
|
||||||
m_anchorOptions->SetSelection( std::min( m_options.entryAnchorSelection, m_menuIDs.size() ) );
|
m_anchorOptions->SetSelection( std::min( m_options.entryAnchorSelection, m_menuIDs.size() ) );
|
||||||
|
|
||||||
m_stdButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -881,7 +881,8 @@ DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR( PCB_EDIT_FRAME* aParent,
|
||||||
m_renameNet->SetBitmap( KiBitmap( BITMAPS::small_edit ) );
|
m_renameNet->SetBitmap( KiBitmap( BITMAPS::small_edit ) );
|
||||||
m_deleteNet->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
m_deleteNet->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
m_renameNet->Disable();
|
m_renameNet->Disable();
|
||||||
m_deleteNet->Disable();
|
m_deleteNet->Disable();
|
||||||
|
|
||||||
|
|
|
@ -78,13 +78,9 @@ DIALOG_NETLIST::DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxString& aNetlistFullF
|
||||||
m_MessageWindow->SetVisibleSeverities( cfg->m_NetlistDialog.report_filter );
|
m_MessageWindow->SetVisibleSeverities( cfg->m_NetlistDialog.report_filter );
|
||||||
m_MessageWindow->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
|
m_MessageWindow->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Update PCB" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer1OK->SetLabel( _( "Update PCB" ) );
|
|
||||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
|
||||||
m_buttonsSizer->Layout();
|
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
|
|
|
@ -83,7 +83,7 @@ DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME*
|
||||||
m_settings = *aSettings;
|
m_settings = *aSettings;
|
||||||
m_settings.SetupLayersList( m_layers, m_parent, false );
|
m_settings.SetupLayersList( m_layers, m_parent, false );
|
||||||
|
|
||||||
m_sdbSizerButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES( wxWindow* aP
|
||||||
|
|
||||||
TransferDataToWindow();
|
TransferDataToWindow();
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,8 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS( wxWindow* aPar
|
||||||
|
|
||||||
TransferDataToWindow();
|
TransferDataToWindow();
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
|
|
||||||
m_gridCornersList->Connect( wxEVT_GRID_CELL_CHANGING,
|
m_gridCornersList->Connect( wxEVT_GRID_CELL_CHANGING,
|
||||||
|
@ -570,7 +571,8 @@ DIALOG_PAD_PRIMITIVES_TRANSFORM::DIALOG_PAD_PRIMITIVES_TRANSFORM( wxWindow* aPar
|
||||||
m_spinCtrlDuplicateCount->Show( false );
|
m_spinCtrlDuplicateCount->Show( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, PAD* aPad
|
||||||
prepareCanvas();
|
prepareCanvas();
|
||||||
|
|
||||||
SetInitialFocus( m_padNumCtrl );
|
SetInitialFocus( m_padNumCtrl );
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
m_canUpdate = true;
|
m_canUpdate = true;
|
||||||
|
|
||||||
m_padNetSelector->Connect( NET_SELECTED,
|
m_padNetSelector->Connect( NET_SELECTED,
|
||||||
|
|
|
@ -63,14 +63,9 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
|
||||||
|
|
||||||
init_Dialog();
|
init_Dialog();
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Plot" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_APPLY, _( "Generate Drill Files..." ) },
|
||||||
m_sdbSizer1OK->SetLabel( _( "Plot" ) );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer1Apply->SetLabel( _( "Generate Drill Files..." ) );
|
|
||||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sizerButtons->Layout();
|
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
|
|
||||||
GetSizer()->Fit( this );
|
GetSizer()->Fit( this );
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
|
|
|
@ -37,11 +37,11 @@ DIALOG_PNS_DIFF_PAIR_DIMENSIONS::DIALOG_PNS_DIFF_PAIR_DIMENSIONS( EDA_DRAW_FRAME
|
||||||
m_viaGap( aParent, m_viaGapLabel, m_viaGapText, m_viaGapUnit ),
|
m_viaGap( aParent, m_viaGapLabel, m_viaGapText, m_viaGapUnit ),
|
||||||
m_sizes( aSizes )
|
m_sizes( aSizes )
|
||||||
{
|
{
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
Centre();
|
Centre();
|
||||||
|
|
||||||
m_stdButtonsOK->SetDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,11 +41,12 @@ DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS( EDA_DRAW_F
|
||||||
m_settings( aSettings ),
|
m_settings( aSettings ),
|
||||||
m_mode( aMode )
|
m_mode( aMode )
|
||||||
{
|
{
|
||||||
m_stdButtonsOK->SetDefault();
|
|
||||||
m_targetLengthText->SetSelection( -1, -1 );
|
m_targetLengthText->SetSelection( -1, -1 );
|
||||||
m_targetLengthText->SetFocus();
|
m_targetLengthText->SetFocus();
|
||||||
m_radius.SetUnits( EDA_UNITS::PERCENT );
|
m_radius.SetUnits( EDA_UNITS::PERCENT );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
GetSizer()->SetSizeHints(this);
|
GetSizer()->SetSizeHints(this);
|
||||||
Centre();
|
Centre();
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE( PCB_BASE_FRAME* aParent, wxP
|
||||||
m_xOffset.SetDoubleValue( m_options.entry1 );
|
m_xOffset.SetDoubleValue( m_options.entry1 );
|
||||||
m_yOffset.SetDoubleValue( m_options.entry2 );
|
m_yOffset.SetDoubleValue( m_options.entry2 );
|
||||||
|
|
||||||
m_stdButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,18 +46,11 @@ DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES( PCB_BASE_FRAME* aParent
|
||||||
m_Pad_Orient_Filter_CB->SetValue( m_Pad_Orient_Filter );
|
m_Pad_Orient_Filter_CB->SetValue( m_Pad_Orient_Filter );
|
||||||
m_Pad_Type_Filter_CB->SetValue( m_Pad_Type_Filter );
|
m_Pad_Type_Filter_CB->SetValue( m_Pad_Type_Filter );
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Change Pads on Current Footprint" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_APPLY, _( "Change Pads on Identical Footprints" ) } } );
|
||||||
m_sdbSizer1OK->SetLabel( _( "Change Pads on Current Footprint" ) );
|
|
||||||
|
|
||||||
if( aParent->IsType( FRAME_FOOTPRINT_EDITOR ) )
|
if( aParent->IsType( FRAME_FOOTPRINT_EDITOR ) )
|
||||||
m_sdbSizer1Apply->Show( false );
|
m_sdbSizer1Apply->Show( false );
|
||||||
else
|
|
||||||
m_sdbSizer1Apply->SetLabel( _( "Change Pads on Identical Footprints" ) );
|
|
||||||
|
|
||||||
m_sdbSizer1->Layout();
|
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES( PCB_BASE_FRAME* aParen
|
||||||
bool fpEditorMode = m_parent->IsType( FRAME_FOOTPRINT_EDITOR );
|
bool fpEditorMode = m_parent->IsType( FRAME_FOOTPRINT_EDITOR );
|
||||||
m_zonesettings.SetupLayersList( m_layers, m_parent, true, fpEditorMode );
|
m_zonesettings.SetupLayersList( m_layers, m_parent, true, fpEditorMode );
|
||||||
|
|
||||||
m_sdbSizerButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS( PCB_BASE_EDIT_FRAME* aParent, PCB_LAYER_
|
||||||
m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 );
|
m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 );
|
||||||
m_grid->SetCellHighlightROPenWidth( 0 );
|
m_grid->SetCellHighlightROPenWidth( 0 );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES( PCB_EDIT_FRAME* aParent, PCB
|
||||||
m_Size( aParent, m_sizeLabel, m_sizeCtrl, m_sizeUnits ),
|
m_Size( aParent, m_sizeLabel, m_sizeCtrl, m_sizeUnits ),
|
||||||
m_Thickness( aParent, m_thicknessLabel, m_thicknessCtrl, m_thicknessUnits )
|
m_Thickness( aParent, m_thicknessLabel, m_thicknessCtrl, m_thicknessUnits )
|
||||||
{
|
{
|
||||||
m_sdbSizerButtsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
SetInitialFocus( m_sizeCtrl );
|
SetInitialFocus( m_sizeCtrl );
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO
|
||||||
// Set font sizes
|
// Set font sizes
|
||||||
m_statusLine->SetFont( KIUI::GetInfoFont( this ) );
|
m_statusLine->SetFont( KIUI::GetInfoFont( this ) );
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// wxTextCtrls fail to generate wxEVT_CHAR events when the wxTE_MULTILINE flag is set,
|
// wxTextCtrls fail to generate wxEVT_CHAR events when the wxTE_MULTILINE flag is set,
|
||||||
// so we have to listen to wxEVT_CHAR_HOOK events instead.
|
// so we have to listen to wxEVT_CHAR_HOOK events instead.
|
||||||
|
|
|
@ -377,7 +377,7 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
||||||
else
|
else
|
||||||
SetInitialFocus( m_ViaDiameterCtrl );
|
SetInitialFocus( m_ViaDiameterCtrl );
|
||||||
|
|
||||||
m_StdButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
m_frame->Bind( UNITS_CHANGED, &DIALOG_TRACK_VIA_PROPERTIES::onUnitsChanged, this );
|
m_frame->Bind( UNITS_CHANGED, &DIALOG_TRACK_VIA_PROPERTIES::onUnitsChanged, this );
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE( EDA_DRAW_FRAME* aParent,
|
||||||
m_viaDrill( aParent, m_viaDrillLabel, m_viaDrillText, m_viaDrillUnits, minSize ),
|
m_viaDrill( aParent, m_viaDrillLabel, m_viaDrillText, m_viaDrillUnits, minSize ),
|
||||||
m_settings( aSettings )
|
m_settings( aSettings )
|
||||||
{
|
{
|
||||||
m_stdButtonsOK->SetDefault();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -54,7 +54,6 @@ DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS( PCB_BASE_FRAME* aParent,
|
||||||
m_items( aItems ),
|
m_items( aItems ),
|
||||||
m_commit( aCommit )
|
m_commit( aCommit )
|
||||||
{
|
{
|
||||||
m_StdButtonsOK->SetDefault();
|
|
||||||
m_image->SetBitmap( KiBitmap( BITMAPS::pads_remove_unused ) );
|
m_image->SetBitmap( KiBitmap( BITMAPS::pads_remove_unused ) );
|
||||||
|
|
||||||
// Set keep Through Hole pads on external layers ON by default.
|
// Set keep Through Hole pads on external layers ON by default.
|
||||||
|
@ -62,6 +61,8 @@ DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS( PCB_BASE_FRAME* aParent,
|
||||||
// is probably not frequent
|
// is probably not frequent
|
||||||
m_cbPreservePads->SetValue( true );
|
m_cbPreservePads->SetValue( true );
|
||||||
|
|
||||||
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,13 +56,9 @@ DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST* aNetlist
|
||||||
m_messagePanel->GetSizer()->SetSizeHints( this );
|
m_messagePanel->GetSizer()->SetSizeHints( this );
|
||||||
m_messagePanel->Layout();
|
m_messagePanel->Layout();
|
||||||
|
|
||||||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
SetupStandardButtons( { { wxID_OK, _( "Update PCB" ) },
|
||||||
// that requires us to correct the button labels here.
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
m_sdbSizer1OK->SetLabel( _( "Update PCB" ) );
|
|
||||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sdbSizer1->Layout();
|
|
||||||
|
|
||||||
m_sdbSizer1OK->SetDefault();
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue