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" ),
KiBitmap( import_part_xpm ) );
AddMenuItem( fileMenu,
// Export submenu
wxMenu* submenuExport = new wxMenu();
AddMenuItem( submenuExport,
ID_LIBEDIT_EXPORT_PART,
_( "&Export Symbol..." ),
_( "S&ymbol..." ),
_( "Create a library file containing only the current symbol" ),
KiBitmap( export_part_xpm ) );
AddMenuItem( fileMenu,
AddMenuItem( submenuExport,
ID_LIBEDIT_GEN_PNG_FILE,
_( "Export View as PNG..." ),
_( "View as &PNG..." ),
_( "Create a PNG file from the current view" ),
KiBitmap( plot_xpm ) );
AddMenuItem( fileMenu,
AddMenuItem( submenuExport,
ID_LIBEDIT_GEN_SVG_FILE,
_( "Export Symbol as SVG..." ),
_( "Symbol as S&VG..." ),
_( "Create a SVG file from the current symbol" ),
KiBitmap( plot_svg_xpm ) );
AddMenuItem( fileMenu, submenuExport, ID_GEN_EXPORT_FILE, _( "E&xport" ),
_( "Export files" ),
KiBitmap( export_xpm ) );
fileMenu->AppendSeparator();
AddMenuItem( fileMenu,

View File

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

View File

@ -97,21 +97,38 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
fileMenu->AppendSeparator();
AddMenuItem( fileMenu, ID_MODEDIT_IMPORT_PART,
_( "Import Footprint from &KiCad File..." ),
_( "Import a footprint from an existing footprint file" ),
wxMenu* submenuImport = new wxMenu();
AddMenuItem( submenuImport, ID_MODEDIT_IMPORT_PART,
_( "&Footprint..." ),
_( "Import a footprint from file" ),
KiBitmap( import_module_xpm ) );
AddMenuItem( fileMenu, ID_GEN_IMPORT_GRAPHICS_FILE,
_( "Import Outlines from &DXF or SVG File..." ),
_( "Import 2D Drawing DXF or SVG file to Footprint Editor on Drawings layer" ),
AddMenuItem( submenuImport, ID_GEN_IMPORT_GRAPHICS_FILE,
_( "&Graphics..." ),
_( "Import 2D Drawing file to Footprint Editor on Drawings layer" ),
KiBitmap( import_xpm ) );
AddMenuItem( fileMenu, ID_MODEDIT_EXPORT_PART,
_( "&Export Footprint..." ),
AddMenuItem( fileMenu, submenuImport,
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" ),
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();
// Print
@ -122,14 +139,6 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
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
AddMenuItem( fileMenu, wxID_EXIT,
_( "&Exit" ),