Add Save Schematic Sheet As... to eeschema.

Fixes: lp:1748680
* https://bugs.launchpad.net/kicad/+bug/1748680
This commit is contained in:
Jeff Young 2018-08-19 21:44:35 +01:00
parent f9412f0fd4
commit e632816562
1 changed files with 21 additions and 38 deletions

View File

@ -364,7 +364,7 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
{ {
text = AddHotkeyName( _( "&New..." ), g_Schematic_Hokeys_Descr, HK_NEW ); text = AddHotkeyName( _( "&New..." ), g_Schematic_Hokeys_Descr, HK_NEW );
AddMenuItem( aParentMenu, ID_NEW_PROJECT, text, AddMenuItem( aParentMenu, ID_NEW_PROJECT, text,
_( "Clear current schematic hierarchy and start new schematic root sheet" ), _( "Start new schematic root sheet" ),
KiBitmap( new_document_xpm ) ); KiBitmap( new_document_xpm ) );
text = AddHotkeyName( _( "&Open..." ), g_Schematic_Hokeys_Descr, HK_OPEN ); text = AddHotkeyName( _( "&Open..." ), g_Schematic_Hokeys_Descr, HK_OPEN );
@ -372,8 +372,7 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
_( "Open existing schematic" ), _( "Open existing schematic" ),
KiBitmap( open_document_xpm ) ); KiBitmap( open_document_xpm ) );
AddMenuItem( aParentMenu, openRecentMenu, AddMenuItem( aParentMenu, openRecentMenu, -1, _( "Open &Recent" ),
-1, _( "Open &Recent" ),
_( "Open recently opened schematic" ), _( "Open recently opened schematic" ),
KiBitmap( recent_xpm ) ); KiBitmap( recent_xpm ) );
@ -381,37 +380,27 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
} }
text = AddHotkeyName( _( "&Save" ), g_Schematic_Hokeys_Descr, HK_SAVE ); text = AddHotkeyName( _( "&Save" ), g_Schematic_Hokeys_Descr, HK_SAVE );
AddMenuItem( aParentMenu, AddMenuItem( aParentMenu, ID_SAVE_PROJECT, text,
ID_SAVE_PROJECT, text, _( "Save changes" ),
_( "Save all sheets in schematic" ),
KiBitmap( save_xpm ) ); KiBitmap( save_xpm ) );
AddMenuItem( aParentMenu, AddMenuItem( aParentMenu, ID_UPDATE_ONE_SHEET, _( "Save &Current Sheet" ),
ID_UPDATE_ONE_SHEET, _( "Save only the current sheet" ),
_( "Save &Current Sheet" ),
_( "Save only current schematic sheet" ),
KiBitmap( save_xpm ) ); KiBitmap( save_xpm ) );
if( aIsOutsideProject ) // not when under a project mgr text = AddHotkeyName( _( "Save C&urrent Sheet As..." ), g_Schematic_Hokeys_Descr, HK_SAVEAS );
{ AddMenuItem( aParentMenu, ID_SAVE_ONE_SHEET_UNDER_NEW_NAME, text,
text = AddHotkeyName( _( "Save C&urrent Sheet As..." ), _( "Save a copy of the current sheet" ),
g_Schematic_Hokeys_Descr, HK_SAVEAS ); KiBitmap( save_as_xpm ) );
AddMenuItem( aParentMenu,
ID_SAVE_ONE_SHEET_UNDER_NEW_NAME, text,
_( "Save current schematic sheet with new name" ),
KiBitmap( save_as_xpm ) );
}
aParentMenu->AppendSeparator(); aParentMenu->AppendSeparator();
AddMenuItem( aParentMenu, ID_APPEND_PROJECT, AddMenuItem( aParentMenu, ID_APPEND_PROJECT, _( "App&end Schematic Sheet Content..." ),
_( "App&end Schematic Sheet Content..." ), _( "Append schematic sheet content from another project to the current sheet" ),
_( "Import schematic sheet content from another project to current sheet" ),
KiBitmap( add_document_xpm ) ); KiBitmap( add_document_xpm ) );
AddMenuItem( aParentMenu, ID_IMPORT_NON_KICAD_SCH, AddMenuItem( aParentMenu, ID_IMPORT_NON_KICAD_SCH, _( "&Import Non KiCad Schematic..." ),
_( "&Import Non KiCad Schematic File..." ), _( "Replace current schematic sheet with one imported from another application" ),
_( "Import schematic file from other applications" ),
KiBitmap( import_document_xpm ) ); // TODO needs a different icon KiBitmap( import_document_xpm ) ); // TODO needs a different icon
aParentMenu->AppendSeparator(); aParentMenu->AppendSeparator();
@ -419,14 +408,11 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
// Import submenu // Import submenu
wxMenu* submenuImport = new wxMenu(); wxMenu* submenuImport = new wxMenu();
AddMenuItem( submenuImport, ID_BACKANNO_ITEMS, AddMenuItem( submenuImport, ID_BACKANNO_ITEMS, _( "&Footprint Association File..." ),
_( "&Footprint Association File..." ),
HELP_IMPORT_FOOTPRINTS, HELP_IMPORT_FOOTPRINTS,
KiBitmap( import_footprint_names_xpm ) ); KiBitmap( import_footprint_names_xpm ) );
AddMenuItem( aParentMenu, submenuImport, AddMenuItem( aParentMenu, submenuImport, ID_GEN_IMPORT_FILE, _( "&Import" ),
ID_GEN_IMPORT_FILE,
_( "&Import" ),
_( "Import files" ), _( "Import files" ),
KiBitmap( import_xpm ) ); KiBitmap( import_xpm ) );
@ -434,22 +420,18 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
// Export submenu // Export submenu
wxMenu* submenuExport = new wxMenu(); wxMenu* submenuExport = new wxMenu();
AddMenuItem( submenuExport, ID_GEN_COPY_SHEET_TO_CLIPBOARD, AddMenuItem( submenuExport, ID_GEN_COPY_SHEET_TO_CLIPBOARD, _( "Drawing to C&lipboard" ),
_( "Drawing to C&lipboard" ),
_( "Export drawings to clipboard" ), _( "Export drawings to clipboard" ),
KiBitmap( copy_xpm ) ); KiBitmap( copy_xpm ) );
AddMenuItem( aParentMenu, submenuExport, AddMenuItem( aParentMenu, submenuExport, ID_GEN_EXPORT_FILE, _( "E&xport" ),
ID_GEN_EXPORT_FILE,
_( "E&xport" ),
_( "Export files" ), _( "Export files" ),
KiBitmap( export_xpm ) ); KiBitmap( export_xpm ) );
aParentMenu->AppendSeparator(); aParentMenu->AppendSeparator();
// Edit page layout: // Edit page layout:
AddMenuItem( aParentMenu, ID_SHEET_SET, AddMenuItem( aParentMenu, ID_SHEET_SET, _( "Page S&ettings..." ),
_( "Page S&ettings..." ),
_( "Settings for sheet size and frame references" ), _( "Settings for sheet size and frame references" ),
KiBitmap( sheetset_xpm ) ); KiBitmap( sheetset_xpm ) );
@ -465,7 +447,8 @@ void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
aParentMenu->AppendSeparator(); aParentMenu->AppendSeparator();
// Quit // Quit
AddMenuItem( aParentMenu, wxID_EXIT, _( "&Exit" ), _( "Close Eeschema" ), AddMenuItem( aParentMenu, wxID_EXIT, _( "&Exit" ),
_( "Close Eeschema" ),
KiBitmap( exit_xpm ) ); KiBitmap( exit_xpm ) );
} }