Browse Source

Change output and special execute dialog to OK.

Fix special execute not adding to list
pcb_db
Marek Roszko 9 months ago
parent
commit
7881fa68e9
  1. 2
      kicad/dialogs/dialog_special_execute.cpp
  2. 14
      kicad/dialogs/panel_jobs.cpp
  3. 14
      kicad/dialogs/panel_jobs_base.cpp
  4. 68
      kicad/dialogs/panel_jobs_base.fbp
  5. 7
      kicad/dialogs/panel_jobs_base.h

2
kicad/dialogs/dialog_special_execute.cpp

@ -25,7 +25,7 @@ DIALOG_SPECIAL_EXECUTE::DIALOG_SPECIAL_EXECUTE( wxWindow* aParent, JOB_SPECIAL_E
DIALOG_SPECIAL_EXECUTE_BASE( aParent ),
m_job( aJob )
{
SetAffirmativeId( wxID_SAVE );
SetAffirmativeId( wxID_OK );
}

14
kicad/dialogs/panel_jobs.cpp

@ -71,7 +71,7 @@ public:
DIALOG_JOB_OUTPUT( wxWindow* aParent, JOBSET* aJobsFile, JOBSET_OUTPUT* aOutput ) :
DIALOG_JOB_OUTPUT_BASE( aParent ), m_jobsFile( aJobsFile ), m_output( aOutput )
{
SetAffirmativeId( wxID_SAVE );
SetAffirmativeId( wxID_OK );
// prevent someone from failing to add the type info in the future
wxASSERT( jobTypeInfos.contains( m_output->m_type ) );
@ -416,7 +416,7 @@ private:
case wxID_EDIT:
{
DIALOG_JOB_OUTPUT dialog( m_frame, m_jobsFile, m_output );
if( dialog.ShowModal() == wxID_SAVE )
if( dialog.ShowModal() == wxID_OK )
{
m_textOutputType->SetLabel( m_output->GetDescription() );
m_jobsFile->SetDirty();
@ -697,8 +697,12 @@ bool PANEL_JOBS::OpenJobOptionsForListItem( size_t aItemIndex )
JOB_SPECIAL_EXECUTE* specialJob = static_cast<JOB_SPECIAL_EXECUTE*>( job.m_job.get() );
DIALOG_SPECIAL_EXECUTE dialog( m_frame, specialJob );
return dialog.ShowModal() == wxID_OK;
if( dialog.ShowModal() == wxID_OK )
{
m_jobsFile->SetDirty();
UpdateTitle();
return true;
}
}
}
@ -803,7 +807,7 @@ void PANEL_JOBS::OnAddOutputClick( wxCommandEvent& aEvent )
JOBSET_OUTPUT* output = m_jobsFile->AddNewJobOutput( jobType.first );
DIALOG_JOB_OUTPUT dialog( m_frame, m_jobsFile.get(), output );
if (dialog.ShowModal() == wxID_SAVE)
if (dialog.ShowModal() == wxID_OK)
{
Freeze();
addJobOutputPanel( output );

14
kicad/dialogs/panel_jobs_base.cpp

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -278,8 +278,8 @@ DIALOG_JOB_OUTPUT_BASE::DIALOG_JOB_OUTPUT_BASE( wxWindow* parent, wxWindowID id,
bSizerMain->Add( fgSizer1, 1, wxEXPAND|wxALL, 10 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1Save = new wxButton( this, wxID_SAVE );
m_sdbSizer1->AddButton( m_sdbSizer1Save );
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
@ -341,17 +341,17 @@ DIALOG_SPECIAL_EXECUTE_BASE::DIALOG_SPECIAL_EXECUTE_BASE( wxWindow* parent, wxWi
bSizerBottom = new wxBoxSizer( wxVERTICAL );
m_cbRecordOutput = new wxCheckBox( this, wxID_ANY, _("Record output messages"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerBottom->Add( m_cbRecordOutput, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
bSizerBottom->Add( m_cbRecordOutput, 0, wxLEFT, 5 );
m_cbIgnoreExitCode = new wxCheckBox( this, wxID_ANY, _("Ignore non-zero exit code"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerBottom->Add( m_cbIgnoreExitCode, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
bSizerBottom->Add( m_cbIgnoreExitCode, 0, wxLEFT|wxTOP, 5 );
bSizerMain->Add( bSizerBottom, 0, wxALL|wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1Save = new wxButton( this, wxID_SAVE );
m_sdbSizer1->AddButton( m_sdbSizer1Save );
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();

68
kicad/dialogs/panel_jobs_base.fbp

@ -1,34 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="17"/>
<FileVersion major="1" minor="18"/>
<object class="Project" expanded="true">
<property name="class_decoration">; </property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="cpp_class_decoration">; </property>
<property name="cpp_disconnect_events">1</property>
<property name="cpp_event_generation">connect</property>
<property name="cpp_help_provider">none</property>
<property name="cpp_namespace"></property>
<property name="cpp_precompiled_header"></property>
<property name="cpp_use_array_enum">0</property>
<property name="cpp_use_enum">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">panel_jobs_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="lua_skip_events">1</property>
<property name="lua_ui_table">UI</property>
<property name="name">PANEL_JOBS_BASE</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="php_disconnect_events">0</property>
<property name="php_disconnect_mode">source_name</property>
<property name="php_skip_events">1</property>
<property name="python_disconnect_events">0</property>
<property name="python_disconnect_mode">source_name</property>
<property name="python_image_path_wrapper_function_name"></property>
<property name="python_indent_with_spaces"></property>
<property name="python_skip_events">1</property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<property name="use_native_eol">0</property>
<object class="Panel" expanded="true">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
@ -88,10 +90,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="autosize_cols">0</property>
<property name="autosize_rows">0</property>
<property name="best_size"></property>
@ -422,10 +424,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
@ -1850,10 +1852,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -1917,8 +1919,8 @@
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">0</property>
<property name="Save">1</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
@ -2243,7 +2245,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="flag">wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property>
@ -2309,7 +2311,7 @@
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT</property>
<property name="flag">wxLEFT|wxTOP</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property>
@ -2384,8 +2386,8 @@
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">0</property>
<property name="Save">1</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>

7
kicad/dialogs/panel_jobs_base.h

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -41,7 +41,6 @@ class WX_GRID;
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_JOBS_BASE
///////////////////////////////////////////////////////////////////////////////
@ -126,7 +125,7 @@ class DIALOG_JOB_OUTPUT_BASE : public DIALOG_SHIM
wxStaticText* m_staticText10;
wxCheckListBox* m_includeJobs;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1Save;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, override them in your derived class
@ -156,7 +155,7 @@ class DIALOG_SPECIAL_EXECUTE_BASE : public DIALOG_SHIM
wxCheckBox* m_cbRecordOutput;
wxCheckBox* m_cbIgnoreExitCode;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1Save;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, override them in your derived class

Loading…
Cancel
Save