From d7eed69831d4bdcc88af517488f85150ec3e5131 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 1 Jan 2025 16:32:36 +0000 Subject: [PATCH] Job-specific option dialog titles. --- common/jobs/job.cpp | 6 +++ common/jobs/job.h | 20 ++------ common/jobs/job_export_pcb_3d.cpp | 10 +++- common/jobs/job_export_pcb_3d.h | 3 +- common/jobs/job_export_pcb_drill.cpp | 10 +++- common/jobs/job_export_pcb_drill.h | 3 +- common/jobs/job_export_pcb_dxf.cpp | 9 +++- common/jobs/job_export_pcb_dxf.h | 1 + common/jobs/job_export_pcb_gencad.cpp | 7 +++ common/jobs/job_export_pcb_gencad.h | 2 + common/jobs/job_export_pcb_gerber.cpp | 10 +++- common/jobs/job_export_pcb_gerber.h | 3 +- common/jobs/job_export_pcb_gerbers.cpp | 10 +++- common/jobs/job_export_pcb_gerbers.h | 3 +- common/jobs/job_export_pcb_ipc2581.cpp | 8 +++- common/jobs/job_export_pcb_ipc2581.h | 1 + common/jobs/job_export_pcb_odb.cpp | 8 +++- common/jobs/job_export_pcb_odb.h | 1 + common/jobs/job_export_pcb_pdf.cpp | 6 +++ common/jobs/job_export_pcb_pdf.h | 1 + common/jobs/job_export_pcb_pos.cpp | 10 +++- common/jobs/job_export_pcb_pos.h | 3 +- common/jobs/job_export_pcb_svg.cpp | 10 +++- common/jobs/job_export_pcb_svg.h | 3 +- common/jobs/job_export_sch_bom.cpp | 9 +++- common/jobs/job_export_sch_bom.h | 3 +- common/jobs/job_export_sch_netlist.cpp | 10 +++- common/jobs/job_export_sch_netlist.h | 3 +- common/jobs/job_export_sch_plot.cpp | 44 +++++++++++++++--- common/jobs/job_export_sch_plot.h | 7 ++- common/jobs/job_pcb_drc.cpp | 10 +++- common/jobs/job_pcb_drc.h | 3 +- common/jobs/job_sch_erc.cpp | 10 +++- common/jobs/job_sch_erc.h | 3 +- eeschema/dialogs/dialog_erc_job_config.cpp | 2 + eeschema/dialogs/dialog_export_netlist.cpp | 12 +++-- .../dialogs/dialog_export_netlist_base.cpp | 36 +++++++++------ .../dialogs/dialog_export_netlist_base.fbp | 46 +++++++++---------- eeschema/dialogs/dialog_export_netlist_base.h | 31 +++---------- eeschema/dialogs/dialog_plot_schematic.cpp | 22 +++++---- .../dialogs/dialog_plot_schematic_base.cpp | 2 +- .../dialogs/dialog_plot_schematic_base.fbp | 40 ++++++++-------- eeschema/dialogs/dialog_plot_schematic_base.h | 5 +- .../dialogs/dialog_symbol_fields_table.cpp | 10 +++- pcbnew/dialogs/dialog_drc_job_config.cpp | 3 +- pcbnew/dialogs/dialog_export_2581.cpp | 35 ++++++++------ pcbnew/dialogs/dialog_export_odbpp.cpp | 22 +++++++-- pcbnew/dialogs/dialog_export_step.cpp | 10 +++- .../dialogs/dialog_gen_footprint_position.cpp | 14 ++++-- pcbnew/dialogs/dialog_gendrill.cpp | 15 ++++-- pcbnew/dialogs/dialog_plot.cpp | 4 +- 51 files changed, 373 insertions(+), 186 deletions(-) diff --git a/common/jobs/job.cpp b/common/jobs/job.cpp index 023daeeaf6..a6e1946605 100644 --- a/common/jobs/job.cpp +++ b/common/jobs/job.cpp @@ -74,6 +74,12 @@ wxString JOB::GetDefaultDescription() const } +wxString JOB::GetOptionsDialogTitle() const +{ + return _( "Job Options" ); +} + + void JOB::SetTempOutputDirectory( const wxString& aBase ) { m_tempOutputDirectory = aBase; diff --git a/common/jobs/job.h b/common/jobs/job.h index d11483588e..9e58337682 100644 --- a/common/jobs/job.h +++ b/common/jobs/job.h @@ -141,26 +141,16 @@ public: virtual void ToJson( nlohmann::json& j ) const; virtual wxString GetDefaultDescription() const; + virtual wxString GetOptionsDialogTitle() const; - const std::vector& GetParams() { - return m_params; - } + const std::vector& GetParams() { return m_params; } - void ClearExistingOutputs() { - m_outputs.clear(); - } - - const std::vector& GetOutputs() { - return m_outputs; - } - - void AddOutput( wxString aOutputPath ) { - m_outputs.emplace_back( aOutputPath ); - } + void ClearExistingOutputs() { m_outputs.clear(); } + const std::vector& GetOutputs() { return m_outputs; } + void AddOutput( wxString aOutputPath ) { m_outputs.emplace_back( aOutputPath ); } void SetTempOutputDirectory( const wxString& aBase ); - void SetOutputPath( const wxString& aPath ); wxString GetOutputPath() const { return m_outputPath; } wxString GetFullOutputPath() const; diff --git a/common/jobs/job_export_pcb_3d.cpp b/common/jobs/job_export_pcb_3d.cpp index d0bc92a7bd..6a67e585d1 100644 --- a/common/jobs/job_export_pcb_3d.cpp +++ b/common/jobs/job_export_pcb_3d.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023-2024 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -141,7 +141,13 @@ JOB_EXPORT_PCB_3D::JOB_EXPORT_PCB_3D() : wxString JOB_EXPORT_PCB_3D::GetDefaultDescription() const { - return wxString::Format( _( "3D model export" ) ); + return _( "3D model export" ); +} + + +wxString JOB_EXPORT_PCB_3D::GetOptionsDialogTitle() const +{ + return _( "Export 3D Model Job Options" ); } diff --git a/common/jobs/job_export_pcb_3d.h b/common/jobs/job_export_pcb_3d.h index 2816823b7f..f32d3dc33c 100644 --- a/common/jobs/job_export_pcb_3d.h +++ b/common/jobs/job_export_pcb_3d.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2022 Mark Roszko - * Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -107,6 +107,7 @@ class KICOMMON_API JOB_EXPORT_PCB_3D : public JOB public: JOB_EXPORT_PCB_3D(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; void SetStepFormat( EXPORTER_STEP_PARAMS::FORMAT aFormat ); diff --git a/common/jobs/job_export_pcb_drill.cpp b/common/jobs/job_export_pcb_drill.cpp index a9921e9dd9..78b773bb7e 100644 --- a/common/jobs/job_export_pcb_drill.cpp +++ b/common/jobs/job_export_pcb_drill.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -120,7 +120,13 @@ JOB_EXPORT_PCB_DRILL::JOB_EXPORT_PCB_DRILL() : wxString JOB_EXPORT_PCB_DRILL::GetDefaultDescription() const { - return wxString::Format( _( "Drill data export" ), m_format ); + return _( "Drill data export" ); +} + + +wxString JOB_EXPORT_PCB_DRILL::GetOptionsDialogTitle() const +{ + return _( "Export Drill Data Job Options" ); } REGISTER_JOB( pcb_export_drill, _HKI( "PCB: Export drill data" ), KIWAY::FACE_PCB, diff --git a/common/jobs/job_export_pcb_drill.h b/common/jobs/job_export_pcb_drill.h index a11068ce19..f2d9eba0db 100644 --- a/common/jobs/job_export_pcb_drill.h +++ b/common/jobs/job_export_pcb_drill.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2022 Mark Roszko - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -32,6 +32,7 @@ public: JOB_EXPORT_PCB_DRILL(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; wxString m_filename; diff --git a/common/jobs/job_export_pcb_dxf.cpp b/common/jobs/job_export_pcb_dxf.cpp index 9c75d710b5..1724ddfac2 100644 --- a/common/jobs/job_export_pcb_dxf.cpp +++ b/common/jobs/job_export_pcb_dxf.cpp @@ -55,7 +55,14 @@ JOB_EXPORT_PCB_DXF::JOB_EXPORT_PCB_DXF() : wxString JOB_EXPORT_PCB_DXF::GetDefaultDescription() const { - return wxString::Format( _( "PCB DXF export" ) ); + return _( "PCB DXF export" ); } + +wxString JOB_EXPORT_PCB_DXF::GetOptionsDialogTitle() const +{ + return _( "Export DXF Job Options" ); +} + + REGISTER_JOB( pcb_export_dxf, _HKI( "PCB: Export DXF" ), KIWAY::FACE_PCB, JOB_EXPORT_PCB_DXF ); \ No newline at end of file diff --git a/common/jobs/job_export_pcb_dxf.h b/common/jobs/job_export_pcb_dxf.h index 88adc05731..56105dfd2c 100644 --- a/common/jobs/job_export_pcb_dxf.h +++ b/common/jobs/job_export_pcb_dxf.h @@ -33,6 +33,7 @@ class KICOMMON_API JOB_EXPORT_PCB_DXF : public JOB_EXPORT_PCB_PLOT public: JOB_EXPORT_PCB_DXF(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; enum class DXF_UNITS { diff --git a/common/jobs/job_export_pcb_gencad.cpp b/common/jobs/job_export_pcb_gencad.cpp index a1b292fb72..7e43441716 100644 --- a/common/jobs/job_export_pcb_gencad.cpp +++ b/common/jobs/job_export_pcb_gencad.cpp @@ -19,6 +19,7 @@ */ #include +#include JOB_EXPORT_PCB_GENCAD::JOB_EXPORT_PCB_GENCAD() : @@ -29,4 +30,10 @@ JOB_EXPORT_PCB_GENCAD::JOB_EXPORT_PCB_GENCAD() : m_useDrillOrigin( false ), m_useUniquePins( false ) { +} + + +wxString JOB_EXPORT_PCB_GENCAD::GetOptionsDialogTitle() const +{ + return _( "Export GenCAD Job Options" ); } \ No newline at end of file diff --git a/common/jobs/job_export_pcb_gencad.h b/common/jobs/job_export_pcb_gencad.h index 3b1b82c505..2180c5a6d7 100644 --- a/common/jobs/job_export_pcb_gencad.h +++ b/common/jobs/job_export_pcb_gencad.h @@ -31,6 +31,8 @@ class KICOMMON_API JOB_EXPORT_PCB_GENCAD : public JOB { public: JOB_EXPORT_PCB_GENCAD(); + wxString GetOptionsDialogTitle() const override; + wxString m_filename; bool m_flipBottomPads; diff --git a/common/jobs/job_export_pcb_gerber.cpp b/common/jobs/job_export_pcb_gerber.cpp index f29dcd1a49..31263fb722 100644 --- a/common/jobs/job_export_pcb_gerber.cpp +++ b/common/jobs/job_export_pcb_gerber.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -68,5 +68,11 @@ JOB_EXPORT_PCB_GERBER::JOB_EXPORT_PCB_GERBER() : wxString JOB_EXPORT_PCB_GERBER::GetDefaultDescription() const { - return wxString::Format( _( "Single gerber export" ) ); + return _( "Single Gerber export" ); +} + + +wxString JOB_EXPORT_PCB_GERBER::GetOptionsDialogTitle() const +{ + return _( "Export Single Gerber Job Options" ); } \ No newline at end of file diff --git a/common/jobs/job_export_pcb_gerber.h b/common/jobs/job_export_pcb_gerber.h index c54f9c9d68..56a1254472 100644 --- a/common/jobs/job_export_pcb_gerber.h +++ b/common/jobs/job_export_pcb_gerber.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2022 Mark Roszko - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -33,6 +33,7 @@ public: JOB_EXPORT_PCB_GERBER( const std::string& aType ); JOB_EXPORT_PCB_GERBER(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; bool m_subtractSolderMaskFromSilk; bool m_includeNetlistAttributes; diff --git a/common/jobs/job_export_pcb_gerbers.cpp b/common/jobs/job_export_pcb_gerbers.cpp index 4646e8033c..156f377aa8 100644 --- a/common/jobs/job_export_pcb_gerbers.cpp +++ b/common/jobs/job_export_pcb_gerbers.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -40,7 +40,13 @@ JOB_EXPORT_PCB_GERBERS::JOB_EXPORT_PCB_GERBERS() : wxString JOB_EXPORT_PCB_GERBERS::GetDefaultDescription() const { - return wxString::Format( _( "PCB Gerbers export" ) ); + return _( "PCB Gerbers export" ); +} + + +wxString JOB_EXPORT_PCB_GERBERS::GetOptionsDialogTitle() const +{ + return _( "Export Gerbers Job Options" ); } diff --git a/common/jobs/job_export_pcb_gerbers.h b/common/jobs/job_export_pcb_gerbers.h index 374f3fc3ac..ac84c2afd9 100644 --- a/common/jobs/job_export_pcb_gerbers.h +++ b/common/jobs/job_export_pcb_gerbers.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2022 Mark Roszko - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -33,6 +33,7 @@ class KICOMMON_API JOB_EXPORT_PCB_GERBERS : public JOB_EXPORT_PCB_GERBER public: JOB_EXPORT_PCB_GERBERS(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; LSET m_layersIncludeOnAll; diff --git a/common/jobs/job_export_pcb_ipc2581.cpp b/common/jobs/job_export_pcb_ipc2581.cpp index d8b8ac01fd..31f34cc1cd 100644 --- a/common/jobs/job_export_pcb_ipc2581.cpp +++ b/common/jobs/job_export_pcb_ipc2581.cpp @@ -69,7 +69,13 @@ JOB_EXPORT_PCB_IPC2581::JOB_EXPORT_PCB_IPC2581() : wxString JOB_EXPORT_PCB_IPC2581::GetDefaultDescription() const { - return wxString::Format( _( "IPC2581 export" ) ); + return _( "IPC2581 export" ); +} + + +wxString JOB_EXPORT_PCB_IPC2581::GetOptionsDialogTitle() const +{ + return _( "Export IPC2581 Job Options" ); } diff --git a/common/jobs/job_export_pcb_ipc2581.h b/common/jobs/job_export_pcb_ipc2581.h index 9edc396f76..a36f3f6a89 100644 --- a/common/jobs/job_export_pcb_ipc2581.h +++ b/common/jobs/job_export_pcb_ipc2581.h @@ -30,6 +30,7 @@ class KICOMMON_API JOB_EXPORT_PCB_IPC2581 : public JOB public: JOB_EXPORT_PCB_IPC2581(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; void SetDefaultOutputPath( const wxString& aReferenceName ); diff --git a/common/jobs/job_export_pcb_odb.cpp b/common/jobs/job_export_pcb_odb.cpp index ec2db7d80f..8076f6f094 100644 --- a/common/jobs/job_export_pcb_odb.cpp +++ b/common/jobs/job_export_pcb_odb.cpp @@ -54,7 +54,13 @@ JOB_EXPORT_PCB_ODB::JOB_EXPORT_PCB_ODB() : wxString JOB_EXPORT_PCB_ODB::GetDefaultDescription() const { - return wxString::Format( _( "ODB++ export" ) ); + return _( "ODB++ export" ); +} + + +wxString JOB_EXPORT_PCB_ODB::GetOptionsDialogTitle() const +{ + return _( "Export ODB++ Job Options" ); } diff --git a/common/jobs/job_export_pcb_odb.h b/common/jobs/job_export_pcb_odb.h index b469495475..9a86fd1b19 100644 --- a/common/jobs/job_export_pcb_odb.h +++ b/common/jobs/job_export_pcb_odb.h @@ -29,6 +29,7 @@ class KICOMMON_API JOB_EXPORT_PCB_ODB : public JOB public: JOB_EXPORT_PCB_ODB(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; void SetDefaultOutputPath( const wxString& aReferenceName ); diff --git a/common/jobs/job_export_pcb_pdf.cpp b/common/jobs/job_export_pcb_pdf.cpp index 62a3302ada..ae671f221a 100644 --- a/common/jobs/job_export_pcb_pdf.cpp +++ b/common/jobs/job_export_pcb_pdf.cpp @@ -75,4 +75,10 @@ wxString JOB_EXPORT_PCB_PDF::GetDefaultDescription() const } +wxString JOB_EXPORT_PCB_PDF::GetOptionsDialogTitle() const +{ + return wxString::Format( _( "Export PDF Job Options" ) ); +} + + REGISTER_JOB( pcb_export_pdf, _HKI( "PCB: Export PDF" ), KIWAY::FACE_PCB, JOB_EXPORT_PCB_PDF ); \ No newline at end of file diff --git a/common/jobs/job_export_pcb_pdf.h b/common/jobs/job_export_pcb_pdf.h index 57492f86a8..3592f82e7b 100644 --- a/common/jobs/job_export_pcb_pdf.h +++ b/common/jobs/job_export_pcb_pdf.h @@ -34,6 +34,7 @@ class KICOMMON_API JOB_EXPORT_PCB_PDF : public JOB_EXPORT_PCB_PLOT public: JOB_EXPORT_PCB_PDF(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; bool m_pdfFrontFPPropertyPopups; bool m_pdfBackFPPropertyPopups; diff --git a/common/jobs/job_export_pcb_pos.cpp b/common/jobs/job_export_pcb_pos.cpp index 769b7072ce..0c150c66a8 100644 --- a/common/jobs/job_export_pcb_pos.cpp +++ b/common/jobs/job_export_pcb_pos.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -88,7 +88,13 @@ JOB_EXPORT_PCB_POS::JOB_EXPORT_PCB_POS() : wxString JOB_EXPORT_PCB_POS::GetDefaultDescription() const { - return wxString::Format( _( "Placement data export" ) ); + return _( "Placement data export" ); +} + + +wxString JOB_EXPORT_PCB_POS::GetOptionsDialogTitle() const +{ + return _( "Export Position Data Job Options" ); } diff --git a/common/jobs/job_export_pcb_pos.h b/common/jobs/job_export_pcb_pos.h index 7fc7a59904..778726429f 100644 --- a/common/jobs/job_export_pcb_pos.h +++ b/common/jobs/job_export_pcb_pos.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2022 Mark Roszko - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -31,6 +31,7 @@ class KICOMMON_API JOB_EXPORT_PCB_POS : public JOB public: JOB_EXPORT_PCB_POS(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; void SetDefaultOutputPath( const wxString& aReferenceName ); diff --git a/common/jobs/job_export_pcb_svg.cpp b/common/jobs/job_export_pcb_svg.cpp index 74d1fff99c..716c703d9a 100644 --- a/common/jobs/job_export_pcb_svg.cpp +++ b/common/jobs/job_export_pcb_svg.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -55,7 +55,13 @@ JOB_EXPORT_PCB_SVG::JOB_EXPORT_PCB_SVG() : wxString JOB_EXPORT_PCB_SVG::GetDefaultDescription() const { - return wxString::Format( _( "PCB SVG export" ) ); + return _( "PCB SVG export" ); +} + + +wxString JOB_EXPORT_PCB_SVG::GetOptionsDialogTitle() const +{ + return _( "Export SVG Job Options" ); } diff --git a/common/jobs/job_export_pcb_svg.h b/common/jobs/job_export_pcb_svg.h index 0f7691cad3..bd7663a5f1 100644 --- a/common/jobs/job_export_pcb_svg.h +++ b/common/jobs/job_export_pcb_svg.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2022 Mark Roszko - * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -33,6 +33,7 @@ class KICOMMON_API JOB_EXPORT_PCB_SVG : public JOB_EXPORT_PCB_PLOT public: JOB_EXPORT_PCB_SVG(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; int m_pageSizeMode; unsigned int m_precision; diff --git a/common/jobs/job_export_sch_bom.cpp b/common/jobs/job_export_sch_bom.cpp index 74725eabea..0fab71bc15 100644 --- a/common/jobs/job_export_sch_bom.cpp +++ b/common/jobs/job_export_sch_bom.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -86,4 +86,11 @@ wxString JOB_EXPORT_SCH_BOM::GetDefaultDescription() const return wxString::Format( _( "Schematic BOM export" ) ); } + +wxString JOB_EXPORT_SCH_BOM::GetOptionsDialogTitle() const +{ + return wxString::Format( _( "Export BOM Job Options" ) ); +} + + REGISTER_JOB( sch_export_bom, _HKI( "Schematic: Export BOM" ), KIWAY::FACE_SCH, JOB_EXPORT_SCH_BOM ); \ No newline at end of file diff --git a/common/jobs/job_export_sch_bom.h b/common/jobs/job_export_sch_bom.h index 0b59150152..8a765644da 100644 --- a/common/jobs/job_export_sch_bom.h +++ b/common/jobs/job_export_sch_bom.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mike Williams - * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -31,6 +31,7 @@ class KICOMMON_API JOB_EXPORT_SCH_BOM : public JOB public: JOB_EXPORT_SCH_BOM(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; // Basic options wxString m_filename; diff --git a/common/jobs/job_export_sch_netlist.cpp b/common/jobs/job_export_sch_netlist.cpp index bec90df104..5a67f2a7c8 100644 --- a/common/jobs/job_export_sch_netlist.cpp +++ b/common/jobs/job_export_sch_netlist.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -58,7 +58,13 @@ JOB_EXPORT_SCH_NETLIST::JOB_EXPORT_SCH_NETLIST() : wxString JOB_EXPORT_SCH_NETLIST::GetDefaultDescription() const { - return wxString::Format( _( "Schematic Netlist Export" ) ); + return _( "Schematic Netlist Export" ); +} + + +wxString JOB_EXPORT_SCH_NETLIST::GetOptionsDialogTitle() const +{ + return wxString::Format( _( "Export Netlist Job Options" ) ); } diff --git a/common/jobs/job_export_sch_netlist.h b/common/jobs/job_export_sch_netlist.h index 6213c5eb9e..94735210aa 100644 --- a/common/jobs/job_export_sch_netlist.h +++ b/common/jobs/job_export_sch_netlist.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2022 Mark Roszko - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -30,6 +30,7 @@ class KICOMMON_API JOB_EXPORT_SCH_NETLIST : public JOB public: JOB_EXPORT_SCH_NETLIST(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; wxString m_filename; diff --git a/common/jobs/job_export_sch_plot.cpp b/common/jobs/job_export_sch_plot.cpp index 6e1e954f1d..fc97b5ff10 100644 --- a/common/jobs/job_export_sch_plot.cpp +++ b/common/jobs/job_export_sch_plot.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -125,7 +125,13 @@ JOB_EXPORT_SCH_PLOT_PDF::JOB_EXPORT_SCH_PLOT_PDF() : wxString JOB_EXPORT_SCH_PLOT_PDF::GetDefaultDescription() const { - return wxString::Format( _( "Schematic PDF Plot" ) ); + return _( "Schematic PDF Plot" ); +} + + +wxString JOB_EXPORT_SCH_PLOT_PDF::GetOptionsDialogTitle() const +{ + return _( "Export PDF Job Options" ); } @@ -138,7 +144,13 @@ JOB_EXPORT_SCH_PLOT_DXF ::JOB_EXPORT_SCH_PLOT_DXF () : wxString JOB_EXPORT_SCH_PLOT_DXF::GetDefaultDescription() const { - return wxString::Format( _( "Schematic DXF Plot" ) ); + return _( "Schematic DXF Plot" ); +} + + +wxString JOB_EXPORT_SCH_PLOT_DXF::GetOptionsDialogTitle() const +{ + return _( "Export DXF Job Options" ); } @@ -151,7 +163,13 @@ JOB_EXPORT_SCH_PLOT_SVG::JOB_EXPORT_SCH_PLOT_SVG() : wxString JOB_EXPORT_SCH_PLOT_SVG::GetDefaultDescription() const { - return wxString::Format( _( "Schematic SVG Plot" ) ); + return _( "Schematic SVG Plot" ); +} + + +wxString JOB_EXPORT_SCH_PLOT_SVG::GetOptionsDialogTitle() const +{ + return _( "Export SVG Job Options" ); } @@ -164,7 +182,13 @@ JOB_EXPORT_SCH_PLOT_PS::JOB_EXPORT_SCH_PLOT_PS() : wxString JOB_EXPORT_SCH_PLOT_PS::GetDefaultDescription() const { - return wxString::Format( _( "Schematic PS Plot" ) ); + return _( "Schematic Postscript Plot" ); +} + + +wxString JOB_EXPORT_SCH_PLOT_PS::GetOptionsDialogTitle() const +{ + return _( "Export Postscript Job Options" ); } @@ -177,7 +201,13 @@ JOB_EXPORT_SCH_PLOT_HPGL::JOB_EXPORT_SCH_PLOT_HPGL() : wxString JOB_EXPORT_SCH_PLOT_HPGL::GetDefaultDescription() const { - return wxString::Format( _( "Schematic HPGL Plot" ) ); + return _( "Schematic HPGL Plot" ); +} + + +wxString JOB_EXPORT_SCH_PLOT_HPGL::GetOptionsDialogTitle() const +{ + return _( "Export HPGL Job Options" ); } @@ -185,7 +215,7 @@ REGISTER_JOB( sch_export_plot_svg, _HKI( "Schematic: Export SVG" ), KIWAY::FACE_ JOB_EXPORT_SCH_PLOT_SVG ); REGISTER_JOB( sch_export_plot_hpgl, _HKI( "Schematic: Export HPGL" ), KIWAY::FACE_SCH, JOB_EXPORT_SCH_PLOT_HPGL ); -REGISTER_JOB( sch_export_plot_ps, _HKI( "Schematic: Export PS" ), KIWAY::FACE_SCH, +REGISTER_JOB( sch_export_plot_ps, _HKI( "Schematic: Export Postscript" ), KIWAY::FACE_SCH, JOB_EXPORT_SCH_PLOT_PS ); REGISTER_JOB( sch_export_plot_dxf, _HKI( "Schematic: Export DXF" ), KIWAY::FACE_SCH, JOB_EXPORT_SCH_PLOT_DXF ); diff --git a/common/jobs/job_export_sch_plot.h b/common/jobs/job_export_sch_plot.h index dd80c16b2c..1b345ec336 100644 --- a/common/jobs/job_export_sch_plot.h +++ b/common/jobs/job_export_sch_plot.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2022 Mark Roszko - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -107,6 +107,7 @@ class KICOMMON_API JOB_EXPORT_SCH_PLOT_PDF : public JOB_EXPORT_SCH_PLOT public: JOB_EXPORT_SCH_PLOT_PDF(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; }; @@ -115,6 +116,7 @@ class KICOMMON_API JOB_EXPORT_SCH_PLOT_DXF : public JOB_EXPORT_SCH_PLOT public: JOB_EXPORT_SCH_PLOT_DXF(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; }; @@ -123,6 +125,7 @@ class KICOMMON_API JOB_EXPORT_SCH_PLOT_SVG : public JOB_EXPORT_SCH_PLOT public: JOB_EXPORT_SCH_PLOT_SVG(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; }; @@ -131,6 +134,7 @@ class KICOMMON_API JOB_EXPORT_SCH_PLOT_PS : public JOB_EXPORT_SCH_PLOT public: JOB_EXPORT_SCH_PLOT_PS(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; }; @@ -139,6 +143,7 @@ class KICOMMON_API JOB_EXPORT_SCH_PLOT_HPGL : public JOB_EXPORT_SCH_PLOT public: JOB_EXPORT_SCH_PLOT_HPGL(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; }; #endif \ No newline at end of file diff --git a/common/jobs/job_pcb_drc.cpp b/common/jobs/job_pcb_drc.cpp index b2798ba529..6d11ae0a47 100644 --- a/common/jobs/job_pcb_drc.cpp +++ b/common/jobs/job_pcb_drc.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -34,7 +34,13 @@ JOB_PCB_DRC::JOB_PCB_DRC() : wxString JOB_PCB_DRC::GetDefaultDescription() const { - return wxString::Format( _( "Perform PCB DRC" ) ); + return _( "Perform PCB DRC" ); +} + + +wxString JOB_PCB_DRC::GetOptionsDialogTitle() const +{ + return _( "DRC Job Options" ); } diff --git a/common/jobs/job_pcb_drc.h b/common/jobs/job_pcb_drc.h index 39277333e7..c55e733be0 100644 --- a/common/jobs/job_pcb_drc.h +++ b/common/jobs/job_pcb_drc.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -27,6 +27,7 @@ class KICOMMON_API JOB_PCB_DRC : public JOB_RC public: JOB_PCB_DRC(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; bool m_reportAllTrackErrors; bool m_parity; diff --git a/common/jobs/job_sch_erc.cpp b/common/jobs/job_sch_erc.cpp index a3cbad3c63..d6ec98d1cf 100644 --- a/common/jobs/job_sch_erc.cpp +++ b/common/jobs/job_sch_erc.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -30,7 +30,13 @@ JOB_SCH_ERC::JOB_SCH_ERC() : wxString JOB_SCH_ERC::GetDefaultDescription() const { - return wxString::Format( _( "Perform Schematic ERC" ) ); + return _( "Perform Schematic ERC" ); +} + + +wxString JOB_SCH_ERC::GetOptionsDialogTitle() const +{ + return _( "Schematic ERC Job Options" ); } diff --git a/common/jobs/job_sch_erc.h b/common/jobs/job_sch_erc.h index 1e11d4cd6c..d6cc389865 100644 --- a/common/jobs/job_sch_erc.h +++ b/common/jobs/job_sch_erc.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2023 Mark Roszko - * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -27,4 +27,5 @@ class KICOMMON_API JOB_SCH_ERC : public JOB_RC public: JOB_SCH_ERC(); wxString GetDefaultDescription() const override; + wxString GetOptionsDialogTitle() const override; }; \ No newline at end of file diff --git a/eeschema/dialogs/dialog_erc_job_config.cpp b/eeschema/dialogs/dialog_erc_job_config.cpp index bb778b8eff..93d450390e 100644 --- a/eeschema/dialogs/dialog_erc_job_config.cpp +++ b/eeschema/dialogs/dialog_erc_job_config.cpp @@ -4,6 +4,8 @@ DIALOG_ERC_JOB_CONFIG::DIALOG_ERC_JOB_CONFIG( wxWindow* parent, JOB_SCH_ERC* aJo DIALOG_RC_JOB( parent, aJob, _( "ERC Job Settings" ) ), m_ercJob( aJob ) { + SetTitle( m_ercJob->GetOptionsDialogTitle() ); + m_cbAllTrackViolations->Hide(); m_cbSchParity->Hide(); diff --git a/eeschema/dialogs/dialog_export_netlist.cpp b/eeschema/dialogs/dialog_export_netlist.cpp index ec78f1b491..f41edb2684 100644 --- a/eeschema/dialogs/dialog_export_netlist.cpp +++ b/eeschema/dialogs/dialog_export_netlist.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2013-2017 Jean-Pierre Charras, jp.charras@wanadoo.fr * Copyright (C) 2013 Wayne Stambaugh - * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -45,8 +46,6 @@ #include #include #include -#include -#include #include #include @@ -257,6 +256,7 @@ DIALOG_EXPORT_NETLIST::DIALOG_EXPORT_NETLIST( SCH_EDIT_FRAME* aEditFrame, wxWind InstallPageSpiceModel(); wxString selectedPageFormatName; + if( !m_job ) { m_outputPath->Hide(); @@ -270,6 +270,8 @@ DIALOG_EXPORT_NETLIST::DIALOG_EXPORT_NETLIST( SCH_EDIT_FRAME* aEditFrame, wxWind } else { + SetTitle( m_job->GetOptionsDialogTitle() ); + m_MessagesBox->Hide(); m_outputPath->SetValue( m_job->GetOutputPath() ); @@ -286,6 +288,10 @@ DIALOG_EXPORT_NETLIST::DIALOG_EXPORT_NETLIST( SCH_EDIT_FRAME* aEditFrame, wxWind m_buttonDelGenerator->Hide(); } + // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and + // non-job versions (which have different sizes). + m_hash_key = TO_UTF8( GetTitle() ); + for( int ii = 0; ii < DEFINED_NETLISTS_COUNT + CUSTOMPANEL_COUNTMAX; ++ii ) { if( EXPORT_NETLIST_PAGE* candidate = m_PanelNetType[ii] ) diff --git a/eeschema/dialogs/dialog_export_netlist_base.cpp b/eeschema/dialogs/dialog_export_netlist_base.cpp index c2ca48a502..3b0b9afff1 100644 --- a/eeschema/dialogs/dialog_export_netlist_base.cpp +++ b/eeschema/dialogs/dialog_export_netlist_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) +// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -11,12 +11,6 @@ /////////////////////////////////////////////////////////////////////////// -BEGIN_EVENT_TABLE( DIALOG_EXPORT_NETLIST_BASE, DIALOG_SHIM ) - EVT_NOTEBOOK_PAGE_CHANGED( ID_CHANGE_NOTEBOOK_PAGE, DIALOG_EXPORT_NETLIST_BASE::_wxFB_OnNetlistTypeSelection ) - EVT_BUTTON( ID_ADD_PLUGIN, DIALOG_EXPORT_NETLIST_BASE::_wxFB_OnAddGenerator ) - EVT_BUTTON( ID_DEL_PLUGIN, DIALOG_EXPORT_NETLIST_BASE::_wxFB_OnDelGenerator ) -END_EVENT_TABLE() - DIALOG_EXPORT_NETLIST_BASE::DIALOG_EXPORT_NETLIST_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); @@ -30,9 +24,9 @@ DIALOG_EXPORT_NETLIST_BASE::DIALOG_EXPORT_NETLIST_BASE( wxWindow* parent, wxWind wxBoxSizer* bSizer8; bSizer8 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextOutputPath = new wxStaticText( this, wxID_ANY, _("Output Path:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextOutputPath = new wxStaticText( this, wxID_ANY, _("Output path:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextOutputPath->Wrap( -1 ); - bSizer8->Add( m_staticTextOutputPath, 0, wxALL, 5 ); + bSizer8->Add( m_staticTextOutputPath, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_outputPath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_outputPath->SetMinSize( wxSize( 450,-1 ) ); @@ -46,7 +40,7 @@ DIALOG_EXPORT_NETLIST_BASE::DIALOG_EXPORT_NETLIST_BASE( wxWindow* parent, wxWind m_NoteBook->SetMinSize( wxSize( 540,-1 ) ); - bUpperSizer->Add( m_NoteBook, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bUpperSizer->Add( m_NoteBook, 0, wxEXPAND|wxALL, 5 ); wxBoxSizer* bSizerMsgPanel; bSizerMsgPanel = new wxBoxSizer( wxVERTICAL ); @@ -55,7 +49,7 @@ DIALOG_EXPORT_NETLIST_BASE::DIALOG_EXPORT_NETLIST_BASE( wxWindow* parent, wxWind bSizerMsgPanel->Add( m_MessagesBox, 1, wxEXPAND|wxTOP, 5 ); - bUpperSizer->Add( bSizerMsgPanel, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bUpperSizer->Add( bSizerMsgPanel, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 ); @@ -86,15 +80,21 @@ DIALOG_EXPORT_NETLIST_BASE::DIALOG_EXPORT_NETLIST_BASE( wxWindow* parent, wxWind bMainSizer->Fit( this ); this->Centre( wxBOTH ); + + // Connect Events + m_NoteBook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_EXPORT_NETLIST_BASE::OnNetlistTypeSelection ), NULL, this ); + m_buttonAddGenerator->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_NETLIST_BASE::OnAddGenerator ), NULL, this ); + m_buttonDelGenerator->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_NETLIST_BASE::OnDelGenerator ), NULL, this ); } DIALOG_EXPORT_NETLIST_BASE::~DIALOG_EXPORT_NETLIST_BASE() { -} + // Disconnect Events + m_NoteBook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_EXPORT_NETLIST_BASE::OnNetlistTypeSelection ), NULL, this ); + m_buttonAddGenerator->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_NETLIST_BASE::OnAddGenerator ), NULL, this ); + m_buttonDelGenerator->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_NETLIST_BASE::OnDelGenerator ), NULL, this ); -BEGIN_EVENT_TABLE( NETLIST_DIALOG_ADD_GENERATOR_BASE, DIALOG_SHIM ) - EVT_BUTTON( wxID_BROWSE_PLUGINS, NETLIST_DIALOG_ADD_GENERATOR_BASE::_wxFB_OnBrowseGenerators ) -END_EVENT_TABLE() +} NETLIST_DIALOG_ADD_GENERATOR_BASE::NETLIST_DIALOG_ADD_GENERATOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { @@ -149,8 +149,14 @@ NETLIST_DIALOG_ADD_GENERATOR_BASE::NETLIST_DIALOG_ADD_GENERATOR_BASE( wxWindow* bSizerMain->Fit( this ); this->Centre( wxBOTH ); + + // Connect Events + m_buttonGenerator->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NETLIST_DIALOG_ADD_GENERATOR_BASE::OnBrowseGenerators ), NULL, this ); } NETLIST_DIALOG_ADD_GENERATOR_BASE::~NETLIST_DIALOG_ADD_GENERATOR_BASE() { + // Disconnect Events + m_buttonGenerator->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NETLIST_DIALOG_ADD_GENERATOR_BASE::OnBrowseGenerators ), NULL, this ); + } diff --git a/eeschema/dialogs/dialog_export_netlist_base.fbp b/eeschema/dialogs/dialog_export_netlist_base.fbp index 0d8d48db28..c76d6a55e4 100644 --- a/eeschema/dialogs/dialog_export_netlist_base.fbp +++ b/eeschema/dialogs/dialog_export_netlist_base.fbp @@ -1,36 +1,34 @@ - + + ; C++ - - 0 - table - none - - - 0 - 1 + 1 + source_name + 0 + 0 res UTF-8 + connect dialog_export_netlist_base 1000 + none + + 1 - 1 - UI DIALOG_EXPORT_NETLIST_BASE + . - 0 - source_name - 1 - 0 - source_name - - - 1 + 1 + 1 + 1 + 1 + UI + 0 + 0 0 - 0 0 wxAUI_MGR_DEFAULT @@ -84,7 +82,7 @@ none 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -115,7 +113,7 @@ 0 0 wxID_ANY - Output Path: + Output path: 0 0 @@ -213,7 +211,7 @@ 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT + wxEXPAND|wxALL 0 1 @@ -274,7 +272,7 @@ 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT + wxEXPAND|wxRIGHT|wxLEFT 1 diff --git a/eeschema/dialogs/dialog_export_netlist_base.h b/eeschema/dialogs/dialog_export_netlist_base.h index 77da8f7ce1..b224032058 100644 --- a/eeschema/dialogs/dialog_export_netlist_base.h +++ b/eeschema/dialogs/dialog_export_netlist_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) +// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -31,28 +31,19 @@ class WX_HTML_REPORT_PANEL; /////////////////////////////////////////////////////////////////////////// +#define ID_CHANGE_NOTEBOOK_PAGE 1000 +#define ID_ADD_PLUGIN 1001 +#define ID_DEL_PLUGIN 1002 +#define wxID_BROWSE_PLUGINS 1003 + /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_EXPORT_NETLIST_BASE /////////////////////////////////////////////////////////////////////////////// class DIALOG_EXPORT_NETLIST_BASE : public DIALOG_SHIM { - DECLARE_EVENT_TABLE() private: - // Private event handlers - void _wxFB_OnNetlistTypeSelection( wxNotebookEvent& event ){ OnNetlistTypeSelection( event ); } - void _wxFB_OnAddGenerator( wxCommandEvent& event ){ OnAddGenerator( event ); } - void _wxFB_OnDelGenerator( wxCommandEvent& event ){ OnDelGenerator( event ); } - - protected: - enum - { - ID_CHANGE_NOTEBOOK_PAGE = 1000, - ID_ADD_PLUGIN, - ID_DEL_PLUGIN, - }; - wxStaticText* m_staticTextOutputPath; wxTextCtrl* m_outputPath; wxNotebook* m_NoteBook; @@ -83,19 +74,9 @@ class DIALOG_EXPORT_NETLIST_BASE : public DIALOG_SHIM /////////////////////////////////////////////////////////////////////////////// class NETLIST_DIALOG_ADD_GENERATOR_BASE : public DIALOG_SHIM { - DECLARE_EVENT_TABLE() private: - // Private event handlers - void _wxFB_OnBrowseGenerators( wxCommandEvent& event ){ OnBrowseGenerators( event ); } - - protected: - enum - { - wxID_BROWSE_PLUGINS = 1000, - }; - wxStaticText* m_staticTextName; wxTextCtrl* m_textCtrlName; wxStaticText* m_staticTextCmd; diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp index c462609be1..f0123cf9b6 100644 --- a/eeschema/dialogs/dialog_plot_schematic.cpp +++ b/eeschema/dialogs/dialog_plot_schematic.cpp @@ -26,6 +26,7 @@ #include #include // For ExpandEnvVarSubstitutions +#include "string_utils.h" #include "widgets/wx_html_report_panel.h" #include #include @@ -63,18 +64,17 @@ HPGL_PAGE_SIZE DIALOG_PLOT_SCHEMATIC::m_HPGLPaperSizeSelect = HPGL_PAGE_SIZE::DE DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame ) : DIALOG_PLOT_SCHEMATIC( aEditFrame, aEditFrame ) { - } DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame, wxWindow* aParent, - JOB_EXPORT_SCH_PLOT* aJob ) - : DIALOG_PLOT_SCHEMATIC_BASE( aEditFrame ), - m_editFrame( aEditFrame ), - m_plotFormat( PLOT_FORMAT::UNDEFINED ), - m_HPGLPenSize( 1.0 ), - m_defaultLineWidth( aEditFrame, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits ), - m_penWidth( aEditFrame, m_penWidthLabel, m_penWidthCtrl, m_penWidthUnits ), m_job( aJob ) + JOB_EXPORT_SCH_PLOT* aJob ) : + DIALOG_PLOT_SCHEMATIC_BASE( aEditFrame ), + m_editFrame( aEditFrame ), + m_plotFormat( PLOT_FORMAT::UNDEFINED ), + m_HPGLPenSize( 1.0 ), + m_defaultLineWidth( aEditFrame, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits ), + m_penWidth( aEditFrame, m_penWidthLabel, m_penWidthCtrl, m_penWidthUnits ), m_job( aJob ) { m_configChanged = false; @@ -88,6 +88,8 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame, wxWind } else { + SetTitle( m_job->GetOptionsDialogTitle() ); + m_browseButton->Hide(); m_MessagesBox->Hide(); @@ -98,6 +100,10 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame, wxWind { wxID_CANCEL, _( "Close" ) } } ); } + // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and + // non-job versions (which have different sizes). + m_hash_key = TO_UTF8( GetTitle() ); + initDlg(); // Now all widgets have the size fixed, call FinishDialogSettings diff --git a/eeschema/dialogs/dialog_plot_schematic_base.cpp b/eeschema/dialogs/dialog_plot_schematic_base.cpp index d7b71af590..984871e63e 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a) +// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! diff --git a/eeschema/dialogs/dialog_plot_schematic_base.fbp b/eeschema/dialogs/dialog_plot_schematic_base.fbp index abcdb2ee62..eaf58a2f3c 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.fbp +++ b/eeschema/dialogs/dialog_plot_schematic_base.fbp @@ -1,36 +1,34 @@ - + + ; C++ - - 1 - connect - none - - - 0 - 1 + 1 + source_name + 0 + 0 res UTF-8 + connect dialog_plot_schematic_base 1000 + none + + 1 - 1 - UI Dialog_plot_schematic_base + . - 0 - source_name - 1 - 0 - source_name - - - 1 + 1 + 1 + 1 + 1 + UI + 0 + 0 0 - 0 0 wxAUI_MGR_DEFAULT @@ -53,7 +51,7 @@ -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h - Plot Schematic Options + Plot Schematic 0 diff --git a/eeschema/dialogs/dialog_plot_schematic_base.h b/eeschema/dialogs/dialog_plot_schematic_base.h index b0f4dd2e43..9d3f67191f 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.h +++ b/eeschema/dialogs/dialog_plot_schematic_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a) +// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -37,6 +37,7 @@ class WX_HTML_REPORT_PANEL; /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_PLOT_SCHEMATIC_BASE /////////////////////////////////////////////////////////////////////////////// @@ -89,7 +90,7 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM public: - DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot Schematic Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot Schematic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PLOT_SCHEMATIC_BASE(); diff --git a/eeschema/dialogs/dialog_symbol_fields_table.cpp b/eeschema/dialogs/dialog_symbol_fields_table.cpp index 024f2e106d..7c9a6b47d8 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 Oliver Walters - * Copyright (C) 2017-2023, 2024 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2017-2025, 2024 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 @@ -272,8 +272,11 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent, SetUserBomPresets( m_schSettings.m_BomPresets ); BOM_PRESET preset = m_schSettings.m_BomSettings; + if( m_job ) { + SetTitle( m_job->GetOptionsDialogTitle() ); + preset.name = m_job->m_bomPresetName; preset.excludeDNP = m_job->m_excludeDNP; preset.includeExcludedFromBOM = m_job->m_includeExcludedFromBOM; @@ -305,6 +308,11 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent, i++; } } + + // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and + // non-job versions (which have different sizes). + m_hash_key = TO_UTF8( GetTitle() ); + ApplyBomPreset( preset ); syncBomPresetSelection(); diff --git a/pcbnew/dialogs/dialog_drc_job_config.cpp b/pcbnew/dialogs/dialog_drc_job_config.cpp index 08f0714187..cc5f53620a 100644 --- a/pcbnew/dialogs/dialog_drc_job_config.cpp +++ b/pcbnew/dialogs/dialog_drc_job_config.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2024 Mark Roszko - * Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 as published by the @@ -24,6 +24,7 @@ DIALOG_DRC_JOB_CONFIG::DIALOG_DRC_JOB_CONFIG( wxWindow* parent, JOB_PCB_DRC* aJo DIALOG_RC_JOB( parent, aJob, _( "DRC Job Settings" ) ), m_drcJob( aJob ) { + SetTitle( aJob->GetOptionsDialogTitle() ); } diff --git a/pcbnew/dialogs/dialog_export_2581.cpp b/pcbnew/dialogs/dialog_export_2581.cpp index a605bf341c..3311b9a3ed 100644 --- a/pcbnew/dialogs/dialog_export_2581.cpp +++ b/pcbnew/dialogs/dialog_export_2581.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -78,7 +78,8 @@ DIALOG_EXPORT_2581::DIALOG_EXPORT_2581(JOB_EXPORT_PCB_IPC2581* aJob, PCB_EDIT_FR { m_browseButton->Hide(); - SetupStandardButtons( { { wxID_OK, _( "Save" ) }, { wxID_CANCEL, _( "Close" ) } } ); + SetupStandardButtons( { { wxID_OK, _( "Save" ) }, + { wxID_CANCEL, _( "Close" ) } } ); m_outputFileName->SetValue( m_job->GetOutputPath() ); @@ -265,12 +266,18 @@ bool DIALOG_EXPORT_2581::Init() } else { + SetTitle( m_job->GetOptionsDialogTitle() ); + m_choiceUnits->SetSelection( static_cast( m_job->m_units ) ); m_precision->SetValue( static_cast( m_job->m_precision ) ); m_versionChoice->SetSelection( m_job->m_version == JOB_EXPORT_PCB_IPC2581::IPC2581_VERSION::B ? 0 : 1 ); m_cbCompress->SetValue( m_job->m_compress ); } + // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and + // non-job versions (which have different sizes). + m_hash_key = TO_UTF8( GetTitle() ); + wxCommandEvent dummy; onCompressCheck( dummy ); @@ -293,18 +300,18 @@ bool DIALOG_EXPORT_2581::Init() if( !m_job ) { internalIdCol = prj.m_IP2581Bom.id; - mpnCol = prj.m_IP2581Bom.MPN; - distPnCol = prj.m_IP2581Bom.distPN; - mfgCol = prj.m_IP2581Bom.mfg; - distCol = prj.m_IP2581Bom.dist; - } - else - { - internalIdCol = m_job->m_colInternalId; - mpnCol = m_job->m_colMfgPn; - distPnCol = m_job->m_colDistPn; - mfgCol = m_job->m_colMfg; - distCol = m_job->m_colDist; + mpnCol = prj.m_IP2581Bom.MPN; + distPnCol = prj.m_IP2581Bom.distPN; + mfgCol = prj.m_IP2581Bom.mfg; + distCol = prj.m_IP2581Bom.dist; + } + else + { + internalIdCol = m_job->m_colInternalId; + mpnCol = m_job->m_colMfgPn; + distPnCol = m_job->m_colDistPn; + mfgCol = m_job->m_colMfg; + distCol = m_job->m_colDist; } if( !m_choiceMPN->SetStringSelection( internalIdCol ) ) diff --git a/pcbnew/dialogs/dialog_export_odbpp.cpp b/pcbnew/dialogs/dialog_export_odbpp.cpp index 3f3ddcd44f..e24afaf527 100644 --- a/pcbnew/dialogs/dialog_export_odbpp.cpp +++ b/pcbnew/dialogs/dialog_export_odbpp.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2023-2025 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 as published by the @@ -51,11 +51,14 @@ static wxString s_oemColumn = wxEmptyString; DIALOG_EXPORT_ODBPP::DIALOG_EXPORT_ODBPP( PCB_EDIT_FRAME* aParent ) : - DIALOG_EXPORT_ODBPP_BASE( aParent ), m_parent( aParent ), m_job( nullptr ) + DIALOG_EXPORT_ODBPP_BASE( aParent ), + m_parent( aParent ), + m_job( nullptr ) { m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) ); - SetupStandardButtons( { { wxID_OK, _( "Export" ) }, { wxID_CANCEL, _( "Close" ) } } ); + SetupStandardButtons( { { wxID_OK, _( "Export" ) }, + { wxID_CANCEL, _( "Close" ) } } ); wxString path = m_parent->GetLastPath( LAST_PATH_ODBPP ); @@ -81,11 +84,14 @@ DIALOG_EXPORT_ODBPP::DIALOG_EXPORT_ODBPP( PCB_EDIT_FRAME* aParent ) : DIALOG_EXPORT_ODBPP::DIALOG_EXPORT_ODBPP( JOB_EXPORT_PCB_ODB* aJob, PCB_EDIT_FRAME* aEditFrame, wxWindow* aParent ) : - DIALOG_EXPORT_ODBPP_BASE( aParent ), m_parent( aEditFrame ), m_job( aJob ) + DIALOG_EXPORT_ODBPP_BASE( aParent ), + m_parent( aEditFrame ), + m_job( aJob ) { m_browseButton->Hide(); - SetupStandardButtons( { { wxID_OK, _( "Save" ) }, { wxID_CANCEL, _( "Close" ) } } ); + SetupStandardButtons( { { wxID_OK, _( "Save" ) }, + { wxID_CANCEL, _( "Close" ) } } ); m_outputFileName->SetValue( m_job->GetOutputPath() ); @@ -240,11 +246,17 @@ bool DIALOG_EXPORT_ODBPP::Init() } else { + SetTitle( m_job->GetOptionsDialogTitle() ); + m_choiceUnits->SetSelection( static_cast( m_job->m_units ) ); m_precision->SetValue( m_job->m_precision ); m_choiceCompress->SetSelection( static_cast( m_job->m_compressionMode ) ); } + // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and + // non-job versions (which have different sizes). + m_hash_key = TO_UTF8( GetTitle() ); + return true; } diff --git a/pcbnew/dialogs/dialog_export_step.cpp b/pcbnew/dialogs/dialog_export_step.cpp index 20fad91583..d1b8b60063 100644 --- a/pcbnew/dialogs/dialog_export_step.cpp +++ b/pcbnew/dialogs/dialog_export_step.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2016 Cirilo Bernardo - * Copyright (C) 2016-2024 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2016-2025 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 @@ -103,7 +103,7 @@ DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aEditFrame, wxWindow* aP m_job( aJob ), m_boardPath( aBoardPath ) { - if( m_job == nullptr ) + if( !m_job ) { m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) ); SetupStandardButtons( { { wxID_OK, _( "Export" ) }, @@ -111,11 +111,17 @@ DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aEditFrame, wxWindow* aP } else { + SetTitle( m_job->GetOptionsDialogTitle() ); + m_browseButton->Hide(); SetupStandardButtons( { { wxID_OK, _( "Save" ) }, { wxID_CANCEL, _( "Close" ) } } ); } + // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and + // non-job versions (which have different sizes). + m_hash_key = TO_UTF8( GetTitle() ); + // Build default output file name // (last saved filename in project or built from board filename) wxString path = m_editFrame->GetLastPath( LAST_PATH_STEP ); diff --git a/pcbnew/dialogs/dialog_gen_footprint_position.cpp b/pcbnew/dialogs/dialog_gen_footprint_position.cpp index 41498b64cf..3430fff5d2 100644 --- a/pcbnew/dialogs/dialog_gen_footprint_position.cpp +++ b/pcbnew/dialogs/dialog_gen_footprint_position.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2015-2025 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 @@ -55,8 +55,8 @@ DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION( PCB_EDIT_FRAME* aE m_reporter = &m_messagesPanel->Reporter(); initDialog(); - SetupStandardButtons( - { { wxID_OK, _( "Generate Position File" ) }, { wxID_CANCEL, _( "Close" ) } } ); + SetupStandardButtons( { { wxID_OK, _( "Generate Position File" ) }, + { wxID_CANCEL, _( "Close" ) } } ); GetSizer()->SetSizeHints( this ); Centre(); @@ -74,7 +74,8 @@ DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION( JOB_EXPORT_PCB_POS m_messagesPanel->Hide(); initDialog(); - SetupStandardButtons( { { wxID_OK, _( "Save" ) }, { wxID_CANCEL, _( "Close" ) } } ); + SetupStandardButtons( { { wxID_OK, _( "Save" ) }, + { wxID_CANCEL, _( "Close" ) } } ); GetSizer()->SetSizeHints( this ); Centre(); @@ -110,6 +111,8 @@ void DIALOG_GEN_FOOTPRINT_POSITION::initDialog() } else { + SetTitle( m_job->GetOptionsDialogTitle() ); + m_browseButton->Hide(); m_units = m_job->m_units == JOB_EXPORT_PCB_POS::UNITS::INCHES ? EDA_UNITS::INCHES @@ -130,6 +133,9 @@ void DIALOG_GEN_FOOTPRINT_POSITION::initDialog() m_messagesPanel->Hide(); } + // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and + // non-job versions (which have different sizes). + m_hash_key = TO_UTF8( GetTitle() ); GetSizer()->SetSizeHints( this ); } diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index afe541a9aa..5c29f67b90 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 1992-2019 Jean_Pierre Charras - * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 @@ -100,7 +100,8 @@ DIALOG_GENDRILL::DIALOG_GENDRILL( PCB_EDIT_FRAME* aPcbEditFrame, JOB_EXPORT_PCB_ bMainSizer->Remove( bMsgSizer ); m_messagesBox->Hide(); - SetupStandardButtons( { { wxID_OK, _( "Save" ) }, { wxID_CANCEL, _( "Cancel" ) } } ); + SetupStandardButtons( { { wxID_OK, _( "Save" ) }, + { wxID_CANCEL, _( "Cancel" ) } } ); m_buttonsSizer->Layout(); SetReturnCode( 1 ); @@ -140,7 +141,11 @@ bool DIALOG_GENDRILL::TransferDataToWindow() void DIALOG_GENDRILL::initDialog() { - if( !m_job ) + if( m_job ) + { + SetTitle( m_job->GetOptionsDialogTitle() ); + } + else { auto cfg = m_pcbEditFrame->GetPcbNewSettings(); @@ -160,6 +165,10 @@ void DIALOG_GENDRILL::initDialog() m_mapFileType = m_Choice_Drill_Map->GetCount() - 1; // last item in list = default = PDF } + // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and + // non-job versions (which have different sizes). + m_hash_key = TO_UTF8( GetTitle() ); + m_drillOriginIsAuxAxis = m_plotOpts.GetUseAuxOrigin(); InitDisplayParams(); diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index cdb411db9e..7b0b3dc9a9 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2025 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 @@ -111,7 +111,7 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aEditFrame, wxWindow* aParent, if( m_job ) { - SetTitle( _( "Plot Job Options" ) ); + SetTitle( aJob->GetOptionsDialogTitle() ); PCB_PLOTTER::PlotJobToPlotOpts( m_plotOpts, m_job ); m_messagesPanel->Hide();