From 7bdb98f9617b498a4c170ee08707aa79735bea00 Mon Sep 17 00:00:00 2001 From: Mark Roszko Date: Sun, 26 Jul 2020 20:16:38 +0000 Subject: [PATCH] libedit: Make context menu follow context --- common/tool/actions.cpp | 4 ++-- eeschema/tools/ee_actions.cpp | 12 ++++++------ eeschema/tools/lib_control.cpp | 8 +++----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/common/tool/actions.cpp b/common/tool/actions.cpp index 308eedc18f..8decb74724 100644 --- a/common/tool/actions.cpp +++ b/common/tool/actions.cpp @@ -370,12 +370,12 @@ TOOL_ACTION ACTIONS::refreshPreview( "common.Control.refreshPreview", TOOL_ACTION ACTIONS::pinLibrary( "common.Control.pinLibrary", AS_GLOBAL, 0, "", - _( "Pin Library" ), "Keep the library at the top of the list", + _( "Pin" ), "Keep the library at the top of the list", flag_xpm ); TOOL_ACTION ACTIONS::unpinLibrary( "common.Control.unpinLibrary", AS_GLOBAL, 0, "", - _( "Unpin Library" ), "No longer keep the library at the top of the list", + _( "Unpin" ), "No longer keep the library at the top of the list", flag_remove_xpm ); TOOL_ACTION ACTIONS::panUp( "common.Control.panUp", diff --git a/eeschema/tools/ee_actions.cpp b/eeschema/tools/ee_actions.cpp index 6f40cb7a29..51e95de585 100644 --- a/eeschema/tools/ee_actions.cpp +++ b/eeschema/tools/ee_actions.cpp @@ -113,27 +113,27 @@ TOOL_ACTION EE_ACTIONS::newSymbol( "eeschema.SymbolLibraryControl.newSymbol", TOOL_ACTION EE_ACTIONS::editSymbol( "eeschema.SymbolLibraryControl.editSymbol", AS_GLOBAL, 0, "", - _( "Edit Symbol" ), _( "Show selected symbol on editor canvas" ), + _( "Edit" ), _( "Show selected symbol on editor canvas" ), edit_xpm ); TOOL_ACTION EE_ACTIONS::duplicateSymbol( "eeschema.SymbolLibraryControl.duplicateSymbol", AS_GLOBAL, 0, "", - _( "Duplicate Symbol" ), _( "Make a copy of the selected symbol" ), + _( "Duplicate" ), _( "Make a copy of the selected symbol" ), duplicate_xpm ); TOOL_ACTION EE_ACTIONS::deleteSymbol( "eeschema.SymbolLibraryControl.deleteSymbol", AS_GLOBAL, 0, "", - _( "Delete Symbol" ), _( "Remove the selected symbol from its library" ), + _( "Delete" ), _( "Remove the selected symbol from its library" ), delete_xpm ); TOOL_ACTION EE_ACTIONS::cutSymbol( "eeschema.SymbolLibraryControl.cutSymbol", AS_GLOBAL, 0, "", - _( "Cut Symbol" ), "", + _( "Cut" ), "", cut_xpm ); TOOL_ACTION EE_ACTIONS::copySymbol( "eeschema.SymbolLibraryControl.copySymbol", AS_GLOBAL, 0, "", - _( "Copy Symbol" ), "", + _( "Copy" ), "", copy_xpm ); TOOL_ACTION EE_ACTIONS::pasteSymbol( "eeschema.SymbolLibraryControl.pasteSymbol", @@ -148,7 +148,7 @@ TOOL_ACTION EE_ACTIONS::importSymbol( "eeschema.SymbolLibraryControl.importSymbo TOOL_ACTION EE_ACTIONS::exportSymbol( "eeschema.SymbolLibraryControl.exportSymbol", AS_GLOBAL, 0, "", - _( "Export Symbol..." ), _( "Export a symbol to a new library file" ), + _( "Export..." ), _( "Export a symbol to a new library file" ), export_part_xpm ); TOOL_ACTION EE_ACTIONS::addSymbolToSchematic( "eeschema.SymbolLibraryControl.addSymbolToSchematic", diff --git a/eeschema/tools/lib_control.cpp b/eeschema/tools/lib_control.cpp index 9421091224..bcf7f322c6 100644 --- a/eeschema/tools/lib_control.cpp +++ b/eeschema/tools/lib_control.cpp @@ -68,14 +68,12 @@ bool LIB_CONTROL::Init() ctxMenu.AddItem( ACTIONS::unpinLibrary, pinnedLibSelectedCondition ); ctxMenu.AddSeparator(); - ctxMenu.AddItem( ACTIONS::newLibrary, SELECTION_CONDITIONS::ShowAlways ); - ctxMenu.AddItem( ACTIONS::addLibrary, SELECTION_CONDITIONS::ShowAlways ); ctxMenu.AddItem( ACTIONS::save, libSelectedCondition ); ctxMenu.AddItem( ACTIONS::saveAs, libSelectedCondition ); ctxMenu.AddItem( ACTIONS::revert, libSelectedCondition ); ctxMenu.AddSeparator(); - ctxMenu.AddItem( EE_ACTIONS::newSymbol, SELECTION_CONDITIONS::ShowAlways ); + ctxMenu.AddItem( EE_ACTIONS::newSymbol, libSelectedCondition ); ctxMenu.AddItem( EE_ACTIONS::editSymbol, symbolSelectedCondition ); ctxMenu.AddSeparator(); @@ -88,10 +86,10 @@ bool LIB_CONTROL::Init() ctxMenu.AddSeparator(); ctxMenu.AddItem( EE_ACTIONS::cutSymbol, symbolSelectedCondition ); ctxMenu.AddItem( EE_ACTIONS::copySymbol, symbolSelectedCondition ); - ctxMenu.AddItem( EE_ACTIONS::pasteSymbol, SELECTION_CONDITIONS::ShowAlways ); + ctxMenu.AddItem( EE_ACTIONS::pasteSymbol, libSelectedCondition ); ctxMenu.AddSeparator(); - ctxMenu.AddItem( EE_ACTIONS::importSymbol, SELECTION_CONDITIONS::ShowAlways ); + ctxMenu.AddItem( EE_ACTIONS::importSymbol, libSelectedCondition ); ctxMenu.AddItem( EE_ACTIONS::exportSymbol, symbolSelectedCondition ); }