From 010c10853c6cbf130b6adf8c2f8f257685a4fa22 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 13 Feb 2017 09:53:47 +0100 Subject: [PATCH] Libedit: add "create new lib" in file menu (was only available from the main toolbar) Make also "Save Lib" shortcut modifiable by user, like other shortcuts. --- eeschema/menubar_libedit.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/eeschema/menubar_libedit.cpp b/eeschema/menubar_libedit.cpp index 06fc539301..eb80d034fa 100644 --- a/eeschema/menubar_libedit.cpp +++ b/eeschema/menubar_libedit.cpp @@ -37,6 +37,8 @@ #include "hotkeys.h" #include "libeditframe.h" +extern int CreateNewLibAndSavePartId; + /** * @brief (Re)Create the menubar for the component editor frame @@ -71,9 +73,9 @@ void LIB_EDIT_FRAME::ReCreateMenuBar() fileMenu->AppendSeparator(); // Save current library + text = AddHotkeyName( _( "&Save Current Library" ), g_Libedit_Hokeys_Descr, HK_SAVE_LIB ); AddMenuItem( fileMenu, - ID_LIBEDIT_SAVE_CURRENT_LIB, - _( "&Save Current Library\tCtrl+S" ), + ID_LIBEDIT_SAVE_CURRENT_LIB, text, _( "Save the current active library" ), KiBitmap( save_xpm ) ); @@ -84,6 +86,12 @@ void LIB_EDIT_FRAME::ReCreateMenuBar() _( "Save current active library as..." ), KiBitmap( save_as_xpm ) ); + AddMenuItem( fileMenu, + CreateNewLibAndSavePartId, + _( "Create &New Library and Save Current Component" ), + _( "Save current component to new library" ), + KiBitmap( new_library_xpm ) ); + // Separator fileMenu->AppendSeparator();