Introduce action friendly names

Friendly names can be used to display action information that is clearer
in non-hierarchical contexts (e.g. not in menus).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8075
This commit is contained in:
Ian McInerney 2023-10-27 23:40:35 +01:00
parent 324028bbf3
commit 171458a27b
19 changed files with 725 additions and 700 deletions

View File

@ -176,7 +176,7 @@ void NL_3D_VIEWER_PLUGIN_IMPL::exportCommandsAndImages()
for( it = actions.begin(); it != actions.end(); ++it )
{
const TOOL_ACTION* action = *it;
std::string label = action->GetLabel().ToStdString();
std::string label = action->GetMenuLabel().ToStdString();
if( label.empty() )
{

View File

@ -44,7 +44,7 @@ TOOL_ACTION EDA_3D_ACTIONS::pivotCenter( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.pivotCenter" )
.Scope( AS_ACTIVE )
.DefaultHotkey( ' ' )
.MenuText( _( "Set Pivot" ) )
.FriendlyName( _( "Set Pivot" ) )
.Tooltip( _( "Place point around which the board will be rotated (middle mouse click)" ) )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_PIVOT_CENTER ) );
@ -52,7 +52,7 @@ TOOL_ACTION EDA_3D_ACTIONS::pivotCenter( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::rotateXCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateXclockwise" )
.Scope( AS_GLOBAL )
.MenuText( _( "Rotate X Clockwise" ) )
.FriendlyName( _( "Rotate X Clockwise" ) )
.Tooltip( _( "Rotate X Clockwise" ) )
.Icon( BITMAPS::rotate_cw_x )
.Flags( AF_NONE )
@ -61,7 +61,7 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateXCW( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::rotateXCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateXcounterclockwise" )
.Scope( AS_GLOBAL )
.MenuText( _( "Rotate X Counterclockwise" ) )
.FriendlyName( _( "Rotate X Counterclockwise" ) )
.Tooltip( _( "Rotate X Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_x )
.Flags( AF_NONE )
@ -70,7 +70,7 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateXCCW( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::rotateYCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateYclockwise" )
.Scope( AS_GLOBAL )
.MenuText( _( "Rotate Y Clockwise" ) )
.FriendlyName( _( "Rotate Y Clockwise" ) )
.Tooltip( _( "Rotate Y Clockwise" ) )
.Icon( BITMAPS::rotate_cw_y )
.Flags( AF_NONE )
@ -79,7 +79,7 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateYCW( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::rotateYCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateYcounterclockwise" )
.Scope( AS_GLOBAL )
.MenuText( _( "Rotate Y Counterclockwise" ) )
.FriendlyName( _( "Rotate Y Counterclockwise" ) )
.Tooltip( _( "Rotate Y Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_y )
.Flags( AF_NONE )
@ -88,7 +88,7 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateYCCW( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::rotateZCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateZclockwise" )
.Scope( AS_GLOBAL )
.MenuText( _( "Rotate Z Clockwise" ) )
.FriendlyName( _( "Rotate Z Clockwise" ) )
.Tooltip( _( "Rotate Z Clockwise" ) )
.Icon( BITMAPS::rotate_cw_z )
.Flags( AF_NONE )
@ -97,7 +97,7 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateZCW( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::rotateZCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateZcounterclockwise" )
.Scope( AS_GLOBAL )
.MenuText( _( "Rotate Z Counterclockwise" ) )
.FriendlyName( _( "Rotate Z Counterclockwise" ) )
.Tooltip( _( "Rotate Z Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_z )
.Flags( AF_NONE )
@ -107,7 +107,7 @@ TOOL_ACTION EDA_3D_ACTIONS::moveLeft( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.moveLeft" )
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_LEFT )
.MenuText( _( "Move Board Left" ) )
.FriendlyName( _( "Move Board Left" ) )
.Tooltip( _( "Move board Left" ) )
.Icon( BITMAPS::left )
.Flags( AF_NONE )
@ -117,7 +117,7 @@ TOOL_ACTION EDA_3D_ACTIONS::moveRight( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.moveRight" )
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_RIGHT )
.MenuText( _( "Move Board Right" ) )
.FriendlyName( _( "Move Board Right" ) )
.Tooltip( _( "Move board Right" ) )
.Icon( BITMAPS::right )
.Flags( AF_NONE )
@ -127,7 +127,7 @@ TOOL_ACTION EDA_3D_ACTIONS::moveUp( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.moveUp" )
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_UP )
.MenuText( _( "Move Board Up" ) )
.FriendlyName( _( "Move Board Up" ) )
.Tooltip( _( "Move board Up" ) )
.Icon( BITMAPS::up )
.Flags( AF_NONE )
@ -137,7 +137,7 @@ TOOL_ACTION EDA_3D_ACTIONS::moveDown( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.moveDown" )
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_DOWN )
.MenuText( _( "Move Board Down" ) )
.FriendlyName( _( "Move Board Down" ) )
.Tooltip( _( "Move board Down" ) )
.Icon( BITMAPS::down )
.Flags( AF_NONE )
@ -147,7 +147,7 @@ TOOL_ACTION EDA_3D_ACTIONS::homeView( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.homeView" )
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_HOME )
.MenuText ( _( "Home View" ) )
.FriendlyName ( _( "Home View" ) )
.Tooltip( _( "Home view" ) )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_FIT_SCREEN ) );
@ -156,7 +156,7 @@ TOOL_ACTION EDA_3D_ACTIONS::resetView( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.resetView" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'R' )
.MenuText( _( "Reset View" ) )
.FriendlyName( _( "Reset View" ) )
.Tooltip( _( "Reset view" ) )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_RESET ) );
@ -165,7 +165,7 @@ TOOL_ACTION EDA_3D_ACTIONS::flipView( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.flipView" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'F' )
.MenuText( _( "Flip Board" ) )
.FriendlyName( _( "Flip Board" ) )
.Tooltip( _( "Flip the board view" ) )
.Icon( BITMAPS::flip_board )
.Flags( AF_NONE )
@ -174,7 +174,7 @@ TOOL_ACTION EDA_3D_ACTIONS::flipView( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::toggleOrtho( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.toggleOrtho" )
.Scope( AS_GLOBAL )
.MenuText( _( "Toggle Orthographic Projection" ) )
.FriendlyName( _( "Toggle Orthographic Projection" ) )
.Tooltip( _( "Enable/disable orthographic projection" ) )
.Icon( BITMAPS::ortho ) );
@ -182,7 +182,7 @@ TOOL_ACTION EDA_3D_ACTIONS::viewFront( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewFront" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'Y' )
.MenuText( _( "View Front" ) )
.FriendlyName( _( "View Front" ) )
.Tooltip( _( "View Front" ) )
.Icon( BITMAPS::axis3d_front )
.Flags( AF_NONE )
@ -192,7 +192,7 @@ TOOL_ACTION EDA_3D_ACTIONS::viewBack( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewBack" )
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'Y' )
.MenuText( _( "View Back" ) )
.FriendlyName( _( "View Back" ) )
.Tooltip( _( "View Back" ) )
.Icon( BITMAPS::axis3d_back )
.Flags( AF_NONE )
@ -202,7 +202,7 @@ TOOL_ACTION EDA_3D_ACTIONS::viewLeft( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewLeft" )
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'X' )
.MenuText( _( "View Left" ) )
.FriendlyName( _( "View Left" ) )
.Tooltip( _( "View Left" ) )
.Icon( BITMAPS::axis3d_left )
.Flags( AF_NONE )
@ -212,7 +212,7 @@ TOOL_ACTION EDA_3D_ACTIONS::viewRight( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewRight" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'X' )
.MenuText( _( "View Right" ) )
.FriendlyName( _( "View Right" ) )
.Tooltip( _( "View Right" ) )
.Icon( BITMAPS::axis3d_right )
.Flags( AF_NONE )
@ -222,7 +222,7 @@ TOOL_ACTION EDA_3D_ACTIONS::viewTop( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewTop" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'Z' )
.MenuText( _( "View Top" ) )
.FriendlyName( _( "View Top" ) )
.Tooltip( _( "View Top" ) )
.Icon( BITMAPS::axis3d_top )
.Flags( AF_NONE )
@ -232,7 +232,7 @@ TOOL_ACTION EDA_3D_ACTIONS::viewBottom( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewBottom" )
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'Z' )
.MenuText( _( "View Bottom" ) )
.FriendlyName( _( "View Bottom" ) )
.Tooltip( _( "View Bottom" ) )
.Icon( BITMAPS::axis3d_bottom )
.Flags( AF_NONE )
@ -241,7 +241,7 @@ TOOL_ACTION EDA_3D_ACTIONS::viewBottom( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::noGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.noGrid" )
.Scope( AS_GLOBAL )
.MenuText( _( "No 3D Grid" ) )
.FriendlyName( _( "No 3D Grid" ) )
.Tooltip( _( "No 3D Grid" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::NONE ) );
@ -249,7 +249,7 @@ TOOL_ACTION EDA_3D_ACTIONS::noGrid( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::show10mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show10mmGrid" )
.Scope( AS_GLOBAL )
.MenuText( _( "3D Grid 10mm" ) )
.FriendlyName( _( "3D Grid 10mm" ) )
.Tooltip( _( "3D Grid 10mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_10MM ) );
@ -257,7 +257,7 @@ TOOL_ACTION EDA_3D_ACTIONS::show10mmGrid( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::show5mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show5mmGrid" )
.Scope( AS_GLOBAL )
.MenuText( _( "3D Grid 5mm" ) )
.FriendlyName( _( "3D Grid 5mm" ) )
.Tooltip( _( "3D Grid 5mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_5MM ) );
@ -265,7 +265,7 @@ TOOL_ACTION EDA_3D_ACTIONS::show5mmGrid( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::show2_5mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show2_5mmGrid" )
.Scope( AS_GLOBAL )
.MenuText( _( "3D Grid 2.5mm" ) )
.FriendlyName( _( "3D Grid 2.5mm" ) )
.Tooltip( _( "3D Grid 2.5mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_2P5MM ) );
@ -273,7 +273,7 @@ TOOL_ACTION EDA_3D_ACTIONS::show2_5mmGrid( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::show1mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show1mmGrid" )
.Scope( AS_GLOBAL )
.MenuText( _( "3D Grid 1mm" ) )
.FriendlyName( _( "3D Grid 1mm" ) )
.Tooltip( _( "3D Grid 1mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_1MM ) );
@ -281,7 +281,7 @@ TOOL_ACTION EDA_3D_ACTIONS::show1mmGrid( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::materialNormal( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.materialNormal" )
.Scope( AS_ACTIVE )
.MenuText( _( "Render Realistic Materials" ) )
.FriendlyName( _( "Render Realistic Materials" ) )
.Tooltip( _( "Use all material properties from each 3D model file" ) )
.Flags( AF_NONE )
.Parameter( MATERIAL_MODE::NORMAL ) );
@ -289,7 +289,7 @@ TOOL_ACTION EDA_3D_ACTIONS::materialNormal( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::materialDiffuse( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.materialDiffuse" )
.Scope( AS_ACTIVE )
.MenuText( _( "Render Solid Colors" ) )
.FriendlyName( _( "Render Solid Colors" ) )
.Tooltip( _( "Use only the diffuse color property from model 3D model file" ) )
.Flags( AF_NONE )
.Parameter( MATERIAL_MODE::DIFFUSE_ONLY ) );
@ -297,7 +297,7 @@ TOOL_ACTION EDA_3D_ACTIONS::materialDiffuse( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::materialCAD( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.materialCAD" )
.Scope( AS_ACTIVE )
.MenuText( _( "Render CAD Colors" ) )
.FriendlyName( _( "Render CAD Colors" ) )
.Tooltip( _( "Use a CAD color style based on the diffuse color of the material" ) )
.Flags( AF_NONE )
.Parameter( MATERIAL_MODE::CAD_MODE ) );
@ -306,7 +306,7 @@ TOOL_ACTION EDA_3D_ACTIONS::showTHT( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.attributesTHT" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'T' )
.MenuText( _( "Show Through Hole 3D Models" ) )
.FriendlyName( _( "Show Through Hole 3D Models" ) )
.Tooltip( _( "Show 3D models for 'Through hole' type footprints" ) )
.Icon( BITMAPS::show_tht )
.Flags( AF_NONE ) );
@ -315,7 +315,7 @@ TOOL_ACTION EDA_3D_ACTIONS::showSMD( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.attributesSMD" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'S' )
.MenuText( _( "Show SMD 3D Models" ) )
.FriendlyName( _( "Show SMD 3D Models" ) )
.Tooltip( _( "Show 3D models for 'Surface mount' type footprints" ) )
.Icon( BITMAPS::show_smt )
.Flags( AF_NONE ) );
@ -324,7 +324,7 @@ TOOL_ACTION EDA_3D_ACTIONS::showVirtual( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.attributesOther" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'V' )
.MenuText( _( "Show Unspecified 3D Models" ) )
.FriendlyName( _( "Show Unspecified 3D Models" ) )
.Tooltip( _( "Show 3D models for 'unspecified' type footprints" ) )
.Icon( BITMAPS::show_other )
.Flags( AF_NONE ) );
@ -333,7 +333,7 @@ TOOL_ACTION EDA_3D_ACTIONS::showNotInPosFile( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.attribute_not_in_posfile" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'P' )
.MenuText( _( "Show 3D Models not in POS File" ) )
.FriendlyName( _( "Show 3D Models not in POS File" ) )
.Tooltip( _( "Show 3D models even if not found in .pos file" ) )
.Icon( BITMAPS::show_not_in_posfile )
.Flags( AF_NONE ) );
@ -342,7 +342,7 @@ TOOL_ACTION EDA_3D_ACTIONS::showDNP( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.attribute_dnp" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'D' )
.MenuText( _( "Show 3D Models marked DNP" ) )
.FriendlyName( _( "Show 3D Models marked DNP" ) )
.Tooltip( _( "Show 3D models even if marked 'Do Not Place'" ) )
.Icon( BITMAPS::show_dnp )
.Flags( AF_NONE ) );
@ -350,7 +350,7 @@ TOOL_ACTION EDA_3D_ACTIONS::showDNP( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::showBBoxes( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showBoundingBoxes" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show Model Bounding Boxes" ) )
.FriendlyName( _( "Show Model Bounding Boxes" ) )
.Tooltip( _( "Show 3D model bounding boxes in realtime renderer" ) )
.Icon( BITMAPS::ortho )
.Flags( AF_NONE ) );
@ -358,7 +358,7 @@ TOOL_ACTION EDA_3D_ACTIONS::showBBoxes( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::showAxis( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showAxis" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show 3D Axis" ) )
.FriendlyName( _( "Show 3D Axis" ) )
.Tooltip( _( "Show 3D Axis" ) )
.Icon( BITMAPS::axis3d_front )
.Flags( AF_NONE ) );
@ -366,7 +366,7 @@ TOOL_ACTION EDA_3D_ACTIONS::showAxis( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::showLayersManager( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showLayersManager" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show Appearance Manager" ) )
.FriendlyName( _( "Show Appearance Manager" ) )
.Tooltip( _( "Show/hide the appearance manager" ) )
.Icon( BITMAPS::layers_manager ) );

View File

@ -246,7 +246,7 @@ void PANEL_HOTKEYS_EDITOR::dumpHotkeys()
for( HOTKEY& hk : section.m_HotKeys )
{
stream << wxT( "| " ) << hk.m_Actions[0]->GetLabel() << endl;
stream << wxT( "| " ) << hk.m_Actions[0]->GetFriendlyName() << endl;
if( hk.m_EditKeycode > 0 )
{

View File

@ -34,7 +34,7 @@ class PSEUDO_ACTION : public TOOL_ACTION
public:
PSEUDO_ACTION( const wxString& aLabel, int aHotKey )
{
m_label = aLabel;
m_friendlyName = aLabel;
m_hotKey = aHotKey;
}
};
@ -98,7 +98,7 @@ void HOTKEY_STORE::Init( std::vector<TOOL_ACTION*> aActionsList, bool aIncludeRe
for( TOOL_ACTION* action : aActionsList )
{
// Internal actions probably shouldn't be allowed hotkeys
if( action->GetLabel().IsEmpty() )
if( action->GetFriendlyName().IsEmpty() )
continue;
if( !ADVANCED_CFG::GetCfg().m_ExtraZoneDisplayModes )

View File

@ -42,21 +42,21 @@ TOOL_ACTION ACTIONS::doNew( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'N' )
.LegacyHotkeyName( "New" )
.MenuText( _( "New..." ) )
.FriendlyName( _( "New..." ) )
.Tooltip( _( "Create a new document in the editor" ) )
.Icon( BITMAPS::new_generic ) );
TOOL_ACTION ACTIONS::newLibrary( TOOL_ACTION_ARGS()
.Name( "common.Control.newLibrary" )
.Scope( AS_GLOBAL )
.MenuText( _( "New Library..." ) )
.FriendlyName( _( "New Library..." ) )
.Tooltip( _( "Create a new library folder" ) )
.Icon( BITMAPS::new_library ) );
TOOL_ACTION ACTIONS::addLibrary( TOOL_ACTION_ARGS()
.Name( "common.Control.addLibrary" )
.Scope( AS_GLOBAL )
.MenuText( _( "Add Library..." ) )
.FriendlyName( _( "Add Library..." ) )
.Tooltip( _( "Add an existing library folder" ) )
.Icon( BITMAPS::add_library ) );
@ -65,7 +65,7 @@ TOOL_ACTION ACTIONS::open( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'O' )
.LegacyHotkeyName( "Open" )
.MenuText( _( "Open..." ) )
.FriendlyName( _( "Open..." ) )
.Tooltip( _( "Open existing document" ) )
.Icon( BITMAPS::directory_open ) );
@ -74,7 +74,7 @@ TOOL_ACTION ACTIONS::save( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'S' )
.LegacyHotkeyName( "Save" )
.MenuText( _( "Save" ) )
.FriendlyName( _( "Save" ) )
.Tooltip( _( "Save changes" ) )
.Icon( BITMAPS::save ) );
@ -83,34 +83,34 @@ TOOL_ACTION ACTIONS::saveAs( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + MD_CTRL + 'S' )
.LegacyHotkeyName( "Save As" )
.MenuText( _( "Save As..." ) )
.FriendlyName( _( "Save As..." ) )
.Tooltip( _( "Save current document to another location" ) )
.Icon( BITMAPS::save_as ) );
TOOL_ACTION ACTIONS::saveCopy( TOOL_ACTION_ARGS()
.Name( "common.Control.saveCopy" )
.Scope( AS_GLOBAL )
.MenuText( _( "Save a Copy..." ) )
.FriendlyName( _( "Save a Copy..." ) )
.Tooltip( _( "Save a copy of the current document to another location" ) )
.Icon( BITMAPS::save_as ) );
TOOL_ACTION ACTIONS::saveAll( TOOL_ACTION_ARGS()
.Name( "common.Control.saveAll" )
.Scope( AS_GLOBAL )
.MenuText( _( "Save All" ) )
.FriendlyName( _( "Save All" ) )
.Tooltip( _( "Save all changes" ) )
.Icon( BITMAPS::save ) );
TOOL_ACTION ACTIONS::revert( TOOL_ACTION_ARGS()
.Name( "common.Control.revert" )
.Scope( AS_GLOBAL )
.MenuText( _( "Revert" ) )
.FriendlyName( _( "Revert" ) )
.Tooltip( _( "Throw away changes" ) ) );
TOOL_ACTION ACTIONS::pageSettings( TOOL_ACTION_ARGS()
.Name( "common.Control.pageSettings" )
.Scope( AS_GLOBAL )
.MenuText( _( "Page Settings..." ) )
.FriendlyName( _( "Page Settings..." ) )
.Tooltip( _( "Settings for paper size and title block info" ) )
.Icon( BITMAPS::sheetset ) );
@ -119,21 +119,21 @@ TOOL_ACTION ACTIONS::print( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'P' )
.LegacyHotkeyName( "Print" )
.MenuText( _( "Print..." ) )
.FriendlyName( _( "Print..." ) )
.Tooltip( _( "Print" ) )
.Icon( BITMAPS::print_button ) );
TOOL_ACTION ACTIONS::plot( TOOL_ACTION_ARGS()
.Name( "common.Control.plot" )
.Scope( AS_GLOBAL )
.MenuText( _( "Plot..." ) )
.FriendlyName( _( "Plot..." ) )
.Tooltip( _( "Plot" ) )
.Icon( BITMAPS::plot ) );
TOOL_ACTION ACTIONS::quit( TOOL_ACTION_ARGS()
.Name( "common.Control.quit" )
.Scope( AS_GLOBAL )
.MenuText( _( "Quit" ) )
.FriendlyName( _( "Quit" ) )
.Tooltip( _( "Close the current editor" ) )
.Icon( BITMAPS::exit ) );
@ -142,7 +142,7 @@ TOOL_ACTION ACTIONS::cancelInteractive( TOOL_ACTION_ARGS()
.Name( "common.Interactive.cancel" )
.Scope( AS_GLOBAL )
// ESC key is handled in the dispatcher
.MenuText( _( "Cancel" ) )
.FriendlyName( _( "Cancel" ) )
.Tooltip( _( "Cancel current tool" ) )
.Icon( BITMAPS::cancel )
.Flags( AF_NONE ) );
@ -150,7 +150,7 @@ TOOL_ACTION ACTIONS::cancelInteractive( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::showContextMenu( TOOL_ACTION_ARGS()
.Name( "common.Control.showContextMenu" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show Context Menu" ) )
.FriendlyName( _( "Show Context Menu" ) )
.Tooltip( _( "Perform the right-mouse-button action" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_RIGHT_CLICK ) );
@ -164,7 +164,7 @@ TOOL_ACTION ACTIONS::undo( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'Z' )
.LegacyHotkeyName( "Undo" )
.MenuText( _( "Undo" ) )
.FriendlyName( _( "Undo" ) )
.Tooltip( _( "Undo last edit" ) )
.Icon( BITMAPS::undo ) );
@ -177,7 +177,7 @@ TOOL_ACTION ACTIONS::redo( TOOL_ACTION_ARGS()
.DefaultHotkey( MD_CTRL + 'Y' )
#endif
.LegacyHotkeyName( "Redo" )
.MenuText( _( "Redo" ) )
.FriendlyName( _( "Redo" ) )
.Tooltip( _( "Redo last edit" ) )
.Icon( BITMAPS::redo ) );
@ -190,7 +190,7 @@ TOOL_ACTION ACTIONS::cut( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'X' )
.LegacyHotkeyName( "Cut" )
.MenuText( _( "Cut" ) )
.FriendlyName( _( "Cut" ) )
.Tooltip( _( "Cut selected item(s) to clipboard" ) )
.Icon( BITMAPS::cut )
.Flags( AF_NONE )
@ -201,7 +201,7 @@ TOOL_ACTION ACTIONS::copy( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'C' )
.LegacyHotkeyName( "Copy" )
.MenuText( _( "Copy" ) )
.FriendlyName( _( "Copy" ) )
.Tooltip( _( "Copy selected item(s) to clipboard" ) )
.Icon( BITMAPS::copy )
.Flags( AF_NONE )
@ -212,7 +212,7 @@ TOOL_ACTION ACTIONS::paste( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'V' )
.LegacyHotkeyName( "Paste" )
.MenuText( _( "Paste" ) )
.FriendlyName( _( "Paste" ) )
.Tooltip( _( "Paste item(s) from clipboard" ) )
.Icon( BITMAPS::paste )
.Flags( AF_NONE )
@ -222,20 +222,20 @@ TOOL_ACTION ACTIONS::selectAll( TOOL_ACTION_ARGS()
.Name( "common.Interactive.selectAll" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'A' )
.MenuText( _( "Select All" ) )
.FriendlyName( _( "Select All" ) )
.Tooltip( _( "Select all items on screen" ) ) );
TOOL_ACTION ACTIONS::unselectAll( TOOL_ACTION_ARGS()
.Name( "common.Interactive.unselectAll" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + MD_SHIFT + 'A' )
.MenuText( _( "Unselect All" ) )
.FriendlyName( _( "Unselect All" ) )
.Tooltip( _( "Unselect all items on screen" ) ) );
TOOL_ACTION ACTIONS::pasteSpecial( TOOL_ACTION_ARGS()
.Name( "common.Interactive.pasteSpecial" )
.Scope( AS_GLOBAL )
.MenuText( _( "Paste Special..." ) )
.FriendlyName( _( "Paste Special..." ) )
.Tooltip( _( "Paste item(s) from clipboard with annotation options" ) )
.Icon( BITMAPS::paste_special ) );
@ -244,7 +244,7 @@ TOOL_ACTION ACTIONS::duplicate( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'D' )
.LegacyHotkeyName( "Duplicate" )
.MenuText( _( "Duplicate" ) )
.FriendlyName( _( "Duplicate" ) )
.Tooltip( _( "Duplicates the selected item(s)" ) )
.Icon( BITMAPS::duplicate ) );
@ -257,7 +257,7 @@ TOOL_ACTION ACTIONS::doDelete( TOOL_ACTION_ARGS()
.DefaultHotkey( WXK_DELETE )
#endif
.LegacyHotkeyName( "Delete Item" )
.MenuText( _( "Delete" ) )
.FriendlyName( _( "Delete" ) )
.Tooltip( _( "Deletes selected item(s)" ) )
.Icon( BITMAPS::trash )
.Parameter( ACTIONS::REMOVE_FLAGS::NORMAL ) );
@ -265,7 +265,7 @@ TOOL_ACTION ACTIONS::doDelete( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::deleteTool( TOOL_ACTION_ARGS()
.Name( "common.Interactive.deleteTool" )
.Scope( AS_GLOBAL )
.MenuText( _( "Interactive Delete Tool" ) )
.FriendlyName( _( "Interactive Delete Tool" ) )
.Tooltip( _( "Delete clicked items" ) )
.Icon( BITMAPS::delete_cursor )
.Flags( AF_ACTIVATE ) );
@ -278,7 +278,7 @@ TOOL_ACTION ACTIONS::cycleArcEditMode( TOOL_ACTION_ARGS()
.Name( "common.Interactive.cycleArcEditMode" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + ' ' )
.MenuText( _( "Cycle arc editing mode" ) )
.FriendlyName( _( "Cycle arc editing mode" ) )
.Tooltip( _( "Switch to a different method of editing arcs" ) ) );
TOOL_ACTION ACTIONS::showSearch( TOOL_ACTION_ARGS()
@ -286,7 +286,7 @@ TOOL_ACTION ACTIONS::showSearch( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'G' )
.LegacyHotkeyName( "Search" )
.MenuText( _( "Show Search Panel" ) )
.FriendlyName( _( "Show Search Panel" ) )
.Tooltip( _( "Show/hide the search panel" ) )
.Icon( BITMAPS::find ) );
@ -295,7 +295,7 @@ TOOL_ACTION ACTIONS::find( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'F' )
.LegacyHotkeyName( "Find" )
.MenuText( _( "Find" ) )
.FriendlyName( _( "Find" ) )
.Tooltip( _( "Find text" ) )
.Icon( BITMAPS::find ) );
@ -304,7 +304,7 @@ TOOL_ACTION ACTIONS::findAndReplace( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + MD_ALT + 'F' )
.LegacyHotkeyName( "Find and Replace" )
.MenuText( _( "Find and Replace" ) )
.FriendlyName( _( "Find and Replace" ) )
.Tooltip( _( "Find and replace text" ) )
.Icon( BITMAPS::find_replace ) );
@ -313,7 +313,7 @@ TOOL_ACTION ACTIONS::findNext( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_F3 )
.LegacyHotkeyName( "Find Next" )
.MenuText( _( "Find Next" ) )
.FriendlyName( _( "Find Next" ) )
.Tooltip( _( "Find next match" ) )
.Icon( BITMAPS::find ) );
@ -322,7 +322,7 @@ TOOL_ACTION ACTIONS::findPrevious( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + WXK_F3 )
.LegacyHotkeyName( "Find Previous" )
.MenuText( _( "Find Previous" ) )
.FriendlyName( _( "Find Previous" ) )
.Tooltip( _( "Find previous match" ) )
.Icon( BITMAPS::find ) );
@ -331,20 +331,20 @@ TOOL_ACTION ACTIONS::findNextMarker( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + MD_SHIFT + WXK_F3 )
.LegacyHotkeyName( "Find Next Marker" )
.MenuText( _( "Find Next Marker" ) )
.FriendlyName( _( "Find Next Marker" ) )
.Icon( BITMAPS::find ) );
TOOL_ACTION ACTIONS::replaceAndFindNext( TOOL_ACTION_ARGS()
.Name( "common.Interactive.replaceAndFindNext" )
.Scope( AS_GLOBAL )
.MenuText( _( "Replace and Find Next" ) )
.FriendlyName( _( "Replace and Find Next" ) )
.Tooltip( _( "Replace current match and find next" ) )
.Icon( BITMAPS::find_replace ) );
TOOL_ACTION ACTIONS::replaceAll( TOOL_ACTION_ARGS()
.Name( "common.Interactive.replaceAll" )
.Scope( AS_GLOBAL )
.MenuText( _( "Replace All" ) )
.FriendlyName( _( "Replace All" ) )
.Tooltip( _( "Replace all matches" ) )
.Icon( BITMAPS::find_replace ) );
@ -357,21 +357,21 @@ TOOL_ACTION ACTIONS::updateFind( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::prevMarker( TOOL_ACTION_ARGS()
.Name( "common.Checker.prevMarker" )
.Scope( AS_GLOBAL )
.MenuText( _( "Previous Marker" ) )
.FriendlyName( _( "Previous Marker" ) )
.Tooltip( _( "Go to previous marker in Checker window" ) )
.Icon( BITMAPS::marker_previous ) );
TOOL_ACTION ACTIONS::nextMarker( TOOL_ACTION_ARGS()
.Name( "common.Checker.nextMarker" )
.Scope( AS_GLOBAL )
.MenuText( _( "Next Marker" ) )
.FriendlyName( _( "Next Marker" ) )
.Tooltip( _( "Go to next marker in Checker window" ) )
.Icon( BITMAPS::marker_next ) );
TOOL_ACTION ACTIONS::excludeMarker( TOOL_ACTION_ARGS()
.Name( "common.Checker.excludeMarker" )
.Scope( AS_GLOBAL )
.MenuText( _( "Exclude Marker" ) )
.FriendlyName( _( "Exclude Marker" ) )
.Tooltip( _( "Mark current violation in Checker window as an exclusion" ) )
.Icon( BITMAPS::marker_exclude ) );
@ -385,7 +385,7 @@ TOOL_ACTION ACTIONS::zoomRedraw( TOOL_ACTION_ARGS()
.DefaultHotkey( WXK_F5 )
#endif
.LegacyHotkeyName( "Zoom Redraw" )
.MenuText( _( "Refresh" ) )
.FriendlyName( _( "Refresh" ) )
.Tooltip( _( "Refresh" ) )
.Icon( BITMAPS::refresh ) );
@ -398,7 +398,7 @@ TOOL_ACTION ACTIONS::zoomFitScreen( TOOL_ACTION_ARGS()
.DefaultHotkey( WXK_HOME )
#endif
.LegacyHotkeyName( "Zoom Auto" )
.MenuText( _( "Zoom to Fit" ) )
.FriendlyName( _( "Zoom to Fit" ) )
.Tooltip( _( "Zoom to Fit" ) )
.Icon( BITMAPS::zoom_fit_in_page ) );
@ -406,7 +406,7 @@ TOOL_ACTION ACTIONS::zoomFitObjects( TOOL_ACTION_ARGS()
.Name( "common.Control.zoomFitObjects" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_HOME )
.MenuText( _( "Zoom to Objects" ) )
.FriendlyName( _( "Zoom to Objects" ) )
.Tooltip( _( "Zoom to Objects" ) )
.Icon( BITMAPS::zoom_fit_to_objects ) );
@ -419,7 +419,7 @@ TOOL_ACTION ACTIONS::zoomIn( TOOL_ACTION_ARGS()
.DefaultHotkey( WXK_F1 )
#endif
.LegacyHotkeyName( "Zoom In" )
.MenuText( _( "Zoom In at Cursor" ) )
.FriendlyName( _( "Zoom In at Cursor" ) )
.Tooltip( _( "Zoom In at Cursor" ) )
.Icon( BITMAPS::zoom_in ) );
@ -432,21 +432,21 @@ TOOL_ACTION ACTIONS::zoomOut( TOOL_ACTION_ARGS()
.DefaultHotkey( WXK_F2 )
#endif
.LegacyHotkeyName( "Zoom Out" )
.MenuText( _( "Zoom Out at Cursor" ) )
.FriendlyName( _( "Zoom Out at Cursor" ) )
.Tooltip( _( "Zoom Out at Cursor" ) )
.Icon( BITMAPS::zoom_out ) );
TOOL_ACTION ACTIONS::zoomInCenter( TOOL_ACTION_ARGS()
.Name( "common.Control.zoomInCenter" )
.Scope( AS_GLOBAL )
.MenuText( _( "Zoom In" ) )
.FriendlyName( _( "Zoom In" ) )
.Tooltip( _( "Zoom In" ) )
.Icon( BITMAPS::zoom_in ) );
TOOL_ACTION ACTIONS::zoomOutCenter( TOOL_ACTION_ARGS()
.Name( "common.Control.zoomOutCenter" )
.Scope( AS_GLOBAL )
.MenuText( _( "Zoom Out" ) )
.FriendlyName( _( "Zoom Out" ) )
.Tooltip( _( "Zoom Out" ) )
.Icon( BITMAPS::zoom_out ) );
@ -455,7 +455,7 @@ TOOL_ACTION ACTIONS::zoomCenter( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_F4 )
.LegacyHotkeyName( "Zoom Center" )
.MenuText( _( "Center on Cursor" ) )
.FriendlyName( _( "Center on Cursor" ) )
.Tooltip( _( "Center on Cursor" ) )
.Icon( BITMAPS::zoom_center_on_screen ) );
@ -464,7 +464,7 @@ TOOL_ACTION ACTIONS::zoomTool( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_F5 )
.LegacyHotkeyName( "Zoom to Selection" )
.MenuText( _( "Zoom to Selection" ) )
.FriendlyName( _( "Zoom to Selection" ) )
.Tooltip( _( "Zoom to Selection" ) )
.Icon( BITMAPS::zoom_area )
.Flags( AF_ACTIVATE ) );
@ -472,14 +472,14 @@ TOOL_ACTION ACTIONS::zoomTool( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::zoomUndo( TOOL_ACTION_ARGS()
.Name( "common.Control.undoZoom" )
.Scope( AS_GLOBAL )
.MenuText( _( "Undo Last Zoom" ) )
.FriendlyName( _( "Undo Last Zoom" ) )
.Tooltip( _( "Return zoom to level prior to last zoom action" ) )
.Icon( BITMAPS::undo ) );
TOOL_ACTION ACTIONS::zoomRedo( TOOL_ACTION_ARGS()
.Name( "common.Control.redoZoom" )
.Scope( AS_GLOBAL )
.MenuText( _( "Redo Last Zoom" ) )
.FriendlyName( _( "Redo Last Zoom" ) )
.Tooltip( _( "Return zoom to level prior to last zoom undo" ) )
.Icon( BITMAPS::redo ) );
@ -497,7 +497,7 @@ TOOL_ACTION ACTIONS::cursorUp( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorUp" )
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_UP )
.MenuText( _( "Cursor Up" ) )
.FriendlyName( _( "Cursor Up" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_UP ) );
@ -505,7 +505,7 @@ TOOL_ACTION ACTIONS::cursorDown( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorDown" )
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_DOWN )
.MenuText( _( "Cursor Down" ) )
.FriendlyName( _( "Cursor Down" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_DOWN ) );
@ -513,7 +513,7 @@ TOOL_ACTION ACTIONS::cursorLeft( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorLeft" )
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_LEFT )
.MenuText( _( "Cursor Left" ) )
.FriendlyName( _( "Cursor Left" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_LEFT ) );
@ -521,7 +521,7 @@ TOOL_ACTION ACTIONS::cursorRight( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorRight" )
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_RIGHT )
.MenuText( _( "Cursor Right" ) )
.FriendlyName( _( "Cursor Right" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_RIGHT ) );
@ -530,7 +530,7 @@ TOOL_ACTION ACTIONS::cursorUpFast( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorUpFast" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_UP )
.MenuText( _( "Cursor Up Fast" ) )
.FriendlyName( _( "Cursor Up Fast" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_UP_FAST ) );
@ -538,7 +538,7 @@ TOOL_ACTION ACTIONS::cursorDownFast( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorDownFast" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_DOWN )
.MenuText( _( "Cursor Down Fast" ) )
.FriendlyName( _( "Cursor Down Fast" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_DOWN_FAST ) );
@ -546,7 +546,7 @@ TOOL_ACTION ACTIONS::cursorLeftFast( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorLeftFast" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_LEFT )
.MenuText( _( "Cursor Left Fast" ) )
.FriendlyName( _( "Cursor Left Fast" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_LEFT_FAST ) );
@ -554,7 +554,7 @@ TOOL_ACTION ACTIONS::cursorRightFast( TOOL_ACTION_ARGS()
.Name( "common.Control.cursorRightFast" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_RIGHT )
.MenuText( _( "Cursor Right Fast" ) )
.FriendlyName( _( "Cursor Right Fast" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_RIGHT_FAST ) );
@ -563,7 +563,7 @@ TOOL_ACTION ACTIONS::cursorClick( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_RETURN )
.LegacyHotkeyName( "Mouse Left Click" )
.MenuText( _( "Click" ) )
.FriendlyName( _( "Click" ) )
.Tooltip( _( "Performs left mouse button click" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_CLICK ) );
@ -573,7 +573,7 @@ TOOL_ACTION ACTIONS::cursorDblClick( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_END )
.LegacyHotkeyName( "Mouse Left Double Click" )
.MenuText( _( "Double-click" ) )
.FriendlyName( _( "Double-click" ) )
.Tooltip( _( "Performs left mouse button double-click" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_DBL_CLICK ) );
@ -585,20 +585,20 @@ TOOL_ACTION ACTIONS::refreshPreview( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::pinLibrary( TOOL_ACTION_ARGS()
.Name( "common.Control.pinLibrary" )
.Scope( AS_GLOBAL )
.MenuText( _( "Pin Library" ) )
.FriendlyName( _( "Pin Library" ) )
.Tooltip( _( "Keep the library at the top of the list" ) ) );
TOOL_ACTION ACTIONS::unpinLibrary( TOOL_ACTION_ARGS()
.Name( "common.Control.unpinLibrary" )
.Scope( AS_GLOBAL )
.MenuText( _( "Unpin Library" ) )
.FriendlyName( _( "Unpin Library" ) )
.Tooltip( _( "No longer keep the library at the top of the list" ) ) );
TOOL_ACTION ACTIONS::panUp( TOOL_ACTION_ARGS()
.Name( "common.Control.panUp" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + WXK_UP )
.MenuText( _( "Pan Up" ) )
.FriendlyName( _( "Pan Up" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_UP ) );
@ -606,7 +606,7 @@ TOOL_ACTION ACTIONS::panDown( TOOL_ACTION_ARGS()
.Name( "common.Control.panDown" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + WXK_DOWN )
.MenuText( _( "Pan Down" ) )
.FriendlyName( _( "Pan Down" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_DOWN ) );
@ -614,7 +614,7 @@ TOOL_ACTION ACTIONS::panLeft( TOOL_ACTION_ARGS()
.Name( "common.Control.panLeft" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + WXK_LEFT )
.MenuText( _( "Pan Left" ) )
.FriendlyName( _( "Pan Left" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_LEFT ) );
@ -622,7 +622,7 @@ TOOL_ACTION ACTIONS::panRight( TOOL_ACTION_ARGS()
.Name( "common.Control.panRight" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + WXK_RIGHT )
.MenuText( _( "Pan Right" ) )
.FriendlyName( _( "Pan Right" ) )
.Flags( AF_NONE )
.Parameter( CURSOR_RIGHT ) );
@ -632,41 +632,41 @@ TOOL_ACTION ACTIONS::gridFast1( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_ALT + '1' )
.LegacyHotkeyName( "Switch Grid To Fast Grid1" )
.MenuText( _( "Switch to Fast Grid 1" ) ) );
.FriendlyName( _( "Switch to Fast Grid 1" ) ) );
TOOL_ACTION ACTIONS::gridFast2( TOOL_ACTION_ARGS()
.Name( "common.Control.gridFast2" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_ALT + '2' )
.LegacyHotkeyName( "Switch Grid To Fast Grid2" )
.MenuText( _( "Switch to Fast Grid 2" ) ) );
.FriendlyName( _( "Switch to Fast Grid 2" ) ) );
TOOL_ACTION ACTIONS::gridFastCycle( TOOL_ACTION_ARGS()
.Name( "common.Control.gridFastCycle" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_ALT + '4' )
.LegacyHotkeyName( "Switch Grid To Next Fast Grid" )
.MenuText( _( "Cycle Fast Grid" ) ) );
.FriendlyName( _( "Cycle Fast Grid" ) ) );
TOOL_ACTION ACTIONS::gridNext( TOOL_ACTION_ARGS()
.Name( "common.Control.gridNext" )
.Scope( AS_GLOBAL )
.DefaultHotkey( 'N' )
.LegacyHotkeyName( "Switch Grid To Next" )
.MenuText( _("Switch to Next Grid" ) ) );
.FriendlyName( _("Switch to Next Grid" ) ) );
TOOL_ACTION ACTIONS::gridPrev( TOOL_ACTION_ARGS()
.Name( "common.Control.gridPrev" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + 'N' )
.LegacyHotkeyName( "Switch Grid To Previous" )
.MenuText( _( "Switch to Previous Grid" ) ) );
.FriendlyName( _( "Switch to Previous Grid" ) ) );
TOOL_ACTION ACTIONS::gridSetOrigin( TOOL_ACTION_ARGS()
.Name( "common.Control.gridSetOrigin" )
.Scope( AS_GLOBAL )
.LegacyHotkeyName( "Set Grid Origin" )
.MenuText( _( "Grid Origin" ) )
.FriendlyName( _( "Grid Origin" ) )
.Tooltip( _( "Place the grid origin point" ) )
.Icon( BITMAPS::grid_select_axis )
.Parameter<VECTOR2D*>( nullptr ) );
@ -675,7 +675,7 @@ TOOL_ACTION ACTIONS::gridResetOrigin( TOOL_ACTION_ARGS()
.Name( "common.Control.gridResetOrigin" )
.Scope( AS_GLOBAL )
.LegacyHotkeyName( "Reset Grid Origin" )
.MenuText( _( "Reset Grid Origin" ) ) );
.FriendlyName( _( "Reset Grid Origin" ) ) );
TOOL_ACTION ACTIONS::gridPreset( TOOL_ACTION_ARGS()
.Name( "common.Control.gridPreset" )
@ -685,7 +685,7 @@ TOOL_ACTION ACTIONS::gridPreset( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::toggleGrid( TOOL_ACTION_ARGS()
.Name( "common.Control.toggleGrid" )
.Scope( AS_GLOBAL)
.MenuText( _( "Show Grid" ) )
.FriendlyName( _( "Show Grid" ) )
.Tooltip( _( "Display background grid in the edit window" ) )
.Icon( BITMAPS::grid ) );
@ -693,27 +693,27 @@ TOOL_ACTION ACTIONS::toggleGridOverrides( TOOL_ACTION_ARGS()
.Name( "common.Control.toggleGridOverrides" )
.DefaultHotkey( MD_CTRL + MD_SHIFT + 'G' )
.Scope( AS_GLOBAL)
.MenuText( _( "Grid Overrides" ) )
.FriendlyName( _( "Grid Overrides" ) )
.Tooltip( _( "Enables item-specific grids that override the current grid" ) )
.Icon( BITMAPS::grid_override ) );
TOOL_ACTION ACTIONS::gridProperties( TOOL_ACTION_ARGS()
.Name( "common.Control.editGrids" )
.Scope( AS_GLOBAL )
.MenuText( _( "Edit Grids..." ) )
.FriendlyName( _( "Edit Grids..." ) )
.Tooltip( _( "Edit grid definitions" ) )
.Icon( BITMAPS::grid_select ) );
TOOL_ACTION ACTIONS::gridOrigin( TOOL_ACTION_ARGS()
.Name( "common.Control.editGridOrigin" )
.Scope( AS_GLOBAL )
.MenuText( _( "Grid Origin..." ) )
.FriendlyName( _( "Grid Origin..." ) )
.Tooltip( _( "Set the grid origin point" ) ) );
TOOL_ACTION ACTIONS::inchesUnits( TOOL_ACTION_ARGS()
.Name( "common.Control.imperialUnits" )
.Scope( AS_GLOBAL )
.MenuText( _( "Inches" ) )
.FriendlyName( _( "Inches" ) )
.Tooltip( _( "Use inches" ) )
.Icon( BITMAPS::unit_inch )
.Flags( AF_NONE )
@ -722,7 +722,7 @@ TOOL_ACTION ACTIONS::inchesUnits( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::milsUnits( TOOL_ACTION_ARGS()
.Name( "common.Control.mils" )
.Scope( AS_GLOBAL )
.MenuText( _( "Mils" ) )
.FriendlyName( _( "Mils" ) )
.Tooltip( _( "Use mils" ) )
.Icon( BITMAPS::unit_mil )
.Flags( AF_NONE )
@ -731,7 +731,7 @@ TOOL_ACTION ACTIONS::milsUnits( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::millimetersUnits( TOOL_ACTION_ARGS()
.Name( "common.Control.metricUnits" )
.Scope( AS_GLOBAL )
.MenuText( _( "Millimeters" ) )
.FriendlyName( _( "Millimeters" ) )
.Tooltip( _( "Use millimeters" ) )
.Icon( BITMAPS::unit_mm )
.Flags( AF_NONE )
@ -748,21 +748,21 @@ TOOL_ACTION ACTIONS::updatePreferences( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::selectColumns( TOOL_ACTION_ARGS()
.Name( "common.Control.selectColumns" )
.Scope( AS_GLOBAL )
.MenuText( _( "Select Columns" ) ) );
.FriendlyName( _( "Select Columns" ) ) );
TOOL_ACTION ACTIONS::toggleUnits( TOOL_ACTION_ARGS()
.Name( "common.Control.toggleUnits" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'U' )
.LegacyHotkeyName( "Switch Units" )
.MenuText( _( "Switch units" ) )
.FriendlyName( _( "Switch units" ) )
.Tooltip( _( "Switch between imperial and metric units" ) )
.Icon( BITMAPS::unit_mm ) );
TOOL_ACTION ACTIONS::togglePolarCoords( TOOL_ACTION_ARGS()
.Name( "common.Control.togglePolarCoords" )
.Scope( AS_GLOBAL )
.MenuText( _( "Polar Coordinates" ) )
.FriendlyName( _( "Polar Coordinates" ) )
.Tooltip( _( "Switch between polar and cartesian coordinate systems" ) )
.Icon( BITMAPS::polar_coord ) );
@ -771,7 +771,7 @@ TOOL_ACTION ACTIONS::resetLocalCoords( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( ' ' )
.LegacyHotkeyName( "Reset Local Coordinates" )
.MenuText( _( "Reset Local Coordinates" ) ) );
.FriendlyName( _( "Reset Local Coordinates" ) ) );
TOOL_ACTION ACTIONS::toggleCursor( TOOL_ACTION_ARGS()
.Name( "common.Control.toggleCursor" )
@ -779,14 +779,14 @@ TOOL_ACTION ACTIONS::toggleCursor( TOOL_ACTION_ARGS()
.DefaultHotkey( MD_CTRL + MD_SHIFT + 'X' )
// Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
.LegacyHotkeyName( "Toggle Cursor Display (Modern Toolset only)" )
.MenuText( _( "Always Show Cursor" ) )
.FriendlyName( _( "Always Show Cursor" ) )
.Tooltip( _( "Display crosshairs even in selection tool" ) )
.Icon( BITMAPS::cursor ) );
TOOL_ACTION ACTIONS::toggleCursorStyle( TOOL_ACTION_ARGS()
.Name( "common.Control.toggleCursorStyle" )
.Scope( AS_GLOBAL )
.MenuText( _( "Full-Window Crosshairs" ) )
.FriendlyName( _( "Full-Window Crosshairs" ) )
.Tooltip( _( "Switch display of full-window crosshairs" ) )
.Icon( BITMAPS::cursor_shape ) );
@ -794,7 +794,7 @@ TOOL_ACTION ACTIONS::highContrastMode( TOOL_ACTION_ARGS()
.Name( "common.Control.highContrastMode" )
.Scope( AS_GLOBAL )
.LegacyHotkeyName( "Toggle High Contrast Mode" )
.MenuText( _( "Inactive Layer View Mode" ) )
.FriendlyName( _( "Inactive Layer View Mode" ) )
.Tooltip( _( "Toggle inactive layers between normal and dimmed" ) )
.Icon( BITMAPS::contrast_mode ) );
@ -802,21 +802,21 @@ TOOL_ACTION ACTIONS::highContrastModeCycle( TOOL_ACTION_ARGS()
.Name( "common.Control.highContrastModeCycle" )
.Scope( AS_GLOBAL )
.DefaultHotkey( 'H' )
.MenuText( _( "Inactive Layer View Mode (3-state)" ) )
.FriendlyName( _( "Inactive Layer View Mode (3-state)" ) )
.Tooltip( _( "Cycle inactive layers between normal, dimmed, and hidden" ) )
.Icon( BITMAPS::contrast_mode ) );
TOOL_ACTION ACTIONS::toggleBoundingBoxes( TOOL_ACTION_ARGS()
.Name( "common.Control.toggleBoundingBoxes" )
.Scope( AS_GLOBAL )
.MenuText( _( "Draw Bounding Boxes" ) )
.FriendlyName( _( "Draw Bounding Boxes" ) )
.Tooltip( _( "Draw Bounding Boxes" ) )
.Icon( BITMAPS::gerbview_show_negative_objects ) );
TOOL_ACTION ACTIONS::selectionTool( TOOL_ACTION_ARGS()
.Name( "common.InteractiveSelection.selectionTool" )
.Scope( AS_GLOBAL )
.MenuText( _( "Select item(s)" ) )
.FriendlyName( _( "Select item(s)" ) )
.Tooltip( _( "Select item(s)" ) )
.Icon( BITMAPS::cursor )
.Flags( AF_ACTIVATE ) );
@ -827,7 +827,7 @@ TOOL_ACTION ACTIONS::measureTool( TOOL_ACTION_ARGS()
.DefaultHotkey( MD_CTRL + MD_SHIFT + 'M' )
// Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
.LegacyHotkeyName( "Measure Distance (Modern Toolset only)" )
.MenuText( _( "Measure Tool" ) )
.FriendlyName( _( "Measure Tool" ) )
.Tooltip( _( "Interactively measure distance between points" ) )
.Icon( BITMAPS::measurement )
.Flags( AF_ACTIVATE ) );
@ -844,7 +844,7 @@ TOOL_ACTION ACTIONS::pickerSubTool( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::showProjectManager( TOOL_ACTION_ARGS()
.Name( "common.Control.showProjectManager" )
.Scope( AS_GLOBAL )
.MenuText( _( "Switch to Project Manager" ) )
.FriendlyName( _( "Switch to Project Manager" ) )
.Tooltip( _( "Show project window" ) )
.Icon( BITMAPS::icon_kicad_24 ) );
@ -853,14 +853,14 @@ TOOL_ACTION ACTIONS::show3DViewer( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_ALT + '3' )
.LegacyHotkeyName( "3D Viewer" )
.MenuText( _( "3D Viewer" ) )
.FriendlyName( _( "3D Viewer" ) )
.Tooltip( _( "Show 3D viewer window" ) )
.Icon( BITMAPS::three_d ) );
TOOL_ACTION ACTIONS::showSymbolBrowser( TOOL_ACTION_ARGS()
.Name( "common.Control.showSymbolBrowser" )
.Scope( AS_GLOBAL )
.MenuText( _( "Symbol Library Browser" ) )
.FriendlyName( _( "Symbol Library Browser" ) )
.Tooltip( _( "Browse symbol libraries" ) )
.Icon( BITMAPS::library_browser )
.Flags( AF_NONE)
@ -869,7 +869,7 @@ TOOL_ACTION ACTIONS::showSymbolBrowser( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::showSymbolEditor( TOOL_ACTION_ARGS()
.Name( "common.Control.showSymbolEditor" )
.Scope( AS_GLOBAL )
.MenuText( _( "Symbol Editor" ) )
.FriendlyName( _( "Symbol Editor" ) )
.Tooltip( _( "Create, delete and edit symbols" ) )
.Icon( BITMAPS::libedit )
.Flags( AF_NONE )
@ -878,7 +878,7 @@ TOOL_ACTION ACTIONS::showSymbolEditor( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::showFootprintBrowser( TOOL_ACTION_ARGS()
.Name( "common.Control.showFootprintBrowser" )
.Scope( AS_GLOBAL )
.MenuText( _( "Footprint Library Browser" ) )
.FriendlyName( _( "Footprint Library Browser" ) )
.Tooltip( _( "Browse footprint libraries" ) )
.Icon( BITMAPS::library_browser )
.Flags( AF_NONE )
@ -887,7 +887,7 @@ TOOL_ACTION ACTIONS::showFootprintBrowser( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::showFootprintEditor( TOOL_ACTION_ARGS()
.Name( "common.Control.showFootprintEditor" )
.Scope( AS_GLOBAL )
.MenuText( _( "Footprint Editor" ) )
.FriendlyName( _( "Footprint Editor" ) )
.Tooltip( _( "Create, delete and edit footprints" ) )
.Icon( BITMAPS::module_editor )
.Flags( AF_NONE )
@ -896,7 +896,7 @@ TOOL_ACTION ACTIONS::showFootprintEditor( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::showProperties( TOOL_ACTION_ARGS()
.Name( "common.Control.showProperties" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show Properties Manager" ) )
.FriendlyName( _( "Show Properties Manager" ) )
.Tooltip( _( "Show/hide the properties manager" ) )
.Icon( BITMAPS::tools ) );
@ -905,14 +905,14 @@ TOOL_ACTION ACTIONS::updatePcbFromSchematic( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_F8 )
.LegacyHotkeyName( "Update PCB from Schematic" )
.MenuText( _( "Update PCB from Schematic..." ) )
.FriendlyName( _( "Update PCB from Schematic..." ) )
.Tooltip( _( "Update PCB with changes made to schematic" ) )
.Icon( BITMAPS::update_pcb_from_sch ) );
TOOL_ACTION ACTIONS::updateSchematicFromPcb( TOOL_ACTION_ARGS()
.Name( "common.Control.updateSchematicFromPCB" )
.Scope( AS_GLOBAL )
.MenuText( _( "Update Schematic from PCB..." ) )
.FriendlyName( _( "Update Schematic from PCB..." ) )
.Tooltip( _( "Update schematic with changes made to PCB" ) )
.Icon( BITMAPS::update_sch_from_pcb ) );
@ -920,7 +920,7 @@ TOOL_ACTION ACTIONS::openPreferences( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.openPreferences" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + ',' )
.MenuText( _( "Preferences..." ) )
.FriendlyName( _( "Preferences..." ) )
.Tooltip( _( "Show preferences for all open tools" ) )
.Icon( BITMAPS::preference )
.UIId( wxID_PREFERENCES ) );
@ -928,42 +928,42 @@ TOOL_ACTION ACTIONS::openPreferences( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::configurePaths( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.configurePaths" )
.Scope( AS_GLOBAL )
.MenuText( _( "Configure Paths..." ) )
.FriendlyName( _( "Configure Paths..." ) )
.Tooltip( _( "Edit path configuration environment variables" ) )
.Icon( BITMAPS::path ) );
TOOL_ACTION ACTIONS::showSymbolLibTable( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.showSymbolLibTable" )
.Scope( AS_GLOBAL )
.MenuText( _( "Manage Symbol Libraries..." ) )
.FriendlyName( _( "Manage Symbol Libraries..." ) )
.Tooltip( _( "Edit the global and project symbol library lists" ) )
.Icon( BITMAPS::library_table ) );
TOOL_ACTION ACTIONS::showFootprintLibTable( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.showFootprintLibTable" )
.Scope( AS_GLOBAL )
.MenuText( _( "Manage Footprint Libraries..." ) )
.FriendlyName( _( "Manage Footprint Libraries..." ) )
.Tooltip( _( "Edit the global and project footprint library lists" ) )
.Icon( BITMAPS::library_table ) );
TOOL_ACTION ACTIONS::gettingStarted( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.gettingStarted" )
.Scope( AS_GLOBAL )
.MenuText( _( "Getting Started with KiCad" ) )
.FriendlyName( _( "Getting Started with KiCad" ) )
.Tooltip( _( "Open \"Getting Started in KiCad\" guide for beginners" ) )
.Icon( BITMAPS::help ) );
TOOL_ACTION ACTIONS::help( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.help" )
.Scope( AS_GLOBAL )
.MenuText( _( "Help" ) )
.FriendlyName( _( "Help" ) )
.Tooltip( _( "Open product documentation in a web browser" ) )
.Icon( BITMAPS::help_online ) );
TOOL_ACTION ACTIONS::about( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.about" )
.Scope( AS_GLOBAL )
.MenuText( _( "About KiCad" ) )
.FriendlyName( _( "About KiCad" ) )
.Tooltip( _( "Open about dialog" ) )
.UIId( wxID_ABOUT )
.Icon( BITMAPS::about ) );
@ -973,27 +973,27 @@ TOOL_ACTION ACTIONS::listHotKeys( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_F1 )
.LegacyHotkeyName( "List Hotkeys" )
.MenuText( _( "List Hotkeys..." ) )
.FriendlyName( _( "List Hotkeys..." ) )
.Tooltip( _( "Displays current hotkeys table and corresponding commands" ) )
.Icon( BITMAPS::hotkeys ) );
TOOL_ACTION ACTIONS::getInvolved( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.getInvolved" )
.Scope( AS_GLOBAL )
.MenuText( _( "Get Involved" ) )
.FriendlyName( _( "Get Involved" ) )
.Tooltip( _( "Open \"Contribute to KiCad\" in a web browser" ) )
.Icon( BITMAPS::info ) );
TOOL_ACTION ACTIONS::donate( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.donate" )
.Scope( AS_GLOBAL )
.MenuText( _( "Donate" ) )
.FriendlyName( _( "Donate" ) )
.Tooltip( _( "Open \"Donate to KiCad\" in a web browser" ) ) );
TOOL_ACTION ACTIONS::reportBug( TOOL_ACTION_ARGS()
.Name( "common.SuiteControl.reportBug" )
.Scope( AS_GLOBAL )
.MenuText( _( "Report Bug" ) )
.FriendlyName( _( "Report Bug" ) )
.Tooltip( _( "Report a problem with KiCad" ) )
.Icon( BITMAPS::bug ) );

View File

@ -46,7 +46,7 @@ TOOL_ACTION::TOOL_ACTION( const std::string& aName, TOOL_ACTION_SCOPE aScope,
m_defaultHotKey( aDefaultHotKey ),
m_defaultHotKeyAlt( 0 ),
m_legacyName( aLegacyHotKeyName ),
m_label( aLabel ),
m_menuLabel( aLabel ),
m_tooltip( aTooltip ),
m_icon( aIcon ),
m_id( -1 ),
@ -78,7 +78,7 @@ TOOL_ACTION::TOOL_ACTION( const TOOL_ACTION_ARGS& aArgs ) :
m_hotKey( aArgs.m_defaultHotKey.value_or( 0 ) ),
m_hotKeyAlt( 0 ),
m_legacyName( aArgs.m_legacyName.value_or( "" ) ),
m_label( TowxString( aArgs.m_menuText.value_or( "" ) ) ),
m_friendlyName( TowxString( aArgs.m_friendlyName.value_or( "" ) ) ),
m_tooltip( TowxString( aArgs.m_tooltip.value_or( "" ) ) ),
m_icon( aArgs.m_icon.value_or( BITMAPS::INVALID_BITMAP) ),
m_id( -1 ),
@ -88,6 +88,9 @@ TOOL_ACTION::TOOL_ACTION( const TOOL_ACTION_ARGS& aArgs ) :
// Action name is the only mandatory part
assert( !m_name.empty() );
if( aArgs.m_menuText.has_value() )
m_menuLabel = TowxString( aArgs.m_menuText.value() );
if( aArgs.m_uiid.has_value() )
m_uiid = aArgs.m_uiid.value();
@ -144,18 +147,27 @@ TOOL_EVENT TOOL_ACTION::MakeEvent() const
}
wxString TOOL_ACTION::GetLabel() const
wxString TOOL_ACTION::GetFriendlyName() const
{
if( m_label.empty() )
if( m_friendlyName.empty() )
return wxEmptyString;
return wxGetTranslation( m_label );
return wxGetTranslation( m_friendlyName );
}
wxString TOOL_ACTION::GetMenuLabel() const
{
if( m_menuLabel.has_value() )
return wxGetTranslation( m_menuLabel.value() );
return GetFriendlyName();
}
wxString TOOL_ACTION::GetMenuItem() const
{
wxString label = wxGetTranslation( m_label );
wxString label = GetMenuLabel();
label.Replace( wxS( "&" ), wxS( "&&" ) );
return AddHotkeyName( label, m_hotKey, IS_HOTKEY );
}

View File

@ -68,7 +68,7 @@ void TOOLS_HOLDER::PushTool( const TOOL_EVENT& aEvent )
TOOL_ACTION* action = m_toolManager->GetActionManager()->FindAction( actionName );
if( action )
DisplayToolMsg( action->GetLabel() );
DisplayToolMsg( action->GetFriendlyName() );
else
DisplayToolMsg( actionName );
}
@ -109,7 +109,7 @@ void TOOLS_HOLDER::PopTool( const TOOL_EVENT& aEvent )
}
}
else
DisplayToolMsg( ACTIONS::selectionTool.GetLabel() );
DisplayToolMsg( ACTIONS::selectionTool.GetFriendlyName() );
return;
}
@ -146,7 +146,7 @@ void TOOLS_HOLDER::ShowChangedLanguage()
TOOL_ACTION* action = GetToolManager()->GetActionManager()->FindAction( actionName );
if( action )
DisplayToolMsg( action->GetLabel() );
DisplayToolMsg( action->GetFriendlyName() );
}

View File

@ -237,7 +237,7 @@ public:
return true;
// Match in the (translated) filter string
const auto normedInfo = wxGetTranslation( aHotkey.m_Actions[ 0 ]->GetLabel() ).Upper();
const auto normedInfo = wxGetTranslation( aHotkey.m_Actions[ 0 ]->GetFriendlyName() ).Upper();
if( normedInfo.Contains( m_normalised_filter_str ) )
return true;
@ -291,7 +291,7 @@ void WIDGET_HOTKEY_LIST::updateFromClientData()
if( hkdata )
{
const HOTKEY& changed_hk = hkdata->GetChangedHotkey();
wxString label = changed_hk.m_Actions[ 0 ]->GetLabel();
wxString label = changed_hk.m_Actions[ 0 ]->GetFriendlyName();
wxString key_text = KeyNameFromKeyCode( changed_hk.m_EditKeycode );
wxString alt_text = KeyNameFromKeyCode( changed_hk.m_EditKeycodeAlt );
wxString description = changed_hk.m_Actions[ 0 ]->GetDescription();
@ -465,7 +465,7 @@ bool WIDGET_HOTKEY_LIST::resolveKeyConflicts( TOOL_ACTION* aAction, long aKey )
wxString msg = wxString::Format( _( "'%s' is already assigned to '%s' in section '%s'. "
"Are you sure you want to change its assignment?" ),
KeyNameFromKeyCode( aKey ),
conflictingAction->GetLabel(),
conflictingAction->GetFriendlyName(),
HOTKEY_STORE::GetSectionName( conflictingAction ) );
wxMessageDialog dlg( GetParent(), msg, _( "Confirm change" ), wxYES_NO | wxNO_DEFAULT );

View File

@ -51,7 +51,7 @@ TOOL_ACTION CVPCB_ACTIONS::controlActivate( TOOL_ACTION_ARGS()
TOOL_ACTION CVPCB_ACTIONS::showFootprintViewer( TOOL_ACTION_ARGS()
.Name( "cvpcb.Control.ShowFootprintViewer" )
.Scope( AS_GLOBAL )
.MenuText( _( "View selected footprint" ) )
.FriendlyName( _( "View selected footprint" ) )
.Tooltip( _( "View the selected footprint in the footprint viewer" ) )
.Icon( BITMAPS::show_footprint ) );
@ -60,7 +60,7 @@ TOOL_ACTION CVPCB_ACTIONS::showFootprintViewer( TOOL_ACTION_ARGS()
TOOL_ACTION CVPCB_ACTIONS::showEquFileTable( TOOL_ACTION_ARGS()
.Name( "cvpcb.Control.ShowEquFileTable" )
.Scope( AS_GLOBAL )
.MenuText( _( "Manage Footprint Association Files..." ) )
.FriendlyName( _( "Manage Footprint Association Files..." ) )
.Tooltip( _( "Edit the footprint association files list. These files are used to "
"automatically assign footprint names from symbol values." ) ) );
@ -69,7 +69,7 @@ TOOL_ACTION CVPCB_ACTIONS::saveAssociationsToSchematic( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'S' )
.LegacyHotkeyName( "Save" )
.MenuText( _( "Save to Schematic" ) )
.FriendlyName( _( "Save to Schematic" ) )
.Tooltip( _( "Save footprint associations in schematic symbol footprint fields" ) )
.Icon( BITMAPS::save ) );
@ -78,7 +78,7 @@ TOOL_ACTION CVPCB_ACTIONS::saveAssociationsToFile( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'S' )
.LegacyHotkeyName( "Save" )
.MenuText( _( "Save to Schematic and File" ) )
.FriendlyName( _( "Save to Schematic and File" ) )
.Tooltip( _( "Save footprint associations in schematic symbol footprint fields and schematic files" ) )
.Icon( BITMAPS::save ) );
@ -101,7 +101,7 @@ TOOL_ACTION CVPCB_ACTIONS::changeFocusLeft( TOOL_ACTION_ARGS()
TOOL_ACTION CVPCB_ACTIONS::gotoNextNA( TOOL_ACTION_ARGS()
.Name( "cvpcb.Control.GotoNextNA" )
.Scope( AS_GLOBAL )
.MenuText( _( "Select next unassigned symbol" ) )
.FriendlyName( _( "Select next unassigned symbol" ) )
.Tooltip( _( "Select next symbol with no footprint assignment" ) )
.Icon( BITMAPS::right )
.Flags( AF_NONE )
@ -110,7 +110,7 @@ TOOL_ACTION CVPCB_ACTIONS::gotoNextNA( TOOL_ACTION_ARGS()
TOOL_ACTION CVPCB_ACTIONS::gotoPreviousNA( TOOL_ACTION_ARGS()
.Name( "cvpcb.Control.GotoPreviousNA" )
.Scope( AS_GLOBAL )
.MenuText( _( "Select previous unassigned symbol" ) )
.FriendlyName( _( "Select previous unassigned symbol" ) )
.Tooltip( _( "Select previous symbol with no footprint assignment" ) )
.Icon( BITMAPS::left )
.Flags( AF_NONE )
@ -122,14 +122,14 @@ TOOL_ACTION CVPCB_ACTIONS::associate( TOOL_ACTION_ARGS()
.Name( "cvpcb.Association.Associate" )
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_RETURN )
.MenuText( _( "Assign footprint" ) )
.FriendlyName( _( "Assign footprint" ) )
.Tooltip( _( "Assign footprint to selected symbols" ) )
.Icon( BITMAPS::auto_associate ) );
TOOL_ACTION CVPCB_ACTIONS::autoAssociate( TOOL_ACTION_ARGS()
.Name( "cvpcb.Association.AutoAssociate" )
.Scope( AS_GLOBAL )
.MenuText( _( "Automatically assign footprints" ) )
.FriendlyName( _( "Automatically assign footprints" ) )
.Tooltip( _( "Perform automatic footprint assignment" ) )
.Icon( BITMAPS::auto_associate ) );
@ -137,14 +137,14 @@ TOOL_ACTION CVPCB_ACTIONS::deleteAssoc( TOOL_ACTION_ARGS()
.Name( "cvpcb.Association.Delete" )
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_DELETE )
.MenuText( _( "Delete association" ) )
.FriendlyName( _( "Delete association" ) )
.Tooltip( _( "Delete selected footprint associations" ) )
.Icon( BITMAPS::delete_association ) );
TOOL_ACTION CVPCB_ACTIONS::deleteAll( TOOL_ACTION_ARGS()
.Name( "cvpcb.Association.DeleteAll" )
.Scope( AS_GLOBAL )
.MenuText( _( "Delete all footprint associations" ) )
.FriendlyName( _( "Delete all footprint associations" ) )
.Tooltip( _( "Delete all footprint associations" ) )
.Icon( BITMAPS::delete_association ) );
@ -153,7 +153,7 @@ TOOL_ACTION CVPCB_ACTIONS::deleteAll( TOOL_ACTION_ARGS()
TOOL_ACTION CVPCB_ACTIONS::FilterFPbyFPFilters( TOOL_ACTION_ARGS()
.Name( "cvpcb.Control.FilterFPbyFPFilters" )
.Scope( AS_GLOBAL )
.MenuText( _( "Use symbol footprint filters" ) )
.FriendlyName( _( "Use symbol footprint filters" ) )
.Tooltip( _( "Filter footprint list by footprint filters defined in the symbol" ) )
.Icon( BITMAPS::module_filtered_list )
.Flags( AF_NONE )
@ -162,7 +162,7 @@ TOOL_ACTION CVPCB_ACTIONS::FilterFPbyFPFilters( TOOL_ACTION_ARGS()
TOOL_ACTION CVPCB_ACTIONS::filterFPbyPin( TOOL_ACTION_ARGS()
.Name( "cvpcb.Control.FilterFPByPin" )
.Scope( AS_GLOBAL )
.MenuText( _( "Filter by pin count" ) )
.FriendlyName( _( "Filter by pin count" ) )
.Tooltip( _( "Filter footprint list by pin count" ) )
.Icon( BITMAPS::module_pin_filtered_list )
.Flags( AF_NONE )
@ -171,7 +171,7 @@ TOOL_ACTION CVPCB_ACTIONS::filterFPbyPin( TOOL_ACTION_ARGS()
TOOL_ACTION CVPCB_ACTIONS::FilterFPbyLibrary( TOOL_ACTION_ARGS()
.Name( "cvpcb.Control.FilterFPbyLibrary" )
.Scope( AS_GLOBAL )
.MenuText( _( "Filter by library" ) )
.FriendlyName( _( "Filter by library" ) )
.Tooltip( _( "Filter footprint list by library" ) )
.Icon( BITMAPS::module_library_list )
.Flags( AF_NONE )

View File

@ -179,7 +179,7 @@ void NL_SCHEMATIC_PLUGIN_IMPL::exportCommandsAndImages()
for( it = actions.begin(); it != actions.end(); ++it )
{
const TOOL_ACTION* action = *it;
std::string label = action->GetLabel().ToStdString();
std::string label = action->GetMenuLabel().ToStdString();
if( label.empty() )
{

File diff suppressed because it is too large Load Diff

View File

@ -37,84 +37,84 @@
TOOL_ACTION GERBVIEW_ACTIONS::openAutodetected( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.openAutodetected" )
.Scope( AS_GLOBAL )
.MenuText( _( "Open Autodetected File(s)..." ) )
.FriendlyName( _( "Open Autodetected File(s)..." ) )
.Tooltip( _( "Open Autodetected file(s) on a new layer." ) )
.Icon( BITMAPS::load_gerber ) );
TOOL_ACTION GERBVIEW_ACTIONS::openGerber( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.openGerber" )
.Scope( AS_GLOBAL )
.MenuText( _( "Open Gerber Plot File(s)..." ) )
.FriendlyName( _( "Open Gerber Plot File(s)..." ) )
.Tooltip( _( "Open Gerber plot file(s) on a new layer." ) )
.Icon( BITMAPS::load_gerber ) );
TOOL_ACTION GERBVIEW_ACTIONS::openDrillFile( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.openDrillFile" )
.Scope( AS_GLOBAL )
.MenuText( _( "Open Excellon Drill File(s)..." ) )
.FriendlyName( _( "Open Excellon Drill File(s)..." ) )
.Tooltip( _( "Open Excellon drill file(s) on a new layer." ) )
.Icon( BITMAPS::load_drill ) );
TOOL_ACTION GERBVIEW_ACTIONS::openJobFile( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.openJobFile" )
.Scope( AS_GLOBAL )
.MenuText( _( "Open Gerber Job File..." ) )
.FriendlyName( _( "Open Gerber Job File..." ) )
.Tooltip( _( "Open a Gerber job file and its associated gerber plot files" ) )
.Icon( BITMAPS::file_gerber_job ) );
TOOL_ACTION GERBVIEW_ACTIONS::openZipFile( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.openZipFile" )
.Scope( AS_GLOBAL )
.MenuText( _( "Open Zip Archive File..." ) )
.FriendlyName( _( "Open Zip Archive File..." ) )
.Tooltip( _( "Open a zipped archive (Gerber and Drill) file" ) )
.Icon( BITMAPS::zip ) );
TOOL_ACTION GERBVIEW_ACTIONS::toggleLayerManager( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.toggleLayerManager" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show Layers Manager" ) )
.FriendlyName( _( "Show Layers Manager" ) )
.Tooltip( _( "Show or hide the layer manager" ) )
.Icon( BITMAPS::layers_manager ) );
TOOL_ACTION GERBVIEW_ACTIONS::showDCodes( TOOL_ACTION_ARGS()
.Name( "gerbview.Inspection.showDCodes" )
.Scope( AS_GLOBAL )
.MenuText( _( "List DCodes..." ) )
.FriendlyName( _( "List DCodes..." ) )
.Tooltip( _( "List D-codes defined in Gerber files" ) )
.Icon( BITMAPS::show_dcodenumber ) );
TOOL_ACTION GERBVIEW_ACTIONS::showSource( TOOL_ACTION_ARGS()
.Name( "gerbview.Inspection.showSource" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show Source..." ) )
.FriendlyName( _( "Show Source..." ) )
.Tooltip( _( "Show source file for the current layer" ) )
.Icon( BITMAPS::tools ) );
TOOL_ACTION GERBVIEW_ACTIONS::exportToPcbnew( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.exportToPcbnew" )
.Scope( AS_GLOBAL )
.MenuText( _( "Export to PCB Editor..." ) )
.FriendlyName( _( "Export to PCB Editor..." ) )
.Tooltip( _( "Export data as a KiCad PCB file" ) )
.Icon( BITMAPS::export_to_pcbnew ) );
TOOL_ACTION GERBVIEW_ACTIONS::clearLayer( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.clearLayer" )
.Scope( AS_GLOBAL )
.MenuText( _( "Clear Current Layer..." ) )
.FriendlyName( _( "Clear Current Layer..." ) )
.Tooltip( _( "Clear the selected graphic layer" ) )
.Icon( BITMAPS::delete_sheet ) );
TOOL_ACTION GERBVIEW_ACTIONS::clearAllLayers( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.clearAllLayers" )
.Scope( AS_GLOBAL )
.MenuText( _( "Clear All Layers" ) )
.FriendlyName( _( "Clear All Layers" ) )
.Tooltip( _( "Clear all layers. All data will be deleted" ) )
.Icon( BITMAPS::delete_gerber ) );
TOOL_ACTION GERBVIEW_ACTIONS::reloadAllLayers( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.reloadAllLayers" )
.Scope( AS_GLOBAL )
.MenuText( _( "Reload All Layers" ) )
.FriendlyName( _( "Reload All Layers" ) )
.Tooltip( _( "Reload all layers. All data will be reloaded" ) )
.Icon( BITMAPS::reload ) );
@ -126,35 +126,35 @@ TOOL_ACTION GERBVIEW_ACTIONS::layerChanged( TOOL_ACTION_ARGS()
TOOL_ACTION GERBVIEW_ACTIONS::highlightClear( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.highlightClear" )
.Scope( AS_GLOBAL )
.MenuText( _( "Clear Highlight" ) )
.FriendlyName( _( "Clear Highlight" ) )
.Tooltip( _( "Clear Highlight" ) )
.Icon( BITMAPS::cancel ) );
TOOL_ACTION GERBVIEW_ACTIONS::highlightNet( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.highlightNet" )
.Scope( AS_GLOBAL )
.MenuText( _( "Highlight Net" ) )
.FriendlyName( _( "Highlight Net" ) )
.Tooltip( _( "Highlight Net" ) )
.Icon( BITMAPS::general_ratsnest ) );
TOOL_ACTION GERBVIEW_ACTIONS::highlightComponent( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.highlightComponent" )
.Scope( AS_GLOBAL )
.MenuText( _( "Highlight Component" ) )
.FriendlyName( _( "Highlight Component" ) )
.Tooltip( _( "Highlight Component" ) )
.Icon( BITMAPS::module ) );
TOOL_ACTION GERBVIEW_ACTIONS::highlightAttribute( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.highlightAttribute" )
.Scope( AS_GLOBAL )
.MenuText( _( "Highlight Attribute" ) )
.FriendlyName( _( "Highlight Attribute" ) )
.Tooltip( _( "Highlight Attribute" ) )
.Icon( BITMAPS::flag ) );
TOOL_ACTION GERBVIEW_ACTIONS::highlightDCode( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.highlightDCode" )
.Scope( AS_GLOBAL )
.MenuText( _( "Highlight DCode" ) )
.FriendlyName( _( "Highlight DCode" ) )
.Tooltip( _( "Highlight DCode" ) )
.Icon( BITMAPS::show_dcodenumber ) );
@ -163,7 +163,7 @@ TOOL_ACTION GERBVIEW_ACTIONS::layerNext( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_PAGEDOWN )
.LegacyHotkeyName( "Switch to Next Layer" )
.MenuText( _( "Next Layer" ) )
.FriendlyName( _( "Next Layer" ) )
.Tooltip( _( "Next Layer" ) ) );
TOOL_ACTION GERBVIEW_ACTIONS::layerPrev( TOOL_ACTION_ARGS()
@ -171,14 +171,14 @@ TOOL_ACTION GERBVIEW_ACTIONS::layerPrev( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_PAGEUP )
.LegacyHotkeyName( "Switch to Previous Layer" )
.MenuText( _( "Previous Layer" ) )
.FriendlyName( _( "Previous Layer" ) )
.Tooltip( _( "Previous Layer" ) ) );
TOOL_ACTION GERBVIEW_ACTIONS::moveLayerUp( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.moveLayerUp" )
.Scope( AS_GLOBAL )
.DefaultHotkey( '+' )
.MenuText( _( "Move Layer Up" ) )
.FriendlyName( _( "Move Layer Up" ) )
.Tooltip( _( "Move Current Layer up" ) )
.Icon( BITMAPS::up ) );
@ -186,7 +186,7 @@ TOOL_ACTION GERBVIEW_ACTIONS::moveLayerDown( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.moveLayerDown" )
.Scope( AS_GLOBAL )
.DefaultHotkey( '-' )
.MenuText( _( "Move Layer Down" ) )
.FriendlyName( _( "Move Layer Down" ) )
.Tooltip( _( "Move Current Layer Down" ) )
.Icon( BITMAPS::down ) );
@ -195,7 +195,7 @@ TOOL_ACTION GERBVIEW_ACTIONS::linesDisplayOutlines( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( 'L' )
.LegacyHotkeyName( "Gbr Lines Display Mode" )
.MenuText( _( "Sketch Lines" ) )
.FriendlyName( _( "Sketch Lines" ) )
.Tooltip( _( "Show lines in outline mode" ) )
.Icon( BITMAPS::showtrack ) );
@ -204,7 +204,7 @@ TOOL_ACTION GERBVIEW_ACTIONS::flashedDisplayOutlines( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( 'F' )
.LegacyHotkeyName( "Gbr Flashed Display Mode" )
.MenuText( _( "Sketch Flashed Items" ) )
.FriendlyName( _( "Sketch Flashed Items" ) )
.Tooltip( _( "Show flashed items in outline mode" ) )
.Icon( BITMAPS::pad_sketch ) );
@ -213,7 +213,7 @@ TOOL_ACTION GERBVIEW_ACTIONS::polygonsDisplayOutlines( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( 'P' )
.LegacyHotkeyName( "Gbr Polygons Display Mode" )
.MenuText( _( "Sketch Polygons" ) )
.FriendlyName( _( "Sketch Polygons" ) )
.Tooltip( _( "Show polygons in outline mode" ) )
.Icon( BITMAPS::opt_show_polygon ) );
@ -222,7 +222,7 @@ TOOL_ACTION GERBVIEW_ACTIONS::negativeObjectDisplay( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( 'N' )
.LegacyHotkeyName( "Gbr Negative Obj Display Mode" )
.MenuText( _( "Ghost Negative Objects" ) )
.FriendlyName( _( "Ghost Negative Objects" ) )
.Tooltip( _( "Show negative objects in ghost color" ) )
.Icon( BITMAPS::gerbview_show_negative_objects ) );
@ -231,28 +231,28 @@ TOOL_ACTION GERBVIEW_ACTIONS::dcodeDisplay( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( 'D' )
.LegacyHotkeyName( "DCodes Display Mode" )
.MenuText( _( "Show DCodes" ) )
.FriendlyName( _( "Show DCodes" ) )
.Tooltip( _( "Show dcode number" ) )
.Icon( BITMAPS::show_dcodenumber ) );
TOOL_ACTION GERBVIEW_ACTIONS::toggleDiffMode( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.toggleDiffMode" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show in Differential Mode" ) )
.FriendlyName( _( "Show in Differential Mode" ) )
.Tooltip( _( "Show layers in differential compare mode" ) )
.Icon( BITMAPS::gbr_select_mode1 ) );
TOOL_ACTION GERBVIEW_ACTIONS::toggleXORMode( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.toggleXORMode" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show in XOR Mode" ) )
.FriendlyName( _( "Show in XOR Mode" ) )
.Tooltip( _( "Show layers in exclusive-or compare mode" ) )
.Icon( BITMAPS::gbr_select_mode2 ) );
TOOL_ACTION GERBVIEW_ACTIONS::flipGerberView( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.flipGerberView" )
.Scope( AS_GLOBAL )
.MenuText( _( "Flip Gerber View" ) )
.FriendlyName( _( "Flip Gerber View" ) )
.Tooltip( _( "Show as mirror image" ) )
.Icon( BITMAPS::flip_board ) );

View File

@ -114,6 +114,12 @@ public:
return *this;
}
TOOL_ACTION_ARGS& FriendlyName( const std::string_view& aName )
{
m_friendlyName = aName;
return *this;
}
/**
* The scope of the action.
*/
@ -227,6 +233,7 @@ protected:
friend class TOOL_ACTION;
std::optional<std::string_view> m_name;
std::optional<std::string_view> m_friendlyName;
std::optional<TOOL_ACTION_SCOPE> m_scope;
std::optional<TOOL_ACTION_FLAGS> m_flags;
@ -345,11 +352,16 @@ public:
/**
* Return the translated label for the action.
*/
wxString GetLabel() const;
wxString GetMenuLabel() const;
wxString GetMenuItem() const;
wxString GetTooltip( bool aIncludeHotkey = true ) const;
wxString GetDescription() const;
/**
* Return the translated user-friendly name of the action.
*/
wxString GetFriendlyName() const;
TOOL_ACTION_SCOPE GetScope() const { return m_scope; }
/**
@ -431,9 +443,10 @@ protected:
int m_hotKeyAlt; // The alternate hotkey (post-user-settings-application)
const std::string m_legacyName; // Name for reading legacy hotkey settings
wxString m_label; // Menu label
wxString m_tooltip; // User-facing tooltip help text
std::optional<wxString> m_description; // Description of the action
wxString m_friendlyName; // User-friendly name
std::optional<wxString> m_menuLabel; // Menu label
wxString m_tooltip; // User-facing tooltip help text
std::optional<wxString> m_description; // Description of the action
BITMAPS m_icon; // Icon for the menu entry

View File

@ -85,7 +85,7 @@ void PANEL_KICAD_LAUNCHER::CreateLaunchers()
m_toolManager->ProcessEvent( *evt );
};
wxStaticText* label = new wxStaticText( this, wxID_ANY, aAction.GetLabel() );
wxStaticText* label = new wxStaticText( this, wxID_ANY, aAction.GetFriendlyName() );
wxStaticText* help;
label->SetToolTip( aAction.GetTooltip() );

View File

@ -40,7 +40,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::newProject( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'N' )
.LegacyHotkeyName( "New Project" )
.MenuText( _( "New Project..." ) )
.FriendlyName( _( "New Project..." ) )
.Tooltip( _( "Create new blank project" ) )
.Icon( BITMAPS::new_project ) );
@ -49,7 +49,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::newFromTemplate( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'T' )
.LegacyHotkeyName( "New Project From Template" )
.MenuText( _( "New Project from Template..." ) )
.FriendlyName( _( "New Project from Template..." ) )
.Tooltip( _( "Create new project from template" ) )
.Icon( BITMAPS::new_project_from_template ) );
@ -57,7 +57,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::newFromRepository( TOOL_ACTION_ARGS()
.Name( "kicad.Control.newFromRepository" )
.Scope( AS_GLOBAL )
.LegacyHotkeyName( "Clone Project From Repository" )
.MenuText( _( "Clone Project from Repository..." ) )
.FriendlyName( _( "Clone Project from Repository..." ) )
.Tooltip( _( "Clone a project from an existing repository" ) )
.Icon( BITMAPS::new_project_from_template ) );
@ -65,7 +65,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::openDemoProject( TOOL_ACTION_ARGS()
.Name( "kicad.Control.openDemoProject" )
.Scope( AS_GLOBAL )
.LegacyHotkeyName( "Open Demo Project" )
.MenuText( _( "Open Demo Project..." ) )
.FriendlyName( _( "Open Demo Project..." ) )
.Tooltip( _( "Open a demo project" ) )
.Icon( BITMAPS::open_project_demo ) );
@ -74,7 +74,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::openProject( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'O' )
.LegacyHotkeyName( "Open Project" )
.MenuText( _( "Open Project..." ) )
.FriendlyName( _( "Open Project..." ) )
.Tooltip( _( "Open an existing project" ) )
.Icon( BITMAPS::open_project ) );
@ -82,7 +82,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::closeProject( TOOL_ACTION_ARGS()
.Name( "kicad.Control.closeProject" )
.Scope( AS_GLOBAL )
.LegacyHotkeyName( "Close Project" )
.MenuText( _( "Close Project" ) )
.FriendlyName( _( "Close Project" ) )
.Tooltip( _( "Close the current project" ) )
.Icon( BITMAPS::project_close ) );
@ -101,7 +101,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::editSchematic( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'E' )
.LegacyHotkeyName( "Run Eeschema" )
.MenuText( _( "Schematic Editor" ) )
.FriendlyName( _( "Schematic Editor" ) )
.Tooltip( _( "Edit schematic" ) )
.Icon( BITMAPS::icon_eeschema_24 )
.Flags( AF_NONE )
@ -112,7 +112,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::editSymbols( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'L' )
.LegacyHotkeyName( "Run LibEdit" )
.MenuText( _( "Symbol Editor" ) )
.FriendlyName( _( "Symbol Editor" ) )
.Tooltip( _( "Edit schematic symbols" ) )
.Icon( BITMAPS::icon_libedit_24 )
.Flags( AF_NONE )
@ -123,7 +123,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::editPCB( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'P' )
.LegacyHotkeyName( "Run Pcbnew" )
.MenuText( _( "PCB Editor" ) )
.FriendlyName( _( "PCB Editor" ) )
.Tooltip( _( "Edit PCB" ) )
.Icon( BITMAPS::icon_pcbnew_24 )
.Flags( AF_NONE )
@ -134,7 +134,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::editFootprints( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'F' )
.LegacyHotkeyName( "Run FpEditor" )
.MenuText( _( "Footprint Editor" ) )
.FriendlyName( _( "Footprint Editor" ) )
.Tooltip( _( "Edit PCB footprints" ) )
.Icon( BITMAPS::icon_modedit_24 )
.Flags( AF_NONE )
@ -145,7 +145,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::viewGerbers( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'G' )
.LegacyHotkeyName( "Run Gerbview" )
.MenuText( _( "Gerber Viewer" ) )
.FriendlyName( _( "Gerber Viewer" ) )
.Tooltip( _( "Preview Gerber output files" ) )
.Icon( BITMAPS::icon_gerbview_24 )
.Parameter<wxString*>( nullptr ) ); // Default to no filename
@ -155,7 +155,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::convertImage( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'B' )
.LegacyHotkeyName( "Run Bitmap2Component" )
.MenuText( _( "Image Converter" ) )
.FriendlyName( _( "Image Converter" ) )
.Tooltip( _( "Convert bitmap images to schematic or PCB components" ) )
.Icon( BITMAPS::icon_bitmap2component_24 )
.Parameter<wxString*>( nullptr ) ); // Default to no filename
@ -164,7 +164,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::showCalculator( TOOL_ACTION_ARGS()
.Name( "kicad.Control.showCalculator" )
.Scope( AS_GLOBAL )
.LegacyHotkeyName( "Run PcbCalculator" )
.MenuText( _( "Calculator Tools" ) )
.FriendlyName( _( "Calculator Tools" ) )
.Tooltip( _( "Run component calculations, track width calculations, etc." ) )
.Icon( BITMAPS::icon_pcbcalculator_24 )
.Parameter<wxString*>( nullptr ) ); // Default to no filename
@ -174,7 +174,7 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::editDrawingSheet( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'Y' )
.LegacyHotkeyName( "Run PlEditor" )
.MenuText( _( "Drawing Sheet Editor" ) )
.FriendlyName( _( "Drawing Sheet Editor" ) )
.Tooltip( _( "Edit drawing sheet borders and title block" ) )
.Icon( BITMAPS::icon_pagelayout_editor_24 )
.Parameter<wxString*>( nullptr ) ); // Default to no filename
@ -183,14 +183,14 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::showPluginManager( TOOL_ACTION_ARGS()
.Name( "kicad.Control.pluginContentManager" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + 'M' )
.MenuText( _( "Plugin and Content Manager" ) )
.FriendlyName( _( "Plugin and Content Manager" ) )
.Tooltip( _( "Run Plugin and Content Manager" ) )
.Icon( BITMAPS::icon_pcm_24 ) );
TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( TOOL_ACTION_ARGS()
.Name( "kicad.Control.openTextEditor" )
.Scope( AS_GLOBAL )
.MenuText( _( "Open Text Editor" ) )
.FriendlyName( _( "Open Text Editor" ) )
.Tooltip( _( "Launch preferred text editor" ) )
.Icon( BITMAPS::editor )
.Parameter<wxString*>( nullptr ) ); // Default to no filename

View File

@ -42,7 +42,7 @@
TOOL_ACTION PL_ACTIONS::drawLine( TOOL_ACTION_ARGS()
.Name( "plEditor.InteractiveDrawing.drawLine" )
.Scope( AS_GLOBAL )
.MenuText( _( "Add Line" ) )
.FriendlyName( _( "Add Line" ) )
.Tooltip( _( "Add a line" ) )
.Icon( BITMAPS::add_graphical_segments )
.Flags( AF_ACTIVATE )
@ -51,7 +51,7 @@ TOOL_ACTION PL_ACTIONS::drawLine( TOOL_ACTION_ARGS()
TOOL_ACTION PL_ACTIONS::drawRectangle( TOOL_ACTION_ARGS()
.Name( "plEditor.InteractiveDrawing.drawRectangle" )
.Scope( AS_GLOBAL )
.MenuText( _( "Add Rectangle" ) )
.FriendlyName( _( "Add Rectangle" ) )
.Tooltip( _( "Add a rectangle" ) )
.Icon( BITMAPS::add_rectangle )
.Flags( AF_ACTIVATE )
@ -60,7 +60,7 @@ TOOL_ACTION PL_ACTIONS::drawRectangle( TOOL_ACTION_ARGS()
TOOL_ACTION PL_ACTIONS::placeText( TOOL_ACTION_ARGS()
.Name( "plEditor.InteractiveDrawing.placeText" )
.Scope( AS_GLOBAL )
.MenuText( _( "Add Text" ) )
.FriendlyName( _( "Add Text" ) )
.Tooltip( _( "Add a text item" ) )
.Icon( BITMAPS::text )
.Flags( AF_ACTIVATE )
@ -69,7 +69,7 @@ TOOL_ACTION PL_ACTIONS::placeText( TOOL_ACTION_ARGS()
TOOL_ACTION PL_ACTIONS::placeImage( TOOL_ACTION_ARGS()
.Name( "plEditor.InteractiveDrawing.placeImage" )
.Scope( AS_GLOBAL )
.MenuText( _( "Add Bitmap" ) )
.FriendlyName( _( "Add Bitmap" ) )
.Tooltip( _( "Add a bitmap image" ) )
.Icon( BITMAPS::image )
.Flags( AF_ACTIVATE )
@ -83,7 +83,7 @@ TOOL_ACTION PL_ACTIONS::move( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( 'M' )
.LegacyHotkeyName( "Move Item" )
.MenuText( _( "Move" ) )
.FriendlyName( _( "Move" ) )
.Tooltip( _( "Moves the selected item(s)" ) )
.Icon( BITMAPS::move )
.Flags( AF_ACTIVATE ) );
@ -91,7 +91,7 @@ TOOL_ACTION PL_ACTIONS::move( TOOL_ACTION_ARGS()
TOOL_ACTION PL_ACTIONS::appendImportedDrawingSheet( TOOL_ACTION_ARGS()
.Name( "plEditor.InteractiveEdit.appendWorksheet" )
.Scope( AS_GLOBAL )
.MenuText( _( "Append Existing Drawing Sheet..." ) )
.FriendlyName( _( "Append Existing Drawing Sheet..." ) )
.Tooltip( _( "Append an existing drawing sheet file to current file" ) )
.Icon( BITMAPS::import )
.Flags( AF_ACTIVATE ) );
@ -102,21 +102,21 @@ TOOL_ACTION PL_ACTIONS::appendImportedDrawingSheet( TOOL_ACTION_ARGS()
TOOL_ACTION PL_ACTIONS::showInspector( TOOL_ACTION_ARGS()
.Name( "plEditor.EditorControl.ShowInspector" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show Design Inspector" ) )
.FriendlyName( _( "Show Design Inspector" ) )
.Tooltip( _( "Show the list of items in the drawing sheet" ) )
.Icon( BITMAPS::spreadsheet ) );
TOOL_ACTION PL_ACTIONS::previewSettings( TOOL_ACTION_ARGS()
.Name( "plEditor.EditorControl.PreviewSettings" )
.Scope( AS_GLOBAL )
.MenuText( _( "Page Preview Settings..." ) )
.FriendlyName( _( "Page Preview Settings..." ) )
.Tooltip( _( "Edit preview data for page size and title block" ) )
.Icon( BITMAPS::sheetset ) );
TOOL_ACTION PL_ACTIONS::layoutNormalMode( TOOL_ACTION_ARGS()
.Name( "plEditor.EditorControl.LayoutNormalMode" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show title block in preview mode" ) )
.FriendlyName( _( "Show title block in preview mode" ) )
.Tooltip( _( "Show title block in preview mode:\n"
"text placeholders will be replaced with preview data." ) )
.Icon( BITMAPS::pagelayout_normal_view_mode ) );
@ -124,7 +124,7 @@ TOOL_ACTION PL_ACTIONS::layoutNormalMode( TOOL_ACTION_ARGS()
TOOL_ACTION PL_ACTIONS::layoutEditMode( TOOL_ACTION_ARGS()
.Name( "plEditor.EditorControl.LayoutEditMode" )
.Scope( AS_GLOBAL )
.MenuText( _( "Show title block in edit mode" ) )
.FriendlyName( _( "Show title block in edit mode" ) )
.Tooltip( _( "Show title block in edit mode:\n"
"text placeholders are shown as ${keyword} tokens." ) )
.Icon( BITMAPS::pagelayout_special_view_mode ) );

View File

@ -161,7 +161,7 @@ void NL_PCBNEW_PLUGIN_IMPL::exportCommandsAndImages()
for( it = actions.begin(); it != actions.end(); ++it )
{
const TOOL_ACTION* action = *it;
std::string label = action->GetLabel().ToStdString();
std::string label = action->GetMenuLabel().ToStdString();
if( label.empty() )
{

View File

@ -109,7 +109,7 @@ static const TOOL_ACTION ACT_EndTrack( TOOL_ACTION_ARGS()
.Name( "pcbnew.InteractiveRouter.EndTrack" )
.Scope( AS_CONTEXT )
.DefaultHotkey( WXK_END )
.MenuText( _( "Finish Track" ) )
.FriendlyName( _( "Finish Track" ) )
.Tooltip( _( "Stops laying the current track." ) )
.Icon( BITMAPS::checked_ok ) );
@ -119,7 +119,7 @@ static const TOOL_ACTION ACT_PlaceThroughVia( TOOL_ACTION_ARGS()
.Scope( AS_CONTEXT )
.DefaultHotkey( 'V' )
.LegacyHotkeyName( "Add Through Via" )
.MenuText( _( "Place Through Via" ) )
.FriendlyName( _( "Place Through Via" ) )
.Tooltip( _( "Adds a through-hole via at the end of currently routed track." ) )
.Icon( BITMAPS::via )
.Flags( AF_NONE )
@ -130,7 +130,7 @@ static const TOOL_ACTION ACT_PlaceBlindVia( TOOL_ACTION_ARGS()
.Scope( AS_CONTEXT )
.DefaultHotkey( MD_ALT + MD_SHIFT + 'V' )
.LegacyHotkeyName( "Add Blind/Buried Via" )
.MenuText( _( "Place Blind/Buried Via" ) )
.FriendlyName( _( "Place Blind/Buried Via" ) )
.Tooltip( _( "Adds a blind or buried via at the end of currently routed track.") )
.Icon( BITMAPS::via_buried )
.Flags( AF_NONE )
@ -141,7 +141,7 @@ static const TOOL_ACTION ACT_PlaceMicroVia( TOOL_ACTION_ARGS()
.Scope( AS_CONTEXT )
.DefaultHotkey( MD_CTRL + 'V' )
.LegacyHotkeyName( "Add MicroVia" )
.MenuText( _( "Place Microvia" ) )
.FriendlyName( _( "Place Microvia" ) )
.Tooltip( _( "Adds a microvia at the end of currently routed track." ) )
.Icon( BITMAPS::via_microvia )
.Flags( AF_NONE )
@ -152,7 +152,7 @@ static const TOOL_ACTION ACT_SelLayerAndPlaceThroughVia( TOOL_ACTION_ARGS()
.Scope( AS_CONTEXT )
.DefaultHotkey( '<' )
.LegacyHotkeyName( "Select Layer and Add Through Via" )
.MenuText( _( "Select Layer and Place Through Via..." ) )
.FriendlyName( _( "Select Layer and Place Through Via..." ) )
.Tooltip( _( "Select a layer, then add a through-hole via at the end of currently routed track." ) )
.Icon( BITMAPS::select_w_layer )
.Flags( AF_NONE )
@ -163,7 +163,7 @@ static const TOOL_ACTION ACT_SelLayerAndPlaceBlindVia( TOOL_ACTION_ARGS()
.Scope( AS_CONTEXT )
.DefaultHotkey( MD_ALT + '<' )
.LegacyHotkeyName( "Select Layer and Add Blind/Buried Via" )
.MenuText( _( "Select Layer and Place Blind/Buried Via..." ) )
.FriendlyName( _( "Select Layer and Place Blind/Buried Via..." ) )
.Tooltip( _( "Select a layer, then add a blind or buried via at the end of currently routed track." ) )
.Icon( BITMAPS::select_w_layer )
.Flags( AF_NONE )
@ -172,7 +172,7 @@ static const TOOL_ACTION ACT_SelLayerAndPlaceBlindVia( TOOL_ACTION_ARGS()
static const TOOL_ACTION ACT_SelLayerAndPlaceMicroVia( TOOL_ACTION_ARGS()
.Name( "pcbnew.InteractiveRouter.SelLayerAndPlaceMicroVia" )
.Scope( AS_CONTEXT )
.MenuText( _( "Select Layer and Place Micro Via..." ) )
.FriendlyName( _( "Select Layer and Place Micro Via..." ) )
.Tooltip( _( "Select a layer, then add a micro via at the end of currently routed track." ) )
.Icon( BITMAPS::select_w_layer )
.Flags( AF_NONE )
@ -183,7 +183,7 @@ static const TOOL_ACTION ACT_CustomTrackWidth( TOOL_ACTION_ARGS()
.Scope( AS_CONTEXT )
.DefaultHotkey( 'Q' )
.LegacyHotkeyName( "Custom Track/Via Size" )
.MenuText( _( "Custom Track/Via Size..." ) )
.FriendlyName( _( "Custom Track/Via Size..." ) )
.Tooltip( _( "Shows a dialog for changing the track width and via size." ) )
.Icon( BITMAPS::width_track ) );
@ -192,7 +192,7 @@ static const TOOL_ACTION ACT_SwitchPosture( TOOL_ACTION_ARGS()
.Scope( AS_CONTEXT )
.DefaultHotkey( '/' )
.LegacyHotkeyName( "Switch Track Posture" )
.MenuText( _( "Switch Track Posture" ) )
.FriendlyName( _( "Switch Track Posture" ) )
.Tooltip( _( "Switches posture of the currently routed track." ) )
.Icon( BITMAPS::change_entry_orient ) );
@ -200,7 +200,7 @@ static const TOOL_ACTION ACT_SwitchCornerMode( TOOL_ACTION_ARGS()
.Name( "pcbnew.InteractiveRouter.SwitchRounding" )
.Scope( AS_CONTEXT )
.DefaultHotkey( MD_CTRL + '/' )
.MenuText( _( "Track Corner Mode" ) )
.FriendlyName( _( "Track Corner Mode" ) )
.Tooltip( _( "Switches between sharp/rounded and 45°/90° corners when routing tracks." ) )
.Icon( BITMAPS::switch_corner_rounding_shape ) );

File diff suppressed because it is too large Load Diff