Loading common/class_layer_box_selector.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -143,7 +143,7 @@ void LAYER_BOX_SELECTOR::Resync() layername = board->GetLayerName( layerid ); layername = board->GetLayerName( layerid ); if( m_layerhotkeys && m_hotkeys != NULL ) if( m_layerhotkeys && m_hotkeys != NULL ) layername = AddHotkeyName( layername, m_hotkeys, layerhk[layerid], false ); layername = AddHotkeyName( layername, m_hotkeys, layerhk[layerid], IS_COMMENT ); Append( layername, layerbmp, (void*) layerid ); Append( layername, layerbmp, (void*) layerid ); } } Loading common/hotkeys_basic.cpp +54 −15 Original line number Original line Diff line number Diff line Loading @@ -171,17 +171,40 @@ wxString ReturnKeyNameFromKeyCode( int aKeycode, bool* aIsFound ) } } /* * helper function use in AddHotkeyName to calculate an accelerator string * In some menus, accelerators do not perform exactely the same action as * the hotkey that perfoms a similar action. * this is usually the case when this action uses the current mouse position * for instance zoom action is ran from the F1 key or the Zoom menu. * a zoom uses the mouse position from a hot key and not from the menu * In this case, the accelerator if Shift+<hotkey> * But for some keys, the Shift modifier is not usable, and the accelerator is Alt+<hotkey> */ static void AddModifierToKey( wxString& aFullKey, const wxString & aKey ) { #if 1 // set to 0 for new behavior, 1 for old aFullKey << wxT( " <" ) << aKey << wxT( ">" ); #else if( aKey.IsSameAs(wxT( "/" ) ) ) aFullKey << wxT( "\t" ) << MODIFIER_ALT << aKey; else aFullKey << wxT( "\t" ) << MODIFIER_SHIFT << aKey; #endif } /* AddHotkeyName /* AddHotkeyName * Add the key name from the Command id value ( m_Idcommand member value) * Add the key name from the Command id value ( m_Idcommand member value) * aText = a wxString. returns aText + key name * aText = a wxString. returns aText + key name * aList = pointer to a Ki_HotkeyInfo list of commands * aList = pointer to a Ki_HotkeyInfo list of commands * aCommandId = Command Id value * aCommandId = Command Id value * aIsShortCut = true to add <tab><keyname> (active shortcuts in menus) * aShortCutType = IS_HOTKEY to add <tab><keyname> (shortcuts in menus, same as hotkeys) * = false to add <spaces><(keyname)> * IS_ACCELERATOR to add <tab><Shift+keyname> (accelerators in menus, not hotkeys) * IS_COMMENT to add <spaces><(keyname)> mainly in tooltips * Return a wxString (aTest + key name) if key found or aText without modification * Return a wxString (aTest + key name) if key found or aText without modification */ */ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList, wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList, int aCommandId, bool aIsShortCut ) int aCommandId, HOTKEY_ACTION_TYPE aShortCutType ) { { wxString msg = aText; wxString msg = aText; wxString keyname; wxString keyname; Loading @@ -191,10 +214,18 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList, if( !keyname.IsEmpty() ) if( !keyname.IsEmpty() ) { { if( aIsShortCut ) switch( aShortCutType ) { case IS_HOTKEY: msg << wxT( "\t" ) << keyname; msg << wxT( "\t" ) << keyname; else break; msg << wxT( " <" ) << keyname << wxT( ">" ); case IS_ACCELERATOR: AddModifierToKey( msg, keyname ); break; case IS_COMMENT: msg << wxT( " (" ) << keyname << wxT( ")" ); break; } } } return msg; return msg; Loading @@ -206,14 +237,15 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList, * aText = a wxString. returns aText + key name * aText = a wxString. returns aText + key name * aList = pointer to a Ki_HotkeyInfoSectionDescriptor DescrList of commands * aList = pointer to a Ki_HotkeyInfoSectionDescriptor DescrList of commands * aCommandId = Command Id value * aCommandId = Command Id value * aIsShortCut = true to add <tab><keyname> (active shortcuts in menus) * aShortCutType = IS_HOTKEY to add <tab><keyname> (active shortcuts in menus) * = false to add <spaces><(keyname)> * IS_ACCELERATOR to add <tab><Shift+keyname> (active accelerators in menus) * IS_COMMENT to add <spaces><(keyname)> * Return a wxString (aText + key name) if key found or aText without modification * Return a wxString (aText + key name) if key found or aText without modification */ */ wxString AddHotkeyName( const wxString& aText, wxString AddHotkeyName( const wxString& aText, struct Ki_HotkeyInfoSectionDescriptor* aDescList, struct Ki_HotkeyInfoSectionDescriptor* aDescList, int aCommandId, int aCommandId, bool aIsShortCut ) HOTKEY_ACTION_TYPE aShortCutType ) { { wxString msg = aText; wxString msg = aText; wxString keyname; wxString keyname; Loading @@ -228,11 +260,18 @@ wxString AddHotkeyName( const wxString& aText, if( !keyname.IsEmpty() ) if( !keyname.IsEmpty() ) { { if( aIsShortCut ) switch( aShortCutType ) { case IS_HOTKEY: msg << wxT( "\t" ) << keyname; msg << wxT( "\t" ) << keyname; else break; msg << wxT( " <" ) << keyname << wxT( ">" ); case IS_ACCELERATOR: AddModifierToKey( msg, keyname ); break; case IS_COMMENT: msg << wxT( " (" ) << keyname << wxT( ")" ); break; } break; break; } } } } Loading eeschema/menubar.cpp +185 −185 Original line number Original line Diff line number Diff line Loading @@ -219,12 +219,12 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Zoom in // Zoom in text = AddHotkeyName( _( "Zoom In" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Zoom In" ), s_Schematic_Hokeys_Descr, ID_ZOOM_IN, false ); // add comment, not a shortcut HK_ZOOM_IN, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); // Zoom out // Zoom out text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr, ID_ZOOM_OUT, false ); // add comment, not a shortcut HK_ZOOM_OUT, IS_ACCELERATOR ); // add accelerator, not a shortcut AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); // Fit on screen // Fit on screen Loading Loading @@ -252,68 +252,68 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Component // Component text = AddHotkeyName( _( "Component" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Component" ), s_Schematic_Hokeys_Descr, HK_ADD_NEW_COMPONENT, false ); // add comment, not a shortcut HK_ADD_NEW_COMPONENT, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_SCH_PLACE_COMPONENT, text, AddMenuItem( placeMenu, ID_SCH_PLACE_COMPONENT, text, HELP_PLACE_COMPONENTS, HELP_PLACE_COMPONENTS, KiBitmap( add_component_xpm ) ); KiBitmap( add_component_xpm ) ); // Power port // Power port text = AddHotkeyName( _( "Power Port" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Power Port" ), s_Schematic_Hokeys_Descr, HK_ADD_NEW_POWER, false ); // add comment, not a shortcut HK_ADD_NEW_POWER, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text, AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text, HELP_PLACE_POWERPORT, HELP_PLACE_POWERPORT, KiBitmap( add_power_xpm ) ); KiBitmap( add_power_xpm ) ); // Wire // Wire text = AddHotkeyName( _( "Wire" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Wire" ), s_Schematic_Hokeys_Descr, HK_BEGIN_WIRE, false ); // add comment, not a shortcut HK_BEGIN_WIRE, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_WIRE_BUTT, text, AddMenuItem( placeMenu, ID_WIRE_BUTT, text, HELP_PLACE_WIRE, HELP_PLACE_WIRE, KiBitmap( add_line_xpm ) ); KiBitmap( add_line_xpm ) ); // Bus // Bus text = AddHotkeyName( _( "Bus" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Bus" ), s_Schematic_Hokeys_Descr, HK_BEGIN_BUS, false ); // add comment, not a shortcut HK_BEGIN_BUS, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_BUS_BUTT, text, AddMenuItem( placeMenu, ID_BUS_BUTT, text, HELP_PLACE_BUS, HELP_PLACE_BUS, KiBitmap( add_bus_xpm ) ); KiBitmap( add_bus_xpm ) ); // Wire to Bus entry // Wire to Bus entry text = AddHotkeyName( _( "Wire to Bus Entry" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Wire to Bus Entry" ), s_Schematic_Hokeys_Descr, HK_ADD_WIRE_ENTRY, false ); // add comment, not a shortcut HK_ADD_WIRE_ENTRY, IS_ACCELERATOR ); // addan accelerator, not a shortcut AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text, AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text, HELP_PLACE_WIRE2BUS_ENTRY, HELP_PLACE_WIRE2BUS_ENTRY, KiBitmap( add_line2bus_xpm ) ); KiBitmap( add_line2bus_xpm ) ); // Bus to Bus entry // Bus to Bus entry text = AddHotkeyName( _( "Bus to Bus Entry" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Bus to Bus Entry" ), s_Schematic_Hokeys_Descr, HK_ADD_BUS_ENTRY, false ); // add comment, not a shortcut HK_ADD_BUS_ENTRY, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text, AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text, HELP_PLACE_BUS2BUS_ENTRY, HELP_PLACE_BUS2BUS_ENTRY, KiBitmap( add_bus2bus_xpm ) ); KiBitmap( add_bus2bus_xpm ) ); // No Connect Flag // No Connect Flag text = AddHotkeyName( _( "No Connect Flag" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "No Connect Flag" ), s_Schematic_Hokeys_Descr, HK_ADD_NOCONN_FLAG, false ); // add comment, not a shortcut HK_ADD_NOCONN_FLAG, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) ); AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) ); // Net name // Net name text = AddHotkeyName( _( "Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Label" ), s_Schematic_Hokeys_Descr, HK_ADD_LABEL, false ); // add comment, not a shortcut HK_ADD_LABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_LABEL_BUTT, text, AddMenuItem( placeMenu, ID_LABEL_BUTT, text, HELP_PLACE_NETLABEL, HELP_PLACE_NETLABEL, KiBitmap( add_line_label_xpm ) ); KiBitmap( add_line_label_xpm ) ); // Global label // Global label text = AddHotkeyName( _( "Global Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Global Label" ), s_Schematic_Hokeys_Descr, HK_ADD_GLABEL, false ); // add comment, not a shortcut HK_ADD_GLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_GLABEL_BUTT, text, AddMenuItem( placeMenu, ID_GLABEL_BUTT, text, HELP_PLACE_GLOBALLABEL, HELP_PLACE_GLOBALLABEL, KiBitmap( add_glabel_xpm ) ); KiBitmap( add_glabel_xpm ) ); // Junction // Junction text = AddHotkeyName( _( "Junction" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Junction" ), s_Schematic_Hokeys_Descr, HK_ADD_JUNCTION, false ); // add comment, not a shortcut HK_ADD_JUNCTION, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_JUNCTION_BUTT, text, AddMenuItem( placeMenu, ID_JUNCTION_BUTT, text, HELP_PLACE_JUNCTION, HELP_PLACE_JUNCTION, KiBitmap( add_junction_xpm ) ); KiBitmap( add_junction_xpm ) ); Loading @@ -323,9 +323,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Hierarchical label // Hierarchical label text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_ADD_HLABEL, false ); // add comment, not a shortcut HK_ADD_HLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_ADD_HLABEL, false ); // add comment, not a shortcut HK_ADD_HLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_HIERLABEL_BUTT, AddMenuItem( placeMenu, ID_HIERLABEL_BUTT, text, HELP_PLACE_HIER_LABEL, text, HELP_PLACE_HIER_LABEL, KiBitmap( add_hierarchical_label_xpm ) ); KiBitmap( add_hierarchical_label_xpm ) ); Loading @@ -333,7 +333,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Hierarchical sheet // Hierarchical sheet text = AddHotkeyName( _( "Hierarchical Sheet" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Hierarchical Sheet" ), s_Schematic_Hokeys_Descr, HK_ADD_HIER_SHEET, false ); // add comment, not a shortcut HK_ADD_HIER_SHEET, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text, AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text, HELP_PLACE_SHEET, HELP_PLACE_SHEET, KiBitmap( add_hierarchical_subsheet_xpm ) ); KiBitmap( add_hierarchical_subsheet_xpm ) ); Loading @@ -357,14 +357,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Graphic line or polygon // Graphic line or polygon text = AddHotkeyName( _( "Graphic Polyline" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Graphic Polyline" ), s_Schematic_Hokeys_Descr, HK_ADD_GRAPHIC_POLYLINE, false ); // add comment, not a shortcut HK_ADD_GRAPHIC_POLYLINE, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text, AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text, HELP_PLACE_GRAPHICLINES, HELP_PLACE_GRAPHICLINES, KiBitmap( add_dashed_line_xpm ) ); KiBitmap( add_dashed_line_xpm ) ); // Graphic text // Graphic text text = AddHotkeyName( _( "Graphic Text" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Graphic Text" ), s_Schematic_Hokeys_Descr, HK_ADD_GRAPHIC_TEXT, false ); // add comment, not a shortcut HK_ADD_GRAPHIC_TEXT, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text, AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text, HELP_PLACE_GRAPHICTEXTS, HELP_PLACE_GRAPHICTEXTS, KiBitmap( add_text_xpm ) ); KiBitmap( add_text_xpm ) ); Loading eeschema/tool_lib.cpp +6 −6 Original line number Original line Diff line number Diff line Loading @@ -116,9 +116,9 @@ void LIB_EDIT_FRAME::ReCreateHToolbar() _( "Save current component to new library" ) ); _( "Save current component to new library" ) ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); msg = AddHotkeyName( _( "Undo last command" ), s_Schematic_Hokeys_Descr, HK_UNDO, false ); msg = AddHotkeyName( _( "Undo last command" ), s_Schematic_Hokeys_Descr, HK_UNDO, IS_COMMENT ); m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, KiBitmap( undo_xpm ), msg ); m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, KiBitmap( undo_xpm ), msg ); msg = AddHotkeyName( _( "Redo the last command" ), s_Schematic_Hokeys_Descr, HK_REDO, false ); msg = AddHotkeyName( _( "Redo the last command" ), s_Schematic_Hokeys_Descr, HK_REDO, IS_COMMENT ); m_HToolBar->AddTool( wxID_REDO, wxEmptyString, KiBitmap( redo_xpm ), msg ); m_HToolBar->AddTool( wxID_REDO, wxEmptyString, KiBitmap( redo_xpm ), msg ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); Loading @@ -133,16 +133,16 @@ void LIB_EDIT_FRAME::ReCreateHToolbar() _( "Test for duplicate pins and off grid pins" ) ); _( "Test for duplicate pins and off grid pins" ) ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); msg = AddHotkeyName( HELP_ZOOM_IN, s_Libedit_Hokeys_Descr, HK_ZOOM_IN, false ); msg = AddHotkeyName( HELP_ZOOM_IN, s_Libedit_Hokeys_Descr, HK_ZOOM_IN, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_OUT, s_Libedit_Hokeys_Descr, HK_ZOOM_OUT, false ); msg = AddHotkeyName( HELP_ZOOM_OUT, s_Libedit_Hokeys_Descr, HK_ZOOM_OUT, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Libedit_Hokeys_Descr, HK_ZOOM_REDRAW, false ); msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Libedit_Hokeys_Descr, HK_ZOOM_REDRAW, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_FIT, s_Libedit_Hokeys_Descr, HK_ZOOM_AUTO, false ); msg = AddHotkeyName( HELP_ZOOM_FIT, s_Libedit_Hokeys_Descr, HK_ZOOM_AUTO, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); Loading eeschema/tool_sch.cpp +7 −7 Original line number Original line Diff line number Diff line Loading @@ -64,33 +64,33 @@ void SCH_EDIT_FRAME::ReCreateHToolbar() m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); msg = AddHotkeyName( HELP_UNDO, s_Schematic_Hokeys_Descr, HK_UNDO, false ); msg = AddHotkeyName( HELP_UNDO, s_Schematic_Hokeys_Descr, HK_UNDO, IS_COMMENT ); m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, KiBitmap( undo_xpm ), msg ); m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, KiBitmap( undo_xpm ), msg ); msg = AddHotkeyName( HELP_REDO, s_Schematic_Hokeys_Descr, HK_REDO, false ); msg = AddHotkeyName( HELP_REDO, s_Schematic_Hokeys_Descr, HK_REDO, IS_COMMENT ); m_HToolBar->AddTool( wxID_REDO, wxEmptyString, KiBitmap( redo_xpm ), msg ); m_HToolBar->AddTool( wxID_REDO, wxEmptyString, KiBitmap( redo_xpm ), msg ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); msg = AddHotkeyName( HELP_FIND, s_Schematic_Hokeys_Descr, HK_FIND_ITEM, false ); msg = AddHotkeyName( HELP_FIND, s_Schematic_Hokeys_Descr, HK_FIND_ITEM, IS_COMMENT ); m_HToolBar->AddTool( ID_FIND_ITEMS, wxEmptyString, KiBitmap( find_xpm ), msg ); m_HToolBar->AddTool( ID_FIND_ITEMS, wxEmptyString, KiBitmap( find_xpm ), msg ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); msg = AddHotkeyName( HELP_ZOOM_IN, s_Schematic_Hokeys_Descr, HK_ZOOM_IN, false ); msg = AddHotkeyName( HELP_ZOOM_IN, s_Schematic_Hokeys_Descr, HK_ZOOM_IN, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_OUT, s_Schematic_Hokeys_Descr, HK_ZOOM_OUT, false ); msg = AddHotkeyName( HELP_ZOOM_OUT, s_Schematic_Hokeys_Descr, HK_ZOOM_OUT, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW, false ); msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_FIT, s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO, false ); msg = AddHotkeyName( HELP_ZOOM_FIT, s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); Loading Loading
common/class_layer_box_selector.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -143,7 +143,7 @@ void LAYER_BOX_SELECTOR::Resync() layername = board->GetLayerName( layerid ); layername = board->GetLayerName( layerid ); if( m_layerhotkeys && m_hotkeys != NULL ) if( m_layerhotkeys && m_hotkeys != NULL ) layername = AddHotkeyName( layername, m_hotkeys, layerhk[layerid], false ); layername = AddHotkeyName( layername, m_hotkeys, layerhk[layerid], IS_COMMENT ); Append( layername, layerbmp, (void*) layerid ); Append( layername, layerbmp, (void*) layerid ); } } Loading
common/hotkeys_basic.cpp +54 −15 Original line number Original line Diff line number Diff line Loading @@ -171,17 +171,40 @@ wxString ReturnKeyNameFromKeyCode( int aKeycode, bool* aIsFound ) } } /* * helper function use in AddHotkeyName to calculate an accelerator string * In some menus, accelerators do not perform exactely the same action as * the hotkey that perfoms a similar action. * this is usually the case when this action uses the current mouse position * for instance zoom action is ran from the F1 key or the Zoom menu. * a zoom uses the mouse position from a hot key and not from the menu * In this case, the accelerator if Shift+<hotkey> * But for some keys, the Shift modifier is not usable, and the accelerator is Alt+<hotkey> */ static void AddModifierToKey( wxString& aFullKey, const wxString & aKey ) { #if 1 // set to 0 for new behavior, 1 for old aFullKey << wxT( " <" ) << aKey << wxT( ">" ); #else if( aKey.IsSameAs(wxT( "/" ) ) ) aFullKey << wxT( "\t" ) << MODIFIER_ALT << aKey; else aFullKey << wxT( "\t" ) << MODIFIER_SHIFT << aKey; #endif } /* AddHotkeyName /* AddHotkeyName * Add the key name from the Command id value ( m_Idcommand member value) * Add the key name from the Command id value ( m_Idcommand member value) * aText = a wxString. returns aText + key name * aText = a wxString. returns aText + key name * aList = pointer to a Ki_HotkeyInfo list of commands * aList = pointer to a Ki_HotkeyInfo list of commands * aCommandId = Command Id value * aCommandId = Command Id value * aIsShortCut = true to add <tab><keyname> (active shortcuts in menus) * aShortCutType = IS_HOTKEY to add <tab><keyname> (shortcuts in menus, same as hotkeys) * = false to add <spaces><(keyname)> * IS_ACCELERATOR to add <tab><Shift+keyname> (accelerators in menus, not hotkeys) * IS_COMMENT to add <spaces><(keyname)> mainly in tooltips * Return a wxString (aTest + key name) if key found or aText without modification * Return a wxString (aTest + key name) if key found or aText without modification */ */ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList, wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList, int aCommandId, bool aIsShortCut ) int aCommandId, HOTKEY_ACTION_TYPE aShortCutType ) { { wxString msg = aText; wxString msg = aText; wxString keyname; wxString keyname; Loading @@ -191,10 +214,18 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList, if( !keyname.IsEmpty() ) if( !keyname.IsEmpty() ) { { if( aIsShortCut ) switch( aShortCutType ) { case IS_HOTKEY: msg << wxT( "\t" ) << keyname; msg << wxT( "\t" ) << keyname; else break; msg << wxT( " <" ) << keyname << wxT( ">" ); case IS_ACCELERATOR: AddModifierToKey( msg, keyname ); break; case IS_COMMENT: msg << wxT( " (" ) << keyname << wxT( ")" ); break; } } } return msg; return msg; Loading @@ -206,14 +237,15 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList, * aText = a wxString. returns aText + key name * aText = a wxString. returns aText + key name * aList = pointer to a Ki_HotkeyInfoSectionDescriptor DescrList of commands * aList = pointer to a Ki_HotkeyInfoSectionDescriptor DescrList of commands * aCommandId = Command Id value * aCommandId = Command Id value * aIsShortCut = true to add <tab><keyname> (active shortcuts in menus) * aShortCutType = IS_HOTKEY to add <tab><keyname> (active shortcuts in menus) * = false to add <spaces><(keyname)> * IS_ACCELERATOR to add <tab><Shift+keyname> (active accelerators in menus) * IS_COMMENT to add <spaces><(keyname)> * Return a wxString (aText + key name) if key found or aText without modification * Return a wxString (aText + key name) if key found or aText without modification */ */ wxString AddHotkeyName( const wxString& aText, wxString AddHotkeyName( const wxString& aText, struct Ki_HotkeyInfoSectionDescriptor* aDescList, struct Ki_HotkeyInfoSectionDescriptor* aDescList, int aCommandId, int aCommandId, bool aIsShortCut ) HOTKEY_ACTION_TYPE aShortCutType ) { { wxString msg = aText; wxString msg = aText; wxString keyname; wxString keyname; Loading @@ -228,11 +260,18 @@ wxString AddHotkeyName( const wxString& aText, if( !keyname.IsEmpty() ) if( !keyname.IsEmpty() ) { { if( aIsShortCut ) switch( aShortCutType ) { case IS_HOTKEY: msg << wxT( "\t" ) << keyname; msg << wxT( "\t" ) << keyname; else break; msg << wxT( " <" ) << keyname << wxT( ">" ); case IS_ACCELERATOR: AddModifierToKey( msg, keyname ); break; case IS_COMMENT: msg << wxT( " (" ) << keyname << wxT( ")" ); break; } break; break; } } } } Loading
eeschema/menubar.cpp +185 −185 Original line number Original line Diff line number Diff line Loading @@ -219,12 +219,12 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Zoom in // Zoom in text = AddHotkeyName( _( "Zoom In" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Zoom In" ), s_Schematic_Hokeys_Descr, ID_ZOOM_IN, false ); // add comment, not a shortcut HK_ZOOM_IN, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) ); // Zoom out // Zoom out text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr, ID_ZOOM_OUT, false ); // add comment, not a shortcut HK_ZOOM_OUT, IS_ACCELERATOR ); // add accelerator, not a shortcut AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) ); // Fit on screen // Fit on screen Loading Loading @@ -252,68 +252,68 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Component // Component text = AddHotkeyName( _( "Component" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Component" ), s_Schematic_Hokeys_Descr, HK_ADD_NEW_COMPONENT, false ); // add comment, not a shortcut HK_ADD_NEW_COMPONENT, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_SCH_PLACE_COMPONENT, text, AddMenuItem( placeMenu, ID_SCH_PLACE_COMPONENT, text, HELP_PLACE_COMPONENTS, HELP_PLACE_COMPONENTS, KiBitmap( add_component_xpm ) ); KiBitmap( add_component_xpm ) ); // Power port // Power port text = AddHotkeyName( _( "Power Port" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Power Port" ), s_Schematic_Hokeys_Descr, HK_ADD_NEW_POWER, false ); // add comment, not a shortcut HK_ADD_NEW_POWER, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text, AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text, HELP_PLACE_POWERPORT, HELP_PLACE_POWERPORT, KiBitmap( add_power_xpm ) ); KiBitmap( add_power_xpm ) ); // Wire // Wire text = AddHotkeyName( _( "Wire" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Wire" ), s_Schematic_Hokeys_Descr, HK_BEGIN_WIRE, false ); // add comment, not a shortcut HK_BEGIN_WIRE, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_WIRE_BUTT, text, AddMenuItem( placeMenu, ID_WIRE_BUTT, text, HELP_PLACE_WIRE, HELP_PLACE_WIRE, KiBitmap( add_line_xpm ) ); KiBitmap( add_line_xpm ) ); // Bus // Bus text = AddHotkeyName( _( "Bus" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Bus" ), s_Schematic_Hokeys_Descr, HK_BEGIN_BUS, false ); // add comment, not a shortcut HK_BEGIN_BUS, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_BUS_BUTT, text, AddMenuItem( placeMenu, ID_BUS_BUTT, text, HELP_PLACE_BUS, HELP_PLACE_BUS, KiBitmap( add_bus_xpm ) ); KiBitmap( add_bus_xpm ) ); // Wire to Bus entry // Wire to Bus entry text = AddHotkeyName( _( "Wire to Bus Entry" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Wire to Bus Entry" ), s_Schematic_Hokeys_Descr, HK_ADD_WIRE_ENTRY, false ); // add comment, not a shortcut HK_ADD_WIRE_ENTRY, IS_ACCELERATOR ); // addan accelerator, not a shortcut AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text, AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text, HELP_PLACE_WIRE2BUS_ENTRY, HELP_PLACE_WIRE2BUS_ENTRY, KiBitmap( add_line2bus_xpm ) ); KiBitmap( add_line2bus_xpm ) ); // Bus to Bus entry // Bus to Bus entry text = AddHotkeyName( _( "Bus to Bus Entry" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Bus to Bus Entry" ), s_Schematic_Hokeys_Descr, HK_ADD_BUS_ENTRY, false ); // add comment, not a shortcut HK_ADD_BUS_ENTRY, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text, AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text, HELP_PLACE_BUS2BUS_ENTRY, HELP_PLACE_BUS2BUS_ENTRY, KiBitmap( add_bus2bus_xpm ) ); KiBitmap( add_bus2bus_xpm ) ); // No Connect Flag // No Connect Flag text = AddHotkeyName( _( "No Connect Flag" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "No Connect Flag" ), s_Schematic_Hokeys_Descr, HK_ADD_NOCONN_FLAG, false ); // add comment, not a shortcut HK_ADD_NOCONN_FLAG, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) ); AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) ); // Net name // Net name text = AddHotkeyName( _( "Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Label" ), s_Schematic_Hokeys_Descr, HK_ADD_LABEL, false ); // add comment, not a shortcut HK_ADD_LABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_LABEL_BUTT, text, AddMenuItem( placeMenu, ID_LABEL_BUTT, text, HELP_PLACE_NETLABEL, HELP_PLACE_NETLABEL, KiBitmap( add_line_label_xpm ) ); KiBitmap( add_line_label_xpm ) ); // Global label // Global label text = AddHotkeyName( _( "Global Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Global Label" ), s_Schematic_Hokeys_Descr, HK_ADD_GLABEL, false ); // add comment, not a shortcut HK_ADD_GLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_GLABEL_BUTT, text, AddMenuItem( placeMenu, ID_GLABEL_BUTT, text, HELP_PLACE_GLOBALLABEL, HELP_PLACE_GLOBALLABEL, KiBitmap( add_glabel_xpm ) ); KiBitmap( add_glabel_xpm ) ); // Junction // Junction text = AddHotkeyName( _( "Junction" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Junction" ), s_Schematic_Hokeys_Descr, HK_ADD_JUNCTION, false ); // add comment, not a shortcut HK_ADD_JUNCTION, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_JUNCTION_BUTT, text, AddMenuItem( placeMenu, ID_JUNCTION_BUTT, text, HELP_PLACE_JUNCTION, HELP_PLACE_JUNCTION, KiBitmap( add_junction_xpm ) ); KiBitmap( add_junction_xpm ) ); Loading @@ -323,9 +323,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Hierarchical label // Hierarchical label text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_ADD_HLABEL, false ); // add comment, not a shortcut HK_ADD_HLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_ADD_HLABEL, false ); // add comment, not a shortcut HK_ADD_HLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_HIERLABEL_BUTT, AddMenuItem( placeMenu, ID_HIERLABEL_BUTT, text, HELP_PLACE_HIER_LABEL, text, HELP_PLACE_HIER_LABEL, KiBitmap( add_hierarchical_label_xpm ) ); KiBitmap( add_hierarchical_label_xpm ) ); Loading @@ -333,7 +333,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Hierarchical sheet // Hierarchical sheet text = AddHotkeyName( _( "Hierarchical Sheet" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Hierarchical Sheet" ), s_Schematic_Hokeys_Descr, HK_ADD_HIER_SHEET, false ); // add comment, not a shortcut HK_ADD_HIER_SHEET, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text, AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text, HELP_PLACE_SHEET, HELP_PLACE_SHEET, KiBitmap( add_hierarchical_subsheet_xpm ) ); KiBitmap( add_hierarchical_subsheet_xpm ) ); Loading @@ -357,14 +357,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Graphic line or polygon // Graphic line or polygon text = AddHotkeyName( _( "Graphic Polyline" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Graphic Polyline" ), s_Schematic_Hokeys_Descr, HK_ADD_GRAPHIC_POLYLINE, false ); // add comment, not a shortcut HK_ADD_GRAPHIC_POLYLINE, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text, AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text, HELP_PLACE_GRAPHICLINES, HELP_PLACE_GRAPHICLINES, KiBitmap( add_dashed_line_xpm ) ); KiBitmap( add_dashed_line_xpm ) ); // Graphic text // Graphic text text = AddHotkeyName( _( "Graphic Text" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Graphic Text" ), s_Schematic_Hokeys_Descr, HK_ADD_GRAPHIC_TEXT, false ); // add comment, not a shortcut HK_ADD_GRAPHIC_TEXT, IS_ACCELERATOR ); // add an accelerator, not a shortcut AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text, AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text, HELP_PLACE_GRAPHICTEXTS, HELP_PLACE_GRAPHICTEXTS, KiBitmap( add_text_xpm ) ); KiBitmap( add_text_xpm ) ); Loading
eeschema/tool_lib.cpp +6 −6 Original line number Original line Diff line number Diff line Loading @@ -116,9 +116,9 @@ void LIB_EDIT_FRAME::ReCreateHToolbar() _( "Save current component to new library" ) ); _( "Save current component to new library" ) ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); msg = AddHotkeyName( _( "Undo last command" ), s_Schematic_Hokeys_Descr, HK_UNDO, false ); msg = AddHotkeyName( _( "Undo last command" ), s_Schematic_Hokeys_Descr, HK_UNDO, IS_COMMENT ); m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, KiBitmap( undo_xpm ), msg ); m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, KiBitmap( undo_xpm ), msg ); msg = AddHotkeyName( _( "Redo the last command" ), s_Schematic_Hokeys_Descr, HK_REDO, false ); msg = AddHotkeyName( _( "Redo the last command" ), s_Schematic_Hokeys_Descr, HK_REDO, IS_COMMENT ); m_HToolBar->AddTool( wxID_REDO, wxEmptyString, KiBitmap( redo_xpm ), msg ); m_HToolBar->AddTool( wxID_REDO, wxEmptyString, KiBitmap( redo_xpm ), msg ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); Loading @@ -133,16 +133,16 @@ void LIB_EDIT_FRAME::ReCreateHToolbar() _( "Test for duplicate pins and off grid pins" ) ); _( "Test for duplicate pins and off grid pins" ) ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); msg = AddHotkeyName( HELP_ZOOM_IN, s_Libedit_Hokeys_Descr, HK_ZOOM_IN, false ); msg = AddHotkeyName( HELP_ZOOM_IN, s_Libedit_Hokeys_Descr, HK_ZOOM_IN, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_OUT, s_Libedit_Hokeys_Descr, HK_ZOOM_OUT, false ); msg = AddHotkeyName( HELP_ZOOM_OUT, s_Libedit_Hokeys_Descr, HK_ZOOM_OUT, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Libedit_Hokeys_Descr, HK_ZOOM_REDRAW, false ); msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Libedit_Hokeys_Descr, HK_ZOOM_REDRAW, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_FIT, s_Libedit_Hokeys_Descr, HK_ZOOM_AUTO, false ); msg = AddHotkeyName( HELP_ZOOM_FIT, s_Libedit_Hokeys_Descr, HK_ZOOM_AUTO, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); Loading
eeschema/tool_sch.cpp +7 −7 Original line number Original line Diff line number Diff line Loading @@ -64,33 +64,33 @@ void SCH_EDIT_FRAME::ReCreateHToolbar() m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); msg = AddHotkeyName( HELP_UNDO, s_Schematic_Hokeys_Descr, HK_UNDO, false ); msg = AddHotkeyName( HELP_UNDO, s_Schematic_Hokeys_Descr, HK_UNDO, IS_COMMENT ); m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, KiBitmap( undo_xpm ), msg ); m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, KiBitmap( undo_xpm ), msg ); msg = AddHotkeyName( HELP_REDO, s_Schematic_Hokeys_Descr, HK_REDO, false ); msg = AddHotkeyName( HELP_REDO, s_Schematic_Hokeys_Descr, HK_REDO, IS_COMMENT ); m_HToolBar->AddTool( wxID_REDO, wxEmptyString, KiBitmap( redo_xpm ), msg ); m_HToolBar->AddTool( wxID_REDO, wxEmptyString, KiBitmap( redo_xpm ), msg ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); msg = AddHotkeyName( HELP_FIND, s_Schematic_Hokeys_Descr, HK_FIND_ITEM, false ); msg = AddHotkeyName( HELP_FIND, s_Schematic_Hokeys_Descr, HK_FIND_ITEM, IS_COMMENT ); m_HToolBar->AddTool( ID_FIND_ITEMS, wxEmptyString, KiBitmap( find_xpm ), msg ); m_HToolBar->AddTool( ID_FIND_ITEMS, wxEmptyString, KiBitmap( find_xpm ), msg ); m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator(); msg = AddHotkeyName( HELP_ZOOM_IN, s_Schematic_Hokeys_Descr, HK_ZOOM_IN, false ); msg = AddHotkeyName( HELP_ZOOM_IN, s_Schematic_Hokeys_Descr, HK_ZOOM_IN, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_OUT, s_Schematic_Hokeys_Descr, HK_ZOOM_OUT, false ); msg = AddHotkeyName( HELP_ZOOM_OUT, s_Schematic_Hokeys_Descr, HK_ZOOM_OUT, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW, false ); msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ), msg ); msg = AddHotkeyName( HELP_ZOOM_FIT, s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO, false ); msg = AddHotkeyName( HELP_ZOOM_FIT, s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO, IS_COMMENT ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); Loading