Show friendly name in toolbar button tooltips.

(Don't require the same text to be put into the tooltip.
It's error-prone and also disallows us from having a separate
tooltip for toolbar buttons.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17009
This commit is contained in:
Jeff Young 2024-02-17 15:15:42 +00:00
parent a34b242f4e
commit f4a085575a
9 changed files with 33 additions and 101 deletions

View File

@ -53,7 +53,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateXCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateXclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate X Clockwise" ) )
.Tooltip( _( "Rotate X Clockwise" ) )
.Icon( BITMAPS::rotate_cw_x )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::X_CW ) );
@ -62,7 +61,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateXCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateXcounterclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate X Counterclockwise" ) )
.Tooltip( _( "Rotate X Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_x )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::X_CCW ) );
@ -71,7 +69,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateYCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateYclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Y Clockwise" ) )
.Tooltip( _( "Rotate Y Clockwise" ) )
.Icon( BITMAPS::rotate_cw_y )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Y_CW ) );
@ -80,7 +77,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateYCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateYcounterclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Y Counterclockwise" ) )
.Tooltip( _( "Rotate Y Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_y )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Y_CCW ) );
@ -89,7 +85,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateZCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateZclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Z Clockwise" ) )
.Tooltip( _( "Rotate Z Clockwise" ) )
.Icon( BITMAPS::rotate_cw_z )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Z_CW ) );
@ -98,7 +93,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateZCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateZcounterclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Z Counterclockwise" ) )
.Tooltip( _( "Rotate Z Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_z )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Z_CCW ) );
@ -108,7 +102,6 @@ TOOL_ACTION EDA_3D_ACTIONS::moveLeft( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_LEFT )
.FriendlyName( _( "Move Board Left" ) )
.Tooltip( _( "Move board Left" ) )
.Icon( BITMAPS::left )
.Flags( AF_NONE )
.Parameter( CURSOR_LEFT ) );
@ -118,7 +111,6 @@ TOOL_ACTION EDA_3D_ACTIONS::moveRight( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_RIGHT )
.FriendlyName( _( "Move Board Right" ) )
.Tooltip( _( "Move board Right" ) )
.Icon( BITMAPS::right )
.Flags( AF_NONE )
.Parameter( CURSOR_RIGHT ) );
@ -128,7 +120,6 @@ TOOL_ACTION EDA_3D_ACTIONS::moveUp( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_UP )
.FriendlyName( _( "Move Board Up" ) )
.Tooltip( _( "Move board Up" ) )
.Icon( BITMAPS::up )
.Flags( AF_NONE )
.Parameter( CURSOR_UP ) );
@ -138,7 +129,6 @@ TOOL_ACTION EDA_3D_ACTIONS::moveDown( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_DOWN )
.FriendlyName( _( "Move Board Down" ) )
.Tooltip( _( "Move board Down" ) )
.Icon( BITMAPS::down )
.Flags( AF_NONE )
.Parameter( CURSOR_DOWN ) );
@ -148,7 +138,7 @@ TOOL_ACTION EDA_3D_ACTIONS::homeView( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_HOME )
.FriendlyName ( _( "Home View" ) )
.Tooltip( _( "Home view" ) )
.Tooltip( _( "Redraw at the home position and zoom" ) )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_FIT_SCREEN ) );
@ -174,7 +164,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewFront( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( 'Y' )
.FriendlyName( _( "View Front" ) )
.Tooltip( _( "View Front" ) )
.Icon( BITMAPS::axis3d_front )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_FRONT ) );
@ -184,7 +173,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewBack( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'Y' )
.FriendlyName( _( "View Back" ) )
.Tooltip( _( "View Back" ) )
.Icon( BITMAPS::axis3d_back )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_BACK ) );
@ -194,7 +182,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewLeft( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'X' )
.FriendlyName( _( "View Left" ) )
.Tooltip( _( "View Left" ) )
.Icon( BITMAPS::axis3d_left )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_LEFT ) );
@ -204,7 +191,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewRight( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( 'X' )
.FriendlyName( _( "View Right" ) )
.Tooltip( _( "View Right" ) )
.Icon( BITMAPS::axis3d_right )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_RIGHT ) );
@ -214,7 +200,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewTop( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( 'Z' )
.FriendlyName( _( "View Top" ) )
.Tooltip( _( "View Top" ) )
.Icon( BITMAPS::axis3d_top )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_TOP ) );
@ -224,7 +209,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewBottom( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'Z' )
.FriendlyName( _( "View Bottom" ) )
.Tooltip( _( "View Bottom" ) )
.Icon( BITMAPS::axis3d_bottom )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_BOTTOM ) );
@ -233,7 +217,6 @@ TOOL_ACTION EDA_3D_ACTIONS::noGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.noGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "No 3D Grid" ) )
.Tooltip( _( "No 3D Grid" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::NONE ) );
@ -241,7 +224,6 @@ TOOL_ACTION EDA_3D_ACTIONS::show10mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show10mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 10mm" ) )
.Tooltip( _( "3D Grid 10mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_10MM ) );
@ -249,7 +231,6 @@ TOOL_ACTION EDA_3D_ACTIONS::show5mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show5mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 5mm" ) )
.Tooltip( _( "3D Grid 5mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_5MM ) );
@ -257,7 +238,6 @@ TOOL_ACTION EDA_3D_ACTIONS::show2_5mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show2_5mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 2.5mm" ) )
.Tooltip( _( "3D Grid 2.5mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_2P5MM ) );
@ -265,7 +245,6 @@ TOOL_ACTION EDA_3D_ACTIONS::show1mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show1mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 1mm" ) )
.Tooltip( _( "3D Grid 1mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_1MM ) );
@ -350,7 +329,6 @@ TOOL_ACTION EDA_3D_ACTIONS::showAxis( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showAxis" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show 3D Axis" ) )
.Tooltip( _( "Show 3D Axis" ) )
.Icon( BITMAPS::axis3d_front )
.Flags( AF_NONE ) );

View File

@ -129,7 +129,7 @@ void ACTION_TOOLBAR_PALETTE::AddAction( const TOOL_ACTION& aAction )
button->SetBitmap( normalBmp );
button->SetDisabledBitmap( KiDisabledBitmapBundle( aAction.GetIcon() ) );
button->SetPadding( padding );
button->SetToolTip( aAction.GetTooltip() );
button->SetToolTip( aAction.GetButtonTooltip() );
button->AcceptDragInAsClick();
button->SetBitmapCentered();
@ -233,7 +233,7 @@ void ACTION_TOOLBAR::Add( const TOOL_ACTION& aAction, bool aIsToggleEntry, bool
AddTool( toolId, wxEmptyString, KiBitmapBundle( aAction.GetIcon() ),
KiDisabledBitmapBundle( aAction.GetIcon() ),
aIsToggleEntry ? wxITEM_CHECK : wxITEM_NORMAL,
aAction.GetTooltip(), wxEmptyString, nullptr );
aAction.GetButtonTooltip(), wxEmptyString, nullptr );
m_toolKinds[ toolId ] = aIsToggleEntry;
m_toolActions[ toolId ] = &aAction;
@ -246,8 +246,8 @@ void ACTION_TOOLBAR::AddButton( const TOOL_ACTION& aAction )
int toolId = aAction.GetUIId();
AddTool( toolId, wxEmptyString, KiBitmapBundle( aAction.GetIcon() ),
KiDisabledBitmapBundle( aAction.GetIcon() ),
wxITEM_NORMAL, aAction.GetTooltip(), wxEmptyString, nullptr );
KiDisabledBitmapBundle( aAction.GetIcon() ), wxITEM_NORMAL,
aAction.GetButtonTooltip(), wxEmptyString, nullptr );
m_toolKinds[ toolId ] = false;
m_toolActions[ toolId ] = &aAction;

View File

@ -120,14 +120,12 @@ TOOL_ACTION ACTIONS::print( TOOL_ACTION_ARGS()
.DefaultHotkey( MD_CTRL + 'P' )
.LegacyHotkeyName( "Print" )
.FriendlyName( _( "Print..." ) )
.Tooltip( _( "Print" ) )
.Icon( BITMAPS::print_button ) );
TOOL_ACTION ACTIONS::plot( TOOL_ACTION_ARGS()
.Name( "common.Control.plot" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Plot..." ) )
.Tooltip( _( "Plot" ) )
.Icon( BITMAPS::plot ) );
TOOL_ACTION ACTIONS::quit( TOOL_ACTION_ARGS()
@ -408,7 +406,6 @@ TOOL_ACTION ACTIONS::zoomFitScreen( TOOL_ACTION_ARGS()
#endif
.LegacyHotkeyName( "Zoom Auto" )
.FriendlyName( _( "Zoom to Fit" ) )
.Tooltip( _( "Zoom to Fit" ) )
.Icon( BITMAPS::zoom_fit_in_page ) );
TOOL_ACTION ACTIONS::zoomFitObjects( TOOL_ACTION_ARGS()
@ -416,7 +413,6 @@ TOOL_ACTION ACTIONS::zoomFitObjects( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_CTRL + WXK_HOME )
.FriendlyName( _( "Zoom to Objects" ) )
.Tooltip( _( "Zoom to Objects" ) )
.Icon( BITMAPS::zoom_fit_to_objects ) );
TOOL_ACTION ACTIONS::zoomIn( TOOL_ACTION_ARGS()
@ -429,7 +425,6 @@ TOOL_ACTION ACTIONS::zoomIn( TOOL_ACTION_ARGS()
#endif
.LegacyHotkeyName( "Zoom In" )
.FriendlyName( _( "Zoom In at Cursor" ) )
.Tooltip( _( "Zoom In at Cursor" ) )
.Icon( BITMAPS::zoom_in ) );
TOOL_ACTION ACTIONS::zoomOut( TOOL_ACTION_ARGS()
@ -442,21 +437,18 @@ TOOL_ACTION ACTIONS::zoomOut( TOOL_ACTION_ARGS()
#endif
.LegacyHotkeyName( "Zoom Out" )
.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 )
.FriendlyName( _( "Zoom In" ) )
.Tooltip( _( "Zoom In" ) )
.Icon( BITMAPS::zoom_in ) );
TOOL_ACTION ACTIONS::zoomOutCenter( TOOL_ACTION_ARGS()
.Name( "common.Control.zoomOutCenter" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Zoom Out" ) )
.Tooltip( _( "Zoom Out" ) )
.Icon( BITMAPS::zoom_out ) );
TOOL_ACTION ACTIONS::zoomCenter( TOOL_ACTION_ARGS()
@ -465,7 +457,6 @@ TOOL_ACTION ACTIONS::zoomCenter( TOOL_ACTION_ARGS()
.DefaultHotkey( WXK_F4 )
.LegacyHotkeyName( "Zoom Center" )
.FriendlyName( _( "Center on Cursor" ) )
.Tooltip( _( "Center on Cursor" ) )
.Icon( BITMAPS::zoom_center_on_screen ) );
TOOL_ACTION ACTIONS::zoomTool( TOOL_ACTION_ARGS()
@ -474,7 +465,6 @@ TOOL_ACTION ACTIONS::zoomTool( TOOL_ACTION_ARGS()
.DefaultHotkey( MD_CTRL + WXK_F5 )
.LegacyHotkeyName( "Zoom to Selection" )
.FriendlyName( _( "Zoom to Selection" ) )
.Tooltip( _( "Zoom to Selection" ) )
.Icon( BITMAPS::zoom_area )
.Flags( AF_ACTIVATE ) );
@ -819,14 +809,12 @@ TOOL_ACTION ACTIONS::toggleBoundingBoxes( TOOL_ACTION_ARGS()
.Name( "common.Control.toggleBoundingBoxes" )
.Scope( AS_GLOBAL )
.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 )
.FriendlyName( _( "Select item(s)" ) )
.Tooltip( _( "Select item(s)" ) )
.Icon( BITMAPS::cursor )
.Flags( AF_ACTIVATE ) );

View File

@ -183,6 +183,21 @@ wxString TOOL_ACTION::GetTooltip( bool aIncludeHotkey ) const
}
wxString TOOL_ACTION::GetButtonTooltip() const
{
// We don't show button text so use the action name as the first line of the tooltip
wxString tooltip = GetFriendlyName();
if( GetHotKey() )
tooltip += wxString::Format( wxT( " (%s)" ), KeyNameFromKeyCode( GetHotKey() ) );
if( !GetTooltip( false ).IsEmpty() )
tooltip += '\n' + GetTooltip( false );
return tooltip;
}
void TOOL_ACTION::SetHotKey( int aKeycode, int aKeycodeAlt )
{
m_hotKey = aKeycode;

View File

@ -84,14 +84,12 @@ TOOL_ACTION EE_ACTIONS::pointEditorAddCorner( TOOL_ACTION_ARGS()
.Name( "eeschema.PointEditor.addCorner" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Create Corner" ) )
.Tooltip( _( "Create a corner" ) )
.Icon( BITMAPS::add_corner ) );
TOOL_ACTION EE_ACTIONS::pointEditorRemoveCorner( TOOL_ACTION_ARGS()
.Name( "eeschema.PointEditor.removeCorner" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Remove Corner" ) )
.Tooltip( _( "Remove corner" ) )
.Icon( BITMAPS::delete_cursor ) );
@ -257,7 +255,7 @@ TOOL_ACTION EE_ACTIONS::addSymbolToSchematic( TOOL_ACTION_ARGS()
.Name( "eeschema.SymbolLibraryControl.addSymbolToSchematic" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Add Symbol to Schematic" ) )
.Tooltip( _( "Add Symbol to Schematic" ) )
.Tooltip( _( "Add the current symbol to the schematic" ) )
.Icon( BITMAPS::add_symbol_to_schematic ) );
TOOL_ACTION EE_ACTIONS::showElectricalTypes( TOOL_ACTION_ARGS()
@ -1372,6 +1370,7 @@ TOOL_ACTION EE_ACTIONS::newAnalysisTab( TOOL_ACTION_ARGS()
.DefaultHotkey( MD_CTRL + 'N' )
.LegacyHotkeyName( "New" )
.FriendlyName( _( "New Analysis Tab..." ) )
.Tooltip( _( "Create a new tab containing a simulation analysis" ) )
.Icon( BITMAPS::sim_add_plot ) );
TOOL_ACTION EE_ACTIONS::openWorkbook( TOOL_ACTION_ARGS()
@ -1380,6 +1379,7 @@ TOOL_ACTION EE_ACTIONS::openWorkbook( TOOL_ACTION_ARGS()
.DefaultHotkey( MD_CTRL + 'O' )
.LegacyHotkeyName( "Open" )
.FriendlyName( _( "Open Workbook..." ) )
.Tooltip( _( "Open a saved set of analysis tabs and settings" ) )
.Icon( BITMAPS::directory_open ) );
TOOL_ACTION EE_ACTIONS::saveWorkbook( TOOL_ACTION_ARGS()
@ -1388,6 +1388,7 @@ TOOL_ACTION EE_ACTIONS::saveWorkbook( TOOL_ACTION_ARGS()
.DefaultHotkey( MD_CTRL + 'S' )
.LegacyHotkeyName( "Save" )
.FriendlyName( _( "Save Workbook" ) )
.Tooltip( _( "Save the current set of analysis tabs and settings" ) )
.Icon( BITMAPS::save ) );
TOOL_ACTION EE_ACTIONS::saveWorkbookAs( TOOL_ACTION_ARGS()
@ -1396,6 +1397,7 @@ TOOL_ACTION EE_ACTIONS::saveWorkbookAs( TOOL_ACTION_ARGS()
.DefaultHotkey( MD_SHIFT + MD_CTRL + 'S' )
.LegacyHotkeyName( "Save As" )
.FriendlyName( _( "Save Workbook As..." ) )
.Tooltip( _( "Save the current set of analysis tabs and settings to another location" ) )
.Icon( BITMAPS::sim_add_signal ) );
TOOL_ACTION EE_ACTIONS::exportPlotAsPNG( TOOL_ACTION_ARGS()
@ -1432,7 +1434,7 @@ TOOL_ACTION EE_ACTIONS::simAnalysisProperties( TOOL_ACTION_ARGS()
.Name( "eeschema.Simulation.simAnalysisProperties" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Edit Analysis Tab..." ) )
.Tooltip( _( "Edit the SPICE command and plot setup for the current analysis tab" ) )
.Tooltip( _( "Edit the current analysis tab's SPICE command and plot setup" ) )
.Icon( BITMAPS::sim_command ) );
TOOL_ACTION EE_ACTIONS::runSimulation( TOOL_ACTION_ARGS()

View File

@ -128,35 +128,30 @@ TOOL_ACTION GERBVIEW_ACTIONS::highlightClear( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.highlightClear" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Clear Highlight" ) )
.Tooltip( _( "Clear Highlight" ) )
.Icon( BITMAPS::cancel ) );
TOOL_ACTION GERBVIEW_ACTIONS::highlightNet( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.highlightNet" )
.Scope( AS_GLOBAL )
.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 )
.FriendlyName( _( "Highlight Component" ) )
.Tooltip( _( "Highlight Component" ) )
.Icon( BITMAPS::module ) );
TOOL_ACTION GERBVIEW_ACTIONS::highlightAttribute( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.highlightAttribute" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Highlight Attribute" ) )
.Tooltip( _( "Highlight Attribute" ) )
.Icon( BITMAPS::flag ) );
TOOL_ACTION GERBVIEW_ACTIONS::highlightDCode( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.highlightDCode" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Highlight DCode" ) )
.Tooltip( _( "Highlight DCode" ) )
.Icon( BITMAPS::show_dcodenumber ) );
TOOL_ACTION GERBVIEW_ACTIONS::layerNext( TOOL_ACTION_ARGS()
@ -164,23 +159,21 @@ TOOL_ACTION GERBVIEW_ACTIONS::layerNext( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_PAGEDOWN )
.LegacyHotkeyName( "Switch to Next Layer" )
.FriendlyName( _( "Next Layer" ) )
.Tooltip( _( "Next Layer" ) ) );
.FriendlyName( _( "Next Layer" ) ) );
TOOL_ACTION GERBVIEW_ACTIONS::layerPrev( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.layerPrev" )
.Scope( AS_GLOBAL )
.DefaultHotkey( WXK_PAGEUP )
.LegacyHotkeyName( "Switch to Previous Layer" )
.FriendlyName( _( "Previous Layer" ) )
.Tooltip( _( "Previous Layer" ) ) );
.FriendlyName( _( "Previous Layer" ) ) );
TOOL_ACTION GERBVIEW_ACTIONS::moveLayerUp( TOOL_ACTION_ARGS()
.Name( "gerbview.Control.moveLayerUp" )
.Scope( AS_GLOBAL )
.DefaultHotkey( '+' )
.FriendlyName( _( "Move Layer Up" ) )
.Tooltip( _( "Move Current Layer up" ) )
.Tooltip( _( "Move current layer up" ) )
.Icon( BITMAPS::up ) );
TOOL_ACTION GERBVIEW_ACTIONS::moveLayerDown( TOOL_ACTION_ARGS()
@ -188,7 +181,7 @@ TOOL_ACTION GERBVIEW_ACTIONS::moveLayerDown( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.DefaultHotkey( '-' )
.FriendlyName( _( "Move Layer Down" ) )
.Tooltip( _( "Move Current Layer Down" ) )
.Tooltip( _( "Move current layer down" ) )
.Icon( BITMAPS::down ) );
TOOL_ACTION GERBVIEW_ACTIONS::linesDisplayOutlines( TOOL_ACTION_ARGS()

View File

@ -355,6 +355,7 @@ public:
wxString GetMenuLabel() const;
wxString GetMenuItem() const;
wxString GetTooltip( bool aIncludeHotkey = true ) const;
wxString GetButtonTooltip() const;
wxString GetDescription() const;
/**

View File

@ -117,16 +117,14 @@ TOOL_ACTION PL_ACTIONS::layoutNormalMode( TOOL_ACTION_ARGS()
.Name( "plEditor.EditorControl.LayoutNormalMode" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show Title Block in Preview Mode" ) )
.Tooltip( _( "Show title block in preview mode:\n"
"text placeholders will be replaced with preview data." ) )
.Tooltip( _( "Text placeholders will be replaced with preview data" ) )
.Icon( BITMAPS::pagelayout_normal_view_mode ) );
TOOL_ACTION PL_ACTIONS::layoutEditMode( TOOL_ACTION_ARGS()
.Name( "plEditor.EditorControl.LayoutEditMode" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show Title Block in Edit Mode" ) )
.Tooltip( _( "Show title block in edit mode:\n"
"text placeholders are shown as ${keyword} tokens." ) )
.Tooltip( _( "Text placeholders are shown as ${keyword} tokens" ) )
.Icon( BITMAPS::pagelayout_special_view_mode ) );

View File

@ -515,7 +515,6 @@ TOOL_ACTION PCB_ACTIONS::createArray( TOOL_ACTION_ARGS()
.DefaultHotkey( MD_CTRL + 'T' )
.LegacyHotkeyName( "Create Array" )
.FriendlyName( _( "Create Array..." ) )
.Tooltip( _( "Create array" ) )
.Icon( BITMAPS::array )
.Flags( AF_ACTIVATE ) );
@ -676,14 +675,12 @@ TOOL_ACTION PCB_ACTIONS::showFootprintTree( TOOL_ACTION_ARGS()
.Name( "pcbnew.ModuleEditor.showFootprintTree" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show Footprint Tree" ) )
.Tooltip( _( "Show Footprint Tree" ) )
.Icon( BITMAPS::search_tree ) );
TOOL_ACTION PCB_ACTIONS::hideFootprintTree( TOOL_ACTION_ARGS()
.Name( "pcbnew.ModuleEditor.hideFootprintTree" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Hide Footprint Tree" ) )
.Tooltip( _( "Hide Footprint Tree" ) )
.Icon( BITMAPS::search_tree ) );
TOOL_ACTION PCB_ACTIONS::newFootprint( TOOL_ACTION_ARGS()
@ -734,21 +731,18 @@ TOOL_ACTION PCB_ACTIONS::cutFootprint( TOOL_ACTION_ARGS()
.Name( "pcbnew.ModuleEditor.cutFootprint" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Cut Footprint" ) )
.Tooltip( _( "Cut Footprint" ) )
.Icon( BITMAPS::cut ) );
TOOL_ACTION PCB_ACTIONS::copyFootprint( TOOL_ACTION_ARGS()
.Name( "pcbnew.ModuleEditor.copyFootprint" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Copy Footprint" ) )
.Tooltip( _( "Copy Footprint" ) )
.Icon( BITMAPS::copy ) );
TOOL_ACTION PCB_ACTIONS::pasteFootprint( TOOL_ACTION_ARGS()
.Name( "pcbnew.ModuleEditor.pasteFootprint" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Paste Footprint" ) )
.Tooltip( _( "Paste Footprint" ) )
.Icon( BITMAPS::paste ) );
TOOL_ACTION PCB_ACTIONS::importFootprint( TOOL_ACTION_ARGS()
@ -769,7 +763,6 @@ TOOL_ACTION PCB_ACTIONS::footprintProperties( TOOL_ACTION_ARGS()
.Name( "pcbnew.ModuleEditor.footprintProperties" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Footprint Properties..." ) )
.Tooltip( _( "Edit footprint properties" ) )
.Icon( BITMAPS::module_options ) );
TOOL_ACTION PCB_ACTIONS::checkFootprint( TOOL_ACTION_ARGS()
@ -1438,14 +1431,12 @@ TOOL_ACTION PCB_ACTIONS::zoneDisplayFractured( TOOL_ACTION_ARGS()
.Name( "pcbnew.Control.zoneDisplayOutlines" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Draw Zone Fill Fracture Borders" ) )
.Tooltip( _( "Draw Zone Fill Fracture Borders" ) )
.Icon( BITMAPS::show_zone_outline_only ) );
TOOL_ACTION PCB_ACTIONS::zoneDisplayTriangulated( TOOL_ACTION_ARGS()
.Name( "pcbnew.Control.zoneDisplayTesselation" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Draw Zone Fill Triangulation" ) )
.Tooltip( _( "Draw Zone Fill Triangulation" ) )
.Icon( BITMAPS::show_zone_triangulation ) );
TOOL_ACTION PCB_ACTIONS::zoneDisplayToggle( TOOL_ACTION_ARGS()
@ -1514,7 +1505,6 @@ TOOL_ACTION PCB_ACTIONS::layerTop( TOOL_ACTION_ARGS()
.DefaultHotkey( WXK_PAGEUP )
.LegacyHotkeyName( "Switch to Component (F.Cu) layer" )
.FriendlyName( _( "Switch to Component (F.Cu) layer" ) )
.Tooltip( _( "Switch to Component (F.Cu) layer" ) )
.Flags( AF_NOTIFY )
.Parameter( F_Cu ) );
@ -1524,7 +1514,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner1( TOOL_ACTION_ARGS()
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.LegacyHotkeyName( "Switch to Inner layer 1" )
.FriendlyName( _( "Switch to Inner Layer 1" ) )
.Tooltip( _( "Switch to Inner layer 1" ) )
.Flags( AF_NOTIFY )
.Parameter( In1_Cu ) );
@ -1534,7 +1523,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner2( TOOL_ACTION_ARGS()
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.LegacyHotkeyName( "Switch to Inner layer 2" )
.FriendlyName( _( "Switch to Inner Layer 2" ) )
.Tooltip( _( "Switch to Inner layer 2" ) )
.Flags( AF_NOTIFY )
.Parameter( In2_Cu ) );
@ -1544,7 +1532,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner3( TOOL_ACTION_ARGS()
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.LegacyHotkeyName( "Switch to Inner layer 3" )
.FriendlyName( _( "Switch to Inner Layer 3" ) )
.Tooltip( _( "Switch to Inner layer 3" ) )
.Flags( AF_NOTIFY )
.Parameter( In3_Cu ) );
@ -1554,7 +1541,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner4( TOOL_ACTION_ARGS()
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.LegacyHotkeyName( "Switch to Inner layer 4" )
.FriendlyName( _( "Switch to Inner Layer 4" ) )
.Tooltip( _( "Switch to Inner layer 4" ) )
.Flags( AF_NOTIFY )
.Parameter( In4_Cu ) );
@ -1564,7 +1550,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner5( TOOL_ACTION_ARGS()
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.LegacyHotkeyName( "Switch to Inner layer 5" )
.FriendlyName( _( "Switch to Inner Layer 5" ) )
.Tooltip( _( "Switch to Inner layer 5" ) )
.Flags( AF_NOTIFY )
.Parameter( In5_Cu ) );
@ -1574,7 +1559,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner6( TOOL_ACTION_ARGS()
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.LegacyHotkeyName( "Switch to Inner layer 6" )
.FriendlyName( _( "Switch to Inner Layer 6" ) )
.Tooltip( _( "Switch to Inner layer 6" ) )
.Flags( AF_NOTIFY )
.Parameter( In6_Cu ) );
@ -1583,7 +1567,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner7( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 7" ) )
.Tooltip( _( "Switch to Inner layer 7" ) )
.Flags( AF_NOTIFY )
.Parameter( In7_Cu ) );
@ -1592,7 +1575,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner8( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 8" ) )
.Tooltip( _( "Switch to Inner layer 8" ) )
.Flags( AF_NOTIFY )
.Parameter( In8_Cu ) );
@ -1601,7 +1583,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner9( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 9" ) )
.Tooltip( _( "Switch to Inner layer 9" ) )
.Flags( AF_NOTIFY )
.Parameter( In9_Cu ) );
@ -1610,7 +1591,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner10( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 10" ) )
.Tooltip( _( "Switch to Inner layer 10" ) )
.Flags( AF_NOTIFY )
.Parameter( In10_Cu ) );
@ -1619,7 +1599,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner11( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 11" ) )
.Tooltip( _( "Switch to Inner layer 11" ) )
.Flags( AF_NOTIFY )
.Parameter( In11_Cu ) );
@ -1628,7 +1607,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner12( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 12" ) )
.Tooltip( _( "Switch to Inner layer 12" ) )
.Flags( AF_NOTIFY )
.Parameter( In12_Cu ) );
@ -1637,7 +1615,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner13( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 13" ) )
.Tooltip( _( "Switch to Inner layer 13" ) )
.Flags( AF_NOTIFY )
.Parameter( In13_Cu ) );
@ -1646,7 +1623,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner14( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 14" ) )
.Tooltip( _( "Switch to Inner layer 14" ) )
.Flags( AF_NOTIFY )
.Parameter( In14_Cu ) );
@ -1655,7 +1631,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner15( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 15" ) )
.Tooltip( _( "Switch to Inner layer 15" ) )
.Flags( AF_NOTIFY )
.Parameter( In15_Cu ) );
@ -1664,7 +1639,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner16( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 16" ) )
.Tooltip( _( "Switch to Inner layer 16" ) )
.Flags( AF_NOTIFY )
.Parameter( In16_Cu ) );
@ -1673,7 +1647,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner17( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 17" ) )
.Tooltip( _( "Switch to Inner layer 17" ) )
.Flags( AF_NOTIFY )
.Parameter( In17_Cu ) );
@ -1682,7 +1655,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner18( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 18" ) )
.Tooltip( _( "Switch to Inner layer 18" ) )
.Flags( AF_NOTIFY )
.Parameter( In18_Cu ) );
@ -1691,7 +1663,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner19( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 19" ) )
.Tooltip( _( "Switch to Inner layer 19" ) )
.Flags( AF_NOTIFY )
.Parameter( In19_Cu ) );
@ -1700,7 +1671,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner20( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 20" ) )
.Tooltip( _( "Switch to Inner layer 20" ) )
.Flags( AF_NOTIFY )
.Parameter( In20_Cu ) );
@ -1709,7 +1679,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner21( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 21" ) )
.Tooltip( _( "Switch to Inner layer 21" ) )
.Flags( AF_NOTIFY )
.Parameter( In21_Cu ) );
@ -1718,7 +1687,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner22( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 22" ) )
.Tooltip( _( "Switch to Inner layer 22" ) )
.Flags( AF_NOTIFY )
.Parameter( In22_Cu ) );
@ -1727,7 +1695,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner23( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 23" ) )
.Tooltip( _( "Switch to Inner layer 23" ) )
.Flags( AF_NOTIFY )
.Parameter( In23_Cu ) );
@ -1736,7 +1703,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner24( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 24" ) )
.Tooltip( _( "Switch to Inner layer 24" ) )
.Flags( AF_NOTIFY )
.Parameter( In24_Cu ) );
@ -1745,7 +1711,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner25( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 25" ) )
.Tooltip( _( "Switch to Inner layer 25" ) )
.Flags( AF_NOTIFY )
.Parameter( In25_Cu ) );
@ -1754,7 +1719,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner26( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 26" ) )
.Tooltip( _( "Switch to Inner layer 26" ) )
.Flags( AF_NOTIFY )
.Parameter( In26_Cu ) );
@ -1763,7 +1727,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner27( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 27" ) )
.Tooltip( _( "Switch to Inner layer 27" ) )
.Flags( AF_NOTIFY )
.Parameter( In27_Cu ) );
@ -1772,7 +1735,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner28( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 28" ) )
.Tooltip( _( "Switch to Inner layer 28" ) )
.Flags( AF_NOTIFY )
.Parameter( In28_Cu ) );
@ -1781,7 +1743,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner29( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 29" ) )
.Tooltip( _( "Switch to Inner layer 29" ) )
.Flags( AF_NOTIFY )
.Parameter( In29_Cu ) );
@ -1790,7 +1751,6 @@ TOOL_ACTION PCB_ACTIONS::layerInner30( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.Group( PCB_ACTIONS::layerDirectSwitchActions() )
.FriendlyName( _( "Switch to Inner Layer 30" ) )
.Tooltip( _( "Switch to Inner layer 30" ) )
.Flags( AF_NOTIFY )
.Parameter( In30_Cu ) );
@ -1801,7 +1761,6 @@ TOOL_ACTION PCB_ACTIONS::layerBottom( TOOL_ACTION_ARGS()
.DefaultHotkey( WXK_PAGEDOWN )
.LegacyHotkeyName( "Switch to Copper (B.Cu) layer" )
.FriendlyName( _( "Switch to Copper (B.Cu) Layer" ) )
.Tooltip( _( "Switch to Copper (B.Cu) layer" ) )
.Flags( AF_NOTIFY )
.Parameter( B_Cu ) );
@ -1811,7 +1770,6 @@ TOOL_ACTION PCB_ACTIONS::layerNext( TOOL_ACTION_ARGS()
.DefaultHotkey( '+' )
.LegacyHotkeyName( "Switch to Next Layer" )
.FriendlyName( _( "Switch to Next Layer" ) )
.Tooltip( _( "Switch to Next Layer" ) )
.Flags( AF_NOTIFY ) );
TOOL_ACTION PCB_ACTIONS::layerPrev( TOOL_ACTION_ARGS()
@ -1820,7 +1778,6 @@ TOOL_ACTION PCB_ACTIONS::layerPrev( TOOL_ACTION_ARGS()
.DefaultHotkey( '-' )
.LegacyHotkeyName( "Switch to Previous Layer" )
.FriendlyName( _( "Switch to Previous Layer" ) )
.Tooltip( _( "Switch to Previous Layer" ) )
.Flags( AF_NOTIFY ) );
TOOL_ACTION PCB_ACTIONS::layerToggle( TOOL_ACTION_ARGS()