Clean up import and export menus

Fixes: lp:1822907
* https://bugs.launchpad.net/kicad/+bug/1822907
This commit is contained in:
Michael Kavanagh 2019-05-02 16:19:33 +01:00 committed by Wayne Stambaugh
parent 7508f02de5
commit 2a09664ebc
3 changed files with 39 additions and 23 deletions

View File

@ -106,24 +106,31 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
_( "Import a symbol to the current library" ), _( "Import a symbol to the current library" ),
KiBitmap( import_part_xpm ) ); KiBitmap( import_part_xpm ) );
AddMenuItem( fileMenu, // Export submenu
wxMenu* submenuExport = new wxMenu();
AddMenuItem( submenuExport,
ID_LIBEDIT_EXPORT_PART, ID_LIBEDIT_EXPORT_PART,
_( "&Export Symbol..." ), _( "S&ymbol..." ),
_( "Create a library file containing only the current symbol" ), _( "Create a library file containing only the current symbol" ),
KiBitmap( export_part_xpm ) ); KiBitmap( export_part_xpm ) );
AddMenuItem( fileMenu, AddMenuItem( submenuExport,
ID_LIBEDIT_GEN_PNG_FILE, ID_LIBEDIT_GEN_PNG_FILE,
_( "Export View as PNG..." ), _( "View as &PNG..." ),
_( "Create a PNG file from the current view" ), _( "Create a PNG file from the current view" ),
KiBitmap( plot_xpm ) ); KiBitmap( plot_xpm ) );
AddMenuItem( fileMenu, AddMenuItem( submenuExport,
ID_LIBEDIT_GEN_SVG_FILE, ID_LIBEDIT_GEN_SVG_FILE,
_( "Export Symbol as SVG..." ), _( "Symbol as S&VG..." ),
_( "Create a SVG file from the current symbol" ), _( "Create a SVG file from the current symbol" ),
KiBitmap( plot_svg_xpm ) ); KiBitmap( plot_svg_xpm ) );
AddMenuItem( fileMenu, submenuExport, ID_GEN_EXPORT_FILE, _( "E&xport" ),
_( "Export files" ),
KiBitmap( export_xpm ) );
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
AddMenuItem( fileMenu, AddMenuItem( fileMenu,

View File

@ -420,7 +420,7 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
_( "Export drawings to clipboard" ), _( "Export drawings to clipboard" ),
KiBitmap( copy_xpm ) ); KiBitmap( copy_xpm ) );
AddMenuItem( aParentMenu, ID_GET_NETLIST, _( "Export &Netlist..." ), AddMenuItem( submenuExport, ID_GET_NETLIST, _( "&Netlist..." ),
_( "Export netlist file" ), _( "Export netlist file" ),
KiBitmap( netlist_xpm ) ); KiBitmap( netlist_xpm ) );

View File

@ -97,21 +97,38 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
AddMenuItem( fileMenu, ID_MODEDIT_IMPORT_PART, wxMenu* submenuImport = new wxMenu();
_( "Import Footprint from &KiCad File..." ),
_( "Import a footprint from an existing footprint file" ), AddMenuItem( submenuImport, ID_MODEDIT_IMPORT_PART,
_( "&Footprint..." ),
_( "Import a footprint from file" ),
KiBitmap( import_module_xpm ) ); KiBitmap( import_module_xpm ) );
AddMenuItem( fileMenu, ID_GEN_IMPORT_GRAPHICS_FILE, AddMenuItem( submenuImport, ID_GEN_IMPORT_GRAPHICS_FILE,
_( "Import Outlines from &DXF or SVG File..." ), _( "&Graphics..." ),
_( "Import 2D Drawing DXF or SVG file to Footprint Editor on Drawings layer" ), _( "Import 2D Drawing file to Footprint Editor on Drawings layer" ),
KiBitmap( import_xpm ) ); KiBitmap( import_xpm ) );
AddMenuItem( fileMenu, ID_MODEDIT_EXPORT_PART, AddMenuItem( fileMenu, submenuImport,
_( "&Export Footprint..." ), ID_GEN_IMPORT_FILE, _( "&Import" ),
_( "Import files" ), KiBitmap( import_xpm ) );
wxMenu* submenuExport = new wxMenu();
AddMenuItem( submenuExport, ID_MODEDIT_EXPORT_PART,
_( "&Footprint..." ),
_( "Export current footprint to a file" ), _( "Export current footprint to a file" ),
KiBitmap( export_module_xpm ) ); KiBitmap( export_module_xpm ) );
AddMenuItem( submenuExport, ID_MODEDIT_SAVE_PNG,
_( "View as &PNG..." ),
_( "Create a PNG file from the current view" ),
KiBitmap( plot_xpm ) );
AddMenuItem( fileMenu, submenuExport,
ID_GEN_EXPORT_FILE, _( "&Export" ),
_( "Export files" ), KiBitmap( export_xpm ) );
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
// Print // Print
@ -122,14 +139,6 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
AddMenuItem( fileMenu,
ID_MODEDIT_SAVE_PNG,
_( "Export View as PN&G..." ),
_( "Create a PNG file from the current view" ),
KiBitmap( plot_xpm ) );
fileMenu->AppendSeparator();
// Close editor // Close editor
AddMenuItem( fileMenu, wxID_EXIT, AddMenuItem( fileMenu, wxID_EXIT,
_( "&Exit" ), _( "&Exit" ),